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

summary.vue 115KB

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