outpatientChargesManagement.vue 276KB

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