12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379 |
- <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-input
- size="small"
- style="width: 150px"
- v-model="keywords"
- 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="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
- size="small"
- v-model="p_type"
- placeholder="请选择"
- style="width: 150px; margin-left: 10px"
- @change="changePType"
- >
- <el-option
- v-for="(item, index) in p_types"
- :key="index"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
-
- <el-select
- size="small"
- v-model="charge_type"
- placeholder="请选择"
- style="width: 150px; margin-left: 10px"
- @change="changeChargeType"
- >
- <el-option
- v-for="(item, index) in charge_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 size="small" type="primary" @click="batch_print_settle" v-if="$store.getters.xt_user.org_id == 10215">批量打印结算单</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',
- }"
- @selection-change="handleSelectionChange"
- highlight-current-row
- >
- <el-table-column
- prop="date"
- width="60"
- align="center"
- type="selection"
- >
- </el-table-column>
- <el-table-column
- prop="date"
- label="序号"
- width="60"
- align="center"
- type="index"
- >
- </el-table-column>
- <el-table-column align="center" prop="name" label="就诊号">
- <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
- </el-table-column>
- <el-table-column align="center" 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" prop="name" label="应收金额">
- <template slot-scope="scope">{{
- scope.row.medfee_sumamt.toFixed(2)
- }}</template>
- </el-table-column>
- <el-table-column align="center" prop="name" label="实收金额">
- <template slot-scope="scope">{{
- scope.row.reality_price.toFixed(2)
- }}</template>
- </el-table-column>
- <el-table-column align="center" prop="name" label="科室">
- <template slot-scope="scope">{{
- scope.row.department_name
- }}</template>
- </el-table-column>
- <el-table-column align="center" prop="name" label="收费日期">
- <template slot-scope="scope">
- <div>{{ scope.row.setl_time }}</div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="name" label="收费员">
- <template slot-scope="scope">{{
- getName(scope.row.creator)
- }}</template>
- </el-table-column>
- <el-table-column align="center" 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="toRefund(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 &&
- p_type == 1
- "
- >
- 上传结算清单
- </el-button>
- <el-button
- size="mini"
- type="primary"
- @click="uploadOtherInfo(scope.row)"
- v-if="
- scope.row.order_status == 2 &&
- scope.row.result.id == 0 &&
- p_type == 2
- "
- >
- 上传结算清单
- </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 == 10210"
- >
- 确认结算清单
- </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="invoicePrint(scope.row)"
- >打印发票</el-button
- >
- <el-button
- size="mini"
- type="primary"
- @click="shouJuPrint(scope.row)"
- >打印收据</el-button
- >
-
- <!-- <el-button size="mini" type="primary" @click="refundOne(scope.row)">-->
- <!-- 撤销出院-->
- <!-- </el-button>-->
-
- <!--<el-button size="mini" type="primary" @click="refundTwo(scope.row)" v-if="scope.row.his_hospital_patient.balance_accounts_type == 2">-->
- <!--撤销明细-->
- <!--</el-button>-->
-
- <!-- <el-button size="mini" type="primary" @click="refundTwo(scope.row)" v-if="scope.row.his_hospital_patient.balance_accounts_type != 2">-->
- <!-- 撤销明细-->
- <!-- </el-button>-->
-
- <!-- <el-button size="mini" type="primary" @click="refundThee(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>-->
- <!-- <state-->
- </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"
- destroy-on-close
- >
- <invoicePrint ref="print" :invoiceParams="invoiceParams"></invoicePrint>
- </el-dialog>
-
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="shouJuVisible"
- >
- <!-- <invoicePrint ref="print" :invoiceParams='invoiceParams'></invoicePrint>-->
- <!-- <shou-ju-print></shou-ju-print>-->
- <shou-ju-print
- ref="shouJuPrint"
- :invoiceParams="invoiceParams"
- ></shou-ju-print>
- </el-dialog>
- <!-- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="settlementVisible">
- <settlement-print ref="print" :paramsObj='orderObj'></settlement-print>
- </el-dialog> -->
-
-
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="batchStatementVisible"
- >
- <hospital-batch-statement-print
- ref="hospital_batch_print" :paramsObj="batchParams"
- >
- </hospital-batch-statement-print>
- </el-dialog>
- </div>
- </template>
-
-
- <script>
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import {
- getDoctorList,
- getExportConsumeDetailList,
- getHisOrderList,
- HopitalunRefund,
- Refund,
- Outhopitaluncheck,
- Inthopitaluncheck,
- } from "@/api/his/his";
- import { uParseTime } from "@/utils/tools";
- import NewStatementPrint from "./newStatementPrint";
- 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 statementPrint from "./statementPrint";
- import ShouJuPrint from "./shouJuPrint";
- import BatchStatementPrint from '../outpatientCharges/batchStatementPrint.vue'
- import HospitalBatchStatementPrint from './hospitalBatchStatementPrint.vue'
-
- // import settlementPrint from './settlementPrint'
-
- export default {
- components: {
- HospitalBatchStatementPrint,
- BatchStatementPrint,
- ShouJuPrint,
- NewStatementPrintTwo,
- NewStatementPrint,
- BreadCrumb,
- listPrint,
- allListPrint,
- statementPrint,
- invoicePrint,
- // settlementPrint
- },
- data() {
- return {
- batchParams:{},
- selecting_schs:[],
- batchStatementVisible:false,
- loading1: true,
- 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: [],
- admin_user_id: "",
- listVisible: false,
- allListVisible: false,
- adminUserOptions: [],
- invoiceVisible: false,
- paramsObj: {},
- invoiceParams: {},
- settlementVisible: false,
- sort_type: 1,
- p_type: 1,
- charge_type: 0,
- sort_types: [
- { value: 1, label: "处方时间" },
- { value: 2, label: "结算时间" },
- ],
- p_types: [
- { value: 0, label: "全部" },
- { value: 1, label: "住院" },
- { value: 2, label: "门诊" },
- ],
- charge_types: [
- { value: 0, label: "全部" },
- { value: 1, label: "医保" },
- { value: 2, label: "自费" },
- ],
- shouJuVisible: false,
- };
- },
-
- //判断列表页是否刷新
- 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 = vm.$store.getters.pagedata.list.p_type;
- 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();
- }
- },
-
- methods: {
- handleSelectionChange(val) {
- this.selecting_schs = val
- },
- confirmUploadInfo(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: 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{
- var that = this;
- 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) {
- });
- }
- },
- 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) {
- });
- }
- },
- 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) {
- });
-
-
- },
-
- 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: this.p_type,
- sort_type: this.sort_type,
- });
- },
-
- uploadOtherInfo(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) {});
- },
- changeChargeType() {
- this.page = 1;
- this.keywords = "";
- this.getHisOrderList();
- },
- changePType() {
- this.page = 1;
- this.keywords = "";
- this.getHisOrderList();
- },
- changeSortType() {
- this.page = 1;
- this.keywords = "";
- this.getHisOrderList();
- },
- refundOne(row) {
- if (row.his_hospital_patient.balance_accounts_type == 2) {
- var that = this;
- this.$confirm("是否撤销出院", "撤销出院", {
- confirmButtonText: "确 定",
- cancelButtonText: "取 消",
- type: "warning",
- })
- .then(() => {
- let params = {
- id: row.his_hospital_patient.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- };
-
- Outhopitaluncheck(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.$message.success("撤销出院成功");
- this.changeRadioAndPatient(1);
- }
- });
- })
- .catch(() => {});
- } else {
- var that = this;
- this.$confirm("是否撤销出院", "撤销出院", {
- confirmButtonText: "确 定",
- cancelButtonText: "取 消",
- type: "warning",
- })
- .then(() => {
- let params = {
- id: row.his_hospital_patient.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- };
- axios
- .get("http://127.0.0.1:9532/zh/api/outhopitaluncheck/get", {
- 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,
- });
- }
- }
- })
- .catch(function (error) {});
- })
- .catch(() => {});
- }
- },
- refundThee(row) {
- if (row.his_hospital_patient.balance_accounts_type == 2) {
- this.$confirm("是否撤销入院", "撤销入院", {
- confirmButtonText: "确 定",
- cancelButtonText: "取 消",
- type: "warning",
- })
- .then(() => {
- let params = {
- id: row.his_hospital_patient.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- };
- Inthopitaluncheck(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.$message.success("撤销入院成功");
- }
- });
- })
- .catch(() => {});
- } else {
- var that = this;
- this.$confirm("是否撤销入院", "撤销入院", {
- confirmButtonText: "确 定",
- cancelButtonText: "取 消",
- type: "warning",
- })
- .then(() => {
- let params = {
- id: row.his_hospital_patient.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- };
- axios
- .get("http://127.0.0.1:9532/zh/api/inthopitaluncheck/get", {
- 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.changeRadioAndPatient(1);
-
- that.$message({
- message: "撤销入院成功",
- type: "success",
- duration: 5000,
- });
- }
- }
- })
- .catch(function (error) {});
- })
- .catch(() => {});
- }
- },
- refundTwo(row) {
- var that = this;
- this.$confirm("是否撤销明细", "撤销明细", {
- confirmButtonText: "确 定",
- cancelButtonText: "取 消",
- type: "warning",
- })
- .then(() => {
- let params = {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- };
- axios
- .get("http://127.0.0.1:9532/zh/api/refunddetail", {
- params: params,
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg);
- that.loadingtwo = false;
- return false;
- } else {
- if (response.data.data.failed_csuode == -10) {
- // that.$message.error(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, "医保错误信息", {
- confirmButtonText: "确 定",
- type: "warning",
- })
- .then(() => {})
- .catch(() => {});
- } else {
- that.$message.success("撤销明细成功");
-
- that.changeRadioAndPatient(1);
- }
- }
- })
- .catch(function (error) {});
- })
- .catch(() => {});
- },
- uploadInfo(row) {
- var that = this;
- axios
- .get("http://127.0.0.1:9532/api/settlelisthosptial/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) {
- console.log("~~~~~~~");
- if (row.his_hospital_patient.balance_accounts_type != 2) {
- var that = this;
- this.$confirm("是否退费", "退费", {
- confirmButtonText: "确 定",
- cancelButtonText: "取 消",
- type: "warning",
- })
- .then(() => {
- let params = {
- order_id: row.id,
- admin_user_id: this.$store.getters.xt_user.user.id,
- };
- axios
- .get("http://127.0.0.1:9532/zh/api/refund", {
- 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
- .$confirm(response.data.data.msg, "医保错误信息", {
- confirmButtonText: "确 定",
- type: "warning",
- })
- .then(() => {})
- .catch(() => {});
- } else {
- that.$message({
- message: "退费成功",
- type: "success",
- duration: 5000,
- });
- that.getHisOrderList();
- }
- }
- })
- .catch(function (error) {});
- })
- .catch(() => {});
- } else {
- this.$confirm("是否退费", "退费", {
- confirmButtonText: "确 定",
- cancelButtonText: "取 消",
- type: "warning",
- })
- .then(() => {
- let params = {
- order_id: row.id,
- };
- HopitalunRefund(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(() => {});
- }
- },
- toPrint(row) {
- console.log(row);
- if (
- this.$store.getters.xt_user.org_id == 9504 ||
- this.$store.getters.xt_user.org_id == 10028 ||
- (row.order_status == 2 &&
- this.$store.getters.xt_user.org_id == 10138) ||
- (row.order_status == 2 && this.$store.getters.xt_user.org_id == 10278)
- ) {
- 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.statementVisible = true;
- let obj = {
- order_id: row.id,
- balance_accounts_type: row.his_hospital_patient.balance_accounts_type,
- start_time: row.settle_start_time,
- end_time: row.settle_end_time,
- };
- console.log(obj);
- this.orderObj = obj;
- console.log(this.orderObj);
- }
- },
- settlementPrint() {
- this.settlementVisible = true;
- },batch_print_settle(){
- 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.batchParams = params
-
- }
- }, export_detail() {
- let params = {
- start_time: this.start_time,
- end_time: this.end_time,
- p_type: this.p_type,
- };
- 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 charge_name = "";
- let order_status = "";
-
- if (
- order.his_hospital_patient != null &&
- order.his_hospital_patient.number.length > 0
- ) {
- number = order.his_hospital_patient.number;
- }
-
- if (order.his_patient != null) {
- if (order.his_patient.balance_accounts_type == 1) {
- balance_accounts = "自费";
- }
-
- if (order.his_patient.balance_accounts_type == 2) {
- 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.order_status == 1) {
- order_status = "待结算";
- }
-
- if (order.order_status == 2) {
- order_status = "已结算";
- }
-
- if (order.order_status == 3) {
- order_status = "已退费";
- }
-
- let obj = {
- 单号: order.number,
- 人员编号: order.his_hospital_patient.psn_no,
- 保地医保区: order.his_hospital_patient.insuplc_admdvs,
- 身份证号: order.patient.id_card_no,
- 患者姓名: name,
- 险种: order.insutype,
- 医疗类别: order.med_type,
- 就诊id: number,
- 登记日期: order.his_hospital_patient.in_hosptial_time,
- 出院日期: order.his_hospital_patient.out_hosptial_time,
- 结算id: order.setl_id,
- 结算日期: order.setl_time,
- 医疗费总额: order.medfee_sumamt,
- 全自费金额: order.fulamt_ownpay_amt,
- 超限价自费金额: order.overlmt_self_pay,
- 先行自付金额: order.preselfpay_amt,
- 符合政策范围金额: order.inscp_scp_amt,
- 实际支付起付线: order.act_pay_dedc,
- 基本医疗保险统筹基金支出: order.hifp_pay,
- 基本医疗保险统筹基金支付比例: order.pool_prop_selfpay,
- 公务员医疗补助基金支出: order.cvlserv_pay,
- 企业补充医疗保险基金支出: order.hifes_pay,
- 居民大病保险基金支出: order.hifmi_pay,
- 职工大额医疗费用补助基金支出: order.hifob_pay,
- 医疗救助基金支出: order.maf_pay,
- 其他支出: order.oth_pay,
- 基金支付总额: order.fund_pay_sumamt,
- 个人负担总金额: order.psn_part_amt,
- 个人账户支付金额: order.acct_pay,
- 个人现金支出: order.psn_cash_pay,
- 医院总负担金额: order.hosp_part_amt,
- 余额: order.balc,
- 个账共济支付金额: order.acct_mulaid_pay,
- };
- list.push(obj);
- }
- import("@/vendor/Export2Excel").then((excel) => {
- const tHeader = [
- "单号",
- "人员编号",
- "保地医保区",
- "身份证号",
- "患者姓名",
- "险种",
- "医疗类别",
- "就诊id",
- "登记日期",
- "出院日期",
- "结算id",
- "结算日期",
- "医疗费总额",
- "全自费金额",
- "超限价自费金额",
- "先行自付金额",
- "符合政策范围金额",
- "实际支付起付线",
- "基本医疗保险统筹基金支出",
- "基本医疗保险统筹基金支付比例",
- "公务员医疗补助基金支出",
- "企业补充医疗保险基金支出",
- "居民大病保险基金支出",
- "职工大额医疗费用补助基金支出",
- "医疗救助基金支出",
- "其他支出",
- "基金支付总额",
- "个人负担总金额",
- "个人账户支付金额",
- "个人现金支出",
- "医院总负担金额",
- "余额",
- "个账共济支付金额",
- ];
- const filterVal = [
- "单号",
- "人员编号",
- "保地医保区",
- "身份证号",
- "患者姓名",
- "险种",
- "医疗类别",
- "就诊id",
- "登记日期",
- "出院日期",
- "结算id",
- "结算日期",
- "医疗费总额",
- "全自费金额",
- "超限价自费金额",
- "先行自付金额",
- "符合政策范围金额",
- "实际支付起付线",
- "基本医疗保险统筹基金支出",
- "基本医疗保险统筹基金支付比例",
- "公务员医疗补助基金支出",
- "企业补充医疗保险基金支出",
- "居民大病保险基金支出",
- "职工大额医疗费用补助基金支出",
- "医疗救助基金支出",
- "其他支出",
- "基金支付总额",
- "个人负担总金额",
- "个人账户支付金额",
- "个人现金支出",
- "医院总负担金额",
- "余额",
- "个账共济支付金额",
- ];
- 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]));
- },
- 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();
- },
- 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: this.p_type,
- sort_type: this.sort_type,
- charge_type: this.charge_type,
- };
- console.log(params, "参数");
- 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;
- }
- },
- invoicePrint(obj) {
- let paramsObj = {
- order_id: obj.id,
- patient_id: obj.patient_id,
- name: obj.patient.name,
- age: obj.age,
- gend: obj.gend,
- setl_time: obj.setl_time,
- };
- this.invoiceParams = paramsObj;
-
- const loading = this.$loading({
- lock: true,
- text: '正在加载中...',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- setTimeout(() => {
- this.invoiceVisible = true;
- loading.close();
- }, 1000);
- },
- shouJuPrint(obj) {
- let paramsObj = {
- order_id: obj.id,
- patient_id: obj.patient_id,
- name: obj.patient.name,
- age: obj.age,
- gend: obj.gend,
- setl_time: obj.setl_time,
- };
- this.invoiceParams = paramsObj;
- this.shouJuVisible = true;
- },
- },
- created() {
- this.fetchAllAdminUsers();
- this.getDoctorList();
- this.getHisOrderList();
- },
- };
- </script>
|