123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289 |
- <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"
- />
- <el-button
- size="small"
- style="margin-left: 10px"
- class="filter-item"
- type="primary"
- @click="searchAction"
- >
- 搜索
- </el-button>
- <!-- <el-select size="small" v-model="admin_user_id" placeholder="请选择"-->
- <!-- style="width:150px;margin-left:10px;" @change="changeDoctor">-->
- <!-- <el-option-->
- <!-- label="全部"-->
- <!-- value="0">-->
- <!-- </el-option>-->
- <!-- <el-option-->
- <!-- v-for="(item,index) in doctors"-->
- <!-- :key="index"-->
- <!-- :label="item.user_name"-->
- <!-- :value="item.admin_user_id">-->
- <!-- </el-option>-->
- <!-- </el-select>-->
-
- <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-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>
- <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
- <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
- </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 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 size="small" type="primary" @click="export_detail_two"-->
- <!-- >报表下载2-->
- <!-- </el-button-->
- <!-- >-->
-
- <!-- <el-button size="small" type="primary" @click="export_detail_three">报表下载2</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">报表下载9</el-button>-->
- <!-- <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
-
-
- </div>
- </div>
- <el-table
- :data="tableData"
- border
- style="width: 100%"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- highlight-current-row
- >
- <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.reality_price.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
- 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="cancelUpload(scope.row)"
- v-if="scope.row.order_status == 2 && scope.row.result.id > 0"
- >
- 撤销结算清单
- </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="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>
- </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 NewStatementPrint from "./statementPrint.vue";
- import listPrint from "./listPrint";
- import allListPrint from "./allListPrint";
- import NewStatementPrintTwo from "./newStatementPrintTwo";
- import {fetchAllAdminUsers} from "@/api/doctor";
- import axios from "axios";
- import invoicePrint from "./invoicePrint";
- import settlementPrint from "./settlementPrint";
- import {jsGetAge, uParseTime} from "@/utils/tools";
-
- import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo,getAllOrders} from "../../api/his/his";
-
- import {handleData10106} from "../../api/his/his_export";
-
- export default {
- name: "OutpatientChargesSummary",
- components: {
- NewStatementPrintTwo,
- NewStatementPrint,
- BreadCrumb,
- listPrint,
- allListPrint,
- invoicePrint,
- settlementPrint,
- },
- data() {
- return {
- orderObj: {},
- statementVisible: false,
- statementVisible9504: false,
- orderObj9504: {},
- crumbs: [
- {path: false, name: "门诊收费"},
- {path: false, name: "项目消费明细汇总"},
- ],
- tableData: [],
- limit: 10,
- page: 1,
- keywords: "",
- start_time: "",
- end_time: "",
- total: "",
- doctors: [],
- sort_type: 1,
- sort_types: [
- {value: 1, label: "处方时间"},
- {value: 2, label: "结算时间"},
- ],
- admin_user_id: "",
- listVisible: false,
- allListVisible: false,
- adminUserOptions: [],
- invoiceVisible: false,
- paramsObj: {},
- 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.fetchAllAdminUsers();
- this.getDoctorList();
- this.getHisOrderList();
- },
-
- methods: {
- 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;
- }
- },
- 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) {
- });
- },
-
- 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(() => {
- });
- }
- },
- 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: "2022年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: "消费明细",
- });
- });
- }
- });
- },
- 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 = [];
- 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: "2022",
- month: "8",
- code: data[b].code,
- pric: data[b].count * data[b].price,
- item_name: data[b].name,
- unit: data[b].unit,
- count: data[b].count,
-
- }
- 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].code,
- "名称": list[i].item_name,
- "单位": list[i].unit,
- "数量": list[i].count,
- "金额": list[i].pric,
- }
- tarList.push(obj)
- }
- }
-
- import("@/vendor/Export2Excel").then((excel) => {
- const tHeader = [
- "姓名",
- "身份证号",
- "医保类型",
- "年",
- "月",
- "药品编码",
- "名称",
- "单位",
- "数量",
- "金额",
-
- ];
- const filterVal = [
- "姓名",
- "身份证号",
- "医保类型",
- "年",
- "月",
- "药品编码",
- "名称",
- "单位",
- "数量",
- "金额",
-
- ];
- const data = this.formatJson(filterVal, tarList);
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: "消费明细",
- });
- });
- }
- });
- },
- export_detail_four() {
- let params = {};
- getHisDataFive(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- let list = [];
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i];
- // console.log(data)
- for (let b = 0; b < order.info.length; b++) {
- let obj = {
- org_name: "生命之源血液透析中心",
- name: order.patient.name,
- id_card_no: order.patient.id_card_no,
- jiuyi_date: this.getTimes(order.settle_accounts_date),
- dianhua: order.patient.phone,
- pric: order.info[b].pric,
- cnt: order.info[b].cnt,
- det_item_fee_sumamt: order.info[b].det_item_fee_sumamt,
- zhenduan: "慢性肾衰竭",
- shifouyibao: "是",
- doctor: "高华",
- jiesuanfangshi: "医保",
- jizhangshijian: order.setl_time,
- feiyongheji: order.medfee_sumamt,
- jizhangjine: order.fund_pay_sumamt,
- xianjinheji: order.psn_cash_pay,
-
- }
- if (order.is_medicine_insurance == 1) {
- obj.jiesuanfangshi = "是"
-
- } else {
-
- obj.jiesuanfangshi = "否"
-
- }
-
- if (order.info[b].advice_id > 0 && order.info[b].project_id == 0) {
- obj["yibaomulucode"] = order.info[b].advices.drug.medical_insurance_number
- obj["yibaomuluname"] = order.info[b].advices.drug.drug_name
- obj["neibumulucode"] = order.info[b].advices.drug.id
- obj["neibumuluname"] = order.info[b].advices.drug.drug_name
- }
- if (order.info[b].advice_id == 0 && order.info[b].project_id > 0) {
- if (order.info[b].project.type == 2) {
- obj["yibaomulucode"] = order.info[b].project.project.medical_code
- obj["yibaomuluname"] = order.info[b].project.project.project_name
- obj["neibumulucode"] = order.info[b].project.project.id
- obj["neibumuluname"] = order.info[b].project.project.project_name
-
- } else {
- obj["yibaomulucode"] = order.info[b].project.good_info.medical_insurance_number
- obj["yibaomuluname"] = order.info[b].project.good_info.good_name
- obj["neibumulucode"] = order.info[b].project.good_info.id
- obj["neibumuluname"] = order.info[b].project.good_info.good_name
- }
- }
- var thisLen = order.patient.id_card_no.length
- var birth = ''
- if (thisLen == 15) {
- birth = '19' + order.patient.id_card_no.substr(6, 6)
- } else {
- birth = order.patient.id_card_no.substr(6, 8)
- }
- var births =
- birth.substr(0, 4) +
- '-' +
- birth.substr(4, 2) +
- '-' +
- birth.substr(6, 2)
- obj["age"] = jsGetAge(births, '-')
-
- if (order.patient.gender == 1) {
- obj['gender'] = "男"
- } else {
- obj['gender'] = "女"
- }
-
- list.push(obj)
- }
-
- }
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- if (list[i].pric > 0) {
- let obj = {
- "机构编码": list[i].org_name,
- "就诊人姓名": list[i].name,
- "性别": list[i].gender,
- "年龄": list[i].age,
- "身份证号码": list[i].id_card_no,
- "就医日期": list[i].jiuyi_date,
- "电话": list[i].dianhua,
- "医保目录编码": list[i].yibaomulucode,
- "医保目录名称": list[i].yibaomuluname,
- "机构内部编码": list[i].neibumulucode,
- "机构内部名称": list[i].neibumuluname,
- "就诊项目明细": list[i].yibaomuluname,
- "单价": list[i].pric,
- "数量": list[i].cnt,
- "金额": list[i].det_item_fee_sumamt,
- "费用合计": list[i].feiyongheji,
- "记账金额": list[i].jizhangjine,
- "现金合计": list[i].xianjinheji,
- "结算方式": list[i].jiesuanfangshi,
- "接诊医生": list[i].doctor,
- "诊断": list[i].zhenduan,
- "记账时间": list[i].jizhangshijian,
- "是否医保": list[i].shifouyibao,
-
- }
- tarList.push(obj)
- }
- }
-
- import("@/vendor/Export2Excel").then((excel) => {
- const tHeader = [
- "机构编码",
- "就诊人姓名",
- "性别",
- "年龄",
- "身份证号码",
- "就医日期",
- "电话",
- "医保目录编码",
- "医保目录名称",
- "机构内部编码",
- "机构内部名称",
- "就诊项目明细",
- "单价",
- "数量",
- "金额",
- "费用合计",
- "记账金额",
- "现金合计",
- "结算方式",
- "接诊医生",
- "诊断",
- "记账时间",
- "是否医保",
-
- ];
- const filterVal = [
- "机构编码",
- "就诊人姓名",
- "性别",
- "年龄",
- "身份证号码",
- "就医日期",
- "电话",
- "医保目录编码",
- "医保目录名称",
- "机构内部编码",
- "机构内部名称",
- "就诊项目明细",
- "单价",
- "数量",
- "金额",
- "费用合计",
- "记账金额",
- "现金合计",
- "结算方式",
- "接诊医生",
- "诊断",
- "记账时间",
- "是否医保",
-
- ];
- const data = this.formatJson(filterVal, tarList);
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: "消费明细",
- });
- });
- }
- });
-
- },
- export_detail_five() {
- let params = {};
- getHisDataFive(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- let list = [];
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i];
- // console.log(data)
- for (let b = 0; b < order.info.length; b++) {
- if (order.info[b].project.project.cost_classify == 3) {
- let obj = {
- p_name: order.psn_name,
- code: order.info[b].project.project.id,
- name: order.info[b].project.project.project_name,
- unit: order.info[b].project.project.unit,
- jiage: order.info[b].det_item_fee_sumamt,
- name_yibao: order.info[b].project.project.project_name,
- guoma: order.info[b].project.project.medical_code,
- zifu: order.info[b].selfpay_prop,
- cnt: order.info[b].cnt,
- pric: order.info[b].pric,
- gerenzifu: order.info[b].fulamt_ownpay_amt + order.info[b].preselfpay_amt,
- baoxiaojine: order.info[b].inscp_scp_amt,
-
- }
- if (order.info[b].chrgitm_lv == "01") {
- obj["yibao_dengji"] = "甲"
- } else if (order.info[b].chrgitm_lv == "02") {
- obj["yibao_dengji"] = "乙"
- } else {
- obj["yibao_dengji"] = "丙"
- }
- list.push(obj)
- }
- }
-
- }
- console.log(list)
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- let obj = {
- "姓名": list[i].p_name,
- "医保目录编码": list[i].guoma,
- "名称": list[i].name,
- "单位": list[i].unit,
- "价格": list[i].jiage,
- "医保等级": list[i].yibao_dengji,
- "自付比例": list[i].zifu,
- "数量": list[i].cnt,
- "金额": list[i].pric,
- "个人自付": list[i].gerenzifu,
- "报销金额": list[i].baoxiaojine,
-
- }
- tarList.push(obj)
- }
-
- import("@/vendor/Export2Excel").then((excel) => {
- const tHeader = [
- "姓名",
- "医保目录编码",
- "名称",
- "单位",
- "价格",
- "医保等级",
- "自付比例",
- "数量",
- "金额",
- "个人自付",
- "报销金额",
-
- ];
- const filterVal = [
- "姓名",
- "医保目录编码",
- "名称",
- "单位",
- "价格",
- "医保等级",
- "自付比例",
- "数量",
- "金额",
- "个人自付",
- "报销金额",
- ];
- const data = this.formatJson(filterVal, tarList);
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: "消费明细",
- });
- });
- }
- });
-
- },
- export_detail_six() {
- let params = {};
- getHisDataSix(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- let list = [];
- let new_list = [];
- for (let i = 0; i < response.data.data.order.length; i++) {
- let order = response.data.data.order[i];
- for (let b = 0; b < order.info.length; b++) {
- new_list.push(order.info[b])
- }
- }
-
- var infos = this.setMonthPrescriptiontwo(new_list)
- for (let b = 0; b < infos.length; b++) {
- list.push(infos[b])
- }
-
- var tarList = []
- for (let i = 0; i < list.length; i++) {
- let obj = {
- "周期": "2022年第三季度",
- "类别": "门诊",
- "医保目录编码": 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_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: "消费明细",
- });
- });
-
- }
- });
-
- },
- getType(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_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: "消费明细",
- });
- });
-
-
- }
- });
-
- },
-
- 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
- },
-
- 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 obj = {
- 就诊号: order.mdtrt_id,
- 患者姓名: name,
- 开处时间: time,
- 险种类型: insutypeName,
- 应收金额: 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) {
- let tableData = []
- let drug_month_prescriptions = {
- advices: []
- }
- let drug_ids = []
- let project_month_prescriptions = {
- project: []
-
- }
- let project_ids = []
-
- // let addition_month_prescriptions = {
- // addition: []
- //
- // }
- // let additions_ids = []
- for (let i = 0; i < month_prescriptions.length; i++) {
- if (month_prescriptions[i].type == 1) { //药品
- for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
- let obj = {
- id: month_prescriptions[i].advices[a].drug_id,
- price: month_prescriptions[i].advices[a].price
-
- }
- drug_ids.push(obj)
- drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
- }
-
- } else if (month_prescriptions[i].type == 2) { //项目
- for (let a = 0; a < month_prescriptions[i].project.length; a++) {
- 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])
- }
- }
-
- }
-
- drug_ids = this.unique(drug_ids)
- project_ids = this.unique(project_ids)
-
- // additions_ids= this.unique(additions_ids)
-
- for (let i = 0; i < drug_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
- if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
- obj['name'] = drug_month_prescriptions.advices[a].advice_name
- obj['code'] = drug_month_prescriptions.advices[a].id
- obj['unit'] = drug_month_prescriptions.advices[a].drug.min_unit
- obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
- count = count + drug_month_prescriptions.advices[a].prescribing_number
- }
- }
- obj['count'] = count
- tableData.push(obj)
- }
-
- 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].id
- obj['unit'] = project_month_prescriptions.project[a].project.unit
- obj['type'] = 2
-
- } else if (project_month_prescriptions.project[a].type == 3) {
- obj['name'] = project_month_prescriptions.project[a].good_info.good_name
- obj['code'] = project_month_prescriptions.project[a].id
- obj['unit'] = project_month_prescriptions.project[a].good_info.packing_unit
- obj['type'] = 3
-
- }
- count = count + parseFloat(project_month_prescriptions.project[a].count)
- obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
- obj['type'] = 1
-
- }
- }
- obj['count'] = count
- 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,
- };
- 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>
|