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

outpatientChargesManagement.vue 251KB

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