12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235 |
- <template>
- <div class="main-contain outpatientChargesManagement">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- </div>
- <div class="app-container">
- <div style=" display: flex; justify-content: space-between; margin-bottom: 10px;">
- <div class="content_top" style="margin-right: 10px;">
- <div style="width: 60%;">
- <el-input style="width: 60%"
- v-model="keywords" @input="searchAction"
- @keyup.enter.native="searchAction"
- class="filter-item" placeholder="请输入患者姓名"
- />
- <el-button class="filter-item" type="primary" @click="searchAction">
- 搜索
- </el-button>
- </div>
-
- <div>
- <el-select v-model="sort_type"
- placeholder="请选择"
- style="width: 100%;"
- @change="changeSortType"
- >
- <el-option
- v-for="(item, index) in sort_types"
- :key="index"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </div>
-
- <div style="margin: 0 5px;">
- <el-select v-model="sch_type" placeholder="请选择班次" @change="handleSchType" style="width: 100%;">
- <el-option label="全部" value="0"></el-option>
- <el-option label="上午" value="1"></el-option>
- <el-option label="下午" value="2"></el-option>
- <el-option label="晚上" value="3"></el-option>
- </el-select>
- </div>
-
- <div>
- <el-select v-model="zoneVal" placeholder="请选择分区" style="width: 100%;" @change="handleZoneChange">
- <el-option
- v-for="item in zone_options"
- :key="item.id"
- :label="item.text"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- </div>
- <div class="content_button" style="">
- <el-button
- size="small" type="primary" @click="query">查询
- </el-button>
- <el-button
- v-if="$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10278 ||
- $store.getters.xt_user.org_id == 10610 || $store.getters.xt_user.org_id == 0"
- size="small" type="primary" @click="batch_print_settlte">批量打印结算单
- </el-button>
- <el-button size="small" type="primary" @click="export_detail"
- >报表下载
- </el-button>
- <el-button v-if="$store.getters.xt_user.org_id == 10106 " size="small"
- type="primary" @click="export_detail_ten">报表下载2
- </el-button>
- <el-button v-if="$store.getters.xt_user.org_id == 10318" size="small"
- type="primary" @click="export_detail_ten_two">报表下载3
- </el-button>
-
-
- </div>
- </div>
-
- <div style=" display: flex; justify-content: space-between; margin-bottom: 10px;">
- <div class="content_top" style="margin-right: 10px;">
- <div style="">
- <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
- @change="handleStartTimeChange":editable="false" :clearable="false"
- style="width: 45%;"
- type="date"
- placeholder="选择开始日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- align="right"
- ></el-date-picker>
- <span style="text-align: center;">-</span>
- <el-date-picker
- size="small"
- v-model="end_time"
- prefix-icon="el-icon-date"
- @change="handleEndTimeChange"
- :editable="false"
- :clearable="false"
- style="width: 45%;"
- type="date"
- placeholder="选择结束日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- align="right"
- ></el-date-picker>
- </div>
- <div>
- <el-select v-model="staff" placeholder="请选择缴费人员"
- style="width:100%;" >
- <el-option
- v-for="item,index in admins"
- :key="index"
- :label="item.user_name"
- :value="item.user_name">
- </el-option>
- </el-select>
- </div>
- <div style="margin-left: 5px;">
- <el-select v-model="medTypeVal" @change="handleMedChange"
- placeholder="请选择医疗类别" style="width: 100%;"
- >
- <el-option
- v-for="item in med_options"
- :key="item.id"
- :label="item.text"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
-
-
- </div>
- <div class="content_button">
- <el-button size="small" type="primary" @click="export_detail_three" v-if="$store.getters.xt_user.org_id == 10265 || $store.getters.xt_user.org_id == 0">报表下载12</el-button>
- <el-button size="small" type="primary" @click="accounts_click()">门诊结账</el-button>
- <el-button size="small" type="primary" @click="export_detail_six">诊疗下载</el-button>
- <el-button size="small" type="primary" @click="export_detail_ten_five">导出就诊凭证类型人员</el-button>
- </div>
- </div>
-
- <div style=" display: flex; justify-content: space-between; margin-bottom: 10px;">
- <div class="content_top">
- <el-date-picker size="small"
- v-model="pay_time"
- prefix-icon="el-icon-date"
- :editable="false"
- :clearable="false"
- style="width:250px; "
- type="datetime"
- placeholder="选择缴费日期"
- format="yyyy-MM-dd HH:mm:ss"
- value-format="yyyy-MM-dd HH:mm:ss"
- align="right"
- ></el-date-picker>
- </div>
- <div class="content_top"></div>
- </div>
-
- <el-table
- :data="tableData"
- border
- style="width: 100%"
- :row-style="{ color: '#303133' }"
- @selection-change="handleSelectionChange"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- highlight-current-row
- height="calc(100vh - 300px)"
- >
- <el-table-column align="center" type="selection" width="50"></el-table-column>
- <el-table-column
- prop="date"
- label="序号"
- width="40"
- align="center"
- type="index"
- >
- </el-table-column>
- <el-table-column align="center" width="80" prop="name" label="就诊号">
- <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
- </el-table-column>
- <el-table-column align="center" width="80" prop="name" label="患者名字">
- <template slot-scope="scope">{{ scope.row.patient.name }}</template>
- </el-table-column>
-
- <el-table-column align="center" width="60" prop="name" label="患者性别">
- <template slot-scope="scope">{{ scope.row.patient.gender == 1 ? '男':'女' }}</template>
- </el-table-column>
-
- <el-table-column align="center" width="60" prop="name" label="患者年龄">
- <template slot-scope="scope">{{getAge(scope.row.patient.id_card_no)}}</template>
- </el-table-column>
- <el-table-column align="center" width="90" prop="name" label="患者类型">
- <template slot-scope="scope">
- {{ getpatient(scope.row.patient.patient_type) }}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="80" prop="name" label="应收金额">
- <template slot-scope="scope">{{
- scope.row.medfee_sumamt.toFixed(2)
- }}
- </template>
- </el-table-column>
- <el-table-column align="center" width="80" prop="name" label="实收金额">
- <template slot-scope="scope">{{
- scope.row.medfee_sumamt.toFixed(2)
- }}
- </template>
- </el-table-column>
- <el-table-column align="center" width="80" prop="name" label="折扣金额">
- <template slot-scope="scope">{{
- scope.row.discount_price.toFixed(2)
- }}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="80" prop="name" label="优惠金额">
- <template slot-scope="scope">{{
- scope.row.preferential_price.toFixed(2)
- }}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="70" prop="name" label="科室">
- <template slot-scope="scope">{{
- scope.row.department_name
- }}
- </template>
- </el-table-column>
- <el-table-column align="center" width="90" prop="name" label="医疗类型">
- <template slot-scope="scope">
- <div>{{ getMedType(scope.row.med_type) }}</div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="60" prop="name" label="收费类型">
- <template slot-scope="scope">
- <div v-if="scope.row.is_medicine_insurance == 1">
- 医保
- </div>
- <div v-if="scope.row.is_medicine_insurance != 1">
- 自费
- </div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="60" prop="name" label="险种类型">
- <template slot-scope="scope">
- <div v-if="scope.row.insutype == '390'">
- 城乡居民
- </div>
- <div v-if="scope.row.insutype == '310'">
- 职工
- </div>
- </template>
- </el-table-column>
-
-
- <el-table-column align="center" width="90" prop="name" label="就诊凭证类型">
- <template slot-scope="scope">
- <div v-if="scope.row.mdtrt_cert_type =='01'">
- 医保电子凭证
- </div>
- <div v-if="scope.row.mdtrt_cert_type =='02'">
- 居民身份证
- </div>
-
- <div v-if="scope.row.mdtrt_cert_type =='03'">
- 社会保障卡
- </div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="100" prop="name" label="收费日期">
- <template slot-scope="scope">
- {{
- scope.row.setl_time
- ? scope.row.setl_time
- : getTimes(scope.row.settle_accounts_date)
- }}
- </template>
- </el-table-column>
- <el-table-column align="center" width="65" prop="name" label="收费员">
- <template slot-scope="scope">{{
- getName(scope.row.creator)
- }}
- </template>
- </el-table-column>
- <el-table-column align="center" width="65" prop="name" label="状态">
- <template slot-scope="scope">
- <div v-if="scope.row.order_status == 1">待结算</div>
- <div v-if="scope.row.order_status == 2">已结算</div>
- <div v-if="scope.row.order_status == 3">已退费</div>
- </template>
- </el-table-column>
- <el-table-column align="center" width="" prop="name" label="操作">
- <template slot-scope="scope">
- <el-button class="butt_1" size="mini" type="primary" @click="toDetail(scope.row)"
- >详情
- </el-button
- >
- <el-button class="butt_2" size="mini" type="primary" @click="toPrint(scope.row)">
- 结算单
- </el-button>
- <el-button v-if="$store.getters.xt_user.org_id == 10191" class="butt_2" size="mini" type="primary"
- @click="tolistPrint(scope.row)">
- 结算清单
- </el-button>
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- @click="uploadInfo(scope.row)"
- v-if="scope.row.order_status == 2 && scope.row.result.id == 0"
- >
- 上传结算清单
-
- </el-button>
-
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- @click="confirmUploadInfo(scope.row)"
- v-if="$store.getters.xt_user.org_id == 10265 || $store.getters.xt_user.org_id == 10191"
- >
- 确认结算清单
- </el-button>
-
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- @click="cancelUploadTwo(scope.row)"
- v-if="$store.getters.xt_user.org_id == 10265"
- >
- 取消结算清单
- </el-button>
-
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- @click="queryData(scope.row)"
- v-if="$store.getters.xt_user.org_id == 10265"
- >
- 查询结算清单
- </el-button>
-
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- @click="cancelUpload(scope.row)"
- v-if="$store.getters.xt_user.org_id != 10265 && scope.row.order_status == 2 && scope.row.result.id > 0"
- >
- 撤销结算清单
- </el-button>
-
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- @click="cancelUploadThree(scope.row)"
- >
- 更改结算清单状态为未提交
- </el-button>
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- v-if="
- scope.row.order_status == 2 &&
- $store.getters.xt_user.org_id == 10106
- "
- @click="settlementPrint(scope.row)"
- >结算单
- </el-button>
- <el-button class="butt_2" size="mini" type="primary" @click="toRefund(scope.row)">
- 退费
- </el-button>
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- @click="invoicePrint(scope.row)"
- >打印发票
- </el-button>
- <el-button
- class="butt_2"
- size="mini"
- type="primary"
- @click="open(scope.row)"
- >打印清单
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100]"
- :page-size="10"
- :current-page.sync="page"
- background
- style="margin-top: 20px; float: right"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
-
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="statementVisible"
- >
- <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
- <new-statement-print
- ref="print"
- :paramsObj="orderObj"
- ></new-statement-print>
- </el-dialog>
-
- <!-- 批量打印 -->
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="batchStatementVisible"
- >
- <!-- <batchStatementPrint-->
- <!-- ref="batchPrint"-->
- <!-- :paramsObj="batchOrderObj"-->
- <!-- ></batchStatementPrint>-->
- <batch-statement-print
- ref="batchPrint"
- :paramsObj="batchOrderObj"
- ></batch-statement-print>
- </el-dialog>
-
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="statementListVisible"
- >
- <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
- <statement-list-print ref="printlist" :paramsObj='orderObj'></statement-list-print>
- </el-dialog>
- <!-- 打印结算清单 -->
- <el-dialog
- class="centerDialog"
- width="900px"
- title="打印"
- :visible.sync="listVisible"
- >
- <listPrint ref="checklists" :paramsObj='paramsObj' :key="jgFileTimer"></listPrint>
- </el-dialog>
-
- <el-dialog
- class="centerDialog"
- width="900px"
- title="打印"
- :visible.sync="allListVisible"
- >
- <allListPrint :paramsObj="paramsObj"></allListPrint>
- </el-dialog>
-
- <!--<el-dialog-->
- <!--class="centerDialog"-->
- <!--width="1200px"-->
- <!--title="打印"-->
- <!--:visible.sync="statementVisible9504">-->
- <!--<!–<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>–>-->
- <!--<!–<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>–>-->
- <!--<new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>-->
- <!--</el-dialog>-->
-
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="invoiceVisible"
- >
- <invoice-print ref="print" :invoiceParams="invoiceParams"></invoice-print>
- </el-dialog>
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="settlementVisible"
- >
- <settlement-print
- ref="print"
- :paramsObj="settlementObj"
- ></settlement-print>
- </el-dialog>
-
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="settlementVisible"
- >
- <settlement-print
- ref="print"
- :paramsObj="settlementObj"
- ></settlement-print>
- </el-dialog>
- <!-- 门诊结账 -->
- <el-dialog
- class="centerDialog"
- width="70%"
- title="打印"
- :visible.sync="accounts_click_vi"
- >
- <div>
- <div id="accounts_print">
- <div style="text-align: center;font-size: 18px;margin-bottom:20px ;">门诊结账</div>
- <div style="margin: auto;">
- <div style="margin-bottom: 20px;">
- <table class="table" border="1" style="border-collapse: collapse;text-align: center;width: 100%;">
- <tr>
- <td>起始日期:</td>
- <td>{{start_time}}</td>
- <td>终止日期:</td>
- <td>{{end_time}}</td>
- <td>缴款日期:</td>
- <td>{{pay_time}}</td>
- </tr>
- <tr>
- <td>起始单号:</td>
- <td v-if="tableData2&&tableData2.length > 0">{{tableData2[0].number}}</td>
- <td v-else></td>
- <td>终止单号:</td>
- <td v-if="tableData2&&tableData2.length > 0">{{tableData2[tableData2.length-1].number}}</td>
- <td v-else></td>
- <td>缴款人员:</td>
- <td>{{staff}}</td>
- </tr>
- <tr>
- <td>收费张数:</td>
- <td v-if="tableData2">{{tableData2.length}}</td>
- <td v-else></td>
-
- <td>作废张数:</td>
- <td>0</td>
- <td>退费张数:</td>
- <td>0</td>
- </tr>
- <tr>
- <td>收费金额:</td>
- <td>{{getTotal()}}</td>
- <td>作废金额:</td>
- <td>0</td>
- <td>退费金额:</td>
- <td>0</td>
- </tr>
- <tr>
- <td>合计张数:</td>
- <td v-if="tableData2">{{tableData2.length}}</td>
- <td v-else></td>
- <td>合计金额:</td>
- <td colspan="3">{{getTotal()}}</td>
- </tr>
- </table>
- </div>
- <div style="margin-bottom: 20px;">
- <table class="table" border="1" style="border-collapse: collapse;text-align: center;width: 50%;">
- <tr>
- <td>医保</td>
- <td>微信</td>
- <td>现金</td>
- <td>门诊预存</td>
- <td>合计</td>
- </tr>
- <tr>
- <td>{{getYibao()}}</td>
- <td>0</td>
- <td>{{getPsnCash()}}</td>
- <td>0</td>
- <td>{{getTotal()}}</td>
- </tr>
- </table>
- </div>
- <div>
- <table class="table" border="1" style="border-collapse: collapse;text-align: center;width: 100%;">
- <tr>
- <td>单号</td>
- <td>卡号</td>
- <td>姓名</td>
- <td>年龄</td>
- <td>性别</td>
- <td>收费金额</td>
- <td>收费时间</td>
- <td>类型</td>
- </tr>
- <tr v-for="item in tableData2">
- <td>{{item.number}}</td>
- <td>{{item.certno}}</td>
- <td>{{item.psn_name}}</td>
- <td>{{item.patient.age}}</td>
- <td v-if="item.gend == 1">男</td>
- <td v-if="item.gend != 1">女</td>
- <td>{{item.medfee_sumamt}}</td>
- <td>{{item.setl_time}}</td>
- <td></td>
- </tr>
- </table>
- </div>
- </div>
-
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="accounts_click_vi = false">取 消</el-button>
- <el-button type="primary" @click="accounts_sum">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog title="修改发票号码" :visible.sync="dialogfapiaoVisible">
- <el-input v-model="fapiao_number" type="text"></el-input>
- <div slot="footer" class="dialog-footer">
- <el-button @click="camcleModifyFaPiaoCode">取 消</el-button>
- <el-button type="primary" @click="modifyFaPiaoCode">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
-
-
- <script>
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
- import { ModifyFapiaoCode } from '@/api/his/his_tools'
-
- // import NewStatementPrint from './newStatementPrint'
- import { adminMainView} from "@/api/role/admin";
- import NewStatementPrint from './statementPrint.vue'
- import listPrint from './listPrint'
- import allListPrint from './allListPrint'
- import NewStatementPrintTwo from './newStatementPrintTwo'
- import { fetchAllAdminUsers } from '@/api/doctor'
- import axios from 'axios'
- import invoicePrint from './invoicePrint'
- import settlementPrint from './settlementPrint'
- import { jsGetAge, uParseTime } from '@/utils/tools'
- import {
- exportOrderInfo,
- getAllOrders,
- getHisDataFive,
- getHisDataSix,
- getHisDataThree,
- getHisDataTwo,
- handleOne,
- getHisOrderListtwo,
- modifyFapiaoCodetwo
- } from '../../api/his/his'
-
- import { handleData10106, handleData10138Two, handleData10318 } from '../../api/his/his_export'
- import StatementListPrint from './statementListPrint'
- import { getDialysisRecordInitData } from '@/api/dialysis_record'
- import BatchStatementPrint from './batchStatementPrint'
- import { exportMdtrtCertType } from '../../api/his/his_tools'
-
- const moment = require('moment')
- export default {
- name: 'OutpatientChargesSummary',
- components: {
- BatchStatementPrint,
- StatementListPrint,
- NewStatementPrintTwo,
- NewStatementPrint,
- BreadCrumb,
- listPrint,
- allListPrint,
- invoicePrint,
- settlementPrint,
- },
- data() {
- return {
- staff:"",
- admins:[],
- orderObj: {},
- batchOrderObj: {},
- fapiao_number:"",
- med_options: [
- { id: 0, text: '全部' },
- { id: 11, text: '普通门诊' },
- { id: 14, text: '门诊特殊病' }
- ],
- zone_options: [
- { id: 0, text: '全部分区' }
- ],
- statementListVisible: false,
- statementVisible: false,
- batchStatementVisible: false,
- statementVisible9504: false,
- orderObj9504: {},
- crumbs: [
- { path: false, name: '门诊收费' },
- { path: false, name: '项目消费明细汇总' }
- ],
- tableData: [],
- tableData2:[],
- selecting_schs: [],
- dialogfapiaoVisible:false,
- targeOrderId:0,
- targeObj:{},
- limit: 10,
- page: 1,
- keywords: '',
- sch_type: '0',//班次
- zoneVal: 0,//分区
- medTypeVal: 0,
- start_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- pay_time:"",
- total: '',
- doctors: [],
- sort_type: 1,
- sort_types: [
- { value: 1, label: '处方时间' },
- { value: 2, label: '结算时间' }
- ],
- admin_user_id: '',
- listVisible: false,
- allListVisible: false,
- adminUserOptions: [],
- invoiceVisible: false,
- paramsObj: {id:''},
- invoiceParams: {},
- settlementVisible: false,
- settlementObj: {},
- accounts_click_vi:false,
- org_id:'',
- patienttypeArr:[{value:1,label:'血透患者'},{value:2,label:'慢病患者'},{value:3,label:'会员患者'},
- {value:4,label:'腹透患者'},{value:5,label:'CKD患者'},{value:6,label:'其他患者'}
- ],
- jgFileTimer:''
- }
- },
-
- //判断列表页是否刷新
- beforeRouteEnter(to, from, next) {
- console.log(from, 'beforeRouteEnter')
- if (from.path == '/outpatientCharges/summaryDetail') {
- next((vm) => {
- vm.page = vm.$store.getters.pagedata.list.page
- vm.limit = vm.$store.getters.pagedata.list.limit
- vm.keywords = vm.$store.getters.pagedata.list.keywords
- vm.start_time = vm.$store.getters.pagedata.list.start_time
- vm.end_time = vm.$store.getters.pagedata.list.end_time
- vm.admin_user_id = vm.$store.getters.pagedata.list.admin_user_id
- vm.p_type = 2
- vm.sort_type = vm.$store.getters.pagedata.list.sort_type
- setTimeout(() => {
- vm.getHisOrderList()
- }, 300)
-
- })
- } else {
- next()
- }
- },
-
- beforeRouteLeave(to, from, next) {
- if (to.path == '/outpatientCharges/summaryDetail') {
- console.log(to.path, '路由跳转判断')
- this.setStorage()
- next()
- } else {
- next()
- }
- },
-
- created() {
- this.getInitData()
- this.fetchAllAdminUsers()
- this.getDoctorList()
- this.getHisOrderList()
- this.getAllstaff()
- this.org_id == this.$store.getters.xt_user.org.id
- },
-
- methods: {
- // 患者类型
- getpatient(id){
- const options = this.patienttypeArr
- if(id !=0&&id!=''){
- for(let i in options){
- if(id == options[i].value){
- return options[i].label
- }
- }
- }else{
- return ''
- }
- },
- query(){
- this.getHisOrderList()
- },
- getAge(UUserCard) {
- if (UUserCard != null && UUserCard != '') {
- //获取年龄
- var myDate = new Date();
- var month = myDate.getMonth() + 1;
- var day = myDate.getDate();
- var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1;
- if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
- age++;
- }
- return age;
- }
- },
- accounts_click(){
- let params = {
- start_time: this.start_time,
- end_time: this.end_time,
- }
- getHisOrderListtwo(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.accounts_click_vi= true
- this.tableData2 = response.data.data.order2
-
- }
- })
-
- },
- getPsnCash(){
- let result = 0
- if(this.tableData2 != null) {
- for (let i = 0; i < this.tableData2.length; i++) {
- result = result + this.tableData2[i].psn_cash_pay
- }
- }
- return result.toFixed(2)
- },
- getYibao(){
- let result = 0
- if(this.tableData2 != null) {
-
- for (let i = 0; i < this.tableData2.length; i++) {
- result = result + this.tableData2[i].fund_pay_sumamt
- }
- }
- return result.toFixed(2)
- },
- getTotal(){
- let result = 0
- if(this.tableData2 != null) {
-
- for (let i = 0; i < this.tableData2.length; i++) {
- result = result + this.tableData2[i].medfee_sumamt
- }
- }
- return result.toFixed(2)
- },
- getAllstaff(){
- adminMainView()
- .then(rs => {
-
- var resp = rs.data;
- if (resp.state === 1) {
- var adminData = resp.data.admins
- this.admins.push(...adminData);
- } else {
- this.$message.error(resp.msg);
- }
- })
- .catch(err => {
- this.$message.error(err);
- });
-
-
- },
- // 门诊结账
- accounts_sum(){
- const style = '@media print {#accounts_print{font-size:15px} .table tr td{padding:5px 0;}}'
- printJS({
- printable: "accounts_print",
- type: "html",
- style: style,
- scanStyles: false
- });
-
- },
- handleSelectionChange(val) {
- this.selecting_schs = val
- },
- handleSchType(val) {
- this.sch_type = val
- // this.getHisOrderList()
- }, handleMedChange() {
- // this.getHisOrderList()
- },
- handleZoneChange(val) {
- this.zoneVal = val
- // this.getHisOrderList()
-
- },
- getInitData: function() {
- getDialysisRecordInitData().then((rs) => {
- var resp = rs.data
- if (resp.state == 1) {
- var zones = resp.data.zones
- var zone_options = [{ id: 0, text: '全部' }]
- for (let z_i = 0; z_i < zones.length; z_i++) {
- const zone = zones[z_i]
- zone_options.push({ id: zone.id, text: zone.name })
- }
- this.zone_options = zone_options
-
- } else {
- this.$message.error(resp.msg)
- }
- })
- },
-
- setStorage() {
- this.$store.commit('SET_PAGEDATA', {
- page: this.page,
- limit: this.limit,
- keywords: this.keywords,
- start_time: this.start_time,
- end_time: this.end_time,
- type: this.admin_user_id || '',
- p_type: 2,
- sort_type: this.sort_type
- })
- },
-
- getMedType(med_type) {
- var med_type = parseInt(med_type)
- switch (med_type) {
- case 11:
- return '普通门诊'
- break
- case 12:
- return '门诊挂号'
- break
- case 13:
- return '急诊'
- break
- case 14:
- return '门诊特殊病'
- break
- case 15:
- return '门诊统筹'
- break
- case 16:
- return '门诊慢性病'
- break
- case 21:
- return '普通住院'
- break
- case 140104:
- return '城乡门诊特殊病(140104)'
- break
- case 992102:
- return '单病种(992102)'
- break
- }
- },
- cancelUploadTwo(row) {
- if (this.$store.getters.xt_user.org_id == 10265) {
- var that = this
- axios
- .get('http://127.0.0.1:9532/api/4102', {
- params: {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- stas_type: 0
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- } else {
- that.$message.success('撤销成功')
- row.result.id = 0
- }
- }
- })
- .catch(function(error) {
- })
- }
- },
- cancelUpload(row) {
- var that = this
- axios
- .get('http://127.0.0.1:9532/zh/api/clearsettle', {
- params: {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- } else {
- that.$message.success('撤销成功')
- row.result.id = 0
- }
- }
- })
- .catch(function(error) {
- })
-
- },
- uploadInfo(row) {
- var that = this
- axios
- .get('http://127.0.0.1:9532/api/settlelist/get', {
- params: {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- } else {
- that.$message.success('上传成功')
- row.result.id = response.data.data.result.id
- }
- }
- })
- .catch(function(error) {
- })
- }, export_detail_zzzz() {
- handleTeamData({}).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- for (let i = 0; i < response.data.data.ps.length; i++) {
- let order = response.data.data.ps[i]
- let obj = {
- id: order.team_id,
- name: order.pn,
- sub_id: order.project.id,
- sub_name: order.project.project_name
- }
- list.push(obj)
- }
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- let obj = {
- '大项id': list[i].id,
- '大项名称': list[i].name,
- '子项id': list[i].sub_id,
- '子项名称': list[i].sub_name
- }
- tarList.push(obj)
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '大项id',
- '大项名称',
- '子项id',
- '子项名称'
- ]
- const filterVal = [
- '大项id',
- '大项名称',
- '子项id',
- '子项名称'
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }
- })
-
- },
- queryData(row) {
- var that = this
- axios
- .get('http://127.0.0.1:9532/api/4103', {
- params: {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- that
- .$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- } else {
- that
- .$confirm(response.data.data.msg, '医保信息', {
- confirmButtonText: '确 定'
- })
- .then(() => {
- })
- .catch(() => {
- })
- }
- }
- })
- .catch(function(error) {
- })
-
- }, cancelUploadThree(row) {
- var that = this
- // if(this.$store.getters.xt_user.org_id == 10191){
- axios
- .get('http://127.0.0.1:9532/api/comfirm/upload', {
- params: {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- stas_type: 0
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- that
- .$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- } else {
- that.$message.success('确认成功')
- row.result.id = response.data.data.result.id
- }
- }
- })
- .catch(function(error) {
- })
- // }
- },
- confirmUploadInfo(row) {
- var that = this
- if (this.$store.getters.xt_user.org_id == 10191) {
- axios
- .get('http://127.0.0.1:9532/api/comfirm/upload', {
- params: {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- stas_type: 1
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- that
- .$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- } else {
- that.$message.success('确认成功')
- row.result.id = response.data.data.result.id
- }
- }
- })
- .catch(function(error) {
- })
- } else {
- axios
- .get('http://127.0.0.1:9532/api/4102', {
- params: {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- stas_type: 1
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- that
- .$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- } else {
- that.$message.success('确认成功')
- row.result.id = response.data.data.result.id
- }
- }
- })
- .catch(function(error) {
- })
-
- }
-
- },
-
- fetchAllAdminUsers() {
- fetchAllAdminUsers().then((response) => {
- if (response.data.state == 1) {
- this.adminUserOptions = response.data.data.users
- }
- })
- },
- getName(admin_user_id) {
- for (let i = 0; i < this.adminUserOptions.length; i++) {
- if (this.adminUserOptions[i].id == admin_user_id) {
- return this.adminUserOptions[i].name
- }
- }
- },
- toRefund(row) {
- if (row.his_patient.balance_accounts_type == 2) {
- this.$confirm('是否退费', '退费', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- })
- .then(() => {
- let params = {
- order_id: row.id,
- patient_id: row.patient_id,
- record_time: this.getTimes(row.settle_accounts_date)
- }
- Refund(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.$message({ message: '退费成功', type: 'success' })
- this.getHisOrderList()
- }
- })
- })
- .catch(() => {
- })
- } else {
- var that = this
- this.$confirm('是否退费', '退费', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- })
- .then(() => {
- let params = {
- order_id: row.id,
- patient_id: row.patient_id,
- record_time: that.getTimes(row.settle_accounts_date),
- admin_user_id: that.$store.getters.xt_user.user.id
- }
- axios
- .get('http://127.0.0.1:9532/api/refund/post', {
- params: params
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- } else {
- that.$message({
- message: '退费成功',
- type: 'success',
- duration: 5000
- })
- that.getHisOrderList()
- }
- }
- })
- .catch(function(error) {
- })
- })
- .catch(() => {
- })
- }
- }, tolistPrint(row) {
- // 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) {
- // if (row.mdtrt_id.indexOf('H') > -1) {
- // this.statementVisible9504 = true
- // let obj = {
- // order_id: row.id,
- // patient_id: row.patient_id,
- // record_time: this.getTimes(row.settle_accounts_date),
- // admin_user_id: this.$store.getters.xt_user.user.id
- // }
- // this.orderObj9504 = obj
- // } else {
- //
- // this.statementVisible9504 = true
- // let obj = {
- // order_id: row.id,
- // patient_id: row.patient_id,
- // record_time: this.getTimes(row.settle_accounts_date),
- // admin_user_id: this.$store.getters.xt_user.user.id,
- // balance_accounts_type: 2
- // }
- // this.orderObj9504 = obj
- // }
- //
- // } else {
- this.statementListVisible = true
- let obj = {
- order_id: row.id,
- settle_type: row.settle_type,
- start_time: row.settle_start_time,
- end_time: row.settle_end_time,
- balance_accounts_type: row.his_patient.balance_accounts_type
- }
- this.orderObj = obj
- },
-
- toPrint(row) {
- // 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) {
- // if (row.mdtrt_id.indexOf('H') > -1) {
- // this.statementVisible9504 = true
- // let obj = {
- // order_id: row.id,
- // patient_id: row.patient_id,
- // record_time: this.getTimes(row.settle_accounts_date),
- // admin_user_id: this.$store.getters.xt_user.user.id
- // }
- // this.orderObj9504 = obj
- // } else {
- //
- // this.statementVisible9504 = true
- // let obj = {
- // order_id: row.id,
- // patient_id: row.patient_id,
- // record_time: this.getTimes(row.settle_accounts_date),
- // admin_user_id: this.$store.getters.xt_user.user.id,
- // balance_accounts_type: 2
- // }
- // this.orderObj9504 = obj
- // }
- //
- // } else {
- var balance_accounts_type = row.his_patient.balance_accounts_type
- if (row.is_medicine_insurance == 1){
- balance_accounts_type = 1
- }else{
- balance_accounts_type = 2
-
- }
-
- this.statementVisible = true
- let obj = {
- order_id: row.id,
- settle_type: row.settle_type,
- start_time: row.settle_start_time,
- end_time: row.settle_end_time,
- balance_accounts_type:balance_accounts_type
- }
- this.orderObj = obj
- },
- settlementPrint(row) {
- this.settlementVisible = true
- let obj = {
- order_id: row.id
- }
- this.settlementObj = obj
- },
- export_detail_two() {
- let params = {}
- getHisDataTwo(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- console.log(response.data.data.order)
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- for (let b = 0; b < order.info.length; b++) {
- let obj = {
- index: b + 1,
- org_name: '肇庆三鹤血液透析中心',
- name: order.psn_name,
- id_card_no: order.certno,
- level: '未定级',
- psn_type: order.psn_type,
- date: '202年3月',
- start_time: order.his.in_hosptial_time,
- end_time: order.his.out_hosptial_time,
- total: order.info[b].det_item_fee_sumamt,
- fund_total: order.info[b].inscp_scp_amt,
- patient_id: order.info[b].patient_id,
- dialysis_time: this.getTimes(order.info[b].upload_date)
-
- }
- // if (order.info[b].advice_id > 0 && order.info[b].project_id == 0) {
- // obj["dialysis_time"] = this.getTimes(order.info[b].advice_date)
- // } else if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
- // obj["dialysis_time"] = this.getTimes(order.info[b].record_date)
- // }
- if (order.psn_type == '11') {
- obj['psn_type'] = '职工在职'
- } else if (order.psn_type == '12') {
- obj['psn_type'] = '职工退休'
- } else if (order.psn_type == '13') {
- obj['psn_type'] = '离休'
- } else if (order.psn_type == '14') {
- obj['psn_type'] = '居民医保'
- } else if (order.psn_type == '15') {
- obj['psn_type'] = '居民医保'
- } else if (order.psn_type == '16') {
- obj['psn_type'] = '居民医保'
- }
-
- list.push(obj)
- }
- }
- console.log(list)
-
- var new_list = this.unique_two(list)
-
- for (let i = 0; i < new_list.length; i++) {
- let total = 0
- let fund_total = 0
- for (let b = 0; b < list.length; b++) {
- if (new_list[i].patient_id == list[b].patient_id && new_list[i].dialysis_time == list[b].dialysis_time) {
- total = total + list[b].total
- fund_total = fund_total + list[b].fund_total
- }
- }
- new_list[i].total = total.toFixed(2)
- new_list[i].fund_total = fund_total.toFixed(2)
-
- }
-
- console.log(new_list)
-
- var tarList = []
- for (let i = 0; i < new_list.length; i++) {
- let obj = {
- '序号': i + 1,
- '医疗机构名称': new_list[i].org_name,
- '姓名': new_list[i].name,
- '身份证号': new_list[i].id_card_no,
- '医院等级': new_list[i].level,
- '参保类型': new_list[i].psn_type,
- '费用所属期': new_list[i].date,
- '开始就医时间': new_list[i].start_time,
- '结束就医时间': new_list[i].end_time,
- '透析日期': new_list[i].dialysis_time,
- '本次透析医疗总金额': new_list[i].total,
- '本次透析医保结算费用金额': new_list[i].fund_total
-
- }
- tarList.push(obj)
-
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '序号',
- '医疗机构名称',
- '姓名',
- '身份证号',
- '医院等级',
- '参保类型',
- '费用所属期',
- '开始就医时间',
- '结束就医时间',
- '透析日期',
- '本次透析医疗总金额',
- '本次透析医保结算费用金额'
-
- ]
- const filterVal = [
- '序号',
- '医疗机构名称',
- '姓名',
- '身份证号',
- '医院等级',
- '参保类型',
- '费用所属期',
- '开始就医时间',
- '结束就医时间',
- '透析日期',
- '本次透析医疗总金额',
- '本次透析医保结算费用金额'
-
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }
- })
- }, getItemTypeName(order_infos, id, type) {
- console.log(type)
-
- var name = ''
- for (let i = 0; i < order_infos.length; i++) {
- if (type == 1) {
- if (order_infos[i].advice_id == id) {
-
- name = this.getItemName(order_infos[i].med_chrgitm_type)
- }
- } else {
- if (order_infos[i].project_id == id) {
-
- name = this.getItemName(order_infos[i].med_chrgitm_type)
- }
- }
-
- }
- return name
- }, getItemName(med_chrgitm_type) {
- switch (med_chrgitm_type) {
- case '01':
- return '床位费'
- break
- case '02':
- return '诊察费'
-
- break
- case '03':
- return '检查费'
-
- break
- case '04':
- return '化验费'
- break
- case '05':
- return '治疗费'
-
- break
- case '06':
- return '手术费'
-
- break
- case '07':
- return '护理费'
-
- break
- case '08':
- return '材料费'
-
- break
- case '09':
- return '西药费'
-
- break
- case '10':
- return '中药饮片费'
-
- break
- case '11':
- return '中成药费'
-
- break
- case '12':
- return '一般诊疗费'
-
- break
- case '13':
- return '挂号费'
- break
- case '14':
- return '其他费'
- break
- case '0':
- return '其他费'
- break
-
- }
-
- },
-
- export_detail_three() {
- let params = {
- start_time: this.start_time,
- end_time: this.end_time,
- org_id: 10265,
- }
- getHisDataThree(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- console.log(response.data.data.order)
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- let data = this.setMonthPrescription(order.info)
- console.log(data)
- for (let b = 0; b < data.length; b++) {
- let obj = {
- name: order.patient.name,
- id_card_no: order.patient.id_card_no,
- year: order.setl_time.split(' ')[0].split('-')[0],
- month: order.setl_time.split(' ')[0].split('-')[1],
- ddd: this.getTimes(order.settle_accounts_date),
- code: data[b].code,
- pric: data[b].total,
- item_name: data[b].name,
- unit: data[b].unit,
- count: data[b].count,
- item_type_name: this.getItemTypeName(order.info, data[b].id, data[b].type),
- pric_two: data[b].pric
-
- }
- if (order.insutype == '310') {
- obj['insutype'] = '职工'
- } else if (order.insutype == '390') {
- obj['insutype'] = '城乡'
- }
- list.push(obj)
- }
-
- }
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- if (list[i].pric > 0) {
- let obj = {
- '姓名': list[i].name,
- '身份证号': list[i].id_card_no,
- '医保类型': list[i].insutype,
- '年': list[i].year,
- '月': list[i].month,
- '时间': list[i].ddd,
- '药品编码': list[i].code,
- '费用类型': list[i].item_type_name,
- '名称': list[i].item_name,
- '单位': list[i].unit,
- '数量': list[i].count,
- '金额': list[i].pric,
- }
- tarList.push(obj)
- }
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '姓名',
- '身份证号',
- '医保类型',
- '年',
- '月',
- '时间',
- '药品编码',
- '费用类型',
- '名称',
- '单位',
- '数量',
- '金额',
-
- ]
- const filterVal = [
- '姓名',
- '身份证号',
- '医保类型',
- '年',
- '月',
- '时间',
- '药品编码',
- '费用类型',
- '名称',
- '单位',
- '数量',
- '金额',
-
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }
- })
- },
- export_detail_four() {
- let params = {}
- getHisDataFive(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- // console.log(data)
- for (let b = 0; b < order.info.length; b++) {
- let obj = {
- org_name: '生命之源血液透析中心',
- name: order.patient.name,
- id_card_no: order.patient.id_card_no,
- jiuyi_date: this.getTimes(order.settle_accounts_date),
- dianhua: order.patient.phone,
- pric: order.info[b].pric,
- cnt: order.info[b].cnt,
- det_item_fee_sumamt: order.info[b].det_item_fee_sumamt,
- zhenduan: '慢性肾衰竭',
- shifouyibao: '是',
- doctor: '高华',
- jiesuanfangshi: '医保',
- jizhangshijian: order.setl_time,
- feiyongheji: order.medfee_sumamt,
- jizhangjine: order.fund_pay_sumamt,
- xianjinheji: order.psn_cash_pay
-
- }
- if (order.is_medicine_insurance == 1) {
- obj.jiesuanfangshi = '是'
-
- } else {
-
- obj.jiesuanfangshi = '否'
-
- }
-
- if (order.info[b].advice_id > 0 && order.info[b].project_id == 0) {
- obj['yibaomulucode'] = order.info[b].advices.drug.medical_insurance_number
- obj['yibaomuluname'] = order.info[b].advices.drug.drug_name
- obj['neibumulucode'] = order.info[b].advices.drug.id
- obj['neibumuluname'] = order.info[b].advices.drug.drug_name
- }
- if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
- if (order.info[b].project.type == 2) {
- obj['yibaomulucode'] = order.info[b].project.project.medical_code
- obj['yibaomuluname'] = order.info[b].project.project.project_name
- obj['neibumulucode'] = order.info[b].project.project.id
- obj['neibumuluname'] = order.info[b].project.project.project_name
-
- } else {
- obj['yibaomulucode'] = order.info[b].project.good_info.medical_insurance_number
- obj['yibaomuluname'] = order.info[b].project.good_info.good_name
- obj['neibumulucode'] = order.info[b].project.good_info.id
- obj['neibumuluname'] = order.info[b].project.good_info.good_name
- }
- }
- var thisLen = order.patient.id_card_no.length
- var birth = ''
- if (thisLen == 15) {
- birth = '19' + order.patient.id_card_no.substr(6, 6)
- } else {
- birth = order.patient.id_card_no.substr(6, 8)
- }
- var births =
- birth.substr(0, 4) +
- '-' +
- birth.substr(4, 2) +
- '-' +
- birth.substr(6, 2)
- obj['age'] = jsGetAge(births, '-')
-
- if (order.patient.gender == 1) {
- obj['gender'] = '男'
- } else {
- obj['gender'] = '女'
- }
-
- list.push(obj)
- }
-
- }
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- if (list[i].pric > 0) {
- let obj = {
- '机构编码': list[i].org_name,
- '就诊人姓名': list[i].name,
- '性别': list[i].gender,
- '年龄': list[i].age,
- '身份证号码': list[i].id_card_no,
- '就医日期': list[i].jiuyi_date,
- '电话': list[i].dianhua,
- '医保目录编码': list[i].yibaomulucode,
- '医保目录名称': list[i].yibaomuluname,
- '机构内部编码': list[i].neibumulucode,
- '机构内部名称': list[i].neibumuluname,
- '就诊项目明细': list[i].yibaomuluname,
- '单价': list[i].pric,
- '数量': list[i].cnt,
- '金额': list[i].det_item_fee_sumamt,
- '费用合计': list[i].feiyongheji,
- '记账金额': list[i].jizhangjine,
- '现金合计': list[i].xianjinheji,
- '结算方式': list[i].jiesuanfangshi,
- '接诊医生': list[i].doctor,
- '诊断': list[i].zhenduan,
- '记账时间': list[i].jizhangshijian,
- '是否医保': list[i].shifouyibao
-
- }
- tarList.push(obj)
- }
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '机构编码',
- '就诊人姓名',
- '性别',
- '年龄',
- '身份证号码',
- '就医日期',
- '电话',
- '医保目录编码',
- '医保目录名称',
- '机构内部编码',
- '机构内部名称',
- '就诊项目明细',
- '单价',
- '数量',
- '金额',
- '费用合计',
- '记账金额',
- '现金合计',
- '结算方式',
- '接诊医生',
- '诊断',
- '记账时间',
- '是否医保'
-
- ]
- const filterVal = [
- '机构编码',
- '就诊人姓名',
- '性别',
- '年龄',
- '身份证号码',
- '就医日期',
- '电话',
- '医保目录编码',
- '医保目录名称',
- '机构内部编码',
- '机构内部名称',
- '就诊项目明细',
- '单价',
- '数量',
- '金额',
- '费用合计',
- '记账金额',
- '现金合计',
- '结算方式',
- '接诊医生',
- '诊断',
- '记账时间',
- '是否医保'
-
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }
- })
-
- },
- export_detail_five() {
- let params = {}
- getHisDataFive(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- // console.log(data)
- for (let b = 0; b < order.info.length; b++) {
- if (order.info[b].project.project.cost_classify == 3) {
- let obj = {
- p_name: order.psn_name,
- code: order.info[b].project.project.id,
- name: order.info[b].project.project.project_name,
- unit: order.info[b].project.project.unit,
- jiage: order.info[b].det_item_fee_sumamt,
- name_yibao: order.info[b].project.project.project_name,
- guoma: order.info[b].project.project.medical_code,
- zifu: order.info[b].selfpay_prop,
- cnt: order.info[b].cnt,
- pric: order.info[b].pric,
- gerenzifu: order.info[b].fulamt_ownpay_amt + order.info[b].preselfpay_amt,
- baoxiaojine: order.info[b].inscp_scp_amt
-
- }
- if (order.info[b].chrgitm_lv == '01') {
- obj['yibao_dengji'] = '甲'
- } else if (order.info[b].chrgitm_lv == '02') {
- obj['yibao_dengji'] = '乙'
- } else {
- obj['yibao_dengji'] = '丙'
- }
- list.push(obj)
- }
- }
-
- }
- console.log(list)
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- let obj = {
- '姓名': list[i].p_name,
- '医保目录编码': list[i].guoma,
- '名称': list[i].name,
- '单位': list[i].unit,
- '价格': list[i].jiage,
- '医保等级': list[i].yibao_dengji,
- '自付比例': list[i].zifu,
- '数量': list[i].cnt,
- '金额': list[i].pric,
- '个人自付': list[i].gerenzifu,
- '报销金额': list[i].baoxiaojine
-
- }
- tarList.push(obj)
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '姓名',
- '医保目录编码',
- '名称',
- '单位',
- '价格',
- '医保等级',
- '自付比例',
- '数量',
- '金额',
- '个人自付',
- '报销金额'
-
- ]
- const filterVal = [
- '姓名',
- '医保目录编码',
- '名称',
- '单位',
- '价格',
- '医保等级',
- '自付比例',
- '数量',
- '金额',
- '个人自付',
- '报销金额'
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }
- })
-
- },
- export_detail_six() {
- let params = {}
- getHisDataSix(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- let new_list = []
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- for (let b = 0; b < order.info.length; b++) {
- new_list.push(order.info[b])
- }
- }
-
- var infos = this.setMonthPrescriptiontwo(new_list)
- for (let b = 0; b < infos.length; b++) {
- list.push(infos[b])
- }
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- let obj = {
- '周期': '2024年第二季度',
- '类别': '门诊',
- '医保目录编码': list[i].code,
- '医保目录名称': list[i].name,
- '本机构目录编码': list[i].code,
- '本机构目录名称': list[i].name,
- '使用例数': list[i].count,
- '价格': list[i].price
-
- }
- tarList.push(obj)
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '周期',
- '类别',
- '医保目录编码',
- '医保目录名称',
- '本机构目录编码',
- '本机构目录名称',
- '使用例数',
- '价格'
- ]
- const filterVal = [
- '周期',
- '类别',
- '医保目录编码',
- '医保目录名称',
- '本机构目录编码',
- '本机构目录名称',
- '使用例数',
- '价格'
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }
- })
-
- }, export_detail_ten_five() {
- let params = {
- start_time: this.start_time,
- end_time: this.end_time
- }
-
- exportMdtrtCertType(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let new_list = response.data.data.list
- var tarList = []
- for (let i = 0; i < new_list.length; i++) {
- let obj = {
- '姓名': new_list[i].psn_name
- }
- if (new_list[i].mdtrt_cert_type == '01') {
- obj['就诊凭证类型'] = '医保电子凭证'
-
- } else if (new_list[i].mdtrt_cert_type == '02') {
-
- obj['就诊凭证类型'] = '身份证'
-
- } else if (new_list[i].mdtrt_cert_type == '03') {
-
- obj['就诊凭证类型'] = '社会保障卡'
-
- }
- tarList.push(obj)
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '姓名',
- '就诊凭证类型',
-
- ]
- const filterVal = [
- '姓名',
- '就诊凭证类型',
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '名单'
- })
- })
- }
- })
-
- }, export_detail_ten_four() {
- let params = {
- start_time: '2022-01-01',
- end_time: '2022-04-30'
- }
- handleOne(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let new_orders = []
-
- let new_orders_3663 = []
- let new_orders_4059 = []
- let new_orders_4039 = []
-
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- for (let b = 0; b < order.info.length; b++) {
- order.info[b]['new_order'] = order
- order.info[b]['new_date'] = this.getTime(order.info[b].pre_time, '{y}-{m}')
- new_orders.push(order.info[b])
- }
- }
-
- let new_list_four = []
- for (let i = 0; i < new_orders.length; i++) {
- let order = new_orders[i]
- new_list_four.push(order.p_info)
- }
-
- const obj111 = {}
- new_list_four = new_list_four.reduce((cur, next) => {
- obj111[next.id] ? '' : obj111[next.id] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
-
- let new_list_six = []
- for (let i = 0; i < new_list_four.length; i++) {
- let order = new_list_four[i]
- let obj = {
- p_id: order.id,
- patient_id: order.patient_id,
- cur_date: this.getTime(order.record_date, '{y}-{m}'),
- list: []
- }
- for (let b = 0; b < new_orders.length; b++) {
- if (order.id == new_orders[b].p_info.id) {
- obj.list.push(new_orders[b])
- }
- }
- new_list_six.push(obj)
- }
-
- console.log(new_list_six)
-
- for (let i = 0; i < new_list_six.length; i++) {
- let order = new_list_six[i]
- let islvguo = false
- for (let b = 0; b < order.list.length; b++) {
- for (let c = 0; c < order.list[b].project.length; c++) {
- if (order.list[b].project[c].project.id == 78 && order.list[b].project[c].project.id != 79 && order.list[b].project[c].project.id != 1074) {
- islvguo = true
- }
- }
- }
- if (islvguo) {
- new_orders_3663.push(order)
- }
- }
- console.log(new_orders_3663)
-
- for (let i = 0; i < new_list_six.length; i++) {
- let order = new_list_six[i]
- let islvguo = false
- for (let b = 0; b < order.list.length; b++) {
- for (let c = 0; c < order.list[b].project.length; c++) {
- if (order.list[b].project[c].project.id == 1074 && order.list[b].project[c].project.id != 78 && order.list[b].project[c].project.id != 79) {
- islvguo = true
- }
- }
- }
- if (islvguo) {
- new_orders_4059.push(order)
- }
- }
-
- console.log(new_orders_4059)
-
- for (let i = 0; i < new_list_six.length; i++) {
- let order = new_list_six[i]
- let islvguo = false
- for (let b = 0; b < order.list.length; b++) {
- for (let c = 0; c < order.list[b].project.length; c++) {
- if (order.list[b].project[c].project.id == 79 && order.list[b].project[c].project.id != 78 && order.list[b].project[c].project.id != 1074) {
- islvguo = true
- }
- }
- }
- if (islvguo) {
- new_orders_4039.push(order)
- }
- }
-
- console.log(new_orders_4039)
-
- var months_3663 = []
- for (let i = 0; i < new_orders_3663.length; i++) {
- months_3663.push(new_orders_3663[i].cur_date)
- }
- const obj = {}
- months_3663 = months_3663.reduce((cur, next) => {
- obj[next] ? '' : obj[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
-
- var months_4039 = []
- for (let i = 0; i < new_orders_4039.length; i++) {
- months_4039.push(new_orders_4039[i].cur_date)
- }
- const obj2 = {}
- months_4039 = months_4039.reduce((cur, next) => {
- obj2[next] ? '' : obj2[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
-
- var months_4059 = []
-
- for (let i = 0; i < new_orders_4059.length; i++) {
-
- months_4059.push(new_orders_4059[i].cur_date)
-
- }
- const obj3 = {}
- months_4059 = months_4059.reduce((cur, next) => {
- obj3[next] ? '' : obj3[next] = true && cur.push(next)
- return cur
- }, [])
- // 设置cur默认类型为数组,并且初始值为空的数组
- let new_list = []
- for (let i = 0; i < months_3663.length; i++) {
- let obj = {
- cus_date: months_3663[i],
- info: []
- }
- for (let b = 0; b < new_orders_3663.length; b++) {
- if (months_3663[i] == new_orders_3663[b].cur_date) {
- obj.info.push(new_orders_3663[b])
- }
- }
- new_list.push(obj)
- }
-
- let new_list_two = []
- for (let i = 0; i < months_4039.length; i++) {
- let obj = {
- cus_date: months_4039[i],
- info: []
- }
- for (let b = 0; b < new_orders_4039.length; b++) {
- if (months_4039[i] == new_orders_4039[b].cur_date) {
- obj.info.push(new_orders_4039[b])
- }
- }
- new_list_two.push(obj)
- }
-
- let new_list_three = []
- for (let i = 0; i < months_4059.length; i++) {
- let obj = {
- cus_date: months_4059[i],
- info: []
- }
- for (let b = 0; b < new_orders_4059.length; b++) {
- if (months_4059[i] == new_orders_4059[b].cur_date) {
- obj.info.push(new_orders_4059[b])
- }
- }
- new_list_three.push(obj)
- }
-
- console.log(new_list)
- console.log(new_list_two)
- console.log(new_list_three)
-
- var list_one = []
- var list_two = []
- var list_three = []
-
- for (let b = 0; b < new_list.length; b++) {
- let obj = {
- cur_date: new_list[b].cus_date,
- order_info: [],
- info_length: new_list[b].info.length
-
- }
- for (let c = 0; c < new_list[b].info.length; c++) {
- for (let d = 0; d < new_list[b].info[c].list.length; d++) {
- if (new_list[b].info[c].list[d].advices.length > 0 && new_list[b].info[c].list[d].project.length == 0) {
- for (let e = 0; e < new_list[b].info[c].list[d].advices.length; e++) {
- obj.order_info.push(new_list[b].info[c].list[d].advices[e].order_info)
- }
-
- }
- if (new_list[b].info[c].list[d].advices.length == 0 && new_list[b].info[c].list[d].project.length > 0) {
- for (let e = 0; e < new_list[b].info[c].list[d].project.length; e++) {
- obj.order_info.push(new_list[b].info[c].list[d].project[e].order_info)
-
- }
- }
- }
- }
- list_one.push(obj)
-
- }
-
- for (let b = 0; b < new_list_two.length; b++) {
- let obj = {
- cur_date: new_list_two[b].cus_date,
- order_info: [],
- info_length: new_list_two[b].info.length
-
- }
- for (let c = 0; c < new_list_two[b].info.length; c++) {
- for (let d = 0; d < new_list_two[b].info[c].list.length; d++) {
- if (new_list_two[b].info[c].list[d].advices.length > 0 && new_list_two[b].info[c].list[d].project.length == 0) {
- for (let e = 0; e < new_list_two[b].info[c].list[d].advices.length; e++) {
- obj.order_info.push(new_list_two[b].info[c].list[d].advices[e].order_info)
- }
-
- }
- if (new_list_two[b].info[c].list[d].advices.length == 0 && new_list_two[b].info[c].list[d].project.length > 0) {
- for (let e = 0; e < new_list_two[b].info[c].list[d].project.length; e++) {
- obj.order_info.push(new_list_two[b].info[c].list[d].project[e].order_info)
- }
- }
- }
- }
- list_two.push(obj)
-
- }
-
- for (let b = 0; b < new_list_three.length; b++) {
- let obj = {
- cur_date: new_list_three[b].cus_date,
- order_info: [],
- info_length: new_list_three[b].info.length
- }
- for (let c = 0; c < new_list_three[b].info.length; c++) {
- for (let d = 0; d < new_list_three[b].info[c].list.length; d++) {
- if (new_list_three[b].info[c].list[d].advices.length > 0 && new_list_three[b].info[c].list[d].project.length == 0) {
- for (let e = 0; e < new_list_three[b].info[c].list[d].advices.length; e++) {
- obj.order_info.push(new_list_three[b].info[c].list[d].advices[e].order_info)
- }
-
- }
- if (new_list_three[b].info[c].list[d].advices.length == 0 && new_list_three[b].info[c].list[d].project.length > 0) {
- for (let e = 0; e < new_list_three[b].info[c].list[d].project.length; e++) {
- obj.order_info.push(new_list_three[b].info[c].list[d].project[e].order_info)
- }
- }
- }
- }
- list_three.push(obj)
-
- }
-
- console.log(list_one)
- console.log(list_two)
- console.log(list_three)
-
- // list_one = []
- // list_one = list_two
-
- // list_one = []
- // list_one = list_three
-
- var tarList = []
- for (let i = 0; i < list_one.length; i++) {
- let obj = {
- '年月': list_one[i].cur_date,
- '总人数': this.getTotalOneOne(list_one[i].order_info),
- '总人次': list_one[i].info_length,
- '总费用': this.getTotalOne(list_one[i].order_info),
- '总治疗费': this.getTotalTwo(list_one[i].order_info),
- '总材料费': this.getTotalThree(list_one[i].order_info),
- '总检查检验费': this.getTotalFour(list_one[i].order_info),
- '总药品费': this.getTotalFive(list_one[i].order_info),
- '人均费用': this.getTotalOne(list_one[i].order_info) / this.getTotalOneOne(list_one[i].order_info),
- '次均费用': this.getTotalOne(list_one[i].order_info) / list_one[i].info_length,
- '次均治疗费': this.getTotalTwo(list_one[i].order_info) / list_one[i].info_length,
- '次均材料费': this.getTotalThree(list_one[i].order_info) / list_one[i].info_length,
- '次均检查检验费': this.getTotalFour(list_one[i].order_info) / list_one[i].info_length,
- '次均药品费': this.getTotalFive(list_one[i].order_info) / list_one[i].info_length
- }
- tarList.push(obj)
- }
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '年月',
- '总人数',
- '总人次',
- '总费用',
- '总治疗费',
- '总材料费',
- '总检查检验费',
- '总药品费',
- '人均费用',
- '次均费用',
- '次均治疗费',
- '次均材料费',
- '次均检查检验费',
- '次均药品费'
- ]
- const filterVal = [
- '年月',
- '总人数',
- '总人次',
- '总费用',
- '总治疗费',
- '总材料费',
- '总检查检验费',
- '总药品费',
- '人均费用',
- '次均费用',
- '次均治疗费',
- '次均材料费',
- '次均检查检验费',
- '次均药品费'
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
-
- })
-
- }, getTotalOneOne(order_info) {
- var patient_ids = []
- for (var i = 0; i < order_info.length; i++) {
- patient_ids.push(order_info[i].patient_id)
- }
- const obj2 = {}
- patient_ids = patient_ids.reduce((cur, next) => {
- obj2[next] ? '' : obj2[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
- return patient_ids.length
-
- }, getTotalOneTwo(order_info) {
- let total = 0
- for (var i = 0; i < order_info.length; i++) {
- total = total + order_info[i].det_item_fee_sumamt
- }
- return total.toFixed(2)
- }, getTotalOne(order_info) {
- let total = 0
- for (var i = 0; i < order_info.length; i++) {
- total = total + order_info[i].det_item_fee_sumamt
- }
- return total.toFixed(2)
-
- }, getTotalTwo(order_info) {
- let total = 0
- for (var i = 0; i < order_info.length; i++) {
- if (order_info[i].med_chrgitm_type == '05') {
- total = total + order_info[i].det_item_fee_sumamt
- }
- }
- return total.toFixed(2)
-
- }, getTotalThree(order_info) {
- let total = 0
- for (var i = 0; i < order_info.length; i++) {
- if (order_info[i].med_chrgitm_type == '08') {
- total = total + order_info[i].det_item_fee_sumamt
- }
- }
- return total.toFixed(2)
-
- }, getTotalFour(order_info) {
- let total = 0
- for (var i = 0; i < order_info.length; i++) {
- if (order_info[i].med_chrgitm_type == '03' || order_info[i].med_chrgitm_type == '04') {
- total = total + order_info[i].det_item_fee_sumamt
- }
- }
- return total.toFixed(2)
-
- }, getTotalFive(order_info) {
- let total = 0
- for (var i = 0; i < order_info.length; i++) {
- if (order_info[i].med_chrgitm_type == '09' || order_info[i].med_chrgitm_type == '10' || order_info[i].med_chrgitm_type == '11') {
- total = total + order_info[i].det_item_fee_sumamt
- }
- }
- return total.toFixed(2)
-
- }, getTotalSix(order_info) {
-
- }, getTotalSeven(order_info) {
-
- }, getTotalEigth(order_info) {
-
- }, getTotalNine(order_info) {
-
- }, getTotalTen(order_info) {
-
- }, getTotalTenOne(order_info) {
-
- },
-
- export_detail_seven() {
- let params = {}
- handleData10106(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let new_orders = []
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- let islvguo = false
- for (let b = 0; b < order.info.length; b++) {
- if (order.info[b].project.project.id == 372) {
- islvguo = true
- }
-
- }
- if (islvguo) {
- new_orders.push(order)
- }
- }
- console.log(new_orders.length)
-
- let list = []
- for (let i = 0; i < new_orders.length; i++) {
- let order = response.data.data.order[i]
- let obj = {
- md: order.mdtrt_id,
- name: order.patient.name,
- kaichu: this.getTimes(order.settle_start_time),
- xianzhong: '',
- yingshou: order.medfee_sumamt,
- yibaotongchou: order.hifp_pay,
- dabingjijin: order.hifmi_pay,
- yiliaojiuzhu: order.maf_pay,
- gongwujijin: order.cvlserv_pay,
- gerenzhifu: order.psn_part_amt,
- zongjine: order.medfee_sumamt,
- setl_time: order.setl_time,
- jiesuanleixing: '医保',
- xueyetouxilvguo: 480,
- lvhuana: 3,
- zhihuanguan: 40,
- good_name: ''
- }
- if (order.insutype == '390') {
-
- obj.xianzhong = '城乡'
- } else {
-
- obj.xianzhong = '职工'
-
- }
-
- for (let b = 0; b < order.info.length; b++) {
- if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
- if (order.info[b].project.type == 2) {
- if (order.info[b].project.project.id == 254 || order.info[b].project.project.id == 253 || order.info[b].project.project.id == 250 || order.info[b].project.project.id == 249) {
- obj.good_name = this.GetGoodName(order.info[b].project.project.id)
- }
- } else if (order.info[b].project.type == 3) {
- if (order.info[b].project.project.id == 1478 || order.info[b].project.project.id == 1479 || order.info[b].project.project.id == 1482 || order.info[b].project.project.id == 1483 || order.info[b].project.project.id == 2577 || order.info[b].project.project.id == 2578 || order.info[b].project.project.id == 2058 || order.info[b].project.project.id == 2059) {
- obj.good_name = this.GetGoodName(order.info[b].project.good_info.id)
- }
- }
- }
- }
- list.push(obj)
- }
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- if (list[i].good_name.length > 0) {
- let obj = {
- '序号': i + 1,
- '就诊号': list[i].md,
- '患者姓名': list[i].name,
- '开处时间': list[i].kaichu,
- '项目(透析器)': list[i].good_name,
- '血液透析滤过': list[i].xueyetouxilvguo,
- '0.9%氯化钠注射液': list[i].lvhuana,
- '置换液管': list[i].zhihuanguan,
- '险种类型': list[i].xianzhong,
- '应收金额': list[i].yingshou,
- '医保统筹金额': list[i].yibaotongchou,
- '大病基金金额': list[i].dabingjijin,
- '医疗救助金额': list[i].yiliaojiuzhu,
- '公务员基金': list[i].gongwujijin,
- '个人支付基金': list[i].gerenzhifu,
- '总金额': list[i].zongjine,
- '收费时间': list[i].setl_time,
- '结算类型': list[i].jiesuanleixing,
- '收费状态': '已收费'
- }
- tarList.push(obj)
- }
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '序号',
- '就诊号',
- '患者姓名',
- '开处时间',
- '项目(透析器)',
- '血液透析滤过',
- '0.9%氯化钠注射液',
- '置换液管',
- '险种类型',
- '应收金额',
- '医保统筹金额',
- '大病基金金额',
- '医疗救助金额',
- '公务员基金',
- '个人支付基金',
- '总金额',
- '收费时间',
- '结算类型',
- '收费状态'
- ]
- const filterVal = [
- '序号',
- '就诊号',
- '患者姓名',
- '开处时间',
- '项目(透析器)',
- '血液透析滤过',
- '0.9%氯化钠注射液',
- '置换液管',
- '险种类型',
- '应收金额',
- '医保统筹金额',
- '大病基金金额',
- '医疗救助金额',
- '公务员基金',
- '个人支付基金',
- '总金额',
- '收费时间',
- '结算类型',
- '收费状态'
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
-
- }
- })
-
- },
- export_detail_tenone() {
- let params = {
- start_time: this.start_time,
- end_time: this.end_time
- }
- handleData10138Two(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- var list = []
- var orders = response.data.data.info
- for (let i = 0; i < orders.length; i++) {
- for (let b = 0; b < orders[i].order.length; b++) {
- for (let c = 0; c < orders[i].order[b].infos.length; c++) {
- let name = orders[i].name
- let date = this.getTimes(orders[i].order[b].settle_accounts_date)
- let code = orders[i].order[b].number
- let cnt = orders[i].order[b].infos[c].cnt
- let pric = orders[i].order[b].infos[c].pric
- let det_item_fee_sumamt = orders[i].order[b].infos[c].det_item_fee_sumamt
-
- let item_name = ''
- let unit = ''
- let spec = ''
-
- if (orders[i].order[b].infos[c].advice_id > 0) {
- item_name = orders[i].order[b].infos[c].advices.drug.drug_name
- unit = orders[i].order[b].infos[c].advices.prescribing_number_unit
- spec = (orders[i].order[b].infos[c].advices.drug.dose + orders[i].order[b].infos[c].advices.drug.dose_unit) + '*' + orders[i].order[b].infos[c].advices.drug.min_number + orders[i].order[b].infos[c].advices.drug.min_unit + '/' + orders[i].order[b].infos[c].advices.drug.max_unit
- }
- if (orders[i].order[b].infos[c].project_id > 0 && orders[i].order[b].infos[c].project.type == 2) {
- item_name = orders[i].order[b].infos[c].project.project.project_name
- unit = orders[i].order[b].infos[c].project.project.unit
- spec = orders[i].order[b].infos[c].project.project.project_name
- }
- if (orders[i].order[b].infos[c].project_id > 0 && orders[i].order[b].infos[c].project.type == 3) {
- item_name = orders[i].order[b].infos[c].project.good_info.good_name
- unit = orders[i].order[b].infos[c].project.good_info.packing_unit
- spec = orders[i].order[b].infos[c].project.good_info.specification_name
- }
-
- let obj = {
- '姓名': name,
- '处方日期': date,
- '费用编码': code,
- '项目名称': item_name,
- '规格': spec,
- '数量': cnt,
- '单位': unit,
- '金额': det_item_fee_sumamt,
- '单价': pric
- }
- list.push(obj)
- }
- }
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '姓名',
- '处方日期',
- '费用编码',
- '项目名称',
- '规格',
- '数量',
- '单位',
- '单价',
- '金额'
- ]
- const filterVal = [
- '姓名',
- '处方日期',
- '费用编码',
- '项目名称',
- '规格',
- '数量',
- '单位',
- '单价',
- '金额'
- ]
- const data = this.formatJson(filterVal, list)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
-
- }
- })
- },
- getType(med_chrgitm_type) {
- switch (med_chrgitm_type) {
- case '01':
- return '床位费'
- break
- case '1':
- return '床位费'
- break
- case '02':
- return '诊察费'
-
- break
- case '2':
- return '诊察费'
- break
- case '03':
- return '检查费'
-
- break
- case '3':
- return '检查费'
-
- break
- case '04':
- return '化验费'
- break
- case '4':
- return '化验费'
- break
- case '05':
- return '治疗费'
-
- break
- case '5':
- return '治疗费'
-
- break
- case '06':
- return '手术费'
-
- break
- case '6':
- return '手术费'
-
- break
- case '07':
- return '护理费'
-
- break
- case '7':
- return '护理费'
-
- break
- case '08':
- return '材料费'
-
- break
- case '8':
- return '材料费'
-
- break
- case '09':
- return '西药费'
-
- break
- case '9':
- return '西药费'
-
- break
- case '10':
- return '中药饮片费'
-
- break
- case '11':
- return '中成药费'
-
- break
- case '12':
- return '一般诊疗费'
-
- break
- case '13':
- return '挂号费'
- break
- case '14':
- return '其他费'
- break
- case '0':
- return '其他费'
- break
- }
-
- },
-
- export_detail_ten() {
- let params = {
- start_time: this.start_time,
- end_time: this.end_time
- }
- handleData10106(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- let med_chrgitm_types = []
- for (let b = 0; b < order.info.length; b++) {
- med_chrgitm_types.push(order.info[b].med_chrgitm_type)
- const obj = {}
- med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
- obj[next] ? '' : obj[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
- }
-
- for (let i = 0; i < med_chrgitm_types.length; i++) {
- let price = 0
- let obj = {
-
- number: '440722196501072316',
- name: order.patient.name,
- idNo: '',
- med_chrgitm_name: this.getType(med_chrgitm_types[i]),
- price: '',
- remark: ''
- }
- if (i == 0) {
- obj.remark = '就诊日期:' + this.getTimes(order.settle_accounts_date) + ' 医保报销: ' + order.fund_pay_sumamt + ' 现金:' + order.psn_cash_pay
- obj.idNo = order.patient.id_card_no
- } else {
- obj.remark = ''
- obj.idNo = ''
- }
- for (let b = 0; b < order.info.length; b++) {
- if (med_chrgitm_types[i] == order.info[b].med_chrgitm_type) {
-
- price = price + order.info[b].det_item_fee_sumamt
- }
- }
- obj.price = price
- list.push(obj)
- }
- }
- let list_two = []
- const obj = {}
- for (let i = 0; i < list.length; i++) {
- console.log(list[i])
- list_two.push(list[i].name)
- }
-
- list_two = list_two.reduce((cur, next) => {
- obj[next] ? '' : obj[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
-
- for (let i = 0; i < list_two.length; i++) {
- for (let b = 0; b < list.length; b++) {
- if (list_two[i] == list[b].name) {
- list[b]['index'] = i + 1
- }
- }
- }
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- let obj = {
- '订单序号': list[i].index,
- '订单号码': '',
- '购方名称': list[i].name,
- '购方纳税人识别号': list[i].idNo,
- '开户行及账号': '',
- '地址电话': '',
- '税收编码': '3070202000000000000',
- '商品名称': list[i].med_chrgitm_name,
- '规格型号': '',
- '计量单位': '',
- '数量': '',
- '单价': '',
- '金额': list[i].price,
- '税率': '0%',
- '优惠政策': '普通零税率',
- '税额': '0',
- '备注': list[i].remark,
- '电子邮箱': ''
-
- }
- tarList.push(obj)
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '订单序号',
- '订单号码',
- '购方名称',
- '购方纳税人识别号',
- '开户行及账号',
- '地址电话',
- '税收编码',
- '商品名称',
- '规格型号',
- '计量单位',
- '数量',
- '单价',
- '金额',
- '税率',
- '优惠政策',
- '税额',
- '备注',
- '电子邮箱'
- ]
- const filterVal = [
- '订单序号',
- '订单号码',
- '购方名称',
- '购方纳税人识别号',
- '开户行及账号',
- '地址电话',
- '税收编码',
- '商品名称',
- '规格型号',
- '计量单位',
- '数量',
- '单价',
- '金额',
- '税率',
- '优惠政策',
- '税额',
- '备注',
- '电子邮箱'
- ]
- const data = this.formatJson(filterVal, tarList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
-
- }
- })
-
- },
- export_detail_ten_two() {
- let params = {
- start_time: this.start_time,
- end_time: this.end_time
- }
- handleData10318(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
-
- let obj = {
- 姓名: order.patient.name,
- 身份证: order.patient.id_card_no,
- 西药费: 0,
- 化验费: 0,
- 检查费: 0,
- 治疗费: 0,
- 材料费: 0,
- 中成药费: 0,
- 护理费: 0,
- 备注: '就诊日期:' + this.getTimes(order.settle_accounts_date) + ' 医保报销: ' + order.fund_pay_sumamt + ' 现金:' + order.psn_cash_pay
- }
- let xiyaoPrice = 0
- let huaYanPrice = 0
- let jianChaPrice = 0
- let zhiLiaoPrice = 0
- let cailiaoPrice = 0
- let zhongchengyaoPrice = 0
- let huliPrice = 0
-
- for (let b = 0; b < order.info.length; b++) {
- if (order.info[b].med_chrgitm_type == '09') {
- xiyaoPrice = xiyaoPrice + order.info[b].det_item_fee_sumamt
- }
- if (order.info[b].med_chrgitm_type == '04') {
- huaYanPrice = huaYanPrice + order.info[b].det_item_fee_sumamt
- }
- if (order.info[b].med_chrgitm_type == '03') {
- jianChaPrice = jianChaPrice + order.info[b].det_item_fee_sumamt
- }
- if (order.info[b].med_chrgitm_type == '05') {
- zhiLiaoPrice = zhiLiaoPrice + order.info[b].det_item_fee_sumamt
- }
- if (order.info[b].med_chrgitm_type == '08') {
- cailiaoPrice = cailiaoPrice + order.info[b].det_item_fee_sumamt
- }
- if (order.info[b].med_chrgitm_type == '11') {
- zhongchengyaoPrice = zhongchengyaoPrice + order.info[b].det_item_fee_sumamt
- }
-
- if (order.info[b].med_chrgitm_type == '07') {
- huliPrice = huliPrice + order.info[b].det_item_fee_sumamt
- }
- }
- obj.西药费 = xiyaoPrice
- obj.化验费 = huaYanPrice
- obj.检查费 = jianChaPrice
- obj.治疗费 = zhiLiaoPrice
- obj.材料费 = cailiaoPrice
- obj.中成药费 = zhongchengyaoPrice
- obj.护理费 = huliPrice
-
- list.push(obj)
- }
-
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '姓名',
- '身份证',
- '西药费',
- '化验费',
- '检查费',
- '治疗费',
- '材料费',
- '中成药费',
- '护理费',
-
- '备注'
- ]
- const filterVal = [
- '姓名',
- '身份证',
- '西药费',
- '化验费',
- '检查费',
- '治疗费',
- '材料费',
- '中成药费',
- '护理费',
- '备注'
- ]
- const data = this.formatJson(filterVal, list)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
-
- }
- })
-
- },
- export_detail_ten_three() {
- exportOrderInfo().then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- for (let b = 0; b < response.data.data.info.length; b++) {
- let item_name = ''
- let item_code = ''
- let price = ''
- let unit = ''
- let spec = ''
- let cnt = ''
-
- if (
- response.data.data.info[b].advices.id == 0 &&
- response.data.data.info[b].project.id > 0
- ) {
-
- if (response.data.data.info[b].project.type == 2) {
- item_name = response.data.data.info[b].project.project.project_name
- item_code = response.data.data.info[b].project.project.medical_code
- price = response.data.data.info[b].det_item_fee_sumamt
- unit = response.data.data.info[b].project.project.unit
- cnt = response.data.data.info[b].cnt
-
- } else {
-
- item_name = response.data.data.info[b].project.good_info.good_name
- item_code = response.data.data.info[b].project.good_info.medical_insurance_number
- price = response.data.data.info[b].det_item_fee_sumamt
- unit = response.data.data.info[b].project.good_info.packing_unit
- cnt = response.data.data.info[b].cnt
-
- }
-
- } else if (
- response.data.data.info[b].advices.id > 0 &&
- response.data.data.info[b].project.id == 0
- ) {
- item_name = response.data.data.info[b].advices.advice_name
- item_code =
- response.data.data.info[b].advices.drug.medical_insurance_number
- price = response.data.data.info[b].det_item_fee_sumamt
- unit = response.data.data.info[b].advices.prescribing_number_unit
- spec = response.data.data.info[b].advices.drug.dose + response.data.data.info[b].advices.drug.dose_unit + '*' + response.data.data.info[b].advices.drug.min_number + response.data.data.info[b].advices.drug.min_unit + '/' + response.data.data.info[b].advices.drug.max_unit
- cnt = response.data.data.info[b].cnt
-
- }
- let obj = {
- 名称: item_name,
- 总价: price,
- 数量: cnt,
- 规格: spec
-
- }
-
- list.push(obj)
- }
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '名称',
- '总价',
- '数量',
- '规格'
-
- ]
- const filterVal = [
- '名称',
- '总价',
- '数量',
- '规格'
-
- ]
- const data = this.formatJson(filterVal, list)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }
- })
-
- },
- GetGoodName(id) {
- switch (id) {
- case 254:
- return '空心纤维透析器REXEED-18UC(旭化成)'
- break
- case 253:
- return '空心纤维透析器REXEED-15UC(旭化成)'
- break
- case 250:
- return '聚砜膜透析滤过器-XevontaHI18(贝朗)'
- break
- case 249:
- return '聚砜膜透析滤过器-XevontaHI15(贝朗)'
- break
- case 1478:
- return '聚砜膜透析滤过器-XevontaHI15(贝朗)'
- break
- case 1479:
- return '聚砜膜透析滤过器-XevontaHI18(贝朗)'
- break
- case 1482:
- return '空心纤维透析器REXEED-15UC(旭化成)'
- break
- case 1483:
- return 'REXEED-18UC(旭化成)'
- break
- case 2577:
- return '空心纤维透析器(FB-15U)(尼普洛)'
- break
- case 2578:
- return '空心纤维透析器(FB-17U)(尼普洛)'
- break
- case 2058:
- return '中空纤维透析器CTA-1500'
- break
- case 2059:
- return '中空纤维透析器CTA-2000'
- break
-
- break
-
- }
-
- },
-
- unique_two(array) {
- // res用来存储结果
- var res = []
- for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
- for (var j = 0, resLen = res.length; j < resLen; j++) {
- if (array[i].patient_id === res[j].patient_id && array[i].dialysis_time === res[j].dialysis_time) {
- break
- }
- }
- // 如果array[i]是唯一的,那么执行完循环,j等于resLen
- if (j === resLen) {
- res.push(array[i])
- }
- }
- return res
- },
- batch_print_settlte() {
- if (this.selecting_schs.length === 0) {
- this.$message.error('请至少选择一条需要打印的内容')
- return false
- } else {
- var sch_ids = []
- for (let index = 0; index < this.selecting_schs.length; index++) {
- sch_ids.push(this.selecting_schs[index].id)
- }
- this.batchStatementVisible = true
- let params = {
- order_ids: sch_ids.join(','),
- admin_user_id: this.$store.getters.xt_user.user.id
- }
- this.batchOrderObj = params
- }
- },
- export_detail() {
- let params = {
- start_time: this.start_time,
- end_time: this.end_time,
- p_type: 2,
- sort_type:this.sort_type
- }
- getExportConsumeDetailList(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- let list2 = []
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- let number = ''
- let name = ''
- let department = ''
- let doctor_name = ''
- let balance_accounts = ''
- let order_status = ''
- let charge_name = ''
- let gender = ""
- let age = 0
-
-
- let insutypeName = ''
-
- if(order.patient.gender == 1){
- gender = "男"
- }else{
- gender = "女"
- }
-
- age = this.getAge(order.patient.id_card_no)
-
- let time = ''
- if (
- order.his_patient != null &&
- order.his_patient.number.length > 0
- ) {
- number = order.his_patient.number
- }
-
- if (order.his_patient != null) {
- if (order.his_patient.balance_accounts_type == 2) {
- balance_accounts = '自费'
- }
-
- if (order.his_patient.balance_accounts_type == 1) {
- balance_accounts = '医保'
- }
- }
-
- if (order.patient != null && order.patient.name.length > 0) {
- name = order.patient.name
- }
-
- if (
- order.p_info != null &&
- order.p_info.department != null &&
- order.p_info.department.name.length > 0
- ) {
- department = order.p_info.department.name
- }
-
- if (order.p_info != null && order.p_info.doctor.length > 0) {
- doctor_name = order.p_info.doctor
- }
-
- if (order.creator != null) {
- charge_name = this.getName(order.creator)
- }
- if (order.insutype == '390') {
- insutypeName = '城乡居民基本医疗保险'
- } else if (order.insutype == '310') {
- insutypeName = '职工基本医疗保险'
- }
-
- if (order.order_status == 1) {
- order_status = '待结算'
- }
-
- if (order.order_status == 2) {
- order_status = '已结算'
- }
-
- if (order.order_status == 3) {
- order_status = '已退费'
- }
-
- if (order.settle_type == 2) {
- time = this.getTimes(order.settle_start_time)
- } else {
- time = this.getTimes(order.settle_accounts_date)
- }
- // var hifmi_pay = 0.0
- // if (order.setl_detail && order.setl_detail.length > 0) {
- // var jsonObj = JSON.parse(order.setl_detail)
- //
- // console.log(jsonObj)
- // if (jsonObj != null) {
- // for (let i = 0; i < jsonObj.length; i++) {
- // if (order.insutype == '310') {
- // if (jsonObj[i].fund_pay_type == '310300') {
- // hifmi_pay = jsonObj[i].fund_payamt
- // }
- // } else if (order.insutype == '390') {
- // if (order.fund_pay_type == '390200') {
- // hifmi_pay = jsonObj[i].fund_payamt
- // }
- // }
- // }
- // }
- // }
-
- // var hifmi_pay = 0.0
-
- // console.log(order.setl_detail)
- // if (order.setl_detail && order.setl_detail.length > 0) {
- // var jsonObj = JSON.parse(order.setl_detail)
- // if (jsonObj != null) {
- // for (let i = 0; i < jsonObj.length; i++) {
- // if (order.insutype == '310') {
- // if (jsonObj[i].fund_pay_type == '310300') {
- // hifmi_pay = jsonObj[i].fund_payamt
- // }
- // }
- // if (order.insutype == '390') {
- // if (jsonObj[i].fund_pay_type == '390200') {
- // hifmi_pay = jsonObj[i].fund_payamt
- // }
- // }
- // }
- // }
- // }
-
- let insuplc_admdvs_name = ''
- if (order.his_patient.insuplc_admdvs == '440703') {
- insuplc_admdvs_name = '蓬江区'
-
- } else if (order.his_patient.insuplc_admdvs == '440704') {
-
- insuplc_admdvs_name = '江海区'
-
- } else if (order.his_patient.insuplc_admdvs == '440705') {
-
- insuplc_admdvs_name = '新会区'
-
- } else if (order.his_patient.insuplc_admdvs == '440781') {
-
- insuplc_admdvs_name = '台山市'
-
- } else if (order.his_patient.insuplc_admdvs == '440783') {
- insuplc_admdvs_name = '开平市'
-
- } else if (order.his_patient.insuplc_admdvs == '440784') {
- insuplc_admdvs_name = '鹤山市'
-
- } else if (order.his_patient.insuplc_admdvs == '440785') {
- insuplc_admdvs_name = '恩平市'
-
- } else if (order.his_patient.insuplc_admdvs == '440799') {
- insuplc_admdvs_name = '市直'
- }
-
- let obj = {
- 就诊号: order.mdtrt_id,
- 患者姓名: name,
- 患者性别: gender,
- 患者年龄: age,
- 开处时间: time,
- 险种类型: insutypeName,
- 参保所属医保区划: order.his_patient.insuplc_admdvs,
- 参保号: order.his_patient.id_card_no,
- 属地名称: insuplc_admdvs_name,
- 应收金额: order.medfee_sumamt,
- 实收金额: order.medfee_sumamt,
- 医保统筹金额: order.hifp_pay,
- 大额基金金额: order.hifob_pay,
- 大病基金金额: order.hifmi_pay,
- 补充保险基金金额: order.hifes_pay,
- 医疗救助基金金额: order.maf_pay,
- 公务员基金: order.cvlserv_pay,
- 个人支付基金: order.psn_cash_pay,
- 个人账户支付金额: order.acct_pay,
- 科室: department,
- 医生姓名: doctor_name,
- 收费类别: balance_accounts,
- 收费者姓名: charge_name,
- 总金额: order.medfee_sumamt,
- 现金支付: '',
- 账户支付: '',
- 支付宝支付: '',
- 微信支付: '',
- 其他支付: '',
- 收费时间: order.setl_time,
- 收费状态: order_status,
- 退费日期: ''
- }
- let obj2 = {
- 就诊号: order.mdtrt_id,
- 患者姓名: name,
- 患者性别: gender,
- 患者年龄: age,
- 开处时间: time,
- 险种类型: insutypeName,
- 参保所属医保区划: order.his_patient.insuplc_admdvs,
- 参保号: order.his_patient.id_card_no,
- 应收金额: order.medfee_sumamt,
- 实收金额: order.medfee_sumamt,
- 医保统筹金额: order.hifp_pay,
- 大额基金金额: order.hifob_pay,
- 大病基金金额: order.hifmi_pay,
- 补充保险基金金额: order.hifes_pay,
- 医疗救助基金金额: order.maf_pay,
- 公务员基金: order.cvlserv_pay,
- 个人支付基金: order.psn_cash_pay,
- 个人账户支付金额: order.acct_pay,
- 医生姓名: doctor_name,
- 收费类别: balance_accounts,
- 总金额: order.medfee_sumamt,
- 现金支付: '',
- 账户支付: '',
- 支付宝支付: '',
- 微信支付: '',
- 其他支付: '',
- 收费时间: order.setl_time,
- 收费状态: order_status
- }
- list.push(obj)
- list2.push(obj2)
- }
- if(this.org_id != 10697 && this.org_id != 0){
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '就诊号',
- '患者姓名',
- "患者性别",
- "患者年龄",
- '开处时间',
- '险种类型',
- '参保所属医保区划',
- '参保号',
- '属地名称',
- '应收金额',
- '实收金额',
- '医保统筹金额',
- '大额基金金额',
- '大病基金金额',
- '补充保险基金金额',
- '医疗救助基金金额',
- '公务员基金',
- '个人支付基金',
- '个人账户支付金额',
- '科室',
- '医生姓名',
- '收费类别',
- '收费者姓名',
- '总金额',
- '现金支付',
- '账户支付',
- '支付宝支付',
- '微信支付',
- '其他支付',
- '收费时间',
- '收费状态',
- '退费日期'
- ]
- const filterVal = [
- '就诊号',
- '患者姓名',
- "患者性别",
- "患者年龄",
- '开处时间',
- '险种类型',
- '参保所属医保区划',
- '参保号',
- '属地名称',
- '应收金额',
- '实收金额',
- '医保统筹金额',
- '大额基金金额',
- '大病基金金额',
- '补充保险基金金额',
- '医疗救助基金金额',
- '公务员基金',
- '个人支付基金',
- '个人账户支付金额',
- '科室',
- '医生姓名',
- '收费类别',
- '收费者姓名',
- '总金额',
- '现金支付',
- '账户支付',
- '支付宝支付',
- '微信支付',
- '其他支付',
- '收费时间',
- '收费状态',
- '退费日期'
- ]
- const data = this.formatJson(filterVal, list)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }else{
- import('@/vendor/Export2Excel').then((excel) => {
- console.log('222222南昌');
- const tHeader2 = [
- '就诊号',
- '患者姓名',
- "患者性别",
- "患者年龄",
- '开处时间',
- '险种类型',
- '参保所属医保区划',
- '参保号',
- '应收金额',
- '实收金额',
- '医保统筹金额',
- '大额基金金额',
- '大病基金金额',
- '补充保险基金金额',
- '医疗救助基金金额',
- '公务员基金',
- '个人支付基金',
- '个人账户支付金额',
- '医生姓名',
- '收费类别',
- '总金额',
- '现金支付',
- '账户支付',
- '支付宝支付',
- '微信支付',
- '其他支付',
- '收费时间',
- '收费状态'
- ]
- const filterVal2 = [
- '就诊号',
- '患者姓名',
- "患者性别",
- "患者年龄",
- '开处时间',
- '险种类型',
- '参保所属医保区划',
- '参保号',
- '应收金额',
- '实收金额',
- '医保统筹金额',
- '大额基金金额',
- '大病基金金额',
- '补充保险基金金额',
- '医疗救助基金金额',
- '公务员基金',
- '个人支付基金',
- '个人账户支付金额',
- '医生姓名',
- '收费类别',
- '总金额',
- '现金支付',
- '账户支付',
- '支付宝支付',
- '微信支付',
- '其他支付',
- '收费时间',
- '收费状态'
- ]
- const data = this.formatJson(filterVal2, list2)
- excel.export_json_to_excel({
- header: tHeader2,
- data,
- filename: '消费明细'
- })
- })
- }
- }
- })
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map((v) => filterVal.map((j) => v[j]))
- },
- changeSortType() {
- this.page = 1
- this.keywords = ''
- // this.getHisOrderList()
- },
- changeDoctor() {
- this.page = 1
- this.keywords = ''
- // this.getHisOrderList()
- },
- handleSizeChange(limit) {
- this.limit = limit
- this.getHisOrderList()
- },
- handleCurrentChange(page) {
- this.page = page
- this.getHisOrderList()
- },
- handleStartTimeChange() {
- this.page = 1
- this.keywords = ''
- this.getHisOrderList()
- },
- handleEndTimeChange() {
- this.page = 1
- this.keywords = ''
- this.getHisOrderList()
- },
- setMonthPrescription(month_prescriptions) {
- console.log(month_prescriptions)
- let tableData = []
- let drug_month_prescriptions = {
- advices: []
- }
- let drug_ids = []
- let project_month_prescriptions = {
- project: []
-
- }
- let project_ids = []
-
- let to = 0
- for (let i = 0; i < month_prescriptions.length; i++) {
- to = to + month_prescriptions[i].det_item_fee_sumamt
- }
- console.log(to)
-
- // let addition_month_prescriptions = {
- // addition: []
- //
- // }
- // let additions_ids = []
- for (let i = 0; i < month_prescriptions.length; i++) {
- if (month_prescriptions[i].advice_id > 0 && month_prescriptions[i].project_id == 0) { //药品
- let obj = {
- id: month_prescriptions[i].advices.drug_id,
- price: month_prescriptions[i].pric
- }
- drug_ids.push(obj)
- drug_month_prescriptions.advices.push(month_prescriptions[i])
-
- } else if (month_prescriptions[i].advice_id == 0 && month_prescriptions[i].project_id > 0) { //项目
- let obj = {
- id: month_prescriptions[i].project.project_id,
- price: month_prescriptions[i].pric
- }
-
- project_ids.push(obj)
- project_month_prescriptions.project.push(month_prescriptions[i])
- }
-
- }
- console.log(drug_ids)
- console.log(project_ids)
-
- drug_ids = this.unique(drug_ids)
- project_ids = this.unique(project_ids)
- console.log(drug_ids)
- console.log(project_ids)
-
- // additions_ids= this.unique(additions_ids)
-
- for (let i = 0; i < drug_ids.length; i++) {
- let obj = {}
- let count = 0
- let total = 0
-
- for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
- console.log(drug_month_prescriptions.advices[a].id)
- console.log(drug_month_prescriptions.advices[a].det_item_fee_sumamt)
- console.log((parseFloat(drug_month_prescriptions.advices[a].pric) * parseFloat(drug_month_prescriptions.advices[a].cnt)).toFixed(2))
-
- if (drug_ids[i].price == drug_month_prescriptions.advices[a].pric && drug_ids[i].id == drug_month_prescriptions.advices[a].advices.drug_id) {
- obj['name'] = drug_month_prescriptions.advices[a].advices.advice_name
- obj['code'] = drug_month_prescriptions.advices[a].advices.id
- obj['unit'] = drug_month_prescriptions.advices[a].advices.drug.min_unit
- obj['price'] = parseFloat(drug_month_prescriptions.advices[a].pric)
- obj['id'] = drug_month_prescriptions.advices[a].advices.id
- obj['type'] = 1
-
- count = count + drug_month_prescriptions.advices[a].cnt
- total = total + drug_month_prescriptions.advices[a].det_item_fee_sumamt
- }
- }
-
- obj['count'] = count
- obj['total'] = total
-
- tableData.push(obj)
- }
-
- for (let i = 0; i < project_ids.length; i++) {
- let obj = {}
- let count = 0
- let total = 0
-
- for (let a = 0; a < project_month_prescriptions.project.length; a++) {
- if (project_ids[i].price == project_month_prescriptions.project[a].pric && project_ids[i].id == project_month_prescriptions.project[a].project.project_id) {
-
- if (project_month_prescriptions.project[a].project.type == 2) {
- obj['name'] = project_month_prescriptions.project[a].project.project.project_name
- obj['code'] = project_month_prescriptions.project[a].project.id
- obj['unit'] = project_month_prescriptions.project[a].project.project.unit
- obj['type'] = 2
- obj['id'] = project_month_prescriptions.project[a].project.id
-
- } else if (project_month_prescriptions.project[a].project.type == 3) {
- obj['name'] = project_month_prescriptions.project[a].project.good_info.good_name
- obj['code'] = project_month_prescriptions.project[a].project.id
- obj['unit'] = project_month_prescriptions.project[a].project.good_info.packing_unit
- obj['type'] = 3
- obj['id'] = project_month_prescriptions.project[a].project.id
-
- }
- count = count + parseFloat(project_month_prescriptions.project[a].cnt)
- total = total + project_month_prescriptions.project[a].det_item_fee_sumamt
-
- obj['price'] = parseFloat(project_month_prescriptions.project[a].pric)
- obj['type'] = 2
-
- }
- }
-
- obj['count'] = count
- obj['total'] = total
-
- tableData.push(obj)
-
- }
- return tableData
- },
- setMonthPrescriptiontwo(month_prescriptions) {
- let tableData = []
-
- let project_month_prescriptions = {
- project: []
-
- }
- let project_ids = []
-
- for (let i = 0; i < month_prescriptions.length; i++) {
- if (month_prescriptions[i].type == 2) { //项目
- for (let a = 0; a < month_prescriptions[i].project.length; a++) {
- if (month_prescriptions[i].project[a].type == 2) {
- let obj = {
- id: month_prescriptions[i].project[a].project_id,
- price: month_prescriptions[i].project[a].price
-
- }
- project_ids.push(obj)
- project_month_prescriptions.project.push(month_prescriptions[i].project[a])
- }
- }
- }
- }
-
- project_ids = this.unique(project_ids)
- console.log(project_ids)
-
- for (let i = 0; i < project_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < project_month_prescriptions.project.length; a++) {
- if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
- if (project_month_prescriptions.project[a].type == 2) {
- obj['name'] = project_month_prescriptions.project[a].project.project_name
- obj['code'] = project_month_prescriptions.project[a].project.medical_code
- count = count + parseFloat(project_month_prescriptions.project[a].count)
- obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
- }
- }
- }
- obj['count'] = count
- tableData.push(obj)
-
- }
- return tableData
- },
-
- Action() {
- getAllOrders().then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- let list = []
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i]
- for (let b = 0; b < order.info.length; b++) {
- let item_name = ''
- let item_code = ''
- let price = ''
- let unit = ''
- let spec = ''
- let time = ''
- let cnt = ''
-
- if (
- order.info[b].advices.id == 0 &&
- order.info[b].project.id > 0
- ) {
-
- if (order.info[b].project.type == 2) {
- item_name = order.info[b].project.project.project_name
- item_code = order.info[b].project.project.medical_code
- price = order.info[b].pric
- unit = order.info[b].project.project.unit
- cnt = order.info[b].cnt
- time = order.setl_time
-
- } else {
-
- item_name = order.info[b].project.good_info.good_name
- item_code = order.info[b].project.good_info.medical_insurance_number
- price = order.info[b].pric
- unit = order.info[b].project.good_info.packing_unit
- cnt = order.info[b].cnt
- time = order.setl_time
-
- }
-
- } else if (
- order.info[b].advices.id > 0 &&
- order.info[b].project.id == 0
- ) {
- item_name = order.info[b].advices.advice_name
- item_code =
- order.info[b].advices.drug.medical_insurance_number
- price = order.info[b].pric
- unit = order.info[b].advices.prescribing_number_unit
- spec = order.info[b].advices.drug.dose + order.info[b].advices.drug.dose_unit + '*' + order.info[b].advices.drug.min_number + order.info[b].advices.drug.min_unit + '/' + order.info[b].advices.drug.max_unit
- cnt = order.info[b].cnt
- time = order.setl_time
-
- }
- let obj = {
- 项目编码: item_code,
- 项目名称: item_name,
- 规格: spec,
- 厂家: '',
- 单位: unit,
- 数量: cnt,
- 时间: time
- }
-
- list.push(obj)
- }
- }
- import('@/vendor/Export2Excel').then((excel) => {
- const tHeader = [
- '项目编码',
- '项目名称',
- '规格',
- '厂家',
- '单位',
- '数量',
- '时间'
- ]
- const filterVal = [
- '项目编码',
- '项目名称',
- '规格',
- '厂家',
- '单位',
- '数量',
- '时间'
- ]
- const data = this.formatJson(filterVal, list)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '消费明细'
- })
- })
- }
- })
- },
- searchAction() {
- this.page = 1
- // const tableData = this.tableData
- // if (this.keywords.length == 0) {
- // this.getHisOrderList()
- // } else {
- // console.log('6666666',tableData);
- // let arr = []
- // for (let i = 0; i < tableData.length; i++) {
-
- // if (tableData[i].patient.name.indexOf(this.keywords) != -1 ||
- // tableData[i].patient.first_letter.indexOf(this.keywords) != -1) {
- // arr = arr.concat(tableData[i])
- // }
- // }
- // this.tableData = arr
- // }
- this.getHisOrderList()
- },
- getTimes(time) {
- return uParseTime(time, '{y}-{m}-{d}')
- },
-
- toDetail(row) {
- this.$router.push(
- '/outpatientCharges/summaryDetail?patient_id=' +
- row.patient.id +
- '&number=' +
- row.number +
- '&id=' +
- row.id
- )
- },
- getTime(value, temp) {
- if (value != undefined) {
- return uParseTime(value, temp)
- }
- return ''
- },
- getHisOrderList() {
- let params = {
- page: this.page,
- limit: this.limit,
- keywords: this.keywords,
- start_time: this.start_time,
- end_time: this.end_time,
- type: this.admin_user_id,
- p_type: 2,
- sort_type: this.sort_type,
- sch_type: this.sch_type,
- zone_type: this.zoneVal,
- med_type: this.medTypeVal
- }
- getHisOrderList(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- console.log('8888888',response.data.data);
- this.tableData = response.data.data.order
- this.tableData2 = response.data.data.order2
- this.total = response.data.data.total
- }
- })
- },
- getDoctorList() {
- getDoctorList().then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.doctors = response.data.data.doctors
- }
- })
- },
- open(row) {
- this.paramsObj.id =''
- console.log('row',(row.id).toString());
- const id = (row.id).toString()
- this.paramsObj.id = id
- this.jgFileTimer = new Date().getTime()
- console.log('this.paramsObj.id',this.paramsObj.id);
- this.listVisible = true
-
- }, unique(array) {
- // res用来存储结果
- var res = []
- for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
- for (var j = 0, resLen = res.length; j < resLen; j++) {
- if (array[i].id === res[j].id && array[i].price === res[j].price) {
- break
- }
- }
- // 如果array[i]是唯一的,那么执行完循环,j等于resLen
- if (j === resLen) {
- res.push(array[i])
- }
- }
- return res
- },camcleModifyFaPiaoCode(){
- this.dialogfapiaoVisible = false
- this.invoiceVisible = true
- var obj = this.targeObj
- let paramsObj = {
- order_id: obj.id,
- patient_id: obj.patient_id,
- number: obj.mdtrt_id,
- name: obj.patient.name,
- age: obj.age,
- gend: obj.patient.gender,
- setl_time: obj.setl_time,
- chargeName: this.getName(obj.creator)
- }
- this.dialogfapiaoVisible = false
- this.invoiceParams = paramsObj
- this.invoiceVisible = true
- },modifyFaPiaoCode(){
- let params = {
- id:this.targeOrderId,
- fapiao_number: this.fapiao_number
- }
- modifyFapiaoCodetwo(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- var obj = this.targeObj
- let paramsObj = {
- order_id: obj.id,
- patient_id: obj.patient_id,
- number: obj.mdtrt_id,
- name: obj.patient.name,
- age: obj.age,
- gend: obj.patient.gender,
- setl_time: obj.setl_time,
- chargeName: this.getName(obj.creator)
- }
- this.dialogfapiaoVisible = false
- this.invoiceParams = paramsObj
- this.invoiceVisible = true
- this.getHisOrderList()
- }
- })
-
- },
-
- invoicePrint(obj) {
- if(this.$store.getters.xt_user.org_id == 10480 || this.$store.getters.xt_user.org_id == 0){
- this.fapiao_number = obj.fa_piao_number
- this.dialogfapiaoVisible = true
- this.targeOrderId = obj.id
- this.targeObj = obj
- }else{
- let paramsObj = {
- order_id: obj.id,
- patient_id: obj.patient_id,
- number: obj.mdtrt_id,
- name: obj.patient.name,
- age: obj.age,
- gend: obj.patient.gender,
- setl_time: obj.setl_time,
- chargeName: this.getName(obj.creator)
- }
- this.dialogfapiaoVisible = false
- this.invoiceParams = paramsObj
- this.invoiceVisible = true
-
-
- }
-
-
- }
- },
-
- }
- </script>
- <style lang="scss">
- .table{
- tr td{
- padding:5px 0;
- }
- }
- .content_top{
- flex: 1;
- display: flex;
- // justify-content: space-between;
- }
- .content_button{
- flex: 1;
- display: flex;
- text-align: right;
- justify-content: flex-end;
- //justify-content:space-around;
- }
- .butt_1{
- margin-left:10px;
- }
- .butt_2{
- margin-top: 3px;
- }
- </style>
|