outpatientChargesManagement.vue 269KB

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