statementPrint.vue 38KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024
  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. >打印</el-button
  12. >
  13. </template>
  14. <div class="dialysisPage" style="padding-top: 40px">
  15. <div
  16. v-if="
  17. org_id == 9990 ||
  18. org_id == 10138 ||
  19. org_id == 9504 ||
  20. org_id == 10028 ||
  21. org_id == 4 ||
  22. org_id == 10278
  23. "
  24. >
  25. <printTwo :info="info" v-if="org_id == 9990"></printTwo>
  26. <printThree
  27. :info="info"
  28. :paramsObj="paramsObj"
  29. :balanceAccounts="balanceAccounts"
  30. v-if="org_id == 10138 || org_id == 4 || org_id == 10278"
  31. ></printThree>
  32. <printFour
  33. v-if="org_id == 9504 || org_id == 10028 || org_id == 10088"
  34. :info="info"
  35. :paramsObj="paramsObj"
  36. :balanceAccounts="balanceAccounts"
  37. ></printFour>
  38. <!-- <privateChargePrint :info="info" v-if="org_id == 10215 && this.paramsObj.balance_accounts_type == 2"></privateChargePrint>-->
  39. </div>
  40. <!-- <print-other :info="info" v-if="org_id == 9919"></print-other>-->
  41. <!-- <printOne :info=" info" v-if="org_id == 10215 && this.paramsObj.balance_accounts_type == 2"></printOne>-->
  42. <printFive
  43. v-if="org_id == 0"
  44. :info="info"
  45. :paramsObj="paramsObj"
  46. :balanceAccounts="balanceAccounts"
  47. ></printFive>
  48. <printOne :info="info" v-else></printOne>
  49. <!-- 测试医保环境下表格样式放开以下这条 -->
  50. <!-- <testVue :info="info" v-else></testVue> -->
  51. </div>
  52. </div>
  53. </template>
  54. <script>
  55. import { parseTime } from "@/utils";
  56. import { getDialysisRecord } from "@/api/dialysis";
  57. import { getDataConfig } from "@/utils/data";
  58. import { jsGetAge, uParseTime } from "@/utils/tools";
  59. import axios from "axios";
  60. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  61. import print from "print-js";
  62. import printOne from "./statementTemplate/printOne";
  63. import privateChargePrint from "./statementTemplate/privateChargePrint";
  64. import printTwo from "./statementTemplate/printTwo";
  65. import printThree from "./statementTemplate/printThree";
  66. import printFour from "./statementTemplate/printFour";
  67. import printFive from "./statementTemplate/printFive";
  68. import testVue from "./statementTemplate/test";
  69. import {
  70. getAllDoctorList,
  71. getAllHisPatientList,
  72. getPrescriptionPrint,
  73. } from "@/api/project/project";
  74. import { getPrivateExpenses, getPrivateExpensesOrder } from "@/api/his/his";
  75. // import PrintOther from '../hospitalStation/statementTemplate/printOther'
  76. export default {
  77. name: "dialysisPrintOrder",
  78. components: {
  79. BreadCrumb,
  80. printOne,
  81. privateChargePrint,
  82. printTwo,
  83. printThree,
  84. printFour,
  85. testVue,
  86. printFive,
  87. },
  88. props: {
  89. paramsObj: Object,
  90. },
  91. data() {
  92. return {
  93. crumbs: [
  94. { path: false, name: "门诊医生站" },
  95. { path: false, name: "打印" },
  96. ],
  97. record_date: "",
  98. patientTableData: [],
  99. advicePrint: [],
  100. hisPatient: {},
  101. patient: {},
  102. search_input: "",
  103. loading: false,
  104. patient_id: 0,
  105. prescription_id: 0,
  106. ids: "",
  107. info: null,
  108. org_id: "",
  109. balanceAccounts: {},
  110. };
  111. },
  112. methods: {
  113. printThisPage() {
  114. var ptime = Math.round(new Date().getTime() / 1000);
  115. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  116. if (
  117. this.$store.getters.xt_user.org_id == 10138 ||
  118. this.$store.getters.xt_user.org_id == 4 ||
  119. this.$store.getters.xt_user.org_id == 10278
  120. ) {
  121. setTimeout(() => {
  122. const style =
  123. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 47%;}}}";
  124. const style2 =
  125. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 50%;}}}";
  126. const style3 =
  127. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 55%;}}}";
  128. const style4 =
  129. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 58%;}}}";
  130. const style5 =
  131. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 61%;}}}";
  132. const style6 =
  133. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 66%;}}}";
  134. const style7 =
  135. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 71%;}}}";
  136. const style8 =
  137. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 75%;}}}";
  138. const style9 =
  139. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 80%;}}}";
  140. const style10 =
  141. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 85%;}}}";
  142. const style11 =
  143. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 87%;}}}";
  144. const style12 =
  145. "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 89%;}}}";
  146. if (this.num >= 13) {
  147. printJS({
  148. printable: "prescription-print",
  149. type: "html",
  150. style: style,
  151. scanStyles: false,
  152. });
  153. } else if (this.num == 12) {
  154. printJS({
  155. printable: "prescription-print",
  156. type: "html",
  157. style: style2,
  158. scanStyles: false,
  159. });
  160. } else if (this.num == 11) {
  161. printJS({
  162. printable: "prescription-print",
  163. type: "html",
  164. style: style3,
  165. scanStyles: false,
  166. });
  167. } else if (this.num == 10) {
  168. printJS({
  169. printable: "prescription-print",
  170. type: "html",
  171. style: style4,
  172. scanStyles: false,
  173. });
  174. } else if (this.num == 9) {
  175. printJS({
  176. printable: "prescription-print",
  177. type: "html",
  178. style: style5,
  179. scanStyles: false,
  180. });
  181. } else if (this.num == 8) {
  182. printJS({
  183. printable: "prescription-print",
  184. type: "html",
  185. style: style6,
  186. scanStyles: false,
  187. });
  188. } else if (this.num == 7) {
  189. printJS({
  190. printable: "prescription-print",
  191. type: "html",
  192. style: style7,
  193. scanStyles: false,
  194. });
  195. } else if (this.num == 6) {
  196. printJS({
  197. printable: "prescription-print",
  198. type: "html",
  199. style: style8,
  200. scanStyles: false,
  201. });
  202. } else if (this.num == 5) {
  203. printJS({
  204. printable: "prescription-print",
  205. type: "html",
  206. style: style9,
  207. scanStyles: false,
  208. });
  209. } else if (this.num == 4) {
  210. printJS({
  211. printable: "prescription-print",
  212. type: "html",
  213. style: style10,
  214. scanStyles: false,
  215. });
  216. } else if (this.num == 3) {
  217. printJS({
  218. printable: "prescription-print",
  219. type: "html",
  220. style: style11,
  221. scanStyles: false,
  222. });
  223. } else if (this.num <= 2) {
  224. printJS({
  225. printable: "prescription-print",
  226. type: "html",
  227. style: style12,
  228. scanStyles: false,
  229. });
  230. }
  231. }, 500);
  232. } else if (
  233. this.$store.getters.xt_user.org_id == 9504 ||
  234. this.$store.getters.xt_user.org_id == 10028
  235. ) {
  236. const style =
  237. "@media print {.printTitle{font-size: 20px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;font-size:12px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;font-size:12px;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none;font-size:12px;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;font-size:12px;}.actionBar div{width:150px;}}";
  238. printJS({
  239. printable: "prescription-print",
  240. type: "html",
  241. style: style,
  242. scanStyles: false,
  243. });
  244. } else {
  245. // 医保环境打印格式
  246. if (
  247. this.$store.getters.xt_user.org_id == 9919 ||
  248. this.$store.getters.xt_user.org_id == 10106
  249. ) {
  250. const style =
  251. "@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}";
  252. printJS({
  253. printable: "statement-print",
  254. type: "html",
  255. style: style,
  256. scanStyles: false,
  257. });
  258. } else if (
  259. this.$store.getters.xt_user.org_id == 0 ||
  260. this.$store.getters.xt_user.org_id == 10191
  261. ) {
  262. const style =
  263. "@media print {.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;} .statementTable thead{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;} .statementTable tbody{text-align:left;} .statementTable tbody .view_tr{text-align:center;border: 1px solid;} tbody .dashed_tr{border: 1px dashed;text-align:center} .list_table{width: 100%;margin-bottom: 100px;} tbody tr td div{height:25px;}}";
  264. printJS({
  265. printable: "statement-print",
  266. type: "html",
  267. style: style,
  268. scanStyles: false,
  269. });
  270. } else {
  271. const style =
  272. "@media print {#statement-print{font-size:14px;border:1px solid white}.statementTitle{font-size: 22px;text-align: center;font-weight: bold;}table{border-collapse: collapse;text-align: center;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 57%;}}}";
  273. printJS({
  274. printable: "statement-print",
  275. type: "html",
  276. style: style,
  277. scanStyles: false,
  278. });
  279. }
  280. }
  281. // if (this.org_template_info.template_id == 1) {
  282. // printJS({
  283. // printable: "dialysis-print-box",
  284. // type: "html",
  285. // style: style,
  286. // scanStyles: false
  287. // });
  288. // }
  289. },
  290. getAllDoctorList() {
  291. getAllDoctorList().then((response) => {
  292. if (response.data.state == 1) {
  293. var doctor = response.data.data.doctor;
  294. this.doctorList = doctor;
  295. }
  296. });
  297. },
  298. getAllHisPatientList() {
  299. const params = {
  300. record_date: this.record_date,
  301. };
  302. getAllHisPatientList(params).then((response) => {
  303. if (response.data.state == 1) {
  304. this.patientTableData = response.data.data.list;
  305. this.patientTableDataTwo = response.data.data.list;
  306. console.log("222", this.patientTableData);
  307. let cal_one = 0;
  308. let cal_two = 0;
  309. for (let i = 0; i < response.data.data.list.length; i++) {
  310. if (
  311. response.data.data.list[i].prescription == null ||
  312. response.data.data.list[i].prescription.length == 0
  313. ) {
  314. cal_one = cal_one + 1;
  315. }
  316. if (
  317. response.data.data.list[i].prescription != null &&
  318. response.data.data.list[i].prescription.length > 0
  319. ) {
  320. cal_two = cal_two + 1;
  321. }
  322. }
  323. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  324. // console.log(this.patientTableData[0])
  325. // this.choosePatient(this.patientTableData[0])
  326. this.cal_one = cal_one;
  327. this.cal_two = cal_two;
  328. }
  329. });
  330. },
  331. changePatient(row) {
  332. console.log("row", row);
  333. this.patient_id = row.patient_id;
  334. this.record_date = this.record_date;
  335. this.prescription_id = this.prescription_id;
  336. // var params = {
  337. // patient_id:row.patient_id,
  338. // record_date:this.record_date,
  339. // prescription_id:this.prescription_id,
  340. // }
  341. // getPrescriptionPrint(params).then(response=>{
  342. // if(response.data.state == 1){
  343. // var advicePrint = response.data.data.advicePrint
  344. // console.log("adviceprint",advicePrint)
  345. // this.advicePrint = advicePrint
  346. // // var hisPatient = response.data.data.hisPatient
  347. // // console.log("hispatient",hisPatient)
  348. // // this.hisPatient = hisPatient
  349. // var patient = response.data.data.patient
  350. // console.log("patient",patient)
  351. // this.patient = patient
  352. // var doctorPorject = response.data.data.doctorPorject
  353. // console.log("doctorporject",doctorPorject)
  354. // }
  355. // })
  356. },
  357. getTimes(time) {
  358. return uParseTime(time, "{y}-{m}-{d}");
  359. },
  360. searchAction() {},
  361. getInfo(order_id, obj) {
  362. // 模拟数据
  363. // let datainfo =
  364. // '{"code":0,"data":{"info":{"setl_time":"2022-04-22 08:32:58","cvlserv_pay":0,"year":"2022","med_type":"11","psn_pay":51.82,"opter_id":"孙欣欣","begndate":"2022-04-22","flxempe_flag":"0","hifmi_pay":0,"psn_no":"32090000000000001004696424","act_pay_dedc":0,"medins_setl_id":null,"acct_mulaid_pay":0,"clr_way":"1","oth_pay":0,"gend":"1","mdtrt_id":"32090000000100784946","acct_pay":0,"inscp_scp_amt":575.8,"insutype":"390","invono":null,"enddate":"2022-04-22","cash_payamt":51.82,"psn_type":"1501","fixmedins_name":"盐城响水悦达血液透析中心有限公司","hifp_pay":403.06,"new_flag":null,"overlmt_selfpay":0,"preselfpay_amt":0,"pay_loc":"2","clr_type":"11","refd_setl_flag":"0","cvlserv_flag":"0","emp_name":"合兴村委会","brdy":"1975-08-29","naty":"01","certno":"320921197508296752","dise_code":"M07800","fixmedins_code":"H32092103007","dedc_hosp_lv":"1","opter_name":"孙欣欣","balc":0,"fixmedins_poolarea":"320921","psn_cert_type":"01","hifob_pay":0,"medfee_sumamt":575.8,"hifes_pay":0,"fund_pay_sumamt":523.98,"opt_time":"2022-04-22 08:32:58","fulamt_ownpay_amt":0,"setl_id":"320900000000000000000087224401","maf_pay":120.92,"psn_name":"陆树新","insu_optins":null,"pref_fund_pay":null,"clr_optins":"320921","pool_prop_selfpay":0.7,"dise_name":"慢性肾功能衰竭","lmtpric_hosp_lv":"1","age":46,"dtrt_cert_type":"03","hosp_lv":"8"}}}';
  365. // var json = JSON.parse(datainfo);
  366. // console.log(json, "json");
  367. // this.info = json.data.info
  368. //
  369. if (obj.balance_accounts_type == 2) {
  370. let params = {
  371. his_patient_id: obj.his_patient_id,
  372. id: obj.order_id,
  373. order_id: obj.order_id,
  374. admin_user_id: this.$store.getters.xt_user.user.id,
  375. };
  376. if (
  377. this.org_id == 10138 ||
  378. this.$store.getters.xt_user.org_id == 4 ||
  379. this.org_id == 10278
  380. ) {
  381. getPrivateExpenses(params).then((response) => {
  382. if (response.data.state == 0) {
  383. // this.$message.error(response.data.msg)
  384. return false;
  385. } else {
  386. this.balanceAccounts = response.data.data;
  387. let arr = [];
  388. let obj = {
  389. type: 1,
  390. details: [],
  391. total: 0,
  392. };
  393. let obj2 = {
  394. type: 2,
  395. details: [],
  396. total: 0,
  397. };
  398. let obj3 = {
  399. type: 3,
  400. details: [],
  401. total: 0,
  402. };
  403. let num = 0;
  404. let obj4 = {
  405. type: 4,
  406. details: [],
  407. total: 0,
  408. };
  409. this.balanceAccounts.order_info.map((item) => {
  410. if (item.advice_id > 0) {
  411. obj.details.push(item);
  412. obj.total += item.pric * item.advice.prescribing_number;
  413. num++;
  414. } else {
  415. if (item.project.type == 2) {
  416. obj2.details.push(item);
  417. obj2.total += item.pric * item.project.count;
  418. num++;
  419. } else {
  420. obj3.details.push(item);
  421. obj3.total += item.pric * item.project.count;
  422. num++;
  423. }
  424. }
  425. });
  426. if (this.balanceAccounts.new_order_info != null) {
  427. this.balanceAccounts.new_order_info.map((item) => {
  428. obj2.total = obj2.total + item.Total;
  429. var newObj = {
  430. pric: parseFloat(item.Total),
  431. project: {
  432. count: 1,
  433. project: {
  434. project_name: item.Name,
  435. unit: "",
  436. },
  437. },
  438. };
  439. obj2.details.push(newObj);
  440. num++;
  441. });
  442. }
  443. this.balanceAccounts.new_detail_list = [];
  444. this.balanceAccounts.new_detail_list.push(obj);
  445. this.balanceAccounts.new_detail_list.push(obj2);
  446. this.balanceAccounts.new_detail_list.push(obj3);
  447. // this.balanceAccounts.new_detail_list.push(obj4)
  448. console.log(111, this.balanceAccounts);
  449. this.num = num;
  450. console.log("this.num", this.num);
  451. }
  452. });
  453. } else if (this.org_id == 10028) {
  454. getPrivateExpenses(params).then((response) => {
  455. if (response.data.state == 0) {
  456. // this.$message.error(response.data.msg)
  457. return false;
  458. } else {
  459. this.balanceAccounts = response.data.data;
  460. let obj = {
  461. type: 1,
  462. details: [],
  463. total: 0,
  464. };
  465. let obj2 = {
  466. type: 2,
  467. details: [],
  468. total: 0,
  469. };
  470. let obj3 = {
  471. type: 3,
  472. details: [],
  473. total: 0,
  474. };
  475. this.balanceAccounts.order_info.map((item) => {
  476. if (item.advice_id > 0) {
  477. obj.details.push(item);
  478. obj.total += item.pric * item.advice.prescribing_number;
  479. } else {
  480. if (item.project.type == 2) {
  481. obj2.details.push(item);
  482. obj2.total += item.pric * item.project.count;
  483. } else {
  484. obj3.details.push(item);
  485. obj3.total += item.pric * item.project.count;
  486. }
  487. }
  488. });
  489. this.balanceAccounts.new_detail_list = [];
  490. this.balanceAccounts.new_detail_list.push(obj);
  491. this.balanceAccounts.new_detail_list.push(obj2);
  492. this.balanceAccounts.new_detail_list.push(obj3);
  493. console.log(111, this.balanceAccounts);
  494. }
  495. });
  496. } else if (this.org_id == 10215 || this.org_id == 0) {
  497. getPrivateExpensesOrder(params).then((response) => {
  498. if (response.data.state == 0) {
  499. // this.$message.error(response.data.msg)
  500. return false;
  501. } else {
  502. var that = this;
  503. that.info = response.data.data.info;
  504. that.p_admin = response.data.data.printor_admin;
  505. that.charge_admin = response.data.data.charge_admin;
  506. that.info["p_admin"] = that.p_admin;
  507. that.info["charge_admin"] = that.charge_admin;
  508. that.info["order_number"] = response.data.data.order_number;
  509. that.info["patient"] = response.data.data.patient;
  510. that.info["date"] = response.data.data.date;
  511. that.info["number"] = response.data.data.number;
  512. that.info["order_infos"] = response.data.data.order_infos;
  513. that.info["diagnosis"] = response.data.data.diagnosis;
  514. that.info["fixmedins_name"] = response.data.data.org_name;
  515. that.info["fixmedins_code"] = response.data.data.org_code;
  516. // that.info["doctor_code"] = response.data.data.doctor_code;
  517. // that.info["department"] = response.data.data.department;
  518. // that.info["health_card_no"] = response.data.data.health_card_no;
  519. that.info["bed_cost_total"] = response.data.data.bedCostTotal;
  520. that.info["bed_cost_self_total"] =
  521. response.data.data.bedCostSelfTotal;
  522. that.info["bed_cost_part_self_total"] =
  523. response.data.data.bedCostPartSelfTotal;
  524. that.info["operation_cost_total"] =
  525. response.data.data.operationCostTotal;
  526. that.info["operation_cost_self_total"] =
  527. response.data.data.operationCostSelfTotal;
  528. that.info["operation_cost_part_self_total"] =
  529. response.data.data.operationCostPartSelfTotal;
  530. that.info["other_cost_total"] = response.data.data.otherCostTotal;
  531. that.info["other_cost_self_total"] =
  532. response.data.data.otherCostSelfTotal;
  533. that.info["other_cost_part_self_total"] =
  534. response.data.data.otherCostPartSelfTotal;
  535. that.info["material_cost_total"] =
  536. response.data.data.materialCostTotal;
  537. that.info["material_cost_self_total"] =
  538. response.data.data.materialCostSelfTotal;
  539. that.info["material_cost_part_self_total"] =
  540. response.data.data.materialCostPartSelfTotal;
  541. that.info["western_medicine_cost_total"] =
  542. response.data.data.westernMedicineCostTotal;
  543. that.info["western_medicine_cost_self_total"] =
  544. response.data.data.westernMedicineCostSelfTotal;
  545. that.info["western_medicine_cost_part_self_total"] =
  546. response.data.data.westernMedicineCostPartSelfTotal;
  547. that.info["chinese_traditional_medicine_cost_total"] =
  548. response.data.data.chineseTraditionalMedicineCostTotal;
  549. that.info["chinese_traditional_medicine_cost_self_total"] =
  550. response.data.data.chineseTraditionalMedicineCostSelfTotal;
  551. that.info["chinese_traditional_medicine_cost_part_self_total"] =
  552. response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
  553. that.info["check_cost_total"] = response.data.data.checkCostTotal;
  554. that.info["check_cost_self_total"] =
  555. response.data.data.checkCostSelfTotal;
  556. that.info["check_cost_part_self_total"] =
  557. response.data.data.checkCostPartSelfTotal;
  558. that.info["laboratory_cost_total"] =
  559. response.data.data.laboratoryCostTotal;
  560. that.info["laboratory_cost_self_total"] =
  561. response.data.data.laboratoryCostSelfTotal;
  562. that.info["laboratory_cost_part_self_total"] =
  563. response.data.data.laboratoryCostPartSelfTotal;
  564. that.info["treat_cost_total"] = response.data.data.treatCostTotal;
  565. that.info["treat_cost_self_total"] =
  566. response.data.data.treatCostSelfTotal;
  567. that.info["treat_cost_part_self_total"] =
  568. response.data.data.treatCostPartSelfTotal;
  569. that.info["date"] = response.data.data.date;
  570. // that.info["number"] = response.data.data.number;
  571. that.info["order_infos"] = response.data.data.order_infos;
  572. that.info["diagnosis"] = response.data.data.diagnosis;
  573. let obj = {
  574. type: 1,
  575. details: [],
  576. total: 0,
  577. };
  578. let obj2 = {
  579. type: 2,
  580. details: [],
  581. total: 0,
  582. };
  583. let obj3 = {
  584. type: 3,
  585. details: [],
  586. total: 0,
  587. };
  588. let obj4 = {
  589. type: 4,
  590. details: [],
  591. total: 0,
  592. };
  593. let num = 0;
  594. that.info.order_infos.map((item) => {
  595. if (item.advice_id > 0) {
  596. obj.details.push(item);
  597. obj.total += item.pric * item.advice.prescribing_number;
  598. num++;
  599. } else {
  600. if (item.project.type == 2) {
  601. obj2.details.push(item);
  602. obj2.total += item.pric * item.project.count;
  603. num++;
  604. } else {
  605. obj3.details.push(item);
  606. obj3.total += item.pric * item.project.count;
  607. num++;
  608. }
  609. }
  610. });
  611. // this.info.order_infos.map(item => {
  612. // obj4.total = item.Total
  613. // obj4.details.push(item)
  614. // num++
  615. //
  616. // })
  617. that.info.new_detail_list = [];
  618. that.info.new_detail_list.push(obj);
  619. that.info.new_detail_list.push(obj2);
  620. that.info.new_detail_list.push(obj3);
  621. // that.info.new_detail_list.push(obj4)
  622. that.num = num;
  623. if (that.paramsObj.settle_type != 1) {
  624. that.info.begndate = that.getTimes(that.paramsObj.start_time);
  625. that.info.enddate = that.getTimes(that.paramsObj.end_time);
  626. }
  627. }
  628. });
  629. }
  630. } else {
  631. var that = this;
  632. axios
  633. .get("http://127.0.0.1:9532/api/settle/query", {
  634. params: {
  635. order_id: order_id,
  636. admin_user_id: this.$store.getters.xt_user.user.id,
  637. },
  638. })
  639. .then(function (response) {
  640. if (response.data.state == 0) {
  641. this.$message.error(response.data.msg);
  642. return false;
  643. } else {
  644. console.log(response.data.data.info);
  645. that.info = response.data.data.info;
  646. that.p_admin = response.data.data.printor_admin;
  647. that.charge_admin = response.data.data.charge_admin;
  648. that.info["p_admin"] = that.p_admin;
  649. that.info["charge_admin"] = that.charge_admin;
  650. that.info["order_number"] = response.data.data.order_number;
  651. that.info["patient"] = response.data.data.patient;
  652. that.info["date"] = response.data.data.date;
  653. that.info["number"] = response.data.data.number;
  654. that.info["order_infos"] = response.data.data.order_infos;
  655. that.info["diagnosis"] = response.data.data.diagnosis;
  656. that.info["org_code"] = response.data.data.org_code;
  657. that.info["org_name"] = response.data.data.org_name;
  658. that.info["doctor_code"] = response.data.data.doctor_code;
  659. that.info["department"] = response.data.data.department;
  660. that.info["health_card_no"] = response.data.data.health_card_no;
  661. that.info["bed_cost_total"] = response.data.data.bedCostTotal;
  662. that.info["bed_cost_self_total"] =
  663. response.data.data.bedCostSelfTotal;
  664. that.info["bed_cost_part_self_total"] =
  665. response.data.data.bedCostPartSelfTotal;
  666. that.info["operation_cost_total"] =
  667. response.data.data.operationCostTotal;
  668. that.info["operation_cost_self_total"] =
  669. response.data.data.operationCostSelfTotal;
  670. that.info["operation_cost_part_self_total"] =
  671. response.data.data.operationCostPartSelfTotal;
  672. that.info["other_cost_total"] = response.data.data.otherCostTotal;
  673. that.info["other_cost_self_total"] =
  674. response.data.data.otherCostSelfTotal;
  675. that.info["other_cost_part_self_total"] =
  676. response.data.data.otherCostPartSelfTotal;
  677. that.info["material_cost_total"] =
  678. response.data.data.materialCostTotal;
  679. that.info["material_cost_self_total"] =
  680. response.data.data.materialCostSelfTotal;
  681. that.info["material_cost_part_self_total"] =
  682. response.data.data.materialCostPartSelfTotal;
  683. that.info["western_medicine_cost_total"] =
  684. response.data.data.westernMedicineCostTotal;
  685. that.info["western_medicine_cost_self_total"] =
  686. response.data.data.westernMedicineCostSelfTotal;
  687. that.info["western_medicine_cost_part_self_total"] =
  688. response.data.data.westernMedicineCostPartSelfTotal;
  689. that.info["chinese_traditional_medicine_cost_total"] =
  690. response.data.data.chineseTraditionalMedicineCostTotal;
  691. that.info["chinese_traditional_medicine_cost_self_total"] =
  692. response.data.data.chineseTraditionalMedicineCostSelfTotal;
  693. that.info["chinese_traditional_medicine_cost_part_self_total"] =
  694. response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
  695. that.info["check_cost_total"] = response.data.data.checkCostTotal;
  696. that.info["check_cost_self_total"] =
  697. response.data.data.checkCostSelfTotal;
  698. that.info["check_cost_part_self_total"] =
  699. response.data.data.checkCostPartSelfTotal;
  700. that.info["laboratory_cost_total"] =
  701. response.data.data.laboratoryCostTotal;
  702. that.info["laboratory_cost_self_total"] =
  703. response.data.data.laboratoryCostSelfTotal;
  704. that.info["laboratory_cost_part_self_total"] =
  705. response.data.data.laboratoryCostPartSelfTotal;
  706. that.info["treat_cost_total"] = response.data.data.treatCostTotal;
  707. that.info["treat_cost_self_total"] =
  708. response.data.data.treatCostSelfTotal;
  709. that.info["treat_cost_part_self_total"] =
  710. response.data.data.treatCostPartSelfTotal;
  711. that.info["date"] = response.data.data.date;
  712. that.info["number"] = response.data.data.number;
  713. that.info["order_infos"] = response.data.data.order_infos;
  714. that.info["diagnosis"] = response.data.data.diagnosis;
  715. let obj = {
  716. type: 1,
  717. details: [],
  718. total: 0,
  719. };
  720. let obj2 = {
  721. type: 2,
  722. details: [],
  723. total: 0,
  724. };
  725. let obj3 = {
  726. type: 3,
  727. details: [],
  728. total: 0,
  729. };
  730. let obj4 = {
  731. type: 4,
  732. details: [],
  733. total: 0,
  734. };
  735. let num = 0;
  736. that.info.order_infos.map((item) => {
  737. if (item.advice_id > 0) {
  738. obj.details.push(item);
  739. obj.total += item.pric * item.advice.prescribing_number;
  740. num++;
  741. } else {
  742. if (item.project.type == 2) {
  743. obj2.details.push(item);
  744. obj2.total += item.pric * item.project.count;
  745. num++;
  746. } else {
  747. obj3.details.push(item);
  748. obj3.total += item.pric * item.project.count;
  749. num++;
  750. }
  751. }
  752. });
  753. // this.info.order_infos.map(item => {
  754. // obj4.total = item.Total
  755. // obj4.details.push(item)
  756. // num++
  757. //
  758. // })
  759. that.info.new_detail_list = [];
  760. that.info.new_detail_list.push(obj);
  761. that.info.new_detail_list.push(obj2);
  762. that.info.new_detail_list.push(obj3);
  763. // that.info.new_detail_list.push(obj4)
  764. that.num = num;
  765. if (that.paramsObj.settle_type != 1) {
  766. that.info.begndate = that.getTimes(that.paramsObj.start_time);
  767. that.info.enddate = that.getTimes(that.paramsObj.end_time);
  768. }
  769. }
  770. })
  771. .catch(function (error) {});
  772. }
  773. },
  774. },
  775. created() {
  776. console.log(this.paramsObj);
  777. this.getInfo(this.paramsObj.order_id, this.paramsObj);
  778. this.org_id = this.$store.getters.xt_user.org_id;
  779. console.log("this.org_id", this.org_id);
  780. },
  781. watch: {
  782. paramsObj: {
  783. //深度监听,可监听到对象、数组的变化
  784. handler(val, oldVal) {
  785. this.paramsObj = val;
  786. console.log(this.paramsObj);
  787. this.getInfo(this.paramsObj.order_id, this.paramsObj);
  788. },
  789. deep: true,
  790. immediate: true,
  791. },
  792. },
  793. };
  794. </script>
  795. <style>
  796. .dialysis-print-order {
  797. width: 960px;
  798. margin: 0 auto;
  799. }
  800. .dialysis-print-order .order-yy-name {
  801. margin: auto;
  802. text-align: center;
  803. font-size: 20px;
  804. letter-spacing: 5px;
  805. }
  806. .dialysis-print-order .order-title {
  807. margin: auto;
  808. font-weight: 600;
  809. text-align: center;
  810. font-size: 22px;
  811. padding: 10px;
  812. }
  813. .dialysis-print-order .table-box {
  814. width: 100%;
  815. line-height: 23px;
  816. font-size: 14px;
  817. }
  818. .dialysis-print-order .print-table {
  819. width: 100%;
  820. text-align: center;
  821. border-collapse: collapse;
  822. line-height: 40px;
  823. font-size: 14px;
  824. border-color: #000;
  825. }
  826. .dialysis-print-order .print-table-no {
  827. width: 100%;
  828. text-align: center;
  829. border-collapse: collapse;
  830. font-size: 14px;
  831. }
  832. .dialysis-print-order .under-line {
  833. border-bottom: 1px solid #999;
  834. width: 95%;
  835. text-align: center;
  836. margin-left: 2px;
  837. }
  838. .dialysis-print-order .title-box {
  839. text-align: center;
  840. font-size: 16px;
  841. }
  842. .dialysis-print-order .radio-lebel-box {
  843. font-weight: 400;
  844. cursor: pointer;
  845. }
  846. .dialysis-print-order .radio-no {
  847. opacity: 0;
  848. outline: none;
  849. position: absolute;
  850. margin: 0;
  851. width: 0;
  852. height: 0;
  853. z-index: -1;
  854. }
  855. .dialysis-print-order .radio-inner {
  856. white-space: nowrap;
  857. cursor: pointer;
  858. outline: none;
  859. display: inline-block;
  860. line-height: 1;
  861. position: relative;
  862. vertical-align: middle;
  863. }
  864. .dialysis-print-order .radio-fang {
  865. display: inline-block;
  866. position: relative;
  867. border: 1px solid #000;
  868. box-sizing: border-box;
  869. width: 14px;
  870. height: 14px;
  871. background-color: #fff;
  872. z-index: 1;
  873. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  874. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  875. }
  876. .dialysis-print-order .is-checked-radio::after {
  877. content: "√";
  878. font-size: 15px;
  879. }
  880. .dialysis-print-order .print-table-no tr td {
  881. padding: 8px 5px;
  882. line-height: 25px;
  883. }
  884. .dialysis-print-order .print-table tr td {
  885. padding: 1px 1px;
  886. /*line-height: 25px;*/
  887. }
  888. .es-img {
  889. height: 30px;
  890. }
  891. .advice-name {
  892. text-align: left;
  893. }
  894. .advice-children {
  895. display: flex;
  896. }
  897. .title-box-pro {
  898. border: 0 #fff;
  899. line-height: 25px;
  900. height: 25px;
  901. text-align: left;
  902. padding-left: 10px !important;
  903. }
  904. .title-box-pro-tr {
  905. border: 0 #fff;
  906. }
  907. .text-align-left {
  908. text-align: left !important;
  909. padding-left: 10px !important;
  910. font-size: 14px !important;
  911. line-height: 25px;
  912. }
  913. .print-table-tr-new td {
  914. line-height: 20px !important;
  915. }
  916. .border-top-solid {
  917. border: solid 1px #000;
  918. }
  919. .print-template-two tr {
  920. line-height: 30px;
  921. }
  922. .table-box1 {
  923. border: 1px solid #000;
  924. width: 100%;
  925. line-height: 30px;
  926. font-size: 14px;
  927. border-collapse: collapse;
  928. }
  929. .table-box1 tr {
  930. border-bottom: 1px solid #000;
  931. }
  932. </style>
  933. <style lang="scss">
  934. .newContainer {
  935. .dialysisPage::-webkit-scrollbar {
  936. height: 15px;
  937. }
  938. .el-date-editor {
  939. .el-input__inner {
  940. padding-right: 0px;
  941. }
  942. }
  943. .el-table td,
  944. .el-table th {
  945. text-align: center;
  946. }
  947. }
  948. .newContainer::-webkit-scrollbar {
  949. height: 15px !important;
  950. }
  951. </style>