outpatientChargesManagement.vue 259KB

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