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

outpatientChargesManagement.vue 180KB

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