statementPrint.vue 88KB

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