Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

listPrint.vue 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. <template>
  2. <div>
  3. <template>
  4. <el-button
  5. style="position:fixed;right:25px;z-index:999"
  6. :loading="loading"
  7. size="small"
  8. icon="el-icon-printer"
  9. @click="printThisPage"
  10. type="primary"
  11. >打印
  12. </el-button
  13. >
  14. </template>
  15. <div class='dialysisPage' style="padding-top:40px;">
  16. <printOne v-if="org_id != 10106" :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
  17. <printTwo v-if="org_id == 10106" :info="info" :order_infos="order_infos" :p_admin="p_admin" :charge_admin="charge_admin"></printTwo>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import printOne from './listTemplate/printOne'
  23. import { getHisOrderDetail } from '@/api/his/his'
  24. import { uParseTime } from '@/utils/tools'
  25. import printTwo from './statementTemplate/printTwo'
  26. import axios from 'axios'
  27. export default {
  28. name: 'listPrint',
  29. components: {
  30. printOne,
  31. printTwo
  32. },
  33. props: {
  34. paramsObj: Object
  35. },
  36. data() {
  37. return {
  38. list: [],
  39. patient:{},
  40. order:{},
  41. admin:{},
  42. info:null,
  43. p_admin:{},
  44. charge_admin:{},
  45. org_id:''
  46. }
  47. },
  48. created() {
  49. this.getInfo(this.paramsObj.id);
  50. this.org_id = this.$store.getters.xt_user.org_id;
  51. if(this.org_id == 10106){
  52. this.getInfo10106(this.paramsObj.id)
  53. }
  54. },
  55. methods: {
  56. getTimes(time) {
  57. return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
  58. },
  59. getInfo(order_id) {
  60. let params = {
  61. id: order_id
  62. };
  63. getHisOrderDetail(params).then(response => {
  64. if (response.data.state == 0) {
  65. this.$message.error(response.data.msg);
  66. return false
  67. } else {
  68. this.order = response.data.data.order;
  69. this.patient = response.data.data.patient;
  70. console.log(this.patient);
  71. this.admin = response.data.data.admin_info;
  72. for (let i = 0; i < response.data.data.order_info.length; i++) {
  73. var infos = response.data.data.order_info[i];
  74. let obj = {
  75. med_chrgitm_type: this.getType(infos.med_chrgitm_type),
  76. price: infos.pric,
  77. count: infos.cnt
  78. };
  79. if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
  80. obj['p_time'] = this.getTimes(infos.project.prescription.ctime);
  81. obj['name'] = infos.project.project.project_name;
  82. obj['spec'] = 1;
  83. obj['unit'] = infos.project.project.unit
  84. }
  85. if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
  86. obj['p_time'] = this.getTimes(infos.advice.prescription.ctime);
  87. obj['name'] = infos.advice.advice_name;
  88. obj['spec'] = infos.advice.drug.drug_spec;
  89. obj['unit'] = infos.advice.drug.max_unit
  90. }
  91. this.list.push(obj);
  92. this.list.sort(function(a, b) {
  93. return b.p_time < a.p_time ? 1 : -1
  94. })
  95. }
  96. }
  97. })
  98. },
  99. getType(med_chrgitm_type) {
  100. switch (med_chrgitm_type) {
  101. case '01':
  102. return '床位费';
  103. break;
  104. case '02':
  105. return '诊察费';
  106. break;
  107. case '03':
  108. return '检查费';
  109. break;
  110. case '04':
  111. return '化验费';
  112. break;
  113. case '05':
  114. return '治疗费';
  115. break;
  116. case '06':
  117. return '手术费';
  118. break;
  119. case '07':
  120. return '护理费';
  121. break;
  122. case '08':
  123. return '材料费';
  124. break;
  125. case '09':
  126. return '西药费';
  127. break;
  128. case '10':
  129. return '中药饮片费';
  130. break;
  131. case '11':
  132. return '中成药费';
  133. break;
  134. case '12':
  135. return '一般诊疗费';
  136. break;
  137. case '13':
  138. return '挂号费';
  139. break;
  140. case '14':
  141. return '其他费';
  142. break
  143. }
  144. },
  145. printThisPage() {
  146. if(this.org_id != 10106){
  147. const style =
  148. '@media print {.listTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}';
  149. printJS({
  150. printable: 'list-print',
  151. type: 'html',
  152. style: style,
  153. scanStyles: false
  154. })
  155. }else{
  156. const style =
  157. '@media print {#statement-print{font-size:12px;width:600px;margin:0 auto;}.statementTitle{font-size: 22px;text-align: center;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}';
  158. printJS({
  159. printable: "statement-print",
  160. type: "html",
  161. style: style,
  162. scanStyles: false
  163. });
  164. }
  165. // if (this.org_template_info.template_id == 1) {
  166. // printJS({
  167. // printable: "dialysis-print-box",
  168. // type: "html",
  169. // style: style,
  170. // scanStyles: false
  171. // });
  172. // }
  173. },
  174. getInfo10106(order_id) {
  175. if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
  176. var that = this;
  177. axios.get('http://127.0.0.1:9532/api/settle/query', {
  178. params: {
  179. order_id: order_id,
  180. admin_user_id:that.$store.getters.xt_user.user.id
  181. }
  182. })
  183. .then(function (response) {
  184. if (response.data.state == 0) {
  185. this.$message.error(response.data.msg);
  186. return false
  187. } else {
  188. console.log("logloglog");
  189. console.log(response.data.data.info);
  190. that.info = response.data.data.info;
  191. that.p_admin = response.data.data.printor_admin;
  192. that.charge_admin = response.data.data.charge_admin;
  193. that.order_infos = response.data.data;
  194. that.info['p_admin'] = that.p_admin;
  195. that.info['charge_admin'] = that.charge_admin;
  196. that.info['date'] = response.data.data.date;
  197. that.info['number'] = response.data.data.number;
  198. that.info['order_infos'] = response.data.data.order_infos;
  199. that.info['diagnosis'] = response.data.data.diagnosis;
  200. console.log(that.info);
  201. that.info['bed_cost_total'] = response.data.data.bedCostTotal;
  202. that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal;
  203. that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal;
  204. that.info['operation_cost_total'] = response.data.data.operationCostTotal;
  205. that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal;
  206. that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal;
  207. that.info['other_cost_total'] = response.data.data.otherCostTotal;
  208. that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal;
  209. that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal;
  210. that.info['material_cost_total'] = response.data.data.materialCostTotal;
  211. that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal;
  212. that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal;
  213. that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal;
  214. that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal;
  215. that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal;
  216. that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal;
  217. that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal;
  218. that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
  219. that.info['check_cost_total'] = response.data.data.checkCostTotal;
  220. that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal;
  221. that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal;
  222. that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal;
  223. that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal;
  224. that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal;
  225. that.info['treat_cost_total'] = response.data.data.treatCostTotal;
  226. that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal;
  227. that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal;
  228. console.log(this.info)
  229. }
  230. })
  231. .catch(function (error) {
  232. });
  233. }
  234. }
  235. }
  236. }
  237. </script>
  238. <style>
  239. .dialysis-print-order {
  240. width: 960px;
  241. margin: 0 auto;
  242. }
  243. .dialysis-print-order .order-yy-name {
  244. margin: auto;
  245. text-align: center;
  246. font-size: 20px;
  247. letter-spacing: 5px;
  248. }
  249. .dialysis-print-order .order-title {
  250. margin: auto;
  251. font-weight: 600;
  252. text-align: center;
  253. font-size: 22px;
  254. padding: 10px;
  255. }
  256. .dialysis-print-order .table-box {
  257. width: 100%;
  258. line-height: 23px;
  259. font-size: 14px;
  260. }
  261. .dialysis-print-order .print-table {
  262. width: 100%;
  263. text-align: center;
  264. border-collapse: collapse;
  265. line-height: 40px;
  266. font-size: 14px;
  267. border-color: #000;
  268. }
  269. .dialysis-print-order .print-table-no {
  270. width: 100%;
  271. text-align: center;
  272. border-collapse: collapse;
  273. font-size: 14px;
  274. }
  275. .dialysis-print-order .under-line {
  276. border-bottom: 1px solid #999;
  277. width: 95%;
  278. text-align: center;
  279. margin-left: 2px;
  280. }
  281. .dialysis-print-order .title-box {
  282. text-align: center;
  283. font-size: 16px;
  284. }
  285. .dialysis-print-order .radio-lebel-box {
  286. font-weight: 400;
  287. cursor: pointer;
  288. }
  289. .dialysis-print-order .radio-no {
  290. opacity: 0;
  291. outline: none;
  292. position: absolute;
  293. margin: 0;
  294. width: 0;
  295. height: 0;
  296. z-index: -1;
  297. }
  298. .dialysis-print-order .radio-inner {
  299. white-space: nowrap;
  300. cursor: pointer;
  301. outline: none;
  302. display: inline-block;
  303. line-height: 1;
  304. position: relative;
  305. vertical-align: middle;
  306. }
  307. .dialysis-print-order .radio-fang {
  308. display: inline-block;
  309. position: relative;
  310. border: 1px solid #000;
  311. box-sizing: border-box;
  312. width: 14px;
  313. height: 14px;
  314. background-color: #fff;
  315. z-index: 1;
  316. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  317. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  318. }
  319. .dialysis-print-order .is-checked-radio::after {
  320. content: "√";
  321. font-size: 15px;
  322. }
  323. .dialysis-print-order .print-table-no tr td {
  324. padding: 8px 5px;
  325. line-height: 25px;
  326. }
  327. .dialysis-print-order .print-table tr td {
  328. padding: 1px 1px;
  329. /*line-height: 25px;*/
  330. }
  331. .es-img {
  332. height: 30px;
  333. }
  334. .advice-name {
  335. text-align: left;
  336. }
  337. .advice-children {
  338. display: flex;
  339. }
  340. .title-box-pro {
  341. border: 0 #fff;
  342. line-height: 25px;
  343. height: 25px;
  344. text-align: left;
  345. padding-left: 10px !important;
  346. }
  347. .title-box-pro-tr {
  348. border: 0 #fff;
  349. }
  350. .text-align-left {
  351. text-align: left !important;
  352. padding-left: 10px !important;
  353. font-size: 14px !important;
  354. line-height: 25px;
  355. }
  356. .print-table-tr-new td {
  357. line-height: 20px !important;
  358. }
  359. .border-top-solid {
  360. border: solid 1px #000;
  361. }
  362. .print-template-two tr {
  363. line-height: 30px;
  364. }
  365. .table-box1 {
  366. border: 1px solid #000;
  367. width: 100%;
  368. line-height: 30px;
  369. font-size: 14px;
  370. border-collapse: collapse;
  371. }
  372. .table-box1 tr {
  373. border-bottom: 1px solid #000;
  374. }
  375. </style>
  376. <style lang="scss">
  377. .newContainer {
  378. .dialysisPage::-webkit-scrollbar {
  379. height: 15px;
  380. }
  381. .el-date-editor {
  382. .el-input__inner {
  383. padding-right: 0px;
  384. }
  385. }
  386. .el-table td, .el-table th {
  387. text-align: center;
  388. }
  389. }
  390. .newContainer::-webkit-scrollbar {
  391. height: 15px !important;
  392. }
  393. </style>