outpatientChargesManagement.vue 259KB

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