123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711 |
- <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>
- <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
- <!--@click="Action">-->
- <!--导出-->
- <!--</el-button>-->
- <el-input
- size="small"
- style="width: 150px"
- v-model="keywords"
- @input="searchAction"
- @keyup.enter.native="searchAction"
- class="filter-item"
- placeholder="请输入患者姓名"
- />
- <el-button
- size="small"
- style="margin-left: 10px"
- class="filter-item"
- type="primary"
- @click="searchAction"
- >
- 搜索
- </el-button>
- <el-select
- size="small"
- v-model="sort_type"
- placeholder="请选择"
- style="width: 150px; margin-left: 10px"
- @change="changeSortType"
- >
- <el-option
- v-for="(item, index) in sort_types"
- :key="index"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
-
- <el-select v-model="sch_type" placeholder="请选择班次" @change="handleSchType">
- <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>
-
- <el-select v-model="zoneVal" placeholder="请选择分区" style="margin-right:20px;" @change="handleZoneChange">
- <el-option
- v-for="item in zone_options"
- :key="item.id"
- :label="item.text"
- :value="item.id">
- </el-option>
- </el-select>
-
-
- <el-select v-model="medTypeVal" placeholder="请选择医疗类别" style="margin-right:20px;" @change="handleMedChange">
- <el-option
- v-for="item in med_options"
- :key="item.id"
- :label="item.text"
- :value="item.id">
- </el-option>
- </el-select>
-
- <!-- <el-date-picker
- size="small"
- v-model="start_time"
- prefix-icon="el-icon-date"
- @change="handleStartTimeChange"
- :editable="false"
- :clearable="false"
- style="width: 196px; margin-right: 10px"
- type="date"
- placeholder="选择开始日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- align="right"
- ></el-date-picker>
-
- <el-date-picker
- size="small"
- v-model="end_time"
- prefix-icon="el-icon-date"
- @change="handleEndTimeChange"
- :editable="false"
- :clearable="false"
- style="width: 196px; margin-right: 10px"
- type="date"
- placeholder="选择结束日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- align="right"
- ></el-date-picker> -->
- </div>
- <!-- 按钮 -->
- <div>
- <!-- <el-popover
- placement="bottom"
- width="210"
- trigger="click">
- <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
- <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
- <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
-
- </el-popover> -->
- <el-button v-if="$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10278 || $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 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
- <el-button v-if="$store.getters.xt_user.org_id == 10318 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten_two">报表下载3</el-button>
-
- <!-- <el-button size="small" type="primary" @click="export_detail_ten_three">报表下载4</el-button>-->
-
-
- <!-- <el-button size="small" type="primary" @click="export_detail_two"-->
- <!-- >报表下载2-->
- <!-- </el-button-->
- <!-- >-->
-
- <!-- <el-button size="small" type="primary" @click="export_detail_three">报表下载12</el-button>-->
- <!-- <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
- <!-- <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
- <!-- <el-button size="small" type="primary" @click="export_detail_six">诊疗下载</el-button>-->
- <!-- <el-button size="small" type="primary" @click="export_detail_tenone">报表下载10</el-button>-->
- <!-- <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
-
-
- </div>
- </div>
- <div style="margin-bottom: 10px;">
- <el-date-picker
- size="small"
- v-model="start_time"
- prefix-icon="el-icon-date"
- @change="handleStartTimeChange"
- :editable="false"
- :clearable="false"
- style="width: 196px; "
- 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: 196px; "
- type="date"
- placeholder="选择结束日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- align="right"
- ></el-date-picker>
- </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
- >
- <el-table-column align="center" type="selection" width="55"></el-table-column>
- <el-table-column
- prop="date"
- label="序号"
- width="60"
- align="center"
- type="index"
- >
- </el-table-column>
- <el-table-column align="center" width="100" prop="name" label="就诊号">
- <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
- </el-table-column>
- <el-table-column align="center" width="90" prop="name" label="患者名字">
- <template slot-scope="scope">{{ scope.row.patient.name }}</template>
- </el-table-column>
- <!--<el-table-column align="center" prop="name" label="患者类型">-->
- <!--<template slot-scope="scope"></template>-->
- <!--</el-table-column>-->
-
- <el-table-column align="center" width="90" prop="name" label="应收金额">
- <template slot-scope="scope">{{
- scope.row.medfee_sumamt.toFixed(2)
- }}
- </template>
- </el-table-column>
- <el-table-column align="center" width="90" prop="name" label="实收金额">
- <template slot-scope="scope">{{
- scope.row.medfee_sumamt.toFixed(2)
- }}
- </template>
- </el-table-column>
- <el-table-column align="center" width="90" 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="90" prop="name" label="收费类型">
- <template slot-scope="scope">
- <div v-if="scope.row.his_patient.balance_accounts_type != 2">
- 医保
- </div>
- <div v-if="scope.row.his_patient.balance_accounts_type == 2">
- 自费
- </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="90" prop="name" label="收费员">
- <template slot-scope="scope">{{
- getName(scope.row.creator)
- }}
- </template>
- </el-table-column>
- <el-table-column align="center" width="80" 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" prop="name" label="操作">
- <template slot-scope="scope">
- <el-button size="mini" type="primary" @click="toDetail(scope.row)"
- >详情
- </el-button
- >
- <el-button size="mini" type="primary" @click="toPrint(scope.row)">
- 结算单
- </el-button>
- <el-button v-if="$store.getters.xt_user.org_id == 10191" size="mini" type="primary" @click="tolistPrint(scope.row)">
- 结算清单
- </el-button>
- <el-button
- size="mini"
- type="primary"
- @click="uploadInfo(scope.row)"
- v-if="scope.row.order_status == 2 && scope.row.result.id == 0"
- >
- 上传结算清单
-
- </el-button>
-
- <el-button
- 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
- size="mini"
- type="primary"
- @click="cancelUploadTwo(scope.row)"
- v-if="$store.getters.xt_user.org_id == 10265"
- >
- 取消结算清单
- </el-button>
-
- <el-button
- size="mini"
- type="primary"
- @click="queryData(scope.row)"
- v-if="$store.getters.xt_user.org_id == 10265"
- >
- 查询结算清单
- </el-button>
-
-
- <el-button
- 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
- size="mini"
- type="primary"
- @click="cancelUploadThree(scope.row)"
- >
- 更改结算清单状态为未提交
- </el-button>
- <el-button
- 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 size="mini" type="primary" @click="toRefund(scope.row)">
- 退费
- </el-button>
- <el-button
- size="mini"
- type="primary"
- @click="invoicePrint(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></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>
-
- </div>
- </template>
-
-
- <script>
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import {getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund} from "@/api/his/his";
- // import NewStatementPrint from './newStatementPrint'
-
-
- import batchStatementPrint from "./batchStatementPrint.vue";
- 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";
- const moment = require('moment')
- import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo,getAllOrders,exportOrderInfo,handleOne} from "../../api/his/his";
-
- import {handleData10106,handleData10318,handleData10138Two} from "../../api/his/his_export";
- import StatementListPrint from "./statementListPrint";
- import {
- getDialysisRecordInitData
- } from '@/api/dialysis_record'
- import BatchStatementPrint from './batchStatementPrint'
- export default {
- name: "OutpatientChargesSummary",
- components: {
- BatchStatementPrint,
- StatementListPrint,
- NewStatementPrintTwo,
- NewStatementPrint,
- BreadCrumb,
- listPrint,
- allListPrint,
- invoicePrint,
- settlementPrint,
- },
- data() {
- return {
- orderObj: {},
- batchOrderObj:{},
- 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: [],
- selecting_schs:[],
- 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"),
- total: "",
- doctors: [],
- sort_type: 1,
- sort_types: [
- {value: 1, label: "处方时间"},
- {value: 2, label: "结算时间"},
- ],
- admin_user_id: "",
- listVisible: false,
- allListVisible: false,
- adminUserOptions: [],
- invoiceVisible: false,
- paramsObj: {},
- invoiceParams: {},
- settlementVisible: false,
- settlementObj: {},
- };
- },
-
- //判断列表页是否刷新
- 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();
- },
-
- methods: {
- 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;
- }
- },
- 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 {
- 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: row.his_patient.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 = {};
- 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: "2023",
- 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,
- "dan": list[i].pric_two,
- }
- tarList.push(obj)
- }
- }
-
- import("@/vendor/Export2Excel").then((excel) => {
- const tHeader = [
- "姓名",
- "身份证号",
- "医保类型",
- "年",
- "月",
- "时间",
- "药品编码",
- "费用类型",
- "名称",
- "单位",
- "数量",
- "金额",
- "dan",
-
- ];
- const filterVal = [
- "姓名",
- "身份证号",
- "医保类型",
- "年",
- "月",
- "时间",
- "药品编码",
- "费用类型",
- "名称",
- "单位",
- "数量",
- "金额",
- "dan",
-
-
- ];
- 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 = {
- "周期": "2023年第四季度",
- "类别": "门诊",
- "医保目录编码": 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_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,
- };
- getExportConsumeDetailList(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 number = "";
- let name = "";
- let department = "";
- let doctor_name = "";
- let balance_accounts = "";
- let order_status = "";
- let charge_name = "";
-
- let insutypeName = "";
-
- 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,
- 开处时间: 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,
- 大病基金金额: 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,
- 退费日期: "",
- };
-
- 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: "消费明细",
- });
- });
- }
- });
- },
- 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].project.price && 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;
- 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 {
- this.tableData = response.data.data.order;
- 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(index) {
- if (index == 1) {
- this.listVisible = true;
- } else if (index == 2) {
- this.allListVisible = 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
- },
-
- invoicePrint(obj) {
- console.log(obj);
- 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.invoiceParams = paramsObj;
- this.invoiceVisible = true;
- },
- },
- };
- </script>
|