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

outpatientChargesManagement.vue 220KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649
  1. <template>
  2. <div class="main-contain outpatientChargesManagement" v-loading="newLoading"
  3. element-loading-text="拼命加载中"
  4. element-loading-spinner="el-icon-loading"
  5. element-loading-background="rgba(0, 0, 0, 0.8)">
  6. <div class="position">
  7. <bread-crumb :crumbs='crumbs'></bread-crumb>
  8. </div>
  9. <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
  10. <div class="mainLeft">
  11. <el-date-picker
  12. v-model="record_date"
  13. prefix-icon="el-icon-date"
  14. @change="changeTimeTwo"
  15. :editable="false"
  16. style="width: 100%;"
  17. type="date"
  18. placeholder="选择开始时间"
  19. align="right"
  20. format="yyyy-MM-dd"
  21. value-format="yyyy-MM-dd">
  22. </el-date-picker>
  23. <div class="mainCell" style="margin-top:10px;">
  24. <el-radio-group v-model="radio" @change="changeRadio">
  25. <el-radio :label=1>未收费<span
  26. style="color: red;margin-bottom:10px;display: inline-block;">{{ cal_one }}</span>人
  27. </el-radio>
  28. <el-radio :label=2>已收费<span
  29. style="color: red;margin-bottom:10px;display: inline-block;">{{ cal_two }}</span>人
  30. </el-radio>
  31. </el-radio-group>
  32. </div>
  33. <div class="mainCell" style="margin-bottom:10px;">
  34. <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input"
  35. class="filter-item"/>
  36. <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
  37. @click="searchAction">
  38. 搜索
  39. </el-button>
  40. </div>
  41. <div>
  42. <el-table :data="patientTableData" :height="tableHeight" border style="width: 100%;"
  43. :row-style="{ color: '#303133' }"
  44. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  45. highlight-current-row ref="tab"
  46. @current-change="handleCurrentChange">
  47. <el-table-column align="center" prop="name" label="姓名" wdith='89'>
  48. <template slot-scope="scope">{{ scope.$index + 1 }}.{{ scope.row.name }}</template>
  49. </el-table-column>
  50. <el-table-column align="center" prop="name" label="就诊号" width="110">
  51. <template slot-scope="scope">{{ scope.row.number ? scope.row.number : '' }}
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. <!-- <el-table v-else :data="monthChargePatientTableData" :height="tableHeight" border style="width: 100%;"-->
  56. <!-- :row-style="{ color: '#303133' }"-->
  57. <!-- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"-->
  58. <!-- highlight-current-row ref="tab"-->
  59. <!-- @current-change="handleCurrentChange">-->
  60. <!-- <el-table-column align="center" prop="name" label="姓名" wdith='89'>-->
  61. <!-- <template slot-scope="scope">{{ scope.row.name }}</template>-->
  62. <!-- </el-table-column>-->
  63. <!-- <el-table-column align="center" prop="name" label="就诊号" width="110">-->
  64. <!-- <template slot-scope="scope">{{ scope.row.number ? scope.row.number : '' }}-->
  65. <!-- </template>-->
  66. <!-- </el-table-column>-->
  67. <!-- </el-table>-->
  68. </div>
  69. </div>
  70. <div class="mainRight">
  71. <div class="mainCell fixedCell" style="margin-bottom:10px;">
  72. <div v-if="org_id == 10340">
  73. <el-button size="small"
  74. @click="openZb(4)"
  75. v-if=" this.order.id == 0"
  76. type="primary">记账
  77. </el-button>
  78. </div>
  79. <div v-if="org_id != 10340">
  80. <!-- <el-button size="small"-->
  81. <!-- @click="openZb(1)"-->
  82. <!-- type="primary">登记-->
  83. <!-- </el-button>-->
  84. <!-- <el-button size="small"-->
  85. <!-- @click="openZb(2)"-->
  86. <!-- type="primary">记账-->
  87. <!-- </el-button>-->
  88. <!-- <el-button size="small"-->
  89. <!-- @click="openZb(3)"-->
  90. <!-- type="primary">撤销记账-->
  91. <!-- </el-button>-->
  92. <el-button v-loading="loadingone" size="small"
  93. @click="open(40)"
  94. v-if="org_id == 10191 || org_id == 10318"
  95. type="primary">登陆
  96. </el-button>
  97. <el-button v-loading="loadingone" size="small"
  98. @click="open(6)"
  99. type="primary">挂号
  100. </el-button>
  101. <el-button v-loading="loadingone" size="small"
  102. @click="open(20)"
  103. type="primary">查询备案信息
  104. </el-button>
  105. <el-button size="small" v-if="org_id == 10138 || org_id == 10278"
  106. @click="openZF(1)"
  107. type="primary">自费门诊就医上传(4205)
  108. </el-button>
  109. <el-button size="small" v-if="org_id == 10138 || org_id == 10278"
  110. @click="openZF(2)"
  111. type="primary">自费上传确认(4203)
  112. </el-button>
  113. <!-- <el-button size="small" v-if="org_id == 10138 || org_id == 10278"-->
  114. <!-- @click="openZF(3)"-->
  115. <!-- type="primary">自费就医明细费用查询(4207)-->
  116. <!-- </el-button>-->
  117. <!-- <el-button size="small" v-if="org_id == 10138 || org_id == 10278"-->
  118. <!-- @click="openZF(4)"-->
  119. <!-- type="primary">自费就医就诊信息查询(4208)-->
  120. <!-- </el-button>-->
  121. <!-- <el-button size="small" v-if="org_id == 10138 || org_id == 10278"-->
  122. <!-- @click="openZF(4)"-->
  123. <!-- type="primary">自费就医诊断查询(4209)-->
  124. <!-- </el-button>-->
  125. <el-button size="small" @click="open(5)" type="primary"
  126. v-if="this.radio == 2 && this.hisPatientInfo.id > 0 && this.order.id > 0 && this.order.order_status == 2">
  127. 退费
  128. </el-button>
  129. <el-button v-if="this.radio == 2 && this.order.order_status == 2" size="small"
  130. @click="open(9)" type="primary"
  131. >结算单
  132. </el-button>
  133. <el-button v-if="this.radio == 2 && this.order.order_status == 2" size="small"
  134. @click="open(30)" type="primary"
  135. >打印发票
  136. </el-button>
  137. <el-button
  138. size="small" @click="open(10)" type="primary"
  139. >退号
  140. </el-button>
  141. </div>
  142. </div>
  143. <div class="mainCenter" v-loading="loading">
  144. <el-tabs class="settlementTabs" v-model="activeName" @tab-click="handleClick">
  145. <el-tab-pane label="日结" name="first">
  146. <div style="display:flex;height:100%;">
  147. <div class="centerLeft">
  148. <div>
  149. <div class="tabsBox" v-for="items,index in big_prescriptions" :key="index">
  150. <div style="height: calc(100% - 60px);">
  151. <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
  152. @tab-click="tabclickEvent">
  153. <!--<el-radio-group v-model="med_radio">-->
  154. <el-tab-pane
  155. v-for="(item, index) in items.prescriptions"
  156. :key="index"
  157. :label="item.name"
  158. :name="item.name"
  159. >
  160. <el-button
  161. v-if="radio == 1"
  162. size="small"
  163. @click="openDialog(item)"
  164. type="primary"
  165. >修改医疗类型
  166. </el-button>
  167. <div style="margin-bottom:10px;float: right">
  168. <div>
  169. <el-button
  170. v-if="(hisPatientInfo.id_card_type == 4 && hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0 && org_id != 10340)"
  171. size="small"
  172. @click="open(50,items.med_type,items.prescriptions[0].order,items.prescriptions)"
  173. type="primary"
  174. >读电子凭证
  175. </el-button>
  176. <el-button
  177. v-if="(hisPatientInfo.id_card_type != 3 && hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0 && items.prescriptions[0].order.id == 0 && org_id != 10340)"
  178. size="small"
  179. @click="open(8,items.med_type,items.prescriptions[0].order,items.prescriptions)"
  180. type="primary"
  181. >预结算
  182. </el-button>
  183. <el-button
  184. v-if="items.curPrescriptions.order.order_status == 1 && hisPatientInfo.balance_accounts_type != 2 && org_id != 10340"
  185. size="small"
  186. @click="open(11,items.med_type,items.prescriptions[0].order,items.prescriptions)"
  187. type="primary"
  188. >撤销明细
  189. </el-button>
  190. <!--<div>{{ items.curPrescriptions.order.order_status}}</div>-->
  191. <!--<div>{{ items.prescriptions[0].order.order_status}}</div>-->
  192. <el-button v-loading="loadingtwo"
  193. v-if="((hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 || items.curPrescriptions.order.order_status == 3) && org_id != 10340"
  194. size="small"
  195. @click="open(4,items.med_type,items.curPrescriptions.order,items.prescriptions)"
  196. type="primary">收费<!--修改的地方-->
  197. </el-button>
  198. </div>
  199. </div>
  200. </el-tab-pane>
  201. <prescription-table ref="prescription_tables"
  202. :prescription="items.curPrescriptions"
  203. :manufacturers="manufacturers"></prescription-table>
  204. <!--</el-radio-group>-->
  205. </el-tabs>
  206. </div>
  207. <div class="costBox">
  208. <span>当前处方总费用:<span style="color:red;">{{ items.total }}元</span></span>
  209. <span>医疗费总额:<span style="color:red;">{{
  210. items.curPrescriptions.order.medfee_sumamt ? items.curPrescriptions.order.medfee_sumamt.toFixed(2) : getTotalFour(items.prescriptions) ? getTotalFour(items.prescriptions) : ''
  211. }}元</span></span>
  212. <span>基金支付总额:<span
  213. style="color:red;">{{
  214. items.curPrescriptions.order.fund_pay_sumamt ? items.curPrescriptions.order.fund_pay_sumamt.toFixed(2) : ''
  215. }}元</span></span>
  216. <span>基本医疗保险统筹基金支出:<span
  217. style="color:red;">{{
  218. items.curPrescriptions.order.hifp_pay ? items.curPrescriptions.order.hifp_pay.toFixed(2) : ''
  219. }}元</span></span>
  220. <span>医疗救助基金支出:<span
  221. style="color:red;">{{
  222. items.curPrescriptions.order.maf_pay ? items.curPrescriptions.order.maf_pay.toFixed(2) : ''
  223. }}元</span></span>
  224. <span>个人账户支付金额:<span
  225. style="color:red;">{{
  226. items.curPrescriptions.order.acct_pay ? items.curPrescriptions.order.acct_pay.toFixed(2) : ''
  227. }}元</span></span>
  228. <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span
  229. style="color:red;">{{
  230. items.curPrescriptions.order.psn_cash_pay ? items.curPrescriptions.order.psn_cash_pay.toFixed(2) : ''
  231. }}元</span></span>
  232. <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span
  233. style="color:red;">{{
  234. items.curPrescriptions.order.medfee_sumamt.toFixed(2)
  235. }}元</span></span>
  236. <span>个人账户金额:<span
  237. style="color:red;">{{
  238. items.curPrescriptions.order.balc ? items.curPrescriptions.order.balc.toFixed(2) : ''
  239. }}元</span></span>
  240. <span>完全自费:<span
  241. style="color:red;">{{
  242. items.curPrescriptions.order.fulamt_ownpay_amt ? items.curPrescriptions.order.fulamt_ownpay_amt.toFixed(2) : ''
  243. }}元</span></span>
  244. <span>超限价:<span
  245. style="color:red;">{{
  246. items.curPrescriptions.order.overlmt_self_pay ? items.curPrescriptions.order.overlmt_self_pay.toFixed(2) : ''
  247. }}元</span></span>
  248. <span>个人共济:<span
  249. style="color:red;">{{
  250. items.curPrescriptions.order.acct_mulaid_pay ? items.curPrescriptions.order.acct_mulaid_pay.toFixed(2) : ''
  251. }}元</span></span>
  252. <span v-if="items.curPrescriptions.order_status == 1">待结算</span>
  253. <span v-if="items.curPrescriptions.order_status == 2">已结算</span>
  254. <span v-if="items.curPrescriptions.order_status == 3">已退费</span>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. <div class="centerRight">
  260. <p class="centerRightTitle" style="padding-top: 10px;">就诊信息</p>
  261. <div>
  262. <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
  263. <el-form-item label="大病类别:" prop="sick_type" :validate-event="is_Name">
  264. <el-select style="margin-right:5px;width:100px;"
  265. v-model="form.sick_type" placeholder="">
  266. <el-option
  267. v-for="(item,index) in sick"
  268. :key="index"
  269. :label="item.class_name"
  270. :value="item.id">
  271. </el-option>
  272. </el-select>
  273. </el-form-item>
  274. <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
  275. <el-select style="margin-right:5px;width:100px;"
  276. v-model="form.diagnosis" multiple placeholder="">
  277. <el-option
  278. v-for="(item,index) in diagnoses"
  279. :key="index"
  280. :label="item.class_name"
  281. :value="item.id">
  282. </el-option>
  283. </el-select>
  284. </el-form-item>
  285. <el-form-item label="诊断时间:" prop="diagnosis_time">
  286. <el-date-picker
  287. v-model="form.diagnosis_time"
  288. prefix-icon="el-icon-date"
  289. :editable="false"
  290. style="width: 100%;"
  291. type="datetime"
  292. placeholder="选择开始时间"
  293. align="right"
  294. format="yyyy-MM-dd HH:mm:ss"
  295. value-format="yyyy-MM-dd HH:mm:ss">
  296. </el-date-picker>
  297. </el-form-item>
  298. <el-form-item label="个账使用标识:" prop="acct_used_flag">
  299. <el-select style="margin-right:5px;width:100px;"
  300. v-model="form.acct_used_flag" placeholder="">
  301. <el-option
  302. v-for="(item,index) in acct_used_flags"
  303. :key="index"
  304. :label="item.name"
  305. :value="item.id">
  306. </el-option>
  307. </el-select>
  308. </el-form-item>
  309. </el-form>
  310. </div>
  311. <p class="centerRightTitle">人员信息</p>
  312. <div style="display:flex;justify-content: space-between;line-height:30px;">
  313. <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>
  314. <span style="font-size:14px;">日期:{{ record_date }}</span>
  315. </div>
  316. <ul class="basicUl">
  317. <li style="width:50%;">姓名:{{ patientInfo.name }}</li>
  318. <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>
  319. <li style="width:50%;">年龄:{{ patientInfo.age }}</li>
  320. <li style="width:50%;">电话:{{ patientInfo.phone }}</li>
  321. </ul>
  322. <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>
  323. <div style="display:flex;justify-content: space-between;line-height:30px;">
  324. <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number }}</span>
  325. </div>
  326. <ul class="basicUl">
  327. <li style="width:50%;">医生:{{ info.doctor }}</li>
  328. <li style="width:50%;">科室:{{ info.departments }}</li>
  329. <!--<li style="width:100%;">总费用:{{ getTotal() }}</li>-->
  330. <li style="width:100%;">判断结果:{{ info.diagnosis }}</li>
  331. <li style="width:100%;">是否有传染病:</li>
  332. <li style="width:100%;">血压:</li>
  333. </ul>
  334. </div>
  335. </div>
  336. </el-tab-pane>
  337. <el-tab-pane label="月结" name="second">
  338. <div style="display:flex;height:100%;">
  339. <div class="centerLeft">
  340. <div class="RP">
  341. Rp
  342. <el-date-picker
  343. v-model="other_start_time"
  344. prefix-icon="el-icon-date"
  345. @change="changeTime"
  346. :editable="false"
  347. style="width: 150px;"
  348. type="date"
  349. placeholder="选择开始时间"
  350. align="right"
  351. format="yyyy-MM-dd"
  352. value-format="yyyy-MM-dd">
  353. </el-date-picker>
  354. <span class>-</span>
  355. <el-date-picker
  356. v-model="other_end_time"
  357. prefix-icon="el-icon-date"
  358. @change="changeEndTime"
  359. :editable="false"
  360. style="width: 150px;"
  361. type="date"
  362. placeholder="选择结束时间"
  363. align="right"
  364. format="yyyy-MM-dd"
  365. value-format="yyyy-MM-dd">
  366. </el-date-picker>
  367. </div>
  368. <div>
  369. <div class="tabsBox" v-for="(items, index) in big_month_prescriptions">
  370. <div style="height: calc(100% - 60px);">
  371. <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
  372. @tab-click="tabclickEventTwo">
  373. <el-tab-pane
  374. v-for="(item, index) in items.month_prescriptions"
  375. :key="index"
  376. :label="item.name"
  377. :name="item.name">
  378. </el-tab-pane>
  379. <el-button
  380. v-if="radio == 1"
  381. size="small"
  382. @click="openMonthDialog(items)"
  383. type="primary"
  384. >修改医疗类型
  385. </el-button>
  386. <div style="margin-bottom:10px;float: right">
  387. <div>
  388. <el-button
  389. v-if="(hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0)"
  390. size="small"
  391. @click="open(8,items.med_type,items.curMonthPrescriptions.order,items.month_prescriptions)"
  392. type="primary"
  393. >预结算
  394. </el-button>
  395. <el-button
  396. v-if="items.curMonthPrescriptions.order.order_status == 1"
  397. size="small"
  398. @click="open(11,items.med_type,items.curMonthPrescriptions.order,items.month_prescriptions)"
  399. type="primary"
  400. >撤销明细
  401. </el-button>
  402. <el-button
  403. v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) || items.curMonthPrescriptions.order.order_status == 1 || items.curMonthPrescriptions.order.order_status == 3"
  404. size="small"
  405. @click="open(4,items.med_type,items.curMonthPrescriptions.order,items.month_prescriptions)"
  406. type="primary">收费
  407. </el-button>
  408. </div>
  409. </div>
  410. <charge-month-prescription-table
  411. :prescription="items.curMonthPrescriptions"></charge-month-prescription-table>
  412. </el-tabs>
  413. </div>
  414. <div class="costBox">
  415. <span>当前处方总费用:<span
  416. style="color:red;">{{ items.month_total }}元</span></span>
  417. <span>医疗费总额:<span style="color:red;">{{
  418. items.curMonthPrescriptions.order.medfee_sumamt ? items.curMonthPrescriptions.order.medfee_sumamt.toFixed(2) : getTotalFour(items.month_prescriptions) ? getTotalFour(items.month_prescriptions) : ''
  419. }}元</span></span>
  420. <span>基金支付总额:<span
  421. style="color:red;">{{
  422. items.curMonthPrescriptions.order.fund_pay_sumamt ? items.curMonthPrescriptions.order.fund_pay_sumamt.toFixed(2) : ''
  423. }}元</span></span>
  424. <span>基本医疗保险统筹基金支出:<span
  425. style="color:red;">{{
  426. items.curMonthPrescriptions.order.hifp_pay ? items.curMonthPrescriptions.order.hifp_pay.toFixed(2) : ''
  427. }}元</span></span>
  428. <span>医疗救助基金支出:<span
  429. style="color:red;">{{
  430. items.curMonthPrescriptions.order.maf_pay ? items.curMonthPrescriptions.order.maf_pay.toFixed(2) : ''
  431. }}元</span></span>
  432. <span>个人账户支付金额:<span
  433. style="color:red;">{{
  434. items.curMonthPrescriptions.order.acct_pay ? items.curMonthPrescriptions.order.acct_pay.toFixed(2) : ''
  435. }}元</span></span>
  436. <!--<span>个人支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.psn_cash_pay?items.curMonthPrescriptions.order.psn_cash_pay:''}}元</span></span>-->
  437. <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span
  438. style="color:red;">{{
  439. items.curMonthPrescriptions.order.psn_cash_pay ? items.curMonthPrescriptions.order.psn_cash_pay.toFixed(2) : ''
  440. }}元</span></span>
  441. <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span
  442. style="color:red;">{{ items.curMonthPrescriptions.order.medfee_sumamt.toFixed(2) }}元</span></span>
  443. <span>个人账户金额:<span
  444. style="color:red;">{{
  445. items.curMonthPrescriptions.order.account_price ? items.curMonthPrescriptions.order.account_price.toFixed(2) : ''
  446. }}元</span></span>
  447. </div>
  448. </div>
  449. </div>
  450. </div>
  451. <div class="centerRight">
  452. <p class="centerRightTitle" style="padding-top: 10px;">
  453. 就诊信息</p>
  454. <div>
  455. <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
  456. <el-form-item label="大病类别:" prop="sick_type" :validate-event="is_Name">
  457. <el-select style="margin-right:5px;width:100px;"
  458. v-model="form.sick_type" placeholder="">
  459. <el-option
  460. v-for="(item,index) in sick"
  461. :key="index"
  462. :label="item.class_name"
  463. :value="item.id">
  464. </el-option>
  465. </el-select>
  466. </el-form-item>
  467. <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
  468. <el-select style="margin-right:5px;width:100px;"
  469. v-model="form.diagnosis" multiple placeholder="">
  470. <el-option
  471. v-for="(item,index) in diagnoses"
  472. :key="index"
  473. :label="item.class_name"
  474. :value="item.id">
  475. </el-option>
  476. </el-select>
  477. </el-form-item>
  478. <el-form-item label="诊断时间:" prop="diagnosis_time">
  479. <el-date-picker
  480. v-model="form.diagnosis_time"
  481. prefix-icon="el-icon-date"
  482. :editable="false"
  483. style="width: 100%;"
  484. type="datetime"
  485. placeholder="选择开始时间"
  486. align="right"
  487. format="yyyy-MM-dd HH:mm:ss"
  488. value-format="yyyy-MM-dd HH:mm:ss">
  489. </el-date-picker>
  490. </el-form-item>
  491. <el-form-item label="个账使用标识:" prop="acct_used_flag">
  492. <el-select style="margin-right:5px;width:100px;"
  493. v-model="form.acct_used_flag" placeholder="">
  494. <el-option
  495. v-for="(item,index) in acct_used_flags"
  496. :key="index"
  497. :label="item.name"
  498. :value="item.id">
  499. </el-option>
  500. </el-select>
  501. </el-form-item>
  502. </el-form>
  503. </div>
  504. <p class="centerRightTitle">人员信息</p>
  505. <div style="display:flex;justify-content: space-between;line-height:30px;">
  506. <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>
  507. <span style="font-size:14px;">日期:{{ record_date }}</span>
  508. </div>
  509. <ul class="basicUl">
  510. <li style="width:50%;">姓名:{{ patientInfo.name }}</li>
  511. <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>
  512. <li style="width:50%;">年龄:{{ patientInfo.age }}</li>
  513. <li style="width:50%;">电话:{{ patientInfo.phone }}</li>
  514. <li style="width:100%;">过敏史及其他病史:{{ info.sick_history }}</li>
  515. </ul>
  516. <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>
  517. <div style="display:flex;justify-content: space-between;line-height:30px;">
  518. <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number }}</span>
  519. </div>
  520. <ul class="basicUl">
  521. <li style="width:50%;">医生:{{ info.doctor }}</li>
  522. <li style="width:50%;">科室:{{ getDepartment(info.departments) }}</li>
  523. <!--<li style="width:100%;" v-if="activeName == 'first'">总费用:{{ getTotal() }}</li>-->
  524. <!--<li style="width:100%;" v-if="activeName == 'second'">总费用:{{ getTotalTwo() }}-->
  525. <!--</li>-->
  526. <li style="width:100%;">判断结果:{{ GetDiagnosisName(info.diagnosis) }}</li>
  527. <!--<li style="width:100%;">是否有传染病:</li>-->
  528. <!--<li style="width:100%;">血压:</li>-->
  529. </ul>
  530. </div>
  531. </div>
  532. </el-tab-pane>
  533. <el-tab-pane label="其他月结" name="third">
  534. <div style="display:flex;height:100%;">
  535. <div class="centerLeft">
  536. <div class="RP">
  537. Rp
  538. <el-date-picker
  539. v-model="other_start_time_two"
  540. prefix-icon="el-icon-date"
  541. @change="changeTimeThree"
  542. :editable="false"
  543. style="width: 150px;"
  544. type="date"
  545. placeholder="选择开始时间"
  546. align="right"
  547. format="yyyy-MM-dd"
  548. value-format="yyyy-MM-dd">
  549. </el-date-picker>
  550. <span class>-</span>
  551. <el-date-picker
  552. v-model="other_end_time_two"
  553. prefix-icon="el-icon-date"
  554. @change="changeEndTimeThree"
  555. :editable="false"
  556. style="width: 150px;"
  557. type="date"
  558. placeholder="选择结束时间"
  559. align="right"
  560. format="yyyy-MM-dd"
  561. value-format="yyyy-MM-dd">
  562. </el-date-picker>
  563. </div>
  564. <div>
  565. <div class="tabsBox" v-for="(items,index) in big_prescriptions_two" :key="index">
  566. <div style="height: calc(100% - 60px);">
  567. <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
  568. @tab-click="tabclickEventThree">
  569. <!--<el-radio-group v-model="med_radio">-->
  570. <el-tab-pane
  571. v-for="(item, index) in items.prescriptions"
  572. :key="index"
  573. :label="item.name"
  574. :name="item.name"
  575. >
  576. <el-button
  577. v-if="radio == 1"
  578. size="small"
  579. @click="openMonthDialogTwo(item)"
  580. type="primary"
  581. >修改医疗类型
  582. </el-button>
  583. <!-- <div style="margin-bottom:10px;float: right">-->
  584. <!-- <div>-->
  585. <!-- <el-button-->
  586. <!-- v-if="(hisPatientInfo.id > 0 && items.prescriptions[0].order.id == 0)"-->
  587. <!-- size="small"-->
  588. <!-- @click="open(8,items.med_type,items.prescriptions[0].order,items.prescriptions)"-->
  589. <!-- type="primary"-->
  590. <!-- >预结算-->
  591. <!-- </el-button>-->
  592. <!-- <el-button-->
  593. <!-- v-if="items.curPrescriptions.order.order_status == 1 && hisPatientInfo.balance_accounts_type != 2"-->
  594. <!-- size="small"-->
  595. <!-- @click="open(11,items.med_type,items.prescriptions[0].order,items.prescriptions)"-->
  596. <!-- type="primary"-->
  597. <!-- >撤销明细-->
  598. <!-- </el-button>-->
  599. <!-- <el-button v-loading="loadingtwo"-->
  600. <!-- v-if="(hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 || items.curPrescriptions.order.order_status == 3"-->
  601. <!-- size="small"-->
  602. <!-- @click="open(4,items.med_type,items.curPrescriptions.order,items.prescriptions)"-->
  603. <!-- type="primary">收费-->
  604. <!-- </el-button>-->
  605. <!-- </div>-->
  606. <!-- </div>-->
  607. </el-tab-pane>
  608. <prescription-table ref="prescription_tables"
  609. :prescription="items.curPrescriptions"
  610. :manufacturers="manufacturers"></prescription-table>
  611. <!--</el-radio-group>-->
  612. </el-tabs>
  613. </div>
  614. <div class="costBox">
  615. <span>当前处方总费用:<span style="color:red;">{{ items.total }}元</span></span>
  616. <span>医疗费总额:<span style="color:red;">{{
  617. items.curPrescriptions.order.medfee_sumamt ? items.curPrescriptions.order.medfee_sumamt.toFixed(2) : getTotalFour(items.prescriptions) ? getTotalFour(items.prescriptions) : ''
  618. }}元</span></span>
  619. <span>基金支付总额:<span
  620. style="color:red;">{{
  621. items.curPrescriptions.order.fund_pay_sumamt ? items.curPrescriptions.order.fund_pay_sumamt.toFixed(2) : ''
  622. }}元</span></span>
  623. <span>基本医疗保险统筹基金支出:<span
  624. style="color:red;">{{
  625. items.curPrescriptions.order.hifp_pay ? items.curPrescriptions.order.hifp_pay.toFixed(2) : ''
  626. }}元</span></span>
  627. <span>医疗救助基金支出:<span
  628. style="color:red;">{{
  629. items.curPrescriptions.order.maf_pay ? items.curPrescriptions.order.maf_pay.toFixed(2) : ''
  630. }}元</span></span>
  631. <!-- <span>基金支付金额:<span-->
  632. <!-- style="color:red;">{{-->
  633. <!-- items.curPrescriptions.order.hifp_pay ? items.curPrescriptions.order.hifp_pay.toFixed(2) : ''-->
  634. <!-- }}元</span></span>-->
  635. <span>个人账户支付金额:<span
  636. style="color:red;">{{
  637. items.curPrescriptions.order.acct_pay ? items.curPrescriptions.order.acct_pay.toFixed(2) : ''
  638. }}元</span></span>
  639. <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span
  640. style="color:red;">{{
  641. items.curPrescriptions.order.psn_cash_pay ? items.curPrescriptions.order.psn_cash_pay.toFixed(2) : ''
  642. }}元</span></span>
  643. <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span
  644. style="color:red;">{{
  645. items.curPrescriptions.order.medfee_sumamt.toFixed(2)
  646. }}元</span></span>
  647. <span>个人账户金额:<span
  648. style="color:red;">{{
  649. items.curPrescriptions.order.balc ? items.curPrescriptions.order.balc.toFixed(2) : ''
  650. }}元</span></span>
  651. <span v-if="items.curPrescriptions.order_status == 1">待结算</span>
  652. <span v-if="items.curPrescriptions.order_status == 2">已结算</span>
  653. <span v-if="items.curPrescriptions.order_status == 3">已退费</span>
  654. </div>
  655. </div>
  656. </div>
  657. </div>
  658. <div class="centerRight">
  659. <p class="centerRightTitle" style="padding-top: 10px;">就诊信息</p>
  660. <div>
  661. <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
  662. <el-form-item label="大病类别:" prop="sick_type" :validate-event="is_Name">
  663. <el-select style="margin-right:5px;width:100px;"
  664. v-model="form.sick_type" placeholder="">
  665. <el-option
  666. v-for="(item,index) in sick"
  667. :key="index"
  668. :label="item.class_name"
  669. :value="item.id">
  670. </el-option>
  671. </el-select>
  672. </el-form-item>
  673. <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
  674. <el-select style="margin-right:5px;width:100px;"
  675. v-model="form.diagnosis" multiple placeholder="">
  676. <el-option
  677. v-for="(item,index) in diagnoses"
  678. :key="index"
  679. :label="item.class_name"
  680. :value="item.id">
  681. </el-option>
  682. </el-select>
  683. </el-form-item>
  684. <el-form-item label="诊断时间:" prop="diagnosis_time">
  685. <el-date-picker
  686. v-model="form.diagnosis_time"
  687. prefix-icon="el-icon-date"
  688. :editable="false"
  689. style="width: 100%;"
  690. type="datetime"
  691. placeholder="选择开始时间"
  692. align="right"
  693. format="yyyy-MM-dd HH:mm:ss"
  694. value-format="yyyy-MM-dd HH:mm:ss">
  695. </el-date-picker>
  696. </el-form-item>
  697. <el-form-item label="个账使用标识:" prop="acct_used_flag">
  698. <el-select style="margin-right:5px;width:100px;"
  699. v-model="form.acct_used_flag" placeholder="">
  700. <el-option
  701. v-for="(item,index) in acct_used_flags"
  702. :key="index"
  703. :label="item.name"
  704. :value="item.id">
  705. </el-option>
  706. </el-select>
  707. </el-form-item>
  708. </el-form>
  709. </div>
  710. <p class="centerRightTitle">人员信息</p>
  711. <div style="display:flex;justify-content: space-between;line-height:30px;">
  712. <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>
  713. <span style="font-size:14px;">日期:{{ record_date }}</span>
  714. </div>
  715. <ul class="basicUl">
  716. <li style="width:50%;">姓名:{{ patientInfo.name }}</li>
  717. <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>
  718. <li style="width:50%;">年龄:{{ patientInfo.age }}</li>
  719. <li style="width:50%;">电话:{{ patientInfo.phone }}</li>
  720. </ul>
  721. <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>
  722. <div style="display:flex;justify-content: space-between;line-height:30px;">
  723. <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number }}</span>
  724. </div>
  725. <ul class="basicUl">
  726. <li style="width:50%;">医生:{{ info.doctor }}</li>
  727. <li style="width:50%;">科室:{{ info.departments }}</li>
  728. <!--<li style="width:100%;">总费用:{{ getTotal() }}</li>-->
  729. <li style="width:100%;">判断结果:{{ info.diagnosis }}</li>
  730. <li style="width:100%;">是否有传染病:</li>
  731. <li style="width:100%;">血压:</li>
  732. </ul>
  733. </div>
  734. </div>
  735. </el-tab-pane>
  736. </el-tabs>
  737. </div>
  738. </div>
  739. </div>
  740. <el-dialog
  741. title="提示"
  742. :visible.sync="dialogVisible"
  743. width="30%"
  744. >
  745. <span>是否修改医疗类型</span>
  746. <el-select v-if="this.$store.getters.xt_user.org_id == 10188 || this.$store.getters.xt_user.org_id == 10217"
  747. style="width:50%;" v-model="temp_med_type"
  748. placeholder="医疗类型" @change="changevalue">
  749. <el-option
  750. v-for="(item,index) in registerThree"
  751. :key="index"
  752. :label="item.label"
  753. :value="item.value">
  754. </el-option>
  755. </el-select>
  756. <el-select v-if="this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217"
  757. style="width:50%;" v-model="temp_med_type"
  758. placeholder="医疗类型" @change="changevalue">
  759. <el-option
  760. v-for="(item,index) in register"
  761. :key="index"
  762. :label="item.label"
  763. :value="item.value">
  764. </el-option>
  765. </el-select>
  766. <span slot="footer" class="dialog-footer">
  767. <el-button @click="dialogVisible = false">取 消</el-button>
  768. <el-button type="primary" @click="comfirmChangeMedType">确 定</el-button>
  769. </span>
  770. </el-dialog>
  771. <additionalCharges ref='additionalCharges' @click="addCharges"
  772. :addtions_charge="addtions_charge"></additionalCharges>
  773. <register-dialog ref='register' :doctors="doctors" :departments="department" :sick="sick" :diagnoses="diagnoses"
  774. v-on:confirm="confirm" v-on:cancel="cancel"></register-dialog>
  775. <register-dialog9504 ref='register9504' :doctors="doctors" :departments="department" :sick="sick"
  776. :diagnoses="diagnoses"
  777. v-on:confirm="registerConfirm" v-on:cancel="registerCancel"></register-dialog9504>
  778. <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
  779. <el-dialog
  780. class="centerDialog"
  781. width="900px"
  782. title="打印"
  783. :visible.sync="treatVisible">
  784. <treatPrint :paramsObj='paramsObj'></treatPrint>
  785. </el-dialog>
  786. <el-dialog
  787. class="centerDialog"
  788. width="1200px"
  789. title="打印"
  790. :visible.sync="statementVisible">
  791. <statementPrint ref="print" :paramsObj='orderObj'></statementPrint>
  792. </el-dialog>
  793. <el-dialog
  794. class="centerDialog"
  795. width="1200px"
  796. title="打印"
  797. :visible.sync="newStatementVisible">
  798. <new-statement-print-two :params-obj="newOrderObj"></new-statement-print-two>
  799. <!--<newStatementPrint ref="print" :paramsObj='newOrderObj'></newStatementPrint>-->
  800. </el-dialog>
  801. <el-dialog title="输入密码" :visible.sync="pwdFormVisible">
  802. <el-form :model="form">
  803. <el-form-item label="密码" :label-width="20">
  804. <el-input v-model="pwd" show-password="false"></el-input>
  805. </el-form-item>
  806. </el-form>
  807. <div slot="footer" class="dialog-footer">
  808. <el-button @click="pwdFormVisible = false">取 消</el-button>
  809. <el-button type="primary" @click="comfirmPWDialog">确 定</el-button>
  810. </div>
  811. </el-dialog>
  812. <el-dialog
  813. class="centerDialog"
  814. width="1200px"
  815. title="打印"
  816. :visible.sync="invoiceVisible">
  817. <invoice-print ref="print" :invoiceParams='invoiceParams'></invoice-print>
  818. </el-dialog>
  819. </div>
  820. </template>
  821. <script>
  822. import axios from 'axios'
  823. import invoicePrint from './invoicePrint'
  824. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  825. import noCharge from './components/noCharge'
  826. import charged from './components/charged'
  827. import medicalInsuranceRefund from './components/medicalInsuranceRefund'
  828. import prescriptionTable from './components/prescriptionTable'
  829. import additionalCharges from './components/additionalCharges'
  830. import { fetchAllAdminUsers } from '@/api/doctor'
  831. import {
  832. changeMedType,
  833. getChargeHisPatientInfo,
  834. getChargeHisPatientList,
  835. getDayOrMonthHisPrescription,
  836. getInitData,
  837. getMonthCharge,
  838. preSettle,
  839. Refund,
  840. refundNumber,
  841. register,
  842. upload
  843. } from '@/api/his/his'
  844. import RegisterDialog from './components/registerDialog'
  845. import treatPrint from './treatPrint'
  846. import statementPrint from './statementPrint'
  847. import ChargeDialog from './components/chargeDialog'
  848. import MonthPrescriptionTable from './components/monthPrescriptionTable'
  849. import ChargeMonthPrescriptionTable from './components/chargeMonthPrescriptionTable'
  850. import NewStatementPrintTwo from './newStatementPrintTwo'
  851. import RegisterDialog9504 from './components/registerDialog9504'
  852. import cryptoJs from 'crypto-js'
  853. const moment = require('moment')
  854. export default {
  855. components: {
  856. RegisterDialog9504,
  857. NewStatementPrintTwo,
  858. ChargeMonthPrescriptionTable,
  859. MonthPrescriptionTable,
  860. ChargeDialog,
  861. RegisterDialog,
  862. BreadCrumb,
  863. noCharge,
  864. charged,
  865. medicalInsuranceRefund,
  866. prescriptionTable,
  867. additionalCharges,
  868. treatPrint,
  869. statementPrint,
  870. invoicePrint
  871. },
  872. data() {
  873. return {
  874. monthChargePatientTableData: [],
  875. invoiceVisible: false,
  876. invoiceParams: null,
  877. temp_med_type: '',
  878. dialogVisible: false,
  879. pwdFormVisible: false,
  880. pwd: '000000',
  881. form: {
  882. p_type: '',
  883. sick_type: '',
  884. diagnosis: [],
  885. medical_care: '',
  886. diagnosis_time: '',
  887. acct_used_flag:0,
  888. },
  889. current_med_type: '',
  890. rules: {
  891. sick_type: [{ required: true, message: '大病类别不能为空', trigger: 'change' }],
  892. diagnosis: [{ required: true, message: '诊断不能为空', trigger: 'change' }]
  893. },
  894. // medical_care: [
  895. // { value: 11, label: '普通门诊' },
  896. // { value: 12, label: '家庭通道' },
  897. // { value: 13, label: '门诊大病' },
  898. // { value: 14, label: '重疾特药' },
  899. // { value: 15, label: '门诊慢病' },
  900. // { value: 16, label: '门诊特检' },
  901. // { value: 17, label: '健康体检' },
  902. // { value: 18, label: '预防接种' },
  903. // { value: 19, label: '门诊输血' },
  904. // { value: 91, label: '新冠肺炎门诊' },
  905. // { value: 1111, label: '精一' },
  906. // { value: 1112, label: '精二' }
  907. // ],
  908. //
  909. // medical_care_two: [
  910. // { value: '11', label: '普通门诊' },
  911. // { value: '12', label: '家庭通道' },
  912. // { value: '13', label: '门诊大病' },
  913. // { value: '14', label: '重疾特药' },
  914. // { value: '15', label: '门诊慢病' },
  915. // { value: '16', label: '门诊特检' },
  916. // { value: '17', label: '健康体检' },
  917. // { value: '18', label: '预防接种' },
  918. // { value: '19', label: '门诊输血' },
  919. // { value: '91', label: '新冠肺炎门诊' },
  920. // ],
  921. register: [
  922. { value: 11, label: '普通门诊' },
  923. { value: 1102, label: '新冠门诊' },
  924. { value: 14, label: '门诊特殊病' },
  925. { value: '9922', label: '家庭通道' },
  926. { value: '1111', label: '精一' },
  927. { value: '1112', label: '精二' },
  928. { value: '1112', label: '精二' }
  929. ],
  930. registerThree: [
  931. { value: 11, label: '普通门诊' },
  932. { value: 1102, label: '新冠门诊' },
  933. { value: 14, label: '门诊特殊病' },
  934. { value: '9922', label: '家庭通道' },
  935. { value: '9933', label: '门诊特殊病(9933)' },
  936. { value: '990602', label: '门诊特殊病(990602)' },
  937. { value: '1402', label: '门诊特殊病(1402)' },
  938. { value: '1111', label: '精一' },
  939. { value: '1112', label: '精二' },
  940. { value: '0', label: '自费' }
  941. ],
  942. register_two: [
  943. { value: '11', label: '普通门诊' },
  944. { value: '1102', label: '新冠门诊' },
  945. { value: '14', label: '门诊特殊病' },
  946. { value: '9922', label: '家庭通道' },
  947. { value: '9933', label: '门诊特殊病(9933)' },
  948. { value: '990602', label: '门诊特殊病(990602)' },
  949. { value: '1402', label: '门诊特殊病(1402)' },
  950. { value: '0', label: '自费' }
  951. ],
  952. loading: false,
  953. dise_loading: false,
  954. org_id: this.$store.getters.xt_user.org_id,
  955. sick_history: '',
  956. p_type: '',
  957. sick_type: '',
  958. diagnosis: '',
  959. month_check: '',
  960. month_p_type: '',
  961. month_sick_type: '',
  962. month_diagnosis: '',
  963. key: '',
  964. other_start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
  965. other_end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  966. other_start_time_two: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
  967. other_end_time_two: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  968. adminUserOptions: [],
  969. curMonthPrescriptions: null,
  970. newCurMonthPrescriptions: null,
  971. big_month_prescriptions: [],
  972. month_total: 0,
  973. crumbs: [
  974. { path: false, name: '门诊收费' },
  975. { path: false, name: '门诊收费管理' }
  976. ],
  977. current_index: 0,
  978. cal_one: '',
  979. cal_two: '',
  980. cal_three: '',
  981. tableHeight: '',
  982. fullHeight: document.documentElement.clientHeight,
  983. activeName: 'first',
  984. info: {},
  985. curPrescriptions: {},
  986. prescriptions: [],
  987. big_prescriptions: [],
  988. big_prescriptions_two: [],
  989. check: 11,
  990. month_prescriptions: [],
  991. med_radio: '',
  992. record_date: '',
  993. tableData: [],
  994. editableTabsValue: '处方1',
  995. loadingone: false,
  996. editableTabs: [{
  997. title: '处方1',
  998. name: '1'
  999. }],
  1000. tabIndex: 1,
  1001. hisPatientInfo: {},
  1002. loadingtwo: false,
  1003. patientTableData: [{}],
  1004. patientInfo: { id: 0 },
  1005. doctor: {},
  1006. total: 0,
  1007. state: '未收费',
  1008. radio: 1,
  1009. radioStatus: 1,
  1010. search_input: '',
  1011. start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
  1012. patient_id: 0,
  1013. prescription_id: 0,
  1014. all_table_data: [],
  1015. hisPatientDatas: [],
  1016. order: {},
  1017. currentOrder: {},
  1018. addtions_charge: [],
  1019. treatVisible: false,
  1020. orderObj: {},
  1021. paramsObj: {},
  1022. newOrderObj: {},
  1023. statementVisible: false,
  1024. newStatementVisible: false,
  1025. sick: [],
  1026. diagnoses: [],
  1027. acct_used_flags: [
  1028. { id: 0, name: '不使用' },
  1029. { id: 1, name: '使用本人个账' },
  1030. { id: 2, name: '使用共济个账' },
  1031. ],
  1032. manufacturers: [],
  1033. department: [],
  1034. all_patient: [],
  1035. temp_prescriptions: null,
  1036. temp_month_prescriptions: null,
  1037. temp_ids: '',
  1038. other_prescriptions: [],
  1039. newLoading: false
  1040. }
  1041. },
  1042. created() {
  1043. this.fetchAllAdminUsers()
  1044. const tableHeight = document.body.clientHeight - 290
  1045. this.tableHeight = tableHeight
  1046. var nowDate = new Date()
  1047. var nowYear = nowDate.getFullYear()
  1048. var nowMonth = nowDate.getMonth() + 1
  1049. var nowDay = nowDate.getDate()
  1050. var nowHours = nowDate.getHours()
  1051. var nowMinutes = nowDate.getMinutes()
  1052. var nowSeconds = nowDate.getSeconds()
  1053. this.record_date =
  1054. nowYear +
  1055. '-' +
  1056. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  1057. '-' +
  1058. (nowDay < 10 ? '0' + nowDay : nowDay)
  1059. this.form.diagnosis_time = nowYear +
  1060. '-' +
  1061. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  1062. '-' +
  1063. (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (nowHours < 10 ? '0' + nowHours : nowHours) +
  1064. ':' +
  1065. (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes) + ':' + (nowSeconds < 10 ? '0' + nowSeconds : nowSeconds)
  1066. this.getInitData()
  1067. //获取患者信息
  1068. this.getPatientList()
  1069. },
  1070. methods: {
  1071. fetchAllAdminUsers() {
  1072. fetchAllAdminUsers().then(response => {
  1073. if (response.data.state == 1) {
  1074. this.adminUserOptions = response.data.data.users
  1075. }
  1076. })
  1077. },
  1078. changeTimeTwo() {
  1079. this.getPatientList()
  1080. var nowDate = new Date()
  1081. var nowHours = nowDate.getHours()
  1082. var nowMinutes = nowDate.getMinutes()
  1083. var nowSeconds = nowDate.getSeconds()
  1084. this.form.diagnosis_time = this.record_date + ' ' + (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes) + ':' + (nowSeconds < 10 ? '0' + nowSeconds : nowSeconds)
  1085. },
  1086. comfirmPWDialog() {
  1087. var that = this
  1088. axios.get('http://127.0.0.1:9532/api/pwd/check', {
  1089. params: {
  1090. 'card_pwd': this.pwd,
  1091. 'his_patient_id': this.hisPatientInfo.id,
  1092. 'admin_user_id': this.$store.getters.xt_user.user.id
  1093. }
  1094. })
  1095. .then(function(response) {
  1096. if (response.data.state == 0) {
  1097. that.$message.error(response.data.msg)
  1098. return false
  1099. } else {
  1100. if (response.data.data.failed_code == -10) {
  1101. this.pwd = ''
  1102. that.$confirm(response.data.data.msg, '医保错误信息', {
  1103. confirmButtonText: '确 定',
  1104. type: 'warning'
  1105. }).then(() => {
  1106. }).catch(() => {
  1107. })
  1108. } else {
  1109. that.pwdFormVisible = false
  1110. if (that.activeName == 'first') {
  1111. that.$refs.charge.show(that.getTotalFour(that.other_prescriptions), that.currentOrder,that.patientInfo.id)
  1112. } else {
  1113. that.$refs.charge.show(that.getTotalFour(that.other_prescriptions), that.currentOrder,that.patientInfo.id)
  1114. }
  1115. }
  1116. }
  1117. })
  1118. .catch(function(error) {
  1119. })
  1120. },
  1121. openDialog(item) {
  1122. this.dialogVisible = true
  1123. this.temp_prescriptions = item
  1124. },
  1125. openMonthDialog(item) {
  1126. this.dialogVisible = true
  1127. console.log(item)
  1128. this.temp_month_prescriptions = item
  1129. console.log(this.temp_month_prescriptions)
  1130. },
  1131. openMonthDialogTwo(item) {
  1132. this.dialogVisible = true
  1133. this.temp_prescriptions = item
  1134. },
  1135. comfirmChangeMedType() {
  1136. let params = {
  1137. med_type: this.temp_med_type.toString()
  1138. }
  1139. if (this.activeName == 'first') {
  1140. params['ids'] = this.temp_prescriptions.id.toString()
  1141. params['settle_type'] = 1
  1142. } else if (this.activeName == 'second') {
  1143. params['ids'] = this.temp_month_prescriptions.curMonthPrescriptions.prescriptions_ids
  1144. params['settle_type'] = 2
  1145. params['start_time'] = this.other_start_time
  1146. params['end_time'] = this.other_end_time
  1147. params['old_med_type'] = this.temp_month_prescriptions.med_type
  1148. } else if (this.activeName == 'third') {
  1149. params['ids'] = this.temp_prescriptions.id.toString()
  1150. params['settle_type'] = 1
  1151. }
  1152. changeMedType(params).then(response => {
  1153. if (response.data.state == 1) {
  1154. if (this.activeName == 'first') {
  1155. this.changeRadioAndPatient(1)
  1156. } else if (this.activeName == 'second') {
  1157. const params = {
  1158. 'record_date': this.record_date,
  1159. 'patient_id': this.patientInfo.id,
  1160. 'his_patient_id': this.hisPatientInfo.id,
  1161. 'start_time': this.other_start_time,
  1162. 'end_time': this.other_end_time,
  1163. 'type': this.radio,
  1164. 'p_type': 2,
  1165. 'order_id': this.order.id
  1166. }
  1167. getDayOrMonthHisPrescription(params).then(response => {
  1168. if (response.data.state == 1) {
  1169. this.loading = false
  1170. this.month_prescriptions = []
  1171. this.setMonthPrescription(response.data.data.day_prescription)
  1172. this.curMonthPrescriptions = this.month_prescriptions[0]
  1173. } else {
  1174. this.$message.error(response.data.msg)
  1175. }
  1176. })
  1177. } else if (this.activeName == 'third') {
  1178. const params = {
  1179. 'record_date': this.record_date,
  1180. 'patient_id': this.patientInfo.id,
  1181. 'his_patient_id': this.hisPatientInfo.id,
  1182. 'start_time': this.other_start_time_two,
  1183. 'end_time': this.other_end_time_two,
  1184. 'type': this.radio,
  1185. 'p_type': 2,
  1186. 'order_id': this.order.id
  1187. }
  1188. getDayOrMonthHisPrescription(params).then(response => {
  1189. if (response.data.state == 1) {
  1190. this.loading = false
  1191. this.big_prescriptions_two = []
  1192. this.setMonthPrescriptionTwo(response.data.data.day_prescription)
  1193. this.newCurMonthPrescriptions = this.big_prescriptions_two[0]
  1194. } else {
  1195. this.$message.error(response.data.msg)
  1196. }
  1197. })
  1198. }
  1199. this.dialogVisible = false
  1200. } else {
  1201. this.$message.error(response.data.msg)
  1202. }
  1203. })
  1204. },
  1205. changevalue(val) {
  1206. this.$forceUpdate()
  1207. }, GetDiagnosisName(ids) {
  1208. },
  1209. query() {
  1210. 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) {
  1211. var that = this
  1212. axios.get('http://127.0.0.1:9532/api/org/info', {
  1213. params: {}
  1214. })
  1215. .then(function(response) {
  1216. if (response.data.state == 0) {
  1217. that.$message.error(response.data.msg)
  1218. return false
  1219. } else {
  1220. }
  1221. })
  1222. .catch(function(error) {
  1223. })
  1224. }
  1225. },
  1226. getDepartment(department_id) {
  1227. for (let i = 0; i < this.department.length; i++) {
  1228. if (this.department[i].id == department_id) {
  1229. return this.department[i].name
  1230. }
  1231. }
  1232. },
  1233. querySearch2(queryString, cb) {
  1234. var restaurants = this.other_sick
  1235. restaurants.map(item => {
  1236. item.value = item.name
  1237. })
  1238. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
  1239. // 调用 callback 返回建议列表的数据
  1240. cb(results)
  1241. },
  1242. changeTime(val) {
  1243. const params = {
  1244. 'record_date': this.record_date,
  1245. 'patient_id': this.patientInfo.id,
  1246. 'his_patient_id': this.hisPatientInfo.id,
  1247. 'start_time': val,
  1248. 'end_time': this.other_end_time,
  1249. 'type': this.radio,
  1250. 'p_type': 2,
  1251. 'order_id': this.order.id
  1252. }
  1253. getMonthCharge(params).then(response => {
  1254. if (response.data.state == 1) {
  1255. this.loading = false
  1256. this.month_prescriptions = []
  1257. this.setMonthPrescription(response.data.data.month_prescriptions)
  1258. this.curMonthPrescriptions = this.month_prescriptions[0]
  1259. } else {
  1260. this.$message.error(response.data.msg)
  1261. }
  1262. })
  1263. },
  1264. changeEndTime(val) {
  1265. const params = {
  1266. 'record_date': this.record_date,
  1267. 'patient_id': this.patientInfo.id,
  1268. 'his_patient_id': this.hisPatientInfo.id,
  1269. 'start_time': this.other_start_time,
  1270. 'end_time': val,
  1271. 'type': this.radio,
  1272. 'p_type': 2,
  1273. 'order_id': this.order.id
  1274. }
  1275. getMonthCharge(params).then(response => {
  1276. if (response.data.state == 1) {
  1277. this.loading = false
  1278. this.month_prescriptions = []
  1279. this.setMonthPrescription(response.data.data.month_prescriptions)
  1280. this.curMonthPrescriptions = this.month_prescriptions[0]
  1281. } else {
  1282. this.$message.error(response.data.msg)
  1283. }
  1284. })
  1285. },
  1286. changeTimeThree(val) {
  1287. let params = {
  1288. patient_id: this.patientInfo.id,
  1289. start_time: val,
  1290. end_time: this.other_end_time_two,
  1291. p_type: 2,
  1292. type: this.radio
  1293. }
  1294. getDayOrMonthHisPrescription(params).then(response => {
  1295. if (response.data.state == 1) {
  1296. this.big_prescriptions_two = []
  1297. this.setMonthPrescriptionTwo(response.data.data.day_prescription)
  1298. this.newCurMonthPrescriptions = this.big_prescriptions_two[0]
  1299. } else {
  1300. this.$message.error(response.data.msg)
  1301. }
  1302. })
  1303. },
  1304. changeEndTimeThree(val) {
  1305. let params = {
  1306. patient_id: this.patientInfo.id,
  1307. start_time: this.other_start_time_two,
  1308. end_time: val,
  1309. p_type: 2
  1310. }
  1311. getDayOrMonthHisPrescription(params).then(response => {
  1312. if (response.data.state == 1) {
  1313. this.big_prescriptions_two = []
  1314. this.setMonthPrescriptionTwo(response.data.data.day_prescription)
  1315. this.newCurMonthPrescriptions = this.big_prescriptions_two[0]
  1316. } else {
  1317. this.$message.error(response.data.msg)
  1318. }
  1319. })
  1320. },
  1321. chargeConfirm(form) {
  1322. this.newLoading = true
  1323. form['pay_ways'] = form.pay_wayss.join(",")
  1324. form['id'] = this.patientInfo.id
  1325. form['his_patient_id'] = this.hisPatientInfo.id
  1326. form['record_time'] = this.record_date
  1327. form['admin_user_id'] = this.$store.getters.xt_user.user.id
  1328. form['order_id'] = this.currentOrder.id
  1329. form['org_id'] = this.$store.getters.xt_user.org_id
  1330. form['begin_time'] = this.form.diagnosis_time
  1331. form['p_type'] = this.current_med_type
  1332. form['diagnosis'] = this.form.diagnosis.join(',')
  1333. form['sick_type'] = this.form.sick_type
  1334. form['ids'] = this.temp_ids
  1335. if (this.activeName == 'first') {
  1336. form['settle_accounts_type'] = 1
  1337. } else if (this.activeName == 'second') {
  1338. form['start_time'] = this.other_start_time
  1339. form['end_time'] = this.other_end_time
  1340. form['settle_accounts_type'] = 2
  1341. } else {
  1342. form['start_time'] = this.other_start_time_two
  1343. form['end_time'] = this.other_end_time_two
  1344. form['settle_accounts_type'] = 2
  1345. }
  1346. if (this.hisPatientInfo.balance_accounts_type == 2) {
  1347. upload(form).then(response => {
  1348. if (response.data.state == 0) {
  1349. this.$message.error(response.data.msg)
  1350. this.loadingtwo = false
  1351. this.newLoading = false
  1352. this.$refs.charge.hide()
  1353. return false
  1354. } else {
  1355. if(response.data.data.msg == 2){
  1356. var drug_name = response.data.data.drug.drug_name
  1357. var dose = response.data.data.drug.dose
  1358. var dose_unit = response.data.data.drug.dose_unit
  1359. var min_number = response.data.data.drug.min_number
  1360. var min_unit = response.data.data.drug.min_unit
  1361. var max_unit = response.data.data.drug.max_unit
  1362. var str = drug_name + " " + dose + dose_unit +"*" + min_number + min_unit + "/"+max_unit
  1363. this.$message.error(str + "库存不足,结算失败!")
  1364. this.loadingtwo = false
  1365. this.newLoading = false
  1366. return
  1367. }
  1368. if(response.data.data.msg == 3){
  1369. var good_name = response.data.data.good.good_name
  1370. var specification_name = response.data.data.good.specification_name
  1371. var str = good_name + " " + specification_name
  1372. this.$message.error(str+"库存不足,结算失败!")
  1373. this.loadingtwo = false
  1374. this.newLoading = false
  1375. return
  1376. }
  1377. this.$refs.charge.hide()
  1378. this.radio = 2
  1379. this.changeRadioAndPatient(2)
  1380. this.loadingtwo = false
  1381. this.state = '已收费'
  1382. this.$message({ message: '收费成功', type: 'success' })
  1383. this.$refs.charge.hide()
  1384. this.loadingtwo = false
  1385. this.newLoading = false
  1386. }
  1387. }) .catch(function(error) {
  1388. this.newLoading = false
  1389. })
  1390. } else {
  1391. var that = this
  1392. axios.get('http://127.0.0.1:9532/api/upload/get', {
  1393. params: form,
  1394. headers: {
  1395. 'Permission': 5
  1396. }
  1397. })
  1398. .then(function(response) {
  1399. if (response.data.state == 0) {
  1400. that.$message.error(response.data.msg)
  1401. that.loadingtwo = false
  1402. that.$refs.charge.hide()
  1403. return false
  1404. } else {
  1405. if (response.data.data.failed_code == -10) {
  1406. that.$confirm(response.data.data.msg, '医保错误信息', {
  1407. confirmButtonText: '确 定',
  1408. type: 'warning'
  1409. }).then(() => {
  1410. that.newLoading = false
  1411. }).catch(() => {
  1412. that.newLoading = false
  1413. })
  1414. } else {
  1415. that.radio = 2
  1416. that.changeRadioAndPatient(2)
  1417. that.$refs.charge.hide()
  1418. that.loadingtwo = false
  1419. that.state = '已收费'
  1420. that.$message({ message: '收费成功', type: 'success', duration: 5000 })
  1421. that.loadingtwo = false
  1422. that.cal_one = this.cal_one - 1
  1423. that.cal_two = this.cal_two + 1
  1424. that.patientTableData.splice(this.current_index, 1)
  1425. that.newLoading = false
  1426. }
  1427. }
  1428. })
  1429. .catch(function(error) {
  1430. that.newLoading = false
  1431. })
  1432. }
  1433. },
  1434. chargeCancel() {
  1435. this.$refs.charge.hide()
  1436. },
  1437. registerCancel() {
  1438. this.$refs.register9504.hide()
  1439. },
  1440. registerConfirm(forms) {
  1441. forms['record_time'] = this.record_date
  1442. forms['admin_user_id'] = this.$store.getters.xt_user.user.id
  1443. forms['org_id'] = this.$store.getters.xt_user.org_id
  1444. this.loadingone = true
  1445. var that = this
  1446. if (forms.settlement_value == 2) {
  1447. register(forms).then(response => {
  1448. if (response.data.state == 0) {
  1449. this.$message.error(response.data.msg)
  1450. this.loadingone = false
  1451. // this.$refs.register.hide()
  1452. return false
  1453. } else {
  1454. // this.getPatientList()
  1455. this.changeRadio(1)
  1456. this.$message({ message: '挂号成功', type: 'success', duration: 5000 })
  1457. this.$refs.register9504.hide()
  1458. this.loadingone = false
  1459. }
  1460. })
  1461. } else {
  1462. 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 || this.$store.getters.xt_user.org_id == 10088 || this.$store.getters.xt_user.org_id == 10278) {
  1463. axios.get('http://127.0.0.1:9532/api/register/get', {
  1464. params: forms,
  1465. headers: {
  1466. 'Permission': 5
  1467. }
  1468. })
  1469. .then(function(response) {
  1470. if (response.data.state == 0) {
  1471. that.$message.error(response.data.msg)
  1472. that.loadingone = false
  1473. that.$refs.register9504.hide()
  1474. return false
  1475. } else {
  1476. that.loadingone = false
  1477. if (response.data.data.failed_code == -10) {
  1478. that.$confirm(response.data.data.msg, '医保错误信息', {
  1479. confirmButtonText: '确 定',
  1480. type: 'warning'
  1481. }).then(() => {
  1482. }).catch(() => {
  1483. })
  1484. } else {
  1485. that.changeRadio(1)
  1486. that.$refs.register9504.hide()
  1487. that.$message({ message: '挂号成功', type: 'success' })
  1488. }
  1489. }
  1490. })
  1491. .catch(function(error) {
  1492. })
  1493. }
  1494. }
  1495. },
  1496. confirm(forms) {
  1497. var time = Math.round(new Date().getTime() / 1000).toString()
  1498. var param = '_api_access_key=' + '1781ce9fb73a478289326c16ba8bf2c4' + '&_api_name=' + 'hssServives' + '&_api_timestamp=' + time + '&_api_version=' + '1.0.0'
  1499. var signature = cryptoJs.enc.Base64.stringify(cryptoJs.HmacSHA1(param, '+b5DPOGjc08DAAMJ8FP31pwwNHKo='))
  1500. console.log(Math.round(new Date().getTime() / 1000).toString())
  1501. forms['record_time'] = this.record_date
  1502. forms['admin_user_id'] = this.$store.getters.xt_user.user.id
  1503. forms['org_id'] = this.$store.getters.xt_user.org_id
  1504. forms['key'] = signature
  1505. forms['time_stamp'] = time
  1506. this.loadingone = true
  1507. var that = this
  1508. if (forms.settlement_value == 2) {
  1509. register(forms).then(response => {
  1510. if (response.data.state == 0) {
  1511. this.$message.error(response.data.msg)
  1512. this.loadingone = false
  1513. // this.$refs.register.hide()
  1514. return false
  1515. } else {
  1516. // this.getPatientList()
  1517. this.changeRadioAndPatient(1)
  1518. this.$message({ message: '挂号成功', type: 'success', duration: 5000 })
  1519. this.$refs.register.hide()
  1520. this.loadingone = false
  1521. }
  1522. })
  1523. } else {
  1524. var that = this
  1525. axios.get('http://127.0.0.1:9532/api/register/get', {
  1526. params: forms,
  1527. headers: {
  1528. 'Permission': 5
  1529. }
  1530. })
  1531. .then(function(response) {
  1532. if (response.data.state == 0) {
  1533. that.$message.error(response.data.msg)
  1534. that.loadingone = false
  1535. that.$refs.register.hide()
  1536. return false
  1537. } else {
  1538. if (response.data.data.failed_code == -10) {
  1539. // that.$message.error(response.data.data.msg);
  1540. that.$confirm(response.data.data.msg, '医保错误信息', {
  1541. confirmButtonText: '确 定',
  1542. type: 'warning'
  1543. }).then(() => {
  1544. }).catch(() => {
  1545. })
  1546. } else {
  1547. that.radio = 1
  1548. that.changeRadioAndPatient(1)
  1549. that.$message({ message: '挂号成功', type: 'success', duration: 5000 })
  1550. that.$refs.register.hide()
  1551. that.loadingone = false
  1552. }
  1553. }
  1554. })
  1555. .catch(function(error) {
  1556. })
  1557. }
  1558. },
  1559. cancel() {
  1560. this.$refs.register.hide()
  1561. },
  1562. addCharges() {
  1563. this.$refs.additionalCharges.show()
  1564. },
  1565. changeDate(val) {
  1566. if (this.patientInfo.id == 0) {
  1567. this.$message.error('请先选择患者')
  1568. return
  1569. }
  1570. let params = {
  1571. 'record_date': val,
  1572. 'patient_id': this.patientInfo.id,
  1573. 'type': this.radio,
  1574. 'p_type': 2,
  1575. 'his_patient_id': this.hisPatientInfo.id
  1576. }
  1577. getChargeHisPatientInfo(params).then(response => {
  1578. if (response.data.state == 0) {
  1579. this.$message.error(response.data.msg)
  1580. return false
  1581. } else {
  1582. this.prescriptions = []
  1583. this.month_prescriptions = []
  1584. this.curPrescriptions = {}
  1585. this.month_prescriptions = {}
  1586. this.patientInfo = response.data.data.xt_info
  1587. this.hisPatientInfo = response.data.data.his_info
  1588. this.info = response.data.data.info
  1589. this.order = response.data.data.order
  1590. this.addtions_charge = response.data.data.addtions_charge
  1591. // this.setMonthPrescription(response.data.data.month_prescriptions)
  1592. for (let i = 0; i < response.data.data.prescription.length; i++) {
  1593. var prescription = response.data.data.prescription[i]
  1594. let tempAdvice = []
  1595. let tempProject = []
  1596. for (let b = 0; b < prescription.advices.length; b++) {
  1597. let spec = prescription.advices[b].drug.dose + prescription.advices[b].drug.dose_unit + '*' + prescription.advices[b].drug.min_number + prescription.advices[b].drug.min_unit + '/' + prescription.advices[b].drug.max_unit
  1598. let obj = {
  1599. advice_id: prescription.advices[b].id,
  1600. drug_name: prescription.advices[b].advice_name,
  1601. single_dose: prescription.advices[b].single_dose,
  1602. delivery_way: prescription.advices[b].delivery_way,
  1603. execution_frequency: prescription.advices[b].execution_frequency,
  1604. retail_price: prescription.advices[b].price,
  1605. remark: prescription.advices[b].remark,
  1606. day: prescription.advices[b].day,
  1607. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  1608. single_dose_unit: prescription.advices[b].single_dose_unit,
  1609. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  1610. medical_insurance_number: prescription.advices[b].med_list_codg,
  1611. code: prescription.advices[b].drug.medical_insurance_number,
  1612. spec: spec,
  1613. det_item_fee_sumamt: prescription.advices[b].order_info.det_item_fee_sumamt,
  1614. name_id: prescription.advices[b].drug.manufacturer,
  1615. fulamt_ownpay_amt: prescription.advices[b].order_info.fulamt_ownpay_amt,
  1616. overlmt_amt: prescription.advices[b].order_info.overlmt_amt,
  1617. preselfpay_amt: prescription.advices[b].order_info.preselfpay_amt,
  1618. inscp_scp_amt: prescription.advices[b].order_info.inscp_scp_amt,
  1619. execution_state: prescription.advices[b].execution_state
  1620. }
  1621. tempAdvice.push(obj)
  1622. }
  1623. for (let b = 0; b < prescription.project.length; b++) {
  1624. let obj = {
  1625. id: prescription.project[b].id,
  1626. project_id: prescription.project[b].project.id,
  1627. // project_name: prescription.project[b].project.project_name,
  1628. // statistical_classification: prescription.project[b].project.statistical_classification,
  1629. single_dose: prescription.project[b].single_dose,
  1630. delivery_way: prescription.project[b].delivery_way,
  1631. execution_frequency: prescription.project[b].execution_frequency,
  1632. number_days: prescription.project[b].day,
  1633. total: prescription.project[b].count.toString(),
  1634. price: prescription.project[b].price,
  1635. remark: prescription.project[b].remark,
  1636. // medical_code: prescription.project[b].project.medical_code,
  1637. unit: prescription.project[b].unit,
  1638. type: prescription.project[b].type,
  1639. det_item_fee_sumamt: prescription.project[b].order_info.det_item_fee_sumamt,
  1640. fulamt_ownpay_amt: prescription.project[b].order_info.fulamt_ownpay_amt,
  1641. overlmt_amt: prescription.project[b].order_info.overlmt_amt,
  1642. preselfpay_amt: prescription.project[b].order_info.preselfpay_amt,
  1643. inscp_scp_amt: prescription.project[b].order_info.inscp_scp_amt,
  1644. execution_state: prescription.project[b].execution_state
  1645. }
  1646. if (prescription.project[b].type == 2) {
  1647. obj['statistical_classification'] = prescription.project[b].project.statistical_classification
  1648. obj['medical_code'] = prescription.project[b].project.medical_code
  1649. obj['project_name'] = prescription.project[b].project.project_name
  1650. obj['spec'] = ''
  1651. obj['name_id'] = 0
  1652. } else if (prescription.project[b].type == 3) {
  1653. obj['statistical_classification'] = ''
  1654. obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
  1655. obj['project_name'] = prescription.project[b].good_info.good_name
  1656. obj['spec'] = prescription.project[b].good_info.specification_name
  1657. obj['name_id'] = prescription.project[b].good_info.manufacturer
  1658. }
  1659. tempProject.push(obj)
  1660. }
  1661. let index = i + 1
  1662. let obj = {
  1663. id: prescription.id,
  1664. name: '处方' + index,
  1665. advices: tempAdvice,
  1666. project: tempProject,
  1667. type: prescription.type,
  1668. order_status: prescription.order_status
  1669. }
  1670. this.prescriptions.push(obj)
  1671. }
  1672. this.curPrescriptions = this.prescriptions[0]
  1673. this.total = 0
  1674. this.total = this.getTotalOne()
  1675. this.month_total = 0
  1676. this.month_total = this.getMonthTotalOne()
  1677. }
  1678. })
  1679. },
  1680. getInitData() {
  1681. getInitData().then(response => {
  1682. if (response.data.state == 0) {
  1683. this.$message.error(response.data.msg)
  1684. return false
  1685. } else {
  1686. this.doctors = response.data.data.doctors
  1687. this.department = response.data.data.department
  1688. this.sick = response.data.data.sick
  1689. this.diagnoses = response.data.data.diagnose
  1690. this.manufacturers = response.data.data.manufacturers
  1691. console.log('生产厂家')
  1692. console.log(this.manufacturers)
  1693. }
  1694. })
  1695. },
  1696. getDayPatientList() {
  1697. let params = {
  1698. 'record_date': this.record_date
  1699. }
  1700. getChargeHisPatientList(params).then(response => {
  1701. if (response.data.state == 0) {
  1702. this.$message.error(response.data.msg)
  1703. return false
  1704. } else {
  1705. this.patientTableData = []
  1706. this.all_table_data = []
  1707. this.hisPatientDatas = []
  1708. let one_count = 0
  1709. let two_count = 0
  1710. let three_count = 0
  1711. for (let i = 0; i < response.data.data.list.length; i++) {
  1712. if (response.data.data.list[i].his_patient.length == 0) { //没挂号
  1713. if (response.data.data.list[i].prescription.length > 0) {
  1714. let obj = {
  1715. id: response.data.data.list[i].id,
  1716. name: response.data.data.list[i].name,
  1717. number: '',
  1718. order_status: 0,
  1719. order_number: '',
  1720. his_patient_id: 0,
  1721. prescription: response.data.data.list[i].prescription
  1722. }
  1723. this.all_table_data.push(obj)
  1724. }
  1725. } else { //挂号
  1726. if (response.data.data.list[i].his_patient.length == 1) {
  1727. if (response.data.data.list[i].his_patient[0].orders.length > 0) {
  1728. for (let b = 0; b < response.data.data.list[i].his_patient[0].orders.length; b++) {
  1729. let obj = {
  1730. id: response.data.data.list[i].id,
  1731. name: response.data.data.list[i].name,
  1732. number: response.data.data.list[i].his_patient[0].number,
  1733. order_status: response.data.data.list[i].his_patient[0].orders[b].order_status,
  1734. his_patient_id: response.data.data.list[i].his_patient[0].id,
  1735. order_number: response.data.data.list[i].his_patient[0].orders[b].order_number,
  1736. order_id: response.data.data.list[i].his_patient[0].orders[b].id,
  1737. prescription: response.data.data.list[i].prescription
  1738. }
  1739. this.all_table_data.push(obj)
  1740. }
  1741. } else {
  1742. let obj = {
  1743. id: response.data.data.list[i].id,
  1744. name: response.data.data.list[i].name,
  1745. number: response.data.data.list[i].his_patient[0].number,
  1746. order_status: 0,
  1747. his_patient_id: response.data.data.list[i].his_patient[0].id,
  1748. order_number: '',
  1749. order_id: 0,
  1750. prescription: response.data.data.list[i].prescription
  1751. }
  1752. this.all_table_data.push(obj)
  1753. }
  1754. }
  1755. if (response.data.data.list[i].his_patient.length > 1) {
  1756. for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
  1757. if (response.data.data.list[i].his_patient[b].orders.length == 0) {
  1758. let obj = {
  1759. id: response.data.data.list[i].id,
  1760. name: response.data.data.list[i].name,
  1761. number: response.data.data.list[i].his_patient[b].number,
  1762. order_status: 0,
  1763. his_patient_id: response.data.data.list[i].his_patient[b].id,
  1764. order_number: '',
  1765. order_id: 0,
  1766. prescription: response.data.data.list[i].prescription
  1767. }
  1768. this.all_table_data.push(obj)
  1769. } else {
  1770. for (let c = 0; c < response.data.data.list[i].his_patient[b].orders.length; c++) {
  1771. let obj = {
  1772. id: response.data.data.list[i].id,
  1773. name: response.data.data.list[i].name,
  1774. number: response.data.data.list[i].his_patient[b].number,
  1775. order_status: response.data.data.list[i].his_patient[b].orders[c].order_status,
  1776. his_patient_id: response.data.data.list[i].his_patient[b].id,
  1777. order_number: response.data.data.list[i].his_patient[b].orders[c].number,
  1778. order_id: response.data.data.list[i].his_patient[b].orders[c].id,
  1779. prescription: response.data.data.list[i].prescription
  1780. }
  1781. this.all_table_data.push(obj)
  1782. }
  1783. }
  1784. }
  1785. }
  1786. }
  1787. }
  1788. for (let i = 0; i < this.all_table_data.length; i++) {
  1789. if (this.all_table_data[i].his_patient_id > 0) {
  1790. this.hisPatientDatas.push(this.all_table_data[i])
  1791. }
  1792. }
  1793. let unChargePatient = []
  1794. for (let i = 0; i < this.all_table_data.length; i++) {
  1795. let isHasUnCharge = false
  1796. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  1797. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  1798. isHasUnCharge = true
  1799. } else {
  1800. if (this.all_table_data[i].his_patient_id > 0) {
  1801. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  1802. isHasUnCharge = true
  1803. }
  1804. }
  1805. }
  1806. }
  1807. 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) {
  1808. isHasUnCharge = true
  1809. }
  1810. if (isHasUnCharge) {
  1811. unChargePatient.push(this.all_table_data[i])
  1812. }
  1813. }
  1814. unChargePatient = this.unique_four(unChargePatient)
  1815. one_count = one_count + unChargePatient.length
  1816. let ChargePatient = []
  1817. for (let i = 0; i < this.all_table_data.length; i++) {
  1818. if (this.all_table_data[i].order_status == 2) {
  1819. ChargePatient.push(this.all_table_data[i])
  1820. }
  1821. }
  1822. two_count = two_count + ChargePatient.length
  1823. if (this.radio == 1) {
  1824. this.all_table_data = this.unique_four(this.all_table_data)
  1825. }
  1826. console.log(this.all_table_data)
  1827. switch (this.radio) {
  1828. case 1:
  1829. this.patientTableData = []
  1830. for (let i = 0; i < this.all_table_data.length; i++) {
  1831. let isHasUnCharge = false
  1832. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  1833. console.log('!111111111')
  1834. console.log(this.all_table_data[i].order_status)
  1835. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  1836. console.log('!22222222222')
  1837. isHasUnCharge = true
  1838. } else {
  1839. if (this.all_table_data[i].his_patient_id > 0) {
  1840. console.log('!4444444444444')
  1841. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  1842. isHasUnCharge = true
  1843. console.log('!33333333333')
  1844. }
  1845. }
  1846. }
  1847. }
  1848. 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) {
  1849. console.log('11111111')
  1850. isHasUnCharge = true
  1851. }
  1852. if (isHasUnCharge) {
  1853. this.patientTableData.push(this.all_table_data[i])
  1854. }
  1855. }
  1856. this.all_patient = this.patientTableData
  1857. break
  1858. case 2:
  1859. this.patientTableData = []
  1860. for (let i = 0; i < this.all_table_data.length; i++) {
  1861. if (this.all_table_data[i].order_status == 2) {
  1862. this.patientTableData.push(this.all_table_data[i])
  1863. }
  1864. }
  1865. this.all_patient = this.patientTableData
  1866. break
  1867. case 4:
  1868. this.patientTableData = []
  1869. this.patientTableData = this.all_table_data
  1870. this.all_patient = this.patientTableData
  1871. break
  1872. }
  1873. this.cal_one = one_count
  1874. this.cal_two = two_count
  1875. this.cal_three = one_count + two_count
  1876. this.current_index = 0
  1877. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  1878. this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
  1879. }
  1880. })
  1881. },
  1882. getMonthPatientList() {
  1883. let params = {
  1884. 'record_date': this.record_date
  1885. }
  1886. getChargeHisPatientList(params).then(response => {
  1887. if (response.data.state == 0) {
  1888. this.$message.error(response.data.msg)
  1889. return false
  1890. } else {
  1891. this.patientTableData = []
  1892. this.all_table_data = []
  1893. this.hisPatientDatas = []
  1894. let one_count = 0
  1895. let two_count = 0
  1896. let three_count = 0
  1897. for (let i = 0; i < response.data.data.list.length; i++) {
  1898. if (response.data.data.list[i].his_patient.length == 0) { //没挂号
  1899. if (response.data.data.list[i].prescription.length > 0) {
  1900. let obj = {
  1901. id: response.data.data.list[i].id,
  1902. name: response.data.data.list[i].name,
  1903. number: '',
  1904. order_status: 0,
  1905. order_number: '',
  1906. his_patient_id: 0,
  1907. prescription: response.data.data.list[i].prescription
  1908. }
  1909. this.all_table_data.push(obj)
  1910. }
  1911. } else { //挂号
  1912. if (response.data.data.list[i].his_patient.length == 1) {
  1913. if (response.data.data.list[i].his_patient[0].orders.length > 0) {
  1914. for (let b = 0; b < response.data.data.list[i].his_patient[0].orders.length; b++) {
  1915. let obj = {
  1916. id: response.data.data.list[i].id,
  1917. name: response.data.data.list[i].name,
  1918. number: response.data.data.list[i].his_patient[0].number,
  1919. order_status: response.data.data.list[i].his_patient[0].orders[b].order_status,
  1920. his_patient_id: response.data.data.list[i].his_patient[0].id,
  1921. order_number: response.data.data.list[i].his_patient[0].orders[b].order_number,
  1922. order_id: response.data.data.list[i].his_patient[0].orders[b].id,
  1923. prescription: response.data.data.list[i].prescription
  1924. }
  1925. this.all_table_data.push(obj)
  1926. }
  1927. } else {
  1928. let obj = {
  1929. id: response.data.data.list[i].id,
  1930. name: response.data.data.list[i].name,
  1931. number: response.data.data.list[i].his_patient[0].number,
  1932. order_status: 0,
  1933. his_patient_id: response.data.data.list[i].his_patient[0].id,
  1934. order_number: '',
  1935. order_id: 0,
  1936. prescription: response.data.data.list[i].prescription
  1937. }
  1938. this.all_table_data.push(obj)
  1939. }
  1940. }
  1941. if (response.data.data.list[i].his_patient.length > 1) {
  1942. for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
  1943. if (response.data.data.list[i].his_patient[b].orders.length == 0) {
  1944. let obj = {
  1945. id: response.data.data.list[i].id,
  1946. name: response.data.data.list[i].name,
  1947. number: response.data.data.list[i].his_patient[b].number,
  1948. order_status: 0,
  1949. his_patient_id: response.data.data.list[i].his_patient[b].id,
  1950. order_number: '',
  1951. order_id: 0,
  1952. prescription: response.data.data.list[i].prescription
  1953. }
  1954. this.all_table_data.push(obj)
  1955. } else {
  1956. for (let c = 0; c < response.data.data.list[i].his_patient[b].orders.length; c++) {
  1957. let obj = {
  1958. id: response.data.data.list[i].id,
  1959. name: response.data.data.list[i].name,
  1960. number: response.data.data.list[i].his_patient[b].number,
  1961. order_status: response.data.data.list[i].his_patient[b].orders[c].order_status,
  1962. his_patient_id: response.data.data.list[i].his_patient[b].id,
  1963. order_number: response.data.data.list[i].his_patient[b].orders[c].number,
  1964. order_id: response.data.data.list[i].his_patient[b].orders[c].id,
  1965. prescription: response.data.data.list[i].prescription
  1966. }
  1967. this.all_table_data.push(obj)
  1968. }
  1969. }
  1970. }
  1971. }
  1972. }
  1973. }
  1974. for (let i = 0; i < this.all_table_data.length; i++) {
  1975. if (this.all_table_data[i].his_patient_id > 0) {
  1976. this.hisPatientDatas.push(this.all_table_data[i])
  1977. }
  1978. }
  1979. let unChargePatient = []
  1980. for (let i = 0; i < this.all_table_data.length; i++) {
  1981. let isHasUnCharge = false
  1982. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  1983. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  1984. isHasUnCharge = true
  1985. } else {
  1986. if (this.all_table_data[i].his_patient_id > 0) {
  1987. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  1988. isHasUnCharge = true
  1989. }
  1990. }
  1991. }
  1992. }
  1993. 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) {
  1994. isHasUnCharge = true
  1995. }
  1996. if (isHasUnCharge) {
  1997. unChargePatient.push(this.all_table_data[i])
  1998. }
  1999. }
  2000. unChargePatient = this.unique_four(unChargePatient)
  2001. one_count = one_count + unChargePatient.length
  2002. let ChargePatient = []
  2003. for (let i = 0; i < this.all_table_data.length; i++) {
  2004. if (this.all_table_data[i].order_status == 2) {
  2005. ChargePatient.push(this.all_table_data[i])
  2006. }
  2007. }
  2008. two_count = two_count + ChargePatient.length
  2009. if (this.radio == 1) {
  2010. this.all_table_data = this.unique_four(this.all_table_data)
  2011. }
  2012. console.log(this.all_table_data)
  2013. switch (this.radio) {
  2014. case 1:
  2015. this.patientTableData = []
  2016. for (let i = 0; i < this.all_table_data.length; i++) {
  2017. let isHasUnCharge = false
  2018. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  2019. console.log('!111111111')
  2020. console.log(this.all_table_data[i].order_status)
  2021. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  2022. console.log('!22222222222')
  2023. isHasUnCharge = true
  2024. } else {
  2025. if (this.all_table_data[i].his_patient_id > 0) {
  2026. console.log('!4444444444444')
  2027. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  2028. isHasUnCharge = true
  2029. console.log('!33333333333')
  2030. }
  2031. }
  2032. }
  2033. }
  2034. 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) {
  2035. console.log('11111111')
  2036. isHasUnCharge = true
  2037. }
  2038. if (isHasUnCharge) {
  2039. this.patientTableData.push(this.all_table_data[i])
  2040. }
  2041. }
  2042. this.all_patient = this.patientTableData
  2043. break
  2044. case 2:
  2045. this.patientTableData = []
  2046. for (let i = 0; i < this.all_table_data.length; i++) {
  2047. if (this.all_table_data[i].order_status == 2) {
  2048. this.patientTableData.push(this.all_table_data[i])
  2049. }
  2050. }
  2051. this.all_patient = this.patientTableData
  2052. break
  2053. case 4:
  2054. this.patientTableData = []
  2055. this.patientTableData = this.all_table_data
  2056. this.all_patient = this.patientTableData
  2057. break
  2058. }
  2059. this.cal_one = one_count
  2060. this.cal_two = two_count
  2061. this.cal_three = one_count + two_count
  2062. this.current_index = 0
  2063. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  2064. this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
  2065. }
  2066. })
  2067. },
  2068. handleClick() {
  2069. this.loading = true
  2070. if (this.activeName == 'first') {
  2071. this.getPatientList()
  2072. } else if (this.activeName == 'second') {
  2073. const params = {
  2074. 'record_date': this.record_date,
  2075. 'patient_id': this.patientInfo.id,
  2076. 'his_patient_id': this.hisPatientInfo.id,
  2077. 'start_time': this.other_start_time,
  2078. 'end_time': this.other_end_time,
  2079. 'type': this.radio,
  2080. 'p_type': 2,
  2081. 'order_id': this.order.id
  2082. }
  2083. getMonthCharge(params).then(response => {
  2084. if (response.data.state == 1) {
  2085. this.loading = false
  2086. this.month_prescriptions = []
  2087. this.setMonthPrescription(response.data.data.month_prescriptions)
  2088. this.curMonthPrescriptions = this.month_prescriptions[0]
  2089. } else {
  2090. this.$message.error(response.data.msg)
  2091. }
  2092. })
  2093. } else {
  2094. const params = {
  2095. 'record_date': this.record_date,
  2096. 'patient_id': this.patientInfo.id,
  2097. 'his_patient_id': this.hisPatientInfo.id,
  2098. 'start_time': this.other_start_time_two,
  2099. 'end_time': this.other_end_time_two,
  2100. 'type': this.radio,
  2101. 'p_type': 2,
  2102. 'order_id': this.order.id
  2103. }
  2104. getDayOrMonthHisPrescription(params).then(response => {
  2105. if (response.data.state == 1) {
  2106. this.loading = false
  2107. this.big_prescriptions_two = []
  2108. this.setMonthPrescriptionTwo(response.data.data.day_prescription)
  2109. this.newCurMonthPrescriptions = this.big_prescriptions_two[0]
  2110. } else {
  2111. this.$message.error(response.data.msg)
  2112. }
  2113. })
  2114. }
  2115. },
  2116. setMonthPrescriptionTwo(month_prescriptions) {
  2117. const big_prescriptions = []
  2118. for (let i = 0; i < this.unique_three(month_prescriptions).length; i++) {
  2119. const obj = {
  2120. med_type: this.unique_three(month_prescriptions)[i].med_type,
  2121. prescriptions: []
  2122. }
  2123. big_prescriptions.push(obj)
  2124. }
  2125. for (let c = 0; c < big_prescriptions.length; c++) {
  2126. const inner_prescription = []
  2127. for (let i = 0; i < month_prescriptions.length; i++) {
  2128. var prescription = month_prescriptions[i]
  2129. if (big_prescriptions[c].med_type == prescription.med_type) {
  2130. const tempAdvice = []
  2131. const tempProject = []
  2132. const tempAddition = []
  2133. for (let b = 0; b < prescription.advices.length; b++) {
  2134. let spec = prescription.advices[b].drug.dose + prescription.advices[b].drug.dose_unit + '*' + prescription.advices[b].drug.min_number + prescription.advices[b].drug.min_unit + '/' + prescription.advices[b].drug.max_unit
  2135. const obj = {
  2136. advice_id: prescription.advices[b].id,
  2137. drug_name: prescription.advices[b].advice_name,
  2138. single_dose: prescription.advices[b].single_dose,
  2139. delivery_way: prescription.advices[b].delivery_way,
  2140. execution_frequency: prescription.advices[b].execution_frequency,
  2141. retail_price: prescription.advices[b].price.toString(),
  2142. remark: prescription.advices[b].remark,
  2143. day: prescription.advices[b].day,
  2144. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  2145. single_dose_unit: prescription.advices[b].single_dose_unit,
  2146. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  2147. code: prescription.advices[b].drug.medical_insurance_number,
  2148. spec: spec,
  2149. det_item_fee_sumamt: prescription.advices[b].order_info.det_item_fee_sumamt,
  2150. name_id: prescription.advices[b].drug.manufacturer,
  2151. fulamt_ownpay_amt: prescription.advices[b].order_info.fulamt_ownpay_amt,
  2152. overlmt_amt: prescription.advices[b].order_info.overlmt_amt,
  2153. preselfpay_amt: prescription.advices[b].order_info.preselfpay_amt,
  2154. inscp_scp_amt: prescription.advices[b].order_info.inscp_scp_amt,
  2155. execution_state: prescription.advices[b].execution_state
  2156. }
  2157. tempAdvice.push(obj)
  2158. }
  2159. for (let b = 0; b < prescription.project.length; b++) {
  2160. const obj = {
  2161. id: prescription.project[b].id,
  2162. project_id: prescription.project[b].project.id,
  2163. // project_name: prescription.project[b].project.project_name,
  2164. // statistical_classification: prescription.project[b].project.statistical_classification,
  2165. single_dose: prescription.project[b].single_dose,
  2166. delivery_way: prescription.project[b].delivery_way,
  2167. execution_frequency: prescription.project[b].execution_frequency,
  2168. number_days: prescription.project[b].day,
  2169. total: prescription.project[b].count.toString(),
  2170. price: prescription.project[b].price,
  2171. remark: prescription.project[b].remark,
  2172. // medical_code: prescription.project[b].project.medical_code,
  2173. unit: prescription.project[b].unit,
  2174. type: prescription.project[b].type,
  2175. execution_state: prescription.project[b].execution_state,
  2176. det_item_fee_sumamt: prescription.project[b].order_info.det_item_fee_sumamt,
  2177. fulamt_ownpay_amt: prescription.project[b].order_info.fulamt_ownpay_amt,
  2178. overlmt_amt: prescription.project[b].order_info.overlmt_amt,
  2179. preselfpay_amt: prescription.project[b].order_info.preselfpay_amt,
  2180. inscp_scp_amt: prescription.project[b].order_info.inscp_scp_amt
  2181. }
  2182. if (prescription.project[b].type == 2) {
  2183. obj['statistical_classification'] = prescription.project[b].project.statistical_classification
  2184. obj['medical_code'] = prescription.project[b].project.medical_code
  2185. obj['project_name'] = prescription.project[b].project.project_name
  2186. obj['spec'] = ''
  2187. obj['name_id'] = 0
  2188. } else if (prescription.project[b].type == 3) {
  2189. obj['statistical_classification'] = ''
  2190. obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
  2191. obj['project_name'] = prescription.project[b].good_info.good_name
  2192. obj['spec'] = prescription.project[b].good_info.specification_name
  2193. obj['name_id'] = prescription.project[b].good_info.manufacturer
  2194. }
  2195. tempProject.push(obj)
  2196. }
  2197. const index = i + 1
  2198. prescription.order.order_status = prescription.order.order_status.toString()
  2199. prescription.order.order_status = parseInt(prescription.order.order_status)
  2200. const obj = {
  2201. id: prescription.id,
  2202. name: this.getPName(prescription.med_type, index),
  2203. advices: tempAdvice,
  2204. project: tempProject,
  2205. addition: tempAddition,
  2206. order_status: prescription.order_status,
  2207. type: prescription.type,
  2208. med_type: prescription.med_type,
  2209. order: prescription.order
  2210. }
  2211. // inner_prescription.push(obj)
  2212. big_prescriptions[c].prescriptions.push(obj)
  2213. this.prescriptions.push(obj)
  2214. }
  2215. }
  2216. }
  2217. this.big_prescriptions_two = JSON.parse(JSON.stringify(big_prescriptions))
  2218. // for (let i = 0; i < this.big_prescriptions_two.length; i++) {
  2219. // if (this.big_prescriptions_two[i].med_type == '11') {
  2220. // this.big_prescriptions_two[i]['is_true'] = 1
  2221. // }
  2222. // }
  2223. // for (let i = 0; i < this.big_prescriptions_two.length; i++) {
  2224. // if (this.big_prescriptions_two[i].is_true == 1) {
  2225. // for (let b = 0; b < this.big_prescriptions_two[i].prescriptions.length; b++) {
  2226. // const obj = {
  2227. // med_type: '11',
  2228. // prescriptions: []
  2229. // }
  2230. // const arr = []
  2231. // arr.push(this.big_prescriptions_two[i].prescriptions[b])
  2232. // obj.prescriptions = arr
  2233. // this.big_prescriptions_two.push(obj)
  2234. // }
  2235. // }
  2236. // }
  2237. // for (let i = 0; i < this.big_prescriptions_two.length; i++) {
  2238. // if (this.big_prescriptions_two[i].is_true == 1) {
  2239. // this.big_prescriptions_two.splice(i, 1)
  2240. // }
  2241. // }
  2242. // console.log(this.big_prescriptions)
  2243. for (let i = 0; i < this.big_prescriptions_two.length; i++) {
  2244. if (this.big_prescriptions_two[i].prescriptions.length > 0) {
  2245. this.big_prescriptions_two[i]['curPrescriptions'] = JSON.parse(JSON.stringify(this.big_prescriptions_two[i].prescriptions[0]))
  2246. } else {
  2247. this.big_prescriptions_two[i]['curPrescriptions'] = {}
  2248. }
  2249. this.big_prescriptions_two[i]['total'] = this.getTotalThree(this.big_prescriptions_two[i])
  2250. }
  2251. if (this.big_prescriptions_two.length > 0) {
  2252. this.editableTabsValue = this.getPName(this.big_prescriptions_two[0].med_type, 1)
  2253. }
  2254. },
  2255. searchAction() {
  2256. if (this.search_input.length == 0) {
  2257. this.patientTableData = this.all_patient
  2258. } else {
  2259. let arr = []
  2260. for (let i = 0; i < this.all_patient.length; i++) {
  2261. if (this.all_patient[i].name.indexOf(this.search_input) != -1 || this.all_patient[i].number.indexOf(this.search_input) != -1) {
  2262. arr = arr.concat(this.all_patient[i])
  2263. }
  2264. }
  2265. this.patientTableData = arr
  2266. }
  2267. },
  2268. tabclickEventTwo(val) {
  2269. for (let b = 0; b < this.big_month_prescriptions.length; b++) {
  2270. for (let i = 0; i < this.big_month_prescriptions[b].month_prescriptions.length; i++) {
  2271. if (this.big_month_prescriptions[b].month_prescriptions[i].name == val.name) {
  2272. this.big_month_prescriptions[b].curMonthPrescriptions = {}
  2273. var temp = this.deepClone(this.big_month_prescriptions[b].month_prescriptions[i])
  2274. this.big_month_prescriptions[b].curMonthPrescriptions = temp
  2275. this.big_month_prescriptions[b].month_total = this.getMonthTotalTwo(temp)
  2276. }
  2277. }
  2278. }
  2279. // this.prescription_id = this.month_prescriptions.id
  2280. // this.month_total = 0
  2281. },
  2282. tabclickEventThree(val) {
  2283. for (let i = 0; i < this.big_prescriptions_two.length; i++) {
  2284. for (let b = 0; b < this.big_prescriptions_two[i].prescriptions.length; b++) {
  2285. if (this.big_prescriptions_two[i].prescriptions[b].name == val.name) {
  2286. var temp = this.deepClone(this.big_prescriptions_two[i].prescriptions[b])
  2287. this.big_prescriptions_two[i].curPrescriptions = temp
  2288. this.big_prescriptions_two[i].total = 0
  2289. this.big_prescriptions_two[i].total = this.getTotalThree(this.big_prescriptions_two[i])
  2290. }
  2291. }
  2292. }
  2293. },
  2294. tabclickEvent(val) {
  2295. for (let i = 0; i < this.big_prescriptions.length; i++) {
  2296. for (let b = 0; b < this.big_prescriptions[i].prescriptions.length; b++) {
  2297. if (this.big_prescriptions[i].prescriptions[b].name == val.name) {
  2298. var temp = this.deepClone(this.big_prescriptions[i].prescriptions[b])
  2299. this.big_prescriptions[i].curPrescriptions = temp
  2300. // this.prescription_id = this.curPrescriptions.id
  2301. this.big_prescriptions[i].total = 0
  2302. this.big_prescriptions[i].total = this.getTotalThree(this.big_prescriptions[i])
  2303. }
  2304. }
  2305. }
  2306. },
  2307. deepClone(source) {
  2308. if (!source && typeof source !== 'object') {
  2309. throw new Error('error arguments', 'shallowClone')
  2310. }
  2311. const targetObj = source.constructor === Array ? [] : {}
  2312. Object.keys(source).forEach((keys) => {
  2313. if (source[keys] && typeof source[keys] === 'object') {
  2314. targetObj[keys] = this.deepClone(source[keys])
  2315. } else {
  2316. targetObj[keys] = source[keys]
  2317. }
  2318. })
  2319. return targetObj
  2320. },
  2321. getTotalOne(big_prescriptions) {
  2322. var total = 0
  2323. if (this.curPrescriptions.type == 1) {
  2324. if (this.curPrescriptions.advices != null) {
  2325. for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
  2326. total = parseFloat(total) + parseFloat(this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number)
  2327. }
  2328. }
  2329. } else {
  2330. if (this.curPrescriptions.project != null) {
  2331. for (let b = 0; b < this.curPrescriptions.project.length; b++) {
  2332. total = parseFloat(total) + parseFloat(this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total)
  2333. }
  2334. }
  2335. }
  2336. if (this.curPrescriptions.addition != null) {
  2337. for (let b = 0; b < this.curPrescriptions.addition.length; b++) {
  2338. total = parseFloat(total) + parseFloat(this.curPrescriptions.addition[b].price * this.curPrescriptions.addition[b].count)
  2339. }
  2340. }
  2341. return total.toFixed(2)
  2342. },
  2343. getTotalThree(big_prescriptions) {
  2344. var total = 0
  2345. if (big_prescriptions.curPrescriptions.type == 1) {
  2346. if (big_prescriptions.curPrescriptions.advices != null) {
  2347. for (let a = 0; a < big_prescriptions.curPrescriptions.advices.length; a++) {
  2348. total = parseFloat(total) + parseFloat(big_prescriptions.curPrescriptions.advices[a].retail_price * big_prescriptions.curPrescriptions.advices[a].prescribing_number)
  2349. }
  2350. }
  2351. } else {
  2352. if (big_prescriptions.curPrescriptions.project != null) {
  2353. for (let b = 0; b < big_prescriptions.curPrescriptions.project.length; b++) {
  2354. total = parseFloat(total) + parseFloat(big_prescriptions.curPrescriptions.project[b].price * big_prescriptions.curPrescriptions.project[b].total)
  2355. }
  2356. }
  2357. }
  2358. if (big_prescriptions.curPrescriptions.addition != null) {
  2359. for (let b = 0; b < big_prescriptions.curPrescriptions.addition.length; b++) {
  2360. total = parseFloat(total) + parseFloat(big_prescriptions.curPrescriptions.addition[b].price * big_prescriptions.curPrescriptions.addition[b].count)
  2361. }
  2362. }
  2363. return total.toFixed(2)
  2364. },
  2365. getMonthTotalOne() {
  2366. var total = 0
  2367. if (this.curMonthPrescriptions.type == 1) {
  2368. if (this.curMonthPrescriptions.advices != null) {
  2369. for (let a = 0; a < this.curMonthPrescriptions.advices.length; a++) {
  2370. total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.advices[a].retail_price * this.curMonthPrescriptions.advices[a].prescribing_number)
  2371. }
  2372. }
  2373. } else {
  2374. if (this.curMonthPrescriptions.project != null) {
  2375. for (let b = 0; b < this.curMonthPrescriptions.project.length; b++) {
  2376. total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.project[b].price * this.curMonthPrescriptions.project[b].total)
  2377. }
  2378. }
  2379. }
  2380. if (this.curMonthPrescriptions.addition != null) {
  2381. for (let b = 0; b < this.curMonthPrescriptions.addition.length; b++) {
  2382. total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.addition[b].price * this.curMonthPrescriptions.addition[b].count)
  2383. }
  2384. }
  2385. return total.toFixed(2)
  2386. },
  2387. getMonthTotalTwo(month_prescriptions) {
  2388. var total = 0
  2389. if (month_prescriptions.type == 1) {
  2390. if (month_prescriptions.advices != null) {
  2391. for (let a = 0; a < month_prescriptions.advices.length; a++) {
  2392. total = parseFloat(total) + parseFloat(month_prescriptions.advices[a].retail_price * month_prescriptions.advices[a].prescribing_number)
  2393. }
  2394. }
  2395. } else {
  2396. if (month_prescriptions.project != null) {
  2397. for (let b = 0; b < month_prescriptions.project.length; b++) {
  2398. total = parseFloat(total) + parseFloat(month_prescriptions.project[b].price * month_prescriptions.project[b].total)
  2399. }
  2400. }
  2401. }
  2402. if (month_prescriptions.addition != null) {
  2403. for (let b = 0; b < month_prescriptions.addition.length; b++) {
  2404. total = parseFloat(total) + parseFloat(month_prescriptions.addition[b].price * month_prescriptions.addition[b].count)
  2405. }
  2406. }
  2407. return total.toFixed(2)
  2408. },
  2409. getTotal() {
  2410. var total = 0
  2411. for (let c = 0; c < this.big_prescriptions.length; c++) {
  2412. for (let i = 0; i < this.big_prescriptions[c].prescriptions.length; i++) {
  2413. if (this.big_prescriptions[c].prescriptions[i].advices != null) {
  2414. for (let a = 0; a < this.big_prescriptions[c].prescriptions[i].advices.length; a++) {
  2415. total = parseFloat(total) + parseFloat(this.big_prescriptions[c].prescriptions[i].advices[a].retail_price * this.big_prescriptions[c].prescriptions[i].advices[a].prescribing_number)
  2416. }
  2417. }
  2418. if (this.big_prescriptions[c].prescriptions[i].project != null) {
  2419. for (let b = 0; b < this.big_prescriptions[c].prescriptions[i].project.length; b++) {
  2420. total = parseFloat(total) + parseFloat(this.big_prescriptions[c].prescriptions[i].project[b].price * this.big_prescriptions[c].prescriptions[i].project[b].total)
  2421. }
  2422. }
  2423. if (this.big_prescriptions[c].prescriptions[i].addition != null) {
  2424. for (let b = 0; b < this.big_prescriptions[c].prescriptions[i].addition.length; b++) {
  2425. total = parseFloat(total) + parseFloat(this.big_prescriptions[c].prescriptions[i].addition[b].price * this.big_prescriptions[c].prescriptions[i].addition[b].count)
  2426. }
  2427. }
  2428. }
  2429. }
  2430. return total.toFixed(2)
  2431. },
  2432. getTotalTwo() {
  2433. var total = 0
  2434. for (let i = 0; i < this.month_prescriptions.length; i++) {
  2435. if (this.month_prescriptions[i].advices != null) {
  2436. for (let a = 0; a < this.month_prescriptions[i].advices.length; a++) {
  2437. total = parseFloat(total) + parseFloat(this.month_prescriptions[i].advices[a].retail_price * this.month_prescriptions[i].advices[a].prescribing_number)
  2438. }
  2439. }
  2440. if (this.month_prescriptions[i].project != null) {
  2441. for (let a = 0; a < this.month_prescriptions[i].project.length; a++) {
  2442. total = parseFloat(total) + parseFloat(this.month_prescriptions[i].project[a].price * this.month_prescriptions[i].project[a].total)
  2443. }
  2444. }
  2445. if (this.month_prescriptions[i].addition != null) {
  2446. for (let b = 0; b < this.month_prescriptions[i].addition.length; b++) {
  2447. total = parseFloat(total) + parseFloat(this.month_prescriptions[i].addition[a].price * this.month_prescriptions[i].addition[b].count)
  2448. }
  2449. }
  2450. }
  2451. return total.toFixed(2)
  2452. },
  2453. getTotalFour(month_prescriptions) {
  2454. var total = 0
  2455. for (let i = 0; i < month_prescriptions.length; i++) {
  2456. if (month_prescriptions[i].advices != null) {
  2457. for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
  2458. total = parseFloat(total) + parseFloat(month_prescriptions[i].advices[a].retail_price * month_prescriptions[i].advices[a].prescribing_number)
  2459. }
  2460. }
  2461. if (month_prescriptions[i].project != null) {
  2462. for (let a = 0; a < month_prescriptions[i].project.length; a++) {
  2463. total = parseFloat(total) + parseFloat(month_prescriptions[i].project[a].price * month_prescriptions[i].project[a].total)
  2464. }
  2465. }
  2466. // if (month_prescriptions[i].addition != null) {
  2467. // for (let b = 0; b < month_prescriptions[i].addition.length; b++) {
  2468. // total = parseFloat(total) + parseFloat(month_prescriptions[i].addition[a].price * month_prescriptions[i].addition[b].count)
  2469. // }
  2470. // }
  2471. }
  2472. return total.toFixed(2)
  2473. },
  2474. moreState(tab, event) {
  2475. if (tab == 'more') {
  2476. return false
  2477. }
  2478. }, openZb(index) {
  2479. switch (index) {
  2480. // case 1:
  2481. // if(this.patientInfo.id == 0){
  2482. // this.$message.error("请需要选择挂号的患者")
  2483. // return
  2484. // }
  2485. // if(this.big_prescriptions.length == 0){
  2486. // this.$message.error("处方不能为空")
  2487. // return
  2488. // }
  2489. // if(this.form.diagnosis.length == 0){
  2490. // this.$message.error("诊断不能为空")
  2491. // return
  2492. // }
  2493. // var that = this
  2494. // let obj = {
  2495. // patient_id: this.patientInfo.id,
  2496. // diagnosis_time: this.form.diagnosis_time,
  2497. // record_date: this.record_date,
  2498. // admin_user_id: this.$store.getters.xt_user.user.id,
  2499. // org_id: this.$store.getters.xt_user.org_id
  2500. //
  2501. // }
  2502. // axios.get(process.env.BASE_API +'/coordinate/register', {
  2503. // params: obj
  2504. // })
  2505. // .then(function(response) {
  2506. // if (response.data.state == 0) {
  2507. // that.$message.error(response.data.msg)
  2508. // that.loadingtwo = false
  2509. // return false
  2510. // } else {
  2511. // if (response.data.data.failed_code == -10) {
  2512. // that.$confirm(response.data.data.msg, '医保错误信息', {
  2513. // confirmButtonText: '确 定',
  2514. // type: 'warning'
  2515. // }).then(() => {
  2516. //
  2517. // }).catch(() => {
  2518. // })
  2519. //
  2520. // } else {
  2521. // that.radio = 1
  2522. // that.changeRadioAndPatient(1)
  2523. // that.$message({ message: '登记成功', type: 'success', duration: 5000 })
  2524. // }
  2525. //
  2526. // }
  2527. // })
  2528. // .catch(function(error) {
  2529. //
  2530. // })
  2531. //
  2532. // break
  2533. // case 2:
  2534. // var that = this
  2535. // var obj2 = {
  2536. // id: this.patientInfo.id,
  2537. // record_time: this.record_date,
  2538. // his_patient_id: this.hisPatientInfo.id,
  2539. // org_id: this.$store.getters.xt_user.org_id,
  2540. // p_type:14,
  2541. //
  2542. // }
  2543. // obj2['diagnosis'] = this.form.diagnosis.join(',')
  2544. // obj2['sick_type'] = this.form.sick_type
  2545. // if (this.activeName == 'first') {
  2546. // obj2['settle_accounts_type'] = 1
  2547. // } else if (this.activeName == 'second') {
  2548. // obj2['start_time'] = this.other_start_time
  2549. // obj2['end_time'] = this.other_end_time
  2550. // obj2['settle_accounts_type'] = 2
  2551. // }
  2552. // axios.get(process.env.BASE_API + '/coordinate/opKeepAccounts', {
  2553. // params: obj2
  2554. // })
  2555. // .then(function(response) {
  2556. // if (response.data.state == 0) {
  2557. // that.$message.error(response.data.msg)
  2558. // that.loadingtwo = false
  2559. // return false
  2560. // } else {
  2561. // if (response.data.data.failed_code == -10) {
  2562. // that.$confirm(response.data.data.msg, '医保错误信息', {
  2563. // confirmButtonText: '确 定',
  2564. // type: 'warning'
  2565. // }).then(() => {
  2566. //
  2567. // }).catch(() => {
  2568. // })
  2569. //
  2570. // } else {
  2571. // that.radio = 1
  2572. // that.changeRadioAndPatient(1)
  2573. // that.$message({ message: '记账成功', type: 'success', duration: 5000 })
  2574. // }
  2575. //
  2576. // }
  2577. // })
  2578. // .catch(function(error) {
  2579. //
  2580. // })
  2581. //
  2582. // break
  2583. // case 3:
  2584. // var that = this
  2585. // let obj3 = {
  2586. // order_id:this.order.id,
  2587. // admin_user_id: this.$store.getters.xt_user.user.id,
  2588. // org_id: this.$store.getters.xt_user.org_id
  2589. // }
  2590. // axios.get(process.env.BASE_API + '/coordinate/opCancelKeepAccounts', {
  2591. // params: obj3
  2592. // })
  2593. // .then(function(response) {
  2594. // if (response.data.state == 0) {
  2595. // that.$message.error(response.data.msg)
  2596. // that.loadingtwo = false
  2597. // return false
  2598. // } else {
  2599. // if (response.data.data.failed_code == -10) {
  2600. // that.$confirm(response.data.data.msg, '医保错误信息', {
  2601. // confirmButtonText: '确 定',
  2602. // type: 'warning'
  2603. // }).then(() => {
  2604. //
  2605. // }).catch(() => {
  2606. // })
  2607. //
  2608. // } else {
  2609. // that.radio = 1
  2610. // that.changeRadioAndPatient(1)
  2611. // that.$message({ message: '撤销记账成功', type: 'success', duration: 5000 })
  2612. // }
  2613. //
  2614. // }
  2615. // })
  2616. // .catch(function(error) {
  2617. //
  2618. // })
  2619. //
  2620. // break
  2621. case 4:
  2622. if(this.patientInfo.id == 0){
  2623. this.$message.error("请需要选择挂号的患者")
  2624. return
  2625. }
  2626. if(this.big_prescriptions.length == 0){
  2627. this.$message.error("处方不能为空")
  2628. return
  2629. }
  2630. if(this.form.diagnosis.length == 0){
  2631. this.$message.error("诊断不能为空")
  2632. return
  2633. }
  2634. let obj = {
  2635. patient_id: this.patientInfo.id,
  2636. diagnosis_time: this.form.diagnosis_time,
  2637. record_date: this.record_date,
  2638. admin_user_id: this.$store.getters.xt_user.user.id,
  2639. his_patient_id: this.hisPatientInfo.id,
  2640. p_type:14
  2641. }
  2642. obj['diagnosis'] = this.form.diagnosis.join(',')
  2643. obj['sick_type'] = this.form.sick_type
  2644. if (this.activeName == 'first') {
  2645. obj['settle_accounts_type'] = 1
  2646. } else if (this.activeName == 'second') {
  2647. obj['start_time'] = this.other_start_time
  2648. obj['end_time'] = this.other_end_time
  2649. obj['settle_accounts_type'] = 2
  2650. }
  2651. var that = this
  2652. axios.get("http://127.0.0.1:9532" + '/coordinate/settleAccount', {
  2653. params: obj
  2654. })
  2655. .then(function(response) {
  2656. if (response.data.state == 0) {
  2657. that.$message.error(response.data.msg)
  2658. that.loadingtwo = false
  2659. return false
  2660. } else {
  2661. if (response.data.data.failed_code == -10) {
  2662. that.$confirm(response.data.data.msg, '医保错误信息', {
  2663. confirmButtonText: '确 定',
  2664. type: 'warning'
  2665. }).then(() => {
  2666. }).catch(() => {
  2667. })
  2668. } else {
  2669. that.radio = 1
  2670. that.changeRadioAndPatient(1)
  2671. that.$message({ message: '记账成功', type: 'success', duration: 5000 })
  2672. }
  2673. }
  2674. })
  2675. .catch(function(error) {
  2676. })
  2677. break
  2678. }
  2679. },openZF(index){
  2680. var that = this
  2681. let params = {
  2682. 'order_id': this.order.id,
  2683. 'admin_user_id': this.$store.getters.xt_user.user.id,
  2684. }
  2685. switch (index){
  2686. case 1:
  2687. axios.get('http://127.0.0.1:9532/api/4205', {
  2688. params: params
  2689. }).then(function(response) {
  2690. if (response.data.state == 0) {
  2691. that.$message.error(response.data.msg)
  2692. return false
  2693. } else {
  2694. if (response.data.data.failed_code == -10) {
  2695. that.$confirm(response.data.data.msg, '医保错误信息', {
  2696. confirmButtonText: '确 定',
  2697. type: 'warning'
  2698. }).then(() => {
  2699. }).catch(() => {
  2700. })
  2701. } else {
  2702. that.$message({ message: '上传成功', type: 'success', duration: 5000 })
  2703. }
  2704. }
  2705. })
  2706. .catch(function(error) {
  2707. })
  2708. break
  2709. case 2:
  2710. axios.get('http://127.0.0.1:9532/api/4203', {
  2711. params: params
  2712. }).then(function(response) {
  2713. if (response.data.state == 0) {
  2714. that.$message.error(response.data.msg)
  2715. that.loadingtwo = false
  2716. return false
  2717. } else {
  2718. if (response.data.data.failed_code == -10) {
  2719. that.$confirm(response.data.data.msg, '医保错误信息', {
  2720. confirmButtonText: '确 定',
  2721. type: 'warning'
  2722. }).then(() => {
  2723. }).catch(() => {
  2724. })
  2725. } else {
  2726. that.$message({ message: '确认成功', type: 'success', duration: 5000 })
  2727. }
  2728. }
  2729. })
  2730. .catch(function(error) {
  2731. })
  2732. break
  2733. case 3:
  2734. axios.get('http://127.0.0.1:9532/api/4207', {
  2735. params: params
  2736. }).then(function(response) {
  2737. if (response.data.state == 0) {
  2738. that.$message.error(response.data.msg)
  2739. that.loadingtwo = false
  2740. return false
  2741. } else {
  2742. if (response.data.data.failed_code == -10) {
  2743. that.$confirm(response.data.data.msg, '医保错误信息', {
  2744. confirmButtonText: '确 定',
  2745. type: 'warning'
  2746. }).then(() => {
  2747. }).catch(() => {
  2748. })
  2749. } else {
  2750. that.$confirm("具体内容请查看本地日志文件", '查询成功', {
  2751. confirmButtonText: '确 定',
  2752. type: 'warning'
  2753. }).then(() => {
  2754. }).catch(() => {
  2755. })
  2756. }
  2757. }
  2758. })
  2759. .catch(function(error) {
  2760. })
  2761. break
  2762. case 4:
  2763. axios.get('http://127.0.0.1:9532/api/4208', {
  2764. params: params
  2765. }).then(function(response) {
  2766. if (response.data.state == 0) {
  2767. that.$message.error(response.data.msg)
  2768. that.loadingtwo = false
  2769. return false
  2770. } else {
  2771. if (response.data.data.failed_code == -10) {
  2772. that.$confirm(response.data.data.msg, '医保错误信息', {
  2773. confirmButtonText: '确 定',
  2774. type: 'warning'
  2775. }).then(() => {
  2776. }).catch(() => {
  2777. })
  2778. } else {
  2779. that.$confirm("具体内容请查看本地日志文件", '查询成功', {
  2780. confirmButtonText: '确 定',
  2781. type: 'warning'
  2782. }).then(() => {
  2783. }).catch(() => {
  2784. })
  2785. }
  2786. }
  2787. })
  2788. .catch(function(error) {
  2789. })
  2790. break
  2791. case 5:
  2792. axios.get('http://127.0.0.1:9532/api/4209', {
  2793. params: params
  2794. }).then(function(response) {
  2795. if (response.data.state == 0) {
  2796. that.$message.error(response.data.msg)
  2797. that.loadingtwo = false
  2798. return false
  2799. } else {
  2800. if (response.data.data.failed_code == -10) {
  2801. that.$confirm(response.data.data.msg, '医保错误信息', {
  2802. confirmButtonText: '确 定',
  2803. type: 'warning'
  2804. }).then(() => {
  2805. }).catch(() => {
  2806. })
  2807. } else {
  2808. that.$confirm("具体内容请查看本地日志文件", '查询成功', {
  2809. confirmButtonText: '确 定',
  2810. type: 'warning'
  2811. }).then(() => {
  2812. }).catch(() => {
  2813. })
  2814. }
  2815. }
  2816. })
  2817. .catch(function(error) {
  2818. })
  2819. break
  2820. }
  2821. },
  2822. open(index, med_type, order, prescriptions) {
  2823. this.other_prescriptions = prescriptions
  2824. if (index == 1) {
  2825. } else if (index == 2) {
  2826. this.$router.push('/outpatientDoctorStation/printtwo?record=' + this.record_date)
  2827. } else if (index == 3) {
  2828. let obj = {
  2829. record_date: this.record_date,
  2830. patient_id: this.patient_id,
  2831. prescription_id: this.prescription_id,
  2832. order_id: this.order.id
  2833. }
  2834. this.paramsObj = obj
  2835. this.treatVisible = true
  2836. // this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
  2837. } else if (index == 4) {//收费
  2838. var ids = []
  2839. for (let i = 0; i < prescriptions.length; i++) {
  2840. ids.push(prescriptions[i].id)
  2841. }
  2842. var ids_str = ids.join(',')
  2843. this.temp_ids = ids_str
  2844. this.currentOrder = order
  2845. this.current_med_type = med_type
  2846. if (this.patientInfo.id == 0) {
  2847. this.$message({ message: '该选择要收费的患者', type: 'error' })
  2848. return
  2849. }
  2850. if (this.hisPatientInfo.id == 0) {
  2851. this.$message({ message: '该患者尚未挂号,请先挂号', type: 'error' })
  2852. return
  2853. }
  2854. if (this.hisPatientInfo.id_card_type == 1) {
  2855. if (this.hisPatientInfo.balance_accounts_type != 2 && this.$store.getters.xt_user.org_id != 10088 && this.$store.getters.xt_user.org_id != 10106 && this.$store.getters.xt_user.org_id != 10188 && this.$store.getters.xt_user.org_id != 10217 && this.$store.getters.xt_user.org_id != 10191 && this.$store.getters.xt_user.org_id != 10318 && this.$store.getters.xt_user.org_id != 10210) {
  2856. this.pwdFormVisible = true
  2857. this.pwd = ''
  2858. } else {
  2859. if (this.activeName == 'first') {
  2860. this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)
  2861. } else {
  2862. this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)
  2863. }
  2864. }
  2865. } else {
  2866. if (this.activeName == 'first') {
  2867. //押金shows
  2868. this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)
  2869. } else {
  2870. this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder,this.patientInfo.id)
  2871. }
  2872. }
  2873. } else if (index == 5) {
  2874. var that = this
  2875. if (that.hisPatientInfo.balance_accounts_type == 2) {
  2876. let params = {
  2877. 'order_id': that.order.id,
  2878. 'number': that.order.number,
  2879. 'patient_id': that.patientInfo.id,
  2880. 'record_time': that.record_date
  2881. }
  2882. Refund(params).then(response => {
  2883. if (response.data.state == 0) {
  2884. this.$message.error(response.data.msg)
  2885. this.loadingtwo = false
  2886. return false
  2887. } else {
  2888. this.radio = 1
  2889. this.changeRadioAndPatient(1)
  2890. this.$message({ message: '退费成功', type: 'success' })
  2891. this.loadingtwo = false
  2892. }
  2893. })
  2894. } else {
  2895. var that = this
  2896. this.$confirm('是否退费', '退费', {
  2897. confirmButtonText: '确 定',
  2898. cancelButtonText: '取 消',
  2899. type: 'warning'
  2900. }).then(() => {
  2901. let params = {
  2902. 'order_id': this.order.id,
  2903. 'number': this.order.number,
  2904. 'patient_id': this.patientInfo.id,
  2905. 'record_time': this.record_date,
  2906. 'admin_user_id': this.$store.getters.xt_user.user.id,
  2907. 'org_id': this.$store.getters.xt_user.org_id
  2908. }
  2909. axios.get('http://127.0.0.1:9532/api/refund/post', {
  2910. params: params
  2911. }).then(function(response) {
  2912. if (response.data.state == 0) {
  2913. that.$message.error(response.data.msg)
  2914. that.loadingtwo = false
  2915. return false
  2916. } else {
  2917. if (response.data.data.failed_code == -10) {
  2918. that.$confirm(response.data.data.msg, '医保错误信息', {
  2919. confirmButtonText: '确 定',
  2920. type: 'warning'
  2921. }).then(() => {
  2922. }).catch(() => {
  2923. })
  2924. } else {
  2925. that.radio = 1
  2926. that.changeRadioAndPatient(1)
  2927. that.$message({ message: '退费成功', type: 'success', duration: 5000 })
  2928. that.loadingtwo = false
  2929. }
  2930. }
  2931. })
  2932. .catch(function(error) {
  2933. })
  2934. }).catch(() => {
  2935. })
  2936. }
  2937. } else if (index == 6) {
  2938. 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 || this.$store.getters.xt_user.org_id == 10088 || this.$store.getters.xt_user.org_id == 10278) {
  2939. this.$refs.register9504.show()
  2940. } else {
  2941. this.$refs.register.show(this.doctors, this.department)
  2942. }
  2943. } else if (index == 8) {
  2944. var that = this
  2945. if (this.form.diagnosis.length == 0) {
  2946. that.$message.error('诊断不能为空,请选择诊断内容')
  2947. return
  2948. }
  2949. if (this.form.sick_type.length || this.form.sick_type == 0) {
  2950. that.$message.error('疾病类型不能为空,请选择疾病类型')
  2951. return
  2952. }
  2953. var ids = []
  2954. for (let i = 0; i < prescriptions.length; i++) {
  2955. ids.push(prescriptions[i].id)
  2956. }
  2957. var ids_str = ids.join(',')
  2958. this.temp_ids = ids_str
  2959. this.newLoading = true
  2960. var that = this
  2961. let form = {}
  2962. form['id'] = this.patientInfo.id
  2963. form['his_patient_id'] = this.hisPatientInfo.id
  2964. form['record_time'] = this.record_date
  2965. form['ids'] = this.temp_ids
  2966. form['begin_time'] = this.form.diagnosis_time
  2967. form['p_type'] = med_type
  2968. form['diagnosis'] = this.form.diagnosis.join(',')
  2969. form['sick_type'] = this.form.sick_type
  2970. form['admin_user_id'] = this.$store.getters.xt_user.user.id
  2971. form['org_id'] = this.$store.getters.xt_user.org_id
  2972. if (this.activeName == 'first') {
  2973. form['settle_accounts_type'] = 1
  2974. } else if (this.activeName == 'second') {
  2975. form['start_time'] = this.other_start_time
  2976. form['end_time'] = this.other_end_time
  2977. form['settle_accounts_type'] = 2
  2978. } else {
  2979. form['start_time'] = this.other_start_time_two
  2980. form['end_time'] = this.other_end_time_two
  2981. form['settle_accounts_type'] = 2
  2982. }
  2983. if (this.hisPatientInfo.balance_accounts_type == 2) {
  2984. this.$confirm('是否进行预结算', '预结算', {
  2985. confirmButtonText: '确 定',
  2986. cancelButtonText: '取 消',
  2987. type: 'warning'
  2988. }).then(() => {
  2989. preSettle(form).then(response => {
  2990. if (response.data.state == 0) {
  2991. this.$message.error(response.data.msg)
  2992. this.loadingtwo = false
  2993. this.newLoading = false
  2994. return false
  2995. } else {
  2996. this.changeRadioAndPatient(1)
  2997. this.$message({ message: '预结算成功', type: 'success' })
  2998. this.newLoading = false
  2999. }
  3000. })
  3001. }).catch(() => {
  3002. this.newLoading = false
  3003. })
  3004. } else {
  3005. this.$confirm('是否进行预结算', '预结算', {
  3006. confirmButtonText: '确 定',
  3007. cancelButtonText: '取 消',
  3008. type: 'warning'
  3009. }).then(() => {
  3010. axios.get('http://127.0.0.1:9532/api/presettle/get', {
  3011. params: form,
  3012. headers: {
  3013. 'Permission': 5
  3014. }
  3015. })
  3016. .then(function(response) {
  3017. if (response.data.state == 0) {
  3018. that.$message.error(response.data.msg)
  3019. return false
  3020. } else {
  3021. if (response.data.data.failed_code == -10) {
  3022. that.$confirm(response.data.data.msg, '医保错误信息', {
  3023. confirmButtonText: '确 定',
  3024. type: 'warning'
  3025. }).then(() => {
  3026. that.changeRadioAndPatient(1)
  3027. that.newLoading = false
  3028. }).catch(() => {
  3029. that.changeRadioAndPatient(1)
  3030. that.newLoading = false
  3031. })
  3032. } else {
  3033. that.changeRadioAndPatient(1)
  3034. that.$message({ message: '预结算成功', type: 'success', duration: 5000 })
  3035. that.newLoading = false
  3036. }
  3037. }
  3038. })
  3039. .catch(function(error) {
  3040. that.newLoading = false
  3041. })
  3042. }).catch(() => {
  3043. that.newLoading = false
  3044. })
  3045. }
  3046. } else if (index == 9) {
  3047. this.statementVisible = true
  3048. let obj = {
  3049. order_id: this.order.id,
  3050. settle_type: this.order.settle_type,
  3051. start_time: this.order.settle_start_time,
  3052. end_time: this.order.settle_end_time,
  3053. balance_accounts_type: this.hisPatientInfo.balance_accounts_type
  3054. }
  3055. this.orderObj = obj
  3056. // this.$refs.print.getInfo(this.order.id)
  3057. } else if (index == 10) {
  3058. if (this.hisPatientInfo.balance_accounts_type == 2) {
  3059. this.$confirm('是否退号', '退号', {
  3060. confirmButtonText: '确 定',
  3061. cancelButtonText: '取 消',
  3062. type: 'warning'
  3063. }).then(() => {
  3064. const params = {
  3065. 'id': this.hisPatientInfo.id
  3066. }
  3067. refundNumber(params).then(response => {
  3068. if (response.data.state == 0) {
  3069. this.$message.error(response.data.msg)
  3070. return false
  3071. } else {
  3072. this.radio = 1
  3073. this.changeRadioAndPatient(1)
  3074. this.$message({ message: '退号成功', type: 'success' })
  3075. }
  3076. })
  3077. }).catch(() => {
  3078. })
  3079. } else {
  3080. if (this.$store.getters.xt_user.org_id == 10215 && this.order.id > 0) {
  3081. this.$message.error('该就诊号尚未撤销明细或者退费无法进行退号操作')
  3082. return
  3083. }
  3084. var that = this
  3085. this.$confirm('是否退号', '退号', {
  3086. confirmButtonText: '确 定',
  3087. cancelButtonText: '取 消',
  3088. type: 'warning'
  3089. }).then(() => {
  3090. let params = {
  3091. 'id': this.hisPatientInfo.id,
  3092. 'patient_id': this.patientInfo.id,
  3093. 'record_time': this.record_date,
  3094. 'org_id': this.$store.getters.xt_user.org_id,
  3095. 'admin_user_id': this.$store.getters.xt_user.user.id
  3096. }
  3097. axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
  3098. params: params
  3099. })
  3100. .then(function(response) {
  3101. if (response.data.state == 0) {
  3102. that.$message.error(response.data.msg)
  3103. return false
  3104. } else {
  3105. if (response.data.data.failed_code == -10) {
  3106. // that.$message.error(response.data.data.msg)
  3107. that.$confirm(response.data.data.msg, '医保错误信息', {
  3108. confirmButtonText: '确 定',
  3109. type: 'warning'
  3110. }).then(() => {
  3111. }).catch(() => {
  3112. })
  3113. } else {
  3114. that.radio = 1
  3115. that.changeRadioAndPatient(1)
  3116. that.$message({ message: '退号成功', type: 'success', duration: 5000 })
  3117. }
  3118. }
  3119. })
  3120. .catch(function(error) {
  3121. })
  3122. }).catch(() => {
  3123. })
  3124. }
  3125. } else if (index == 11) {
  3126. var that = this
  3127. let params = {
  3128. 'order_id': order.id,
  3129. 'number': order.number,
  3130. 'patient_id': this.patientInfo.id,
  3131. 'record_time': this.record_date,
  3132. 'org_id': this.$store.getters.xt_user.org_id,
  3133. 'his_patient_id': this.hisPatientInfo.id,
  3134. 'admin_user_id':this.$store.getters.xt_user.user.id,
  3135. }
  3136. axios.get('http://127.0.0.1:9532/api/refunddetail/post', {
  3137. params: params
  3138. })
  3139. .then(function(response) {
  3140. if (response.data.state == 0) {
  3141. that.$message.error(response.data.msg)
  3142. return false
  3143. } else {
  3144. that.changeRadioAndPatient(1)
  3145. // that.$message({ message: '退号成功', type: 'success' })
  3146. that.$message({ message: '退明细成功', type: 'success', duration: 5000 })
  3147. }
  3148. })
  3149. .catch(function(error) {
  3150. })
  3151. } else if (index == 20) {
  3152. var that = this
  3153. let params = {
  3154. 'patient_id': this.patientInfo.id,
  3155. 'admin_user_id': this.$store.getters.xt_user.user.id
  3156. }
  3157. axios.get('http://127.0.0.1:9532/api/psn/info', {
  3158. params: params
  3159. })
  3160. .then(function(response) {
  3161. if (response.data.state == 0) {
  3162. that.$message.error(response.data.msg)
  3163. return false
  3164. } else {
  3165. that.$confirm(response.data.data.result, '备案信息', {
  3166. confirmButtonText: '确 定',
  3167. type: 'warning'
  3168. }).then(() => {
  3169. }).catch(() => {
  3170. })
  3171. }
  3172. })
  3173. .catch(function(error) {
  3174. })
  3175. } else if (index == 30) {
  3176. let paramsObj = {
  3177. order_id: this.order.id,
  3178. patient_id: this.order.patient_id,
  3179. number: this.order.mdtrt_id,
  3180. name: this.patientInfo.name,
  3181. age: this.order.age,
  3182. gend: this.order.gend,
  3183. setl_time: this.order.setl_time,
  3184. chargeName: this.getName(this.order.creator)
  3185. }
  3186. this.invoiceParams = paramsObj
  3187. this.invoiceVisible = true
  3188. } else if(index == 40){
  3189. var that = this
  3190. let params = {
  3191. }
  3192. axios.get('http://127.0.0.1:9532/9001', {
  3193. params: params
  3194. })
  3195. .then(function(response) {
  3196. if (response.data.state == 0) {
  3197. that.$message.error(response.data.msg)
  3198. return false
  3199. } else {
  3200. that.$message({ message: '登陆成功', type: 'success', duration: 5000 })
  3201. }
  3202. })
  3203. .catch(function(error) {
  3204. })
  3205. } else if(index == 50){
  3206. var that = this
  3207. let params = {
  3208. "admin_user_id":this.$store.getters.xt_user.user.id,
  3209. 'his_patient_id': this.hisPatientInfo.id,
  3210. }
  3211. axios.get('http://127.0.0.1:9532/api/readele', {
  3212. params: params
  3213. })
  3214. .then(function(response) {
  3215. if (response.data.state == 0) {
  3216. that.$message.error(response.data.msg)
  3217. return false
  3218. } else {
  3219. if (response.data.data.failed_code == -10) {
  3220. // that.$message.error(response.data.data.msg)
  3221. that.$confirm(response.data.data.msg, '医保错误信息', {
  3222. confirmButtonText: '确 定',
  3223. type: 'warning'
  3224. }).then(() => {
  3225. }).catch(() => {
  3226. })
  3227. }else{
  3228. that.$message({ message: response.data.data.msg, type: 'success', duration: 5000 })
  3229. }
  3230. }
  3231. })
  3232. .catch(function(error) {
  3233. })
  3234. }
  3235. }, getName(admin_user_id) {
  3236. for (let i = 0; i < this.adminUserOptions.length; i++) {
  3237. if (this.adminUserOptions[i].id == admin_user_id) {
  3238. return this.adminUserOptions[i].name
  3239. }
  3240. }
  3241. },
  3242. choosePatient() {
  3243. this.radioStatus = id
  3244. this.getPatientList()
  3245. },
  3246. changeRadioAndPatient(id) {
  3247. this.radio = id
  3248. let params = {
  3249. 'record_date': this.record_date
  3250. }
  3251. getChargeHisPatientList(params).then(response => {
  3252. if (response.data.state == 0) {
  3253. this.$message.error(response.data.msg)
  3254. return false
  3255. } else {
  3256. this.patientTableData = []
  3257. this.all_table_data = []
  3258. this.hisPatientDatas = []
  3259. let one_count = 0
  3260. let two_count = 0
  3261. let three_count = 0
  3262. for (let i = 0; i < response.data.data.list.length; i++) {
  3263. if (response.data.data.list[i].his_patient.length == 0) { //没挂号
  3264. if (response.data.data.list[i].prescription.length > 0) {
  3265. let obj = {
  3266. id: response.data.data.list[i].id,
  3267. name: response.data.data.list[i].name,
  3268. number: '',
  3269. order_status: 0,
  3270. order_number: '',
  3271. his_patient_id: 0,
  3272. prescription: response.data.data.list[i].prescription
  3273. }
  3274. this.all_table_data.push(obj)
  3275. }
  3276. } else { //挂号
  3277. if (response.data.data.list[i].his_patient.length == 1) {
  3278. if (response.data.data.list[i].his_patient[0].orders.length > 0) {
  3279. for (let b = 0; b < response.data.data.list[i].his_patient[0].orders.length; b++) {
  3280. let obj = {
  3281. id: response.data.data.list[i].id,
  3282. name: response.data.data.list[i].name,
  3283. number: response.data.data.list[i].his_patient[0].number,
  3284. order_status: response.data.data.list[i].his_patient[0].orders[b].order_status,
  3285. his_patient_id: response.data.data.list[i].his_patient[0].id,
  3286. order_number: response.data.data.list[i].his_patient[0].orders[b].order_number,
  3287. order_id: response.data.data.list[i].his_patient[0].orders[b].id,
  3288. prescription: response.data.data.list[i].prescription
  3289. }
  3290. this.all_table_data.push(obj)
  3291. }
  3292. } else {
  3293. let obj = {
  3294. id: response.data.data.list[i].id,
  3295. name: response.data.data.list[i].name,
  3296. number: response.data.data.list[i].his_patient[0].number,
  3297. order_status: 0,
  3298. his_patient_id: response.data.data.list[i].his_patient[0].id,
  3299. order_number: '',
  3300. order_id: 0,
  3301. prescription: response.data.data.list[i].prescription
  3302. }
  3303. this.all_table_data.push(obj)
  3304. }
  3305. }
  3306. if (response.data.data.list[i].his_patient.length > 1) {
  3307. for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
  3308. if (response.data.data.list[i].his_patient[b].orders.length == 0) {
  3309. let obj = {
  3310. id: response.data.data.list[i].id,
  3311. name: response.data.data.list[i].name,
  3312. number: response.data.data.list[i].his_patient[b].number,
  3313. order_status: 0,
  3314. his_patient_id: response.data.data.list[i].his_patient[b].id,
  3315. order_number: '',
  3316. order_id: 0,
  3317. prescription: response.data.data.list[i].prescription
  3318. }
  3319. this.all_table_data.push(obj)
  3320. } else {
  3321. for (let c = 0; c < response.data.data.list[i].his_patient[b].orders.length; c++) {
  3322. let obj = {
  3323. id: response.data.data.list[i].id,
  3324. name: response.data.data.list[i].name,
  3325. number: response.data.data.list[i].his_patient[b].number,
  3326. order_status: response.data.data.list[i].his_patient[b].orders[c].order_status,
  3327. his_patient_id: response.data.data.list[i].his_patient[b].id,
  3328. order_number: response.data.data.list[i].his_patient[b].orders[c].number,
  3329. order_id: response.data.data.list[i].his_patient[b].orders[c].id,
  3330. prescription: response.data.data.list[i].prescription
  3331. }
  3332. this.all_table_data.push(obj)
  3333. }
  3334. }
  3335. }
  3336. }
  3337. }
  3338. }
  3339. for (let i = 0; i < this.all_table_data.length; i++) {
  3340. if (this.all_table_data[i].his_patient_id > 0) {
  3341. this.hisPatientDatas.push(this.all_table_data[i])
  3342. }
  3343. }
  3344. let unChargePatient = []
  3345. for (let i = 0; i < this.all_table_data.length; i++) {
  3346. let isHasUnCharge = false
  3347. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  3348. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  3349. isHasUnCharge = true
  3350. } else {
  3351. if (this.all_table_data[i].his_patient_id > 0) {
  3352. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  3353. isHasUnCharge = true
  3354. }
  3355. }
  3356. }
  3357. }
  3358. 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) {
  3359. isHasUnCharge = true
  3360. }
  3361. if (isHasUnCharge) {
  3362. unChargePatient.push(this.all_table_data[i])
  3363. }
  3364. }
  3365. unChargePatient = this.unique_four(unChargePatient)
  3366. one_count = one_count + unChargePatient.length
  3367. let ChargePatient = []
  3368. for (let i = 0; i < this.all_table_data.length; i++) {
  3369. if (this.all_table_data[i].order_status == 2) {
  3370. ChargePatient.push(this.all_table_data[i])
  3371. }
  3372. }
  3373. two_count = two_count + ChargePatient.length
  3374. if (this.radio == 1) {
  3375. this.all_table_data = this.unique_four(this.all_table_data)
  3376. }
  3377. console.log(this.all_table_data)
  3378. switch (this.radio) {
  3379. case 1:
  3380. this.patientTableData = []
  3381. for (let i = 0; i < this.all_table_data.length; i++) {
  3382. let isHasUnCharge = false
  3383. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  3384. console.log('!111111111')
  3385. console.log(this.all_table_data[i].order_status)
  3386. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  3387. console.log('!22222222222')
  3388. isHasUnCharge = true
  3389. } else {
  3390. if (this.all_table_data[i].his_patient_id > 0) {
  3391. console.log('!4444444444444')
  3392. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  3393. isHasUnCharge = true
  3394. console.log('!33333333333')
  3395. }
  3396. }
  3397. }
  3398. }
  3399. 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) {
  3400. console.log('11111111')
  3401. isHasUnCharge = true
  3402. }
  3403. if (isHasUnCharge) {
  3404. this.patientTableData.push(this.all_table_data[i])
  3405. }
  3406. }
  3407. this.all_patient = this.patientTableData
  3408. break
  3409. case 2:
  3410. this.patientTableData = []
  3411. for (let i = 0; i < this.all_table_data.length; i++) {
  3412. if (this.all_table_data[i].order_status == 2) {
  3413. this.patientTableData.push(this.all_table_data[i])
  3414. }
  3415. }
  3416. this.all_patient = this.patientTableData
  3417. break
  3418. case 4:
  3419. this.patientTableData = []
  3420. this.patientTableData = this.all_table_data
  3421. this.all_patient = this.patientTableData
  3422. break
  3423. }
  3424. this.cal_one = one_count
  3425. this.cal_two = two_count
  3426. this.cal_three = one_count + two_count
  3427. this.current_index = 0
  3428. let ids = []
  3429. let temp_order_id = 0
  3430. var index = 0
  3431. if (this.radio == 2) {
  3432. for (let i = 0; i < this.patientTableData.length; i++) {
  3433. if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
  3434. ids.push(this.patientTableData[i].order_id)
  3435. }
  3436. }
  3437. temp_order_id = ids[ids.length - 1]
  3438. for (let i = 0; i < this.patientTableData.length; i++) {
  3439. if (temp_order_id == this.patientTableData[i].order_id) {
  3440. index = i
  3441. // this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order_number, this.patientTableData[i].his_patient_id, this.patientTableData[i].order_id)
  3442. }
  3443. }
  3444. this.$refs.tab.setCurrentRow(this.patientTableData[index])
  3445. } else {
  3446. var index = 0
  3447. for (let i = 0; i < this.patientTableData.length; i++) {
  3448. if (this.hisPatientInfo.id == 0) {
  3449. if (this.patientInfo.id == this.patientTableData[i].id) {
  3450. index = i
  3451. }
  3452. } else {
  3453. if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
  3454. index = i
  3455. }
  3456. }
  3457. }
  3458. this.$refs.tab.setCurrentRow(this.patientTableData[index])
  3459. }
  3460. }
  3461. })
  3462. },
  3463. changeRadio(id) {
  3464. let temp_id = id
  3465. this.radio = id
  3466. let params = {
  3467. 'record_date': this.record_date
  3468. }
  3469. getChargeHisPatientList(params).then(response => {
  3470. if (response.data.state == 0) {
  3471. this.$message.error(response.data.msg)
  3472. return false
  3473. } else {
  3474. this.patientTableData = []
  3475. this.all_table_data = []
  3476. this.hisPatientDatas = []
  3477. let one_count = 0
  3478. let two_count = 0
  3479. let three_count = 0
  3480. for (let i = 0; i < response.data.data.list.length; i++) {
  3481. if (response.data.data.list[i].his_patient.length == 0) { //没挂号
  3482. if (response.data.data.list[i].prescription.length > 0) {
  3483. let obj = {
  3484. id: response.data.data.list[i].id,
  3485. name: response.data.data.list[i].name,
  3486. number: '',
  3487. order_status: 0,
  3488. order_number: '',
  3489. his_patient_id: 0,
  3490. prescription: response.data.data.list[i].prescription
  3491. }
  3492. this.all_table_data.push(obj)
  3493. }
  3494. } else { //挂号
  3495. if (response.data.data.list[i].his_patient.length == 1) {
  3496. if (response.data.data.list[i].his_patient[0].orders.length > 0) {
  3497. for (let b = 0; b < response.data.data.list[i].his_patient[0].orders.length; b++) {
  3498. let obj = {
  3499. id: response.data.data.list[i].id,
  3500. name: response.data.data.list[i].name,
  3501. number: response.data.data.list[i].his_patient[0].number,
  3502. order_status: response.data.data.list[i].his_patient[0].orders[b].order_status,
  3503. his_patient_id: response.data.data.list[i].his_patient[0].id,
  3504. order_number: response.data.data.list[i].his_patient[0].orders[b].order_number,
  3505. order_id: response.data.data.list[i].his_patient[0].orders[b].id,
  3506. prescription: response.data.data.list[i].prescription
  3507. }
  3508. this.all_table_data.push(obj)
  3509. }
  3510. } else {
  3511. let obj = {
  3512. id: response.data.data.list[i].id,
  3513. name: response.data.data.list[i].name,
  3514. number: response.data.data.list[i].his_patient[0].number,
  3515. order_status: 0,
  3516. his_patient_id: response.data.data.list[i].his_patient[0].id,
  3517. order_number: '',
  3518. order_id: 0,
  3519. prescription: response.data.data.list[i].prescription
  3520. }
  3521. this.all_table_data.push(obj)
  3522. }
  3523. }
  3524. if (response.data.data.list[i].his_patient.length > 1) {
  3525. for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
  3526. if (response.data.data.list[i].his_patient[b].orders.length == 0) {
  3527. let obj = {
  3528. id: response.data.data.list[i].id,
  3529. name: response.data.data.list[i].name,
  3530. number: response.data.data.list[i].his_patient[b].number,
  3531. order_status: 0,
  3532. his_patient_id: response.data.data.list[i].his_patient[b].id,
  3533. order_number: '',
  3534. order_id: 0,
  3535. prescription: response.data.data.list[i].prescription
  3536. }
  3537. this.all_table_data.push(obj)
  3538. } else {
  3539. for (let c = 0; c < response.data.data.list[i].his_patient[b].orders.length; c++) {
  3540. let obj = {
  3541. id: response.data.data.list[i].id,
  3542. name: response.data.data.list[i].name,
  3543. number: response.data.data.list[i].his_patient[b].number,
  3544. order_status: response.data.data.list[i].his_patient[b].orders[c].order_status,
  3545. his_patient_id: response.data.data.list[i].his_patient[b].id,
  3546. order_number: response.data.data.list[i].his_patient[b].orders[c].number,
  3547. order_id: response.data.data.list[i].his_patient[b].orders[c].id,
  3548. prescription: response.data.data.list[i].prescription
  3549. }
  3550. this.all_table_data.push(obj)
  3551. }
  3552. }
  3553. }
  3554. }
  3555. }
  3556. }
  3557. for (let i = 0; i < this.all_table_data.length; i++) {
  3558. if (this.all_table_data[i].his_patient_id > 0) {
  3559. this.hisPatientDatas.push(this.all_table_data[i])
  3560. }
  3561. }
  3562. let unChargePatient = []
  3563. for (let i = 0; i < this.all_table_data.length; i++) {
  3564. let isHasUnCharge = false
  3565. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  3566. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  3567. isHasUnCharge = true
  3568. } else {
  3569. if (this.all_table_data[i].his_patient_id > 0) {
  3570. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  3571. isHasUnCharge = true
  3572. }
  3573. }
  3574. }
  3575. }
  3576. 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) {
  3577. isHasUnCharge = true
  3578. }
  3579. if (isHasUnCharge) {
  3580. unChargePatient.push(this.all_table_data[i])
  3581. }
  3582. }
  3583. unChargePatient = this.unique_four(unChargePatient)
  3584. one_count = one_count + unChargePatient.length
  3585. let ChargePatient = []
  3586. for (let i = 0; i < this.all_table_data.length; i++) {
  3587. if (this.all_table_data[i].order_status == 2) {
  3588. ChargePatient.push(this.all_table_data[i])
  3589. }
  3590. }
  3591. two_count = two_count + ChargePatient.length
  3592. if (this.radio == 1) {
  3593. this.all_table_data = this.unique_four(this.all_table_data)
  3594. }
  3595. console.log(this.all_table_data)
  3596. switch (this.radio) {
  3597. case 1:
  3598. this.patientTableData = []
  3599. for (let i = 0; i < this.all_table_data.length; i++) {
  3600. let isHasUnCharge = false
  3601. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  3602. console.log('!111111111')
  3603. console.log(this.all_table_data[i].order_status)
  3604. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  3605. console.log('!22222222222')
  3606. isHasUnCharge = true
  3607. } else {
  3608. if (this.all_table_data[i].his_patient_id > 0) {
  3609. console.log('!4444444444444')
  3610. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  3611. isHasUnCharge = true
  3612. console.log('!33333333333')
  3613. }
  3614. }
  3615. }
  3616. }
  3617. 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) {
  3618. console.log('11111111')
  3619. isHasUnCharge = true
  3620. }
  3621. if (isHasUnCharge) {
  3622. this.patientTableData.push(this.all_table_data[i])
  3623. }
  3624. }
  3625. this.all_patient = this.patientTableData
  3626. break
  3627. case 2:
  3628. this.patientTableData = []
  3629. for (let i = 0; i < this.all_table_data.length; i++) {
  3630. if (this.all_table_data[i].order_status == 2) {
  3631. this.patientTableData.push(this.all_table_data[i])
  3632. }
  3633. }
  3634. this.all_patient = this.patientTableData
  3635. break
  3636. case 4:
  3637. this.patientTableData = []
  3638. this.patientTableData = this.all_table_data
  3639. this.all_patient = this.patientTableData
  3640. break
  3641. }
  3642. this.cal_one = one_count
  3643. this.cal_two = two_count
  3644. this.cal_three = one_count + two_count
  3645. this.current_index = 0
  3646. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  3647. // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
  3648. }
  3649. })
  3650. },
  3651. formatDecimal(num, decimal) {
  3652. num = num.toString()
  3653. let index = num.indexOf('.')
  3654. if (index !== -1) {
  3655. num = num.substring(0, decimal + index + 1)
  3656. } else {
  3657. num = num.substring(0)
  3658. }
  3659. return parseFloat(num).toFixed(decimal)
  3660. }, getMonthChargePatientList() {
  3661. let params = {
  3662. 'record_date': this.record_date,
  3663. 'start_time': this.other_start_time,
  3664. 'end_time': this.other_end_time
  3665. }
  3666. getChargeHisPatientList(params).then(response => {
  3667. if (response.data.state == 0) {
  3668. this.$message.error(response.data.msg)
  3669. return false
  3670. } else {
  3671. this.hisPatientDatas = []
  3672. }
  3673. })
  3674. },
  3675. //患者列表
  3676. getPatientList() {
  3677. let params = {
  3678. 'record_date': this.record_date,
  3679. 'type': this.radio
  3680. }
  3681. getChargeHisPatientList(params).then(response => {
  3682. if (response.data.state == 0) {
  3683. this.$message.error(response.data.msg)
  3684. return false
  3685. } else {
  3686. this.patientTableData = []
  3687. this.all_table_data = []
  3688. this.hisPatientDatas = []
  3689. let one_count = 0
  3690. let two_count = 0
  3691. let three_count = 0
  3692. for (let i = 0; i < response.data.data.list.length; i++) {
  3693. if (response.data.data.list[i].his_patient.length == 0) { //没挂号
  3694. if (response.data.data.list[i].prescription.length > 0) {
  3695. let obj = {
  3696. id: response.data.data.list[i].id,
  3697. name: response.data.data.list[i].name,
  3698. number: '',
  3699. order_status: 0,
  3700. order_number: '',
  3701. his_patient_id: 0,
  3702. prescription: response.data.data.list[i].prescription
  3703. }
  3704. this.all_table_data.push(obj)
  3705. }
  3706. } else { //挂号
  3707. if (response.data.data.list[i].his_patient.length == 1) {
  3708. if (response.data.data.list[i].his_patient[0].orders.length > 0) {
  3709. for (let b = 0; b < response.data.data.list[i].his_patient[0].orders.length; b++) {
  3710. let obj = {
  3711. id: response.data.data.list[i].id,
  3712. name: response.data.data.list[i].name,
  3713. number: response.data.data.list[i].his_patient[0].number,
  3714. order_status: response.data.data.list[i].his_patient[0].orders[b].order_status,
  3715. his_patient_id: response.data.data.list[i].his_patient[0].id,
  3716. order_number: response.data.data.list[i].his_patient[0].orders[b].order_number,
  3717. order_id: response.data.data.list[i].his_patient[0].orders[b].id,
  3718. prescription: response.data.data.list[i].prescription
  3719. }
  3720. this.all_table_data.push(obj)
  3721. }
  3722. } else {
  3723. let obj = {
  3724. id: response.data.data.list[i].id,
  3725. name: response.data.data.list[i].name,
  3726. number: response.data.data.list[i].his_patient[0].number,
  3727. order_status: 0,
  3728. his_patient_id: response.data.data.list[i].his_patient[0].id,
  3729. order_number: '',
  3730. order_id: 0,
  3731. prescription: response.data.data.list[i].prescription
  3732. }
  3733. this.all_table_data.push(obj)
  3734. }
  3735. }
  3736. if (response.data.data.list[i].his_patient.length > 1) {
  3737. for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
  3738. if (response.data.data.list[i].his_patient[b].orders.length == 0) {
  3739. let obj = {
  3740. id: response.data.data.list[i].id,
  3741. name: response.data.data.list[i].name,
  3742. number: response.data.data.list[i].his_patient[b].number,
  3743. order_status: 0,
  3744. his_patient_id: response.data.data.list[i].his_patient[b].id,
  3745. order_number: '',
  3746. order_id: 0,
  3747. prescription: response.data.data.list[i].prescription
  3748. }
  3749. this.all_table_data.push(obj)
  3750. } else {
  3751. for (let c = 0; c < response.data.data.list[i].his_patient[b].orders.length; c++) {
  3752. let obj = {
  3753. id: response.data.data.list[i].id,
  3754. name: response.data.data.list[i].name,
  3755. number: response.data.data.list[i].his_patient[b].number,
  3756. order_status: response.data.data.list[i].his_patient[b].orders[c].order_status,
  3757. his_patient_id: response.data.data.list[i].his_patient[b].id,
  3758. order_number: response.data.data.list[i].his_patient[b].orders[c].number,
  3759. order_id: response.data.data.list[i].his_patient[b].orders[c].id,
  3760. prescription: response.data.data.list[i].prescription
  3761. }
  3762. this.all_table_data.push(obj)
  3763. }
  3764. }
  3765. }
  3766. }
  3767. }
  3768. }
  3769. for (let i = 0; i < this.all_table_data.length; i++) {
  3770. if (this.all_table_data[i].his_patient_id > 0) {
  3771. this.hisPatientDatas.push(this.all_table_data[i])
  3772. }
  3773. }
  3774. let unChargePatient = []
  3775. for (let i = 0; i < this.all_table_data.length; i++) {
  3776. let isHasUnCharge = false
  3777. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  3778. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  3779. isHasUnCharge = true
  3780. } else {
  3781. if (this.all_table_data[i].his_patient_id > 0) {
  3782. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  3783. isHasUnCharge = true
  3784. }
  3785. }
  3786. }
  3787. }
  3788. 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) {
  3789. isHasUnCharge = true
  3790. }
  3791. if (isHasUnCharge) {
  3792. unChargePatient.push(this.all_table_data[i])
  3793. }
  3794. }
  3795. unChargePatient = this.unique_four(unChargePatient)
  3796. one_count = one_count + unChargePatient.length
  3797. let ChargePatient = []
  3798. for (let i = 0; i < this.all_table_data.length; i++) {
  3799. if (this.all_table_data[i].order_status == 2) {
  3800. ChargePatient.push(this.all_table_data[i])
  3801. }
  3802. }
  3803. two_count = two_count + ChargePatient.length
  3804. if (this.radio == 1) {
  3805. this.all_table_data = this.unique_four(this.all_table_data)
  3806. }
  3807. console.log(this.all_table_data)
  3808. switch (this.radio) {
  3809. case 1:
  3810. this.patientTableData = []
  3811. for (let i = 0; i < this.all_table_data.length; i++) {
  3812. let isHasUnCharge = false
  3813. for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
  3814. if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
  3815. isHasUnCharge = true
  3816. } else {
  3817. if (this.all_table_data[i].his_patient_id > 0) {
  3818. if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
  3819. isHasUnCharge = true
  3820. }
  3821. }
  3822. }
  3823. }
  3824. 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) {
  3825. isHasUnCharge = true
  3826. }
  3827. if (isHasUnCharge) {
  3828. this.patientTableData.push(this.all_table_data[i])
  3829. }
  3830. }
  3831. this.all_patient = this.patientTableData
  3832. break
  3833. case 2:
  3834. this.patientTableData = []
  3835. for (let i = 0; i < this.all_table_data.length; i++) {
  3836. if (this.all_table_data[i].order_status == 2) {
  3837. this.patientTableData.push(this.all_table_data[i])
  3838. }
  3839. }
  3840. this.all_patient = this.patientTableData
  3841. break
  3842. case 4:
  3843. this.patientTableData = []
  3844. this.patientTableData = this.all_table_data
  3845. this.all_patient = this.patientTableData
  3846. break
  3847. }
  3848. this.cal_one = one_count
  3849. this.cal_two = two_count
  3850. this.cal_three = one_count + two_count
  3851. this.current_index = 0
  3852. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  3853. this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
  3854. }
  3855. })
  3856. },
  3857. setMonthPrescription(month_prescriptions) {
  3858. let big_prescriptions = []
  3859. for (let i = 0; i < this.unique_three(month_prescriptions).length; i++) {
  3860. let obj = {
  3861. med_type: this.unique_three(month_prescriptions)[i].med_type,
  3862. prescriptions: []
  3863. }
  3864. big_prescriptions.push(obj)
  3865. }
  3866. this.month_prescriptions = []
  3867. let drug_prescriptions_ids = ''
  3868. let project_prescriptions_ids = ''
  3869. for (let c = 0; c < big_prescriptions.length; c++) {
  3870. let drug_month_prescriptions = {
  3871. advices: []
  3872. }
  3873. let drug_ids = []
  3874. let project_month_prescriptions = {
  3875. project: []
  3876. }
  3877. let project_ids = []
  3878. for (let i = 0; i < month_prescriptions.length; i++) {
  3879. if (big_prescriptions[c].med_type == month_prescriptions[i].med_type) {
  3880. if (month_prescriptions[i].type == 1) { //药品
  3881. for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
  3882. let obj = {
  3883. id: month_prescriptions[i].advices[a].drug_id,
  3884. price: month_prescriptions[i].advices[a].price
  3885. }
  3886. drug_ids.push(obj)
  3887. drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
  3888. }
  3889. if (drug_prescriptions_ids.length == 0) {
  3890. drug_prescriptions_ids = month_prescriptions[i].id.toString()
  3891. } else {
  3892. drug_prescriptions_ids = drug_prescriptions_ids + ',' + month_prescriptions[i].id.toString()
  3893. }
  3894. } else if (month_prescriptions[i].type == 2) { //项目
  3895. for (let a = 0; a < month_prescriptions[i].project.length; a++) {
  3896. let obj = {
  3897. id: month_prescriptions[i].project[a].project_id,
  3898. price: month_prescriptions[i].project[a].price
  3899. }
  3900. project_ids.push(obj)
  3901. project_month_prescriptions.project.push(month_prescriptions[i].project[a])
  3902. }
  3903. if (project_prescriptions_ids.length == 0) {
  3904. project_prescriptions_ids = month_prescriptions[i].id.toString()
  3905. } else {
  3906. project_prescriptions_ids = project_prescriptions_ids + ',' + month_prescriptions[i].id.toString()
  3907. }
  3908. }
  3909. big_prescriptions[c]['drug_ids'] = []
  3910. big_prescriptions[c]['project_ids'] = []
  3911. // big_prescriptions[c]['additions_ids'] = []
  3912. big_prescriptions[c]['drug_month_prescriptions'] = []
  3913. big_prescriptions[c]['project_month_prescriptions'] = []
  3914. // big_prescriptions[c]['addition_month_prescriptions'] = []
  3915. big_prescriptions[c]['drug_ids'] = drug_ids
  3916. big_prescriptions[c]['project_ids'] = project_ids
  3917. // big_prescriptions[c]['additions_ids'] = additions_ids
  3918. big_prescriptions[c]['drug_month_prescriptions'] = drug_month_prescriptions
  3919. big_prescriptions[c]['project_month_prescriptions'] = project_month_prescriptions
  3920. // big_prescriptions[c]['addition_month_prescriptions'] = addition_month_prescriptions
  3921. big_prescriptions[c]['order'] = month_prescriptions[i].order
  3922. }
  3923. }
  3924. }
  3925. //
  3926. //
  3927. for (let y = 0; y < big_prescriptions.length; y++) {
  3928. let drug_ids = this.unique_two(big_prescriptions[y].drug_ids)
  3929. let project_ids = this.unique_two(big_prescriptions[y].project_ids)
  3930. // let additions_ids = this.unique_two(big_prescriptions[y].additions_ids)
  3931. let drugs = []
  3932. let projects = []
  3933. // let additions = []
  3934. for (let i = 0; i < drug_ids.length; i++) {
  3935. let obj = {}
  3936. let count = 0
  3937. for (let a = 0; a < big_prescriptions[y].drug_month_prescriptions.advices.length; a++) {
  3938. 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) {
  3939. obj['drug_name'] = big_prescriptions[y].drug_month_prescriptions.advices[a].advice_name
  3940. obj['single_dose'] = big_prescriptions[y].drug_month_prescriptions.advices[a].single_dose
  3941. obj['delivery_way'] = big_prescriptions[y].drug_month_prescriptions.advices[a].delivery_way
  3942. obj['execution_frequency'] = big_prescriptions[y].drug_month_prescriptions.advices[a].execution_frequency
  3943. obj['day'] = big_prescriptions[y].drug_month_prescriptions.advices[a].day
  3944. // obj['prescribing_number'] = obj['prescribing_number'] + drug_month_prescriptions.advices[a].prescribing_number
  3945. obj['prescribing_number_unit'] = big_prescriptions[y].drug_month_prescriptions.advices[a].prescribing_number_unit
  3946. obj['medical_insurance_number'] = big_prescriptions[y].drug_month_prescriptions.advices[a].drug.medical_insurance_number
  3947. obj['id'] = big_prescriptions[y].drug_month_prescriptions.advices[a].drug_id
  3948. // obj['retail_price'] = obj['retail_price'] + drug_month_prescriptions.advices[a].drug.retail_price
  3949. obj['retail_price'] = parseFloat(big_prescriptions[y].drug_month_prescriptions.advices[a].price)
  3950. count = count + big_prescriptions[y].drug_month_prescriptions.advices[a].prescribing_number
  3951. }
  3952. }
  3953. obj['prescribing_number'] = count
  3954. drugs.push(obj)
  3955. }
  3956. for (let i = 0; i < project_ids.length; i++) {
  3957. let obj = {}
  3958. let count = 0
  3959. for (let a = 0; a < big_prescriptions[y].project_month_prescriptions.project.length; a++) {
  3960. 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) {
  3961. if (big_prescriptions[y].project_month_prescriptions.project[a].type == 2) {
  3962. obj['statistical_classification'] = big_prescriptions[y].project_month_prescriptions.project[a].project.statistical_classification
  3963. obj['medical_code'] = big_prescriptions[y].project_month_prescriptions.project[a].project.medical_code
  3964. obj['project_name'] = big_prescriptions[y].project_month_prescriptions.project[a].project.project_name
  3965. } else if (big_prescriptions[y].project_month_prescriptions.project[a].type == 3) {
  3966. obj['statistical_classification'] = ''
  3967. obj['medical_code'] = big_prescriptions[y].project_month_prescriptions.project[a].good_info.medical_insurance_number
  3968. obj['project_name'] = big_prescriptions[y].project_month_prescriptions.project[a].good_info.good_name
  3969. }
  3970. // obj['project_name'] = project_month_prescriptions.project[a].project.project_name
  3971. // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
  3972. obj['single_dose'] = big_prescriptions[y].project_month_prescriptions.project[a].single_dose
  3973. obj['delivery_way'] = big_prescriptions[y].project_month_prescriptions.project[a].delivery_way
  3974. obj['execution_frequency'] = big_prescriptions[y].project_month_prescriptions.project[a].execution_frequency
  3975. obj['number_days'] = big_prescriptions[y].project_month_prescriptions.project[a].day
  3976. // obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
  3977. obj['unit'] = big_prescriptions[y].project_month_prescriptions.project[a].unit
  3978. obj['project_id'] = big_prescriptions[y].project_month_prescriptions.project[a].project_id
  3979. count = count + parseFloat(big_prescriptions[y].project_month_prescriptions.project[a].count)
  3980. // price = price + project_month_prescriptions.project[a].price
  3981. obj['price'] = parseFloat(big_prescriptions[y].project_month_prescriptions.project[a].price)
  3982. obj['type'] = big_prescriptions[y].project_month_prescriptions.project[a].type
  3983. }
  3984. }
  3985. obj['total'] = count
  3986. projects.push(obj)
  3987. }
  3988. // for (let i = 0; i < additions_ids.length; i++) {
  3989. // let obj = {}
  3990. // let count = 0
  3991. // if (big_prescriptions[y].addition_month_prescriptions.addition) {
  3992. // for (let a = 0; a < big_prescriptions[y].addition_month_prescriptions.addition.length; a++) {
  3993. // 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) {
  3994. // obj['item_name'] = big_prescriptions[y].addition_month_prescriptions.addition[a].item_name
  3995. // obj['id'] = big_prescriptions[y].addition_month_prescriptions.addition[a].id
  3996. // obj['item_id'] = big_prescriptions[y].addition_month_prescriptions.addition[a].item_id
  3997. // count = count + big_prescriptions[y].addition_month_prescriptions.addition[a].count
  3998. // obj['price'] = parseFloat(big_prescriptions[y].addition_month_prescriptions.addition[a].price)
  3999. // }
  4000. // }
  4001. // obj['count'] = count
  4002. // additions.push(obj)
  4003. // }
  4004. // }
  4005. console.log('ids==')
  4006. console.log(drug_prescriptions_ids)
  4007. console.log(project_prescriptions_ids)
  4008. let p1 = {
  4009. name: this.getPName(big_prescriptions[y].med_type, 1),
  4010. advices: drugs,
  4011. project: [],
  4012. prescriptions_ids: drug_prescriptions_ids,
  4013. type: 1,
  4014. order: big_prescriptions[y].order
  4015. }
  4016. let p2 = {
  4017. name: this.getPName(big_prescriptions[y].med_type, 2),
  4018. type: 2,
  4019. project: projects,
  4020. prescriptions_ids: project_prescriptions_ids,
  4021. advices: [],
  4022. order: big_prescriptions[y].order
  4023. }
  4024. big_prescriptions[y]['month_prescriptions'] = []
  4025. big_prescriptions[y]['month_prescriptions'].push(p1)
  4026. big_prescriptions[y]['month_prescriptions'].push(p2)
  4027. }
  4028. this.big_month_prescriptions = big_prescriptions
  4029. console.log(this.big_month_prescriptions)
  4030. for (let i = 0; i < this.big_month_prescriptions.length; i++) {
  4031. if (this.big_month_prescriptions[i].month_prescriptions.length > 0) {
  4032. this.big_month_prescriptions[i]['curMonthPrescriptions'] = JSON.parse(JSON.stringify(this.big_month_prescriptions[i].month_prescriptions[0]))
  4033. } else {
  4034. this.big_month_prescriptions[i]['curMonthPrescriptions'] = {}
  4035. }
  4036. this.big_month_prescriptions[i]['month_total'] = this.getMonthTotalTwo(this.big_month_prescriptions[i].month_prescriptions[0])
  4037. }
  4038. if (this.big_month_prescriptions.length > 0) {
  4039. this.editableTabsValue = this.big_month_prescriptions[0].curMonthPrescriptions.name
  4040. }
  4041. },
  4042. getPName(med_type, index) {
  4043. var med_type = parseInt(med_type)
  4044. switch (med_type) {
  4045. case 11:
  4046. return '普通门诊' + '处方' + index
  4047. break
  4048. case 1102:
  4049. return '新冠门诊' + '处方' + index
  4050. break
  4051. case 12:
  4052. return '门诊挂号' + '处方' + index
  4053. break
  4054. case 13:
  4055. return '急诊' + '处方' + index
  4056. break
  4057. case 14:
  4058. return '门诊特殊病' + '处方' + index
  4059. break
  4060. case 15:
  4061. return '门诊统筹' + '处方' + index
  4062. break
  4063. case 16:
  4064. return '门诊慢性病' + '处方' + index
  4065. break
  4066. case 21:
  4067. return '普通住院' + '处方' + index
  4068. break
  4069. case 1111:
  4070. return '精一' + '处方' + index
  4071. break
  4072. case 1112:
  4073. return '精二' + '处方' + index
  4074. break
  4075. case 9933:
  4076. return '门诊特殊病(9933)' + '处方' + index
  4077. break
  4078. case 990602:
  4079. return '门诊特殊病(990602)' + '处方' + index
  4080. break
  4081. case 1402:
  4082. return '门诊特殊病(1402)' + '处方' + index
  4083. break
  4084. case 9922:
  4085. return '家庭通道' + '处方' + index
  4086. break
  4087. case 0:
  4088. return '自费' + '处方' + index
  4089. break
  4090. }
  4091. }, unique_four(array) {
  4092. // res用来存储结果
  4093. var res = []
  4094. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  4095. for (var j = 0, resLen = res.length; j < resLen; j++) {
  4096. if (array[i].id === res[j].id && array[i].number === res[j].number) {
  4097. break
  4098. }
  4099. }
  4100. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  4101. if (j === resLen) {
  4102. res.push(array[i])
  4103. }
  4104. }
  4105. return res
  4106. },
  4107. unique_two(array) {
  4108. // res用来存储结果
  4109. var res = []
  4110. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  4111. for (var j = 0, resLen = res.length; j < resLen; j++) {
  4112. if (array[i].id === res[j].id && array[i].price === res[j].price) {
  4113. break
  4114. }
  4115. }
  4116. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  4117. if (j === resLen) {
  4118. res.push(array[i])
  4119. }
  4120. }
  4121. return res
  4122. },
  4123. unique(arr) {
  4124. const res = new Map()
  4125. return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
  4126. }, unique_three(array) {
  4127. // res用来存储结果
  4128. var res = []
  4129. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  4130. for (var j = 0, resLen = res.length; j < resLen; j++) {
  4131. if (array[i].med_type === res[j].med_type) {
  4132. break
  4133. }
  4134. }
  4135. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  4136. if (j === resLen) {
  4137. res.push(array[i])
  4138. }
  4139. }
  4140. return res
  4141. },
  4142. handleCurrentChange(val) {
  4143. this.curPrescriptions = null
  4144. this.curMonthPrescriptions = null
  4145. this.prescriptions = []
  4146. this.month_prescriptions = []
  4147. this.big_prescriptions = []
  4148. this.big_month_prescriptions = []
  4149. this.getPatientInformation(val.id, val.order_number, val.his_patient_id, val.order_id)
  4150. this.patient_id = val.id
  4151. for (let i = 0; i < this.patientTableData.length; i++) {
  4152. if (this.patientTableData[i].his_patient_id == val.his_patient_id) {
  4153. this.current_index = i
  4154. }
  4155. }
  4156. },
  4157. // 获取患者的基本信息
  4158. getPatientInformation(id, batch_number, his_patient_id, order_id) {
  4159. const params = {
  4160. 'record_date': this.record_date,
  4161. 'patient_id': id,
  4162. 'his_patient_id': his_patient_id,
  4163. 'number': batch_number,
  4164. 'start_time': this.other_start_time,
  4165. 'end_time': this.other_end_time,
  4166. 'type': this.radio,
  4167. 'p_type': 2,
  4168. 'order_id': order_id
  4169. }
  4170. this.loading = true
  4171. if (this.activeName == 'first') {
  4172. getChargeHisPatientInfo(params).then(response => {
  4173. if (response.data.state == 0) {
  4174. this.loading = false
  4175. this.$message.error(response.data.msg)
  4176. return false
  4177. } else {
  4178. this.prescriptions = []
  4179. this.month_prescriptions = []
  4180. this.big_month_prescriptions = []
  4181. this.big_prescriptions = []
  4182. this.curPrescriptions = {}
  4183. this.curMonthPrescriptions = {}
  4184. this.loading = false
  4185. this.patientInfo = response.data.data.xt_info
  4186. this.hisPatientInfo = response.data.data.his_info
  4187. this.info = response.data.data.info
  4188. this.order = response.data.data.order
  4189. this.p_type = ''
  4190. this.sick_type = ''
  4191. this.diagnosis = []
  4192. this.sick_history = ''
  4193. this.form.diagnosis = []
  4194. if (this.info.id > 0) {
  4195. this.form.p_type = response.data.data.info.register_type
  4196. this.form.sick_type = response.data.data.info.sick_type
  4197. if (response.data.data.info.diagnosis.length == 0) {
  4198. this.form.diagnosis = []
  4199. } else {
  4200. for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
  4201. if(parseInt(response.data.data.info.diagnosis.split(',')[i]) !== NaN){
  4202. this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
  4203. }
  4204. }
  4205. }
  4206. this.sick_history = this.info.sick_history
  4207. if (this.info.register_type == 0) {
  4208. this.form.p_type = ''
  4209. }
  4210. if (this.info.sick_type == 0) {
  4211. this.form.sick_type = ''
  4212. }
  4213. } else {
  4214. this.form.p_type = 14
  4215. this.form.sick_type = this.sick[0].id
  4216. if (response.data.data.last_info.id == 0) {
  4217. this.form.diagnosis = []
  4218. } else {
  4219. for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
  4220. this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
  4221. }
  4222. }
  4223. this.sick_history = ''
  4224. }
  4225. this.addtions_charge = response.data.data.addtions_charge
  4226. if (response.data.data.prescription.length > 0 && response.data.data.prescription[0].advices.length > 0) {
  4227. this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
  4228. } else {
  4229. this.prescription_id = 0
  4230. }
  4231. const big_prescriptions = []
  4232. for (let i = 0; i < this.unique_three(response.data.data.prescription).length; i++) {
  4233. const obj = {
  4234. med_type: this.unique_three(response.data.data.prescription)[i].med_type,
  4235. prescriptions: []
  4236. }
  4237. big_prescriptions.push(obj)
  4238. }
  4239. for (let c = 0; c < big_prescriptions.length; c++) {
  4240. const inner_prescription = []
  4241. for (let i = 0; i < response.data.data.prescription.length; i++) {
  4242. var prescription = response.data.data.prescription[i]
  4243. if (big_prescriptions[c].med_type == prescription.med_type) {
  4244. const tempAdvice = []
  4245. const tempProject = []
  4246. const tempAddition = []
  4247. for (let b = 0; b < prescription.advices.length; b++) {
  4248. let spec = prescription.advices[b].drug.dose + prescription.advices[b].drug.dose_unit + '*' + prescription.advices[b].drug.min_number + prescription.advices[b].drug.min_unit + '/' + prescription.advices[b].drug.max_unit
  4249. const obj = {
  4250. advice_id: prescription.advices[b].id,
  4251. drug_name: prescription.advices[b].advice_name,
  4252. single_dose: prescription.advices[b].single_dose,
  4253. delivery_way: prescription.advices[b].delivery_way,
  4254. execution_frequency: prescription.advices[b].execution_frequency,
  4255. retail_price: prescription.advices[b].price.toString(),
  4256. remark: prescription.advices[b].remark,
  4257. day: prescription.advices[b].day,
  4258. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  4259. single_dose_unit: prescription.advices[b].single_dose_unit,
  4260. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  4261. code: prescription.advices[b].drug.medical_insurance_number,
  4262. spec: spec,
  4263. det_item_fee_sumamt: prescription.advices[b].order_info.det_item_fee_sumamt,
  4264. name_id: prescription.advices[b].drug.manufacturer,
  4265. fulamt_ownpay_amt: prescription.advices[b].order_info.fulamt_ownpay_amt,
  4266. overlmt_amt: prescription.advices[b].order_info.overlmt_amt,
  4267. preselfpay_amt: prescription.advices[b].order_info.preselfpay_amt,
  4268. inscp_scp_amt: prescription.advices[b].order_info.inscp_scp_amt,
  4269. execution_state: prescription.advices[b].execution_state
  4270. }
  4271. tempAdvice.push(obj)
  4272. }
  4273. for (let b = 0; b < prescription.project.length; b++) {
  4274. const obj = {
  4275. id: prescription.project[b].id,
  4276. project_id: prescription.project[b].project.id,
  4277. // project_name: prescription.project[b].project.project_name,
  4278. // statistical_classification: prescription.project[b].project.statistical_classification,
  4279. single_dose: prescription.project[b].single_dose,
  4280. delivery_way: prescription.project[b].delivery_way,
  4281. execution_frequency: prescription.project[b].execution_frequency,
  4282. number_days: prescription.project[b].day,
  4283. total: prescription.project[b].count.toString(),
  4284. price: prescription.project[b].price,
  4285. remark: prescription.project[b].remark,
  4286. // medical_code: prescription.project[b].project.medical_code,
  4287. type: prescription.project[b].type,
  4288. execution_state: prescription.project[b].execution_state,
  4289. det_item_fee_sumamt: prescription.project[b].order_info.det_item_fee_sumamt,
  4290. fulamt_ownpay_amt: prescription.project[b].order_info.fulamt_ownpay_amt,
  4291. overlmt_amt: prescription.project[b].order_info.overlmt_amt,
  4292. preselfpay_amt: prescription.project[b].order_info.preselfpay_amt,
  4293. inscp_scp_amt: prescription.project[b].order_info.inscp_scp_amt
  4294. }
  4295. if (prescription.project[b].type == 2) {
  4296. obj['statistical_classification'] = prescription.project[b].project.statistical_classification
  4297. obj['medical_code'] = prescription.project[b].project.medical_code
  4298. obj['project_name'] = prescription.project[b].project.project_name
  4299. obj['spec'] = ''
  4300. obj['name_id'] = 0
  4301. obj['unit']= prescription.project[b].project.unit
  4302. } else if (prescription.project[b].type == 3) {
  4303. obj['statistical_classification'] = ''
  4304. obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
  4305. obj['project_name'] = prescription.project[b].good_info.good_name
  4306. obj['spec'] = prescription.project[b].good_info.specification_name
  4307. obj['name_id'] = prescription.project[b].good_info.manufacturer
  4308. obj['unit']= prescription.project[b].good_info.packing_unit
  4309. }
  4310. tempProject.push(obj)
  4311. }
  4312. // for (let b = 0; b < prescription.addition.length; b++) {
  4313. // const obj = {
  4314. // id: prescription.addition[b].id,
  4315. // item_name: prescription.addition[b].item_name,
  4316. // price: prescription.addition[b].price,
  4317. // count: prescription.addition[b].count,
  4318. // item_id: prescription.addition[b].item_id
  4319. // }
  4320. // tempAddition.push(obj)
  4321. // }
  4322. const index = i + 1
  4323. console.log('~~~~~~~~')
  4324. console.log(prescription.order)
  4325. prescription.order.order_status = prescription.order.order_status.toString()
  4326. prescription.order.order_status = parseInt(prescription.order.order_status)
  4327. const obj = {
  4328. id: prescription.id,
  4329. name: this.getPName(prescription.med_type, index),
  4330. advices: tempAdvice,
  4331. project: tempProject,
  4332. addition: tempAddition,
  4333. order_status: prescription.order_status,
  4334. type: prescription.type,
  4335. med_type: prescription.med_type,
  4336. order: prescription.order
  4337. }
  4338. // inner_prescription.push(obj)
  4339. big_prescriptions[c].prescriptions.push(obj)
  4340. this.prescriptions.push(obj)
  4341. }
  4342. }
  4343. }
  4344. this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
  4345. for (let i = 0; i < this.big_prescriptions.length; i++) {
  4346. if (this.big_prescriptions[i].med_type == '11') {
  4347. this.big_prescriptions[i]['is_true'] = 1
  4348. }
  4349. }
  4350. for (let i = 0; i < this.big_prescriptions.length; i++) {
  4351. if (this.big_prescriptions[i].is_true == 1) {
  4352. for (let b = 0; b < this.big_prescriptions[i].prescriptions.length; b++) {
  4353. const obj = {
  4354. med_type: '11',
  4355. prescriptions: []
  4356. }
  4357. const arr = []
  4358. arr.push(this.big_prescriptions[i].prescriptions[b])
  4359. obj.prescriptions = arr
  4360. this.big_prescriptions.push(obj)
  4361. }
  4362. }
  4363. }
  4364. console.log(this.big_prescriptions)
  4365. //
  4366. for (let i = 0; i < this.big_prescriptions.length; i++) {
  4367. if (this.big_prescriptions[i].is_true == 1) {
  4368. this.big_prescriptions.splice(i, 1)
  4369. }
  4370. }
  4371. // console.log(this.big_prescriptions)
  4372. for (let i = 0; i < this.big_prescriptions.length; i++) {
  4373. if (this.big_prescriptions[i].prescriptions.length > 0) {
  4374. this.big_prescriptions[i]['curPrescriptions'] = JSON.parse(JSON.stringify(this.big_prescriptions[i].prescriptions[0]))
  4375. } else {
  4376. this.big_prescriptions[i]['curPrescriptions'] = {}
  4377. }
  4378. this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
  4379. }
  4380. if (this.big_prescriptions.length > 0) {
  4381. this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
  4382. }
  4383. }
  4384. })
  4385. } else {
  4386. getMonthCharge(params).then(response => {
  4387. if (response.data.state == 0) {
  4388. this.loading = false
  4389. this.$message.error(response.data.msg)
  4390. return false
  4391. } else {
  4392. this.prescriptions = []
  4393. this.month_prescriptions = []
  4394. this.big_month_prescriptions = []
  4395. this.big_prescriptions = []
  4396. this.curPrescriptions = {}
  4397. this.curMonthPrescriptions = {}
  4398. this.loading = false
  4399. this.patientInfo = response.data.data.xt_info
  4400. this.hisPatientInfo = response.data.data.his_info
  4401. this.info = response.data.data.info
  4402. this.order = response.data.data.order
  4403. this.addtions_charge = response.data.data.addtions_charge
  4404. this.setMonthPrescription(response.data.data.month_prescriptions)
  4405. }
  4406. })
  4407. }
  4408. }
  4409. // sz_open(index, med_type, order, prescriptions) {
  4410. // switch (index) {
  4411. // case 1:
  4412. // this.$refs.register9504.show()
  4413. // break
  4414. // case 2:
  4415. // var that = this
  4416. // if (this.activeName == 'first') {
  4417. // this.settle_accounts_type = 1
  4418. // } else {
  4419. // this.settle_accounts_type = 2
  4420. // this.start_time = this.other_start_time
  4421. // this.end_time = this.other_end_time
  4422. // this.settle_accounts_type = 2
  4423. // }
  4424. // const params = {
  4425. // 'patient_id': this.patientInfo.id,
  4426. // 'record_time': this.record_date,
  4427. // 'settle_accounts_type': this.settle_accounts_type,
  4428. // 'admin_user_id': this.$store.getters.xt_user.user.id,
  4429. // 'his_patient_id': this.hisPatientInfo.id
  4430. // }
  4431. //
  4432. // params['p_type'] = med_type
  4433. // params['diagnosis'] = this.form.diagnosis.join(',')
  4434. //
  4435. // axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
  4436. // params: params,
  4437. // headers: {
  4438. // 'Permission': 5
  4439. // }
  4440. // })
  4441. // .then(function(response) {
  4442. // if (response.data.state == 0) {
  4443. // that.$message.error(response.data.msg)
  4444. // return false
  4445. // } else {
  4446. //
  4447. // if (response.data.data.failed_code == -10) {
  4448. // that.$message.error(response.data.data.msg)
  4449. //
  4450. // } else {
  4451. // that.changeRadioAndPatient(1)
  4452. // that.$message({ message: '预结算成功', type: 'success' })
  4453. // }
  4454. //
  4455. // }
  4456. // })
  4457. // .catch(function(error) {
  4458. // })
  4459. // break
  4460. // case 3:
  4461. // this.currentOrder = order
  4462. // this.current_med_type = med_type
  4463. //
  4464. // var ids = []
  4465. // for (let i = 0; i < prescriptions.length; i++) {
  4466. // ids.push(prescriptions[i].id)
  4467. // }
  4468. // var ids_str = ids.join(',')
  4469. // this.temp_ids = ids_str
  4470. //
  4471. // if (this.activeName == 'first') {
  4472. // this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder)
  4473. // } else {
  4474. // this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder)
  4475. // }
  4476. //
  4477. // break
  4478. // case 4:
  4479. // break
  4480. // case 5:
  4481. // var that = this
  4482. // this.$confirm('是否退费', '退费', {
  4483. // confirmButtonText: '确 定',
  4484. // cancelButtonText: '取 消',
  4485. // type: 'warning'
  4486. // }).then(() => {
  4487. // if (that.hisPatientInfo.balance_accounts_type == 2) {
  4488. // const params = {
  4489. // 'order_id': that.order.id,
  4490. // 'number': that.order.number,
  4491. // 'patient_id': that.patientInfo.id,
  4492. // 'record_time': that.record_date
  4493. //
  4494. // }
  4495. // Refund(params).then(response => {
  4496. // if (response.data.state == 0) {
  4497. // that.$message.error(response.data.msg)
  4498. // that.loadingtwo = false
  4499. // return false
  4500. // } else {
  4501. // that.radio = 1
  4502. // that.changeRadioAndPatient(1)
  4503. // that.$message({ message: '退费成功', type: 'success' })
  4504. // that.loadingtwo = false
  4505. // }
  4506. // })
  4507. // } else {
  4508. // axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
  4509. // params: {
  4510. // order_id: this.order.id,
  4511. // record_time: this.record_date,
  4512. // his_patient_id: this.hisPatientInfo.id,
  4513. // admin_user_id: this.$store.getters.xt_user.user.id,
  4514. // patient_id: this.patientInfo.id
  4515. // }
  4516. // })
  4517. // .then(function(response) {
  4518. // if (response.data.state == 0) {
  4519. // that.$message.error(response.data.msg)
  4520. // return false
  4521. // } else {
  4522. // if (response.data.data.failed_code == -10) {
  4523. // that.$message.error(response.data.data.msg)
  4524. // } else {
  4525. // that.changeRadioAndPatient(1)
  4526. // that.$message({ message: '退费成功', type: 'success' })
  4527. // }
  4528. // }
  4529. // })
  4530. // .catch(function(error) {
  4531. // })
  4532. // }
  4533. // }).catch(() => {
  4534. // })
  4535. // break
  4536. // case 6:
  4537. // var that = this
  4538. // axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
  4539. // params: {
  4540. // order_id: this.order.id,
  4541. // record_time: this.record_date,
  4542. // admin_user_id: this.$store.getters.xt_user.user.id,
  4543. // patient_id: this.patientInfo.id
  4544. // }
  4545. // })
  4546. // .then(function(response) {
  4547. // if (response.data.state == 0) {
  4548. // // that.$message.error(response.data.msg)
  4549. // return false
  4550. // } else {
  4551. // if (response.data.data.failed_code == -10) {
  4552. // that.$confirm(response.data.data.msg, '医保错误信息', {
  4553. // confirmButtonText: '确 定',
  4554. // type: 'warning'
  4555. // }).then(() => {
  4556. //
  4557. // }).catch(() => {
  4558. // })
  4559. // } else {
  4560. // that.$message({ message: '查询成功', type: 'success' })
  4561. // }
  4562. // }
  4563. // })
  4564. // .catch(function(error) {
  4565. // })
  4566. // break
  4567. // case 7:
  4568. // if (this.hisPatientInfo.balance_accounts_type != 2) {
  4569. // var that = this
  4570. // axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
  4571. // params: {
  4572. // order_id: order.id,
  4573. // record_time: this.record_date,
  4574. // admin_user_id: this.$store.getters.xt_user.user.id,
  4575. // patient_id: this.patientInfo.id,
  4576. // his_patient_id: this.hisPatientInfo.id
  4577. //
  4578. // }
  4579. // })
  4580. // .then(function(response) {
  4581. // if (response.data.state == 0) {
  4582. // that.$message.error(response.data.msg)
  4583. // return false
  4584. // } else {
  4585. // if (response.data.data.failed_code == -10) {
  4586. // that.$confirm(response.data.data.msg, '医保错误信息', {
  4587. // confirmButtonText: '确 定',
  4588. // type: 'warning'
  4589. // }).then(() => {
  4590. //
  4591. // }).catch(() => {
  4592. // })
  4593. // } else {
  4594. // that.$message({ message: '明细撤销成功', type: 'success' })
  4595. // that.changeRadioAndPatient(1)
  4596. // }
  4597. // }
  4598. // })
  4599. // .catch(function(error) {
  4600. // })
  4601. // } else {
  4602. // const params = {
  4603. // order_id: this.order.id,
  4604. // record_time: this.record_date,
  4605. // admin_user_id: this.$store.getters.xt_user.user.id,
  4606. // patient_id: this.patientInfo.id
  4607. // }
  4608. //
  4609. // refunddetail(params).then(response => {
  4610. // if (response.data.state == 0) {
  4611. // this.$message.error(response.data.msg)
  4612. // this.loadingtwo = false
  4613. // return false
  4614. // } else {
  4615. // this.changeRadioAndPatient(1)
  4616. // this.$message({ message: '撤销明细成功', type: 'success' })
  4617. // }
  4618. // })
  4619. // }
  4620. //
  4621. // break
  4622. // case 8:
  4623. // var ids = []
  4624. // for (let i = 0; i < prescriptions.length; i++) {
  4625. // ids.push(prescriptions[i].id)
  4626. // }
  4627. // var ids_str = ids.join(',')
  4628. //
  4629. // if (this.hisPatientInfo.balance_accounts_type == 2) {
  4630. // this.$confirm('是否进行预结算', '预结算', {
  4631. // confirmButtonText: '确 定',
  4632. // cancelButtonText: '取 消',
  4633. // type: 'warning'
  4634. // }).then(() => {
  4635. // const form = {}
  4636. // form['id'] = this.patientInfo.id
  4637. // form['his_patient_id'] = this.hisPatientInfo.id
  4638. // form['record_time'] = this.record_date
  4639. // form['admin_user_id'] = this.$store.getters.xt_user.user.id
  4640. // form['org_id'] = this.$store.getters.xt_user.org_id
  4641. // form['ids'] = ids_str
  4642. // form['p_type'] = med_type
  4643. // form['diagnosis'] = this.form.diagnosis.join(',')
  4644. // form['sick_type'] = this.form.sick_type
  4645. //
  4646. // if (this.activeName == 'first') {
  4647. // form['settle_accounts_type'] = 1
  4648. // } else {
  4649. // form['start_time'] = this.other_start_time
  4650. // form['end_time'] = this.other_end_time
  4651. // form['settle_accounts_type'] = 2
  4652. // }
  4653. // preSettle(form).then(response => {
  4654. // if (response.data.state == 0) {
  4655. // this.$message.error(response.data.msg)
  4656. // this.loadingtwo = false
  4657. // return false
  4658. // } else {
  4659. // this.changeRadioAndPatient(1)
  4660. // this.$message({ message: '预结算成功', type: 'success' })
  4661. // }
  4662. // })
  4663. // }).catch(() => {
  4664. //
  4665. // })
  4666. // } else {
  4667. // var ids = []
  4668. // for (let i = 0; i < prescriptions.length; i++) {
  4669. // ids.push(prescriptions[i].id)
  4670. // }
  4671. // var ids_str = ids.join(',')
  4672. // var that = this
  4673. // const form = {}
  4674. // form['id'] = this.patientInfo.id
  4675. // form['his_patient_id'] = this.hisPatientInfo.id
  4676. // form['record_time'] = this.record_date
  4677. // form['admin_user_id'] = this.$store.getters.xt_user.user.id
  4678. // form['org_id'] = this.$store.getters.xt_user.org_id
  4679. // form['ids'] = ids_str
  4680. // form['p_type'] = med_type
  4681. // form['diagnosis'] = this.form.diagnosis.join(',')
  4682. // form['sick_type'] = this.form.sick_type
  4683. //
  4684. // if (this.activeName == 'first') {
  4685. // form['settle_accounts_type'] = 1
  4686. // } else {
  4687. // form['start_time'] = this.other_start_time
  4688. // form['end_time'] = this.other_end_time
  4689. // form['settle_accounts_type'] = 2
  4690. // }
  4691. // this.$confirm('是否进行预结算', '预结算', {
  4692. // confirmButtonText: '确 定',
  4693. // cancelButtonText: '取 消',
  4694. // type: 'warning'
  4695. // }).then(() => {
  4696. // axios.get('http://127.0.0.1:9532/sz/api/presettle/get', {
  4697. // params: form,
  4698. // headers: {
  4699. // 'Permission': 5
  4700. // }
  4701. // })
  4702. // .then(function(response) {
  4703. // if (response.data.state == 0) {
  4704. // that.$message.error(response.data.msg)
  4705. // return false
  4706. // } else {
  4707. // if (response.data.data.failed_code == -10) {
  4708. // that.$confirm(response.data.data.msg, '医保错误信息', {
  4709. // confirmButtonText: '确 定',
  4710. // type: 'warning'
  4711. // }).then(() => {
  4712. //
  4713. // }).catch(() => {
  4714. // })
  4715. // } else {
  4716. // that.changeRadioAndPatient(1)
  4717. // that.$message({ message: '预结算成功', type: 'success', duration: 5000 })
  4718. // }
  4719. // }
  4720. // })
  4721. // .catch(function(error) {
  4722. //
  4723. // })
  4724. // }).catch(() => {
  4725. //
  4726. // })
  4727. //
  4728. // }
  4729. //
  4730. // break
  4731. //
  4732. // case 10:
  4733. // this.newStatementVisible = true
  4734. // const obj = {
  4735. // record_time: this.record_date,
  4736. // patient_id: this.patient_id,
  4737. // prescription_id: this.prescription_id,
  4738. // order_id: this.order.id,
  4739. // admin_user_id: this.$store.getters.xt_user.user.id,
  4740. // balance_accounts_type: this.hisPatientInfo.balance_accounts_type,
  4741. // his_patient_id: this.hisPatientInfo.id
  4742. //
  4743. // }
  4744. // this.newOrderObj = obj
  4745. // // this.$refs.print.getInfo(this.order.id)
  4746. // break
  4747. // case 11:
  4748. // if (this.hisPatientInfo.balance_accounts_type == 2) {
  4749. // this.$confirm('是否退号', '退号', {
  4750. // confirmButtonText: '确 定',
  4751. // cancelButtonText: '取 消',
  4752. // type: 'warning'
  4753. // }).then(() => {
  4754. // const params = {
  4755. // 'id': this.hisPatientInfo.id
  4756. // }
  4757. // refundNumber(params).then(response => {
  4758. // if (response.data.state == 0) {
  4759. // this.$message.error(response.data.msg)
  4760. // return false
  4761. // } else {
  4762. // this.radio = 1
  4763. // this.changeRadioAndPatient(1)
  4764. // this.$message({ message: '退号成功', type: 'success' })
  4765. // }
  4766. // })
  4767. // }).catch(() => {
  4768. // })
  4769. // } else {
  4770. // var that = this
  4771. // this.$confirm('是否退号', '退号', {
  4772. // confirmButtonText: '确 定',
  4773. // cancelButtonText: '取 消',
  4774. // type: 'warning'
  4775. // }).then(() => {
  4776. // axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
  4777. // params: {
  4778. // order_id: this.order.id,
  4779. // record_time: this.record_date,
  4780. // admin_user_id: this.$store.getters.xt_user.user.id,
  4781. // patient_id: this.patientInfo.id,
  4782. // his_patient_id: this.hisPatientInfo.id
  4783. // }
  4784. // })
  4785. // .then(function(response) {
  4786. // if (response.data.state == 0) {
  4787. // that.$message.error(response.data.msg)
  4788. // return false
  4789. // } else {
  4790. // if (response.data.data.failed_code == -10) {
  4791. // that.$confirm(response.data.data.msg, '医保错误信息', {
  4792. // confirmButtonText: '确 定',
  4793. // type: 'warning'
  4794. // }).then(() => {
  4795. //
  4796. // }).catch(() => {
  4797. // })
  4798. // } else {
  4799. // that.changeRadioAndPatient(1)
  4800. // that.$message({ message: '退号成功', type: 'success' })
  4801. // }
  4802. // }
  4803. // })
  4804. // .catch(function(error) {
  4805. // })
  4806. // }).catch(() => {
  4807. // })
  4808. // }
  4809. // break
  4810. // }
  4811. // }
  4812. }
  4813. ,
  4814. mounted() {
  4815. const that = this
  4816. window.onresize = () => {
  4817. return (() => {
  4818. window.fullHeight = document.documentElement.clientHeight
  4819. that.fullHeight = window.fullHeight
  4820. })()
  4821. }
  4822. }
  4823. ,
  4824. watch: {
  4825. fullHeight(val) {
  4826. if (!this.timer) {
  4827. this.fullHeight = val
  4828. const tableHeight = val - 243
  4829. this.tableHeight = tableHeight
  4830. this.timer = true
  4831. const that = this
  4832. setTimeout(function() {
  4833. that.timer = false
  4834. }, 400)
  4835. }
  4836. }
  4837. }
  4838. }
  4839. </script>
  4840. <style lang="scss" scoped>
  4841. .app-container {
  4842. height: 100%;
  4843. }
  4844. .outpatientChargesManagement {
  4845. height: 100%;
  4846. display: flex;
  4847. flex-direction: column;
  4848. .mainLeft {
  4849. width: 200px;
  4850. height: 100%;
  4851. display: flex;
  4852. flex-direction: column;
  4853. padding-top: 20px;
  4854. .el-radio {
  4855. margin-right: 5px;
  4856. }
  4857. }
  4858. .mainCell {
  4859. display: flex;
  4860. align-items: center;
  4861. }
  4862. .fixedCell {
  4863. position: fixed;
  4864. z-index: 99;
  4865. right: 42px;
  4866. background: #fff;
  4867. display: flex;
  4868. justify-content: space-between;
  4869. }
  4870. .mainRight {
  4871. margin-left: 10px;
  4872. flex: 1;
  4873. height: 100%;
  4874. display: flex;
  4875. flex-direction: column;
  4876. overflow-y: auto;
  4877. .cellSpan {
  4878. min-width: 80px;
  4879. display: inline-block;
  4880. margin-right: 10px;
  4881. }
  4882. }
  4883. .tabsBox {
  4884. position: relative;
  4885. overflow-y: auto;
  4886. height: 450px;
  4887. .el-tabs__item {
  4888. padding: 0 10px;
  4889. }
  4890. }
  4891. .addTab {
  4892. position: absolute;
  4893. right: 6px;
  4894. top: 3px;
  4895. z-index: 20;
  4896. }
  4897. .mainCenter {
  4898. display: flex;
  4899. flex: 1;
  4900. height: 100%;
  4901. }
  4902. .costBox {
  4903. width: 100%;
  4904. height: 60px;
  4905. background: #fff;
  4906. position: absolute;
  4907. bottom: 0;
  4908. display: flex;
  4909. align-items: center;
  4910. justify-content: space-between;
  4911. }
  4912. .centerLeft {
  4913. flex: 1;
  4914. display: flex;
  4915. flex-direction: column;
  4916. position: relative;
  4917. overflow-y: auto;
  4918. }
  4919. .preTabs {
  4920. height: 100%;
  4921. display: flex;
  4922. flex-direction: column;
  4923. .el-tab-pane {
  4924. height: auto !important;
  4925. }
  4926. }
  4927. .settlementTabs {
  4928. flex: 1;
  4929. width: 100%;
  4930. .el-tab-pane {
  4931. height: 100%;
  4932. }
  4933. .el-tabs__content {
  4934. height: 100%;
  4935. }
  4936. }
  4937. .centerRight {
  4938. width: 300px;
  4939. margin-left: 10px;
  4940. display: flex;
  4941. flex-direction: column;
  4942. overflow-y: auto;
  4943. }
  4944. .RP {
  4945. color: #409EFF;
  4946. font-size: 20px;
  4947. margin-bottom: 5px;
  4948. }
  4949. .centerRightTitle {
  4950. color: #409EFF;
  4951. }
  4952. .basicUl {
  4953. border-top: 1px solid #e5e5e5;
  4954. border-left: 1px solid #e5e5e5;
  4955. display: flex;
  4956. flex-wrap: wrap;
  4957. li {
  4958. border-bottom: 1px solid #e5e5e5;
  4959. border-right: 1px solid #e5e5e5;
  4960. width: 100%;
  4961. min-height: 38px;
  4962. /* line-height: 38px;
  4963. text-indent: 5px; */
  4964. font-size: 14px;
  4965. display: flex;
  4966. align-items: center;
  4967. padding: 5px;
  4968. box-sizing: border-box;
  4969. }
  4970. }
  4971. }
  4972. </style>
  4973. <style lang="scss">
  4974. #tab-more {
  4975. .el-icon-close {
  4976. display: none;
  4977. }
  4978. }
  4979. .settlementTabs {
  4980. .el-tabs__content {
  4981. height: 90%;
  4982. }
  4983. }
  4984. .preTabs {
  4985. .el-tabs__content {
  4986. flex: 1;
  4987. overflow-y: auto;
  4988. padding: 5px 0 5px 5px;
  4989. }
  4990. }
  4991. .centerDialog {
  4992. .el-dialog__body {
  4993. max-height: calc(100vh - 100px) !important;
  4994. padding: 0 20px;
  4995. }
  4996. }
  4997. ::-webkit-scrollbar {
  4998. height: 20px;
  4999. }
  5000. .diagonal-header {
  5001. background-image: linear-gradient(-45deg, #fff 50%, #eef1f6 50%), linear-gradient(45deg, #fff 50%, #eef1f6 50%);
  5002. background-size: 100% 1px;
  5003. background-position: 0% 0%, 100% 0%;
  5004. background-repeat: no-repeat;
  5005. }
  5006. </style>