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

summary.vue 116KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607
  1. <template>
  2. <div class="main-contain outpatientChargesManagement">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <div
  8. style="
  9. display: flex;
  10. justify-content: space-between;
  11. margin-bottom: 10px;
  12. "
  13. >
  14. <div>
  15. <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
  16. <!--@click="Action">-->
  17. <!--导出-->
  18. <!--</el-button>-->
  19. <el-input
  20. size="small"
  21. style="width: 150px"
  22. v-model="keywords"
  23. @input="searchAction"
  24. @keyup.enter.native="searchAction"
  25. class="filter-item"
  26. placeholder="请输入患者姓名"
  27. />
  28. <el-button
  29. size="small"
  30. style="margin-left: 10px"
  31. class="filter-item"
  32. type="primary"
  33. @click="searchAction"
  34. >
  35. 搜索
  36. </el-button>
  37. <el-select
  38. size="small"
  39. v-model="sort_type"
  40. placeholder="请选择"
  41. style="width: 150px; margin-left: 10px"
  42. @change="changeSortType"
  43. >
  44. <el-option
  45. v-for="(item, index) in sort_types"
  46. :key="index"
  47. :label="item.label"
  48. :value="item.value"
  49. >
  50. </el-option>
  51. </el-select>
  52. <el-select v-model="sch_type" placeholder="请选择班次" @change="handleSchType">
  53. <el-option label="全部" value="0"></el-option>
  54. <el-option label="上午" value="1"></el-option>
  55. <el-option label="下午" value="2"></el-option>
  56. <el-option label="晚上" value="3"></el-option>
  57. </el-select>
  58. <el-select v-model="zoneVal" placeholder="请选择分区" style="margin-right:20px;" @change="handleZoneChange">
  59. <el-option
  60. v-for="item in zone_options"
  61. :key="item.id"
  62. :label="item.text"
  63. :value="item.id">
  64. </el-option>
  65. </el-select>
  66. <!-- <el-date-picker
  67. size="small"
  68. v-model="start_time"
  69. prefix-icon="el-icon-date"
  70. @change="handleStartTimeChange"
  71. :editable="false"
  72. :clearable="false"
  73. style="width: 196px; margin-right: 10px"
  74. type="date"
  75. placeholder="选择开始日期"
  76. format="yyyy-MM-dd"
  77. value-format="yyyy-MM-dd"
  78. align="right"
  79. ></el-date-picker>
  80. <el-date-picker
  81. size="small"
  82. v-model="end_time"
  83. prefix-icon="el-icon-date"
  84. @change="handleEndTimeChange"
  85. :editable="false"
  86. :clearable="false"
  87. style="width: 196px; margin-right: 10px"
  88. type="date"
  89. placeholder="选择结束日期"
  90. format="yyyy-MM-dd"
  91. value-format="yyyy-MM-dd"
  92. align="right"
  93. ></el-date-picker> -->
  94. </div>
  95. <!-- 按钮 -->
  96. <div>
  97. <!-- <el-popover
  98. placement="bottom"
  99. width="210"
  100. trigger="click">
  101. <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
  102. <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
  103. <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
  104. </el-popover> -->
  105. <el-button v-if="$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10278 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="batch_print_settlte">批量打印结算单
  106. </el-button>
  107. <el-button size="small" type="primary" @click="export_detail"
  108. >报表下载
  109. </el-button
  110. >
  111. <el-button v-if="$store.getters.xt_user.org_id == 10106 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
  112. <el-button v-if="$store.getters.xt_user.org_id == 10318 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten_two">报表下载3</el-button>
  113. <!-- <el-button size="small" type="primary" @click="export_detail_ten_three">报表下载4</el-button>-->
  114. <!-- <el-button size="small" type="primary" @click="export_detail_two"-->
  115. <!-- >报表下载2-->
  116. <!-- </el-button-->
  117. <!-- >-->
  118. <!-- <el-button size="small" type="primary" @click="export_detail_three">报表下载12</el-button>-->
  119. <!-- <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
  120. <!-- <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
  121. <!-- <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
  122. <!-- <el-button size="small" type="primary" @click="export_detail_tenone">报表下载10</el-button>-->
  123. <!-- <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
  124. </div>
  125. </div>
  126. <div style="margin-bottom: 10px;">
  127. <el-date-picker
  128. size="small"
  129. v-model="start_time"
  130. prefix-icon="el-icon-date"
  131. @change="handleStartTimeChange"
  132. :editable="false"
  133. :clearable="false"
  134. style="width: 196px; "
  135. type="date"
  136. placeholder="选择开始日期"
  137. format="yyyy-MM-dd"
  138. value-format="yyyy-MM-dd"
  139. align="right"
  140. ></el-date-picker>
  141. <span style="text-align: center;">-</span>
  142. <el-date-picker
  143. size="small"
  144. v-model="end_time"
  145. prefix-icon="el-icon-date"
  146. @change="handleEndTimeChange"
  147. :editable="false"
  148. :clearable="false"
  149. style="width: 196px; "
  150. type="date"
  151. placeholder="选择结束日期"
  152. format="yyyy-MM-dd"
  153. value-format="yyyy-MM-dd"
  154. align="right"
  155. ></el-date-picker>
  156. </div>
  157. <el-table
  158. :data="tableData"
  159. border
  160. style="width: 100%"
  161. :row-style="{ color: '#303133' }"
  162. @selection-change="handleSelectionChange"
  163. :header-cell-style="{
  164. backgroundColor: 'rgb(245, 247, 250)',
  165. color: '#606266',
  166. }"
  167. highlight-current-row
  168. >
  169. <el-table-column align="center" type="selection" width="55"></el-table-column>
  170. <el-table-column
  171. prop="date"
  172. label="序号"
  173. width="60"
  174. align="center"
  175. type="index"
  176. >
  177. </el-table-column>
  178. <el-table-column align="center" width="100" prop="name" label="就诊号">
  179. <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
  180. </el-table-column>
  181. <el-table-column align="center" width="90" prop="name" label="患者名字">
  182. <template slot-scope="scope">{{ scope.row.patient.name }}</template>
  183. </el-table-column>
  184. <!--<el-table-column align="center" prop="name" label="患者类型">-->
  185. <!--<template slot-scope="scope"></template>-->
  186. <!--</el-table-column>-->
  187. <el-table-column align="center" width="90" prop="name" label="应收金额">
  188. <template slot-scope="scope">{{
  189. scope.row.medfee_sumamt.toFixed(2)
  190. }}
  191. </template>
  192. </el-table-column>
  193. <el-table-column align="center" width="90" prop="name" label="实收金额">
  194. <template slot-scope="scope">{{
  195. scope.row.reality_price.toFixed(2)
  196. }}
  197. </template>
  198. </el-table-column>
  199. <el-table-column align="center" width="90" prop="name" label="科室">
  200. <template slot-scope="scope">{{
  201. scope.row.department_name
  202. }}
  203. </template>
  204. </el-table-column>
  205. <el-table-column align="center" width="90" prop="name" label="医疗类型">
  206. <template slot-scope="scope">
  207. <div>{{ getMedType(scope.row.med_type) }}</div>
  208. </template>
  209. </el-table-column>
  210. <el-table-column align="center" width="90" prop="name" label="收费类型">
  211. <template slot-scope="scope">
  212. <div v-if="scope.row.his_patient.balance_accounts_type != 2">
  213. 医保
  214. </div>
  215. <div v-if="scope.row.his_patient.balance_accounts_type == 2">
  216. 自费
  217. </div>
  218. </template>
  219. </el-table-column>
  220. <el-table-column
  221. align="center"
  222. width="100"
  223. prop="name"
  224. label="收费日期"
  225. >
  226. <template slot-scope="scope">
  227. {{
  228. scope.row.setl_time
  229. ? scope.row.setl_time
  230. : getTimes(scope.row.settle_accounts_date)
  231. }}
  232. </template>
  233. </el-table-column>
  234. <el-table-column align="center" width="90" prop="name" label="收费员">
  235. <template slot-scope="scope">{{
  236. getName(scope.row.creator)
  237. }}
  238. </template>
  239. </el-table-column>
  240. <el-table-column align="center" width="80" prop="name" label="状态">
  241. <template slot-scope="scope">
  242. <div v-if="scope.row.order_status == 1">待结算</div>
  243. <div v-if="scope.row.order_status == 2">已结算</div>
  244. <div v-if="scope.row.order_status == 3">已退费</div>
  245. </template>
  246. </el-table-column>
  247. <el-table-column align="center" prop="name" label="操作">
  248. <template slot-scope="scope">
  249. <el-button size="mini" type="primary" @click="toDetail(scope.row)"
  250. >详情
  251. </el-button
  252. >
  253. <el-button size="mini" type="primary" @click="toPrint(scope.row)">
  254. 结算单
  255. </el-button>
  256. <el-button v-if="$store.getters.xt_user.org_id == 10191" size="mini" type="primary" @click="tolistPrint(scope.row)">
  257. 结算清单
  258. </el-button>
  259. <el-button
  260. size="mini"
  261. type="primary"
  262. @click="uploadInfo(scope.row)"
  263. v-if="scope.row.order_status == 2 && scope.row.result.id == 0"
  264. >
  265. 上传结算清单
  266. </el-button>
  267. <el-button
  268. size="mini"
  269. type="primary"
  270. @click="confirmUploadInfo(scope.row)"
  271. v-if="$store.getters.xt_user.org_id == 10265"
  272. >
  273. 确认结算清单
  274. </el-button>
  275. <el-button
  276. size="mini"
  277. type="primary"
  278. @click="cancelUploadTwo(scope.row)"
  279. v-if="$store.getters.xt_user.org_id == 10265"
  280. >
  281. 取消结算清单
  282. </el-button>
  283. <el-button
  284. size="mini"
  285. type="primary"
  286. @click="queryData(scope.row)"
  287. v-if="$store.getters.xt_user.org_id == 10265"
  288. >
  289. 查询结算清单
  290. </el-button>
  291. <el-button
  292. size="mini"
  293. type="primary"
  294. @click="cancelUpload(scope.row)"
  295. v-if="$store.getters.xt_user.org_id != 10265 && scope.row.order_status == 2 && scope.row.result.id > 0"
  296. >
  297. 撤销结算清单
  298. </el-button>
  299. <el-button
  300. size="mini"
  301. type="primary"
  302. v-if="
  303. scope.row.order_status == 2 &&
  304. $store.getters.xt_user.org_id == 10106
  305. "
  306. @click="settlementPrint(scope.row)"
  307. >结算单
  308. </el-button>
  309. <el-button size="mini" type="primary" @click="toRefund(scope.row)">
  310. 退费
  311. </el-button>
  312. <el-button
  313. size="mini"
  314. type="primary"
  315. @click="invoicePrint(scope.row)"
  316. >打印发票
  317. </el-button
  318. >
  319. </template>
  320. </el-table-column>
  321. </el-table>
  322. <el-pagination
  323. @size-change="handleSizeChange"
  324. @current-change="handleCurrentChange"
  325. :page-sizes="[10, 50, 100]"
  326. :page-size="10"
  327. :current-page.sync="page"
  328. background
  329. style="margin-top: 20px; float: right"
  330. layout="total, sizes, prev, pager, next, jumper"
  331. :total="total"
  332. >
  333. </el-pagination>
  334. </div>
  335. <el-dialog
  336. class="centerDialog"
  337. width="1200px"
  338. title="打印"
  339. :visible.sync="statementVisible"
  340. >
  341. <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
  342. <new-statement-print
  343. ref="print"
  344. :paramsObj="orderObj"
  345. ></new-statement-print>
  346. </el-dialog>
  347. <!-- 批量打印 -->
  348. <el-dialog
  349. class="centerDialog"
  350. width="1200px"
  351. title="打印"
  352. :visible.sync="batchStatementVisible"
  353. >
  354. <!-- <batchStatementPrint-->
  355. <!-- ref="batchPrint"-->
  356. <!-- :paramsObj="batchOrderObj"-->
  357. <!-- ></batchStatementPrint>-->
  358. <batch-statement-print
  359. ref="batchPrint"
  360. :paramsObj="batchOrderObj"
  361. ></batch-statement-print>
  362. </el-dialog>
  363. <el-dialog
  364. class="centerDialog"
  365. width="1200px"
  366. title="打印"
  367. :visible.sync="statementListVisible"
  368. >
  369. <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
  370. <statement-list-print ref="printlist" :paramsObj='orderObj'></statement-list-print>
  371. </el-dialog>
  372. <el-dialog
  373. class="centerDialog"
  374. width="900px"
  375. title="打印"
  376. :visible.sync="listVisible"
  377. >
  378. <listPrint></listPrint>
  379. </el-dialog>
  380. <el-dialog
  381. class="centerDialog"
  382. width="900px"
  383. title="打印"
  384. :visible.sync="allListVisible"
  385. >
  386. <allListPrint :paramsObj="paramsObj"></allListPrint>
  387. </el-dialog>
  388. <!--<el-dialog-->
  389. <!--class="centerDialog"-->
  390. <!--width="1200px"-->
  391. <!--title="打印"-->
  392. <!--:visible.sync="statementVisible9504">-->
  393. <!--&lt;!&ndash;<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>&ndash;&gt;-->
  394. <!--&lt;!&ndash;<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>&ndash;&gt;-->
  395. <!--<new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>-->
  396. <!--</el-dialog>-->
  397. <el-dialog
  398. class="centerDialog"
  399. width="1200px"
  400. title="打印"
  401. :visible.sync="invoiceVisible"
  402. >
  403. <invoice-print ref="print" :invoiceParams="invoiceParams"></invoice-print>
  404. </el-dialog>
  405. <el-dialog
  406. class="centerDialog"
  407. width="1200px"
  408. title="打印"
  409. :visible.sync="settlementVisible"
  410. >
  411. <settlement-print
  412. ref="print"
  413. :paramsObj="settlementObj"
  414. ></settlement-print>
  415. </el-dialog>
  416. <el-dialog
  417. class="centerDialog"
  418. width="1200px"
  419. title="打印"
  420. :visible.sync="settlementVisible"
  421. >
  422. <settlement-print
  423. ref="print"
  424. :paramsObj="settlementObj"
  425. ></settlement-print>
  426. </el-dialog>
  427. </div>
  428. </template>
  429. <script>
  430. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  431. import {getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund} from "@/api/his/his";
  432. // import NewStatementPrint from './newStatementPrint'
  433. import batchStatementPrint from "./batchStatementPrint.vue";
  434. import NewStatementPrint from "./statementPrint.vue";
  435. import listPrint from "./listPrint";
  436. import allListPrint from "./allListPrint";
  437. import NewStatementPrintTwo from "./newStatementPrintTwo";
  438. import {fetchAllAdminUsers} from "@/api/doctor";
  439. import axios from "axios";
  440. import invoicePrint from "./invoicePrint";
  441. import settlementPrint from "./settlementPrint";
  442. import {jsGetAge, uParseTime} from "@/utils/tools";
  443. const moment = require('moment')
  444. import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo,getAllOrders,exportOrderInfo,handleOne} from "../../api/his/his";
  445. import {handleData10106,handleData10318,handleData10138Two} from "../../api/his/his_export";
  446. import StatementListPrint from "./statementListPrint";
  447. import {
  448. getDialysisRecordInitData
  449. } from '@/api/dialysis_record'
  450. import BatchStatementPrint from './batchStatementPrint'
  451. export default {
  452. name: "OutpatientChargesSummary",
  453. components: {
  454. BatchStatementPrint,
  455. StatementListPrint,
  456. NewStatementPrintTwo,
  457. NewStatementPrint,
  458. BreadCrumb,
  459. listPrint,
  460. allListPrint,
  461. invoicePrint,
  462. settlementPrint,
  463. },
  464. data() {
  465. return {
  466. orderObj: {},
  467. batchOrderObj:{},
  468. zone_options: [
  469. { id: 0, text: '全部分区' }
  470. ],
  471. statementListVisible:false,
  472. statementVisible: false,
  473. batchStatementVisible:false,
  474. statementVisible9504: false,
  475. orderObj9504: {},
  476. crumbs: [
  477. {path: false, name: "门诊收费"},
  478. {path: false, name: "项目消费明细汇总"},
  479. ],
  480. tableData: [],
  481. selecting_schs:[],
  482. limit: 10,
  483. page: 1,
  484. keywords: "",
  485. sch_type:"0",//班次
  486. zoneVal:0,//分区
  487. start_time: moment(new Date()).add('year',0).format("YYYY-MM-DD"),
  488. end_time: moment(new Date()).add('year',0).format("YYYY-MM-DD"),
  489. total: "",
  490. doctors: [],
  491. sort_type: 1,
  492. sort_types: [
  493. {value: 1, label: "处方时间"},
  494. {value: 2, label: "结算时间"},
  495. ],
  496. admin_user_id: "",
  497. listVisible: false,
  498. allListVisible: false,
  499. adminUserOptions: [],
  500. invoiceVisible: false,
  501. paramsObj: {},
  502. invoiceParams: {},
  503. settlementVisible: false,
  504. settlementObj: {},
  505. };
  506. },
  507. //判断列表页是否刷新
  508. beforeRouteEnter(to, from, next) {
  509. console.log(from, "beforeRouteEnter");
  510. if (from.path == "/outpatientCharges/summaryDetail") {
  511. next((vm) => {
  512. vm.page = vm.$store.getters.pagedata.list.page;
  513. vm.limit = vm.$store.getters.pagedata.list.limit;
  514. vm.keywords = vm.$store.getters.pagedata.list.keywords;
  515. vm.start_time = vm.$store.getters.pagedata.list.start_time;
  516. vm.end_time = vm.$store.getters.pagedata.list.end_time;
  517. vm.admin_user_id = vm.$store.getters.pagedata.list.admin_user_id;
  518. vm.p_type = 2;
  519. vm.sort_type = vm.$store.getters.pagedata.list.sort_type;
  520. setTimeout(() => {
  521. vm.getHisOrderList();
  522. }, 300)
  523. });
  524. } else {
  525. next();
  526. }
  527. },
  528. beforeRouteLeave(to, from, next) {
  529. if (to.path == "/outpatientCharges/summaryDetail") {
  530. console.log(to.path, "路由跳转判断");
  531. this.setStorage();
  532. next();
  533. } else {
  534. next();
  535. }
  536. },
  537. created() {
  538. this.getInitData()
  539. this.fetchAllAdminUsers();
  540. this.getDoctorList();
  541. this.getHisOrderList();
  542. },
  543. methods: {
  544. handleSelectionChange(val) {
  545. this.selecting_schs = val
  546. },
  547. handleSchType(val){
  548. this.sch_type = val
  549. this.getHisOrderList()
  550. },
  551. handleZoneChange(val){
  552. this.zoneVal = val
  553. this.getHisOrderList()
  554. },
  555. getInitData: function () {
  556. getDialysisRecordInitData().then((rs) => {
  557. var resp = rs.data;
  558. if (resp.state == 1) {
  559. var zones = resp.data.zones;
  560. var zone_options = [{ id: 0, text: "全部" }];
  561. for (let z_i = 0; z_i < zones.length; z_i++) {
  562. const zone = zones[z_i];
  563. zone_options.push({ id: zone.id, text: zone.name });
  564. }
  565. this.zone_options = zone_options;
  566. } else {
  567. this.$message.error(resp.msg);
  568. }
  569. });
  570. },
  571. setStorage() {
  572. this.$store.commit("SET_PAGEDATA", {
  573. page: this.page,
  574. limit: this.limit,
  575. keywords: this.keywords,
  576. start_time: this.start_time,
  577. end_time: this.end_time,
  578. type: this.admin_user_id || "",
  579. p_type: 2,
  580. sort_type: this.sort_type,
  581. });
  582. },
  583. getMedType(med_type) {
  584. var med_type = parseInt(med_type);
  585. switch (med_type) {
  586. case 11:
  587. return "普通门诊";
  588. break;
  589. case 12:
  590. return "门诊挂号";
  591. break;
  592. case 13:
  593. return "急诊";
  594. break;
  595. case 14:
  596. return "门诊特殊病";
  597. break;
  598. case 15:
  599. return "门诊统筹";
  600. break;
  601. case 16:
  602. return "门诊慢性病";
  603. break;
  604. case 21:
  605. return "普通住院";
  606. break;
  607. }
  608. },
  609. cancelUploadTwo(row){
  610. if(this.$store.getters.xt_user.org_id == 10265){
  611. var that = this;
  612. axios
  613. .get("http://127.0.0.1:9532/api/4102", {
  614. params: {
  615. order_id: row.id,
  616. admin_user_id: this.$store.getters.xt_user.user.id,
  617. stas_type: 0
  618. },
  619. })
  620. .then(function (response) {
  621. if (response.data.state == 0) {
  622. that.$message.error(response.data.msg);
  623. return false;
  624. } else {
  625. if (response.data.data.failed_code == -10) {
  626. // that.$message.error(response.data.data.msg)
  627. that
  628. .$confirm(response.data.data.msg, "医保错误信息", {
  629. confirmButtonText: "确 定",
  630. type: "warning",
  631. })
  632. .then(() => {
  633. })
  634. .catch(() => {
  635. });
  636. } else {
  637. that.$message.success("撤销成功");
  638. row.result.id = 0;
  639. }
  640. }
  641. })
  642. .catch(function (error) {
  643. });
  644. }
  645. },
  646. cancelUpload(row) {
  647. var that = this;
  648. axios
  649. .get("http://127.0.0.1:9532/zh/api/clearsettle", {
  650. params: {
  651. order_id: row.id,
  652. admin_user_id: this.$store.getters.xt_user.user.id,
  653. },
  654. })
  655. .then(function (response) {
  656. if (response.data.state == 0) {
  657. that.$message.error(response.data.msg);
  658. return false;
  659. } else {
  660. if (response.data.data.failed_code == -10) {
  661. // that.$message.error(response.data.data.msg)
  662. that
  663. .$confirm(response.data.data.msg, "医保错误信息", {
  664. confirmButtonText: "确 定",
  665. type: "warning",
  666. })
  667. .then(() => {
  668. })
  669. .catch(() => {
  670. });
  671. } else {
  672. that.$message.success("撤销成功");
  673. row.result.id = 0;
  674. }
  675. }
  676. })
  677. .catch(function (error) {
  678. });
  679. },
  680. uploadInfo(row) {
  681. var that = this;
  682. axios
  683. .get("http://127.0.0.1:9532/api/settlelist/get", {
  684. params: {
  685. order_id: row.id,
  686. admin_user_id: this.$store.getters.xt_user.user.id,
  687. },
  688. })
  689. .then(function (response) {
  690. if (response.data.state == 0) {
  691. that.$message.error(response.data.msg);
  692. return false;
  693. } else {
  694. if (response.data.data.failed_code == -10) {
  695. // that.$message.error(response.data.data.msg)
  696. that
  697. .$confirm(response.data.data.msg, "医保错误信息", {
  698. confirmButtonText: "确 定",
  699. type: "warning",
  700. })
  701. .then(() => {
  702. })
  703. .catch(() => {
  704. });
  705. } else {
  706. that.$message.success("上传成功");
  707. row.result.id = response.data.data.result.id;
  708. }
  709. }
  710. })
  711. .catch(function (error) {
  712. });
  713. },export_detail_zzzz(){
  714. handleTeamData({}).then((response) => {
  715. if (response.data.state == 0) {
  716. this.$message.error(response.data.msg);
  717. return false;
  718. } else {
  719. let list = [];
  720. for (let i = 0; i < response.data.data.ps.length; i++) {
  721. let order = response.data.data.ps[i];
  722. let obj = {
  723. id:order.team_id,
  724. name:order.pn,
  725. sub_id:order.project.id,
  726. sub_name:order.project.project_name
  727. }
  728. list.push(obj)
  729. }
  730. var tarList = [];
  731. for (let i = 0; i < list.length; i++) {
  732. let obj = {
  733. "大项id": list[i].id,
  734. "大项名称": list[i].name,
  735. "子项id": list[i].sub_id,
  736. "子项名称": list[i].sub_name,
  737. }
  738. tarList.push(obj)
  739. }
  740. import("@/vendor/Export2Excel").then((excel) => {
  741. const tHeader = [
  742. "大项id",
  743. "大项名称",
  744. "子项id",
  745. "子项名称",
  746. ];
  747. const filterVal = [
  748. "大项id",
  749. "大项名称",
  750. "子项id",
  751. "子项名称",
  752. ];
  753. const data = this.formatJson(filterVal, tarList);
  754. excel.export_json_to_excel({
  755. header: tHeader,
  756. data,
  757. filename: "消费明细",
  758. });
  759. });
  760. }
  761. });
  762. },
  763. queryData(row){
  764. var that = this;
  765. axios
  766. .get("http://127.0.0.1:9532/api/4103", {
  767. params: {
  768. order_id: row.id,
  769. admin_user_id: this.$store.getters.xt_user.user.id,
  770. },
  771. })
  772. .then(function (response) {
  773. if (response.data.state == 0) {
  774. that.$message.error(response.data.msg);
  775. return false;
  776. } else {
  777. if (response.data.data.failed_code == -10) {
  778. that
  779. .$confirm(response.data.data.msg, "医保错误信息", {
  780. confirmButtonText: "确 定",
  781. type: "warning",
  782. })
  783. .then(() => {
  784. })
  785. .catch(() => {
  786. });
  787. } else {
  788. that
  789. .$confirm(response.data.data.msg, "医保信息", {
  790. confirmButtonText: "确 定",
  791. })
  792. .then(() => {
  793. })
  794. .catch(() => {
  795. });
  796. }
  797. }
  798. })
  799. .catch(function (error) {
  800. });
  801. },
  802. confirmUploadInfo(row){
  803. var that = this;
  804. axios
  805. .get("http://127.0.0.1:9532/api/4102", {
  806. params: {
  807. order_id: row.id,
  808. admin_user_id: this.$store.getters.xt_user.user.id,
  809. stas_type: 1
  810. },
  811. })
  812. .then(function (response) {
  813. if (response.data.state == 0) {
  814. that.$message.error(response.data.msg);
  815. return false;
  816. } else {
  817. if (response.data.data.failed_code == -10) {
  818. that
  819. .$confirm(response.data.data.msg, "医保错误信息", {
  820. confirmButtonText: "确 定",
  821. type: "warning",
  822. })
  823. .then(() => {
  824. })
  825. .catch(() => {
  826. });
  827. } else {
  828. that.$message.success("确认成功");
  829. row.result.id = response.data.data.result.id;
  830. }
  831. }
  832. })
  833. .catch(function (error) {
  834. });
  835. },
  836. fetchAllAdminUsers() {
  837. fetchAllAdminUsers().then((response) => {
  838. if (response.data.state == 1) {
  839. this.adminUserOptions = response.data.data.users;
  840. }
  841. });
  842. },
  843. getName(admin_user_id) {
  844. for (let i = 0; i < this.adminUserOptions.length; i++) {
  845. if (this.adminUserOptions[i].id == admin_user_id) {
  846. return this.adminUserOptions[i].name;
  847. }
  848. }
  849. },
  850. toRefund(row) {
  851. if (row.his_patient.balance_accounts_type == 2) {
  852. this.$confirm("是否退费", "退费", {
  853. confirmButtonText: "确 定",
  854. cancelButtonText: "取 消",
  855. type: "warning",
  856. })
  857. .then(() => {
  858. let params = {
  859. order_id: row.id,
  860. patient_id: row.patient_id,
  861. record_time: this.getTimes(row.settle_accounts_date),
  862. };
  863. Refund(params).then((response) => {
  864. if (response.data.state == 0) {
  865. this.$message.error(response.data.msg);
  866. return false;
  867. } else {
  868. this.$message({message: "退费成功", type: "success"});
  869. this.getHisOrderList();
  870. }
  871. });
  872. })
  873. .catch(() => {
  874. });
  875. } else {
  876. var that = this;
  877. this.$confirm("是否退费", "退费", {
  878. confirmButtonText: "确 定",
  879. cancelButtonText: "取 消",
  880. type: "warning",
  881. })
  882. .then(() => {
  883. let params = {
  884. order_id: row.id,
  885. patient_id: row.patient_id,
  886. record_time: that.getTimes(row.settle_accounts_date),
  887. admin_user_id: that.$store.getters.xt_user.user.id,
  888. };
  889. axios
  890. .get("http://127.0.0.1:9532/api/refund/post", {
  891. params: params,
  892. })
  893. .then(function (response) {
  894. if (response.data.state == 0) {
  895. that.$message.error(response.data.msg);
  896. return false;
  897. } else {
  898. if (response.data.data.failed_code == -10) {
  899. // that.$message.error(response.data.data.msg)
  900. that
  901. .$confirm(response.data.data.msg, "医保错误信息", {
  902. confirmButtonText: "确 定",
  903. type: "warning",
  904. })
  905. .then(() => {
  906. })
  907. .catch(() => {
  908. });
  909. } else {
  910. that.$message({
  911. message: "退费成功",
  912. type: "success",
  913. duration: 5000,
  914. });
  915. that.getHisOrderList();
  916. }
  917. }
  918. })
  919. .catch(function (error) {
  920. });
  921. })
  922. .catch(() => {
  923. });
  924. }
  925. }, tolistPrint(row) {
  926. // if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
  927. // if (row.mdtrt_id.indexOf('H') > -1) {
  928. // this.statementVisible9504 = true
  929. // let obj = {
  930. // order_id: row.id,
  931. // patient_id: row.patient_id,
  932. // record_time: this.getTimes(row.settle_accounts_date),
  933. // admin_user_id: this.$store.getters.xt_user.user.id
  934. // }
  935. // this.orderObj9504 = obj
  936. // } else {
  937. //
  938. // this.statementVisible9504 = true
  939. // let obj = {
  940. // order_id: row.id,
  941. // patient_id: row.patient_id,
  942. // record_time: this.getTimes(row.settle_accounts_date),
  943. // admin_user_id: this.$store.getters.xt_user.user.id,
  944. // balance_accounts_type: 2
  945. // }
  946. // this.orderObj9504 = obj
  947. // }
  948. //
  949. // } else {
  950. this.statementListVisible = true;
  951. let obj = {
  952. order_id: row.id,
  953. settle_type: row.settle_type,
  954. start_time: row.settle_start_time,
  955. end_time: row.settle_end_time,
  956. balance_accounts_type: row.his_patient.balance_accounts_type,
  957. };
  958. this.orderObj = obj;
  959. },
  960. toPrint(row) {
  961. // if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
  962. // if (row.mdtrt_id.indexOf('H') > -1) {
  963. // this.statementVisible9504 = true
  964. // let obj = {
  965. // order_id: row.id,
  966. // patient_id: row.patient_id,
  967. // record_time: this.getTimes(row.settle_accounts_date),
  968. // admin_user_id: this.$store.getters.xt_user.user.id
  969. // }
  970. // this.orderObj9504 = obj
  971. // } else {
  972. //
  973. // this.statementVisible9504 = true
  974. // let obj = {
  975. // order_id: row.id,
  976. // patient_id: row.patient_id,
  977. // record_time: this.getTimes(row.settle_accounts_date),
  978. // admin_user_id: this.$store.getters.xt_user.user.id,
  979. // balance_accounts_type: 2
  980. // }
  981. // this.orderObj9504 = obj
  982. // }
  983. //
  984. // } else {
  985. this.statementVisible = true;
  986. let obj = {
  987. order_id: row.id,
  988. settle_type: row.settle_type,
  989. start_time: row.settle_start_time,
  990. end_time: row.settle_end_time,
  991. balance_accounts_type: row.his_patient.balance_accounts_type,
  992. };
  993. this.orderObj = obj;
  994. },
  995. settlementPrint(row) {
  996. this.settlementVisible = true;
  997. let obj = {
  998. order_id: row.id,
  999. };
  1000. this.settlementObj = obj;
  1001. },
  1002. export_detail_two() {
  1003. let params = {};
  1004. getHisDataTwo(params).then((response) => {
  1005. if (response.data.state == 0) {
  1006. this.$message.error(response.data.msg);
  1007. return false;
  1008. } else {
  1009. let list = [];
  1010. console.log(response.data.data.order)
  1011. for (let i = 0; i < response.data.data.order.length; i++) {
  1012. let order = response.data.data.order[i];
  1013. for (let b = 0; b < order.info.length; b++) {
  1014. let obj = {
  1015. index: b + 1,
  1016. org_name: "肇庆三鹤血液透析中心",
  1017. name: order.psn_name,
  1018. id_card_no: order.certno,
  1019. level: "未定级",
  1020. psn_type: order.psn_type,
  1021. date: "2022年3月",
  1022. start_time: order.his.in_hosptial_time,
  1023. end_time: order.his.out_hosptial_time,
  1024. total: order.info[b].det_item_fee_sumamt,
  1025. fund_total: order.info[b].inscp_scp_amt,
  1026. patient_id: order.info[b].patient_id,
  1027. dialysis_time: this.getTimes(order.info[b].upload_date)
  1028. }
  1029. // if (order.info[b].advice_id > 0 && order.info[b].project_id == 0) {
  1030. // obj["dialysis_time"] = this.getTimes(order.info[b].advice_date)
  1031. // } else if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
  1032. // obj["dialysis_time"] = this.getTimes(order.info[b].record_date)
  1033. // }
  1034. if (order.psn_type == "11") {
  1035. obj["psn_type"] = "职工在职"
  1036. } else if (order.psn_type == "12") {
  1037. obj["psn_type"] = "职工退休"
  1038. } else if (order.psn_type == "13") {
  1039. obj["psn_type"] = "离休"
  1040. } else if (order.psn_type == "14") {
  1041. obj["psn_type"] = "居民医保"
  1042. } else if (order.psn_type == "15") {
  1043. obj["psn_type"] = "居民医保"
  1044. } else if (order.psn_type == "16") {
  1045. obj["psn_type"] = "居民医保"
  1046. }
  1047. list.push(obj)
  1048. }
  1049. }
  1050. console.log(list)
  1051. var new_list = this.unique_two(list)
  1052. for (let i = 0; i < new_list.length; i++) {
  1053. let total = 0
  1054. let fund_total = 0
  1055. for (let b = 0; b < list.length; b++) {
  1056. if (new_list[i].patient_id == list[b].patient_id && new_list[i].dialysis_time == list[b].dialysis_time) {
  1057. total = total + list[b].total
  1058. fund_total = fund_total + list[b].fund_total
  1059. }
  1060. }
  1061. new_list[i].total = total.toFixed(2)
  1062. new_list[i].fund_total = fund_total.toFixed(2)
  1063. }
  1064. console.log(new_list)
  1065. var tarList = [];
  1066. for (let i = 0; i < new_list.length; i++) {
  1067. let obj = {
  1068. "序号": i + 1,
  1069. "医疗机构名称": new_list[i].org_name,
  1070. "姓名": new_list[i].name,
  1071. "身份证号": new_list[i].id_card_no,
  1072. "医院等级": new_list[i].level,
  1073. "参保类型": new_list[i].psn_type,
  1074. "费用所属期": new_list[i].date,
  1075. "开始就医时间": new_list[i].start_time,
  1076. "结束就医时间": new_list[i].end_time,
  1077. "透析日期": new_list[i].dialysis_time,
  1078. "本次透析医疗总金额": new_list[i].total,
  1079. "本次透析医保结算费用金额": new_list[i].fund_total,
  1080. }
  1081. tarList.push(obj)
  1082. }
  1083. import("@/vendor/Export2Excel").then((excel) => {
  1084. const tHeader = [
  1085. "序号",
  1086. "医疗机构名称",
  1087. "姓名",
  1088. "身份证号",
  1089. "医院等级",
  1090. "参保类型",
  1091. "费用所属期",
  1092. "开始就医时间",
  1093. "结束就医时间",
  1094. "透析日期",
  1095. "本次透析医疗总金额",
  1096. "本次透析医保结算费用金额",
  1097. ];
  1098. const filterVal = [
  1099. "序号",
  1100. "医疗机构名称",
  1101. "姓名",
  1102. "身份证号",
  1103. "医院等级",
  1104. "参保类型",
  1105. "费用所属期",
  1106. "开始就医时间",
  1107. "结束就医时间",
  1108. "透析日期",
  1109. "本次透析医疗总金额",
  1110. "本次透析医保结算费用金额",
  1111. ];
  1112. const data = this.formatJson(filterVal, tarList);
  1113. excel.export_json_to_excel({
  1114. header: tHeader,
  1115. data,
  1116. filename: "消费明细",
  1117. });
  1118. });
  1119. }
  1120. });
  1121. },getItemTypeName(order_infos,id,type){
  1122. console.log(type )
  1123. var name = ""
  1124. for(let i = 0; i < order_infos.length;i++){
  1125. if(type == 1){
  1126. if(order_infos[i].advice_id == id){
  1127. name = this.getItemName(order_infos[i].med_chrgitm_type)
  1128. }
  1129. }else{
  1130. if(order_infos[i].project_id == id){
  1131. name = this.getItemName(order_infos[i].med_chrgitm_type)
  1132. }
  1133. }
  1134. }
  1135. return name
  1136. }, getItemName(med_chrgitm_type) {
  1137. switch (med_chrgitm_type) {
  1138. case '01':
  1139. return '床位费'
  1140. break
  1141. case '02':
  1142. return '诊察费'
  1143. break
  1144. case '03':
  1145. return '检查费'
  1146. break
  1147. case '04':
  1148. return '化验费'
  1149. break
  1150. case '05':
  1151. return '治疗费'
  1152. break
  1153. case '06':
  1154. return '手术费'
  1155. break
  1156. case '07':
  1157. return '护理费'
  1158. break
  1159. case '08':
  1160. return '材料费'
  1161. break
  1162. case '09':
  1163. return '西药费'
  1164. break
  1165. case '10':
  1166. return '中药饮片费'
  1167. break
  1168. case '11':
  1169. return '中成药费'
  1170. break
  1171. case '12':
  1172. return '一般诊疗费'
  1173. break
  1174. case '13':
  1175. return '挂号费'
  1176. break
  1177. case '14':
  1178. return '其他费'
  1179. break
  1180. case '0':
  1181. return '其他费'
  1182. break
  1183. }
  1184. },
  1185. export_detail_three() {
  1186. let params = {};
  1187. getHisDataThree(params).then((response) => {
  1188. if (response.data.state == 0) {
  1189. this.$message.error(response.data.msg);
  1190. return false;
  1191. } else {
  1192. let list = [];
  1193. console.log(response.data.data.order)
  1194. for (let i = 0; i < response.data.data.order.length; i++) {
  1195. let order = response.data.data.order[i];
  1196. let data = this.setMonthPrescription(order.info)
  1197. console.log(data)
  1198. for (let b = 0; b < data.length; b++) {
  1199. let obj = {
  1200. name: order.patient.name,
  1201. id_card_no: order.patient.id_card_no,
  1202. year: "2023",
  1203. month: "08",
  1204. code: data[b].code,
  1205. pric: data[b].total ,
  1206. item_name: data[b].name,
  1207. unit: data[b].unit,
  1208. count: data[b].count,
  1209. item_type_name:this.getItemTypeName(order.info, data[b].id,data[b].type),
  1210. pric_two: data[b].pric ,
  1211. }
  1212. if (order.insutype == "310") {
  1213. obj["insutype"] = "职工"
  1214. } else if (order.insutype == "390") {
  1215. obj["insutype"] = "城乡"
  1216. }
  1217. list.push(obj)
  1218. }
  1219. }
  1220. var tarList = []
  1221. for (let i = 0; i < list.length; i++) {
  1222. if (list[i].pric > 0) {
  1223. let obj = {
  1224. "姓名": list[i].name,
  1225. "身份证号": list[i].id_card_no,
  1226. "医保类型": list[i].insutype,
  1227. "年": list[i].year,
  1228. "月": list[i].month,
  1229. "药品编码": list[i].code,
  1230. "费用类型": list[i].item_type_name,
  1231. "名称": list[i].item_name,
  1232. "单位": list[i].unit,
  1233. "数量": list[i].count,
  1234. "金额": list[i].pric,
  1235. "dan": list[i].pric_two,
  1236. }
  1237. tarList.push(obj)
  1238. }
  1239. }
  1240. import("@/vendor/Export2Excel").then((excel) => {
  1241. const tHeader = [
  1242. "姓名",
  1243. "身份证号",
  1244. "医保类型",
  1245. "年",
  1246. "月",
  1247. "药品编码",
  1248. "费用类型",
  1249. "名称",
  1250. "单位",
  1251. "数量",
  1252. "金额",
  1253. "dan",
  1254. ];
  1255. const filterVal = [
  1256. "姓名",
  1257. "身份证号",
  1258. "医保类型",
  1259. "年",
  1260. "月",
  1261. "药品编码",
  1262. "费用类型",
  1263. "名称",
  1264. "单位",
  1265. "数量",
  1266. "金额",
  1267. "dan",
  1268. ];
  1269. const data = this.formatJson(filterVal, tarList);
  1270. excel.export_json_to_excel({
  1271. header: tHeader,
  1272. data,
  1273. filename: "消费明细",
  1274. });
  1275. });
  1276. }
  1277. });
  1278. },
  1279. export_detail_four() {
  1280. let params = {};
  1281. getHisDataFive(params).then((response) => {
  1282. if (response.data.state == 0) {
  1283. this.$message.error(response.data.msg);
  1284. return false;
  1285. } else {
  1286. let list = [];
  1287. for (let i = 0; i < response.data.data.order.length; i++) {
  1288. let order = response.data.data.order[i];
  1289. // console.log(data)
  1290. for (let b = 0; b < order.info.length; b++) {
  1291. let obj = {
  1292. org_name: "生命之源血液透析中心",
  1293. name: order.patient.name,
  1294. id_card_no: order.patient.id_card_no,
  1295. jiuyi_date: this.getTimes(order.settle_accounts_date),
  1296. dianhua: order.patient.phone,
  1297. pric: order.info[b].pric,
  1298. cnt: order.info[b].cnt,
  1299. det_item_fee_sumamt: order.info[b].det_item_fee_sumamt,
  1300. zhenduan: "慢性肾衰竭",
  1301. shifouyibao: "是",
  1302. doctor: "高华",
  1303. jiesuanfangshi: "医保",
  1304. jizhangshijian: order.setl_time,
  1305. feiyongheji: order.medfee_sumamt,
  1306. jizhangjine: order.fund_pay_sumamt,
  1307. xianjinheji: order.psn_cash_pay,
  1308. }
  1309. if (order.is_medicine_insurance == 1) {
  1310. obj.jiesuanfangshi = "是"
  1311. } else {
  1312. obj.jiesuanfangshi = "否"
  1313. }
  1314. if (order.info[b].advice_id > 0 && order.info[b].project_id == 0) {
  1315. obj["yibaomulucode"] = order.info[b].advices.drug.medical_insurance_number
  1316. obj["yibaomuluname"] = order.info[b].advices.drug.drug_name
  1317. obj["neibumulucode"] = order.info[b].advices.drug.id
  1318. obj["neibumuluname"] = order.info[b].advices.drug.drug_name
  1319. }
  1320. if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
  1321. if (order.info[b].project.type == 2) {
  1322. obj["yibaomulucode"] = order.info[b].project.project.medical_code
  1323. obj["yibaomuluname"] = order.info[b].project.project.project_name
  1324. obj["neibumulucode"] = order.info[b].project.project.id
  1325. obj["neibumuluname"] = order.info[b].project.project.project_name
  1326. } else {
  1327. obj["yibaomulucode"] = order.info[b].project.good_info.medical_insurance_number
  1328. obj["yibaomuluname"] = order.info[b].project.good_info.good_name
  1329. obj["neibumulucode"] = order.info[b].project.good_info.id
  1330. obj["neibumuluname"] = order.info[b].project.good_info.good_name
  1331. }
  1332. }
  1333. var thisLen = order.patient.id_card_no.length
  1334. var birth = ''
  1335. if (thisLen == 15) {
  1336. birth = '19' + order.patient.id_card_no.substr(6, 6)
  1337. } else {
  1338. birth = order.patient.id_card_no.substr(6, 8)
  1339. }
  1340. var births =
  1341. birth.substr(0, 4) +
  1342. '-' +
  1343. birth.substr(4, 2) +
  1344. '-' +
  1345. birth.substr(6, 2)
  1346. obj["age"] = jsGetAge(births, '-')
  1347. if (order.patient.gender == 1) {
  1348. obj['gender'] = "男"
  1349. } else {
  1350. obj['gender'] = "女"
  1351. }
  1352. list.push(obj)
  1353. }
  1354. }
  1355. var tarList = []
  1356. for (let i = 0; i < list.length; i++) {
  1357. if (list[i].pric > 0) {
  1358. let obj = {
  1359. "机构编码": list[i].org_name,
  1360. "就诊人姓名": list[i].name,
  1361. "性别": list[i].gender,
  1362. "年龄": list[i].age,
  1363. "身份证号码": list[i].id_card_no,
  1364. "就医日期": list[i].jiuyi_date,
  1365. "电话": list[i].dianhua,
  1366. "医保目录编码": list[i].yibaomulucode,
  1367. "医保目录名称": list[i].yibaomuluname,
  1368. "机构内部编码": list[i].neibumulucode,
  1369. "机构内部名称": list[i].neibumuluname,
  1370. "就诊项目明细": list[i].yibaomuluname,
  1371. "单价": list[i].pric,
  1372. "数量": list[i].cnt,
  1373. "金额": list[i].det_item_fee_sumamt,
  1374. "费用合计": list[i].feiyongheji,
  1375. "记账金额": list[i].jizhangjine,
  1376. "现金合计": list[i].xianjinheji,
  1377. "结算方式": list[i].jiesuanfangshi,
  1378. "接诊医生": list[i].doctor,
  1379. "诊断": list[i].zhenduan,
  1380. "记账时间": list[i].jizhangshijian,
  1381. "是否医保": list[i].shifouyibao,
  1382. }
  1383. tarList.push(obj)
  1384. }
  1385. }
  1386. import("@/vendor/Export2Excel").then((excel) => {
  1387. const tHeader = [
  1388. "机构编码",
  1389. "就诊人姓名",
  1390. "性别",
  1391. "年龄",
  1392. "身份证号码",
  1393. "就医日期",
  1394. "电话",
  1395. "医保目录编码",
  1396. "医保目录名称",
  1397. "机构内部编码",
  1398. "机构内部名称",
  1399. "就诊项目明细",
  1400. "单价",
  1401. "数量",
  1402. "金额",
  1403. "费用合计",
  1404. "记账金额",
  1405. "现金合计",
  1406. "结算方式",
  1407. "接诊医生",
  1408. "诊断",
  1409. "记账时间",
  1410. "是否医保",
  1411. ];
  1412. const filterVal = [
  1413. "机构编码",
  1414. "就诊人姓名",
  1415. "性别",
  1416. "年龄",
  1417. "身份证号码",
  1418. "就医日期",
  1419. "电话",
  1420. "医保目录编码",
  1421. "医保目录名称",
  1422. "机构内部编码",
  1423. "机构内部名称",
  1424. "就诊项目明细",
  1425. "单价",
  1426. "数量",
  1427. "金额",
  1428. "费用合计",
  1429. "记账金额",
  1430. "现金合计",
  1431. "结算方式",
  1432. "接诊医生",
  1433. "诊断",
  1434. "记账时间",
  1435. "是否医保",
  1436. ];
  1437. const data = this.formatJson(filterVal, tarList);
  1438. excel.export_json_to_excel({
  1439. header: tHeader,
  1440. data,
  1441. filename: "消费明细",
  1442. });
  1443. });
  1444. }
  1445. });
  1446. },
  1447. export_detail_five() {
  1448. let params = {};
  1449. getHisDataFive(params).then((response) => {
  1450. if (response.data.state == 0) {
  1451. this.$message.error(response.data.msg);
  1452. return false;
  1453. } else {
  1454. let list = [];
  1455. for (let i = 0; i < response.data.data.order.length; i++) {
  1456. let order = response.data.data.order[i];
  1457. // console.log(data)
  1458. for (let b = 0; b < order.info.length; b++) {
  1459. if (order.info[b].project.project.cost_classify == 3) {
  1460. let obj = {
  1461. p_name: order.psn_name,
  1462. code: order.info[b].project.project.id,
  1463. name: order.info[b].project.project.project_name,
  1464. unit: order.info[b].project.project.unit,
  1465. jiage: order.info[b].det_item_fee_sumamt,
  1466. name_yibao: order.info[b].project.project.project_name,
  1467. guoma: order.info[b].project.project.medical_code,
  1468. zifu: order.info[b].selfpay_prop,
  1469. cnt: order.info[b].cnt,
  1470. pric: order.info[b].pric,
  1471. gerenzifu: order.info[b].fulamt_ownpay_amt + order.info[b].preselfpay_amt,
  1472. baoxiaojine: order.info[b].inscp_scp_amt,
  1473. }
  1474. if (order.info[b].chrgitm_lv == "01") {
  1475. obj["yibao_dengji"] = "甲"
  1476. } else if (order.info[b].chrgitm_lv == "02") {
  1477. obj["yibao_dengji"] = "乙"
  1478. } else {
  1479. obj["yibao_dengji"] = "丙"
  1480. }
  1481. list.push(obj)
  1482. }
  1483. }
  1484. }
  1485. console.log(list)
  1486. var tarList = []
  1487. for (let i = 0; i < list.length; i++) {
  1488. let obj = {
  1489. "姓名": list[i].p_name,
  1490. "医保目录编码": list[i].guoma,
  1491. "名称": list[i].name,
  1492. "单位": list[i].unit,
  1493. "价格": list[i].jiage,
  1494. "医保等级": list[i].yibao_dengji,
  1495. "自付比例": list[i].zifu,
  1496. "数量": list[i].cnt,
  1497. "金额": list[i].pric,
  1498. "个人自付": list[i].gerenzifu,
  1499. "报销金额": list[i].baoxiaojine,
  1500. }
  1501. tarList.push(obj)
  1502. }
  1503. import("@/vendor/Export2Excel").then((excel) => {
  1504. const tHeader = [
  1505. "姓名",
  1506. "医保目录编码",
  1507. "名称",
  1508. "单位",
  1509. "价格",
  1510. "医保等级",
  1511. "自付比例",
  1512. "数量",
  1513. "金额",
  1514. "个人自付",
  1515. "报销金额",
  1516. ];
  1517. const filterVal = [
  1518. "姓名",
  1519. "医保目录编码",
  1520. "名称",
  1521. "单位",
  1522. "价格",
  1523. "医保等级",
  1524. "自付比例",
  1525. "数量",
  1526. "金额",
  1527. "个人自付",
  1528. "报销金额",
  1529. ];
  1530. const data = this.formatJson(filterVal, tarList);
  1531. excel.export_json_to_excel({
  1532. header: tHeader,
  1533. data,
  1534. filename: "消费明细",
  1535. });
  1536. });
  1537. }
  1538. });
  1539. },
  1540. export_detail_six() {
  1541. let params = {};
  1542. getHisDataSix(params).then((response) => {
  1543. if (response.data.state == 0) {
  1544. this.$message.error(response.data.msg);
  1545. return false;
  1546. } else {
  1547. let list = [];
  1548. let new_list = [];
  1549. for (let i = 0; i < response.data.data.order.length; i++) {
  1550. let order = response.data.data.order[i];
  1551. for (let b = 0; b < order.info.length; b++) {
  1552. new_list.push(order.info[b])
  1553. }
  1554. }
  1555. var infos = this.setMonthPrescriptiontwo(new_list)
  1556. for (let b = 0; b < infos.length; b++) {
  1557. list.push(infos[b])
  1558. }
  1559. var tarList = []
  1560. for (let i = 0; i < list.length; i++) {
  1561. let obj = {
  1562. "周期": "2022年第二季度",
  1563. "类别": "门诊",
  1564. "医保目录编码": list[i].code,
  1565. "医保目录名称": list[i].name,
  1566. "本机构目录编码": list[i].code,
  1567. "本机构目录名称": list[i].name,
  1568. "使用例数": list[i].count,
  1569. "价格": list[i].price,
  1570. }
  1571. tarList.push(obj)
  1572. }
  1573. import("@/vendor/Export2Excel").then((excel) => {
  1574. const tHeader = [
  1575. "周期",
  1576. "类别",
  1577. "医保目录编码",
  1578. "医保目录名称",
  1579. "本机构目录编码",
  1580. "本机构目录名称",
  1581. "使用例数",
  1582. "价格",
  1583. ];
  1584. const filterVal = [
  1585. "周期",
  1586. "类别",
  1587. "医保目录编码",
  1588. "医保目录名称",
  1589. "本机构目录编码",
  1590. "本机构目录名称",
  1591. "使用例数",
  1592. "价格",
  1593. ];
  1594. const data = this.formatJson(filterVal, tarList);
  1595. excel.export_json_to_excel({
  1596. header: tHeader,
  1597. data,
  1598. filename: "消费明细",
  1599. });
  1600. });
  1601. }
  1602. });
  1603. }, export_detail_ten_four() {
  1604. let params = {
  1605. start_time:"2022-01-01",
  1606. end_time:"2022-04-30",
  1607. };
  1608. handleOne(params).then((response) => {
  1609. if (response.data.state == 0) {
  1610. this.$message.error(response.data.msg);
  1611. return false;
  1612. } else {
  1613. let new_orders = []
  1614. let new_orders_3663 = []
  1615. let new_orders_4059 = []
  1616. let new_orders_4039 = []
  1617. for (let i = 0; i < response.data.data.order.length; i++) {
  1618. let order = response.data.data.order[i];
  1619. for(let b= 0; b< order.info.length; b++){
  1620. order.info[b]['new_order'] = order
  1621. order.info[b]['new_date'] = this.getTime(order.info[b].pre_time,"{y}-{m}")
  1622. new_orders.push(order.info[b])
  1623. }
  1624. }
  1625. let new_list_four = []
  1626. for (let i = 0; i < new_orders.length; i++) {
  1627. let order = new_orders[i];
  1628. new_list_four.push(order.p_info)
  1629. }
  1630. const obj111 = {}
  1631. new_list_four = new_list_four.reduce((cur, next) => {
  1632. obj111[next.id] ? '' : obj111[next.id] = true && cur.push(next)
  1633. return cur
  1634. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1635. let new_list_six = []
  1636. for (let i = 0; i < new_list_four.length; i++) {
  1637. let order = new_list_four[i];
  1638. let obj = {
  1639. p_id:order.id,
  1640. patient_id:order.patient_id,
  1641. cur_date:this.getTime(order.record_date,"{y}-{m}"),
  1642. list:[],
  1643. }
  1644. for(let b = 0; b < new_orders.length; b++){
  1645. if(order.id == new_orders[b].p_info.id){
  1646. obj.list.push(new_orders[b])
  1647. }
  1648. }
  1649. new_list_six.push(obj)
  1650. }
  1651. console.log(new_list_six)
  1652. for (let i = 0; i < new_list_six.length; i++) {
  1653. let order = new_list_six[i];
  1654. let islvguo = false
  1655. for (let b = 0; b < order.list.length; b++) {
  1656. for(let c = 0 ; c < order.list[b].project.length; c++){
  1657. if (order.list[b].project[c].project.id == 78 && order.list[b].project[c].project.id != 79 && order.list[b].project[c].project.id!= 1074) {
  1658. islvguo = true
  1659. }
  1660. }
  1661. }
  1662. if(islvguo){
  1663. new_orders_3663.push(order)
  1664. }
  1665. }
  1666. console.log(new_orders_3663)
  1667. for (let i = 0; i < new_list_six.length; i++) {
  1668. let order = new_list_six[i];
  1669. let islvguo = false
  1670. for (let b = 0; b < order.list.length; b++) {
  1671. for(let c = 0 ; c < order.list[b].project.length; c++){
  1672. if (order.list[b].project[c].project.id == 1074 && order.list[b].project[c].project.id != 78 && order.list[b].project[c].project.id!= 79) {
  1673. islvguo = true
  1674. }
  1675. }
  1676. }
  1677. if(islvguo){
  1678. new_orders_4059.push(order)
  1679. }
  1680. }
  1681. console.log(new_orders_4059)
  1682. for (let i = 0; i < new_list_six.length; i++) {
  1683. let order = new_list_six[i];
  1684. let islvguo = false
  1685. for (let b = 0; b < order.list.length; b++) {
  1686. for(let c = 0 ; c < order.list[b].project.length; c++){
  1687. if (order.list[b].project[c].project.id == 79 && order.list[b].project[c].project.id != 78 && order.list[b].project[c].project.id!= 1074) {
  1688. islvguo = true
  1689. }
  1690. }
  1691. }
  1692. if(islvguo){
  1693. new_orders_4039.push(order)
  1694. }
  1695. }
  1696. console.log(new_orders_4039)
  1697. var months_3663 = []
  1698. for(let i = 0; i < new_orders_3663.length;i++){
  1699. months_3663.push(new_orders_3663[i].cur_date)
  1700. }
  1701. const obj = {}
  1702. months_3663 = months_3663.reduce((cur, next) => {
  1703. obj[next] ? '' : obj[next] = true && cur.push(next)
  1704. return cur
  1705. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1706. var months_4039 = []
  1707. for(let i = 0; i < new_orders_4039.length;i++){
  1708. months_4039.push(new_orders_4039[i].cur_date)
  1709. }
  1710. const obj2 = {}
  1711. months_4039 = months_4039.reduce((cur, next) => {
  1712. obj2[next] ? '' : obj2[next] = true && cur.push(next)
  1713. return cur
  1714. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1715. var months_4059 = []
  1716. for(let i = 0; i < new_orders_4059.length;i++){
  1717. months_4059.push(new_orders_4059[i].cur_date)
  1718. }
  1719. const obj3 = {}
  1720. months_4059 = months_4059.reduce((cur, next) => {
  1721. obj3[next] ? '' : obj3[next] = true && cur.push(next)
  1722. return cur
  1723. }, [])
  1724. // 设置cur默认类型为数组,并且初始值为空的数组
  1725. let new_list = []
  1726. for(let i = 0; i < months_3663.length;i++) {
  1727. let obj = {
  1728. cus_date:months_3663[i],
  1729. info:[]
  1730. }
  1731. for (let b = 0; b < new_orders_3663.length; b++) {
  1732. if(months_3663[i] == new_orders_3663[b].cur_date){
  1733. obj.info.push(new_orders_3663[b])
  1734. }
  1735. }
  1736. new_list.push(obj)
  1737. }
  1738. let new_list_two = []
  1739. for(let i = 0; i < months_4039.length;i++) {
  1740. let obj = {
  1741. cus_date:months_4039[i],
  1742. info:[]
  1743. }
  1744. for (let b = 0; b < new_orders_4039.length; b++) {
  1745. if(months_4039[i] == new_orders_4039[b].cur_date){
  1746. obj.info.push(new_orders_4039[b])
  1747. }
  1748. }
  1749. new_list_two.push(obj)
  1750. }
  1751. let new_list_three = []
  1752. for(let i = 0; i < months_4059.length;i++) {
  1753. let obj = {
  1754. cus_date:months_4059[i],
  1755. info:[]
  1756. }
  1757. for (let b = 0; b < new_orders_4059.length; b++) {
  1758. if(months_4059[i] == new_orders_4059[b].cur_date){
  1759. obj.info.push(new_orders_4059[b])
  1760. }
  1761. }
  1762. new_list_three.push(obj)
  1763. }
  1764. console.log(new_list)
  1765. console.log(new_list_two)
  1766. console.log(new_list_three)
  1767. var list_one = []
  1768. var list_two = []
  1769. var list_three = []
  1770. for(let b = 0; b < new_list.length; b++){
  1771. let obj = {
  1772. cur_date:new_list[b].cus_date,
  1773. order_info:[],
  1774. info_length:new_list[b].info.length
  1775. }
  1776. for(let c = 0; c < new_list[b].info.length; c++) {
  1777. for(let d = 0; d < new_list[b].info[c].list.length; d++) {
  1778. if(new_list[b].info[c].list[d].advices.length > 0 && new_list[b].info[c].list[d].project.length == 0 ){
  1779. for(let e = 0; e < new_list[b].info[c].list[d].advices.length; e++) {
  1780. obj.order_info.push(new_list[b].info[c].list[d].advices[e].order_info)
  1781. }
  1782. }
  1783. if(new_list[b].info[c].list[d].advices.length == 0 && new_list[b].info[c].list[d].project.length > 0 ){
  1784. for(let e = 0; e < new_list[b].info[c].list[d].project.length; e++) {
  1785. obj.order_info.push(new_list[b].info[c].list[d].project[e].order_info)
  1786. }
  1787. }
  1788. }
  1789. }
  1790. list_one.push(obj)
  1791. }
  1792. for(let b = 0; b < new_list_two.length; b++){
  1793. let obj = {
  1794. cur_date:new_list_two[b].cus_date,
  1795. order_info:[],
  1796. info_length:new_list_two[b].info.length
  1797. }
  1798. for(let c = 0; c < new_list_two[b].info.length; c++) {
  1799. for(let d = 0; d < new_list_two[b].info[c].list.length; d++) {
  1800. if(new_list_two[b].info[c].list[d].advices.length > 0 && new_list_two[b].info[c].list[d].project.length == 0 ){
  1801. for(let e = 0; e < new_list_two[b].info[c].list[d].advices.length; e++) {
  1802. obj.order_info.push(new_list_two[b].info[c].list[d].advices[e].order_info)
  1803. }
  1804. }
  1805. if(new_list_two[b].info[c].list[d].advices.length == 0 && new_list_two[b].info[c].list[d].project.length > 0 ){
  1806. for(let e = 0; e < new_list_two[b].info[c].list[d].project.length; e++) {
  1807. obj.order_info.push(new_list_two[b].info[c].list[d].project[e].order_info)
  1808. }
  1809. }
  1810. }
  1811. }
  1812. list_two.push(obj)
  1813. }
  1814. for(let b = 0; b < new_list_three.length; b++){
  1815. let obj = {
  1816. cur_date:new_list_three[b].cus_date,
  1817. order_info:[],
  1818. info_length:new_list_three[b].info.length
  1819. }
  1820. for(let c = 0; c < new_list_three[b].info.length; c++) {
  1821. for(let d = 0; d < new_list_three[b].info[c].list.length; d++) {
  1822. if(new_list_three[b].info[c].list[d].advices.length > 0 && new_list_three[b].info[c].list[d].project.length == 0 ){
  1823. for(let e = 0; e < new_list_three[b].info[c].list[d].advices.length; e++) {
  1824. obj.order_info.push(new_list_three[b].info[c].list[d].advices[e].order_info)
  1825. }
  1826. }
  1827. if(new_list_three[b].info[c].list[d].advices.length == 0 && new_list_three[b].info[c].list[d].project.length > 0 ){
  1828. for(let e = 0; e < new_list_three[b].info[c].list[d].project.length; e++) {
  1829. obj.order_info.push(new_list_three[b].info[c].list[d].project[e].order_info)
  1830. }
  1831. }
  1832. }
  1833. }
  1834. list_three.push(obj)
  1835. }
  1836. console.log(list_one)
  1837. console.log(list_two)
  1838. console.log(list_three)
  1839. // list_one = []
  1840. // list_one = list_two
  1841. // list_one = []
  1842. // list_one = list_three
  1843. var tarList = []
  1844. for (let i = 0; i < list_one.length; i++) {
  1845. let obj = {
  1846. "年月": list_one[i].cur_date,
  1847. "总人数": this.getTotalOneOne(list_one[i].order_info),
  1848. "总人次": list_one[i].info_length,
  1849. "总费用": this.getTotalOne(list_one[i].order_info),
  1850. "总治疗费": this.getTotalTwo(list_one[i].order_info),
  1851. "总材料费": this.getTotalThree(list_one[i].order_info),
  1852. "总检查检验费": this.getTotalFour(list_one[i].order_info),
  1853. "总药品费": this.getTotalFive(list_one[i].order_info),
  1854. "人均费用": this.getTotalOne(list_one[i].order_info) / this.getTotalOneOne(list_one[i].order_info),
  1855. "次均费用": this.getTotalOne(list_one[i].order_info) / list_one[i].info_length,
  1856. "次均治疗费": this.getTotalTwo(list_one[i].order_info) / list_one[i].info_length,
  1857. "次均材料费": this.getTotalThree(list_one[i].order_info) / list_one[i].info_length,
  1858. "次均检查检验费": this.getTotalFour(list_one[i].order_info) / list_one[i].info_length,
  1859. "次均药品费":this.getTotalFive(list_one[i].order_info) / list_one[i].info_length,
  1860. }
  1861. tarList.push(obj)
  1862. }
  1863. }
  1864. import("@/vendor/Export2Excel").then((excel) => {
  1865. const tHeader = [
  1866. "年月",
  1867. "总人数",
  1868. "总人次",
  1869. "总费用",
  1870. "总治疗费",
  1871. "总材料费",
  1872. "总检查检验费",
  1873. "总药品费",
  1874. "人均费用",
  1875. "次均费用",
  1876. "次均治疗费",
  1877. "次均材料费",
  1878. "次均检查检验费",
  1879. "次均药品费",
  1880. ];
  1881. const filterVal = [
  1882. "年月",
  1883. "总人数",
  1884. "总人次",
  1885. "总费用",
  1886. "总治疗费",
  1887. "总材料费",
  1888. "总检查检验费",
  1889. "总药品费",
  1890. "人均费用",
  1891. "次均费用",
  1892. "次均治疗费",
  1893. "次均材料费",
  1894. "次均检查检验费",
  1895. "次均药品费",
  1896. ];
  1897. const data = this.formatJson(filterVal, tarList);
  1898. excel.export_json_to_excel({
  1899. header: tHeader,
  1900. data,
  1901. filename: "消费明细",
  1902. });
  1903. });
  1904. });
  1905. },getTotalOneOne(order_info){
  1906. var patient_ids = []
  1907. for(var i = 0; i < order_info.length; i++){
  1908. patient_ids.push(order_info[i].patient_id)
  1909. }
  1910. const obj2 = {}
  1911. patient_ids = patient_ids.reduce((cur, next) => {
  1912. obj2[next] ? '' : obj2[next] = true && cur.push(next)
  1913. return cur
  1914. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1915. return patient_ids.length
  1916. },getTotalOneTwo(order_info){
  1917. let total = 0
  1918. for(var i = 0;i < order_info.length; i++){
  1919. total = total + order_info[i].det_item_fee_sumamt
  1920. }
  1921. return total.toFixed(2)
  1922. },getTotalOne(order_info){
  1923. let total = 0
  1924. for(var i = 0;i < order_info.length; i++){
  1925. total = total + order_info[i].det_item_fee_sumamt
  1926. }
  1927. return total.toFixed(2)
  1928. },getTotalTwo(order_info){
  1929. let total = 0
  1930. for(var i = 0;i < order_info.length; i++){
  1931. if(order_info[i].med_chrgitm_type == "05") {
  1932. total = total + order_info[i].det_item_fee_sumamt
  1933. }
  1934. }
  1935. return total.toFixed(2)
  1936. },getTotalThree(order_info){
  1937. let total = 0
  1938. for(var i = 0;i < order_info.length; i++){
  1939. if(order_info[i].med_chrgitm_type == "08") {
  1940. total = total + order_info[i].det_item_fee_sumamt
  1941. }
  1942. }
  1943. return total.toFixed(2)
  1944. },getTotalFour(order_info){
  1945. let total = 0
  1946. for(var i = 0;i < order_info.length; i++){
  1947. if(order_info[i].med_chrgitm_type == "03" || order_info[i].med_chrgitm_type == "04") {
  1948. total = total + order_info[i].det_item_fee_sumamt
  1949. }
  1950. }
  1951. return total.toFixed(2)
  1952. },getTotalFive(order_info){
  1953. let total = 0
  1954. for(var i = 0;i < order_info.length; i++){
  1955. if(order_info[i].med_chrgitm_type == "09" || order_info[i].med_chrgitm_type == "10" || order_info[i].med_chrgitm_type == "11" ) {
  1956. total = total + order_info[i].det_item_fee_sumamt
  1957. }
  1958. }
  1959. return total.toFixed(2)
  1960. },getTotalSix(order_info){
  1961. },getTotalSeven(order_info){
  1962. },getTotalEigth(order_info){
  1963. },getTotalNine(order_info){
  1964. },getTotalTen(order_info){
  1965. },getTotalTenOne(order_info){
  1966. },
  1967. export_detail_seven() {
  1968. let params = {};
  1969. handleData10106(params).then((response) => {
  1970. if (response.data.state == 0) {
  1971. this.$message.error(response.data.msg);
  1972. return false;
  1973. } else {
  1974. let new_orders = []
  1975. for (let i = 0; i < response.data.data.order.length; i++) {
  1976. let order = response.data.data.order[i];
  1977. let islvguo = false
  1978. for (let b = 0; b < order.info.length; b++) {
  1979. if (order.info[b].project.project.id == 372) {
  1980. islvguo = true
  1981. }
  1982. }
  1983. if(islvguo){
  1984. new_orders.push(order)
  1985. }
  1986. }
  1987. console.log(new_orders.length)
  1988. let list = [];
  1989. for (let i = 0; i < new_orders.length; i++) {
  1990. let order = response.data.data.order[i];
  1991. let obj = {
  1992. md: order.mdtrt_id,
  1993. name: order.patient.name,
  1994. kaichu: this.getTimes(order.settle_start_time),
  1995. xianzhong: "",
  1996. yingshou: order.medfee_sumamt,
  1997. yibaotongchou: order.hifp_pay,
  1998. dabingjijin: order.hifmi_pay,
  1999. yiliaojiuzhu: order.maf_pay,
  2000. gongwujijin: order.cvlserv_pay,
  2001. gerenzhifu: order.psn_part_amt,
  2002. zongjine: order.medfee_sumamt,
  2003. setl_time: order.setl_time,
  2004. jiesuanleixing: '医保',
  2005. xueyetouxilvguo: 480,
  2006. lvhuana: 3,
  2007. zhihuanguan: 40,
  2008. good_name: "",
  2009. }
  2010. if (order.insutype == "390") {
  2011. obj.xianzhong = "城乡"
  2012. } else {
  2013. obj.xianzhong = "职工"
  2014. }
  2015. for (let b = 0; b < order.info.length; b++) {
  2016. if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
  2017. if (order.info[b].project.type == 2) {
  2018. if (order.info[b].project.project.id == 254 || order.info[b].project.project.id == 253 || order.info[b].project.project.id == 250 || order.info[b].project.project.id == 249) {
  2019. obj.good_name = this.GetGoodName(order.info[b].project.project.id)
  2020. }
  2021. } else if (order.info[b].project.type == 3) {
  2022. if (order.info[b].project.project.id == 1478 || order.info[b].project.project.id == 1479 || order.info[b].project.project.id == 1482 || order.info[b].project.project.id == 1483 || order.info[b].project.project.id == 2577 || order.info[b].project.project.id == 2578 || order.info[b].project.project.id == 2058 || order.info[b].project.project.id == 2059) {
  2023. obj.good_name = this.GetGoodName(order.info[b].project.good_info.id)
  2024. }
  2025. }
  2026. }
  2027. }
  2028. list.push(obj)
  2029. }
  2030. var tarList = []
  2031. for (let i = 0; i < list.length; i++) {
  2032. if (list[i].good_name.length > 0) {
  2033. let obj = {
  2034. "序号": i + 1,
  2035. "就诊号": list[i].md,
  2036. "患者姓名": list[i].name,
  2037. "开处时间": list[i].kaichu,
  2038. "项目(透析器)": list[i].good_name,
  2039. "血液透析滤过": list[i].xueyetouxilvguo,
  2040. "0.9%氯化钠注射液": list[i].lvhuana,
  2041. "置换液管": list[i].zhihuanguan,
  2042. "险种类型": list[i].xianzhong,
  2043. "应收金额": list[i].yingshou,
  2044. "医保统筹金额": list[i].yibaotongchou,
  2045. "大病基金金额": list[i].dabingjijin,
  2046. "医疗救助金额": list[i].yiliaojiuzhu,
  2047. "公务员基金": list[i].gongwujijin,
  2048. "个人支付基金": list[i].gerenzhifu,
  2049. "总金额": list[i].zongjine,
  2050. "收费时间": list[i].setl_time,
  2051. "结算类型": list[i].jiesuanleixing,
  2052. "收费状态": "已收费",
  2053. }
  2054. tarList.push(obj)
  2055. }
  2056. }
  2057. import("@/vendor/Export2Excel").then((excel) => {
  2058. const tHeader = [
  2059. "序号",
  2060. "就诊号",
  2061. "患者姓名",
  2062. "开处时间",
  2063. "项目(透析器)",
  2064. "血液透析滤过",
  2065. "0.9%氯化钠注射液",
  2066. "置换液管",
  2067. "险种类型",
  2068. "应收金额",
  2069. "医保统筹金额",
  2070. "大病基金金额",
  2071. "医疗救助金额",
  2072. "公务员基金",
  2073. "个人支付基金",
  2074. "总金额",
  2075. "收费时间",
  2076. "结算类型",
  2077. "收费状态",
  2078. ];
  2079. const filterVal = [
  2080. "序号",
  2081. "就诊号",
  2082. "患者姓名",
  2083. "开处时间",
  2084. "项目(透析器)",
  2085. "血液透析滤过",
  2086. "0.9%氯化钠注射液",
  2087. "置换液管",
  2088. "险种类型",
  2089. "应收金额",
  2090. "医保统筹金额",
  2091. "大病基金金额",
  2092. "医疗救助金额",
  2093. "公务员基金",
  2094. "个人支付基金",
  2095. "总金额",
  2096. "收费时间",
  2097. "结算类型",
  2098. "收费状态",
  2099. ];
  2100. const data = this.formatJson(filterVal, tarList);
  2101. excel.export_json_to_excel({
  2102. header: tHeader,
  2103. data,
  2104. filename: "消费明细",
  2105. });
  2106. });
  2107. }
  2108. });
  2109. },
  2110. export_detail_tenone(){
  2111. let params = {
  2112. start_time: this.start_time,
  2113. end_time: this.end_time,
  2114. };
  2115. handleData10138Two(params).then((response) => {
  2116. if (response.data.state == 0) {
  2117. this.$message.error(response.data.msg);
  2118. return false;
  2119. } else {
  2120. var list = []
  2121. var orders = response.data.data.info
  2122. for (let i = 0; i < orders.length; i++) {
  2123. for (let b = 0; b < orders[i].order.length; b++) {
  2124. for (let c = 0; c < orders[i].order[b].infos.length; c++) {
  2125. let name = orders[i].name
  2126. let date = this.getTimes(orders[i].order[b].settle_accounts_date)
  2127. let code = orders[i].order[b].number
  2128. let cnt = orders[i].order[b].infos[c].cnt
  2129. let pric = orders[i].order[b].infos[c].pric
  2130. let det_item_fee_sumamt = orders[i].order[b].infos[c].det_item_fee_sumamt
  2131. let item_name = ""
  2132. let unit = ""
  2133. let spec = ""
  2134. if (orders[i].order[b].infos[c].advice_id > 0) {
  2135. item_name = orders[i].order[b].infos[c].advices.drug.drug_name
  2136. unit = orders[i].order[b].infos[c].advices.prescribing_number_unit
  2137. spec = (orders[i].order[b].infos[c].advices.drug.dose + orders[i].order[b].infos[c].advices.drug.dose_unit) + "*" + orders[i].order[b].infos[c].advices.drug.min_number + orders[i].order[b].infos[c].advices.drug.min_unit + "/" + orders[i].order[b].infos[c].advices.drug.max_unit
  2138. }
  2139. if (orders[i].order[b].infos[c].project_id > 0 && orders[i].order[b].infos[c].project.type == 2) {
  2140. item_name = orders[i].order[b].infos[c].project.project.project_name
  2141. unit =orders[i].order[b].infos[c].project.project.unit
  2142. spec = orders[i].order[b].infos[c].project.project.project_name
  2143. }
  2144. if (orders[i].order[b].infos[c].project_id > 0 && orders[i].order[b].infos[c].project.type == 3) {
  2145. item_name = orders[i].order[b].infos[c].project.good_info.good_name
  2146. unit = orders[i].order[b].infos[c].project.good_info.packing_unit
  2147. spec = orders[i].order[b].infos[c].project.good_info.specification_name
  2148. }
  2149. let obj = {
  2150. "姓名":name,
  2151. "处方日期":date,
  2152. "费用编码":code,
  2153. "项目名称":item_name,
  2154. "规格": spec,
  2155. "数量": cnt,
  2156. "单位": unit,
  2157. "金额": det_item_fee_sumamt,
  2158. "单价": pric,
  2159. }
  2160. list.push(obj)
  2161. }
  2162. }
  2163. }
  2164. import("@/vendor/Export2Excel").then((excel) => {
  2165. const tHeader = [
  2166. "姓名",
  2167. "处方日期",
  2168. "费用编码",
  2169. "项目名称",
  2170. "规格",
  2171. "数量",
  2172. "单位",
  2173. "单价",
  2174. "金额",
  2175. ];
  2176. const filterVal = [
  2177. "姓名",
  2178. "处方日期",
  2179. "费用编码",
  2180. "项目名称",
  2181. "规格",
  2182. "数量",
  2183. "单位",
  2184. "单价",
  2185. "金额",
  2186. ];
  2187. const data = this.formatJson(filterVal, list);
  2188. excel.export_json_to_excel({
  2189. header: tHeader,
  2190. data,
  2191. filename: "消费明细",
  2192. });
  2193. });
  2194. }
  2195. });
  2196. },
  2197. getType(med_chrgitm_type) {
  2198. switch (med_chrgitm_type) {
  2199. case '01':
  2200. return '床位费'
  2201. break
  2202. case '1':
  2203. return '床位费'
  2204. break
  2205. case '02':
  2206. return '诊察费'
  2207. break
  2208. case '2':
  2209. return '诊察费'
  2210. break
  2211. case '03':
  2212. return '检查费'
  2213. break
  2214. case '3':
  2215. return '检查费'
  2216. break
  2217. case '04':
  2218. return '化验费'
  2219. break
  2220. case '4':
  2221. return '化验费'
  2222. break
  2223. case '05':
  2224. return '治疗费'
  2225. break
  2226. case '5':
  2227. return '治疗费'
  2228. break
  2229. case '06':
  2230. return '手术费'
  2231. break
  2232. case '6':
  2233. return '手术费'
  2234. break
  2235. case '07':
  2236. return '护理费'
  2237. break
  2238. case '7':
  2239. return '护理费'
  2240. break
  2241. case '08':
  2242. return '材料费'
  2243. break
  2244. case '8':
  2245. return '材料费'
  2246. break
  2247. case '09':
  2248. return '西药费'
  2249. break
  2250. case '9':
  2251. return '西药费'
  2252. break
  2253. case '10':
  2254. return '中药饮片费'
  2255. break
  2256. case '11':
  2257. return '中成药费'
  2258. break
  2259. case '12':
  2260. return '一般诊疗费'
  2261. break
  2262. case '13':
  2263. return '挂号费'
  2264. break
  2265. case '14':
  2266. return '其他费'
  2267. break
  2268. case '0':
  2269. return '其他费'
  2270. break
  2271. }
  2272. },
  2273. export_detail_ten() {
  2274. let params = {
  2275. start_time:this.start_time,
  2276. end_time:this.end_time
  2277. };
  2278. handleData10106(params).then((response) => {
  2279. if (response.data.state == 0) {
  2280. this.$message.error(response.data.msg);
  2281. return false;
  2282. } else {
  2283. let list = [];
  2284. for (let i = 0; i < response.data.data.order.length; i++) {
  2285. let order = response.data.data.order[i];
  2286. let med_chrgitm_types = []
  2287. for (let b = 0; b < order.info.length; b++) {
  2288. med_chrgitm_types.push(order.info[b].med_chrgitm_type)
  2289. const obj = {}
  2290. med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
  2291. obj[next] ? '' : obj[next] = true && cur.push(next)
  2292. return cur
  2293. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  2294. }
  2295. for (let i = 0; i < med_chrgitm_types.length; i++) {
  2296. let price = 0
  2297. let obj = {
  2298. number:"440722196501072316",
  2299. name: order.patient.name,
  2300. idNo: "",
  2301. med_chrgitm_name:this.getType(med_chrgitm_types[i]),
  2302. price:"",
  2303. remark:"",
  2304. }
  2305. if(i == 0){
  2306. obj.remark = "就诊日期:" + this.getTimes(order.settle_accounts_date) + " 医保报销: "+order.fund_pay_sumamt + " 现金:"+order.psn_cash_pay
  2307. obj.idNo = order.patient.id_card_no
  2308. }else{
  2309. obj.remark = ""
  2310. obj.idNo = ""
  2311. }
  2312. for (let b = 0; b < order.info.length; b++) {
  2313. if(med_chrgitm_types[i] == order.info[b].med_chrgitm_type){
  2314. price = price + order.info[b].det_item_fee_sumamt
  2315. }
  2316. }
  2317. obj.price = price
  2318. list.push(obj)
  2319. }
  2320. }
  2321. let list_two = []
  2322. const obj = {}
  2323. for(let i = 0; i < list.length; i++){
  2324. console.log(list[i])
  2325. list_two.push(list[i].name)
  2326. }
  2327. list_two = list_two.reduce((cur, next) => {
  2328. obj[next] ? '' : obj[next] = true && cur.push(next)
  2329. return cur
  2330. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  2331. for(let i = 0; i < list_two.length; i++){
  2332. for(let b = 0; b < list.length; b++){
  2333. if(list_two[i] == list[b].name){
  2334. list[b]['index'] = i+1
  2335. }
  2336. }
  2337. }
  2338. var tarList = []
  2339. for (let i = 0; i < list.length; i++) {
  2340. let obj = {
  2341. "订单序号": list[i].index,
  2342. "订单号码":"",
  2343. "购方名称": list[i].name,
  2344. "购方纳税人识别号":list[i].idNo,
  2345. "开户行及账号":"",
  2346. "地址电话":"",
  2347. "税收编码":"3070202000000000000",
  2348. "商品名称": list[i].med_chrgitm_name,
  2349. "规格型号":"",
  2350. "计量单位":"",
  2351. "数量":"",
  2352. "单价":"",
  2353. "金额": list[i].price,
  2354. "税率":"0%",
  2355. "优惠政策":"普通零税率",
  2356. "税额":"0",
  2357. "备注": list[i].remark,
  2358. "电子邮箱":"",
  2359. }
  2360. tarList.push(obj)
  2361. }
  2362. import("@/vendor/Export2Excel").then((excel) => {
  2363. const tHeader = [
  2364. "订单序号",
  2365. "订单号码",
  2366. "购方名称",
  2367. "购方纳税人识别号",
  2368. "开户行及账号",
  2369. "地址电话",
  2370. "税收编码",
  2371. "商品名称",
  2372. "规格型号",
  2373. "计量单位",
  2374. "数量",
  2375. "单价",
  2376. "金额",
  2377. "税率",
  2378. "优惠政策",
  2379. "税额",
  2380. "备注",
  2381. "电子邮箱",
  2382. ];
  2383. const filterVal = [
  2384. "订单序号",
  2385. "订单号码",
  2386. "购方名称",
  2387. "购方纳税人识别号",
  2388. "开户行及账号",
  2389. "地址电话",
  2390. "税收编码",
  2391. "商品名称",
  2392. "规格型号",
  2393. "计量单位",
  2394. "数量",
  2395. "单价",
  2396. "金额",
  2397. "税率",
  2398. "优惠政策",
  2399. "税额",
  2400. "备注",
  2401. "电子邮箱",
  2402. ];
  2403. const data = this.formatJson(filterVal, tarList);
  2404. excel.export_json_to_excel({
  2405. header: tHeader,
  2406. data,
  2407. filename: "消费明细",
  2408. });
  2409. });
  2410. }
  2411. });
  2412. },
  2413. export_detail_ten_two(){
  2414. let params = {
  2415. start_time:this.start_time,
  2416. end_time:this.end_time
  2417. };
  2418. handleData10318(params).then((response) => {
  2419. if (response.data.state == 0) {
  2420. this.$message.error(response.data.msg);
  2421. return false;
  2422. } else {
  2423. let list = [];
  2424. for (let i = 0; i < response.data.data.order.length; i++) {
  2425. let order = response.data.data.order[i];
  2426. let obj = {
  2427. 姓名: order.patient.name,
  2428. 身份证: order.patient.id_card_no,
  2429. 西药费:0,
  2430. 化验费:0,
  2431. 检查费:0,
  2432. 治疗费:0,
  2433. 材料费:0,
  2434. 中成药费:0,
  2435. 护理费:0,
  2436. 备注: "就诊日期:" + this.getTimes(order.settle_accounts_date) + " 医保报销: "+order.fund_pay_sumamt + " 现金:"+order.psn_cash_pay,
  2437. }
  2438. let xiyaoPrice = 0
  2439. let huaYanPrice = 0
  2440. let jianChaPrice = 0
  2441. let zhiLiaoPrice = 0
  2442. let cailiaoPrice = 0
  2443. let zhongchengyaoPrice = 0
  2444. let huliPrice = 0
  2445. for (let b = 0; b < order.info.length; b++) {
  2446. if(order.info[b].med_chrgitm_type == '09'){
  2447. xiyaoPrice = xiyaoPrice + order.info[b].det_item_fee_sumamt
  2448. }
  2449. if(order.info[b].med_chrgitm_type == '04'){
  2450. huaYanPrice = huaYanPrice + order.info[b].det_item_fee_sumamt
  2451. }
  2452. if(order.info[b].med_chrgitm_type == '03'){
  2453. jianChaPrice = jianChaPrice + order.info[b].det_item_fee_sumamt
  2454. }
  2455. if(order.info[b].med_chrgitm_type == '05'){
  2456. zhiLiaoPrice = zhiLiaoPrice + order.info[b].det_item_fee_sumamt
  2457. }
  2458. if(order.info[b].med_chrgitm_type == '08'){
  2459. cailiaoPrice = cailiaoPrice + order.info[b].det_item_fee_sumamt
  2460. }
  2461. if(order.info[b].med_chrgitm_type == '11'){
  2462. zhongchengyaoPrice = zhongchengyaoPrice + order.info[b].det_item_fee_sumamt
  2463. }
  2464. if(order.info[b].med_chrgitm_type == '07'){
  2465. huliPrice = huliPrice + order.info[b].det_item_fee_sumamt
  2466. }
  2467. }
  2468. obj.西药费 = xiyaoPrice
  2469. obj.化验费 = huaYanPrice
  2470. obj.检查费 = jianChaPrice
  2471. obj.治疗费 = zhiLiaoPrice
  2472. obj.材料费 = cailiaoPrice
  2473. obj.中成药费 = zhongchengyaoPrice
  2474. obj.护理费 = huliPrice
  2475. list.push(obj)
  2476. }
  2477. import("@/vendor/Export2Excel").then((excel) => {
  2478. const tHeader = [
  2479. "姓名",
  2480. "身份证",
  2481. "西药费",
  2482. "化验费",
  2483. "检查费",
  2484. "治疗费",
  2485. "材料费",
  2486. "中成药费",
  2487. "护理费",
  2488. "备注",
  2489. ];
  2490. const filterVal = [
  2491. "姓名",
  2492. "身份证",
  2493. "西药费",
  2494. "化验费",
  2495. "检查费",
  2496. "治疗费",
  2497. "材料费",
  2498. "中成药费",
  2499. "护理费",
  2500. "备注",
  2501. ];
  2502. const data = this.formatJson(filterVal, list);
  2503. excel.export_json_to_excel({
  2504. header: tHeader,
  2505. data,
  2506. filename: "消费明细",
  2507. });
  2508. });
  2509. }
  2510. });
  2511. },
  2512. export_detail_ten_three(){
  2513. exportOrderInfo().then((response) => {
  2514. if (response.data.state == 0) {
  2515. this.$message.error(response.data.msg);
  2516. return false;
  2517. } else {
  2518. let list = [];
  2519. for (let b = 0; b < response.data.data.info.length; b++) {
  2520. let item_name = "";
  2521. let item_code = "";
  2522. let price = "";
  2523. let unit = "";
  2524. let spec = "";
  2525. let cnt = "";
  2526. if (
  2527. response.data.data.info[b].advices.id == 0 &&
  2528. response.data.data.info[b].project.id > 0
  2529. ) {
  2530. if (response.data.data.info[b].project.type == 2){
  2531. item_name = response.data.data.info[b].project.project.project_name;
  2532. item_code = response.data.data.info[b].project.project.medical_code;
  2533. price = response.data.data.info[b].det_item_fee_sumamt;
  2534. unit = response.data.data.info[b].project.project.unit;
  2535. cnt=response.data.data.info[b].cnt;
  2536. }else{
  2537. item_name = response.data.data.info[b].project.good_info.good_name;
  2538. item_code = response.data.data.info[b].project.good_info.medical_insurance_number;
  2539. price =response.data.data.info[b].det_item_fee_sumamt;
  2540. unit = response.data.data.info[b].project.good_info.packing_unit;
  2541. cnt=response.data.data.info[b].cnt;
  2542. }
  2543. } else if (
  2544. response.data.data.info[b].advices.id > 0 &&
  2545. response.data.data.info[b].project.id == 0
  2546. ) {
  2547. item_name =response.data.data.info[b].advices.advice_name;
  2548. item_code =
  2549. response.data.data.info[b].advices.drug.medical_insurance_number;
  2550. price = response.data.data.info[b].det_item_fee_sumamt;
  2551. unit = response.data.data.info[b].advices.prescribing_number_unit;
  2552. spec =response.data.data.info[b].advices.drug.dose + response.data.data.info[b].advices.drug.dose_unit+"*" + response.data.data.info[b].advices.drug.min_number + response.data.data.info[b].advices.drug.min_unit+"/"+response.data.data.info[b].advices.drug.max_unit
  2553. cnt=response.data.data.info[b].cnt;
  2554. }
  2555. let obj = {
  2556. 名称: item_name,
  2557. 总价: price,
  2558. 数量: cnt,
  2559. 规格: spec,
  2560. };
  2561. list.push(obj);
  2562. }
  2563. import("@/vendor/Export2Excel").then((excel) => {
  2564. const tHeader = [
  2565. "名称",
  2566. "总价",
  2567. "数量",
  2568. "规格",
  2569. ];
  2570. const filterVal = [
  2571. "名称",
  2572. "总价",
  2573. "数量",
  2574. "规格",
  2575. ];
  2576. const data = this.formatJson(filterVal, list);
  2577. excel.export_json_to_excel({
  2578. header: tHeader,
  2579. data,
  2580. filename: "消费明细",
  2581. });
  2582. });
  2583. }
  2584. });
  2585. },
  2586. GetGoodName(id) {
  2587. switch (id) {
  2588. case 254:
  2589. return "空心纤维透析器REXEED-18UC(旭化成)"
  2590. break
  2591. case 253:
  2592. return "空心纤维透析器REXEED-15UC(旭化成)"
  2593. break
  2594. case 250:
  2595. return "聚砜膜透析滤过器-XevontaHI18(贝朗)"
  2596. break
  2597. case 249:
  2598. return "聚砜膜透析滤过器-XevontaHI15(贝朗)"
  2599. break
  2600. case 1478:
  2601. return "聚砜膜透析滤过器-XevontaHI15(贝朗)"
  2602. break
  2603. case 1479:
  2604. return "聚砜膜透析滤过器-XevontaHI18(贝朗)"
  2605. break
  2606. case 1482:
  2607. return "空心纤维透析器REXEED-15UC(旭化成)"
  2608. break
  2609. case 1483:
  2610. return "REXEED-18UC(旭化成)"
  2611. break
  2612. case 2577:
  2613. return "空心纤维透析器(FB-15U)(尼普洛)"
  2614. break
  2615. case 2578:
  2616. return "空心纤维透析器(FB-17U)(尼普洛)"
  2617. break
  2618. case 2058:
  2619. return "中空纤维透析器CTA-1500"
  2620. break
  2621. case 2059:
  2622. return "中空纤维透析器CTA-2000"
  2623. break
  2624. break
  2625. }
  2626. },
  2627. unique_two(array) {
  2628. // res用来存储结果
  2629. var res = []
  2630. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  2631. for (var j = 0, resLen = res.length; j < resLen; j++) {
  2632. if (array[i].patient_id === res[j].patient_id && array[i].dialysis_time === res[j].dialysis_time) {
  2633. break
  2634. }
  2635. }
  2636. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  2637. if (j === resLen) {
  2638. res.push(array[i])
  2639. }
  2640. }
  2641. return res
  2642. },
  2643. batch_print_settlte(){
  2644. if (this.selecting_schs.length === 0) {
  2645. this.$message.error('请至少选择一条需要打印的内容')
  2646. return false
  2647. } else {
  2648. var sch_ids = []
  2649. for (let index = 0; index < this.selecting_schs.length; index++) {
  2650. sch_ids.push(this.selecting_schs[index].id)
  2651. }
  2652. this.batchStatementVisible = true
  2653. let params = {
  2654. order_ids: sch_ids.join(","),
  2655. admin_user_id: this.$store.getters.xt_user.user.id,
  2656. };
  2657. this.batchOrderObj = params
  2658. }
  2659. },
  2660. export_detail() {
  2661. let params = {
  2662. start_time: this.start_time,
  2663. end_time: this.end_time,
  2664. p_type: 2,
  2665. };
  2666. getExportConsumeDetailList(params).then((response) => {
  2667. if (response.data.state == 0) {
  2668. this.$message.error(response.data.msg);
  2669. return false;
  2670. } else {
  2671. let list = [];
  2672. for (let i = 0; i < response.data.data.order.length; i++) {
  2673. let order = response.data.data.order[i];
  2674. let number = "";
  2675. let name = "";
  2676. let department = "";
  2677. let doctor_name = "";
  2678. let balance_accounts = "";
  2679. let order_status = "";
  2680. let charge_name = "";
  2681. let insutypeName = "";
  2682. let time = "";
  2683. if (
  2684. order.his_patient != null &&
  2685. order.his_patient.number.length > 0
  2686. ) {
  2687. number = order.his_patient.number;
  2688. }
  2689. if (order.his_patient != null) {
  2690. if (order.his_patient.balance_accounts_type == 2) {
  2691. balance_accounts = "自费";
  2692. }
  2693. if (order.his_patient.balance_accounts_type == 1) {
  2694. balance_accounts = "医保";
  2695. }
  2696. }
  2697. if (order.patient != null && order.patient.name.length > 0) {
  2698. name = order.patient.name;
  2699. }
  2700. if (
  2701. order.p_info != null &&
  2702. order.p_info.department != null &&
  2703. order.p_info.department.name.length > 0
  2704. ) {
  2705. department = order.p_info.department.name;
  2706. }
  2707. if (order.p_info != null && order.p_info.doctor.length > 0) {
  2708. doctor_name = order.p_info.doctor;
  2709. }
  2710. if (order.creator != null) {
  2711. charge_name = this.getName(order.creator);
  2712. }
  2713. if (order.insutype == "390") {
  2714. insutypeName = "城乡居民基本医疗保险";
  2715. } else if (order.insutype == "310") {
  2716. insutypeName = "职工基本医疗保险";
  2717. }
  2718. if (order.order_status == 1) {
  2719. order_status = "待结算";
  2720. }
  2721. if (order.order_status == 2) {
  2722. order_status = "已结算";
  2723. }
  2724. if (order.order_status == 3) {
  2725. order_status = "已退费";
  2726. }
  2727. if (order.settle_type == 2) {
  2728. time = this.getTimes(order.settle_start_time);
  2729. } else {
  2730. time = this.getTimes(order.settle_accounts_date);
  2731. }
  2732. var hifmi_pay = 0.0;
  2733. if (order.setl_detail && order.setl_detail.length > 0) {
  2734. var jsonObj = JSON.parse(order.setl_detail);
  2735. console.log(jsonObj);
  2736. if (jsonObj != null) {
  2737. for (let i = 0; i < jsonObj.length; i++) {
  2738. if (order.insutype == "310") {
  2739. if (jsonObj[i].fund_pay_type == "310300") {
  2740. hifmi_pay = jsonObj[i].fund_payamt;
  2741. }
  2742. } else if (order.insutype == "390") {
  2743. if (order.fund_pay_type == "390200") {
  2744. hifmi_pay = jsonObj[i].fund_payamt;
  2745. }
  2746. }
  2747. }
  2748. }
  2749. }
  2750. var hifmi_pay = 0.0;
  2751. console.log(order.setl_detail);
  2752. if (order.setl_detail && order.setl_detail.length > 0) {
  2753. var jsonObj = JSON.parse(order.setl_detail);
  2754. if (jsonObj != null) {
  2755. for (let i = 0; i < jsonObj.length; i++) {
  2756. if (order.insutype == "310") {
  2757. if (jsonObj[i].fund_pay_type == "310300") {
  2758. hifmi_pay = jsonObj[i].fund_payamt;
  2759. }
  2760. }
  2761. if (order.insutype == "390") {
  2762. if (jsonObj[i].fund_pay_type == "390200") {
  2763. hifmi_pay = jsonObj[i].fund_payamt;
  2764. }
  2765. }
  2766. }
  2767. }
  2768. }
  2769. let insuplc_admdvs_name = ""
  2770. if (order.his_patient.insuplc_admdvs == "440703"){
  2771. insuplc_admdvs_name = "蓬江区"
  2772. } else if (order.his_patient.insuplc_admdvs == "440704"){
  2773. insuplc_admdvs_name = "江海区"
  2774. } else if (order.his_patient.insuplc_admdvs == "440705"){
  2775. insuplc_admdvs_name = "新会区"
  2776. }else if (order.his_patient.insuplc_admdvs == "440781"){
  2777. insuplc_admdvs_name = "台山市"
  2778. }else if (order.his_patient.insuplc_admdvs == "440783"){
  2779. insuplc_admdvs_name = "开平市"
  2780. }else if (order.his_patient.insuplc_admdvs == "440784"){
  2781. insuplc_admdvs_name = "鹤山市"
  2782. }else if (order.his_patient.insuplc_admdvs == "440785"){
  2783. insuplc_admdvs_name = "恩平市"
  2784. }else if (order.his_patient.insuplc_admdvs == "440799"){
  2785. insuplc_admdvs_name = "市直"
  2786. }
  2787. let obj = {
  2788. 就诊号: order.mdtrt_id,
  2789. 患者姓名: name,
  2790. 开处时间: time,
  2791. 险种类型: insutypeName,
  2792. 参保所属医保区划: order.his_patient.insuplc_admdvs,
  2793. 参保号:order.his_patient.id_card_no,
  2794. 属地名称: insuplc_admdvs_name,
  2795. 应收金额: order.medfee_sumamt,
  2796. 实收金额: order.medfee_sumamt,
  2797. 医保统筹金额: order.hifp_pay,
  2798. 大额基金金额: order.hifob_pay,
  2799. 大病基金金额: hifmi_pay,
  2800. 补充保险基金金额: order.hifes_pay,
  2801. 医疗救助基金金额: order.maf_pay,
  2802. 公务员基金: order.cvlserv_pay,
  2803. 个人支付基金: order.psn_cash_pay,
  2804. 个人账户支付金额: order.acct_pay,
  2805. 科室: department,
  2806. 医生姓名: doctor_name,
  2807. 收费类别: balance_accounts,
  2808. 收费者姓名: charge_name,
  2809. 总金额: order.medfee_sumamt,
  2810. 现金支付: "",
  2811. 账户支付: "",
  2812. 支付宝支付: "",
  2813. 微信支付: "",
  2814. 其他支付: "",
  2815. 收费时间: order.setl_time,
  2816. 收费状态: order_status,
  2817. 退费日期: "",
  2818. };
  2819. list.push(obj);
  2820. }
  2821. import("@/vendor/Export2Excel").then((excel) => {
  2822. const tHeader = [
  2823. "就诊号",
  2824. "患者姓名",
  2825. "开处时间",
  2826. "险种类型",
  2827. "参保所属医保区划",
  2828. "参保号",
  2829. "属地名称",
  2830. "应收金额",
  2831. "实收金额",
  2832. "医保统筹金额",
  2833. "大额基金金额",
  2834. "大病基金金额",
  2835. "补充保险基金金额",
  2836. "医疗救助基金金额",
  2837. "公务员基金",
  2838. "个人支付基金",
  2839. "个人账户支付金额",
  2840. "科室",
  2841. "医生姓名",
  2842. "收费类别",
  2843. "收费者姓名",
  2844. "总金额",
  2845. "现金支付",
  2846. "账户支付",
  2847. "支付宝支付",
  2848. "微信支付",
  2849. "其他支付",
  2850. "收费时间",
  2851. "收费状态",
  2852. "退费日期",
  2853. ];
  2854. const filterVal = [
  2855. "就诊号",
  2856. "患者姓名",
  2857. "开处时间",
  2858. "险种类型",
  2859. "参保所属医保区划",
  2860. "参保号",
  2861. "属地名称",
  2862. "应收金额",
  2863. "实收金额",
  2864. "医保统筹金额",
  2865. "大额基金金额",
  2866. "大病基金金额",
  2867. "补充保险基金金额",
  2868. "医疗救助基金金额",
  2869. "公务员基金",
  2870. "个人支付基金",
  2871. "个人账户支付金额",
  2872. "科室",
  2873. "医生姓名",
  2874. "收费类别",
  2875. "收费者姓名",
  2876. "总金额",
  2877. "现金支付",
  2878. "账户支付",
  2879. "支付宝支付",
  2880. "微信支付",
  2881. "其他支付",
  2882. "收费时间",
  2883. "收费状态",
  2884. "退费日期",
  2885. ];
  2886. const data = this.formatJson(filterVal, list);
  2887. excel.export_json_to_excel({
  2888. header: tHeader,
  2889. data,
  2890. filename: "消费明细",
  2891. });
  2892. });
  2893. }
  2894. });
  2895. },
  2896. formatJson(filterVal, jsonData) {
  2897. return jsonData.map((v) => filterVal.map((j) => v[j]));
  2898. },
  2899. changeSortType() {
  2900. this.page = 1;
  2901. this.keywords = "";
  2902. this.getHisOrderList();
  2903. },
  2904. changeDoctor() {
  2905. this.page = 1;
  2906. this.keywords = "";
  2907. this.getHisOrderList();
  2908. },
  2909. handleSizeChange(limit) {
  2910. this.limit = limit;
  2911. this.getHisOrderList();
  2912. },
  2913. handleCurrentChange(page) {
  2914. this.page = page;
  2915. this.getHisOrderList();
  2916. },
  2917. handleStartTimeChange() {
  2918. this.page = 1;
  2919. this.keywords = "";
  2920. this.getHisOrderList();
  2921. },
  2922. handleEndTimeChange() {
  2923. this.page = 1;
  2924. this.keywords = "";
  2925. this.getHisOrderList();
  2926. },
  2927. setMonthPrescription(month_prescriptions) {
  2928. console.log(month_prescriptions)
  2929. let tableData = []
  2930. let drug_month_prescriptions = {
  2931. advices: []
  2932. }
  2933. let drug_ids = []
  2934. let project_month_prescriptions = {
  2935. project: []
  2936. }
  2937. let project_ids = []
  2938. let to = 0
  2939. for(let i = 0; i < month_prescriptions.length; i++){
  2940. to = to + month_prescriptions[i].det_item_fee_sumamt
  2941. }
  2942. console.log(to)
  2943. // let addition_month_prescriptions = {
  2944. // addition: []
  2945. //
  2946. // }
  2947. // let additions_ids = []
  2948. for (let i = 0; i < month_prescriptions.length; i++) {
  2949. if (month_prescriptions[i].advice_id > 0 && month_prescriptions[i].project_id == 0) { //药品
  2950. let obj = {
  2951. id: month_prescriptions[i].advices.drug_id,
  2952. price: month_prescriptions[i].pric
  2953. }
  2954. drug_ids.push(obj)
  2955. drug_month_prescriptions.advices.push(month_prescriptions[i])
  2956. } else if (month_prescriptions[i].advice_id == 0 && month_prescriptions[i].project_id > 0) { //项目
  2957. let obj = {
  2958. id: month_prescriptions[i].project.project_id,
  2959. price: month_prescriptions[i].pric
  2960. }
  2961. project_ids.push(obj)
  2962. project_month_prescriptions.project.push(month_prescriptions[i])
  2963. }
  2964. }
  2965. console.log(drug_ids)
  2966. console.log(project_ids)
  2967. drug_ids = this.unique(drug_ids)
  2968. project_ids = this.unique(project_ids)
  2969. console.log(drug_ids)
  2970. console.log(project_ids)
  2971. // additions_ids= this.unique(additions_ids)
  2972. for (let i = 0; i < drug_ids.length; i++) {
  2973. let obj = {}
  2974. let count = 0
  2975. let total = 0
  2976. for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
  2977. console.log( drug_month_prescriptions.advices[a].id)
  2978. console.log( drug_month_prescriptions.advices[a].det_item_fee_sumamt)
  2979. console.log((parseFloat(drug_month_prescriptions.advices[a].pric) * parseFloat(drug_month_prescriptions.advices[a].cnt)).toFixed(2))
  2980. if (drug_ids[i].price == drug_month_prescriptions.advices[a].pric && drug_ids[i].id == drug_month_prescriptions.advices[a].advices.drug_id) {
  2981. obj['name'] = drug_month_prescriptions.advices[a].advices.advice_name
  2982. obj['code'] = drug_month_prescriptions.advices[a].advices.id
  2983. obj['unit'] = drug_month_prescriptions.advices[a].advices.drug.min_unit
  2984. obj['price'] = parseFloat(drug_month_prescriptions.advices[a].pric)
  2985. obj['id'] = drug_month_prescriptions.advices[a].advices.id
  2986. obj['type'] = 1
  2987. count = count + drug_month_prescriptions.advices[a].cnt
  2988. total = total + drug_month_prescriptions.advices[a].det_item_fee_sumamt
  2989. }
  2990. }
  2991. obj['count'] = count
  2992. obj['total'] = total
  2993. tableData.push(obj)
  2994. }
  2995. for (let i = 0; i < project_ids.length; i++) {
  2996. let obj = {}
  2997. let count = 0
  2998. let total = 0
  2999. for (let a = 0; a < project_month_prescriptions.project.length; a++) {
  3000. if (project_ids[i].price == project_month_prescriptions.project[a].project.price && project_ids[i].id == project_month_prescriptions.project[a].project.project_id) {
  3001. if (project_month_prescriptions.project[a].project.type == 2) {
  3002. obj['name'] = project_month_prescriptions.project[a].project.project.project_name
  3003. obj['code'] = project_month_prescriptions.project[a].project.id
  3004. obj['unit'] = project_month_prescriptions.project[a].project.project.unit
  3005. obj['type'] = 2
  3006. obj['id'] = project_month_prescriptions.project[a].project.id
  3007. } else if (project_month_prescriptions.project[a].project.type == 3) {
  3008. obj['name'] = project_month_prescriptions.project[a].project.good_info.good_name
  3009. obj['code'] = project_month_prescriptions.project[a].project.id
  3010. obj['unit'] = project_month_prescriptions.project[a].project.good_info.packing_unit
  3011. obj['type'] = 3
  3012. obj['id'] = project_month_prescriptions.project[a].project.id
  3013. }
  3014. count = count + parseFloat(project_month_prescriptions.project[a].cnt)
  3015. total = total + project_month_prescriptions.project[a].det_item_fee_sumamt
  3016. obj['price'] = parseFloat(project_month_prescriptions.project[a].pric)
  3017. obj['type'] = 2
  3018. }
  3019. }
  3020. obj['count'] = count
  3021. obj['total'] = total
  3022. tableData.push(obj)
  3023. }
  3024. return tableData
  3025. },
  3026. setMonthPrescriptiontwo(month_prescriptions) {
  3027. let tableData = []
  3028. let project_month_prescriptions = {
  3029. project: []
  3030. }
  3031. let project_ids = []
  3032. for (let i = 0; i < month_prescriptions.length; i++) {
  3033. if (month_prescriptions[i].type == 2) { //项目
  3034. for (let a = 0; a < month_prescriptions[i].project.length; a++) {
  3035. if (month_prescriptions[i].project[a].type == 2) {
  3036. let obj = {
  3037. id: month_prescriptions[i].project[a].project_id,
  3038. price: month_prescriptions[i].project[a].price
  3039. }
  3040. project_ids.push(obj)
  3041. project_month_prescriptions.project.push(month_prescriptions[i].project[a])
  3042. }
  3043. }
  3044. }
  3045. }
  3046. project_ids = this.unique(project_ids)
  3047. console.log(project_ids)
  3048. for (let i = 0; i < project_ids.length; i++) {
  3049. let obj = {}
  3050. let count = 0
  3051. for (let a = 0; a < project_month_prescriptions.project.length; a++) {
  3052. if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
  3053. if (project_month_prescriptions.project[a].type == 2) {
  3054. obj['name'] = project_month_prescriptions.project[a].project.project_name
  3055. obj['code'] = project_month_prescriptions.project[a].project.medical_code
  3056. count = count + parseFloat(project_month_prescriptions.project[a].count)
  3057. obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
  3058. }
  3059. }
  3060. }
  3061. obj['count'] = count
  3062. tableData.push(obj)
  3063. }
  3064. return tableData
  3065. },
  3066. Action() {
  3067. getAllOrders().then((response) => {
  3068. if (response.data.state == 0) {
  3069. this.$message.error(response.data.msg);
  3070. return false;
  3071. } else {
  3072. let list = [];
  3073. for (let i = 0; i < response.data.data.order.length; i++) {
  3074. let order = response.data.data.order[i]
  3075. for (let b = 0; b < order.info.length; b++) {
  3076. let item_name = "";
  3077. let item_code = "";
  3078. let price = "";
  3079. let unit = "";
  3080. let spec = "";
  3081. let time = "";
  3082. let cnt = "";
  3083. if (
  3084. order.info[b].advices.id == 0 &&
  3085. order.info[b].project.id > 0
  3086. ) {
  3087. if (order.info[b].project.type == 2){
  3088. item_name = order.info[b].project.project.project_name;
  3089. item_code = order.info[b].project.project.medical_code;
  3090. price = order.info[b].pric;
  3091. unit = order.info[b].project.project.unit;
  3092. cnt=order.info[b].cnt;
  3093. time = order.setl_time;
  3094. }else{
  3095. item_name = order.info[b].project.good_info.good_name;
  3096. item_code = order.info[b].project.good_info.medical_insurance_number;
  3097. price = order.info[b].pric;
  3098. unit = order.info[b].project.good_info.packing_unit;
  3099. cnt=order.info[b].cnt;
  3100. time = order.setl_time;
  3101. }
  3102. } else if (
  3103. order.info[b].advices.id > 0 &&
  3104. order.info[b].project.id == 0
  3105. ) {
  3106. item_name = order.info[b].advices.advice_name;
  3107. item_code =
  3108. order.info[b].advices.drug.medical_insurance_number;
  3109. price = order.info[b].pric;
  3110. unit = order.info[b].advices.prescribing_number_unit;
  3111. spec = order.info[b].advices.drug.dose + order.info[b].advices.drug.dose_unit+"*" + order.info[b].advices.drug.min_number + order.info[b].advices.drug.min_unit+"/"+order.info[b].advices.drug.max_unit
  3112. cnt=order.info[b].cnt;
  3113. time = order.setl_time;
  3114. }
  3115. let obj = {
  3116. 项目编码: item_code,
  3117. 项目名称: item_name,
  3118. 规格: spec,
  3119. 厂家:"",
  3120. 单位: unit,
  3121. 数量: cnt,
  3122. 时间: time,
  3123. };
  3124. list.push(obj);
  3125. }
  3126. }
  3127. import("@/vendor/Export2Excel").then((excel) => {
  3128. const tHeader = [
  3129. "项目编码",
  3130. "项目名称",
  3131. "规格",
  3132. "厂家",
  3133. "单位",
  3134. "数量",
  3135. "时间",
  3136. ];
  3137. const filterVal = [
  3138. "项目编码",
  3139. "项目名称",
  3140. "规格",
  3141. "厂家",
  3142. "单位",
  3143. "数量",
  3144. "时间",
  3145. ];
  3146. const data = this.formatJson(filterVal, list);
  3147. excel.export_json_to_excel({
  3148. header: tHeader,
  3149. data,
  3150. filename: "消费明细",
  3151. });
  3152. });
  3153. }
  3154. });
  3155. },
  3156. searchAction() {
  3157. this.page = 1;
  3158. this.getHisOrderList();
  3159. },
  3160. getTimes(time) {
  3161. return uParseTime(time, "{y}-{m}-{d}");
  3162. },
  3163. toDetail(row) {
  3164. this.$router.push(
  3165. "/outpatientCharges/summaryDetail?patient_id=" +
  3166. row.patient.id +
  3167. "&number=" +
  3168. row.number +
  3169. "&id=" +
  3170. row.id
  3171. );
  3172. },
  3173. getTime(value, temp) {
  3174. if (value != undefined) {
  3175. return uParseTime(value, temp);
  3176. }
  3177. return "";
  3178. },
  3179. getHisOrderList() {
  3180. let params = {
  3181. page: this.page,
  3182. limit: this.limit,
  3183. keywords: this.keywords,
  3184. start_time: this.start_time,
  3185. end_time: this.end_time,
  3186. type: this.admin_user_id,
  3187. p_type: 2,
  3188. sort_type: this.sort_type,
  3189. sch_type: this.sch_type,
  3190. zone_type: this.zoneVal
  3191. };
  3192. getHisOrderList(params).then((response) => {
  3193. if (response.data.state == 0) {
  3194. this.$message.error(response.data.msg);
  3195. return false;
  3196. } else {
  3197. this.tableData = response.data.data.order;
  3198. this.total = response.data.data.total;
  3199. }
  3200. });
  3201. },
  3202. getDoctorList() {
  3203. getDoctorList().then((response) => {
  3204. if (response.data.state == 0) {
  3205. this.$message.error(response.data.msg);
  3206. return false;
  3207. } else {
  3208. this.doctors = response.data.data.doctors;
  3209. }
  3210. });
  3211. },
  3212. open(index) {
  3213. if (index == 1) {
  3214. this.listVisible = true;
  3215. } else if (index == 2) {
  3216. this.allListVisible = true;
  3217. }
  3218. }, unique(array) {
  3219. // res用来存储结果
  3220. var res = []
  3221. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  3222. for (var j = 0, resLen = res.length; j < resLen; j++) {
  3223. if (array[i].id === res[j].id && array[i].price === res[j].price) {
  3224. break
  3225. }
  3226. }
  3227. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  3228. if (j === resLen) {
  3229. res.push(array[i])
  3230. }
  3231. }
  3232. return res
  3233. },
  3234. invoicePrint(obj) {
  3235. console.log(obj);
  3236. let paramsObj = {
  3237. order_id: obj.id,
  3238. patient_id: obj.patient_id,
  3239. number: obj.mdtrt_id,
  3240. name: obj.patient.name,
  3241. age: obj.age,
  3242. gend: obj.patient.gender,
  3243. setl_time: obj.setl_time,
  3244. chargeName: this.getName(obj.creator),
  3245. };
  3246. this.invoiceParams = paramsObj;
  3247. this.invoiceVisible = true;
  3248. },
  3249. },
  3250. };
  3251. </script>