summary.vue 136KB

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