outpatientChargesManagement.vue 266KB

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