statementPrint.vue 60KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475
  1. <template>
  2. <!-- 打印 -->
  3. <div>
  4. <template>
  5. <el-button
  6. style="position: fixed; right: 25px; z-index: 999"
  7. :loading="loading"
  8. size="small"
  9. icon="el-icon-printer"
  10. @click="printThisPage"
  11. type="primary"
  12. >打印
  13. </el-button
  14. >
  15. </template>
  16. <div class="dialysisPage" style="padding-top: 40px">
  17. <div
  18. v-if="
  19. org_id == 9990 ||
  20. org_id == 10138 ||
  21. org_id == 9504 ||
  22. org_id == 10028 ||
  23. org_id == 4 ||
  24. org_id == 10278
  25. "
  26. >
  27. <printTwo :info="info" v-if="org_id == 9990"></printTwo>
  28. <printThree
  29. :info="info"
  30. :paramsObj="paramsObj"
  31. :balanceAccounts="balanceAccounts"
  32. v-if="org_id == 10138 || org_id == 4 || org_id == 10278"
  33. ></printThree>
  34. <printFour
  35. v-if="org_id == 9504 || org_id == 10028 || org_id == 10088"
  36. :info="info"
  37. :paramsObj="paramsObj"
  38. :balanceAccounts="balanceAccounts"
  39. ></printFour>
  40. <!-- <privateChargePrint :info="info" v-if="org_id == 10215 && this.paramsObj.balance_accounts_type == 2"></privateChargePrint>-->
  41. </div>
  42. <!-- <print-other :info="info" v-if="org_id == 9919"></print-other>-->
  43. <!-- <printOne :info=" info" v-if="org_id == 10215 && this.paramsObj.balance_accounts_type == 2"></printOne>-->
  44. <!-- <printFive-->
  45. <!-- v-if="org_id == 10191"-->
  46. <!-- :info="info"-->
  47. <!-- :paramsObj="paramsObj"-->
  48. <!-- :balanceAccounts="balanceAccounts"-->
  49. <!-- ></printFive>-->
  50. <printSeven
  51. v-if="org_id == 10387"
  52. :info="info"
  53. :paramsObj="paramsObj"
  54. :balanceAccounts="balanceAccounts"
  55. >
  56. </printSeven>
  57. <print10191 :info="info" v-if="org_id == 10191"></print10191>
  58. <printTen :info="info" v-if="org_id == 10210"></printTen>
  59. <printOne :info="info" v-if=" org_id != 9990 &&
  60. org_id != 10138 &&
  61. org_id != 9504 &&
  62. org_id != 10028 &&
  63. org_id != 4 &&
  64. org_id != 10278 && org_id != 10387 && org_id != 0 && org_id != 10191 &&org_id != 10210"></printOne>
  65. </div>
  66. </div>
  67. </template>
  68. <script>
  69. import {uParseTime} from "@/utils/tools";
  70. import axios from "axios";
  71. import print from "print-js";
  72. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  73. import printOne from "./statementTemplate/printOne";
  74. import privateChargePrint from "./statementTemplate/privateChargePrint";
  75. import printTwo from "./statementTemplate/printTwo";
  76. import printThree from "./statementTemplate/printThree";
  77. import printFour from "./statementTemplate/printFour";
  78. import printFive from "./statementTemplate/printFive";
  79. import testVue from "./statementTemplate/test";
  80. import {getAllDoctorList, getAllHisPatientList,} from "@/api/project/project";
  81. import {getPrivateExpenses, getPrivateExpensesOrder,getPrivateExpensesTwo} from "@/api/his/his";
  82. import printSeven from "./statementTemplate/printSeven";
  83. import Print10191 from "./statementTemplate/print10191";
  84. import printTen from "./statementTemplate/printTen";
  85. // import PrintOther from '../hospitalStation/statementTemplate/printOther'
  86. export default {
  87. name: "dialysisPrintOrder",
  88. components: {
  89. Print10191,
  90. printSeven,
  91. BreadCrumb,
  92. printOne,
  93. privateChargePrint,
  94. printTwo,
  95. printThree,
  96. printFour,
  97. testVue,
  98. printFive,
  99. printTen
  100. },
  101. props: {
  102. paramsObj: Object,
  103. },
  104. data() {
  105. return {
  106. crumbs: [
  107. {path: false, name: "门诊医生站"},
  108. {path: false, name: "打印"},
  109. ],
  110. record_date: "",
  111. patientTableData: [],
  112. advicePrint: [],
  113. hisPatient: {},
  114. patient: {},
  115. search_input: "",
  116. loading: false,
  117. patient_id: 0,
  118. prescription_id: 0,
  119. ids: "",
  120. info: null,
  121. order:null,
  122. org_id: "",
  123. balanceAccounts: {},
  124. };
  125. },
  126. methods: {
  127. printThisPage() {
  128. var ptime = Math.round(new Date().getTime() / 1000);
  129. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  130. if (
  131. this.$store.getters.xt_user.org_id == 10138 ||
  132. this.$store.getters.xt_user.org_id == 4 ||
  133. this.$store.getters.xt_user.org_id == 10278
  134. ) {
  135. setTimeout(() => {
  136. const style =
  137. "@media print {#statement-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%;}}}";
  138. const style2 =
  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: 50%;}}}";
  140. const style3 =
  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: 55%;}}}";
  142. const style4 =
  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: 58%;}}}";
  144. const style5 =
  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: 61%;}}}";
  146. const style6 =
  147. "@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%;}}}";
  148. const style7 =
  149. "@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%;}}}";
  150. const style8 =
  151. "@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%;}}}";
  152. const style9 =
  153. "@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%;}}}";
  154. const style10 =
  155. "@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%;}}}";
  156. const style11 =
  157. "@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%;}}}";
  158. const style12 =
  159. "@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%;}}}";
  160. if (this.num >= 13) {
  161. printJS({
  162. printable: "prescription-print",
  163. type: "html",
  164. style: style,
  165. scanStyles: false,
  166. });
  167. } else if (this.num == 12) {
  168. printJS({
  169. printable: "prescription-print",
  170. type: "html",
  171. style: style2,
  172. scanStyles: false,
  173. });
  174. } else if (this.num == 11) {
  175. printJS({
  176. printable: "prescription-print",
  177. type: "html",
  178. style: style3,
  179. scanStyles: false,
  180. });
  181. } else if (this.num == 10) {
  182. printJS({
  183. printable: "prescription-print",
  184. type: "html",
  185. style: style4,
  186. scanStyles: false,
  187. });
  188. } else if (this.num == 9) {
  189. printJS({
  190. printable: "prescription-print",
  191. type: "html",
  192. style: style5,
  193. scanStyles: false,
  194. });
  195. } else if (this.num == 8) {
  196. printJS({
  197. printable: "prescription-print",
  198. type: "html",
  199. style: style6,
  200. scanStyles: false,
  201. });
  202. } else if (this.num == 7) {
  203. printJS({
  204. printable: "prescription-print",
  205. type: "html",
  206. style: style7,
  207. scanStyles: false,
  208. });
  209. } else if (this.num == 6) {
  210. printJS({
  211. printable: "prescription-print",
  212. type: "html",
  213. style: style8,
  214. scanStyles: false,
  215. });
  216. } else if (this.num == 5) {
  217. printJS({
  218. printable: "prescription-print",
  219. type: "html",
  220. style: style9,
  221. scanStyles: false,
  222. });
  223. } else if (this.num == 4) {
  224. printJS({
  225. printable: "prescription-print",
  226. type: "html",
  227. style: style10,
  228. scanStyles: false,
  229. });
  230. } else if (this.num == 3) {
  231. printJS({
  232. printable: "prescription-print",
  233. type: "html",
  234. style: style11,
  235. scanStyles: false,
  236. });
  237. } else if (this.num <= 2) {
  238. printJS({
  239. printable: "prescription-print",
  240. type: "html",
  241. style: style12,
  242. scanStyles: false,
  243. });
  244. }
  245. }, 500);
  246. } else if (
  247. this.$store.getters.xt_user.org_id == 9504 ||
  248. this.$store.getters.xt_user.org_id == 10028
  249. ) {
  250. const style =
  251. "@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;}}";
  252. printJS({
  253. printable: "prescription-print",
  254. type: "html",
  255. style: style,
  256. scanStyles: false,
  257. });
  258. } else {
  259. // 医保环境打印格式
  260. if (
  261. this.$store.getters.xt_user.org_id == 9919 ||
  262. this.$store.getters.xt_user.org_id == 10106
  263. ) {
  264. const style =
  265. "@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;}}";
  266. printJS({
  267. printable: "statement-print",
  268. type: "html",
  269. style: style,
  270. scanStyles: false,
  271. });
  272. } else if (
  273. this.$store.getters.xt_user.org_id == 0 ||
  274. this.$store.getters.xt_user.org_id == 10191
  275. ) {
  276. const style =
  277. "@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%;}}}";
  278. printJS({
  279. printable: "statement-print",
  280. type: "html",
  281. style: style,
  282. scanStyles: false,
  283. });
  284. // const style =
  285. // "@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;}}";
  286. // printJS({
  287. // printable: "statement-print",
  288. // type: "html",
  289. // style: style,
  290. // scanStyles: false,
  291. // });
  292. } else {
  293. const style =
  294. "@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%;}}}";
  295. printJS({
  296. printable: "statement-print",
  297. type: "html",
  298. style: style,
  299. scanStyles: false,
  300. });
  301. }
  302. }
  303. // if (this.org_template_info.template_id == 1) {
  304. // printJS({
  305. // printable: "dialysis-print-box",
  306. // type: "html",
  307. // style: style,
  308. // scanStyles: false
  309. // });
  310. // }
  311. },
  312. getAllDoctorList() {
  313. getAllDoctorList().then((response) => {
  314. if (response.data.state == 1) {
  315. var doctor = response.data.data.doctor;
  316. this.doctorList = doctor;
  317. }
  318. });
  319. },
  320. getAllHisPatientList() {
  321. const params = {
  322. record_date: this.record_date,
  323. };
  324. getAllHisPatientList(params).then((response) => {
  325. if (response.data.state == 1) {
  326. this.patientTableData = response.data.data.list;
  327. this.patientTableDataTwo = response.data.data.list;
  328. console.log("222", this.patientTableData);
  329. let cal_one = 0;
  330. let cal_two = 0;
  331. for (let i = 0; i < response.data.data.list.length; i++) {
  332. if (
  333. response.data.data.list[i].prescription == null ||
  334. response.data.data.list[i].prescription.length == 0
  335. ) {
  336. cal_one = cal_one + 1;
  337. }
  338. if (
  339. response.data.data.list[i].prescription != null &&
  340. response.data.data.list[i].prescription.length > 0
  341. ) {
  342. cal_two = cal_two + 1;
  343. }
  344. }
  345. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  346. // console.log(this.patientTableData[0])
  347. // this.choosePatient(this.patientTableData[0])
  348. this.cal_one = cal_one;
  349. this.cal_two = cal_two;
  350. }
  351. });
  352. },
  353. changePatient(row) {
  354. console.log("row", row);
  355. this.patient_id = row.patient_id;
  356. this.record_date = this.record_date;
  357. this.prescription_id = this.prescription_id;
  358. // var params = {
  359. // patient_id:row.patient_id,
  360. // record_date:this.record_date,
  361. // prescription_id:this.prescription_id,
  362. // }
  363. // getPrescriptionPrint(params).then(response=>{
  364. // if(response.data.state == 1){
  365. // var advicePrint = response.data.data.advicePrint
  366. // console.log("adviceprint",advicePrint)
  367. // this.advicePrint = advicePrint
  368. // // var hisPatient = response.data.data.hisPatient
  369. // // console.log("hispatient",hisPatient)
  370. // // this.hisPatient = hisPatient
  371. // var patient = response.data.data.patient
  372. // console.log("patient",patient)
  373. // this.patient = patient
  374. // var doctorPorject = response.data.data.doctorPorject
  375. // console.log("doctorporject",doctorPorject)
  376. // }
  377. // })
  378. },
  379. getTimes(time) {
  380. return uParseTime(time, "{y}-{m}-{d}");
  381. },
  382. searchAction() {
  383. },
  384. getInfo(order_id, obj) {
  385. if (obj.balance_accounts_type == 2 ) {
  386. let params = {
  387. his_patient_id: obj.his_patient_id,
  388. id: obj.order_id,
  389. order_id: obj.order_id,
  390. admin_user_id: this.$store.getters.xt_user.user.id,
  391. };
  392. if (
  393. this.org_id == 10138 ||
  394. this.$store.getters.xt_user.org_id == 4 ||
  395. this.org_id == 10278
  396. ) {
  397. getPrivateExpenses(params).then((response) => {
  398. if (response.data.state == 0) {
  399. // this.$message.error(response.data.msg)
  400. return false;
  401. } else {
  402. this.balanceAccounts = response.data.data;
  403. let arr = [];
  404. let obj = {
  405. type: 1,
  406. details: [],
  407. total: 0,
  408. };
  409. let obj2 = {
  410. type: 2,
  411. details: [],
  412. total: 0,
  413. };
  414. let obj3 = {
  415. type: 3,
  416. details: [],
  417. total: 0,
  418. };
  419. let num = 0;
  420. let obj4 = {
  421. type: 4,
  422. details: [],
  423. total: 0,
  424. };
  425. this.balanceAccounts.order_info.map((item) => {
  426. if (item.advice_id > 0) {
  427. obj.details.push(item);
  428. obj.total += item.pric.toFixed(2) * item.advice.prescribing_number
  429. num++;
  430. } else {
  431. if (item.project.type == 2) {
  432. obj2.details.push(item);
  433. obj2.total += item.pric * item.project.count;
  434. num++;
  435. } else {
  436. obj3.details.push(item);
  437. obj3.total += item.pric * item.project.count;
  438. num++;
  439. }
  440. }
  441. });
  442. if (this.balanceAccounts.new_order_info != null) {
  443. this.balanceAccounts.new_order_info.map((item) => {
  444. obj2.total = obj2.total + item.Total;
  445. var newObj = {
  446. pric: parseFloat(item.Total),
  447. project: {
  448. count: 1,
  449. project: {
  450. project_name: item.Name,
  451. unit: "",
  452. },
  453. },
  454. };
  455. obj2.details.push(newObj);
  456. num++;
  457. });
  458. }
  459. this.balanceAccounts.new_detail_list = [];
  460. this.balanceAccounts.new_detail_list.push(obj);
  461. this.balanceAccounts.new_detail_list.push(obj2);
  462. this.balanceAccounts.new_detail_list.push(obj3);
  463. // this.balanceAccounts.new_detail_list.push(obj4)
  464. console.log(111, this.balanceAccounts);
  465. this.num = num;
  466. console.log("this.num", this.num);
  467. }
  468. });
  469. } else if (this.org_id == 10028) {
  470. getPrivateExpenses(params).then((response) => {
  471. if (response.data.state == 0) {
  472. // this.$message.error(response.data.msg)
  473. return false;
  474. } else {
  475. this.balanceAccounts = response.data.data;
  476. let obj = {
  477. type: 1,
  478. details: [],
  479. total: 0,
  480. };
  481. let obj2 = {
  482. type: 2,
  483. details: [],
  484. total: 0,
  485. };
  486. let obj3 = {
  487. type: 3,
  488. details: [],
  489. total: 0,
  490. };
  491. this.balanceAccounts.order_info.map((item) => {
  492. if (item.advice_id > 0) {
  493. obj.details.push(item);
  494. obj.total += item.pric * item.advice.prescribing_number;
  495. } else {
  496. if (item.project.type == 2) {
  497. obj2.details.push(item);
  498. obj2.total += item.pric * item.project.count;
  499. } else {
  500. obj3.details.push(item);
  501. obj3.total += item.pric * item.project.count;
  502. }
  503. }
  504. });
  505. this.balanceAccounts.new_detail_list = [];
  506. this.balanceAccounts.new_detail_list.push(obj);
  507. this.balanceAccounts.new_detail_list.push(obj2);
  508. this.balanceAccounts.new_detail_list.push(obj3);
  509. console.log(111, this.balanceAccounts);
  510. }
  511. });
  512. } else if (this.org_id == 10215 ) {
  513. getPrivateExpensesOrder(params).then((response) => {
  514. if (response.data.state == 0) {
  515. // this.$message.error(response.data.msg)
  516. return false;
  517. } else {
  518. var that = this;
  519. that.info = response.data.data.info;
  520. that.p_admin = response.data.data.printor_admin;
  521. that.charge_admin = response.data.data.charge_admin;
  522. that.info["p_admin"] = that.p_admin;
  523. that.info["charge_admin"] = that.charge_admin;
  524. that.info["order_number"] = response.data.data.order_number;
  525. that.info["patient"] = response.data.data.patient;
  526. that.info["date"] = response.data.data.date;
  527. that.info["number"] = response.data.data.number;
  528. that.info["order_infos"] = response.data.data.order_infos;
  529. that.info["diagnosis"] = response.data.data.diagnosis;
  530. that.info["fixmedins_name"] = response.data.data.org_name;
  531. that.info["fixmedins_code"] = response.data.data.org_code;
  532. // that.info["doctor_code"] = response.data.data.doctor_code;
  533. // that.info["department"] = response.data.data.department;
  534. // that.info["health_card_no"] = response.data.data.health_card_no;
  535. that.info["bed_cost_total"] = response.data.data.bedCostTotal;
  536. that.info["bed_cost_self_total"] =
  537. response.data.data.bedCostSelfTotal;
  538. that.info["bed_cost_part_self_total"] =
  539. response.data.data.bedCostPartSelfTotal;
  540. that.info["operation_cost_total"] =
  541. response.data.data.operationCostTotal;
  542. that.info["operation_cost_self_total"] =
  543. response.data.data.operationCostSelfTotal;
  544. that.info["operation_cost_part_self_total"] =
  545. response.data.data.operationCostPartSelfTotal;
  546. that.info["other_cost_total"] = response.data.data.otherCostTotal;
  547. that.info["other_cost_self_total"] =
  548. response.data.data.otherCostSelfTotal;
  549. that.info["other_cost_part_self_total"] =
  550. response.data.data.otherCostPartSelfTotal;
  551. that.info["material_cost_total"] =
  552. response.data.data.materialCostTotal;
  553. that.info["material_cost_self_total"] =
  554. response.data.data.materialCostSelfTotal;
  555. that.info["material_cost_part_self_total"] =
  556. response.data.data.materialCostPartSelfTotal;
  557. that.info["western_medicine_cost_total"] =
  558. response.data.data.westernMedicineCostTotal;
  559. that.info["western_medicine_cost_self_total"] =
  560. response.data.data.westernMedicineCostSelfTotal;
  561. that.info["western_medicine_cost_part_self_total"] =
  562. response.data.data.westernMedicineCostPartSelfTotal;
  563. that.info["chinese_traditional_medicine_cost_total"] =
  564. response.data.data.chineseTraditionalMedicineCostTotal;
  565. that.info["chinese_traditional_medicine_cost_self_total"] =
  566. response.data.data.chineseTraditionalMedicineCostSelfTotal;
  567. that.info["chinese_traditional_medicine_cost_part_self_total"] =
  568. response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
  569. that.info["check_cost_total"] = response.data.data.checkCostTotal;
  570. that.info["check_cost_self_total"] =
  571. response.data.data.checkCostSelfTotal;
  572. that.info["check_cost_part_self_total"] =
  573. response.data.data.checkCostPartSelfTotal;
  574. that.info["laboratory_cost_total"] =
  575. response.data.data.laboratoryCostTotal;
  576. that.info["laboratory_cost_self_total"] =
  577. response.data.data.laboratoryCostSelfTotal;
  578. that.info["laboratory_cost_part_self_total"] =
  579. response.data.data.laboratoryCostPartSelfTotal;
  580. that.info["treat_cost_total"] = response.data.data.treatCostTotal;
  581. that.info["treat_cost_self_total"] =
  582. response.data.data.treatCostSelfTotal;
  583. that.info["treat_cost_part_self_total"] =
  584. response.data.data.treatCostPartSelfTotal;
  585. that.info["date"] = response.data.data.date;
  586. // that.info["number"] = response.data.data.number;
  587. that.info["order_infos"] = response.data.data.order_infos;
  588. that.info["diagnosis"] = response.data.data.diagnosis;
  589. let obj = {
  590. type: 1,
  591. details: [],
  592. total: 0,
  593. };
  594. let obj2 = {
  595. type: 2,
  596. details: [],
  597. total: 0,
  598. };
  599. let obj3 = {
  600. type: 3,
  601. details: [],
  602. total: 0,
  603. };
  604. let obj4 = {
  605. type: 4,
  606. details: [],
  607. total: 0,
  608. };
  609. let num = 0;
  610. that.info.order_infos.map((item) => {
  611. if (item.advice_id > 0) {
  612. obj.details.push(item);
  613. obj.total += item.pric * item.advice.prescribing_number;
  614. num++;
  615. } else {
  616. if (item.project.type == 2) {
  617. obj2.details.push(item);
  618. obj2.total += item.pric * item.project.count;
  619. num++;
  620. } else {
  621. obj3.details.push(item);
  622. obj3.total += item.pric * item.project.count;
  623. num++;
  624. }
  625. }
  626. });
  627. // this.info.order_infos.map(item => {
  628. // obj4.total = item.Total
  629. // obj4.details.push(item)
  630. // num++
  631. //
  632. // })
  633. that.info.new_detail_list = [];
  634. that.info.new_detail_list.push(obj);
  635. that.info.new_detail_list.push(obj2);
  636. that.info.new_detail_list.push(obj3);
  637. // that.info.new_detail_list.push(obj4)
  638. that.num = num;
  639. if (that.paramsObj.settle_type != 1) {
  640. that.info.begndate = that.getTimes(that.paramsObj.start_time);
  641. that.info.enddate = that.getTimes(that.paramsObj.end_time);
  642. }
  643. that.info.order_infos.map((item) => {
  644. });
  645. }
  646. });
  647. }
  648. // else if (this.org_id == 0) {
  649. //
  650. // getPrivateExpensesOrder(params).then((response) => {
  651. // if (response.data.state == 0) {
  652. // // this.$message.error(response.data.msg)
  653. //
  654. // return false;
  655. // } else {
  656. // var that = this;
  657. // that.info = response.data.data.info;
  658. // that.p_admin = response.data.data.printor_admin;
  659. // that.charge_admin = response.data.data.charge_admin;
  660. //
  661. // that.info["p_admin"] = that.p_admin;
  662. // that.info["charge_admin"] = that.charge_admin;
  663. // that.info["order_number"] = response.data.data.order_number;
  664. // that.info["patient"] = response.data.data.patient;
  665. // that.info["date"] = response.data.data.date;
  666. // that.info["number"] = response.data.data.number;
  667. // that.info["order_infos"] = response.data.data.order_infos;
  668. // that.info["diagnosis"] = response.data.data.diagnosis;
  669. // that.info["fixmedins_name"] = response.data.data.org_name;
  670. // that.info["fixmedins_code"] = response.data.data.org_code;
  671. // // that.info["doctor_code"] = response.data.data.doctor_code;
  672. // // that.info["department"] = response.data.data.department;
  673. // // that.info["health_card_no"] = response.data.data.health_card_no;
  674. //
  675. // that.info["bed_cost_total"] = response.data.data.bedCostTotal;
  676. // that.info["bed_cost_self_total"] =
  677. // response.data.data.bedCostSelfTotal;
  678. // that.info["bed_cost_part_self_total"] =
  679. // response.data.data.bedCostPartSelfTotal;
  680. //
  681. // that.info["operation_cost_total"] =
  682. // response.data.data.operationCostTotal;
  683. // that.info["operation_cost_self_total"] =
  684. // response.data.data.operationCostSelfTotal;
  685. // that.info["operation_cost_part_self_total"] =
  686. // response.data.data.operationCostPartSelfTotal;
  687. //
  688. // that.info["other_cost_total"] = response.data.data.otherCostTotal;
  689. // that.info["other_cost_self_total"] =
  690. // response.data.data.otherCostSelfTotal;
  691. // that.info["other_cost_part_self_total"] =
  692. // response.data.data.otherCostPartSelfTotal;
  693. //
  694. // that.info["material_cost_total"] =
  695. // response.data.data.materialCostTotal;
  696. // that.info["material_cost_self_total"] =
  697. // response.data.data.materialCostSelfTotal;
  698. // that.info["material_cost_part_self_total"] =
  699. // response.data.data.materialCostPartSelfTotal;
  700. //
  701. // that.info["western_medicine_cost_total"] =
  702. // response.data.data.westernMedicineCostTotal;
  703. // that.info["western_medicine_cost_self_total"] =
  704. // response.data.data.westernMedicineCostSelfTotal;
  705. // that.info["western_medicine_cost_part_self_total"] =
  706. // response.data.data.westernMedicineCostPartSelfTotal;
  707. //
  708. // that.info["chinese_traditional_medicine_cost_total"] =
  709. // response.data.data.chineseTraditionalMedicineCostTotal;
  710. // that.info["chinese_traditional_medicine_cost_self_total"] =
  711. // response.data.data.chineseTraditionalMedicineCostSelfTotal;
  712. // that.info["chinese_traditional_medicine_cost_part_self_total"] =
  713. // response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
  714. //
  715. // that.info["check_cost_total"] = response.data.data.checkCostTotal;
  716. // that.info["check_cost_self_total"] =
  717. // response.data.data.checkCostSelfTotal;
  718. // that.info["check_cost_part_self_total"] =
  719. // response.data.data.checkCostPartSelfTotal;
  720. //
  721. // that.info["laboratory_cost_total"] =
  722. // response.data.data.laboratoryCostTotal;
  723. // that.info["laboratory_cost_self_total"] =
  724. // response.data.data.laboratoryCostSelfTotal;
  725. // that.info["laboratory_cost_part_self_total"] =
  726. // response.data.data.laboratoryCostPartSelfTotal;
  727. //
  728. // that.info["treat_cost_total"] = response.data.data.treatCostTotal;
  729. // that.info["treat_cost_self_total"] =
  730. // response.data.data.treatCostSelfTotal;
  731. // that.info["treat_cost_part_self_total"] =
  732. // response.data.data.treatCostPartSelfTotal;
  733. // that.info["date"] = response.data.data.date;
  734. // // that.info["number"] = response.data.data.number;
  735. // that.info["order_infos"] = response.data.data.order_infos;
  736. // that.info["diagnosis"] = response.data.data.diagnosis;
  737. //
  738. //
  739. // let list = []
  740. // for (let i = 0; i < response.data.data.order_infos.length; i++) {
  741. // let order = response.data.data.order_infos[i]
  742. // let obj = {
  743. // code:"",
  744. // name: "",
  745. // spec: "",
  746. // cnt: "",
  747. // det_item_fee_sumamt: "",
  748. // }
  749. //
  750. // if (order.advice_id > 0 && order.project_id == 0) {
  751. // obj.name = order.advice.advice_name
  752. // let spec = order.advice.drug.dose + order.advice.drug.dose_unit + '*' + order.advice.drug.min_number + order.advice.drug.min_unit + '/' + order.advice.drug.max_unit
  753. // obj.spec = spec
  754. // obj.cnt = order.cnt
  755. // obj.det_item_fee_sumamt =order.det_item_fee_sumamt
  756. // obj.code = order.advice.drug.medical_insurance_number
  757. // list.push(obj)
  758. // }else if (order.advice_id == 0 && order.project_id > 0) {
  759. // if(order.project.type == 2){
  760. // obj.name = order.project.project.project_name
  761. // obj.spec = ""
  762. // obj.cnt = order.cnt
  763. // obj.det_item_fee_sumamt =order.det_item_fee_sumamt
  764. // obj.code = order.project.project.medical_code
  765. // }else{
  766. // obj.name = order.project.good_info.good_name
  767. // obj.spec = order.project.good_info.specification_name
  768. // obj.cnt = order.cnt
  769. // obj.det_item_fee_sumamt =order.det_item_fee_sumamt
  770. // obj.code = order.project.good_info.medical_insurance_number
  771. // }
  772. // list.push(obj)
  773. // }
  774. //
  775. // }
  776. // console.log(list)
  777. // let len = list.length / 2
  778. // let L_list = []
  779. // let R_list = []
  780. // len = Math.trunc(len)
  781. // for(let i = 0; i < len; i++){
  782. // L_list.push(list[i])
  783. // }
  784. // console.log(len)
  785. // for(let i = len; i < list.length; i++){
  786. // console.log(list[i])
  787. // R_list.push(list[i])
  788. // }
  789. // console.log(L_list)
  790. // console.log(R_list)
  791. //
  792. // that.info["L_list"] = L_list
  793. // that.info["R_list"] = R_list
  794. //
  795. //
  796. //
  797. //
  798. //
  799. //
  800. // }
  801. // });
  802. // }
  803. } else {
  804. console.log(this.org_id)
  805. if (this.org_id == 0) {
  806. let params = {
  807. order_id: obj.order_id,
  808. admin_user_id: this.$store.getters.xt_user.user.id,
  809. };
  810. getPrivateExpensesTwo(params).then((response) => {
  811. if (response.data.state == 0) {
  812. // this.$message.error(response.data.msg)
  813. return false;
  814. } else {
  815. var that = this;
  816. that.info = response.data.data.info;
  817. that.p_admin = response.data.data.printor_admin;
  818. that.charge_admin = response.data.data.charge_admin;
  819. that.info["p_admin"] = that.p_admin;
  820. that.info["charge_admin"] = that.charge_admin;
  821. that.info["order_number"] = response.data.data.order_number;
  822. that.info["patient"] = response.data.data.patient;
  823. that.info["date"] = response.data.data.date;
  824. that.info["number"] = response.data.data.number;
  825. that.info["order_infos"] = response.data.data.order_infos;
  826. that.info["diagnosis"] = response.data.data.diagnosis;
  827. that.info["fixmedins_name"] = response.data.data.org_name;
  828. that.info["fixmedins_code"] = response.data.data.org_code;
  829. // that.info["doctor_code"] = response.data.data.doctor_code;
  830. // that.info["department"] = response.data.data.department;
  831. // that.info["health_card_no"] = response.data.data.health_card_no;
  832. that.info["bed_cost_total"] = response.data.data.bedCostTotal;
  833. that.info["bed_cost_self_total"] =
  834. response.data.data.bedCostSelfTotal;
  835. that.info["bed_cost_part_self_total"] =
  836. response.data.data.bedCostPartSelfTotal;
  837. that.info["operation_cost_total"] =
  838. response.data.data.operationCostTotal;
  839. that.info["operation_cost_self_total"] =
  840. response.data.data.operationCostSelfTotal;
  841. that.info["operation_cost_part_self_total"] =
  842. response.data.data.operationCostPartSelfTotal;
  843. that.info["other_cost_total"] = response.data.data.otherCostTotal;
  844. that.info["other_cost_self_total"] =
  845. response.data.data.otherCostSelfTotal;
  846. that.info["other_cost_part_self_total"] =
  847. response.data.data.otherCostPartSelfTotal;
  848. that.info["material_cost_total"] =
  849. response.data.data.materialCostTotal;
  850. that.info["material_cost_self_total"] =
  851. response.data.data.materialCostSelfTotal;
  852. that.info["material_cost_part_self_total"] =
  853. response.data.data.materialCostPartSelfTotal;
  854. that.info["western_medicine_cost_total"] =
  855. response.data.data.westernMedicineCostTotal;
  856. that.info["western_medicine_cost_self_total"] =
  857. response.data.data.westernMedicineCostSelfTotal;
  858. that.info["western_medicine_cost_part_self_total"] =
  859. response.data.data.westernMedicineCostPartSelfTotal;
  860. that.info["chinese_traditional_medicine_cost_total"] =
  861. response.data.data.chineseTraditionalMedicineCostTotal;
  862. that.info["chinese_traditional_medicine_cost_self_total"] =
  863. response.data.data.chineseTraditionalMedicineCostSelfTotal;
  864. that.info["chinese_traditional_medicine_cost_part_self_total"] =
  865. response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
  866. that.info["check_cost_total"] = response.data.data.checkCostTotal;
  867. that.info["check_cost_self_total"] =
  868. response.data.data.checkCostSelfTotal;
  869. that.info["check_cost_part_self_total"] =
  870. response.data.data.checkCostPartSelfTotal;
  871. that.info["laboratory_cost_total"] =
  872. response.data.data.laboratoryCostTotal;
  873. that.info["laboratory_cost_self_total"] =
  874. response.data.data.laboratoryCostSelfTotal;
  875. that.info["laboratory_cost_part_self_total"] =
  876. response.data.data.laboratoryCostPartSelfTotal;
  877. that.info["treat_cost_total"] = response.data.data.treatCostTotal;
  878. that.info["treat_cost_self_total"] =
  879. response.data.data.treatCostSelfTotal;
  880. that.info["treat_cost_part_self_total"] =
  881. response.data.data.treatCostPartSelfTotal;
  882. that.info["date"] = response.data.data.date;
  883. // that.info["number"] = response.data.data.number;
  884. that.info["order_infos"] = response.data.data.order_infos;
  885. that.info["diagnosis"] = response.data.data.diagnosis;
  886. let list = []
  887. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  888. let order = response.data.data.order_infos[i]
  889. let obj = {
  890. name: "",
  891. spec: "",
  892. cnt: "",
  893. det_item_fee_sumamt: "",
  894. }
  895. if (order.advice_id > 0 && order.project_id == 0) {
  896. obj.name = order.advice.advice_name
  897. let spec = order.advice.drug.dose + order.advice.drug.dose_unit + '*' + order.advice.drug.min_number + order.advice.drug.min_unit + '/' + order.advice.drug.max_unit
  898. obj.spec = spec
  899. obj.cnt = order.cnt
  900. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  901. list.push(obj)
  902. } else if (order.advice_id == 0 && order.project_id > 0) {
  903. if (order.project.type == 2) {
  904. obj.name = order.project.project.project_name
  905. obj.spec = ""
  906. obj.cnt = order.cnt
  907. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  908. } else {
  909. obj.name = order.project.good_info.good_name
  910. obj.spec = order.project.good_info.specification_name
  911. obj.cnt = order.cnt
  912. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  913. }
  914. list.push(obj)
  915. }
  916. }
  917. console.log(list)
  918. let len = list.length / 2
  919. let L_list = []
  920. let R_list = []
  921. len = Math.trunc(len)
  922. for (let i = 0; i < len; i++) {
  923. L_list.push(list[i])
  924. }
  925. console.log(len)
  926. for (let i = len; i < list.length; i++) {
  927. console.log(list[i])
  928. R_list.push(list[i])
  929. }
  930. console.log(L_list)
  931. console.log(R_list)
  932. that.info["L_list"] = L_list
  933. that.info["R_list"] = R_list
  934. }
  935. });
  936. } else {
  937. var that = this;
  938. axios
  939. .get("http://127.0.0.1:9532/api/settle/query", {
  940. params: {
  941. order_id: order_id,
  942. admin_user_id: this.$store.getters.xt_user.user.id,
  943. },
  944. })
  945. .then(function (response) {
  946. if (response.data.state == 0) {
  947. this.$message.error(response.data.msg);
  948. return false;
  949. } else {
  950. console.log(response.data.data.info);
  951. that.info = response.data.data.info;
  952. that.p_admin = response.data.data.printor_admin;
  953. that.charge_admin = response.data.data.charge_admin;
  954. that.info["new_order"] = response.data.data.order
  955. that.info["p_admin"] = that.p_admin;
  956. that.info["charge_admin"] = that.charge_admin;
  957. that.info["order_number"] = response.data.data.order_number;
  958. that.info["patient"] = response.data.data.patient;
  959. that.info["date"] = response.data.data.date;
  960. that.info["number"] = response.data.data.number;
  961. that.info["order_infos"] = response.data.data.order_infos;
  962. that.info["diagnosis"] = response.data.data.diagnosis;
  963. that.info["org_code"] = response.data.data.org_code;
  964. that.info["org_name"] = response.data.data.org_name;
  965. that.info["doctor_code"] = response.data.data.doctor_code;
  966. that.info["department"] = response.data.data.department;
  967. that.info["health_card_no"] = response.data.data.health_card_no;
  968. that.info["bed_cost_total"] = response.data.data.bedCostTotal;
  969. that.info["bed_cost_self_total"] =
  970. response.data.data.bedCostSelfTotal;
  971. that.info["bed_cost_part_self_total"] =
  972. response.data.data.bedCostPartSelfTotal;
  973. that.info["operation_cost_total"] =
  974. response.data.data.operationCostTotal;
  975. that.info["operation_cost_self_total"] =
  976. response.data.data.operationCostSelfTotal;
  977. that.info["operation_cost_part_self_total"] =
  978. response.data.data.operationCostPartSelfTotal;
  979. that.info["other_cost_total"] = response.data.data.otherCostTotal;
  980. that.info["other_cost_self_total"] =
  981. response.data.data.otherCostSelfTotal;
  982. that.info["other_cost_part_self_total"] =
  983. response.data.data.otherCostPartSelfTotal;
  984. that.info["material_cost_total"] =
  985. response.data.data.materialCostTotal;
  986. that.info["material_cost_self_total"] =
  987. response.data.data.materialCostSelfTotal;
  988. that.info["material_cost_part_self_total"] =
  989. response.data.data.materialCostPartSelfTotal;
  990. that.info["western_medicine_cost_total"] =
  991. response.data.data.westernMedicineCostTotal;
  992. that.info["western_medicine_cost_self_total"] =
  993. response.data.data.westernMedicineCostSelfTotal;
  994. that.info["western_medicine_cost_part_self_total"] =
  995. response.data.data.westernMedicineCostPartSelfTotal;
  996. that.info["chinese_traditional_medicine_cost_total"] =
  997. response.data.data.chineseTraditionalMedicineCostTotal;
  998. that.info["chinese_traditional_medicine_cost_self_total"] =
  999. response.data.data.chineseTraditionalMedicineCostSelfTotal;
  1000. that.info["chinese_traditional_medicine_cost_part_self_total"] =
  1001. response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
  1002. that.info["check_cost_total"] = response.data.data.checkCostTotal;
  1003. that.info["check_cost_self_total"] =
  1004. response.data.data.checkCostSelfTotal;
  1005. that.info["check_cost_part_self_total"] =
  1006. response.data.data.checkCostPartSelfTotal;
  1007. that.info["laboratory_cost_total"] =
  1008. response.data.data.laboratoryCostTotal;
  1009. that.info["laboratory_cost_self_total"] =
  1010. response.data.data.laboratoryCostSelfTotal;
  1011. that.info["laboratory_cost_part_self_total"] =
  1012. response.data.data.laboratoryCostPartSelfTotal;
  1013. that.info["treat_cost_total"] = response.data.data.treatCostTotal;
  1014. that.info["treat_cost_self_total"] =
  1015. response.data.data.treatCostSelfTotal;
  1016. that.info["treat_cost_part_self_total"] =
  1017. response.data.data.treatCostPartSelfTotal;
  1018. that.info["date"] = response.data.data.date;
  1019. that.info["number"] = response.data.data.number;
  1020. that.info["order_infos"] = response.data.data.order_infos;
  1021. that.info["diagnosis"] = response.data.data.diagnosis;
  1022. that.info["bedInscpTotal"] =
  1023. response.data.data.bedInscpTotal;
  1024. that.info["bedSelfTotal"] =
  1025. response.data.data.bedSelfTotal;
  1026. that.info["operationInscpTotal"] =
  1027. response.data.data.operationInscpTotal;
  1028. that.info["operationSelfTotal"] =
  1029. response.data.data.operationSelfTotal;
  1030. that.info["checkInscpTotal"] =
  1031. response.data.data.checkInscpTotal;
  1032. that.info["checkSelfTotal"] =
  1033. response.data.data.checkSelfTotal;
  1034. that.info["treatInscpTotal"] =
  1035. response.data.data.treatInscpTotal;
  1036. that.info["treatSelfTotal"] =
  1037. response.data.data.treatSelfTotal;
  1038. that.info["laboratoryInscpTotal"] =
  1039. response.data.data.laboratoryInscpTotal;
  1040. that.info["laboratorySelfTotal"] =
  1041. response.data.data.laboratorySelfTotal;
  1042. that.info["westernMedicineInscpTotal"] =
  1043. response.data.data.westernMedicineInscpTotal;
  1044. that.info["westernMedicineSelfTotal"] =
  1045. response.data.data.westernMedicineSelfTotal;
  1046. that.info["materialInscpTotal"] =
  1047. response.data.data.materialInscpTotal;
  1048. that.info["materialSelfTotal"] =
  1049. response.data.data.materialSelfTotal;
  1050. that.info["chineseTraditionalInscpTotal"] =
  1051. response.data.data.chineseTraditionalInscpTotal;
  1052. that.info["chineseTraditionalSelfTotal"] =
  1053. response.data.data.chineseTraditionalSelfTotal;
  1054. that.info["otherInscpTotal"] =
  1055. response.data.data.otherInscpTotal;
  1056. that.info["otherSelfTotal"] =
  1057. response.data.data.otherSelfTotal;
  1058. let obj = {
  1059. type: 1,
  1060. details: [],
  1061. total: 0,
  1062. };
  1063. let obj2 = {
  1064. type: 2,
  1065. details: [],
  1066. total: 0,
  1067. };
  1068. let obj3 = {
  1069. type: 3,
  1070. details: [],
  1071. total: 0,
  1072. };
  1073. let obj4 = {
  1074. type: 4,
  1075. details: [],
  1076. total: 0,
  1077. };
  1078. let num = 0;
  1079. that.info.order_infos.map((item) => {
  1080. if (item.advice_id > 0) {
  1081. obj.details.push(item);
  1082. obj.total += item.pric * item.advice.prescribing_number;
  1083. num++;
  1084. } else {
  1085. if (item.project.type == 2) {
  1086. obj2.details.push(item);
  1087. obj2.total += item.pric * item.project.count;
  1088. num++;
  1089. } else {
  1090. obj3.details.push(item);
  1091. obj3.total += item.pric * item.project.count;
  1092. num++;
  1093. }
  1094. }
  1095. });
  1096. // this.info.order_infos.map(item => {
  1097. // obj4.total = item.Total
  1098. // obj4.details.push(item)
  1099. // num++
  1100. //
  1101. // })
  1102. that.info.new_detail_list = [];
  1103. that.info.new_detail_list.push(obj);
  1104. that.info.new_detail_list.push(obj2);
  1105. that.info.new_detail_list.push(obj3);
  1106. // that.info.new_detail_list.push(obj4)
  1107. that.num = num;
  1108. if (that.paramsObj.settle_type != 1) {
  1109. that.info.begndate = that.getTimes(that.paramsObj.start_time);
  1110. that.info.enddate = that.getTimes(that.paramsObj.end_time);
  1111. }
  1112. let list = []
  1113. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  1114. let order = response.data.data.order_infos[i]
  1115. let obj = {
  1116. name: "",
  1117. spec: "",
  1118. cnt: "",
  1119. det_item_fee_sumamt: "",
  1120. }
  1121. if (order.advice_id > 0 && order.project_id == 0) {
  1122. obj.name = order.advice.advice_name
  1123. let spec = order.advice.drug.dose + order.advice.drug.dose_unit + '*' + order.advice.drug.min_number + order.advice.drug.min_unit + '/' + order.advice.drug.max_unit
  1124. obj.spec = spec
  1125. obj.cnt = order.cnt
  1126. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1127. list.push(obj)
  1128. } else if (order.advice_id == 0 && order.project_id > 0) {
  1129. if (order.project.type == 2) {
  1130. obj.name = order.project.project.project_name
  1131. obj.spec = ""
  1132. obj.cnt = order.cnt
  1133. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1134. list.push(obj)
  1135. } else {
  1136. obj.name = order.project.good_info.good_name
  1137. obj.spec = order.project.good_info.specification_name
  1138. obj.cnt = order.cnt
  1139. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1140. list.push(obj)
  1141. }
  1142. }
  1143. }
  1144. let len = list.length / 2
  1145. let L_list = []
  1146. let R_list = []
  1147. len = Math.trunc(len)
  1148. for (let i = 0; i < len; i++) {
  1149. L_list.push(list[i])
  1150. }
  1151. for (let i = len; i < list.length; i++) {
  1152. R_list.push(list[i])
  1153. }
  1154. that.info["L_list"] = L_list
  1155. that.info["R_list"] = R_list
  1156. }
  1157. })
  1158. .catch(function (error) {
  1159. });
  1160. }
  1161. }
  1162. },
  1163. },
  1164. created() {
  1165. console.log(this.paramsObj);
  1166. this.getInfo(this.paramsObj.order_id, this.paramsObj);
  1167. this.org_id = this.$store.getters.xt_user.org_id;
  1168. console.log("this.org_id", this.org_id);
  1169. },
  1170. watch: {
  1171. paramsObj: {
  1172. //深度监听,可监听到对象、数组的变化
  1173. handler(val, oldVal) {
  1174. this.paramsObj = val;
  1175. console.log(this.paramsObj);
  1176. this.getInfo(this.paramsObj.order_id, this.paramsObj);
  1177. },
  1178. deep: true,
  1179. immediate: true,
  1180. },
  1181. },
  1182. };
  1183. </script>
  1184. <style>
  1185. .dialysis-print-order {
  1186. width: 960px;
  1187. margin: 0 auto;
  1188. }
  1189. .dialysis-print-order .order-yy-name {
  1190. margin: auto;
  1191. text-align: center;
  1192. font-size: 20px;
  1193. letter-spacing: 5px;
  1194. }
  1195. .dialysis-print-order .order-title {
  1196. margin: auto;
  1197. font-weight: 600;
  1198. text-align: center;
  1199. font-size: 22px;
  1200. padding: 10px;
  1201. }
  1202. .dialysis-print-order .table-box {
  1203. width: 100%;
  1204. line-height: 23px;
  1205. font-size: 14px;
  1206. }
  1207. .dialysis-print-order .print-table {
  1208. width: 100%;
  1209. text-align: center;
  1210. border-collapse: collapse;
  1211. line-height: 40px;
  1212. font-size: 14px;
  1213. border-color: #000;
  1214. }
  1215. .dialysis-print-order .print-table-no {
  1216. width: 100%;
  1217. text-align: center;
  1218. border-collapse: collapse;
  1219. font-size: 14px;
  1220. }
  1221. .dialysis-print-order .under-line {
  1222. border-bottom: 1px solid #999;
  1223. width: 95%;
  1224. text-align: center;
  1225. margin-left: 2px;
  1226. }
  1227. .dialysis-print-order .title-box {
  1228. text-align: center;
  1229. font-size: 16px;
  1230. }
  1231. .dialysis-print-order .radio-lebel-box {
  1232. font-weight: 400;
  1233. cursor: pointer;
  1234. }
  1235. .dialysis-print-order .radio-no {
  1236. opacity: 0;
  1237. outline: none;
  1238. position: absolute;
  1239. margin: 0;
  1240. width: 0;
  1241. height: 0;
  1242. z-index: -1;
  1243. }
  1244. .dialysis-print-order .radio-inner {
  1245. white-space: nowrap;
  1246. cursor: pointer;
  1247. outline: none;
  1248. display: inline-block;
  1249. line-height: 1;
  1250. position: relative;
  1251. vertical-align: middle;
  1252. }
  1253. .dialysis-print-order .radio-fang {
  1254. display: inline-block;
  1255. position: relative;
  1256. border: 1px solid #000;
  1257. box-sizing: border-box;
  1258. width: 14px;
  1259. height: 14px;
  1260. background-color: #fff;
  1261. z-index: 1;
  1262. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  1263. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  1264. }
  1265. .dialysis-print-order .is-checked-radio::after {
  1266. content: "√";
  1267. font-size: 15px;
  1268. }
  1269. .dialysis-print-order .print-table-no tr td {
  1270. padding: 8px 5px;
  1271. line-height: 25px;
  1272. }
  1273. .dialysis-print-order .print-table tr td {
  1274. padding: 1px 1px;
  1275. /*line-height: 25px;*/
  1276. }
  1277. .es-img {
  1278. height: 30px;
  1279. }
  1280. .advice-name {
  1281. text-align: left;
  1282. }
  1283. .advice-children {
  1284. display: flex;
  1285. }
  1286. .title-box-pro {
  1287. border: 0 #fff;
  1288. line-height: 25px;
  1289. height: 25px;
  1290. text-align: left;
  1291. padding-left: 10px !important;
  1292. }
  1293. .title-box-pro-tr {
  1294. border: 0 #fff;
  1295. }
  1296. .text-align-left {
  1297. text-align: left !important;
  1298. padding-left: 10px !important;
  1299. font-size: 14px !important;
  1300. line-height: 25px;
  1301. }
  1302. .print-table-tr-new td {
  1303. line-height: 20px !important;
  1304. }
  1305. .border-top-solid {
  1306. border: solid 1px #000;
  1307. }
  1308. .print-template-two tr {
  1309. line-height: 30px;
  1310. }
  1311. .table-box1 {
  1312. border: 1px solid #000;
  1313. width: 100%;
  1314. line-height: 30px;
  1315. font-size: 14px;
  1316. border-collapse: collapse;
  1317. }
  1318. .table-box1 tr {
  1319. border-bottom: 1px solid #000;
  1320. }
  1321. </style>
  1322. <style lang="scss">
  1323. .newContainer {
  1324. .dialysisPage::-webkit-scrollbar {
  1325. height: 15px;
  1326. }
  1327. .el-date-editor {
  1328. .el-input__inner {
  1329. padding-right: 0px;
  1330. }
  1331. }
  1332. .el-table td,
  1333. .el-table th {
  1334. text-align: center;
  1335. }
  1336. }
  1337. .newContainer::-webkit-scrollbar {
  1338. height: 15px !important;
  1339. }
  1340. </style>