statementPrint.vue 117KB

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