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

outpatientChargesManagement.vue 226KB

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