Commit 67472863 authored by 周留芳's avatar 周留芳

商保流程改造

parent 194b83c0
// 核销管理api
export default {
queryEobList: "/backstage/auth/queryEobList", //EOB列表查询
queryEobReceiptList: "/backstage/auth/queryEobReceiptList", //EOB待核销账单查询
queryEobNeedReceiptList: "/backstage/auth/queryEobNeedReceiptList", //EOB待确认账单列表查询
deleteEobReceiptInfo: "/backstage/auth/deleteEobReceiptInfo", //删除EOB
saveEobReceiptInfo: "/backstage/auth/saveEobReceiptInfo", //EOB新建
queryBackMoneyList: "/backstage/auth/queryBackMoneyList", //回款列表
queryBackEobList: "/backstage/auth/queryBackEobList", //回款关联EOB列表查询
queryEobInfoList: "/backstage/auth/queryEobInfoList", //待回款EOB列表查询
saveBackMoney: "/backstage/auth/saveBackMoney", //新建回款
deleteBackMoney: "/backstage/auth/deleteBackMoney", //删除回款
eobReceipListExport: "/backstage/auth/eobReceipListExport", //EOB关联账单导出
queryBackReceiptList: "/backstage/auth/queryBackReceiptList", //回销关联账单列表查询
queryReceiptInfoList: "/backstage/auth/queryReceiptInfoList", //回销账单列表查询
};
// 核销管理api
export default {
queryEobList: "/backstage/auth/queryEobList", //EOB列表查询
queryEobReceiptList: "/backstage/auth/queryEobReceiptList", //EOB待核销账单查询
queryEobNeedReceiptList: "/backstage/auth/queryEobNeedReceiptList", //EOB待确认账单列表查询
deleteEobReceiptInfo: "/backstage/auth/deleteEobReceiptInfo", //删除EOB
saveEobReceiptInfo: "/backstage/auth/saveEobReceiptInfo", //EOB新建
queryBackMoneyList: "/backstage/auth/queryBackMoneyList", //回款列表
queryBackEobList: "/backstage/auth/queryBackEobList", //回款关联EOB列表查询
queryEobInfoList: "/backstage/auth/queryEobInfoList", //待回款EOB列表查询
saveBackMoney: "/backstage/auth/saveBackMoney", //新建回款
deleteBackMoney: "/backstage/auth/deleteBackMoney", //删除回款
eobReceipListExport: "/backstage/auth/eobReceipListExport", //EOB关联账单导出
queryBackReceiptList: "/backstage/auth/queryBackReceiptList", //回销关联账单列表查询
queryReceiptInfoList: "/backstage/auth/queryReceiptInfoList", //回销账单列表查询
deleteReceiptRecord: "/backstage/auth/deleteBackReceipt", // 删除已关联账单
};
// 核销管理函数库
import apis from "../apis_moudles/verification.js";
import req from "../request";
//EOB列表查询
const QUERYEOBLIST = (data) => {
return req.post(apis.queryEobList, data);
};
//EOB待核销账单查询
const QUERYEOBRECEIPTLIST = (data) => {
return req.post(apis.queryEobReceiptList, data);
};
//EOB待确认账单列表查询
const QUERYEOBNEEDRECEIPTLIST = (data) => {
return req.post(apis.queryEobNeedReceiptList, data);
};
//EOB新建
const SAVEEOBRECEIPTINFO = (data) => {
return req.post(apis.saveEobReceiptInfo, data);
};
//删除EOB
const DELEOBRECEIPTINFO = (data) => {
return req.post(apis.deleteEobReceiptInfo, data);
};
//回款列表
const QUERYBACKMONEYLIST = (data) => {
return req.post(apis.queryBackMoneyList, data);
};
//回款关联EOB列表查询
const QUERYBACKEOBLIST = (data) => {
return req.post(apis.queryBackEobList, data);
};
//待回款EOB列表查询
const QUERYEOBINFOLIST = (data) => {
return req.post(apis.queryEobInfoList, data);
};
//新建回款
const SAVEBACKMONEY = (data) => {
return req.post(apis.saveBackMoney, data);
};
//删除回款
const DELETEBACKMONEY = (data) => {
return req.post(apis.deleteBackMoney, data);
};
//EOB关联账单导出
const EOBRECEIPLISTEXPORT = (data={}) => {
return req.post(apis.eobReceipListExport, data, { responseType: "blob" });
};
//回销关联账单列表查询
const QUERYBACKRECEIPTLIST = (data) => {
return req.post(apis.queryBackReceiptList, data);
};
//回销账单列表查询
const QUERYBACKRECEIPTINFOLIST = (data) => {
return req.post(apis.queryReceiptInfoList, data);
};
// 对象数组
export default {
QUERYEOBLIST,
QUERYEOBRECEIPTLIST,
QUERYEOBNEEDRECEIPTLIST,
SAVEEOBRECEIPTINFO,
DELEOBRECEIPTINFO,
QUERYBACKMONEYLIST,
QUERYBACKEOBLIST,
QUERYEOBINFOLIST,
SAVEBACKMONEY,
DELETEBACKMONEY,
EOBRECEIPLISTEXPORT,
QUERYBACKRECEIPTLIST,
QUERYBACKRECEIPTINFOLIST
// 核销管理函数库
import apis from "../apis_moudles/verification.js";
import req from "../request";
//EOB列表查询
const QUERYEOBLIST = (data) => {
return req.post(apis.queryEobList, data);
};
//EOB待核销账单查询
const QUERYEOBRECEIPTLIST = (data) => {
return req.post(apis.queryEobReceiptList, data);
};
//EOB待确认账单列表查询
const QUERYEOBNEEDRECEIPTLIST = (data) => {
return req.post(apis.queryEobNeedReceiptList, data);
};
//EOB新建
const SAVEEOBRECEIPTINFO = (data) => {
return req.post(apis.saveEobReceiptInfo, data);
};
//删除EOB
const DELEOBRECEIPTINFO = (data) => {
return req.post(apis.deleteEobReceiptInfo, data);
};
//回款列表
const QUERYBACKMONEYLIST = (data) => {
return req.post(apis.queryBackMoneyList, data);
};
//回款关联EOB列表查询
const QUERYBACKEOBLIST = (data) => {
return req.post(apis.queryBackEobList, data);
};
//待回款EOB列表查询
const QUERYEOBINFOLIST = (data) => {
return req.post(apis.queryEobInfoList, data);
};
//新建回款
const SAVEBACKMONEY = (data) => {
return req.post(apis.saveBackMoney, data);
};
//删除回款
const DELETEBACKMONEY = (data) => {
return req.post(apis.deleteBackMoney, data);
};
//EOB关联账单导出
const EOBRECEIPLISTEXPORT = (data={}) => {
return req.post(apis.eobReceipListExport, data, { responseType: "blob" });
};
//回销关联账单列表查询
const QUERYBACKRECEIPTLIST = (data) => {
return req.post(apis.queryBackReceiptList, data);
};
//回销账单列表查询
const QUERYBACKRECEIPTINFOLIST = (data) => {
return req.post(apis.queryReceiptInfoList, data);
};
// 删除已关联账单
const DELETERECEIPTRECORD = (data) => {
return req.post(apis.deleteReceiptRecord, data);
};
// 对象数组
export default {
QUERYEOBLIST,
QUERYEOBRECEIPTLIST,
QUERYEOBNEEDRECEIPTLIST,
SAVEEOBRECEIPTINFO,
DELEOBRECEIPTINFO,
QUERYBACKMONEYLIST,
QUERYBACKEOBLIST,
QUERYEOBINFOLIST,
SAVEBACKMONEY,
DELETEBACKMONEY,
EOBRECEIPLISTEXPORT,
QUERYBACKRECEIPTLIST,
QUERYBACKRECEIPTINFOLIST,
DELETERECEIPTRECORD
};
\ No newline at end of file
<template>
<div class="white_bg burt-container">
<!-- form -->
<a-form-model ref="form" layout="vertical" :model="form">
<a-row :gutter="30">
<a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司">
<a-select v-model="form.payorCode" placeholder="请选择保险公司" allowClear>
<a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode">
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB编号">
<a-input v-model="form.eobNo" placeholder="EOB编号"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="创建时间">
<a-range-picker format="YYYY-MM-DD" v-model="form.dateRange" :placeholder="['开始时间','结束时间']" @change="onSelectVisitTime" />
</a-form-model-item>
</a-col>
<a-col :md="24" class="none-label">
<a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="handlerSearch">
<Icon name="ssisearch_active" :size="14" />查询
</a-button>
<a-button class="mar-left10" type="primary" @click.stop="handlerReset">
<Icon name="ssireset" :size="14" />重置
</a-button>
<a-button class="mar-left10" type="primary" @click="addNewEvt">
<Icon name="ssiadd" :size="14" />新建回款
</a-button>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<!-- table -->
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false" >
<template slot="eobSts" slot-scope="text">
{{text==1?'待回款':'已回款'}}
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click.stop="editEvt(record, true)">修改</a-button>
<a-button type="link" class="success" @click.stop="editEvt(record)">查看</a-button>
<a-button v-if="record.backMoneyNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button>
</template>
</a-table>
<BurtPagination :pagination="pagination" @pageChange="getData" />
</div>
</template>
<script>
import BurtPagination from "@/components/CUSTOMER/pagation";
import moment from "moment";
const columns = [
{ title: "回款编号", dataIndex: "backMoneyNo", ellipsis: true, width: 150 },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 110 },
{ title: "回款金额(人民币)", dataIndex: "backAmountCny", ellipsis: true, width: 190,},
{ title: "余额", dataIndex: "residueBackAmount", ellipsis: true, width: 130,},
{ title: "EOB编号", dataIndex: "eobNos", ellipsis: true, width: 140 },
{ title: "EOB备注", dataIndex: "eobRemark", ellipsis: true, width: 140 },
{ title: "创建时间", dataIndex: "createDate", ellipsis: true, width: 110 },
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" },fixed: "right", width: "200px", align: "center"},
];
export default {
data() {
return {
columns,
form: {
payorCode: '',
eobNo: '',
dateRange: [], //创建时间范围
startDate: '',
endDate: ''
},
dataList: [],
companyOptions: [], //保险公司
pagination: {
pageNum: 1,
pageSize: 10,
total: 0,
},
};
},
components: {
BurtPagination,
},
created(){
this.getData();
this._getCompanyOptions();
},
methods: {
moment,
pageChange(pager) {
const { current } = pager;
this.pagination.pageNum = current;
this.getData();
},
// 重置
handlerReset() {
this.form = {
payorCode: '',
eobNo: '',
dateRange: [], //创建时间范围
startDate: '',
endDate: ''
}
},
// 获取保险公司下拉选项
_getCompanyOptions() {
this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.companyOptions = res.content || [];
});
},
// 选中就诊时间
onSelectVisitTime(date, dateString) {
this.form.startDate = dateString[0] + ''
this.form.endDate = dateString[1] + ''
},
handlerSearch() {
this.pagination.pageNum = 1;
this.getData();
},
getData() {
this.$apis.QUERYBACKMONEYLIST({
...this.form,
dateRange: undefined,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
})
.then((res) => {
if (res.returnCode == "0000") {
let content = res.content || {};
this.pagination.total = content.total || 0;
this.dataList = content.list || [];
} else {
this.$message.error(res.returnMsg);
}
});
},
//新建回款
addNewEvt(){
this.$router.push({
path: '/verification/collectionDetail',
query: {
isEdit: true
}
})
},
//编辑回款
editEvt(record, isEdit){
const { backMoneyNo } = record;
localStorage.setItem('backMoneyDataDetail', JSON.stringify(record));
this.$router.push({
path: '/verification/collectionDetail',
query: {
backMoneyNo,
isEdit
}
})
},
//删除记录
delRecord(index) {
this.$modal.confirm({
title: "删除",
content: "确定删除该条记录?",
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$apis.DELETEBACKMONEY({
backMoneyNo: this.dataList[index].backMoneyNo,
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("删除成功");
this.dataList.splice(index, 1);
} else {
this.$message.error(res.returnMsg);
}
});
},
onCancel: () => {},
});
}
},
};
</script>
<style lang="less" scoped>
.none-label {
text-align: right;
.ant-form-item-label {
opacity: 0;
}
}
.ant-btn .icon-class {
.mg-r(10);
}
.success.ant-btn-link {
color: #4cd964;
}
.danger.ant-btn-link {
color: #ff3b30;
}
</style>
<template>
<div class="white_bg burt-container">
<!-- form -->
<a-form-model ref="form" layout="vertical" :model="form">
<a-row :gutter="30">
<a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司">
<a-select
v-model="form.payorCode"
placeholder="请选择保险公司"
allowClear
>
<a-select-option
v-for="item in companyOptions"
:key="item.id"
:value="item.payorCode"
>
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB编号">
<a-input v-model="form.eobNo" placeholder="EOB编号" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="创建时间">
<a-range-picker
format="YYYY-MM-DD"
v-model="form.dateRange"
:placeholder="['开始时间', '结束时间']"
@change="onSelectVisitTime"
/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="状态">
<a-select
v-model="form.backStatus"
placeholder="请选择状态"
allowClear
>
<a-select-option
v-for="item in backStatusOptions"
:key="item.value"
:value="item.value"
>
{{ item.name }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="回款金额">
<a-input v-model="form.backAmountCny" placeholder="回款金额" />
</a-form-model-item>
</a-col>
<a-col :md="24" class="none-label">
<a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="handlerSearch">
<Icon name="ssisearch_active" :size="14" />查询
</a-button>
<a-button
class="mar-left10"
type="primary"
@click.stop="handlerReset"
>
<Icon name="ssireset" :size="14" />重置
</a-button>
<a-button class="mar-left10" type="primary" @click="addNewEvt">
<Icon name="ssiadd" :size="14" />新建回款
</a-button>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<!-- table -->
<a-table
:columns="columns"
:data-source="dataList"
:scroll="{ x: true }"
:pagination="false"
>
<template slot="eobSts" slot-scope="text">
{{ text == 1 ? "待回款" : "已回款" }}
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click.stop="editEvt(record, true)"
>修改</a-button
>
<a-button type="link" class="success" @click.stop="editEvt(record)"
>查看</a-button
>
<a-button
v-if="record.backMoneyNo"
type="link"
class="danger"
@click.stop="delRecord(index)"
>删除</a-button
>
</template>
</a-table>
<BurtPagination :pagination="pagination" @pageChange="getData" />
</div>
</template>
<script>
import BurtPagination from "@/components/CUSTOMER/pagation";
import moment from "moment";
const columns = [
{ title: "回款编号", dataIndex: "backMoneyNo", ellipsis: true, width: 150 },
{ title: "EOB编号", dataIndex: "eobNos", ellipsis: true, width: 140 },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 110 },
{
title: "回款金额(人民币)",
dataIndex: "backAmountCny",
ellipsis: true,
width: 190,
},
{
title: "未核销余额",
dataIndex: "residueBackAmount",
ellipsis: true,
width: 130,
},
{ title: "EOB备注", dataIndex: "eobRemark", ellipsis: true, width: 140 },
{ title: "创建时间", dataIndex: "createDate", ellipsis: true, width: 110 },
{ title: "状态", dataIndex: "backStatusStr", ellipsis: true, width: 90 },
{
title: "操作",
dataIndex: "operation",
scopedSlots: { customRender: "operation" },
fixed: "right",
width: "200px",
align: "center",
},
];
export default {
data() {
return {
columns,
form: {
payorCode: "",
eobNo: "",
dateRange: [], //创建时间范围
startDate: "",
endDate: "",
backStatus: "",
backAmountCny: "", // 回款金额
},
dataList: [],
companyOptions: [], //保险公司
pagination: {
pageNum: 1,
pageSize: 10,
total: 0,
},
backStatusOptions: [
{ name: '全部', value: '' },
{ name: '已结案', value: '1' },
{ name: '暂存', value: '0' }
]
};
},
components: {
BurtPagination,
},
created() {
this.getData();
this._getCompanyOptions();
},
methods: {
moment,
pageChange(pager) {
const { current } = pager;
this.pagination.pageNum = current;
this.getData();
},
// 重置
handlerReset() {
this.form = {
payorCode: "",
eobNo: "",
dateRange: [], //创建时间范围
startDate: "",
endDate: "",
backStatus: ""
};
},
// 获取保险公司下拉选项
_getCompanyOptions() {
this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.companyOptions = res.content || [];
});
},
// 选中就诊时间
onSelectVisitTime(date, dateString) {
this.form.startDate = dateString[0] + "";
this.form.endDate = dateString[1] + "";
},
handlerSearch() {
this.pagination.pageNum = 1;
this.getData();
},
getData() {
this.$apis
.QUERYBACKMONEYLIST({
...this.form,
dateRange: undefined,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
})
.then((res) => {
if (res.returnCode == "0000") {
let content = res.content || {};
this.pagination.total = content.total || 0;
this.dataList = content.list.map(item => {
item.backStatusStr = item.backStatus === '0' ? '暂存' : '已结案'
return item
}) || [];
} else {
this.$message.error(res.returnMsg);
}
});
},
//新建回款
addNewEvt() {
this.$router.push({
path: "/verification/collectionDetail",
query: {
isEdit: true,
},
});
},
//编辑回款
editEvt(record, isEdit) {
const { backMoneyNo } = record;
localStorage.setItem("backMoneyDataDetail", JSON.stringify(record));
console.log(isEdit, record.backStatus)
// 已结案状态,二次确认
if (isEdit && record.backStatus === "1") {
this.$modal.confirm({
title: "修改",
content: "处于已结案状态,是否确定修改该条记录?",
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$router.push({
path: "/verification/collectionDetail",
query: {
backMoneyNo,
isEdit,
},
});
},
onCancel: () => {},
});
return;
}
this.$router.push({
path: "/verification/collectionDetail",
query: {
backMoneyNo,
isEdit,
},
});
},
//删除记录
delRecord(index) {
let content = "确定删除该条记录?"
if(this.dataList[index].backStatus === "1") {
content = "处于已结案状态,确定删除该条记录?"
}
this.$modal.confirm({
title: "删除",
content,
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$apis
.DELETEBACKMONEY({
backMoneyNo: this.dataList[index].backMoneyNo,
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("删除成功");
this.dataList.splice(index, 1);
} else {
this.$message.error(res.returnMsg);
}
});
},
onCancel: () => {},
});
},
},
};
</script>
<style lang="less" scoped>
.none-label {
text-align: right;
.ant-form-item-label {
opacity: 0;
}
}
.ant-btn .icon-class {
.mg-r(10);
}
.success.ant-btn-link {
color: #4cd964;
}
.danger.ant-btn-link {
color: #ff3b30;
}
</style>
......@@ -6,7 +6,7 @@
<a-row :gutter="30">
<a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司">
<a-select v-model="form.payorCode" placeholder="请选择保险公司" allow-clear :disabled="!isEdit" @change="_getNewEOBList">
<a-select v-model="form.payorCode" placeholder="请选择保险公司" allow-clear :disabled="!isEdit" @change="changePayor">
<a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode">
{{ item.longName }}
</a-select-option>
......@@ -23,6 +23,11 @@
<a-input type="number" v-model="form.backAmountCny" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="可核销余额">
<a-input v-model="residueBackAmount" disabled />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="回款金额(美元)">
<a-input type="number" v-model="form.backAmountUsd" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
......@@ -38,6 +43,11 @@
<a-input v-model="form.eobNos" placeholder="请输入EOB编号" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="EOB备注">
<a-input v-model="form.eobRemark" placeholder="请输入EOB备注" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="上传附件">
<a-upload name="file" :multiple="false" :showUploadList="true" :disabled="!isEdit"
......@@ -49,7 +59,7 @@
</a-upload>
</a-form-model-item>
</a-col>
<a-col :md="24" :lg="7" class="none-label" v-if="isEdit">
<a-col :md="24" :lg="24" class="none-label" v-if="isEdit">
<a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="addNewEvt(0)">
<Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />暂存
......@@ -61,18 +71,53 @@
</a-col>
</a-row>
</a-form-model>
<!-- 已关联账单 -->
<template v-if="selectedRows.length > 0">
<div class="table-title">已关联账单</div>
<a-table class="table-content" :columns="selectedColumns" :data-source="selectedRows" :scroll="{ x: true }" :pagination="false">
</a-table>
</template>
<!-- table -->
<div class="table-title">账单列表</div>
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false" :rowKey="'id'"
:row-selection="{ selectedRowKeys: selectedRowKeys, onSelect: onSelectChange, onSelectAll: onSelectAll }">
</a-table>
<BurtPagination :pagination="pagination" @pageChange="pageChange" />
<div class="bill-content">
<!-- 已关联账单 -->
<template v-if="selectedRows.length > 0">
<div class="table-title">已关联账单</div>
<a-table class="table-content" :columns="selectedColumns" :data-source="selectedRows" :scroll="{ x: true, y: 200 }" :pagination="false">
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" class="danger" @click.stop="delRecord(record, index)">删除</a-button>
</template>
</a-table>
</template>
<!-- table -->
<template v-if="isEdit">
<a-row class="search-form">
<a-form-model ref="searchForm" layout="vertical" :model="searchForm">
<a-row :gutter="30">
<a-col :lg="6" :sm="12">
<a-form-model-item label="账单日期">
<a-range-picker format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="searchForm.billDate" :placeholder="['开始时间','结束时间']"/>
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="病历号">
<a-input v-model="searchForm.mrnNo" placeholder="请输入病历号" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="客户名称">
<a-input v-model="searchForm.patientName" placeholder="请输入客户名称" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<div class="btn-div mar-bottom10 none-label">
<a-button type="primary" @click="_getNewEOBList">
<Icon name="ssisearch_active" :size="14" />查询
</a-button>
</div>
</a-col>
</a-row>
</a-form-model>
</a-row>
<div class="table-title">账单列表</div>
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true, y: 200 }" :pagination="false" :rowKey="'id'"
:row-selection="{ selectedRowKeys: selectedRowKeys, onSelect: onSelectChange, onSelectAll: onSelectAll }">
</a-table>
<BurtPagination :pagination="pagination" @pageChange="pageChange" />
</template>
</div>
</div>
</template>
......@@ -94,7 +139,8 @@ export default {
backAmountCny: '',
backAmountUsd: '',
backExchangeRate: '',
eobNos: '' // EOB编号
eobNos: '', // EOB编号
eobRemark: '' // EOB备注
},
fileList: [], // 上传文件列表
dataList: [],
......@@ -102,7 +148,7 @@ export default {
companyOptions: [], //保险公司
pagination: {
pageNum: 1,
pageSize: 10,
pageSize: 5,
total: 0,
},
selectedRowKeys: [], // Check here to configure the default column
......@@ -112,6 +158,14 @@ export default {
backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }],
backAmount: [{ required: true, message: "请输入", trigger: "blur" }],
},
searchForm: {
billDate: [],
mrnNo: '', // 病历号
patientName: '', // 客户名字
},
savedStatus: false, //是否已保存
relatedList: []
};
},
mixins: [mixins],
......@@ -123,24 +177,40 @@ export default {
columns() {
const base = [
{ title: "账单编号", dataIndex: "receiptNo", ellipsis: true, width: 150 },
// { title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 195 },
{ title: "客户姓名",dataIndex: "patientName", ellipsis: true, width: 110 },
{ title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 195 },
{ title: "客户姓名",dataIndex: "patientName", ellipsis: true, width: 160 },
// { title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 160 },
{ title: "账单日期", dataIndex: "createDate", ellipsis: true, width: 150 },
{ title: "账单日期", dataIndex: "receiptDate", ellipsis: true, width: 150 },
{ title: "收银", dataIndex: "receiptTellerName", ellipsis: true, width: 120,},
{ title: "账单金额", dataIndex: "actualAmount", ellipsis: true, width: 150,},
{ title: "回款金额", dataIndex: "backAmount", ellipsis: true, width: 150},
{ title: "余额", dataIndex: "residueBackAmount", ellipsis: true, width: 150,},
{ title: "回款日期", dataIndex: "receiptDate", ellipsis: true, width: 150,},
{ title: "原始账单金额", dataIndex: "actualAmount", ellipsis: true, width: 150,},
{ title: "回款金额", dataIndex: "writeOffAmount", ellipsis: true, width: 150},
{ title: "未清余额", dataIndex: "residueBackAmount", ellipsis: true, width: 150,},
];
return base
},
selectedColumns() {
const base = JSON.parse(JSON.stringify(this.columns))
base[5] = { title: "回款金额", dataIndex: "backAmount", ellipsis: true, width: 150, customRender: (val, row) => {
return <a-input-number v-model={row.backAmount} allow-clear />
const changeAmount = this.changeAmount
base[6] = { title: "回款金额", dataIndex: "backAmount", ellipsis: true, width: 150, customRender: (val, row) => {
return <a-input-number v-model={row.backAmount} allow-clear disabled={!this.isEdit} onBlur={() => {changeAmount(row)}} />
} }
base[7] = { title: "未清余额", dataIndex: "residueBackAmount", ellipsis: true, width: 150, customRender: (val, row) => {
return Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0)
} }
base.splice(6, 0, { title: "余末金额", dataIndex: "currentReceiptAmount", ellipsis: true, width: 150,})
base.push({ title: "回款日期", dataIndex: "backDate", ellipsis: true, width: 150,})
if(this.isEdit) {
base.push({ title: "操作", dataIndex: "operation", fixed: 'right', width: 100, scopedSlots: { customRender: "operation" }})
}
return base
},
// 可核销余额
residueBackAmount() {
let totalMoney = Number(this.form.backAmountCny || 0)
this.selectedRows.forEach(item => {
totalMoney -= Number(item.backAmount)
})
return totalMoney
}
},
created(){
......@@ -171,6 +241,11 @@ export default {
},
methods: {
moment,
changeAmount(row) {
if((Number(row.actualAmount || 0) - Number(row.backAmount || 0)) < 0) {
this.$message.warning("录入账单回款金额大于账单金额");
}
},
onSelectChange(selectedRow, selected) {
if(selected) {
this.selectedRowKeys.push(selectedRow.id)
......@@ -179,6 +254,7 @@ export default {
const index = this.selectedRowKeys.findIndex(item => item === selectedRow.id)
this.selectedRowKeys.splice(index, 1)
this.selectedRows.splice(index, 1)
this._confirmDelReceipt([selectedRow])
}
},
onSelectAll(selected, selectedRows, changeRows) {
......@@ -192,12 +268,63 @@ export default {
this.selectedRowKeys.splice(findIndex, 1)
this.selectedRows.splice(findIndex, 1)
})
this._confirmDelReceipt(changeRows)
}
},
delRecord(record, index) {
this.selectedRowKeys.splice(index, 1)
this.selectedRows.splice(index, 1)
if(record.relationed) {
// 已经关联的调用接口删除
this._confirmDelReceipt([record])
}
},
_confirmDelReceipt(records) {
console.log(records)
if(!this.backMoneyNo) return;
const receiptVoList = records.filter(item => {
const findIndex = this.relatedList.findIndex(rowId => rowId === item.id)
return (findIndex > -1)
}).map(item => {
return {
id: item.id
}
})
console.log(receiptVoList)
if(receiptVoList.length === 0) return;
this.$apis.DELETERECEIPTRECORD({
backMoneyNo: this.backMoneyNo,
receiptVoList
})
.then((res) => {
if (res.returnCode == "0000") {
this._getNewEOBList()
} else {
this.$message.error(res.returnMsg);
}
});
},
// 修改保险公司
changePayor() {
if(this.selectedRowKeys.length > 0 && (this.form.id || this.savedStatus)) {
this.$modal.confirm({
title: "提示",
content: "是否解除已关联账单",
okText: "确认",
cancelText: "取消",
onOk: () => {
this.selectedRowKeys = []
this.selectedRows = []
},
onCancel: () => {},
});
}
this._getNewEOBList()
},
pageChange(pager) {
this.pagination = {
...this.pagination,
...pager
...pager,
}
this._getNewEOBList()
},
......@@ -219,7 +346,11 @@ export default {
if (res.returnCode == "0000") {
const list = res.content.list || [];
this.selectedRowKeys = list.map(d => d.id)
this.selectedRows = list
this.selectedRows = list.map(item => {
item.relationed = true
return item
})
this.relatedList = list.map(d => d.id)
} else {
this.$message.error(res.returnMsg);
}
......@@ -227,10 +358,15 @@ export default {
},
// 获取所有账单
_getNewEOBList(){
let billDate = this.searchForm.billDate || []
this.$apis.QUERYBACKRECEIPTINFOLIST({
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
payorCode: this.form.payorCode
backMoneyNo: this.backMoneyNo,
payorCode: this.form.payorCode,
...this.searchForm,
receiptEndDate: billDate[1] ? billDate[1] + ' 23:59:59' : undefined,
receiptStartDate: billDate[0] ? billDate[0] + ' 00:00:00' : undefined,
})
.then((res) => {
if (res.returnCode == "0000") {
......@@ -246,6 +382,16 @@ export default {
addNewEvt(backStatus){
return new Promise((resolve,reject)=>{
console.log(this.selectedRows)
if(!this.form.payorCode){
this.$message.warning("请选择保险公司");
reject();
return;
}
if(!this.form.backDate){
this.$message.warning("请选择回款日期");
reject();
return;
}
if(!this.form.backAmountCny){
this.$message.warning("请输入回款金额");
reject();
......@@ -269,7 +415,7 @@ export default {
const formData = {
...this.form,
receiptVoList,
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):'',
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD HH:mm:ss'):'',
backMoneyNo: this.backMoneyNo, //回款编号
backStatus // 0暂存 1结案
}
......@@ -287,9 +433,11 @@ export default {
.then((res) => {
if (res.returnCode == "0000") {
this.backMoneyNo = res.content;
this.savedStatus = true;
this.$message.success("成功");
this.selectedRowKeys = [];
this.getData();
this._getNewEOBList();
// this.$router.go(-1);
resolve();
......@@ -339,7 +487,9 @@ export default {
this.$forceUpdate();
})
}
},
// 导出账单列表
exportEvt() {}
},
};
</script>
......@@ -353,11 +503,17 @@ export default {
}
.table-title {
font-size: 15px;
margin: 12px 0 6px;
margin: 6px 0;
}
.table-content {
margin-bottom: 8px;
}
.search-form {
margin-top: 24px;
.ant-form .ant-form-item {
margin-bottom: 4px;
}
}
.ant-btn .icon-class {
.mg-r(10);
}
......@@ -367,4 +523,16 @@ export default {
.danger.ant-btn-link {
color: #ff3b30;
}
.burt-container {
display: flex;
flex-direction: column;
height: calc(100vh - 110px);
.bill-content {
flex: 1;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
padding-right: 12px;
}
}
</style>
<template>
<div class="white_bg burt-container">
<Goback title="EOB详情" />
<!-- form -->
<a-form-model ref="form" layout="vertical" :model="form">
<a-row :gutter="30">
<a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司">
<a-select v-model="form.payorCode" placeholder="请选择保险公司" allow-clear :disabled="!isEdit">
<a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode">
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB日期">
<a-date-picker format="YYYY年MM月DD日" v-model="form.eobDate" placeholder="选择日期" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB名称">
<a-input v-model="form.eobName" placeholder="请输入EOB名称" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB金额(人民币)">
<a-input type="number" v-model="form.eobAmountCny" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB金额(美元)">
<a-input type="number" v-model="form.eobAmountUsd" placeholder="请输入金额" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB状态">
<a-select v-model="form.eobSts" placeholder="请选择" allow-clear :disabled="!isEdit">
<a-select-option v-for="(item,i) in EOBStatusOptions" :key="i" :value="item.value">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="备注">
<a-input v-model="form.eobRemark" placeholder="请输入备注" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12" v-if="isEdit">
<a-form-model-item label="EOB文件">
<a-upload name="file" :multiple="false" :showUploadList="true"
:fileList="form.eobFile"
:customRequest="uploadEvt"
:remove="removeFile">
<a-button type="primary"> <Icon name="ssiupload" :size="18" />上传EOB文件 </a-button>
</a-upload>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="就诊日期起止">
<a-range-picker format="YYYY-MM-DD" v-model="form.visitTimeStart" :placeholder="['开始时间','结束时间']"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="病历号">
<a-input v-model="form.mrnNo" placeholder="请输入病历号" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="客户名称">
<a-input v-model="form.patientName" placeholder="请输入客户名称" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="24" :sm="24" class="none-label" v-if="isEdit">
<a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="addNewEvt">
<Icon :name="eobNo?'ssibaocun':'ssiadd'" :size="14" />{{eobNo?'保存EOB':'新建EOB'}}
</a-button>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<a-form-model ref="form" layout="vertical" :model="searchForm">
<a-row :gutter="30">
<a-col :lg="8" :sm="12">
<a-form-model-item label="就诊日期">
<a-range-picker format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="searchForm.visitTimeStart" :placeholder="['选择就诊开始日期', '选择就诊结束日期']" />
</a-form-model-item>
</a-col>
<a-col :lg="8" :sm="12">
<a-form-model-item label="病历号">
<a-input v-model="searchForm.mrnNo" placeholder="请输入病历号" allow-clear />
</a-form-model-item>
</a-col>
<a-col :lg="8" :sm="12">
<a-form-model-item label="客户名称">
<a-input v-model="searchForm.patientName" placeholder="请输入客户名称" allow-clear />
</a-form-model-item>
</a-col>
</a-row>
<div class="btn-div mar-bottom10 none-label">
<a-button type="primary" @click="handlerSearch">
<Icon name="ssisearch_active" :size="14" />查询
</a-button>
<a-button class="mar-left10" type="primary" @click="exportEvt">
<Icon name="ssidaochu" :size="14" />导出
</a-button>
<a-button class="mar-left10" type="primary" @click="addNewBill" v-if="isEdit">
<Icon :name="isEditNewEob?'ssibaocun':'ssiadd'" :size="14" />{{isEditNewEob? '保存账单': '添加账单'}}
</a-button>
</div>
</a-form-model>
<!-- table -->
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false"
:row-selection="isEditNewEob?{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }:null">
<template slot="claimsStatus" slot-scope="text">
<span>{{text | formatClaimsStatus}}</span>
</template>
<template slot="operation" slot-scope="text, record">
<a-button type="link" @click.stop="editEvt(record)">修改</a-button>
<!-- <a-button v-if="record.eobNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> -->
</template>
</a-table>
<BurtPagination :pagination="pagination" @pageChange="pageChange" />
<a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false"
okText="确定" cancelText="取消"
@ok="handleEditOK" @cancel="dialogShow = false">
<a-form-model ref="editForm" :model="editFormObj" :rules="editRules">
<a-row :gutter="30">
<a-col :lg="12" :sm="24">
<a-form-model-item label="理赔状态" prop="claimsStatus">
<a-select v-model="editFormObj.claimsStatus" placeholder="请选择理赔状态" allow-clear>
<a-select-option v-for="(item,i) in ClaimsStatusOptions" :key="i" :value="item.value">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="账单回款金额" prop="paidAmountEob">
<a-input v-model.trim="editFormObj.paidAmountEob" placeholder="账单回款金额" type="number" @change="changePaidAmount" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="未赔付金额" prop="refuseAmountEob">
<a-input v-model.trim="editFormObj.refuseAmountEob" placeholder="未赔付金额" type="number" />
</a-form-model-item>
</a-col>
<!-- eccs-1944 -->
<!-- <a-col :lg="12" :xs="24">
<a-form-model-item label="寄送备注" prop="sendRemark">
<a-textarea v-model.trim="editFormObj.sendRemark" placeholder="寄送备注" />
</a-form-model-item>
</a-col> -->
</a-row>
</a-form-model>
</a-modal>
</div>
</template>
<script>
import Goback from "@/components/CUSTOMER/goback";
import BurtPagination from "@/components/CUSTOMER/pagation";
import moment from "moment";
import {ClaimsStatusOptions,EOBStatusOptions} from '@/utils/utilsdictOptions.js'
import mixins from "@/mixins";
export default {
data() {
return {
dialogShow: false,
isEdit: false,
ClaimsStatusOptions,
EOBStatusOptions,
eobNo: '', //eob编号
form: {
eobDate: '',
payorCode: '',
eobName: '',
eobAmountCny: '',
eobAmountUsd: '',
eobSts: '',
eobRemark: '',
eobFile: []
},
dataList: [],
isEditNewEob: false, //是否在新建EOB
companyOptions: [], //保险公司
pagination: {
pageNum: 1,
pageSize: 10,
total: 0,
},
selectedRowKeys: [], // Check here to configure the default column
editFormObj: {
receiptNo: '',
claimsStatus: '',
paidAmountEob: '',
refuseAmountEob: ''
},
editRules: {
},
searchForm:{}
};
},
mixins: [mixins],
components: {
Goback,
BurtPagination,
},
computed: {
columns() {
const base = [
{ title: "账单编号", dataIndex: "receiptNo", ellipsis: true, width: 100 },
{ title: "客户姓名", dataIndex: "patientName", ellipsis: true, width: 85 },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 80 },
{ title: "就诊日期", dataIndex: "receiptDate", ellipsis: true, width: 110},
{ title: "理赔状态", dataIndex: "claimsStatus", ellipsis: true, width: 90, scopedSlots: { customRender: "claimsStatus" } },
{ title: "账单金额", dataIndex: "chargeAmount", ellipsis: true, width: 85 },
{ title: "折后金额", dataIndex: "actualAmount", ellipsis: true, width: 85 },
{ title: "自付金额", dataIndex: "selfpaidAmount", ellipsis: true, width: 85 },
{ title: "理赔金额", dataIndex: "eobPaidAmount", ellipsis: true, width: 85 },
{ title: "回款金额", dataIndex: "paidAmountEob", ellipsis: true, width: 85 },
{ title: "未清金额", dataIndex: "refuseAmountEob", ellipsis: true, width: 85 },
{ title: "保险公司欠费", dataIndex: "payorNoPaidAmount", ellipsis: true, width: 110, },
{ title: "个人欠费", dataIndex: "perNoPaidAmount", ellipsis: true, width: 85 },
{ title: "备注", dataIndex: "sendRemark", ellipsis: true, width: 120 },
];
if(this.eobNo && !this.isEditNewEob && this.isEdit){ // 编辑状态下已经保存的数据才可进行操作
return base.concat([
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" }, fixed: "right", width: "170px", align: "center"},
])
}
return base
}
},
created(){
const { eobNo, isEdit } = this.$route.query
this.eobNo = eobNo;
this.isEdit = !!isEdit;
this._getCompanyOptions();
if(this.eobNo){
let EobDataDetail = localStorage.getItem('EobDataDetail');
let dataDetail = EobDataDetail? JSON.parse(EobDataDetail): {};
if(dataDetail.eobFile){
dataDetail.eobFile = [
{
uid: Math.random()*10000,
name: dataDetail.eobFile.slice(dataDetail.eobFile.lastIndexOf('/')+1),
status: 'done',
url: dataDetail.eobFile,
}
]
}else{
dataDetail.eobFile = [];
}
this.form = dataDetail;
this.getData();
}
},
methods: {
moment,
onSelectChange(selectedRowKeys) {
let arr = [];
for(let i=0; i<selectedRowKeys.length; i++){
let idx = selectedRowKeys[i];
if(this.dataList[idx].eobNo){
this.$msg.destroy();
this.$message.warning('EOB编号已存在')
}else{
arr.push(idx);
}
}
this.selectedRowKeys = arr;
},
handlerSearch() {
this.pagination.pageNum = 1;
let visitTimeStart = this.searchForm.visitTimeStart || []
this.searchData = this.$lodash.cloneDeep({
...this.searchForm,
visitTimeEnd: visitTimeStart[1] ? visitTimeStart[1] + ' 23:59:59' : undefined,
visitTimeStart: visitTimeStart[0] ? visitTimeStart[0] + ' 00:00:00' : undefined,
});
if(this.isEditNewEob) { // 点击添加EOB之后 分页数据查询就应该调EOB数据
this._getNewEOBList()
return true;
}
this.getData();
},
//回款金额改变
moneyChange(){
this.editFormObj.refuseAmountEob = this.form.eobPaidAmount||0 - this.editFormObj.paidAmountEob||0;
},
// 获取保险公司下拉选项
_getCompanyOptions() {
this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.companyOptions = res.content || [];
});
},
// 分页
pageChange(pager) {
this.pagination = {
...this.pagination,
...pager
}
if(this.isEditNewEob) { // 点击添加EOB之后 分页数据查询就应该调EOB数据
this._getNewEOBList()
return true;
}
this.getData();
},
getData() {
this.$apis.QUERYEOBRECEIPTLIST({
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
eobNo: this.eobNo,
...this.searchData
})
.then((res) => {
if (res.returnCode == "0000") {
let content = res.content || {};
this.pagination.total = content.total || 0;
this.dataList = content.list || [];
} else {
this.$message.error(res.returnMsg);
}
});
},
//修改单条数据
editEvt(record) {
this.dialogShow = true;
this.$nextTick(()=>{
this.editFormObj = {
actualAmount: record.actualAmount, // 该条记录的折后金额
id: record.id,
receiptNo: record.receiptNo,
refuseAmountEob: record.refuseAmountEob || '',
claimsStatus: record.claimsStatus || "01",
paidAmountEob: record.paidAmountEob || record.actualAmount || "",
};
})
},
// 账单汇款金额输入改变 未赔付金额=账单金额-账单回款金额
changePaidAmount() {
this.editFormObj.refuseAmountEob = (this.editFormObj.actualAmount || 0) - (this.editFormObj.paidAmountEob || 0)
},
//编辑保存
handleEditOK() {
this.$refs.editForm.validate((valid) => {
if (valid) {
this.$apis.SAVEEOBRECEIPTINFO({
...this.form,
eobFile: this.form.eobFile.length>0? this.form.eobFile[0].url: '',
eobReceiptList: [this.editFormObj],
eobDate: this.form.eobDate?moment(this.form.eobDate).format('YYYY-MM-DD 00:00:00'):''
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("编辑成功");
this.dialogShow = false;
this.getData();
} else {
this.$message.error(res.returnMsg);
}
});
}
});
},
//删除记录
delRecord(index) {
this.$modal.confirm({
title: "删除",
content: "确定删除该条记录?",
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$apis.DELEOBRECEIPTINFO({
eobNo: this.dataList[index].eobNo,
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("删除成功");
this.dataList.splice(index, 1);
} else {
this.$message.error(res.returnMsg);
}
});
},
onCancel: () => {},
});
},
//导出
exportEvt(){
this.$apis.EOBRECEIPLISTEXPORT({
eobNo: this.eobNo
})
.then(res => {
let blob = new Blob([res.data], {
type:"application/vnd.ms-excel;charset=utf-8"
});
let url=window.URL.createObjectURL(blob);
let aLink=document.createElement("a");
aLink.style.display="none";
aLink.href=url;
aLink.setAttribute("download","EOB关联账单.xls");
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
window.URL.revokeObjectURL(url);
})
},
//添加账单
addNewBill(){
if(this.isEditNewEob){ //保存
this.addNewEvt()
.then(()=>{
this.isEditNewEob = false;
})
}else{ //查询所有未加入的账单
this.pagination.pageNum = 1;
this.isEditNewEob = true;
this._getNewEOBList();
}
},
_getNewEOBList() {
this.$apis.QUERYEOBNEEDRECEIPTLIST({
payorCode: this.form.payorCode,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
...this.searchData
})
.then((res) => {
if (res.returnCode == "0000") {
this.selectedRowKeys = [];
let content = res.content || {};
this.pagination.total = content.total || 0;
this.dataList = content.list || [];
} else {
this.$message.error(res.returnMsg);
}
});
},
//新建/保存EOB
addNewEvt(){
let visitTimeStart = this.form.visitTimeStart || []
let eobReceiptList = [];
this.dataList.forEach((item,index)=>{
if(this.selectedRowKeys.indexOf(index)!=-1){
eobReceiptList.push({
id: item.id,
receiptNo: item.receiptNo,
refuseAmountEob: item.refuseAmountEob,
paidSts: item.paidSts,
paidAmountEob: item.paidAmountEob,
})
}
})
let formData = {
...this.form,
eobFile: this.form.eobFile.length>0? this.form.eobFile[0].url: '',
eobReceiptList: eobReceiptList,
eobDate: this.form.eobDate?moment(this.form.eobDate).format('YYYY-MM-DD 00:00:00'):'',
eobNo: this.eobNo,
visitTimeEnd: visitTimeStart[1] ? moment(visitTimeStart[1]).format('YYYY-MM-DD') + ' 23:59:59' : undefined,
visitTimeStart: visitTimeStart[0] ? moment(visitTimeStart[0]).format('YYYY-MM-DD') + ' 00:00:00' : undefined,
}
return new Promise((resolve,reject)=>{
this.$apis.SAVEEOBRECEIPTINFO(formData)
.then((res) => {
if (res.returnCode == "0000") {
this.eobNo = res.content;
this.$message.success("成功");
this.selectedRowKeys = [];
this.getData();
resolve();
} else {
this.$message.error(res.returnMsg);
reject();
}
});
})
},
removeFile(){
return new Promise((resolve)=>{
this.form.eobFile = [];
resolve();
});
},
//上传
uploadEvt(fileData){
let formData = new FormData();
formData.append("file", fileData.file);
this.$apis.UPLOADIMG(formData)
.then((res)=>{
fileData.onSuccess();
let fileList = [
{
uid: Math.random()*10000,
name: res.title,
status: 'done',
url: res.url,
}
]
this.form.eobFile = fileList;
})
}
},
};
</script>
<style lang="less" scoped>
.none-label {
text-align: right;
.ant-form-item-label {
opacity: 0;
}
}
.btn-div{
}
.ant-btn .icon-class {
.mg-r(10);
}
.success.ant-btn-link {
color: #4cd964;
}
.danger.ant-btn-link {
color: #ff3b30;
}
</style>
<template>
<div class="white_bg burt-container">
<Goback title="EOB详情" />
<!-- form -->
<a-form-model ref="form" layout="vertical" :model="form">
<a-row :gutter="30">
<a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司">
<a-select v-model="form.payorCode" placeholder="请选择保险公司" allow-clear :disabled="!isEdit">
<a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode">
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB日期">
<a-date-picker format="YYYY年MM月DD日" v-model="form.eobDate" placeholder="选择日期" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB名称">
<a-input v-model="form.eobName" placeholder="请输入EOB名称" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB金额(人民币)">
<a-input type="number" v-model="form.eobAmountCny" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB金额(美元)">
<a-input type="number" v-model="form.eobAmountUsd" placeholder="请输入金额" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="EOB状态">
<a-select v-model="form.eobSts" placeholder="请选择" allow-clear :disabled="!isEdit">
<a-select-option v-for="(item,i) in EOBStatusOptions" :key="i" :value="item.value">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="备注">
<a-input v-model="form.eobRemark" placeholder="请输入备注" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12" v-if="isEdit">
<a-form-model-item label="EOB文件">
<a-upload name="file" :multiple="false" :showUploadList="true"
:fileList="form.eobFile"
:customRequest="uploadEvt"
:remove="removeFile">
<a-button type="primary"> <Icon name="ssiupload" :size="18" />上传EOB文件 </a-button>
</a-upload>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="就诊日期起止">
<a-range-picker format="YYYY-MM-DD" v-model="form.visitTimeStart" :placeholder="['开始时间','结束时间']"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="病历号">
<a-input v-model="form.mrnNo" placeholder="请输入病历号" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="客户名称">
<a-input v-model="form.patientName" placeholder="请输入客户名称" allow-clear :disabled="!isEdit"/>
</a-form-model-item>
</a-col>
<a-col :lg="24" :sm="24" class="none-label" v-if="isEdit">
<a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="addNewEvt">
<Icon :name="eobNo?'ssibaocun':'ssiadd'" :size="14" />{{eobNo?'保存EOB':'新建EOB'}}
</a-button>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<a-form-model ref="form" layout="vertical" :model="searchForm">
<a-row :gutter="30">
<a-col :lg="8" :sm="12">
<a-form-model-item label="就诊日期">
<a-range-picker format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="searchForm.visitTimeStart" :placeholder="['选择就诊开始日期', '选择就诊结束日期']" />
</a-form-model-item>
</a-col>
<a-col :lg="8" :sm="12">
<a-form-model-item label="病历号">
<a-input v-model="searchForm.mrnNo" placeholder="请输入病历号" allow-clear />
</a-form-model-item>
</a-col>
<a-col :lg="8" :sm="12">
<a-form-model-item label="客户名称">
<a-input v-model="searchForm.patientName" placeholder="请输入客户名称" allow-clear />
</a-form-model-item>
</a-col>
</a-row>
<div class="btn-div mar-bottom10 none-label">
<a-button type="primary" @click="handlerSearch">
<Icon name="ssisearch_active" :size="14" />查询
</a-button>
<a-button class="mar-left10" type="primary" @click="exportEvt">
<Icon name="ssidaochu" :size="14" />导出
</a-button>
<a-button class="mar-left10" type="primary" @click="addNewBill" v-if="isEdit">
<Icon :name="isEditNewEob?'ssibaocun':'ssiadd'" :size="14" />{{isEditNewEob? '保存账单': '添加账单'}}
</a-button>
</div>
</a-form-model>
<!-- table -->
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false"
:row-selection="isEditNewEob?{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }:null">
<template slot="claimsStatus" slot-scope="text">
<span>{{text | formatClaimsStatus}}</span>
</template>
<template slot="operation" slot-scope="text, record">
<a-button type="link" @click.stop="editEvt(record)">修改</a-button>
<!-- <a-button v-if="record.eobNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> -->
</template>
</a-table>
<BurtPagination :pagination="pagination" @pageChange="pageChange" />
<a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false"
okText="确定" cancelText="取消"
@ok="handleEditOK" @cancel="dialogShow = false">
<a-form-model ref="editForm" :model="editFormObj" :rules="editRules">
<a-row :gutter="30">
<a-col :lg="12" :sm="24">
<a-form-model-item label="理赔状态" prop="claimsStatus">
<a-select v-model="editFormObj.claimsStatus" placeholder="请选择理赔状态" allow-clear>
<a-select-option v-for="(item,i) in ClaimsStatusOptions" :key="i" :value="item.value">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="账单回款金额" prop="paidAmountEob">
<a-input v-model.trim="editFormObj.paidAmountEob" placeholder="账单回款金额" type="number" @change="changePaidAmount" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="未赔付金额" prop="refuseAmountEob">
<a-input v-model.trim="editFormObj.refuseAmountEob" placeholder="未赔付金额" type="number" />
</a-form-model-item>
</a-col>
<!-- eccs-1944 -->
<!-- <a-col :lg="12" :xs="24">
<a-form-model-item label="寄送备注" prop="sendRemark">
<a-textarea v-model.trim="editFormObj.sendRemark" placeholder="寄送备注" />
</a-form-model-item>
</a-col> -->
</a-row>
</a-form-model>
</a-modal>
</div>
</template>
<script>
import Goback from "@/components/CUSTOMER/goback";
import BurtPagination from "@/components/CUSTOMER/pagation";
import moment from "moment";
import {ClaimsStatusOptions,EOBStatusOptions} from '@/utils/utilsdictOptions.js'
import mixins from "@/mixins";
export default {
data() {
return {
dialogShow: false,
isEdit: false,
ClaimsStatusOptions,
EOBStatusOptions,
eobNo: '', //eob编号
form: {
eobDate: '',
payorCode: '',
eobName: '',
eobAmountCny: '',
eobAmountUsd: '',
eobSts: '',
eobRemark: '',
eobFile: []
},
dataList: [],
isEditNewEob: false, //是否在新建EOB
companyOptions: [], //保险公司
pagination: {
pageNum: 1,
pageSize: 10,
total: 0,
},
selectedRowKeys: [], // Check here to configure the default column
editFormObj: {
receiptNo: '',
claimsStatus: '',
paidAmountEob: '',
refuseAmountEob: ''
},
editRules: {
},
searchForm:{}
};
},
mixins: [mixins],
components: {
Goback,
BurtPagination,
},
computed: {
columns() {
const base = [
{ title: "账单编号", dataIndex: "receiptNo", ellipsis: true, width: 100 },
{ title: "客户姓名", dataIndex: "patientName", ellipsis: true, width: 85 },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 80 },
{ title: "就诊日期", dataIndex: "receiptDate", ellipsis: true, width: 110},
{ title: "理赔状态", dataIndex: "claimsStatus", ellipsis: true, width: 90, scopedSlots: { customRender: "claimsStatus" } },
{ title: "账单金额", dataIndex: "chargeAmount", ellipsis: true, width: 85 },
{ title: "折后金额", dataIndex: "actualAmount", ellipsis: true, width: 85 },
{ title: "自付金额", dataIndex: "selfpaidAmount", ellipsis: true, width: 85 },
{ title: "理赔金额", dataIndex: "eobPaidAmount", ellipsis: true, width: 85 },
{ title: "回款金额", dataIndex: "paidAmountEob", ellipsis: true, width: 85 },
{ title: "未清金额", dataIndex: "refuseAmountEob", ellipsis: true, width: 85 },
{ title: "保险公司欠费", dataIndex: "payorNoPaidAmount", ellipsis: true, width: 110, },
{ title: "个人欠费", dataIndex: "perNoPaidAmount", ellipsis: true, width: 85 },
{ title: "备注", dataIndex: "sendRemark", ellipsis: true, width: 120 },
];
if(this.eobNo && !this.isEditNewEob && this.isEdit){ // 编辑状态下已经保存的数据才可进行操作
return base.concat([
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" }, fixed: "right", width: "170px", align: "center"},
])
}
return base
}
},
created(){
const { eobNo, isEdit } = this.$route.query
this.eobNo = eobNo;
this.isEdit = !!isEdit;
this._getCompanyOptions();
if(this.eobNo){
let EobDataDetail = localStorage.getItem('EobDataDetail');
let dataDetail = EobDataDetail? JSON.parse(EobDataDetail): {};
if(dataDetail.eobFile){
dataDetail.eobFile = [
{
uid: Math.random()*10000,
name: dataDetail.eobFile.slice(dataDetail.eobFile.lastIndexOf('/')+1),
status: 'done',
url: dataDetail.eobFile,
}
]
}else{
dataDetail.eobFile = [];
}
this.form = dataDetail;
this.getData();
}
},
methods: {
moment,
onSelectChange(selectedRowKeys) {
let arr = [];
for(let i=0; i<selectedRowKeys.length; i++){
let idx = selectedRowKeys[i];
if(this.dataList[idx].eobNo){
this.$msg.destroy();
this.$message.warning('EOB编号已存在')
}else{
arr.push(idx);
}
}
this.selectedRowKeys = arr;
},
handlerSearch() {
this.pagination.pageNum = 1;
let visitTimeStart = this.searchForm.visitTimeStart || []
this.searchData = this.$lodash.cloneDeep({
...this.searchForm,
visitTimeEnd: visitTimeStart[1] ? visitTimeStart[1] + ' 23:59:59' : undefined,
visitTimeStart: visitTimeStart[0] ? visitTimeStart[0] + ' 00:00:00' : undefined,
});
if(this.isEditNewEob) { // 点击添加EOB之后 分页数据查询就应该调EOB数据
this._getNewEOBList()
return true;
}
this.getData();
},
//回款金额改变
moneyChange(){
this.editFormObj.refuseAmountEob = this.form.eobPaidAmount||0 - this.editFormObj.paidAmountEob||0;
},
// 获取保险公司下拉选项
_getCompanyOptions() {
this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.companyOptions = res.content || [];
});
},
// 分页
pageChange(pager) {
this.pagination = {
...this.pagination,
...pager
}
if(this.isEditNewEob) { // 点击添加EOB之后 分页数据查询就应该调EOB数据
this._getNewEOBList()
return true;
}
this.getData();
},
getData() {
this.$apis.QUERYEOBRECEIPTLIST({
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
eobNo: this.eobNo,
...this.searchData
})
.then((res) => {
if (res.returnCode == "0000") {
let content = res.content || {};
this.pagination.total = content.total || 0;
this.dataList = content.list || [];
} else {
this.$message.error(res.returnMsg);
}
});
},
//修改单条数据
editEvt(record) {
this.dialogShow = true;
this.$nextTick(()=>{
this.editFormObj = {
actualAmount: record.actualAmount, // 该条记录的折后金额
id: record.id,
receiptNo: record.receiptNo,
refuseAmountEob: record.refuseAmountEob || '',
claimsStatus: record.claimsStatus || "01",
paidAmountEob: record.paidAmountEob || record.actualAmount || "",
};
})
},
// 账单汇款金额输入改变 未赔付金额=账单金额-账单回款金额
changePaidAmount() {
this.editFormObj.refuseAmountEob = (this.editFormObj.actualAmount || 0) - (this.editFormObj.paidAmountEob || 0)
},
//编辑保存
handleEditOK() {
this.$refs.editForm.validate((valid) => {
if (valid) {
this.$apis.SAVEEOBRECEIPTINFO({
...this.form,
eobFile: this.form.eobFile.length>0? this.form.eobFile[0].url: '',
eobReceiptList: [this.editFormObj],
eobDate: this.form.eobDate?moment(this.form.eobDate).format('YYYY-MM-DD 00:00:00'):''
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("编辑成功");
this.dialogShow = false;
this.getData();
} else {
this.$message.error(res.returnMsg);
}
});
}
});
},
//删除记录
delRecord(index) {
this.$modal.confirm({
title: "删除",
content: "确定删除该条记录?",
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$apis.DELEOBRECEIPTINFO({
eobNo: this.dataList[index].eobNo,
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("删除成功");
this.dataList.splice(index, 1);
} else {
this.$message.error(res.returnMsg);
}
});
},
onCancel: () => {},
});
},
//导出
exportEvt(){
this.$apis.EOBRECEIPLISTEXPORT({
eobNo: this.eobNo
})
.then(res => {
let blob = new Blob([res.data], {
type:"application/vnd.ms-excel;charset=utf-8"
});
let url=window.URL.createObjectURL(blob);
let aLink=document.createElement("a");
aLink.style.display="none";
aLink.href=url;
aLink.setAttribute("download","EOB关联账单.xls");
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
window.URL.revokeObjectURL(url);
})
},
//添加账单
addNewBill(){
if(this.isEditNewEob){ //保存
this.addNewEvt()
.then(()=>{
this.isEditNewEob = false;
})
}else{ //查询所有未加入的账单
this.pagination.pageNum = 1;
this.isEditNewEob = true;
this._getNewEOBList();
}
},
_getNewEOBList() {
this.$apis.QUERYEOBNEEDRECEIPTLIST({
payorCode: this.form.payorCode,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
...this.searchData
})
.then((res) => {
if (res.returnCode == "0000") {
this.selectedRowKeys = [];
let content = res.content || {};
this.pagination.total = content.total || 0;
this.dataList = content.list || [];
} else {
this.$message.error(res.returnMsg);
}
});
},
//新建/保存EOB
addNewEvt(){
let visitTimeStart = this.form.visitTimeStart || []
let eobReceiptList = [];
this.dataList.forEach((item,index)=>{
if(this.selectedRowKeys.indexOf(index)!=-1){
eobReceiptList.push({
id: item.id,
receiptNo: item.receiptNo,
refuseAmountEob: item.refuseAmountEob,
paidSts: item.paidSts,
paidAmountEob: item.paidAmountEob,
})
}
})
let formData = {
...this.form,
eobFile: this.form.eobFile.length>0? this.form.eobFile[0].url: '',
eobReceiptList: eobReceiptList,
eobDate: this.form.eobDate?moment(this.form.eobDate).format('YYYY-MM-DD 00:00:00'):'',
eobNo: this.eobNo,
visitTimeEnd: visitTimeStart[1] ? moment(visitTimeStart[1]).format('YYYY-MM-DD') + ' 23:59:59' : undefined,
visitTimeStart: visitTimeStart[0] ? moment(visitTimeStart[0]).format('YYYY-MM-DD') + ' 00:00:00' : undefined,
}
return new Promise((resolve,reject)=>{
this.$apis.SAVEEOBRECEIPTINFO(formData)
.then((res) => {
if (res.returnCode == "0000") {
this.eobNo = res.content;
this.$message.success("成功");
this.selectedRowKeys = [];
this.getData();
resolve();
} else {
this.$message.error(res.returnMsg);
reject();
}
});
})
},
removeFile(){
return new Promise((resolve)=>{
this.form.eobFile = [];
resolve();
});
},
//上传
uploadEvt(fileData){
let formData = new FormData();
formData.append("file", fileData.file);
this.$apis.UPLOADIMG(formData)
.then((res)=>{
fileData.onSuccess();
let fileList = [
{
uid: Math.random()*10000,
name: res.title,
status: 'done',
url: res.url,
}
]
this.form.eobFile = fileList;
})
}
},
};
</script>
<style lang="less" scoped>
.none-label {
text-align: right;
.ant-form-item-label {
opacity: 0;
}
}
.btn-div{
}
.ant-btn .icon-class {
.mg-r(10);
}
.success.ant-btn-link {
color: #4cd964;
}
.danger.ant-btn-link {
color: #ff3b30;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment