statementPrint.vue 82KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996
  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 || org_id == 10610
  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 || org_id ==10610"
  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. <!-- 阜阳经沃 org_id != 0 && -->
  58. <printtwelve :info="info" v-if="org_id == 10480 "></printtwelve>
  59. <!-- 大冶 -->
  60. <printthirteen :info="info" v-if="org_id == 10510"></printthirteen>
  61. <!-- 广水原生堂 -->
  62. <printfourteen :info="info" v-if="(org_id == 10088 || org_id == 0 ) && this.paramsObj.balance_accounts_type == 1"></printfourteen>
  63. <printOne :info="info" v-if=" org_id != 9990 &&
  64. org_id != 10138 &&
  65. org_id != 9504 &&
  66. org_id != 10028 &&
  67. org_id != 0 && org_id != 10610 &&
  68. org_id != 10278 && org_id != 10387 && org_id != 10191 &&org_id != 10210 &&org_id != 10485 &&org_id != 10480 &&org_id != 10510 &&org_id != 10088 &&org_id != 0 && this.paramsObj.balance_accounts_type == 1">
  69. </printOne>
  70. <privateChargePrint :info="info" v-if="org_id != 9990 &&
  71. org_id != 10138 &&
  72. org_id != 9504 &&
  73. org_id != 10028 &&
  74. org_id != 10278 && org_id != 10610 && org_id != 10387 && org_id != 10191 &&org_id != 10210 &&org_id != 10485 &&org_id != 10480 &&org_id != 10510 && org_id != 0 && this.paramsObj.balance_accounts_type == 2">
  75. </privateChargePrint>
  76. </div>
  77. </div>
  78. </template>
  79. <script>
  80. import { uParseTime } from '@/utils/tools'
  81. import axios from 'axios'
  82. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  83. import printOne from './statementTemplate/printOne'
  84. import privateChargePrint from './statementTemplate/privateChargePrint'
  85. import printTwo from './statementTemplate/printTwo'
  86. import printThree from './statementTemplate/printThree'
  87. import printFour from './statementTemplate/printFour'
  88. import printFive from './statementTemplate/printFive'
  89. import testVue from './statementTemplate/test'
  90. import { getAllDoctorList, getAllHisPatientList } from '@/api/project/project'
  91. import { getPrivateExpenses, getPrivateExpensesOrder, getPrivateExpensesTwo } from '@/api/his/his'
  92. import printSeven from './statementTemplate/printSeven'
  93. import Print10191 from './statementTemplate/print10191'
  94. import printTen from './statementTemplate/printTen'
  95. import printEleven from './statementTemplate/printeEleven'
  96. import printtwelve from './statementTemplate/printtwelve'
  97. import printthirteen from './statementTemplate/printthirteen'
  98. import printfourteen from './statementTemplate/printfourteen'
  99. export default {
  100. name: 'dialysisPrintOrder',
  101. components: {
  102. Print10191,
  103. printSeven,
  104. BreadCrumb,
  105. printOne,
  106. privateChargePrint,
  107. printTwo,
  108. printThree,
  109. printFour,
  110. testVue,
  111. printFive,
  112. printTen,
  113. printEleven,
  114. printtwelve,
  115. printthirteen,
  116. printfourteen
  117. },
  118. props: {
  119. paramsObj: Object
  120. },
  121. data() {
  122. return {
  123. fundsArray: [
  124. { code: '310100', name: '城镇职工基本医疗保险统筹基金' },
  125. { code: '310101', name: '城镇职工基本医疗保险统筹基金(预付金)' },
  126. { code: '310102', name: '职工门诊统筹基金' },
  127. { code: '310200', name: '城镇职工基本医疗保险个人账户基金' },
  128. { code: '310400', name: '军转干部医疗补助基金' },
  129. { code: '310500', name: '代缴基金(破产改制)' },
  130. { code: '320100', name: '公务员医疗补助基金' },
  131. { code: '320200', name: '厅级干部补助基金' },
  132. { code: '330100', name: '大额医疗费用补助基金' },
  133. { code: '330200', name: '职工意外伤害基金' },
  134. { code: '340100', name: '离休人员医疗保障基金' },
  135. { code: '340200', name: '离休老工人门慢保障基金' },
  136. { code: '350100', name: '一至六级残疾军人医疗补助基金' },
  137. { code: '370100', name: '企业补充医疗保险基金' },
  138. { code: '370200', name: '公益补充保险基金' },
  139. { code: '390100', name: '城乡居民基本医疗保险基金' },
  140. { code: '390101', name: '城乡居民基本医疗保险基金(预付金)' },
  141. { code: '390102', name: '居民门诊统筹基金' },
  142. { code: '390200', name: '城乡居民大病医疗保险基金' },
  143. { code: '390300', name: '城乡居民大病补充保险基金' },
  144. { code: '390400', name: '居民意外伤害基金' },
  145. { code: '390500', name: '居民家庭账户金' },
  146. { code: '410100', name: '工伤保险基金' },
  147. { code: '510100', name: '生育基金' },
  148. { code: '610100', name: '医疗救助基金' },
  149. { code: '610101', name: '医疗救助基金' },
  150. { code: '610200', name: '优抚对象医疗补助基金' },
  151. { code: '620100', name: '特惠保补偿金' },
  152. { code: '630100', name: '医院减免金' },
  153. { code: '640100', name: '政府兜底基金' },
  154. { code: '999106', name: '预留保证金' },
  155. { code: '999109', name: '农村低收入人口医疗补充保险' },
  156. { code: '999110', name: '居民个人账户支出基金' },
  157. { code: '999996', name: '医院垫付基金' },
  158. { code: '999997', name: '其他基金' },
  159. { code: '99999701', name: '再封顶线以上救助基金' },
  160. { code: '99999702', name: '职工大病保险基金' },
  161. { code: '99999705', name: '扶贫救助' },
  162. { code: '99999706', name: '财政医疗救助' },
  163. { code: '99999707', name: '新冠肺炎核酸检测财政补助' },
  164. { code: '99999708', name: '贫困人口再救助' },
  165. { code: '99999721', name: '居民医疗账户支出' },
  166. { code: '99999722', name: '居民贫困救助' },
  167. { code: '99999723', name: '居民特大病贫困救助' },
  168. { code: '99999724', name: '基本起付线新增支出' },
  169. { code: '99999725', name: '基本提高比例新增支出' },
  170. { code: '99999726', name: '大病起付线新增支出' },
  171. { code: '99999727', name: '大病提高封顶新增支出' },
  172. { code: '99999728', name: '基金类别贫困救助普通慢性病提高比例新增支出' },
  173. { code: '99999729', name: '基金类别贫困救助普通慢性病提高限额新增支出' },
  174. { code: '99999730', name: '基金类别贫困救助重大慢性病提高比例新增支出' },
  175. { code: '99999731', name: '基金类别贫困救助普通慢性病医疗救助基金支出' },
  176. { code: '99999732', name: '基金类别贫困救助重大慢性病医疗救助基金支出' },
  177. { code: '99999733', name: '基金类别贫困救助普通慢性病降低起付线新增支出' },
  178. { code: '99999734', name: '基金类别贫困救助重大慢性病降低起付线新增支出' },
  179. { code: '99999735', name: '基金类别贫困人口门诊统筹' },
  180. { code: '99999737', name: '职工大病补助基金' },
  181. { code: '99999747', name: '长期护理险基金' },
  182. { code: '99999748', name: '离休账户支出' },
  183. { code: '99999749', name: '精准扶贫补充保险基金' },
  184. { code: '99999750', name: '公务员补助账户支付' },
  185. { code: '99999751', name: '医疗救助基金(罕见病)' },
  186. { code: '99999752', name: '职工慢性病统筹支出' },
  187. { code: '99999753', name: '医疗救助基金(重特大疾病)' },
  188. { code: '999702', name: '二乙基金' },
  189. { code: '999703', name: '七至十级残疾军人医疗补助基金' },
  190. { code: '999704', name: '城镇职工基本医疗保险单建统筹基金' },
  191. { code: '999706', name: '工会互助基金' },
  192. { code: '390104', name: '城乡居民大额医疗保险基金' },
  193. { code: '99999757', name: '退休人员补充基金' },
  194. { code: '99999758', name: '公费医疗照顾基金' },
  195. { code: '360200', name: '保健基金' },
  196. { code: '360300', name: '保健预支付基金' },
  197. { code: '999998', name: '现金支出' },
  198. { code: '310300', name: '城镇职工大病医疗保险基金' },
  199. { code: '640103', name: '政府补充保障基金(特优群体人员)' },
  200. { code: '640104', name: '政府补充保障基金(建国前老党员)' },
  201. { code: '390103', name: '居民两病门诊统筹基金' },
  202. { code: '650101', name: '大病补充保障基金(大病购药)' },
  203. { code: '650102', name: '大病补充保障基金(罕见病购药)' },
  204. { code: '610103', name: '医疗救助基金(再救助)' },
  205. { code: '330102', name: '大额医疗费用救助基金' },
  206. { code: '610102', name: '医疗救助基金(重特大疾病/再救助)' },
  207. { code: '999111', name: '居民储蓄账户基金' },
  208. { code: '99999765', name: '平安商业保险基金' },
  209. { code: '99999766', name: '人保商业保险基金' },
  210. { code: '99999767', name: '离休单位支付基金' },
  211. { code: '99999768', name: '造船离休单位支付基金' },
  212. { code: '99999769', name: '企业离休支付基金' },
  213. { code: '99999770', name: '普惠保商业保险基金' },
  214. { code: '390700', name: '城乡居民基本医疗保险二次报销基金' },
  215. { code: '390801', name: '城乡低保人员团体住院医疗保险基金' },
  216. { code: '310701', name: '城镇职工补充医疗保险(AB款)基金' },
  217. { code: '999761', name: '128基金' },
  218. { code: '999762', name: '五七工基金' },
  219. { code: '999763', name: '五七工大病基金' },
  220. { code: '310800', name: '地方附加医保基金' },
  221. { code: '3990100', name: '劳模补助基金' },
  222. { code: '99999759', name: '城镇职工长期护理保险基金' },
  223. { code: '99999760', name: '城乡居民长期护理保险基金' },
  224. { code: '310103', name: '职工生育基金' },
  225. { code: '99999771', name: '生育产前检查支出' },
  226. { code: '99999778', name: '造船离休账户支出' },
  227. { code: '99999779', name: '企业离休账户支出' },
  228. { code: '610104', name: '残联基金' },
  229. { code: '610105', name: '慈善救助基金' },
  230. { code: '99999780', name: '商业保险补充医疗基金' },
  231. { code: '340300', name: '离休人员备用金' },
  232. { code: '99999781', name: '卫健基金' },
  233. { code: '99999782', name: '重大疾病基金' },
  234. { code: '99999783', name: '医疗援助基金' },
  235. { code: '370300', name: '人保健康企业补充基金' },
  236. { code: '99999790', name: '其他账户支付' },
  237. { code: '910101', name: '农民工大病医疗保险基金' },
  238. { code: '910102', name: '农民工大病医疗互助基金' },
  239. { code: '310900', name: '免缴补充基金' },
  240. { code: '99999784', name: '建国前老工人补助基金' },
  241. { code: '99999787', name: '财政补充基金' },
  242. { code: '99999788', name: '精防医疗补助' },
  243. { code: '99999785', name: '家庭医生签约公共卫生服务专项基金' },
  244. { code: '320300', name: '企业事业单位补充医疗保险基金' },
  245. { code: '999201', name: '一般诊疗费统筹基金' },
  246. { code: '999202', name: '核酸检测统筹基金' },
  247. { code: '99999772', name: '返外地退休人员支出基金' },
  248. { code: '310203', name: '个人本年账户基金' },
  249. { code: '310302', name: '先行支付大额基金' },
  250. { code: '350102', name: '荣军账户' },
  251. { code: '370201', name: '高科技人才补充基金-公益补充' },
  252. { code: '390301', name: '儿童统筹基金' },
  253. { code: '610107', name: '医疗救助再救助基金' },
  254. { code: '640101', name: '涟康保政策范围外基金' },
  255. { code: '999103', name: '地厅人员财政补助基金' },
  256. { code: '999700', name: '职工大病基金' },
  257. { code: '999701', name: '特殊职工大病基金' },
  258. { code: '999718', name: '先行支付统筹基金' },
  259. { code: '999900', name: '特殊基金' },
  260. { code: '99999602', name: '医院承担基金' },
  261. { code: '99999703', name: '财政补助基金' },
  262. { code: '99999741', name: '领导干部额外补充基金' },
  263. { code: '99999756', name: '离休账户' },
  264. { code: '310600', name: '基本医疗二次报销基金' },
  265. { code: '320400', name: '公务员二次报销基金' },
  266. { code: '340103', name: '中央离休基金' },
  267. { code: '99999704', name: '优抚补助' },
  268. { code: '399100', name: '医疗照顾人员补充基金' },
  269. { code: '620102', name: '补充医疗保险基金' },
  270. { code: '999705', name: '优抚基金' },
  271. { code: '999720', name: '工会大额互助基金' },
  272. { code: '310301', name: '职工大病补助基金(预付金)' },
  273. { code: '390201', name: '城乡居民大病医疗保险基金(预付金)' },
  274. { code: '310601', name: '社区门诊统筹基金' },
  275. { code: '310700', name: '家属统筹医疗基金' },
  276. { code: '310802', name: '家属统筹地方补充医疗保险基金' },
  277. { code: '320500', name: '公务员医疗补助个人账户基金' }
  278. ],
  279. crumbs: [
  280. { path: false, name: '门诊医生站' },
  281. { path: false, name: '打印' }
  282. ],
  283. record_date: '',
  284. patientTableData: [],
  285. advicePrint: [],
  286. hisPatient: {},
  287. patient: {},
  288. search_input: '',
  289. loading: false,
  290. patient_id: 0,
  291. prescription_id: 0,
  292. ids: '',
  293. info: null,
  294. order: null,
  295. org_id: '',
  296. balanceAccounts: {}
  297. }
  298. },
  299. methods: {
  300. printThisPage() {
  301. var ptime = Math.round(new Date().getTime() / 1000)
  302. this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
  303. if (
  304. this.$store.getters.xt_user.org_id == 10138 ||
  305. this.$store.getters.xt_user.org_id == 4 ||
  306. this.$store.getters.xt_user.org_id == 10278
  307. ) {
  308. setTimeout(() => {
  309. const style =
  310. '@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%;}}}'
  311. const style2 =
  312. '@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%;}}}'
  313. const style3 =
  314. '@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%;}}}'
  315. const style4 =
  316. '@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%;}}}'
  317. const style5 =
  318. '@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%;}}}'
  319. const style6 =
  320. '@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%;}}}'
  321. const style7 =
  322. '@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%;}}}'
  323. const style8 =
  324. '@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%;}}}'
  325. const style9 =
  326. '@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%;}}}'
  327. const style10 =
  328. '@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%;}}}'
  329. const style11 =
  330. '@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%;}}}'
  331. const style12 =
  332. '@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%;}}}'
  333. if (this.num >= 13) {
  334. printJS({
  335. printable: 'prescription-print',
  336. type: 'html',
  337. style: style,
  338. scanStyles: false
  339. })
  340. } else if (this.num == 12) {
  341. printJS({
  342. printable: 'prescription-print',
  343. type: 'html',
  344. style: style2,
  345. scanStyles: false
  346. })
  347. } else if (this.num == 11) {
  348. printJS({
  349. printable: 'prescription-print',
  350. type: 'html',
  351. style: style3,
  352. scanStyles: false
  353. })
  354. } else if (this.num == 10) {
  355. printJS({
  356. printable: 'prescription-print',
  357. type: 'html',
  358. style: style4,
  359. scanStyles: false
  360. })
  361. } else if (this.num == 9) {
  362. printJS({
  363. printable: 'prescription-print',
  364. type: 'html',
  365. style: style5,
  366. scanStyles: false
  367. })
  368. } else if (this.num == 8) {
  369. printJS({
  370. printable: 'prescription-print',
  371. type: 'html',
  372. style: style6,
  373. scanStyles: false
  374. })
  375. } else if (this.num == 7) {
  376. printJS({
  377. printable: 'prescription-print',
  378. type: 'html',
  379. style: style7,
  380. scanStyles: false
  381. })
  382. } else if (this.num == 6) {
  383. printJS({
  384. printable: 'prescription-print',
  385. type: 'html',
  386. style: style8,
  387. scanStyles: false
  388. })
  389. } else if (this.num == 5) {
  390. printJS({
  391. printable: 'prescription-print',
  392. type: 'html',
  393. style: style9,
  394. scanStyles: false
  395. })
  396. } else if (this.num == 4) {
  397. printJS({
  398. printable: 'prescription-print',
  399. type: 'html',
  400. style: style10,
  401. scanStyles: false
  402. })
  403. } else if (this.num == 3) {
  404. printJS({
  405. printable: 'prescription-print',
  406. type: 'html',
  407. style: style11,
  408. scanStyles: false
  409. })
  410. } else if (this.num <= 2) {
  411. printJS({
  412. printable: 'prescription-print',
  413. type: 'html',
  414. style: style12,
  415. scanStyles: false
  416. })
  417. }
  418. }, 500)
  419. } else if (
  420. this.$store.getters.xt_user.org_id == 9504 ||
  421. this.$store.getters.xt_user.org_id == 10028
  422. ) {
  423. const style =
  424. '@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;}}'
  425. printJS({
  426. printable: 'prescription-print',
  427. type: 'html',
  428. style: style,
  429. scanStyles: false
  430. })
  431. } else {
  432. // 医保环境打印格式
  433. if (
  434. this.$store.getters.xt_user.org_id == 9919 ||
  435. this.$store.getters.xt_user.org_id == 10106
  436. ) {
  437. const style =
  438. '@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;}}'
  439. printJS({
  440. printable: 'statement-print',
  441. type: 'html',
  442. style: style,
  443. scanStyles: false
  444. })
  445. } else if (
  446. // this.$store.getters.xt_user.org_id == 0 ||
  447. this.$store.getters.xt_user.org_id == 10191
  448. ) {
  449. const style =
  450. '@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%;}}}'
  451. printJS({
  452. printable: 'statement-print',
  453. type: 'html',
  454. style: style,
  455. scanStyles: false
  456. })
  457. // const style =
  458. // "@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;}}";
  459. // printJS({
  460. // printable: "statement-print",
  461. // type: "html",
  462. // style: style,
  463. // scanStyles: false,
  464. // });
  465. } else if (
  466. this.$store.getters.xt_user.org_id == 10485
  467. ) {
  468. const style =
  469. '@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;}'
  470. printJS({
  471. printable: 'statement-print',
  472. type: 'html',
  473. style: style,
  474. scanStyles: false
  475. })
  476. }else if (
  477. this.$store.getters.xt_user.org_id == 10480 || this.$store.getters.xt_user.org_id == 0
  478. ) {
  479. const style =
  480. '@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;}'
  481. printJS({
  482. printable: 'statement-print',
  483. type: 'html',
  484. style: style,
  485. scanStyles: false
  486. })
  487. }else if( this.$store.getters.xt_user.org_id == 10510 ) {
  488. const style =
  489. '@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%;}}}'
  490. printJS({
  491. printable: 'statement-print',
  492. type: 'html',
  493. style: style,
  494. scanStyles: false
  495. })
  496. } else {
  497. const style =
  498. '@media print {#statement-print{font-size:16px;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%;}}}'
  499. printJS({
  500. printable: 'statement-print',
  501. type: 'html',
  502. style: style,
  503. scanStyles: false
  504. })
  505. }
  506. }
  507. // if (this.org_template_info.template_id == 1) {
  508. // printJS({
  509. // printable: "dialysis-print-box",
  510. // type: "html",
  511. // style: style,
  512. // scanStyles: false
  513. // });
  514. // }
  515. },
  516. getAllDoctorList() {
  517. getAllDoctorList().then((response) => {
  518. if (response.data.state == 1) {
  519. var doctor = response.data.data.doctor
  520. this.doctorList = doctor
  521. }
  522. })
  523. }, getType(med_chrgitm_type) {
  524. switch (med_chrgitm_type) {
  525. case '01':
  526. return '床位费'
  527. break
  528. case '02':
  529. return '诊察费'
  530. break
  531. case '03':
  532. return '检查费'
  533. break
  534. case '04':
  535. return '化验费'
  536. break
  537. case '05':
  538. return '治疗费'
  539. break
  540. case '06':
  541. return '手术费'
  542. break
  543. case '07':
  544. return '护理费'
  545. break
  546. case '08':
  547. return '材料费'
  548. break
  549. case '09':
  550. return '西药费'
  551. break
  552. case '10':
  553. return '中药饮片费'
  554. break
  555. case '11':
  556. return '中成药费'
  557. break
  558. case '12':
  559. return '一般诊疗费'
  560. break
  561. case '13':
  562. return '挂号费'
  563. break
  564. case '14':
  565. return '其他费'
  566. break
  567. }
  568. },
  569. getAllHisPatientList() {
  570. const params = {
  571. record_date: this.record_date
  572. }
  573. getAllHisPatientList(params).then((response) => {
  574. if (response.data.state == 1) {
  575. this.patientTableData = response.data.data.list
  576. this.patientTableDataTwo = response.data.data.list
  577. let cal_one = 0
  578. let cal_two = 0
  579. for (let i = 0; i < response.data.data.list.length; i++) {
  580. if (
  581. response.data.data.list[i].prescription == null ||
  582. response.data.data.list[i].prescription.length == 0
  583. ) {
  584. cal_one = cal_one + 1
  585. }
  586. if (
  587. response.data.data.list[i].prescription != null &&
  588. response.data.data.list[i].prescription.length > 0
  589. ) {
  590. cal_two = cal_two + 1
  591. }
  592. }
  593. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  594. // console.log(this.patientTableData[0])
  595. // this.choosePatient(this.patientTableData[0])
  596. this.cal_one = cal_one
  597. this.cal_two = cal_two
  598. }
  599. })
  600. },
  601. changePatient(row) {
  602. console.log('row', row)
  603. this.patient_id = row.patient_id
  604. this.record_date = this.record_date
  605. this.prescription_id = this.prescription_id
  606. // var params = {
  607. // patient_id:row.patient_id,
  608. // record_date:this.record_date,
  609. // prescription_id:this.prescription_id,
  610. // }
  611. // getPrescriptionPrint(params).then(response=>{
  612. // if(response.data.state == 1){
  613. // var advicePrint = response.data.data.advicePrint
  614. // console.log("adviceprint",advicePrint)
  615. // this.advicePrint = advicePrint
  616. // // var hisPatient = response.data.data.hisPatient
  617. // // console.log("hispatient",hisPatient)
  618. // // this.hisPatient = hisPatient
  619. // var patient = response.data.data.patient
  620. // console.log("patient",patient)
  621. // this.patient = patient
  622. // var doctorPorject = response.data.data.doctorPorject
  623. // console.log("doctorporject",doctorPorject)
  624. // }
  625. // })
  626. },
  627. getTimes(time) {
  628. return uParseTime(time, '{y}-{m}-{d}')
  629. }, getTotal: function(items) {
  630. let total = 0
  631. for (let i = 0; i < items.length; i++) {
  632. total = Number(total) + Number(parseFloat(items[i].cnt) * parseFloat(items[i].pric))
  633. }
  634. return total.toFixed(2)
  635. },
  636. set10265NewData(details) {
  637. var list = []
  638. for (let a = 0; a < details.length; a++) {
  639. let obj = {}
  640. if(details[a].advice_id > 0 && details[a].project_id == 0) {
  641. obj['yibao_code'] = details[a].advice.drug.medical_insurance_number
  642. obj['yiyuan_code'] = details[a].advice.drug.id
  643. obj['name'] = details[a].advice.advice_name
  644. obj['unit'] = details[a].advice.prescribing_number_unit
  645. 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
  646. obj['count'] = details[a].cnt
  647. obj['price'] = parseFloat(details[a].pric)
  648. obj['total_price'] = parseFloat(details[a].det_item_fee_sumamt)
  649. obj['psn_pay'] = (details[a].selfpay_prop * details[a].det_item_fee_sumamt).toFixed(2)
  650. // obj['yibao_biaozhi'] = details[a].
  651. list.push(obj)
  652. }
  653. if(details[a].advice_id == 0 && details[a].project_id > 0 && details[a].project.type == 2) {
  654. obj['yibao_code'] = details[a].project.project.medical_code
  655. obj['yiyuan_code'] = details[a].project.project.id
  656. obj['name'] = details[a].project.project.project_name
  657. obj['unit'] = details[a].project.project.unit
  658. obj['spec'] = ""
  659. obj['count'] = details[a].cnt
  660. obj['price'] = parseFloat(details[a].pric)
  661. obj['psn_pay'] = (details[a].selfpay_prop * details[a].det_item_fee_sumamt).toFixed(2)
  662. obj['total_price'] = parseFloat(details[a].det_item_fee_sumamt)
  663. list.push(obj)
  664. }
  665. if(details[a].advice_id == 0 && details[a].project_id > 0 && details[a].project.type == 3) {
  666. obj['yibao_code'] = details[a].project.good_info.medical_insurance_number
  667. obj['yiyuan_code'] = details[a].project.good_info.id
  668. obj['name'] = details[a].project.good_info.good_name
  669. obj['unit'] = details[a].project.good_info.packing_unit
  670. obj['spec'] = details[a].project.good_info.specification_name
  671. obj['count'] = details[a].cnt
  672. obj['price'] = parseFloat(details[a].pric)
  673. obj['psn_pay'] = (details[a].selfpay_prop * details[a].det_item_fee_sumamt).toFixed(2)
  674. obj['total_price'] = parseFloat(details[a].det_item_fee_sumamt)
  675. list.push(obj)
  676. }
  677. }
  678. return list
  679. },
  680. searchAction() {
  681. },
  682. getInfo(order_id, obj) {
  683. if (obj.balance_accounts_type == 2) {
  684. let params = {
  685. his_patient_id: obj.his_patient_id,
  686. id: obj.order_id,
  687. order_id: obj.order_id,
  688. admin_user_id: this.$store.getters.xt_user.user.id
  689. }
  690. if (
  691. this.org_id == 10138 ||
  692. this.org_id == 10278
  693. ) {
  694. getPrivateExpenses(params).then((response) => {
  695. if (response.data.state == 0) {
  696. // this.$message.error(response.data.msg)
  697. return false
  698. } else {
  699. this.balanceAccounts = response.data.data
  700. let arr = []
  701. let obj = {
  702. type: 1,
  703. details: [],
  704. total: 0
  705. }
  706. let obj2 = {
  707. type: 2,
  708. details: [],
  709. total: 0
  710. }
  711. let obj3 = {
  712. type: 3,
  713. details: [],
  714. total: 0
  715. }
  716. let num = 0
  717. let obj4 = {
  718. type: 4,
  719. details: [],
  720. total: 0
  721. }
  722. this.balanceAccounts.order_info.map((item) => {
  723. if (item.advice_id > 0) {
  724. obj.details.push(item)
  725. obj.total += item.pric.toFixed(2) * item.advice.prescribing_number
  726. num++
  727. } else {
  728. if (item.project.type == 2) {
  729. obj2.details.push(item)
  730. obj2.total += item.pric * item.project.count
  731. num++
  732. } else {
  733. obj3.details.push(item)
  734. obj3.total += item.pric * item.project.count
  735. num++
  736. }
  737. }
  738. })
  739. if (this.balanceAccounts.new_order_info != null) {
  740. this.balanceAccounts.new_order_info.map((item) => {
  741. obj2.total = obj2.total + item.Total
  742. var newObj = {
  743. pric: parseFloat(item.Total),
  744. project: {
  745. count: 1,
  746. project: {
  747. project_name: item.Name,
  748. unit: ''
  749. }
  750. }
  751. }
  752. obj2.details.push(newObj)
  753. num++
  754. })
  755. }
  756. this.balanceAccounts.new_detail_list = []
  757. this.balanceAccounts.new_detail_list.push(obj)
  758. this.balanceAccounts.new_detail_list.push(obj2)
  759. this.balanceAccounts.new_detail_list.push(obj3)
  760. // this.balanceAccounts.new_detail_list.push(obj4)
  761. console.log(111, this.balanceAccounts)
  762. this.num = num
  763. console.log('this.num', this.num)
  764. }
  765. })
  766. } else if (this.org_id == 10028 || this.org_id == 9504) {
  767. getPrivateExpenses(params).then((response) => {
  768. if (response.data.state == 0) {
  769. // this.$message.error(response.data.msg)
  770. return false
  771. } else {
  772. this.balanceAccounts = response.data.data
  773. let obj = {
  774. type: 1,
  775. details: [],
  776. total: 0
  777. }
  778. let obj2 = {
  779. type: 2,
  780. details: [],
  781. total: 0
  782. }
  783. let obj3 = {
  784. type: 3,
  785. details: [],
  786. total: 0
  787. }
  788. this.balanceAccounts.order_info.map((item) => {
  789. if (item.advice_id > 0) {
  790. obj.details.push(item)
  791. obj.total += item.pric * item.advice.prescribing_number
  792. } else {
  793. if (item.project.type == 2) {
  794. obj2.details.push(item)
  795. obj2.total += item.pric * item.project.count
  796. } else {
  797. obj3.details.push(item)
  798. obj3.total += item.pric * item.project.count
  799. }
  800. }
  801. })
  802. this.balanceAccounts.new_detail_list = []
  803. this.balanceAccounts.new_detail_list.push(obj)
  804. this.balanceAccounts.new_detail_list.push(obj2)
  805. this.balanceAccounts.new_detail_list.push(obj3)
  806. console.log(111, this.balanceAccounts)
  807. }
  808. })
  809. } else {
  810. getPrivateExpensesOrder(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['new_order'] = response.data.data.info
  820. that.info['p_admin'] = that.p_admin
  821. that.info['charge_admin'] = that.charge_admin
  822. that.info['order_number'] = response.data.data.order_number
  823. that.info['patient'] = response.data.data.patient
  824. that.info['date'] = response.data.data.date
  825. that.info['number'] = response.data.data.number
  826. that.info['order_infos'] = response.data.data.order_infos
  827. that.info['diagnosis'] = response.data.data.diagnosis
  828. that.info['fixmedins_name'] = response.data.data.org_name
  829. that.info['fixmedins_code'] = response.data.data.org_code
  830. // that.info["doctor_code"] = response.data.data.doctor_code;
  831. // that.info["department"] = response.data.data.department;
  832. // that.info["health_card_no"] = response.data.data.health_card_no;
  833. that.info['bed_cost_total'] = response.data.data.bedCostTotal
  834. that.info['bed_cost_self_total'] =
  835. response.data.data.bedCostSelfTotal
  836. that.info['bed_cost_part_self_total'] =
  837. response.data.data.bedCostPartSelfTotal
  838. that.info['operation_cost_total'] =
  839. response.data.data.operationCostTotal
  840. that.info['operation_cost_self_total'] =
  841. response.data.data.operationCostSelfTotal
  842. that.info['operation_cost_part_self_total'] =
  843. response.data.data.operationCostPartSelfTotal
  844. that.info['other_cost_total'] = response.data.data.otherCostTotal
  845. that.info['other_cost_self_total'] =
  846. response.data.data.otherCostSelfTotal
  847. that.info['other_cost_part_self_total'] =
  848. response.data.data.otherCostPartSelfTotal
  849. that.info['material_cost_total'] =
  850. response.data.data.materialCostTotal
  851. that.info['material_cost_self_total'] =
  852. response.data.data.materialCostSelfTotal
  853. that.info['material_cost_part_self_total'] =
  854. response.data.data.materialCostPartSelfTotal
  855. that.info['western_medicine_cost_total'] =
  856. response.data.data.westernMedicineCostTotal
  857. that.info['western_medicine_cost_self_total'] =
  858. response.data.data.westernMedicineCostSelfTotal
  859. that.info['western_medicine_cost_part_self_total'] =
  860. response.data.data.westernMedicineCostPartSelfTotal
  861. that.info['chinese_traditional_medicine_cost_total'] =
  862. response.data.data.chineseTraditionalMedicineCostTotal
  863. that.info['chinese_traditional_medicine_cost_self_total'] =
  864. response.data.data.chineseTraditionalMedicineCostSelfTotal
  865. that.info['chinese_traditional_medicine_cost_part_self_total'] =
  866. response.data.data.chineseTraditionalMedicineCostPartSelfTotal
  867. that.info['check_cost_total'] = response.data.data.checkCostTotal
  868. that.info['check_cost_self_total'] =
  869. response.data.data.checkCostSelfTotal
  870. that.info['check_cost_part_self_total'] =
  871. response.data.data.checkCostPartSelfTotal
  872. that.info['laboratory_cost_total'] =
  873. response.data.data.laboratoryCostTotal
  874. that.info['laboratory_cost_self_total'] =
  875. response.data.data.laboratoryCostSelfTotal
  876. that.info['laboratory_cost_part_self_total'] =
  877. response.data.data.laboratoryCostPartSelfTotal
  878. that.info['treat_cost_total'] = response.data.data.treatCostTotal
  879. that.info['treat_cost_self_total'] =
  880. response.data.data.treatCostSelfTotal
  881. that.info['treat_cost_part_self_total'] =
  882. response.data.data.treatCostPartSelfTotal
  883. that.info['date'] = response.data.data.date
  884. that.info['number'] = response.data.data.number
  885. that.info['order_infos'] = response.data.data.order_infos
  886. that.info['diagnosis'] = response.data.data.diagnosis
  887. that.info['his'] = response.data.data.his
  888. that.info['dia_config'] = response.data.data.dia_config
  889. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  890. if (response.data.data.order_infos[i].advice_id > 0 && response.data.data.order_infos[i].project_id == 0) {
  891. response.data.data.order_infos[i].med_chrgitm_type = '09'
  892. }
  893. if (response.data.data.order_infos[i].advice_id == 0 && response.data.data.order_infos[i].project_id > 0) {
  894. if (response.data.data.order_infos[i].project.type == 2) { //项目
  895. if (response.data.data.order_infos[i].project.project.cost_classify == 2) {
  896. response.data.data.order_infos[i].med_chrgitm_type = '05'
  897. } else if (response.data.data.order_infos[i].project.project.cost_classify == 3) {
  898. response.data.data.order_infos[i].med_chrgitm_type = '04'
  899. } else {
  900. response.data.data.order_infos[i].med_chrgitm_type = '14'
  901. }
  902. } else if (response.data.data.order_infos[i].project.type == 3) { //耗材
  903. response.data.data.order_infos[i].med_chrgitm_type = '08'
  904. }
  905. }
  906. }
  907. console.log(response.data.data.order_infos)
  908. console.log(that.info)
  909. var list = []
  910. //获取所有项目类型进行去重
  911. let med_chrgitm_types = []
  912. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  913. med_chrgitm_types.push(response.data.data.order_infos[i].med_chrgitm_type)
  914. }
  915. const obj10 = {}
  916. med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
  917. obj10[next] ? '' : obj10[next] = true && cur.push(next)
  918. return cur
  919. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  920. let tempOrderInfo = []
  921. for (let i = 0; i < med_chrgitm_types.length; i++) {
  922. let obj9 = {
  923. details: [],
  924. med_chrgitm_name: that.getType(med_chrgitm_types[i]),
  925. total:0,
  926. }
  927. // if(med_chrgitm_types[i] == '09'){
  928. // obj.sort = 99
  929. // } else if(med_chrgitm_types[i] == '05'){
  930. // obj.sort = 98
  931. // } else if(med_chrgitm_types[i] == '08'){
  932. // obj.sort = 97
  933. // }else if(med_chrgitm_types[i] == '03'){
  934. // obj.sort = 96
  935. // }
  936. let tempDetails = []
  937. for (let b = 0; b < response.data.data.order_infos.length; b++) {
  938. if (med_chrgitm_types[i] == response.data.data.order_infos[b].med_chrgitm_type) {
  939. tempDetails.push(response.data.data.order_infos[b])
  940. }
  941. }
  942. console.log(med_chrgitm_types[i])
  943. console.log(tempDetails)
  944. obj9.total = that.getTotal(tempDetails)
  945. obj9.details = that.set10265NewData(tempDetails)
  946. list.push(obj9)
  947. }
  948. that.info['new_list'] = list
  949. // list.sort((a,b) => a.sort < b.sort ? 1 : a.sort > b.sort ? -1 : 0)
  950. let obj = {
  951. type: 1,
  952. details: [],
  953. total: 0
  954. }
  955. let obj2 = {
  956. type: 2,
  957. details: [],
  958. total: 0
  959. }
  960. let obj3 = {
  961. type: 3,
  962. details: [],
  963. total: 0
  964. }
  965. let obj4 = {
  966. type: 4,
  967. details: [],
  968. total: 0
  969. }
  970. let num = 0
  971. that.info.order_infos.map((item) => {
  972. if (item.advice_id > 0) {
  973. obj.details.push(item)
  974. obj.total += item.pric * item.advice.prescribing_number
  975. num++
  976. } else {
  977. if (item.project.type == 2) {
  978. obj2.details.push(item)
  979. obj2.total += item.pric * item.project.count
  980. num++
  981. } else {
  982. obj3.details.push(item)
  983. obj3.total += item.pric * item.project.count
  984. num++
  985. }
  986. }
  987. })
  988. // this.info.order_infos.map(item => {
  989. // obj4.total = item.Total
  990. // obj4.details.push(item)
  991. // num++
  992. //
  993. // })
  994. that.info.new_detail_list = []
  995. that.info.new_detail_list.push(obj)
  996. that.info.new_detail_list.push(obj2)
  997. that.info.new_detail_list.push(obj3)
  998. // that.info.new_detail_list.push(obj4)
  999. that.num = num
  1000. if (that.paramsObj.settle_type != 1) {
  1001. that.info.begndate = that.getTimes(that.paramsObj.start_time)
  1002. that.info.enddate = that.getTimes(that.paramsObj.end_time)
  1003. }
  1004. that.info.order_infos.map((item) => {
  1005. })
  1006. }
  1007. })
  1008. }
  1009. } else {
  1010. console.log(this.org_id)
  1011. if (this.org_id == 1111111111) {
  1012. let params = {
  1013. order_id: obj.order_id,
  1014. admin_user_id: this.$store.getters.xt_user.user.id
  1015. }
  1016. getPrivateExpensesTwo(params).then((response) => {
  1017. if (response.data.state == 0) {
  1018. // this.$message.error(response.data.msg)
  1019. return false
  1020. } else {
  1021. var that = this
  1022. that.info = response.data.data.info
  1023. that.p_admin = response.data.data.printor_admin
  1024. that.charge_admin = response.data.data.charge_admin
  1025. that.info['p_admin'] = that.p_admin
  1026. that.info['charge_admin'] = that.charge_admin
  1027. that.info['order_number'] = response.data.data.order_number
  1028. that.info['patient'] = response.data.data.patient
  1029. that.info['date'] = response.data.data.date
  1030. that.info['number'] = response.data.data.number
  1031. that.info['order_infos'] = response.data.data.order_infos
  1032. that.info['diagnosis'] = response.data.data.diagnosis
  1033. that.info['fixmedins_name'] = response.data.data.org_name
  1034. that.info['fixmedins_code'] = response.data.data.org_code
  1035. // that.info["doctor_code"] = response.data.data.doctor_code;
  1036. // that.info["department"] = response.data.data.department;
  1037. // that.info["health_card_no"] = response.data.data.health_card_no;
  1038. that.info['bed_cost_total'] = response.data.data.bedCostTotal
  1039. that.info['bed_cost_self_total'] =
  1040. response.data.data.bedCostSelfTotal
  1041. that.info['bed_cost_part_self_total'] =
  1042. response.data.data.bedCostPartSelfTotal
  1043. that.info['operation_cost_total'] =
  1044. response.data.data.operationCostTotal
  1045. that.info['operation_cost_self_total'] =
  1046. response.data.data.operationCostSelfTotal
  1047. that.info['operation_cost_part_self_total'] =
  1048. response.data.data.operationCostPartSelfTotal
  1049. that.info['other_cost_total'] = response.data.data.otherCostTotal
  1050. that.info['other_cost_self_total'] =
  1051. response.data.data.otherCostSelfTotal
  1052. that.info['other_cost_part_self_total'] =
  1053. response.data.data.otherCostPartSelfTotal
  1054. that.info['material_cost_total'] =
  1055. response.data.data.materialCostTotal
  1056. that.info['material_cost_self_total'] =
  1057. response.data.data.materialCostSelfTotal
  1058. that.info['material_cost_part_self_total'] =
  1059. response.data.data.materialCostPartSelfTotal
  1060. that.info['western_medicine_cost_total'] =
  1061. response.data.data.westernMedicineCostTotal
  1062. that.info['western_medicine_cost_self_total'] =
  1063. response.data.data.westernMedicineCostSelfTotal
  1064. that.info['western_medicine_cost_part_self_total'] =
  1065. response.data.data.westernMedicineCostPartSelfTotal
  1066. that.info['chinese_traditional_medicine_cost_total'] =
  1067. response.data.data.chineseTraditionalMedicineCostTotal
  1068. that.info['chinese_traditional_medicine_cost_self_total'] =
  1069. response.data.data.chineseTraditionalMedicineCostSelfTotal
  1070. that.info['chinese_traditional_medicine_cost_part_self_total'] =
  1071. response.data.data.chineseTraditionalMedicineCostPartSelfTotal
  1072. that.info['check_cost_total'] = response.data.data.checkCostTotal
  1073. that.info['check_cost_self_total'] =
  1074. response.data.data.checkCostSelfTotal
  1075. that.info['check_cost_part_self_total'] =
  1076. response.data.data.checkCostPartSelfTotal
  1077. that.info['laboratory_cost_total'] =
  1078. response.data.data.laboratoryCostTotal
  1079. that.info['laboratory_cost_self_total'] =
  1080. response.data.data.laboratoryCostSelfTotal
  1081. that.info['laboratory_cost_part_self_total'] =
  1082. response.data.data.laboratoryCostPartSelfTotal
  1083. that.info['treat_cost_total'] = response.data.data.treatCostTotal
  1084. that.info['treat_cost_self_total'] =
  1085. response.data.data.treatCostSelfTotal
  1086. that.info['treat_cost_part_self_total'] =
  1087. response.data.data.treatCostPartSelfTotal
  1088. that.info['date'] = response.data.data.date
  1089. // that.info["number"] = response.data.data.number;
  1090. that.info['order_infos'] = response.data.data.order_infos
  1091. that.info['diagnosis'] = response.data.data.diagnosis
  1092. let list = []
  1093. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  1094. let order = response.data.data.order_infos[i]
  1095. let obj = {
  1096. name: '',
  1097. spec: '',
  1098. cnt: '',
  1099. det_item_fee_sumamt: ''
  1100. }
  1101. if (order.advice_id > 0 && order.project_id == 0) {
  1102. obj.name = order.advice.advice_name
  1103. 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
  1104. obj.spec = spec
  1105. obj.cnt = order.cnt
  1106. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1107. list.push(obj)
  1108. } else if (order.advice_id == 0 && order.project_id > 0) {
  1109. if (order.project.type == 2) {
  1110. obj.name = order.project.project.project_name
  1111. obj.spec = ''
  1112. obj.cnt = order.cnt
  1113. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1114. } else {
  1115. obj.name = order.project.good_info.good_name
  1116. obj.spec = order.project.good_info.specification_name
  1117. obj.cnt = order.cnt
  1118. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1119. }
  1120. list.push(obj)
  1121. }
  1122. }
  1123. console.log(list)
  1124. let len = list.length / 2
  1125. let L_list = []
  1126. let R_list = []
  1127. len = Math.trunc(len)
  1128. for (let i = 0; i < len; i++) {
  1129. L_list.push(list[i])
  1130. }
  1131. console.log(len)
  1132. for (let i = len; i < list.length; i++) {
  1133. console.log(list[i])
  1134. R_list.push(list[i])
  1135. }
  1136. console.log(L_list)
  1137. console.log(R_list)
  1138. that.info['L_list'] = L_list
  1139. that.info['R_list'] = R_list
  1140. }
  1141. })
  1142. } else {
  1143. if(this.org_id == 10480){
  1144. let params = {
  1145. order_id: obj.order_id,
  1146. admin_user_id: this.$store.getters.xt_user.user.id
  1147. }
  1148. getPrivateExpensesOrder(params).then((response) => {
  1149. if (response.data.state == 0) {
  1150. // this.$message.error(response.data.msg)
  1151. return false
  1152. } else {
  1153. var that = this
  1154. that.info = response.data.data.info
  1155. that.p_admin = response.data.data.printor_admin
  1156. that.charge_admin = response.data.data.charge_admin
  1157. that.info['new_order'] = response.data.data.info
  1158. that.info['p_admin'] = that.p_admin
  1159. that.info['charge_admin'] = that.charge_admin
  1160. that.info['order_number'] = response.data.data.order_number
  1161. that.info['patient'] = response.data.data.patient
  1162. that.info['date'] = response.data.data.date
  1163. that.info['number'] = response.data.data.number
  1164. that.info['order_infos'] = response.data.data.order_infos
  1165. that.info['diagnosis'] = response.data.data.diagnosis
  1166. that.info['fixmedins_name'] = response.data.data.org_name
  1167. that.info['fixmedins_code'] = response.data.data.org_code
  1168. // that.info["doctor_code"] = response.data.data.doctor_code;
  1169. // that.info["department"] = response.data.data.department;
  1170. // that.info["health_card_no"] = response.data.data.health_card_no;
  1171. that.info['bed_cost_total'] = response.data.data.bedCostTotal
  1172. that.info['bed_cost_self_total'] =
  1173. response.data.data.bedCostSelfTotal
  1174. that.info['bed_cost_part_self_total'] =
  1175. response.data.data.bedCostPartSelfTotal
  1176. that.info['operation_cost_total'] =
  1177. response.data.data.operationCostTotal
  1178. that.info['operation_cost_self_total'] =
  1179. response.data.data.operationCostSelfTotal
  1180. that.info['operation_cost_part_self_total'] =
  1181. response.data.data.operationCostPartSelfTotal
  1182. that.info['other_cost_total'] = response.data.data.otherCostTotal
  1183. that.info['other_cost_self_total'] =
  1184. response.data.data.otherCostSelfTotal
  1185. that.info['other_cost_part_self_total'] =
  1186. response.data.data.otherCostPartSelfTotal
  1187. that.info['material_cost_total'] =
  1188. response.data.data.materialCostTotal
  1189. that.info['material_cost_self_total'] =
  1190. response.data.data.materialCostSelfTotal
  1191. that.info['material_cost_part_self_total'] =
  1192. response.data.data.materialCostPartSelfTotal
  1193. that.info['western_medicine_cost_total'] =
  1194. response.data.data.westernMedicineCostTotal
  1195. that.info['western_medicine_cost_self_total'] =
  1196. response.data.data.westernMedicineCostSelfTotal
  1197. that.info['western_medicine_cost_part_self_total'] =
  1198. response.data.data.westernMedicineCostPartSelfTotal
  1199. that.info['chinese_traditional_medicine_cost_total'] =
  1200. response.data.data.chineseTraditionalMedicineCostTotal
  1201. that.info['chinese_traditional_medicine_cost_self_total'] =
  1202. response.data.data.chineseTraditionalMedicineCostSelfTotal
  1203. that.info['chinese_traditional_medicine_cost_part_self_total'] =
  1204. response.data.data.chineseTraditionalMedicineCostPartSelfTotal
  1205. that.info['check_cost_total'] = response.data.data.checkCostTotal
  1206. that.info['check_cost_self_total'] =
  1207. response.data.data.checkCostSelfTotal
  1208. that.info['check_cost_part_self_total'] =
  1209. response.data.data.checkCostPartSelfTotal
  1210. that.info['laboratory_cost_total'] =
  1211. response.data.data.laboratoryCostTotal
  1212. that.info['laboratory_cost_self_total'] =
  1213. response.data.data.laboratoryCostSelfTotal
  1214. that.info['laboratory_cost_part_self_total'] =
  1215. response.data.data.laboratoryCostPartSelfTotal
  1216. that.info['treat_cost_total'] = response.data.data.treatCostTotal
  1217. that.info['treat_cost_self_total'] =
  1218. response.data.data.treatCostSelfTotal
  1219. that.info['treat_cost_part_self_total'] =
  1220. response.data.data.treatCostPartSelfTotal
  1221. that.info['date'] = response.data.data.date
  1222. that.info['number'] = response.data.data.number
  1223. that.info['order_infos'] = response.data.data.order_infos
  1224. that.info['diagnosis'] = response.data.data.diagnosis
  1225. that.info['his'] = response.data.data.his
  1226. that.info['dia_config'] = response.data.data.dia_config
  1227. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  1228. if (response.data.data.order_infos[i].advice_id > 0 && response.data.data.order_infos[i].project_id == 0) {
  1229. response.data.data.order_infos[i].med_chrgitm_type = '09'
  1230. }
  1231. if (response.data.data.order_infos[i].advice_id == 0 && response.data.data.order_infos[i].project_id > 0) {
  1232. if (response.data.data.order_infos[i].project.type == 2) { //项目
  1233. if (response.data.data.order_infos[i].project.project.cost_classify == 2) {
  1234. response.data.data.order_infos[i].med_chrgitm_type = '05'
  1235. } else if (response.data.data.order_infos[i].project.project.cost_classify == 3) {
  1236. response.data.data.order_infos[i].med_chrgitm_type = '04'
  1237. } else {
  1238. response.data.data.order_infos[i].med_chrgitm_type = '14'
  1239. }
  1240. } else if (response.data.data.order_infos[i].project.type == 3) { //耗材
  1241. response.data.data.order_infos[i].med_chrgitm_type = '08'
  1242. }
  1243. }
  1244. }
  1245. console.log(response.data.data.order_infos)
  1246. console.log(that.info)
  1247. var list = []
  1248. //获取所有项目类型进行去重
  1249. let med_chrgitm_types = []
  1250. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  1251. med_chrgitm_types.push(response.data.data.order_infos[i].med_chrgitm_type)
  1252. }
  1253. const obj10 = {}
  1254. med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
  1255. obj10[next] ? '' : obj10[next] = true && cur.push(next)
  1256. return cur
  1257. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1258. let tempOrderInfo = []
  1259. for (let i = 0; i < med_chrgitm_types.length; i++) {
  1260. let obj9 = {
  1261. details: [],
  1262. med_chrgitm_name: that.getType(med_chrgitm_types[i]),
  1263. total:0,
  1264. }
  1265. // if(med_chrgitm_types[i] == '09'){
  1266. // obj.sort = 99
  1267. // } else if(med_chrgitm_types[i] == '05'){
  1268. // obj.sort = 98
  1269. // } else if(med_chrgitm_types[i] == '08'){
  1270. // obj.sort = 97
  1271. // }else if(med_chrgitm_types[i] == '03'){
  1272. // obj.sort = 96
  1273. // }
  1274. let tempDetails = []
  1275. for (let b = 0; b < response.data.data.order_infos.length; b++) {
  1276. if (med_chrgitm_types[i] == response.data.data.order_infos[b].med_chrgitm_type) {
  1277. tempDetails.push(response.data.data.order_infos[b])
  1278. }
  1279. }
  1280. console.log(med_chrgitm_types[i])
  1281. console.log(tempDetails)
  1282. obj9.total = that.getTotal(tempDetails)
  1283. obj9.details = that.set10265NewData(tempDetails)
  1284. list.push(obj9)
  1285. }
  1286. that.info['new_list'] = list
  1287. // list.sort((a,b) => a.sort < b.sort ? 1 : a.sort > b.sort ? -1 : 0)
  1288. let obj = {
  1289. type: 1,
  1290. details: [],
  1291. total: 0
  1292. }
  1293. let obj2 = {
  1294. type: 2,
  1295. details: [],
  1296. total: 0
  1297. }
  1298. let obj3 = {
  1299. type: 3,
  1300. details: [],
  1301. total: 0
  1302. }
  1303. let obj4 = {
  1304. type: 4,
  1305. details: [],
  1306. total: 0
  1307. }
  1308. let num = 0
  1309. that.info.order_infos.map((item) => {
  1310. if (item.advice_id > 0) {
  1311. obj.details.push(item)
  1312. obj.total += item.pric * item.advice.prescribing_number
  1313. num++
  1314. } else {
  1315. if (item.project.type == 2) {
  1316. obj2.details.push(item)
  1317. obj2.total += item.pric * item.project.count
  1318. num++
  1319. } else {
  1320. obj3.details.push(item)
  1321. obj3.total += item.pric * item.project.count
  1322. num++
  1323. }
  1324. }
  1325. })
  1326. // this.info.order_infos.map(item => {
  1327. // obj4.total = item.Total
  1328. // obj4.details.push(item)
  1329. // num++
  1330. //
  1331. // })
  1332. var funds = []
  1333. for(let i = 0; i < response.data.data.funds.length; i++){
  1334. var objs = {}
  1335. objs["number"] = i + 1
  1336. objs["fund_pay"] = response.data.data.funds[i].fund_payamt
  1337. objs["limit_pay"] = response.data.data.funds[i].inscp_scp_amt
  1338. objs["insp_pay"] = response.data.data.funds[i].inscp_scp_amt
  1339. for(let b = 0; b < that.fundsArray.length; b++){
  1340. if(response.data.data.funds[i].fund_pay_type == that.fundsArray[b].code){
  1341. objs["name"] =that.fundsArray[b].name
  1342. }
  1343. }
  1344. funds.push(objs)
  1345. }
  1346. that.info['funds'] = funds
  1347. console.log(that.info)
  1348. that.info.new_detail_list = []
  1349. that.info.new_detail_list.push(obj)
  1350. that.info.new_detail_list.push(obj2)
  1351. that.info.new_detail_list.push(obj3)
  1352. // that.info.new_detail_list.push(obj4)
  1353. that.num = num
  1354. if (that.paramsObj.settle_type != 1) {
  1355. that.info.begndate = that.getTimes(that.paramsObj.start_time)
  1356. that.info.enddate = that.getTimes(that.paramsObj.end_time)
  1357. }
  1358. that.info.order_infos.map((item) => {
  1359. })
  1360. }
  1361. })
  1362. }else{
  1363. var that = this
  1364. axios
  1365. .get('http://127.0.0.1:9532/api/settle/query', {
  1366. params: {
  1367. order_id: order_id,
  1368. admin_user_id: this.$store.getters.xt_user.user.id
  1369. }
  1370. })
  1371. .then(function(response) {
  1372. if (response.data.state == 0) {
  1373. this.$message.error(response.data.msg)
  1374. return false
  1375. } else {
  1376. console.log(response.data.data.info)
  1377. that.info = response.data.data.info
  1378. that.p_admin = response.data.data.printor_admin
  1379. that.charge_admin = response.data.data.charge_admin
  1380. that.info['psn_cash_pay'] = response.data.data.psn_cash_pay
  1381. that.info['new_order'] = response.data.data.order
  1382. that.info['p_admin'] = that.p_admin
  1383. that.info['charge_admin'] = that.charge_admin
  1384. that.info['order_number'] = response.data.data.order_number
  1385. that.info['patient'] = response.data.data.patient
  1386. that.info['date'] = response.data.data.date
  1387. that.info['number'] = response.data.data.number
  1388. that.info['order_infos'] = response.data.data.order_infos
  1389. that.info['diagnosis'] = response.data.data.diagnosis
  1390. if(that.org_id == 10191){
  1391. that.info['org_code'] = "H36030201006"
  1392. that.info['org_name'] = "萍乡欣瑞怡康血液透析中心"
  1393. }else{
  1394. that.info['org_code'] =response.data.data.org_code
  1395. that.info['org_name'] = response.data.data.org_name
  1396. }
  1397. that.info['doctor_code'] = response.data.data.doctor_code
  1398. that.info['department'] = response.data.data.department
  1399. that.info['health_card_no'] = response.data.data.health_card_no
  1400. that.info['bed_cost_total'] = response.data.data.bedCostTotal
  1401. that.info['bed_cost_self_total'] =
  1402. response.data.data.bedCostSelfTotal
  1403. that.info['bed_cost_part_self_total'] =
  1404. response.data.data.bedCostPartSelfTotal
  1405. that.info['operation_cost_total'] =
  1406. response.data.data.operationCostTotal
  1407. that.info['operation_cost_self_total'] =
  1408. response.data.data.operationCostSelfTotal
  1409. that.info['operation_cost_part_self_total'] =
  1410. response.data.data.operationCostPartSelfTotal
  1411. that.info['other_cost_total'] = response.data.data.otherCostTotal
  1412. that.info['other_cost_self_total'] =
  1413. response.data.data.otherCostSelfTotal
  1414. that.info['other_cost_part_self_total'] =
  1415. response.data.data.otherCostPartSelfTotal
  1416. that.info['material_cost_total'] =
  1417. response.data.data.materialCostTotal
  1418. that.info['material_cost_self_total'] =
  1419. response.data.data.materialCostSelfTotal
  1420. that.info['material_cost_part_self_total'] =
  1421. response.data.data.materialCostPartSelfTotal
  1422. that.info['western_medicine_cost_total'] =
  1423. response.data.data.westernMedicineCostTotal
  1424. that.info['western_medicine_cost_self_total'] =
  1425. response.data.data.westernMedicineCostSelfTotal
  1426. that.info['western_medicine_cost_part_self_total'] =
  1427. response.data.data.westernMedicineCostPartSelfTotal
  1428. that.info['chinese_traditional_medicine_cost_total'] =
  1429. response.data.data.chineseTraditionalMedicineCostTotal
  1430. that.info['chinese_traditional_medicine_cost_self_total'] =
  1431. response.data.data.chineseTraditionalMedicineCostSelfTotal
  1432. that.info['chinese_traditional_medicine_cost_part_self_total'] =
  1433. response.data.data.chineseTraditionalMedicineCostPartSelfTotal
  1434. that.info['check_cost_total'] = response.data.data.checkCostTotal
  1435. that.info['check_cost_self_total'] =
  1436. response.data.data.checkCostSelfTotal
  1437. that.info['check_cost_part_self_total'] =
  1438. response.data.data.checkCostPartSelfTotal
  1439. that.info['laboratory_cost_total'] =
  1440. response.data.data.laboratoryCostTotal
  1441. that.info['laboratory_cost_self_total'] =
  1442. response.data.data.laboratoryCostSelfTotal
  1443. that.info['laboratory_cost_part_self_total'] =
  1444. response.data.data.laboratoryCostPartSelfTotal
  1445. that.info['treat_cost_total'] = response.data.data.treatCostTotal
  1446. that.info['treat_cost_self_total'] =
  1447. response.data.data.treatCostSelfTotal
  1448. that.info['treat_cost_part_self_total'] =
  1449. response.data.data.treatCostPartSelfTotal
  1450. that.info['date'] = response.data.data.date
  1451. that.info['number'] = response.data.data.number
  1452. that.info['order_infos'] = response.data.data.order_infos
  1453. that.info['bedInscpTotal'] =
  1454. response.data.data.bedInscpTotal
  1455. that.info['bedSelfTotal'] =
  1456. response.data.data.bedSelfTotal
  1457. that.info['operationInscpTotal'] =
  1458. response.data.data.operationInscpTotal
  1459. that.info['operationSelfTotal'] =
  1460. response.data.data.operationSelfTotal
  1461. that.info['checkInscpTotal'] =
  1462. response.data.data.checkInscpTotal
  1463. that.info['checkSelfTotal'] =
  1464. response.data.data.checkSelfTotal
  1465. that.info['treatInscpTotal'] =
  1466. response.data.data.treatInscpTotal
  1467. that.info['treatSelfTotal'] =
  1468. response.data.data.treatSelfTotal
  1469. that.info['laboratoryInscpTotal'] =
  1470. response.data.data.laboratoryInscpTotal
  1471. that.info['laboratorySelfTotal'] =
  1472. response.data.data.laboratorySelfTotal
  1473. that.info['westernMedicineInscpTotal'] =
  1474. response.data.data.westernMedicineInscpTotal
  1475. that.info['westernMedicineSelfTotal'] =
  1476. response.data.data.westernMedicineSelfTotal
  1477. that.info['materialInscpTotal'] =
  1478. response.data.data.materialInscpTotal
  1479. that.info['materialSelfTotal'] =
  1480. response.data.data.materialSelfTotal
  1481. that.info['chineseTraditionalInscpTotal'] =
  1482. response.data.data.chineseTraditionalInscpTotal
  1483. that.info['chineseTraditionalSelfTotal'] =
  1484. response.data.data.chineseTraditionalSelfTotal
  1485. that.info['otherInscpTotal'] =
  1486. response.data.data.otherInscpTotal
  1487. that.info['otherSelfTotal'] =
  1488. response.data.data.otherSelfTotal
  1489. that.info['dia_config'] = response.data.data.dia_config
  1490. //org_id 10485,此代码为阳春恒健血液透析中心结算单模版数据处理逻辑
  1491. var list = []
  1492. //获取所有项目类型进行去重
  1493. let med_chrgitm_types = []
  1494. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  1495. med_chrgitm_types.push(response.data.data.order_infos[i].med_chrgitm_type)
  1496. }
  1497. const obj10 = {}
  1498. med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
  1499. obj10[next] ? '' : obj10[next] = true && cur.push(next)
  1500. return cur
  1501. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1502. for (let i = 0; i < med_chrgitm_types.length; i++) {
  1503. let obj9 = {
  1504. details: [],
  1505. med_chrgitm_name: that.getType(med_chrgitm_types[i]),
  1506. total:0,
  1507. }
  1508. let tempDetails = []
  1509. for (let b = 0; b < response.data.data.order_infos.length; b++) {
  1510. if (med_chrgitm_types[i] == response.data.data.order_infos[b].med_chrgitm_type) {
  1511. tempDetails.push(response.data.data.order_infos[b])
  1512. }
  1513. }
  1514. obj9.total = that.getTotal(tempDetails)
  1515. obj9.details = that.set10265NewData(tempDetails)
  1516. list.push(obj9)
  1517. }
  1518. that.info['new_list'] = list
  1519. //org_id 10485,此代码为阳春恒健血液透析中心结算单模版数据处理逻辑
  1520. let obj = {
  1521. type: 1,
  1522. details: [],
  1523. total: 0
  1524. }
  1525. let obj2 = {
  1526. type: 2,
  1527. details: [],
  1528. total: 0
  1529. }
  1530. let obj3 = {
  1531. type: 3,
  1532. details: [],
  1533. total: 0
  1534. }
  1535. let obj4 = {
  1536. type: 4,
  1537. details: [],
  1538. total: 0
  1539. }
  1540. let num = 0
  1541. that.info.order_infos.map((item) => {
  1542. if (item.advice_id > 0) {
  1543. obj.details.push(item)
  1544. obj.total += item.pric * item.advice.prescribing_number
  1545. num++
  1546. } else {
  1547. if (item.project.type == 2) {
  1548. obj2.details.push(item)
  1549. obj2.total += item.pric * item.project.count
  1550. num++
  1551. } else {
  1552. obj3.details.push(item)
  1553. obj3.total += item.pric * item.project.count
  1554. num++
  1555. }
  1556. }
  1557. })
  1558. // this.info.order_infos.map(item => {
  1559. // obj4.total = item.Total
  1560. // obj4.details.push(item)
  1561. // num++
  1562. //
  1563. // })
  1564. that.info.new_detail_list = []
  1565. that.info.new_detail_list.push(obj)
  1566. that.info.new_detail_list.push(obj2)
  1567. that.info.new_detail_list.push(obj3)
  1568. // that.info.new_detail_list.push(obj4)
  1569. that.num = num
  1570. if (that.paramsObj.settle_type != 1) {
  1571. that.info.begndate = that.getTimes(that.paramsObj.start_time)
  1572. that.info.enddate = that.getTimes(that.paramsObj.end_time)
  1573. }
  1574. let list = []
  1575. for (let i = 0; i < response.data.data.order_infos.length; i++) {
  1576. let order = response.data.data.order_infos[i]
  1577. let obj = {
  1578. name: '',
  1579. spec: '',
  1580. cnt: '',
  1581. det_item_fee_sumamt: ''
  1582. }
  1583. if (order.advice_id > 0 && order.project_id == 0) {
  1584. obj.name = order.advice.advice_name
  1585. 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
  1586. obj.spec = spec
  1587. obj.cnt = order.cnt
  1588. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1589. list.push(obj)
  1590. } else if (order.advice_id == 0 && order.project_id > 0) {
  1591. if (order.project.type == 2) {
  1592. obj.name = order.project.project.project_name
  1593. obj.spec = ''
  1594. obj.cnt = order.cnt
  1595. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1596. list.push(obj)
  1597. } else {
  1598. obj.name = order.project.good_info.good_name
  1599. obj.spec = order.project.good_info.specification_name
  1600. obj.cnt = order.cnt
  1601. obj.det_item_fee_sumamt = order.det_item_fee_sumamt
  1602. list.push(obj)
  1603. }
  1604. }
  1605. }
  1606. let len = list.length / 2
  1607. let L_list = []
  1608. let R_list = []
  1609. len = Math.trunc(len)
  1610. for (let i = 0; i < len; i++) {
  1611. L_list.push(list[i])
  1612. }
  1613. for (let i = len; i < list.length; i++) {
  1614. R_list.push(list[i])
  1615. }
  1616. that.info['L_list'] = L_list
  1617. that.info['R_list'] = R_list
  1618. var funds = []
  1619. for(let i = 0; i < response.data.data.funds.length; i++){
  1620. var objs = {}
  1621. objs["number"] = i + 1
  1622. objs["fund_pay"] = response.data.data.funds[i].fund_payamt
  1623. objs["limit_pay"] = response.data.data.funds[i].inscp_scp_amt
  1624. objs["insp_pay"] = response.data.data.funds[i].inscp_scp_amt
  1625. for(let b = 0; b < that.fundsArray.length; b++){
  1626. if(response.data.data.funds[i].fund_pay_type == that.fundsArray[b].code){
  1627. objs["name"] =that.fundsArray[b].name
  1628. }
  1629. }
  1630. funds.push(objs)
  1631. }
  1632. that.info['funds'] = funds
  1633. console.log(that.info)
  1634. }
  1635. })
  1636. .catch(function(error) {
  1637. })
  1638. }
  1639. }
  1640. }
  1641. }
  1642. },
  1643. created() {
  1644. this.org_id = this.$store.getters.xt_user.org_id
  1645. this.getInfo(this.paramsObj.order_id, this.paramsObj)
  1646. },
  1647. watch: {
  1648. paramsObj: {
  1649. //深度监听,可监听到对象、数组的变化
  1650. handler(val, oldVal) {
  1651. this.paramsObj = val
  1652. this.org_id = this.$store.getters.xt_user.org_id
  1653. this.getInfo(this.paramsObj.order_id, this.paramsObj)
  1654. },
  1655. deep: true,
  1656. immediate: true
  1657. }
  1658. }
  1659. }
  1660. </script>
  1661. <style>
  1662. .dialysis-print-order {
  1663. width: 960px;
  1664. margin: 0 auto;
  1665. }
  1666. .dialysis-print-order .order-yy-name {
  1667. margin: auto;
  1668. text-align: center;
  1669. font-size: 20px;
  1670. letter-spacing: 5px;
  1671. }
  1672. .dialysis-print-order .order-title {
  1673. margin: auto;
  1674. font-weight: 600;
  1675. text-align: center;
  1676. font-size: 22px;
  1677. padding: 10px;
  1678. }
  1679. .dialysis-print-order .table-box {
  1680. width: 100%;
  1681. line-height: 23px;
  1682. font-size: 14px;
  1683. }
  1684. .dialysis-print-order .print-table {
  1685. width: 100%;
  1686. text-align: center;
  1687. border-collapse: collapse;
  1688. line-height: 40px;
  1689. font-size: 14px;
  1690. border-color: #000;
  1691. }
  1692. .dialysis-print-order .print-table-no {
  1693. width: 100%;
  1694. text-align: center;
  1695. border-collapse: collapse;
  1696. font-size: 14px;
  1697. }
  1698. .dialysis-print-order .under-line {
  1699. border-bottom: 1px solid #999;
  1700. width: 95%;
  1701. text-align: center;
  1702. margin-left: 2px;
  1703. }
  1704. .dialysis-print-order .title-box {
  1705. text-align: center;
  1706. font-size: 16px;
  1707. }
  1708. .dialysis-print-order .radio-lebel-box {
  1709. font-weight: 400;
  1710. cursor: pointer;
  1711. }
  1712. .dialysis-print-order .radio-no {
  1713. opacity: 0;
  1714. outline: none;
  1715. position: absolute;
  1716. margin: 0;
  1717. width: 0;
  1718. height: 0;
  1719. z-index: -1;
  1720. }
  1721. .dialysis-print-order .radio-inner {
  1722. white-space: nowrap;
  1723. cursor: pointer;
  1724. outline: none;
  1725. display: inline-block;
  1726. line-height: 1;
  1727. position: relative;
  1728. vertical-align: middle;
  1729. }
  1730. .dialysis-print-order .radio-fang {
  1731. display: inline-block;
  1732. position: relative;
  1733. border: 1px solid #000;
  1734. box-sizing: border-box;
  1735. width: 14px;
  1736. height: 14px;
  1737. background-color: #fff;
  1738. z-index: 1;
  1739. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  1740. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  1741. }
  1742. .dialysis-print-order .is-checked-radio::after {
  1743. content: "√";
  1744. font-size: 15px;
  1745. }
  1746. .dialysis-print-order .print-table-no tr td {
  1747. padding: 8px 5px;
  1748. line-height: 25px;
  1749. }
  1750. .dialysis-print-order .print-table tr td {
  1751. padding: 1px 1px;
  1752. /*line-height: 25px;*/
  1753. }
  1754. .es-img {
  1755. height: 30px;
  1756. }
  1757. .advice-name {
  1758. text-align: left;
  1759. }
  1760. .advice-children {
  1761. display: flex;
  1762. }
  1763. .title-box-pro {
  1764. border: 0 #fff;
  1765. line-height: 25px;
  1766. height: 25px;
  1767. text-align: left;
  1768. padding-left: 10px !important;
  1769. }
  1770. .title-box-pro-tr {
  1771. border: 0 #fff;
  1772. }
  1773. .text-align-left {
  1774. text-align: left !important;
  1775. padding-left: 10px !important;
  1776. font-size: 14px !important;
  1777. line-height: 25px;
  1778. }
  1779. .print-table-tr-new td {
  1780. line-height: 20px !important;
  1781. }
  1782. .border-top-solid {
  1783. border: solid 1px #000;
  1784. }
  1785. .print-template-two tr {
  1786. line-height: 30px;
  1787. }
  1788. .table-box1 {
  1789. border: 1px solid #000;
  1790. width: 100%;
  1791. line-height: 30px;
  1792. font-size: 14px;
  1793. border-collapse: collapse;
  1794. }
  1795. .table-box1 tr {
  1796. border-bottom: 1px solid #000;
  1797. }
  1798. </style>
  1799. <style lang="scss">
  1800. .newContainer {
  1801. .dialysisPage::-webkit-scrollbar {
  1802. height: 15px;
  1803. }
  1804. .el-date-editor {
  1805. .el-input__inner {
  1806. padding-right: 0px;
  1807. }
  1808. }
  1809. .el-table td,
  1810. .el-table th {
  1811. text-align: center;
  1812. }
  1813. }
  1814. .newContainer::-webkit-scrollbar {
  1815. height: 15px !important;
  1816. }
  1817. </style>