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

statementPrint.vue 58KB

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