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

outpatientChargesManagement.vue 248KB

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