summary.vue 132KB

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