Commit 7b5594b4 authored by 朱彩云's avatar 朱彩云

Merge branch 'func_eccs_2250' into 'master'

【商保系统】-回款管理-账单列表和已关联账单分tab展示支持搜索;回款单关联账单以及账单报表,增加备注列;其它优化项

See merge request !45
parents 4535ff39 fc72fcae
import Vue from "vue"; import Vue from "vue";
import { import {
Row, Row,
Col, Col,
menu, menu,
dropdown, dropdown,
Table, Table,
message, message,
pagination, pagination,
FormModel, FormModel,
Select, Select,
DatePicker, DatePicker,
Input, Input,
InputNumber, InputNumber,
Radio, Radio,
upload, upload,
Button, Button,
notification, notification,
popconfirm, popconfirm,
Modal, Modal,
modal, modal,
Spin, Spin,
Collapse, Collapse,
Tabs, Tabs,
Tooltip Tooltip,
} from "ant-design-vue"; Popover,
Empty
export default () => { } from "ant-design-vue";
let els = [
Row, export default () => {
Col, let els = [
menu, Row,
dropdown, Col,
Table, menu,
message, dropdown,
pagination, Table,
FormModel, message,
Select, pagination,
DatePicker, FormModel,
Input, Select,
InputNumber, DatePicker,
Radio, Input,
upload, InputNumber,
Button, Radio,
notification, upload,
popconfirm, Button,
Modal, notification,
modal, popconfirm,
Spin, Modal,
Collapse, modal,
Tabs, Spin,
Tooltip Collapse,
]; Tabs,
// 注册 Tooltip,
els.forEach((item) => { Popover,
Vue.use(item); Empty
}); ];
// 全局提示 // 注册
Vue.prototype.$msg = notification; els.forEach((item) => {
Vue.prototype.$message = message; Vue.use(item);
Vue.prototype.$modal = Modal; });
}; // 全局提示
Vue.prototype.$msg = notification;
Vue.prototype.$message = message;
Vue.prototype.$modal = Modal;
};
<template> <template>
<!--分页--> <!--分页-->
<div class="flex my-pagination" v-if="pagination.total > pagination.pageSize"> <div class="flex my-pagination" v-if="pagination.total > pagination.pageSize">
<a-pagination <a-pagination
v-model="pagination.pageNum" v-model="pagination.pageNum"
:total="pagination.total" :total="pagination.total"
:page-size="pagination.pageSize" :page-size="pagination.pageSize"
:item-render="itemRender" :item-render="itemRender"
@change="pageChange" @change="pageChange"
/> />
<a-input <a-input
v-model.trim="jumpPage" v-model.trim="jumpPage"
class="jump-page" class="jump-page"
type="number" type="number"
:min="0" :min="0"
@blur="inputPageChange" @blur="inputPageChange"
/> />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
//分页器 //分页器
pagination: { pagination: {
default: {}, default: {},
}, },
}, },
data() { data() {
return { return {
//跳转到第几页 //跳转到第几页
jumpPage: "", jumpPage: "",
}; };
}, },
methods: { methods: {
//自定义分页 //自定义分页
itemRender(current, type, originalElement) { itemRender(current, type, originalElement) {
if (type === "prev") { if (type === "prev") {
return <li class="page pre">上一页</li>; return <li class="page pre">上一页</li>;
} else if (type === "next") { } else if (type === "next") {
return <li class="page next">下一页</li>; return <li class="page next">下一页</li>;
} else if (type === "page") { } else if (type === "page") {
//当前页面 //当前页面
if (current == this.pagination.pageNum) { if (current == this.pagination.pageNum) {
return ( return (
<div class="cur-page page"> <div class="cur-page page">
<span class="cur">{current}</span>/ <span class="cur">{current}</span>/
<span class="total"> <span class="total">
{Math.ceil(this.pagination.total / this.pagination.pageSize)} {Math.ceil(this.pagination.total / this.pagination.pageSize)}
</span> </span>
</div> </div>
); );
} else { } else {
return null; return null;
} }
} else if (type == "jump-prev") { } else if (type == "jump-prev") {
return null; return null;
} else if (type == "jump-next") { } else if (type == "jump-next") {
return null; return null;
} }
return originalElement; return originalElement;
}, },
//跳转页面 //跳转页面
inputPageChange() { inputPageChange() {
this.jumpPage = parseInt(this.jumpPage); this.jumpPage = parseInt(this.jumpPage);
let pages = Math.ceil(this.pagination.total / this.pagination.pageSize); let pages = Math.ceil(this.pagination.total / this.pagination.pageSize);
this.jumpPage = this.jumpPage < 0 ? 0 : this.jumpPage; this.jumpPage = this.jumpPage < 0 ? 0 : this.jumpPage;
this.jumpPage = this.jumpPage > pages ? pages : this.jumpPage; this.jumpPage = this.jumpPage > pages ? pages : this.jumpPage;
this.pagination.pageNum = this.jumpPage; this.pagination.pageNum = this.jumpPage;
this.$emit("pageChange", { pageNum: this.jumpPage }); this.$emit("pageChange", { pageNum: this.jumpPage });
}, },
//改变分页 //改变分页
pageChange(pager) { pageChange(pager) {
this.pagination.pageNum = pager; this.pagination.pageNum = pager;
this.$emit("pageChange", { pageNum: pager }); this.$emit("pageChange", { pageNum: pager });
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.my-pagination { .my-pagination {
justify-content: flex-end; justify-content: flex-end;
margin-top: 33px; margin-top: 33px;
.page { .page {
width: 80px; width: 80px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
background: #f8fafb; background: #f8fafb;
font-weight: 400; font-weight: 400;
color: #252631; color: #252631;
&.cur-page { &.cur-page {
background: transparent; background: transparent;
} }
span { span {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
&.cur { &.cur {
color: #4d7cfe; color: #4d7cfe;
} }
} }
} }
.jump-page { .jump-page {
width: 80px; width: 80px;
margin-left: 30px; margin-left: 30px;
height: 36px; height: 36px;
text-align: center; text-align: center;
} }
} }
::v-deep .ant-pagination-jump-prev, ::v-deep .ant-pagination-jump-prev,
::v-deep .ant-pagination-jump-next { ::v-deep .ant-pagination-jump-next {
display: none !important; display: none !important;
} }
</style> </style>
...@@ -90,263 +90,280 @@ ...@@ -90,263 +90,280 @@
<!-- <a-button>更新数据</a-button> --> <!-- <a-button>更新数据</a-button> -->
<!-- <a-button class="mar-left10" type="primary" @click="addNewCharge"> <!-- <a-button class="mar-left10" type="primary" @click="addNewCharge">
<Icon name="ssiadd" :size="14" />新建预授权</a-button> --> <Icon name="ssiadd" :size="14" />新建预授权</a-button> -->
<a-button class="mar-left10" type="primary" @click="handlerReset"> <a-button class="mar-left10" type="primary" @click="handlerReset">
<Icon name="ssireset" :size="14" />重置 <Icon name="ssireset" :size="14" />重置
</a-button> </a-button>
<a-button class="mar-left10" type="primary" @click="handlerSearch"> <a-button class="mar-left10" type="primary" @click="handlerSearch">
<Icon name="ssisearch_active" :size="14" />查询 <Icon name="ssisearch_active" :size="14" />查询
</a-button> </a-button>
<a-button class="mar-left10" type="primary" @click="exportExcel"> <a-button class="mar-left10" type="primary" @click="exportExcel">
<Icon name="ssidaochu" :size="14" />导出 <Icon name="ssidaochu" :size="14" />导出
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
<!-- table --> <!-- table -->
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false"> <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false">
<template slot="index" slot-scope="text, record, index"> <template slot="index" slot-scope="text, record, index">
{{ index + 1 }} {{ index + 1 }}
</template> </template>
<template slot="operation" slot-scope="record"> <template slot="operation" slot-scope="record">
<!-- <a-button type="link" @click.stop="receiptEvt(record)">结算</a-button> --> <!-- <a-button type="link" @click.stop="receiptEvt(record)">结算</a-button> -->
<a-button type="link" class="success" @click.stop="detailEvt(record)">查看</a-button> <a-button type="link" class="success" @click.stop="detailEvt(record)">查看</a-button>
<!-- <a-popconfirm title="你确定要关闭吗?" ok-text="确定" cancel-text="取消" @confirm="deleteData" > <!-- <a-popconfirm title="你确定要关闭吗?" ok-text="确定" cancel-text="取消" @confirm="deleteData" >
<a-button type="link" class="danger">删除</a-button> <a-button type="link" class="danger">删除</a-button>
</a-popconfirm> --> </a-popconfirm> -->
</template> </template>
<template slot="isSend" slot-scope="text"> <template slot="isSend" slot-scope="text">
{{text == 'Y' ? '' : text == 'N' ? '' : ''}} {{ text == 'Y' ? '' : text == 'N' ? '' : '' }}
</template> </template>
<template slot="isEob" slot-scope="text"> <template slot="isEob" slot-scope="text">
{{text == 'Y' ? '' : text == 'N' ? '' : ''}} {{ text == 'Y' ? '' : text == 'N' ? '' : '' }}
</template> </template>
<template slot="isEobBack" slot-scope="text"> <template slot="isEobBack" slot-scope="text">
{{text == 'Y' ? '' : text == 'N' ? '' : ''}} {{ text == 'Y' ? '' : text == 'N' ? '' : '' }}
</template> </template>
<template slot="status" slot-scope="text"> <template slot="status" slot-scope="text">
<span :style="{color: text == 2 ? 'red' : ''}">{{ text==1?'有效':text==2?'无效':'' }}</span> <span :style="{ color: text == 2 ? 'red' : '' }">{{ text == 1 ? '有效' : text == 2 ? '无效' : '' }}</span>
</template> </template>
</a-table> <template slot="redText" slot-scope="text">
<!--分页--> <span style="color: red">{{ text }}</span>
<BurtPagination :pagination="pagination" @pageChange="_getChargeList" /> </template>
</div> </a-table>
<!--分页-->
<BurtPagination :pagination="pagination" @pageChange="_getChargeList" />
</div>
</template> </template>
<script> <script>
import BurtPagination from "@/components/CUSTOMER/pagation"; import BurtPagination from '@/components/CUSTOMER/pagation';
import { mapState } from "vuex" import { mapState } from 'vuex';
import moment from "moment"; import moment from 'moment';
import { receiptTypeOptions } from '@/utils/utilsdictOptions.js'; import { receiptTypeOptions } from '@/utils/utilsdictOptions.js';
import { exportFile } from '@/utils/index'; import { exportFile } from '@/utils/index';
export default { export default {
data() { data() {
const columns = [ const columns = [
{ title: "序号", dataIndex: "index", key:"index",align:'center', width: 80,scopedSlots: { customRender: "index" }}, {
{ title: "收费时间", dataIndex: "receiptDate", width: 180 }, title: '序号',
{ title: "账单编号", dataIndex: "receiptNo", width: 180 }, dataIndex: 'index',
{ title: "账单类型", dataIndex: "receiptTypeStr", width: 130 }, key: 'index',
{ title: "状态", dataIndex: "status", width: 130,scopedSlots: { customRender: "status" } }, align: 'center',
{ title: "病历号", dataIndex: "mrnNo",width: 180}, width: 80,
{ title: "客户姓名",dataIndex: "patientName",width: 120,}, scopedSlots: { customRender: 'index' }
{ title: "保险公司", dataIndex: "payorName", width: 200 }, },
{ title: "保险卡", dataIndex: "cardNo", width: 200 }, { title: '收费时间', dataIndex: 'receiptDate', width: 180 },
{ title: "客户生日", dataIndex: "birthday", width: 200 }, { title: '账单编号', dataIndex: 'receiptNo', width: 180 },
{ title: "就诊医生", dataIndex: "doctorName", width: 150 }, { title: '账单类型', dataIndex: 'receiptTypeStr', width: 130 },
{ title: "是否已关联寄送单", dataIndex: "isSend", width: 180,scopedSlots: { customRender: "isSend" } }, { title: '状态', dataIndex: 'status', width: 130, scopedSlots: { customRender: 'status' } },
{ title: "是否已回款", dataIndex: "isEobBack", width: 180,scopedSlots: { customRender: "isEobBack" } }, { title: '病历号', dataIndex: 'mrnNo', width: 180 },
{ title: "应收金额", dataIndex: "chargeAmount", width: 180 }, { title: '客户姓名', dataIndex: 'patientName', width: 120 },
{ title: "折扣(%)", dataIndex: "discountAmount", width: 180 }, { title: '保险公司', dataIndex: 'payorName', width: 200 },
{ title: "减免金额", dataIndex: "reduceAmount", width: 180 }, { title: '保险卡', dataIndex: 'cardNo', width: 200 },
{ title: "应付金额", dataIndex: "payableAmount", width: 180 }, { title: '客户生日', dataIndex: 'birthday', width: 200 },
{ title: "客户自付", dataIndex: "selfpaidAmount", width: 180 }, { title: '就诊医生', dataIndex: 'doctorName', width: 150 },
{ title: "理赔金额", dataIndex: "actualAmount", width: 180 }, { title: '是否已关联寄送单', dataIndex: 'isSend', width: 180, scopedSlots: { customRender: 'isSend' } },
{ title: "保险已支付", dataIndex: "backAmount", width: 180 }, { title: '是否已回款', dataIndex: 'isEobBack', width: 180, scopedSlots: { customRender: 'isEobBack' } },
{ title: "保险欠费", dataIndex: "insuranceArrearsAmount", width: 180 }, { title: '应收金额', dataIndex: 'chargeAmount', width: 180 },
{ title: "个人欠费", dataIndex: "arrearsAmount", width: 180 }, { title: '折扣(%)', dataIndex: 'discountAmount', width: 180 },
{ title: "未清余额", dataIndex: "residueBackAmount", width: 180 }, { title: '减免金额', dataIndex: 'reduceAmount', width: 180 },
{ title: "账龄", dataIndex: "diffDay", width: 180 }, { title: '应付金额', dataIndex: 'payableAmount', width: 180 },
{ title: "操作", key: "operation", width: "175px",fixed: "right",scopedSlots: { customRender: "operation" }, align: "center"}, { title: '客户自付', dataIndex: 'selfpaidAmount', width: 180 },
]; { title: '理赔金额', dataIndex: 'actualAmount', width: 180 },
return { { title: '保险已支付', dataIndex: 'backAmount', width: 180 },
columns, { title: '保险欠费', dataIndex: 'insuranceArrearsAmount', width: 180 },
receiptTypeOptions, { title: '个人欠费', dataIndex: 'arrearsAmount', width: 180, scopedSlots: { customRender: 'redText' } },
form: {}, { title: '备注', dataIndex: 'remark', width: 200, scopedSlots: { customRender: 'redText' } },
pageForm: { { title: '未清余额', dataIndex: 'residueBackAmount', width: 180 },
doctorCode: "", { title: '账龄', dataIndex: 'diffDay', width: 180 },
patientName: "", {
mrnNo: "", title: '操作',
paymentCode: "", key: 'operation',
payorIds: [], width: '175px',
visitTimeEnd: "", fixed: 'right',
visitTimeStart: "", scopedSlots: { customRender: 'operation' },
receiptType: "", align: 'center'
receiptNo: "" }
}, ];
patientTypeOptions: [ return {
{ columns,
name: "商保", receiptTypeOptions,
code: 1, form: {},
}, pageForm: {
], //客户类型 doctorCode: '',
companyOptions: [], //保险公司 patientName: '',
doctorOptions: [], //就诊医生 mrnNo: '',
paymentOptions: [ paymentCode: '',
{ payorIds: [],
name: "商保", visitTimeEnd: '',
code: 1, visitTimeStart: '',
}, receiptType: '',
], //支付方式 receiptNo: ''
dataList: [], },
pagination: { patientTypeOptions: [
pageNum: 1, {
pageSize: 10, name: '商保',
total: 0, code: 1
}, }
receiptTypeDict: { ], //客户类型
'1': '收费', companyOptions: [], //保险公司
'2': '退费' doctorOptions: [], //就诊医生
}, paymentOptions: [
statusOptions: [ {
{ name: '商保',
name: '无效', code: 1
code:2 }
}, ], //支付方式
{ dataList: [],
name: '有效', pagination: {
code: 1 pageNum: 1,
} pageSize: 10,
] total: 0
}; },
}, receiptTypeDict: {
components: { 1: '收费',
BurtPagination, 2: '退费'
}, },
computed: { statusOptions: [
...mapState({ {
userInfo: (state) => state.common.userInfo name: '无效',
}) code: 2
}, },
created() { {
this._getCompanyOptions(); name: '有效',
this._getDoctorListNoPage();//获取医生下拉选项 code: 1
}, }
methods: { ]
moment, };
// 选择框筛选 },
filterCode(input, option) { components: {
return ( BurtPagination
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
}, },
// 获取列表数据 computed: {
_getChargeList() { ...mapState({
const data = { userInfo: (state) => state.common.userInfo
...this.pageForm, })
...this.pagination, },
}; created() {
this.$apis.GETCHARGELIST(data).then((res) => { this._getCompanyOptions();
let content = res.content || {}; this._getDoctorListNoPage(); //获取医生下拉选项
this.dataList = content.list.map(item => { },
item.receiptTypeStr = this.receiptTypeDict[item.receiptType] || '' methods: {
return item moment,
}) || []; // 选择框筛选
this.pagination.total = content.total || 0; filterCode(input, option) {
}); return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
}, },
// 获取保险公司下拉选项 // 获取列表数据
_getCompanyOptions() { _getChargeList() {
this.$apis.GETCOMPANYOPTIONS().then((res) => { const data = {
this.companyOptions = res.content || []; ...this.pageForm,
}); ...this.pagination
}, };
// 获取看诊医生下拉选项 this.$apis.GETCHARGELIST(data).then((res) => {
_getDoctorListNoPage(){ let content = res.content || {};
this.$apis.GETDOCTORlISTNOPAGE({"providerId": this.userInfo.providerId}).then((res) => { this.dataList =
if (res.returnCode === "0000") { content.list.map((item) => {
this.doctorOptions = res.content || []; item.receiptTypeStr = this.receiptTypeDict[item.receiptType] || '';
}else{ return item;
this.$message.success(res.returnMsg); }) || [];
} this.pagination.total = content.total || 0;
}); });
}, },
// 选中就诊时间 // 获取保险公司下拉选项
onSelectVisitTime(date, dateString) { _getCompanyOptions() {
this.form.visitTimeStart = dateString[0] + ' 00:00:00' this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.form.visitTimeEnd = dateString[1] + ' 23:59:59' this.companyOptions = res.content || [];
console.log(date, dateString); });
}, },
// 重置 // 获取看诊医生下拉选项
handlerReset() { _getDoctorListNoPage() {
this.form = {} this.$apis.GETDOCTORlISTNOPAGE({ providerId: this.userInfo.providerId }).then((res) => {
}, if (res.returnCode === '0000') {
//查看 this.doctorOptions = res.content || [];
detailEvt(record) { } else {
localStorage.setItem('chargeQueryDetail', JSON.stringify(record)); this.$message.success(res.returnMsg);
const { receiptNo } = record; }
this.$router.push({ });
name: "chargeQueryDetail", },
query: { receiptNo }, // 选中就诊时间
}); onSelectVisitTime(date, dateString) {
}, this.form.visitTimeStart = dateString[0] + ' 00:00:00';
//账单结算 this.form.visitTimeEnd = dateString[1] + ' 23:59:59';
receiptEvt(record){ console.log(date, dateString);
this.$modal.confirm({ },
title: "结算", // 重置
content: "确定结算该账单?", handlerReset() {
okText: "确定", this.form = {};
cancelText: "取消", },
onOk: () => { //查看
this.$apis.RECEIPTSETTLEMENT({ detailEvt(record) {
id: record.id localStorage.setItem('chargeQueryDetail', JSON.stringify(record));
}).then((res) => { const { receiptNo } = record;
if (res.returnCode === "0000") { this.$router.push({
this.$message.success('结算成功'); name: 'chargeQueryDetail',
this._getChargeList(); query: { receiptNo }
}else{ });
this.$message.error(res.returnMsg); },
} //账单结算
}); receiptEvt(record) {
}, this.$modal.confirm({
}); title: '结算',
}, content: '确定结算该账单?',
handlerSearch() { okText: '确定',
this.$refs.form.validate((valid) => { cancelText: '取消',
if (!valid) { onOk: () => {
return false; this.$apis
} .RECEIPTSETTLEMENT({
this.pagination.pageNum = 1; id: record.id
this.pageForm = this.$lodash.cloneDeep({...this.form, dateRange: undefined}); })
this._getChargeList(); .then((res) => {
}); if (res.returnCode === '0000') {
}, this.$message.success('结算成功');
// 新建账单信息 this._getChargeList();
addNewCharge() { } else {
// this.$router.push("/customer/edit"); this.$message.error(res.returnMsg);
}, }
});
}
});
},
handlerSearch() {
this.$refs.form.validate((valid) => {
if (!valid) {
return false;
}
this.pagination.pageNum = 1;
this.pageForm = this.$lodash.cloneDeep({ ...this.form, dateRange: undefined });
this._getChargeList();
});
},
// 新建账单信息
addNewCharge() {
// this.$router.push("/customer/edit");
},
//导出报表 //导出报表
exportExcel(){ exportExcel() {
let filter = { let filter = {
...this.form, ...this.form
} };
this.$apis.RceiptListReport(filter).then(res => { this.$apis.RceiptListReport(filter).then((res) => {
exportFile(res, '账单报表.xls'); exportFile(res, '账单报表.xls');
}) });
} }
}, }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.none-label { .none-label {
text-align: right; text-align: right;
.ant-form-item-label { .ant-form-item-label {
opacity: 0; opacity: 0;
} }
} }
.ant-btn .icon-class { .ant-btn .icon-class {
.mg-r(10); .mg-r(10);
} }
</style> </style>
<template> <template>
<!-- 收费查询-账单查询 --> <!-- 收费查询-账单查询 -->
<div class="white_bg burt-container custom-info"> <div class="white_bg burt-container custom-info">
<!-- form --> <!-- form -->
<a-form-model ref="form" layout="vertical" :model="form"> <a-form-model ref="form" layout="vertical" :model="form">
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :xl="4" :lg="6" :sm="12"> <a-col :xl="4" :lg="6" :sm="12">
<a-form-model-item label="保险公司"> <a-form-model-item label="保险公司">
<a-select v-model="form.payorCode" placeholder="请选择" show-search allowClear :filterOption="filterCode"> <a-select v-model="form.payorCode" placeholder="请选择" show-search allowClear :filterOption="filterCode">
<a-select-option v-for="item in companyOptions" :key="item.payorCode" :value="item.payorCode"> <a-select-option v-for="item in companyOptions" :key="item.payorCode" :value="item.payorCode">
{{ item.longName }} {{ item.longName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xl="4" :lg="6" :sm="12"> <a-col :xl="4" :lg="6" :sm="12">
<a-form-model-item label="病案号"> <a-form-model-item label="病案号">
<a-input v-model="form.mrnNo" placeholder="请输入" allow-clear /> <a-input v-model="form.mrnNo" placeholder="请输入" allow-clear />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xl="4" :lg="6" :sm="12"> <a-col :xl="4" :lg="6" :sm="12">
<a-form-model-item label="客户名称"> <a-form-model-item label="客户名称">
<a-input v-model="form.patientName" placeholder="请输入" allow-clear /> <a-input v-model="form.patientName" placeholder="请输入" allow-clear />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xl="6" :lg="6" :sm="12"> <a-col :xl="6" :lg="6" :sm="12">
<a-form-model-item label="账单起止日期"> <a-form-model-item label="账单起止日期">
<a-range-picker <a-range-picker
format="YYYY-MM-DD" format="YYYY-MM-DD"
format-value="YYYY-MM-DD" format-value="YYYY-MM-DD"
v-model="billRange" v-model="billRange"
:placeholder="['开始时间','结束时间']" :placeholder="['开始时间', '结束时间']"
@change="onSelectBillTime" @change="onSelectBillTime"
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xl="6" :lg="6" :sm="12"> <a-col :xl="6" :lg="6" :sm="12">
<a-form-model-item label="回款起止日期"> <a-form-model-item label="回款起止日期">
<a-range-picker <a-range-picker
format="YYYY-MM-DD" format="YYYY-MM-DD"
format-value="YYYY-MM-DD" format-value="YYYY-MM-DD"
v-model="returnRange" v-model="returnRange"
:placeholder="['开始时间','结束时间']" :placeholder="['开始时间', '结束时间']"
@change="onSelectReturnTime" @change="onSelectReturnTime"
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xl="10" :lg="10" :sm="12" class="none-label"> <a-col :xl="10" :lg="10" :sm="12" class="none-label">
<a-form-model-item label="button"> <a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="handlerReset"> <a-button class="mar-left10" type="primary" @click="handlerReset">
<Icon name="ssireset" :size="14" />重置 <Icon name="ssireset" :size="14" />重置
</a-button> </a-button>
<a-button class="mar-left10" type="primary" @click="handlerSearch"> <a-button class="mar-left10" type="primary" @click="handlerSearch">
<Icon name="ssisearch_active" :size="14" />查询 <Icon name="ssisearch_active" :size="14" />查询
</a-button> </a-button>
<a-button class="mar-left10" type="primary" @click="exportExcel"> <a-button class="mar-left10" type="primary" @click="exportExcel">
<Icon name="ssidaochu" :size="14" />导出 <Icon name="ssidaochu" :size="14" />导出
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
<!-- table --> <!-- table -->
<a-table <a-table
:columns="columns" :columns="columns"
:data-source="dataList" :data-source="dataList"
:scroll="{ x: true }" :scroll="{ x: true }"
:pagination="false" :pagination="false"
:rowKey="record => {record.id+record.backMoneyNo}" :rowKey="
> (record) => {
<template slot="index" slot-scope="text, record, index"> record.id + record.backMoneyNo;
{{ index + 1 }} }
</template> "
</a-table> >
<!--分页--> <template slot="index" slot-scope="text, record, index">
<BurtPagination :pagination="pagination" @pageChange="getList" /> {{ index + 1 }}
</div> </template>
</a-table>
<!--分页-->
<BurtPagination :pagination="pagination" @pageChange="getList" />
</div>
</template> </template>
<script> <script>
import BurtPagination from "@/components/CUSTOMER/pagation"; import BurtPagination from '@/components/CUSTOMER/pagation';
import { exportFile } from '@/utils/index'; import { exportFile } from '@/utils/index';
export default { export default {
data() { data() {
const columns = [ const columns = [
{ title: "序号", dataIndex: "index", key:"index",align:'center', width: 80,scopedSlots: { customRender: "index" }}, {
{ title: "病历号", dataIndex: "mrnNo",width: 120}, title: '序号',
{ title: "客户姓名",dataIndex: "patientName",width: 120,}, dataIndex: 'index',
{ title: "保险公司", dataIndex: "payorName", width: 120 }, key: 'index',
{ title: "客户生日", dataIndex: "birthday", width: 120 }, align: 'center',
{ title: "保险卡号", dataIndex: "cardNo", width: 120 }, width: 80,
{ title: "账单编号", dataIndex: "receiptNo", width: 120 }, scopedSlots: { customRender: 'index' }
{ title: "账单日期", dataIndex: "receiptDate", width: 120 }, },
{ title: "收银", dataIndex: "receiptTellerName", width: 120 }, { title: '病历号', dataIndex: 'mrnNo', width: 120 },
{ title: "账单金额", dataIndex: "actualAmount", width: 120 }, { title: '客户姓名', dataIndex: 'patientName', width: 120 },
{ title: "回款金额", dataIndex: "paidAmountEob", width: 120 }, { title: '保险公司', dataIndex: 'payorName', width: 120 },
{ title: "回款日期", dataIndex: "eobBackDate", width: 120 }, { title: '客户生日', dataIndex: 'birthday', width: 120 },
{ title: "回款编号", dataIndex: "backMoneyNo", width: 120 }, { title: '保险卡号', dataIndex: 'cardNo', width: 120 },
{ title: "EOB号", dataIndex: "eobNo", width: 120 }, { title: '账单编号', dataIndex: 'receiptNo', width: 120 },
{ title: "EOB备注", dataIndex: "eobName", width: 120 }, { title: '账单日期', dataIndex: 'receiptDate', width: 120 },
{ title: "账龄", dataIndex: "diffDay", width: 120 }, { title: '收银', dataIndex: 'receiptTellerName', width: 120 },
]; { title: '账单金额', dataIndex: 'actualAmount', width: 120 },
return { { title: '回款金额', dataIndex: 'paidAmountEob', width: 120 },
columns, {
billRange: null, title: '个人欠费',
returnRange: null, dataIndex: 'arrearsAmount',
form: { width: 120,
payorCode: '', customRender: (val) => {
mrnNo: '', return <span style="color: red;">{val}</span>;
patientName: '', }
receiptDateStart: '', },
receiptDateEnd: '', {
eobBackDateStart: '', title: '备注',
eobBackDateEnd: '' dataIndex: 'remark',
}, width: 180,
pageForm: {}, // 搜索form customRender: (val) => {
return <span style="color: red;">{val}</span>;
}
},
{ title: '回款日期', dataIndex: 'eobBackDate', width: 120 },
{ title: '回款编号', dataIndex: 'backMoneyNo', width: 120 },
{ title: 'EOB号', dataIndex: 'eobNo', width: 120 },
{ title: 'EOB备注', dataIndex: 'eobName', width: 120 },
{ title: '账龄', dataIndex: 'diffDay', width: 120 }
];
return {
columns,
billRange: null,
returnRange: null,
form: {
payorCode: '',
mrnNo: '',
patientName: '',
receiptDateStart: '',
receiptDateEnd: '',
eobBackDateStart: '',
eobBackDateEnd: ''
},
pageForm: {}, // 搜索form
companyOptions: [], //保险公司 companyOptions: [], //保险公司
dataList: [], dataList: [],
pagination: { pagination: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
total: 0 total: 0
}, }
}; };
},
components: {
BurtPagination,
},
created() {
this.getList();
this._getCompanyOptions();
},
methods: {
// 选择框筛选
filterCode(input, option) {
return (
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
}, },
// 获取列表数据 components: {
getList() { BurtPagination
const data = { },
...this.pageForm, created() {
...this.pagination, this.getList();
}; this._getCompanyOptions();
this.$apis.backMoneyReport(data).then((res) => { },
let content = res.content || {}; methods: {
this.dataList = content.list || []; // 选择框筛选
filterCode(input, option) {
this.pagination.total = content.total || 0; return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
}); },
}, // 获取列表数据
// 获取保险公司下拉选项 getList() {
_getCompanyOptions() { const data = {
this.$apis.GETCOMPANYOPTIONS().then((res) => { ...this.pageForm,
this.companyOptions = res.content || []; ...this.pagination
}); };
}, this.$apis.backMoneyReport(data).then((res) => {
let content = res.content || {};
this.dataList = content.list || [];
this.pagination.total = content.total || 0;
});
},
// 获取保险公司下拉选项
_getCompanyOptions() {
this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.companyOptions = res.content || [];
});
},
onSelectBillTime(date, dateString) { onSelectBillTime(date, dateString) {
this.form.receiptDateStart = dateString[0] ? dateString[0] + ' 00:00:00' : '' this.form.receiptDateStart = dateString[0] ? dateString[0] + ' 00:00:00' : '';
this.form.receiptDateEnd = dateString[1] ? dateString[1] + ' 23:59:59' : '' this.form.receiptDateEnd = dateString[1] ? dateString[1] + ' 23:59:59' : '';
}, },
onSelectReturnTime(date, dateString) { onSelectReturnTime(date, dateString) {
this.form.eobBackDateStart = dateString[0] ? dateString[0] + ' 00:00:00' : '' this.form.eobBackDateStart = dateString[0] ? dateString[0] + ' 00:00:00' : '';
this.form.eobBackDateEnd = dateString[1] ? dateString[1] + ' 23:59:59' : '' this.form.eobBackDateEnd = dateString[1] ? dateString[1] + ' 23:59:59' : '';
}, },
// 重置 // 重置
handlerReset() { handlerReset() {
this.form = {} this.form = {};
this.returnRange = null; this.returnRange = null;
this.billRange = null; this.billRange = null;
}, },
// 搜索 // 搜索
handlerSearch() { handlerSearch() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (!valid) { if (!valid) {
return false; return false;
} }
this.pagination.pageNum = 1; this.pagination.pageNum = 1;
this.pageForm = this.$lodash.cloneDeep(this.form); this.pageForm = this.$lodash.cloneDeep(this.form);
this.getList(); this.getList();
}); });
}, },
//导出报表 //导出报表
exportExcel(){ exportExcel() {
let filter = { let filter = {
...this.form, ...this.form
} };
this.$apis.exportBackMoneyReport(filter).then(res => { this.$apis.exportBackMoneyReport(filter).then((res) => {
exportFile(res, '账单回款报表.xls'); exportFile(res, '账单回款报表.xls');
}) });
} }
}, }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.none-label { .none-label {
text-align: left; text-align: left;
.ant-form-item-label { .ant-form-item-label {
opacity: 0; opacity: 0;
} }
} }
.ant-btn .icon-class { .ant-btn .icon-class {
.mg-r(10); .mg-r(10);
} }
</style> </style>
<template> <template>
<div class="white_bg burt-container"> <div ref="burt" class="white_bg burt-container">
<Goback title="回款详情" /> <Goback ref="goback" title="回款详情" />
<a-tabs v-model="activeKey" @change="paneChange"> <a-tabs v-model="activeKey" @change="paneChange">
<a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title"> <a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title">
<template v-if="activeKey === '0'"> <a-form-model ref="ruleForm" :model="form" :rules="rules">
<!-- form --> <a-row :gutter="30">
<a-form-model ref="form" layout="vertical" :model="form"> <template v-if="activeKey === '0'">
<a-row :gutter="30"> <a-col :lg="7" :sm="12">
<a-col :lg="6" :sm="12"> <a-form-model-item label="保险公司" prop="payorCode">
<a-form-model-item label="保险公司"> <a-select
<a-select v-model="form.payorCode"
v-model="form.payorCode" placeholder="请选择保险公司"
placeholder="请选择保险公司" allow-clear
allow-clear show-search
show-search :disabled="!isEdit"
:disabled="!isEdit" style="min-width: 200px; max-width: 250px"
@change="changePayor" @change="changePayor"
:filterOption="filterCode" :filterOption="filterCode"
> >
<a-select-option <a-select-option v-for="item in companyOptions" :key="item.payorCode" :value="item.payorCode">
v-for="item in companyOptions" {{ item.longName }}
:key="item.payorCode" </a-select-option>
:value="item.payorCode" </a-select>
> </a-form-model-item>
{{ item.longName }} </a-col>
</a-select-option> <a-col :lg="5" :sm="12">
</a-select> <a-form-model-item label="回款日期" prop="backDate">
</a-form-model-item> <a-date-picker
</a-col> format="YYYY-MM-DD"
<a-col :lg="5" :sm="12"> format-value="YYYY-MM-DD 00:00:00"
<a-form-model-item label="回款日期"> v-model="form.backDate"
<a-date-picker placeholder="选择日期"
format="YYYY-MM-DD" allow-clear
format-value="YYYY-MM-DD 00:00:00" :disabled="!isEdit"
v-model="form.backDate" />
placeholder="选择日期" </a-form-model-item>
allow-clear </a-col>
:disabled="!isEdit" <a-col :lg="6" :sm="12">
/> <a-form-model-item label="回款金额(人民币)" prop="backAmountCny">
</a-form-model-item> <a-input
</a-col> class="fixed_width"
<a-col :lg="5" :sm="12"> type="number"
<a-form-model-item label="回款金额(人民币)"> v-model="form.backAmountCny"
<a-input placeholder="请输入金额"
type="number" allow-clear
v-model="form.backAmountCny" :disabled="!isEdit"
placeholder="请输入金额" />
allow-clear </a-form-model-item>
:disabled="!isEdit" </a-col>
/> <a-col :lg="5" :sm="12">
</a-form-model-item> <a-form-model-item label="可核销余额">
</a-col> <a-input class="fixed_width" v-model="residueBackAmount" disabled />
<a-col :lg="5" :sm="12"> </a-form-model-item>
<a-form-model-item label="可核销余额"> </a-col>
<a-input v-model="residueBackAmount" disabled /> <a-col :lg="7" :sm="12">
</a-form-model-item> <a-form-model-item label="回款金额(美元)">
</a-col> <a-input
<a-col :lg="5" :sm="12"> class="fixed_width"
<a-form-model-item label="回款金额(美元)"> type="number"
<a-input v-model="form.backAmountUsd"
type="number" placeholder="请输入金额"
v-model="form.backAmountUsd" allow-clear
placeholder="请输入金额" :disabled="!isEdit"
allow-clear />
:disabled="!isEdit" </a-form-model-item>
/> </a-col>
</a-form-model-item> <a-col :lg="5" :sm="12">
</a-col> <a-form-model-item label="汇率差">
<a-col :lg="6" :sm="12"> <a-input v-model="form.backExchangeRate" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
<a-form-model-item label="汇率差"> </a-form-model-item>
<a-input </a-col>
v-model="form.backExchangeRate" <a-col :lg="6" :sm="12">
placeholder="请输入金额" <a-form-model-item label="EOB编号">
allow-clear <a-input v-model="form.eobNos" placeholder="请输入EOB编号" allow-clear :disabled="!isEdit" />
:disabled="!isEdit" </a-form-model-item>
/> </a-col>
</a-form-model-item> <a-col :lg="5" :sm="12">
</a-col> <a-form-model-item label="EOB备注">
<a-col :lg="5" :sm="12"> <a-input v-model="form.eobRemark" placeholder="请输入EOB备注" allow-clear :disabled="!isEdit" />
<a-form-model-item label="EOB编号"> </a-form-model-item>
<a-input </a-col>
v-model="form.eobNos" <a-col :lg="5" :sm="12">
placeholder="请输入EOB编号" <a-form-model-item label="上传附件">
allow-clear <a-upload
:disabled="!isEdit" name="file"
/> :multiple="false"
</a-form-model-item> :showUploadList="true"
</a-col> :disabled="!isEdit"
<a-col :lg="5" :sm="12"> :fileList="fileList"
<a-form-model-item label="EOB备注"> :customRequest="(file) => uploadFile(file)"
<a-input :beforeUpload="() => beforeUpload()"
v-model="form.eobRemark" :remove="(file) => removeFile(file)"
placeholder="请输入EOB备注" >
allow-clear <a-button type="primary"> <Icon name="ssiupload" :size="18" />上传文件 </a-button>
:disabled="!isEdit" </a-upload>
/> </a-form-model-item>
</a-form-model-item> </a-col>
</a-col> </template>
<a-col :lg="5" :sm="12"> <template v-else>
<a-form-model-item label="上传附件"> <a-col :lg="9" :sm="12">
<a-upload <a-form-model-item label="保险公司" prop="payorCode">
name="file" <a-select
:multiple="false" v-model="form.payorCode"
:showUploadList="true" placeholder="请选择保险公司"
:disabled="!isEdit" allow-clear
:fileList="fileList" show-search
:customRequest="(file) => uploadFile(file)" :disabled="!isEdit"
:beforeUpload="() => beforeUpload()" style="min-width: 200px"
:remove="(file) => removeFile(file)" @change="changePayor"
> :filterOption="filterCode"
<a-button type="primary"> >
<Icon name="ssiupload" :size="18" />上传文件 <a-select-option v-for="item in companyOptions" :key="item.payorCode" :value="item.payorCode">
</a-button> {{ item.longName }}
</a-upload> </a-select-option>
</a-form-model-item> </a-select>
</a-col> </a-form-model-item>
</a-row> </a-col>
</a-form-model> <a-col :lg="8" :sm="12">
</template> <a-form-model-item label="回款金额(人民币)" prop="backAmountCny">
<template v-else> <a-input
<!-- form --> class="fixed_width"
<a-form-model type="number"
ref="form" v-model="form.backAmountCny"
:labelCol="{ span: 5 }" placeholder="请输入金额"
:wrapperCol="{ span: 16 }" allow-clear
:model="form" :disabled="!isEdit"
class="bill-form" />
> </a-form-model-item>
<a-row :gutter="30"> </a-col>
<a-col :lg="8" :sm="12"> <a-col :lg="7" :sm="12">
<a-form-model-item label="保险公司"> <a-form-model-item label="可核销余额">
<a-select <a-input class="fixed_width" v-model="residueBackAmount" disabled />
v-model="form.payorCode" </a-form-model-item>
placeholder="请选择保险公司" </a-col>
allow-clear </template>
show-search </a-row>
:filter-option="filterOption" </a-form-model>
:disabled="!isEdit" <template v-if="activeKey === '1'">
@change="changePayor" <div class="bill-content">
> <a-tabs type="card" v-model="activeKey1">
<a-select-option <a-tab-pane v-for="pane in panes1" :key="pane.key" :tab="pane.title">
v-for="item in companyOptions" <div>
:key="item.id" <a-row type="flex" align="middle" class="search-form">
:value="item.payorCode" <a-form-model
> ref="searchForm"
{{ item.longName }} layout="inline"
</a-select-option> :labelCol="{ span: 8 }"
</a-select> :wrapperCol="{ span: 16 }"
</a-form-model-item> :model="searchForm"
</a-col> >
<a-col :lg="8" :sm="12"> <a-row>
<a-form-model-item label="可核销余额"> <a-col :lg="4" :sm="12">
<a-input v-model="residueBackAmount" disabled /> <a-form-model-item label="账单日期">
</a-form-model-item> <a-range-picker
</a-col> format="YYYY-MM-DD"
</a-row> value-format="YYYY-MM-DD"
</a-form-model> v-model="searchForm.billDate"
<div class="bill-content"> :placeholder="['开始时间', '结束时间']"
<!-- 已关联账单 --> />
<template v-if="selectedRows.length > 0"> </a-form-model-item>
<div class="table-title"> </a-col>
<span>已关联账单</span> <a-col :lg="4" :sm="12">
<a-button class="mar-left10" type="primary" @click="exportExcel"> <a-form-model-item label="病历号">
<Icon name="ssidaochu" :size="14" />导出 <a-input
</a-button> v-model="searchForm.mrnNo"
</div> placeholder="请输入病历号"
<a-table allow-clear
class="table-content" :disabled="!isEdit"
:columns="selectedColumns" />
:data-source="selectedRows" </a-form-model-item>
:scroll="{ x: '100%', y: 450 }" </a-col>
:pagination="false" <a-col :lg="4" :sm="12">
> <a-form-model-item label="客户名称">
<template slot="status" slot-scope="text"> <a-input
<span :style="{color: text == 2 ? 'red' : ''}">{{ text==1?'有效':text==2?'无效':'' }}</span> v-model="searchForm.patientName"
</template> placeholder="请输入客户名称"
<template slot="operation" slot-scope="text, record, index"> allow-clear
<a-button :disabled="!isEdit"
type="link" />
class="danger" </a-form-model-item>
@click.stop="delRecord(record, index)" </a-col>
>删除</a-button <a-col :lg="4" :sm="12">
> <a-form-model-item label="状态" :labelCol="{ span: 7 }" :wrapperCol="{ span: 14 }">
</template> <a-select v-model="searchForm.rStatus" placeholder="请选择状态" allowClear>
</a-table> <a-select-option v-for="item in statusOptions" :key="item.code" :value="item.code">
</template> {{ item.name }}
<!-- table --> </a-select-option>
<template v-if="isEdit"> </a-select>
<a-row class="search-form"> </a-form-model-item>
<a-form-model </a-col>
ref="searchForm" <a-col :lg="4" :sm="12">
layout="inline" <a-form-model-item label="账单编号">
:labelCol="{ span: 8 }" <a-input
:wrapperCol="{ span: 16 }" v-model="searchForm.receiptNo"
:model="searchForm" placeholder="请输入账单编号"
> allow-clear
<a-row :gutter="30"> :disabled="!isEdit"
<a-col :lg="5" :sm="10"> />
<a-form-model-item label="账单日期"> </a-form-model-item>
<a-range-picker </a-col>
format="YYYY-MM-DD" <a-col class="flex-col" :lg="4" :sm="12">
value-format="YYYY-MM-DD" <div>
v-model="searchForm.billDate" <a-button type="primary" @click="searchData">
:placeholder="['开始时间', '结束时间']" <Icon name="ssisearch_active" :size="14" />查询
/> </a-button>
</a-form-model-item> </div>
</a-col> <div v-if="activeKey1 === '0' && selectedRows.length > 0">
<a-col :lg="4" :sm="10"> <a-button type="primary" @click="exportExcel">
<a-form-model-item label="病历号"> <Icon name="ssidaochu" :size="14" />导出
<a-input </a-button>
v-model="searchForm.mrnNo" </div>
placeholder="请输入病历号" </a-col>
allow-clear </a-row>
:disabled="!isEdit" </a-form-model>
/> </a-row>
</a-form-model-item> </div>
</a-col> <!-- 已关联账单 -->
<a-col :lg="4" :sm="12"> <template v-if="activeKey1 === '0'">
<a-form-model-item label="客户名称"> <template v-if="selectedRows.length > 0">
<a-input <div class="all-list_box">
v-model="searchForm.patientName" <a-table
placeholder="请输入客户名称" class="table-content"
allow-clear :rowClassName="rowClassName"
:disabled="!isEdit" :columns="selectedColumns"
/> :data-source="selectedRows"
</a-form-model-item> :rowKey="'id'"
</a-col> :scroll="{ x: '100%', y: tableHeight }"
<a-col :lg="4" :sm="12"> :pagination="false"
<a-form-model-item label="状态"> >
<a-select style="width: 160px;" v-model="searchForm.rStatus" placeholder="请选择状态" allowClear> <template slot="status" slot-scope="text">
<a-select-option v-for="item in statusOptions" :key="item.code" :value="item.code"> <span :style="{ color: text == 2 ? 'red' : '' }">{{
{{ item.name }} text == 1 ? '有效' : text == 2 ? '无效' : ''
</a-select-option> }}</span>
</a-select> </template>
</a-form-model-item> <template slot="operation" slot-scope="text, record, index">
</a-col> <a-button type="link" class="danger" @click.stop="delRecord(record, index)">删除</a-button>
<a-col :lg="4" :sm="12"> </template>
<a-form-model-item label="账单编号"> </a-table>
<a-input </div>
v-model="searchForm.receiptNo" </template>
placeholder="请输入账单编号" <div class="all-list_box no-data" v-else><a-empty :image="simpleImage" /></div>
allow-clear </template>
:disabled="!isEdit" <template v-else>
/> <!-- table -->
</a-form-model-item> <template v-if="isEdit">
</a-col> <div class="all-list_box">
<a-col :lg="2" :sm="12"> <a-table
<div class="btn-div mar-bottom10 none-label"> class="table-content all-list"
<a-button type="primary" @click="_getNewEOBList"> :columns="columns"
<Icon name="ssisearch_active" :size="14" />查询 :data-source="dataList"
</a-button> :scroll="{ x: '100%', y: tableHeight1 }"
</div> :pagination="false"
</a-col> :rowKey="'id'"
</a-row> :row-selection="{
</a-form-model> selectedRowKeys: selectedRowKeys,
</a-row> onSelect: onSelectChange,
<div class="table-title">账单列表</div> onSelectAll: onSelectAll
<a-table }"
:columns="columns" >
:data-source="dataList" <template slot="status" slot-scope="text">
:scroll="{ x: '100%', y: 300 }" <span :style="{ color: text == 2 ? 'red' : '' }">{{
:pagination="false" text == 1 ? '有效' : text == 2 ? '无效' : ''
:rowKey="'id'" }}</span>
:row-selection="{ </template>
selectedRowKeys: selectedRowKeys, </a-table>
onSelect: onSelectChange, <BurtPagination class="pagination" :pagination="pagination" @pageChange="pageChange" />
onSelectAll: onSelectAll, </div>
}" </template>
> </template>
<template slot="status" slot-scope="text"> </a-tab-pane>
<span :style="{color: text == 2 ? 'red' : ''}">{{ text==1?'有效':text==2?'无效':'' }}</span> </a-tabs>
</template> </div>
</a-table> </template>
<BurtPagination </a-tab-pane>
:pagination="pagination" <div v-if="isEdit" slot="tabBarExtraContent">
@pageChange="pageChange" <a-button class="mar-left10" type="primary" @click="addNewEvt(0)">
/> <Icon :name="backMoneyNo ? 'ssibaocun' : 'ssiadd'" :size="14" />暂存
</template> </a-button>
</div> <a-button class="mar-left10" type="primary" @click="addNewEvt(1)">
</template> <Icon :name="backMoneyNo ? 'ssibaocun' : 'ssiadd'" :size="14" />结案
</a-tab-pane> </a-button>
<div v-if="isEdit" slot="tabBarExtraContent"> </div>
<a-button class="mar-left10" type="primary" @click="addNewEvt(0)"> </a-tabs>
<Icon :name="backMoneyNo ? 'ssibaocun' : 'ssiadd'" :size="14" />暂存 </div>
</a-button>
<a-button class="mar-left10" type="primary" @click="addNewEvt(1)">
<Icon :name="backMoneyNo ? 'ssibaocun' : 'ssiadd'" :size="14" />结案
</a-button>
</div>
</a-tabs>
</div>
</template> </template>
<script> <script>
import Goback from "@/components/CUSTOMER/goback"; import { Empty } from 'ant-design-vue';
import BurtPagination from "@/components/CUSTOMER/pagation"; import Goback from '@/components/CUSTOMER/goback';
import { EOBStatusOptions } from "@/utils/utilsdictOptions.js"; import BurtPagination from '@/components/CUSTOMER/pagation';
import { EOBStatusOptions } from '@/utils/utilsdictOptions.js';
import { exportFile } from '@/utils/index'; import { exportFile } from '@/utils/index';
import moment from "moment"; import moment from 'moment';
import mixins from "@/mixins"; import mixins from '@/mixins';
const panes = [
{ title: '基础信息', key: '0', show: true, content: 'PaymentClaims' },
{ title: '账单列表', key: '1', show: false, content: 'Insurance' }
];
export default { export default {
data() { data() {
return { return {
isEdit: false, isEdit: false,
EOBStatusOptions, EOBStatusOptions,
dialogShow: false, dialogShow: false,
form: { form: {
payorCode: "", payorCode: undefined,
backDate: null, backDate: null,
backAmountCny: "", backAmountCny: '',
backAmountUsd: "", backAmountUsd: '',
backExchangeRate: "", backExchangeRate: '',
eobNos: "", // EOB编号 eobNos: '', // EOB编号
eobRemark: "", // EOB备注 eobRemark: '' // EOB备注
}, },
fileList: [], // 上传文件列表 fileList: [], // 上传文件列表
dataList: [], dataList: [],
isEditNewEOB: false, //是否在新建回款 isEditNewEOB: false, //是否在新建回款
companyOptions: [], //保险公司 companyOptions: [], //保险公司
pagination: { pagination: {
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 5,
total: 0, total: 0
}, },
selectedRowKeys: [], // Check here to configure the default column selectedRowKeys: [], // Check here to configure the default column
selectedRows: [], // Check here to configure the default column selectedRows: [], // Check here to configure the default column
backMoneyNo: "", backMoneyNo: '',
editRules: { rules: {
backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }], payorCode: [{ required: true, message: '请选择保险公司', trigger: 'change' }],
backAmount: [{ required: true, message: "请输入", trigger: "blur" }], backDate: [{ required: true, message: '请选择回款日期', trigger: 'change' }],
}, backAmountCny: [{ required: true, message: '请输入回款金额(人民币)', trigger: ['change', 'blur'] }]
},
searchForm: { searchForm: {
billDate: [], billDate: [],
mrnNo: "", // 病历号 mrnNo: '', // 病历号
patientName: "", // 客户名字 patientName: '' // 客户名字
}, },
savedStatus: false, //是否已保存 savedStatus: false, //是否已保存
relatedList: [], relatedList: [],
panes: [ panes: Object.seal(panes),
{ title: "基础信息", key: "0", show: true, content: "PaymentClaims" }, activeKey: '0',
{ title: "账单列表", key: "1", show: false, content: "Insurance" }, activeKey1: '0',
], statusOptions: [
activeKey: "0", {
statusOptions: [ name: '无效',
{ code: 2
name: '无效', },
code:2 {
}, name: '有效',
{ code: 1
name: '有效', }
code: 1 ],
} tableHeight: 200, // 已关联账单表格高度
] tableHeight1: 200 // 全部账单表格高度
}; };
}, },
mixins: [mixins], mixins: [mixins],
components: { components: {
Goback, Goback,
BurtPagination, BurtPagination
}, },
computed: { computed: {
columns() { panes1() {
const base = [ const panes = [{ title: '已关联账单', key: '0', show: true, content: 'Associated' }];
{ if (this.isEdit) {
title: "账单编号", panes.push({ title: '全部账单', key: '1', show: false, content: 'Insurance' });
dataIndex: "receiptNo", }
ellipsis: true, return panes;
width: 150, },
}, columns() {
{ const base = [
title: "账单状态", {
dataIndex: "status", title: '账单日期',
ellipsis: true, dataIndex: 'receiptDate',
width: 150 ellipsis: true,
,scopedSlots: { customRender: "status" } width: 160,
}, fixed: 'left'
{ title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 195 }, },
{ {
title: "客户姓名", title: '账单状态',
dataIndex: "patientName", dataIndex: 'status',
ellipsis: true, ellipsis: true,
width: 160, width: 100,
}, fixed: 'left',
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 195 }, scopedSlots: { customRender: 'status' }
{ },
title: "账单日期", {
dataIndex: "receiptDate", title: '客户姓名',
ellipsis: true, dataIndex: 'patientName',
width: 180, ellipsis: true,
}, fixed: 'left',
{ width: 180
title: "收银", },
dataIndex: "receiptTellerName", { title: '病历号', dataIndex: 'mrnNo', ellipsis: true, width: 195 },
ellipsis: true, { title: '保险公司', dataIndex: 'payorName', ellipsis: true, width: 195 },
width: 120, {
}, title: '账单编号',
{ dataIndex: 'receiptNo',
title: "理赔账单金额", ellipsis: true,
dataIndex: "actualAmount", width: 150
ellipsis: true, },
width: 150, {
}, title: '理赔账单金额',
{ dataIndex: 'actualAmount',
title: "回款金额", ellipsis: true,
dataIndex: "writeOffAmount", width: 150
ellipsis: true, },
width: 150, {
}, title: '收银',
{ dataIndex: 'receiptTellerName',
title: "个人欠费", ellipsis: true,
dataIndex: "arrearsAmountShow", width: 120
ellipsis: true, },
width: 150, {
}, title: '回款金额',
{ dataIndex: 'writeOffAmount',
title: "未清余额", ellipsis: true,
dataIndex: "residueBackAmount", width: 150
ellipsis: true, },
width: 150, {
}, title: '个人欠费',
]; dataIndex: 'arrearsAmountShow',
return base; ellipsis: true,
}, width: 150,
selectedColumns() { customRender: (val) => {
const base = JSON.parse(JSON.stringify(this.columns)); return <span style="color: red;">{val}</span>;
const changeAmount = this.changeAmount; }
base[8] = { },
title: "回款金额", {
dataIndex: "backAmount", title: '备注',
ellipsis: true, dataIndex: 'remark',
width: 150, ellipsis: true,
customRender: (val, row) => { width: 200,
return ( customRender: (val) => {
<a-input-number return <span style="color: red;">{val}</span>;
v-model={row.backAmount} }
allow-clear },
disabled={!this.isEdit} {
style={{"color": row.backAmount == row.currentReceiptAmount ? '' : 'red'}} title: '未清余额',
onBlur={() => { dataIndex: 'residueBackAmount',
changeAmount(row); ellipsis: true,
}} width: 150
/> }
];
); return base;
}, },
}; selectedColumns() {
base[10] = { const base = JSON.parse(JSON.stringify(this.columns));
title: "未清余额", const changeAmount = this.changeAmount;
dataIndex: "residueBackAmount", base[8] = {
ellipsis: true, title: '回款金额',
width: 150, dataIndex: 'backAmount',
customRender: (val, row) => { ellipsis: true,
const residueBackAmount = width: 150,
Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0) - Number(row.arrearsAmount || 0); customRender: (val, row) => {
return Number(residueBackAmount.toFixed(2)); return (
}, <a-input-number
}; v-model={row.backAmount}
base[9] = { allow-clear
title: "个人欠费", disabled={!this.isEdit}
dataIndex: "arrearsAmount", style={{ color: row.backAmount == row.currentReceiptAmount ? '' : 'red' }}
ellipsis: true, onBlur={() => {
width: 150, changeAmount(row, 'backAmount');
customRender: (val, row) => { }}
return ( />
<a-input-number );
v-model={row.arrearsAmount} }
allow-clear };
disabled={!this.isEdit} base[10].customRender = (val, row) => {
onBlur={() => { return (
changeAmount(row); <div>
}} {this.isEdit ? (
/> <a-popover title="备注" trigger="click">
); <template slot="content">
}, <a-textarea
}; class="remark_inp red_inp"
base.splice(8, 0, { v-model={row.remark}
title: "余末金额", auto-size={{ minRows: 3, maxRows: 5 }}
dataIndex: "currentReceiptAmount", allow-clear
ellipsis: true, disabled={!this.isEdit}
width: 150, ></a-textarea>
}); </template>
base.push({ <a-tooltip>
title: "回款日期", <template slot="title">{row.remark}</template>
dataIndex: "backDate", <a-input class="red_inp" v-model={row.remark} allow-clear disabled={!this.isEdit} />
ellipsis: true, </a-tooltip>
width: 150, </a-popover>
}); ) : (
if (this.isEdit) { <a-tooltip>
base.push({ <template slot="title">{row.remark}</template>
title: "操作", <a-input v-model={row.remark} disabled />
dataIndex: "operation", </a-tooltip>
fixed: "right", )}
width: 100, </div>
scopedSlots: { customRender: "operation" }, );
}); };
} base[11] = {
return base; title: '未清余额',
}, dataIndex: 'residueBackAmount',
// 可核销余额 ellipsis: true,
residueBackAmount() { width: 150,
let totalMoney = Number(this.form.backAmountCny || 0); customRender: (val, row) => {
this.selectedRows.forEach((item) => { const residueBackAmount =
totalMoney -= Number(item.backAmount); Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0) - Number(row.arrearsAmount || 0);
}); return Number(residueBackAmount.toFixed(2));
return Number(totalMoney.toFixed(2)); }
}, };
}, base[9] = {
created() { title: '个人欠费',
const { backMoneyNo, isEdit } = this.$route.query; dataIndex: 'arrearsAmount',
this.backMoneyNo = backMoneyNo; ellipsis: true,
this.isEdit = isEdit; width: 150,
this._getCompanyOptions(); customRender: (val, row) => {
if (backMoneyNo) { return (
const backMoneyDataDetail = JSON.parse( <a-input-number
localStorage.getItem("backMoneyDataDetail") || "{}" class="red_inp"
); v-model={row.arrearsAmount}
this.form = backMoneyDataDetail; allow-clear
this.form.backDate = this.form.backDate disabled={!this.isEdit}
? moment(this.form.backDate).format("YYYY-MM-DD 00:00:00") onBlur={() => {
: null; changeAmount(row, 'arrearsAmount');
}}
/>
);
}
};
base.splice(8, 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 Number(totalMoney.toFixed(2));
}
},
created() {
this.simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
const { backMoneyNo, isEdit } = this.$route.query;
this.backMoneyNo = backMoneyNo;
this.isEdit = isEdit;
this._getCompanyOptions();
if (backMoneyNo) {
const backMoneyDataDetail = JSON.parse(localStorage.getItem('backMoneyDataDetail') || '{}');
this.form = backMoneyDataDetail;
this.form.backDate = this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00') : null;
// 如果有上传附件则显示列表 // 如果有上传附件则显示列表
if (backMoneyDataDetail.fileList) { if (backMoneyDataDetail.fileList) {
this.fileList = backMoneyDataDetail.fileList.map((d) => { this.fileList = backMoneyDataDetail.fileList.map((d) => {
const file = { const file = {
uid: Math.random() * 10000, uid: Math.random() * 10000,
name: d.fileName, name: d.fileName,
status: "done", status: 'done',
url: d.fileUrl, url: d.fileUrl
}; };
return file; return file;
}); });
} }
this.getData(); this.getData();
} }
this._getNewEOBList(); },
}, mounted() {
methods: { this.calcTableHeight();
moment, this._getNewEOBList();
// 选择框筛选
filterCode(input, option) {
return (
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
}, },
paneChange() { methods: {
this.panes.forEach((item) => { moment,
item.show = false; // 计算表格最大高度
}); calcTableHeight() {
this.panes[Number(this.activeKey)].show = true; const dom = this.$refs.burt;
}, const containterH = dom.clientHeight;
changeAmount(row) { const gobackH = document.querySelector('.back-container').clientHeight;
let totalMoney = Number(this.form.backAmountCny || 0); const style = window.getComputedStyle(dom, null);
this.selectedRows.forEach((item) => { const paddingT = parseFloat(style.getPropertyValue('padding-top'));
totalMoney -= Number(item.backAmount); const paddingB = parseFloat(style.getPropertyValue('padding-bottom'));
}); const paddingSum = paddingT + paddingB;
if(totalMoney < 0){ this.tableHeight = containterH - 300 - gobackH - paddingSum;
this.$message.error('可核销余额不足') this.tableHeight1 = containterH - 340 - gobackH - paddingSum;
} // 设置每页展示条数
if (Number(row.actualAmount || 0) - Number(row.backAmount || 0) < 0) { const pageSize = Math.floor((this.tableHeight1 - 10) / 32);
this.$message.warning("录入账单回款金额大于账单金额"); this.$set(this.pagination, 'pageSize', pageSize);
} },
}, // 已关联账单表格行类名
onSelectChange(selectedRow, selected) { rowClassName(record) {
selectedRow['backAmount'] = this.residueBackAmount > selectedRow.currentReceiptAmount ? selectedRow.currentReceiptAmount: this.residueBackAmount; return record.hidden ? 'hide_' : '';
if (selected) { },
this.selectedRowKeys.push(selectedRow.id); // 账单查询
this.selectedRows.push(selectedRow); searchData() {
} else { this._getNewEOBList();
const index = this.selectedRowKeys.findIndex( this.getData();
(item) => item === selectedRow.id },
); // 选择框筛选
this.selectedRowKeys.splice(index, 1); filterCode(input, option) {
this.selectedRows.splice(index, 1); return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
this._confirmDelReceipt([selectedRow]); },
} paneChange() {
this.addNewEvt(0) this.$refs.ruleForm[0].clearValidate();
}, this.panes.forEach((item) => {
onSelectAll(selected, selectedRows, changeRows) { item.show = false;
console.log(selected, selectedRows, changeRows); });
if (selected) { this.panes[Number(this.activeKey)].show = true;
this.selectedRowKeys = this.selectedRowKeys.concat( },
changeRows.map((item) => item.id) changeAmount(row) {
); let totalMoney = Number(this.form.backAmountCny || 0);
this.selectedRows = this.selectedRows.concat(changeRows); this.selectedRows.forEach((item) => {
} else { totalMoney -= Number(item.backAmount);
changeRows.forEach((item) => { });
const findIndex = this.selectedRowKeys.findIndex( if (totalMoney < 0) {
(rowId) => rowId === item.id this.$message.error('可核销余额不足');
); }
this.selectedRowKeys.splice(findIndex, 1); if (Number(row.actualAmount || 0) - Number(row.backAmount || 0) < 0) {
this.selectedRows.splice(findIndex, 1); this.$message.warning('录入账单回款金额大于账单金额');
}); }
this._confirmDelReceipt(changeRows); },
} onSelectChange(selectedRow, selected) {
}, selectedRow['backAmount'] =
delRecord(record, index) { this.residueBackAmount > selectedRow.currentReceiptAmount
this.selectedRowKeys.splice(index, 1); ? selectedRow.currentReceiptAmount
this.selectedRows.splice(index, 1); : this.residueBackAmount;
if (record.relationed) { if (selected) {
// 已经关联的调用接口删除 this.selectedRowKeys.push(selectedRow.id);
this._confirmDelReceipt([record]); this.selectedRows.push(selectedRow);
} } else {
}, const index = this.selectedRowKeys.findIndex((item) => item === selectedRow.id);
_confirmDelReceipt(records) { this.selectedRowKeys.splice(index, 1);
console.log(records); this.selectedRows.splice(index, 1);
if (!this.backMoneyNo) return; this._confirmDelReceipt([selectedRow]);
const receiptVoList = records }
.filter((item) => { this.addNewEvt(0);
const findIndex = this.relatedList.findIndex( },
(rowId) => rowId === item.id onSelectAll(selected, selectedRows, changeRows) {
); if (selected) {
return findIndex > -1; this.selectedRowKeys = this.selectedRowKeys.concat(changeRows.map((item) => item.id));
}) changeRows.forEach((item) => {
.map((item) => { const obj = {
return { ...item,
id: item.id, backAmount:
}; this.residueBackAmount > item.currentReceiptAmount ? item.currentReceiptAmount : this.residueBackAmount
}); };
console.log(receiptVoList); this.selectedRows.push(obj);
if (receiptVoList.length === 0) return; });
this.$apis // this.selectedRows = this.selectedRows.concat(chgRows);
.DELETERECEIPTRECORD({ } else {
backMoneyNo: this.backMoneyNo, changeRows.forEach((item) => {
receiptVoList, const findIndex = this.selectedRowKeys.findIndex((rowId) => rowId === item.id);
}) this.selectedRowKeys.splice(findIndex, 1);
.then((res) => { this.selectedRows.splice(findIndex, 1);
if (res.returnCode == "0000") { });
this._getNewEOBList(); this._confirmDelReceipt(changeRows);
} else { }
this.$message.error(res.returnMsg); this.addNewEvt(0);
} },
}); delRecord(record, index) {
}, this.selectedRowKeys.splice(index, 1);
// 修改保险公司 this.selectedRows.splice(index, 1);
changePayor() { if (record.relationed) {
if ( // 已经关联的调用接口删除
this.selectedRowKeys.length > 0 && this._confirmDelReceipt([record]);
(this.form.id || this.savedStatus) }
) { },
this.$modal.confirm({ _confirmDelReceipt(records) {
title: "提示", if (!this.backMoneyNo) return;
content: "是否解除已关联账单", const receiptVoList = records
okText: "确认", .filter((item) => {
cancelText: "取消", const findIndex = this.relatedList.findIndex((rowId) => rowId === item.id);
onOk: () => { return findIndex > -1;
this.selectedRowKeys = []; })
this.selectedRows = []; .map((item) => {
}, return {
onCancel: () => {}, id: item.id
}); };
} });
this._getNewEOBList(); if (receiptVoList.length === 0) return;
}, this.$apis
pageChange(pager) { .DELETERECEIPTRECORD({
this.pagination = { backMoneyNo: this.backMoneyNo,
...this.pagination, receiptVoList
...pager, })
}; .then((res) => {
this._getNewEOBList(); if (res.returnCode == '0000') {
}, this._getNewEOBList();
// 获取保险公司下拉选项 } else {
_getCompanyOptions() { this.$message.error(res.returnMsg);
this.$apis.GETCOMPANYOPTIONS().then((res) => { }
this.companyOptions = res.content || []; });
}); },
}, // 修改保险公司
// 获取已关联的账单 changePayor() {
getData() { if (this.selectedRowKeys.length > 0 && (this.form.id || this.savedStatus)) {
this.$apis this.$modal.confirm({
.QUERYBACKRECEIPTLIST({ title: '提示',
pageNum: 1, content: '是否解除已关联账单',
pageSize: 999, okText: '确认',
backMoneyNo: this.backMoneyNo, cancelText: '取消',
payorCode: this.form.payorCode, onOk: () => {
}) this.selectedRowKeys = [];
.then((res) => { this.selectedRows = [];
if (res.returnCode == "0000") { },
const list = res.content.list || []; onCancel: () => {}
this.selectedRowKeys = list.map((d) => d.id); });
this.selectedRows = list.map((item) => { }
item.relationed = true; this._getNewEOBList();
return item; },
}); pageChange(pager) {
this.relatedList = list.map((d) => d.id); this.pagination = {
} else { ...this.pagination,
this.$message.error(res.returnMsg); ...pager
} };
}); this._getNewEOBList();
}, },
// 获取所有账单 // 获取保险公司下拉选项
_getNewEOBList() { _getCompanyOptions() {
let billDate = this.searchForm.billDate || []; this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.$apis this.companyOptions = res.content || [];
.QUERYBACKRECEIPTINFOLIST({ });
pageNum: this.pagination.pageNum, },
pageSize: this.pagination.pageSize, // 获取已关联的账单
backMoneyNo: this.backMoneyNo, getData() {
payorCode: this.form.payorCode, if (!this.backMoneyNo) {
...this.searchForm, if (this.activeKey1 === '0') {
receiptEndDate: billDate[1] ? billDate[1] + " 23:59:59" : undefined, this.$message.error('暂未关联账单,请在全部账单中添加账单');
receiptStartDate: billDate[0] ? billDate[0] + " 00:00:00" : undefined, }
}) return;
.then((res) => { }
if (res.returnCode == "0000") { let billDate = this.searchForm.billDate || [];
let content = res.content || {}; this.$apis
this.pagination.total = content.total || 0; .QUERYBACKRECEIPTLIST({
this.dataList = content.list.map(item => { pageNum: 1,
item.arrearsAmountShow = item.arrearsAmount pageSize: 999,
item.arrearsAmount = '' backMoneyNo: this.backMoneyNo,
return item ...this.searchForm,
}) || []; receiptEndDate: billDate[1] ? billDate[1] + ' 23:59:59' : undefined,
} else { receiptStartDate: billDate[0] ? billDate[0] + ' 00:00:00' : undefined
this.$message.error(res.returnMsg); })
} .then((res) => {
}); if (res.returnCode == '0000') {
}, const list = res.content.list || [];
//新建/保存回款 let ids = [];
addNewEvt(backStatus) { this.selectedRows = list.map((item) => {
return new Promise((resolve, reject) => { item.relationed = true;
console.log(this.selectedRows); ids.push(item.id);
if (!this.form.payorCode) { return item;
this.$message.warning("请选择保险公司"); });
reject(); this.selectedRowKeys = this.$lodash.cloneDeep(ids);
return; this.relatedList = this.$lodash.cloneDeep(ids);
} } else {
if (!this.form.backDate) { this.$message.error(res.returnMsg);
this.$message.warning("请选择回款日期"); }
reject(); });
return; },
} // 获取所有账单
if (!this.form.backAmountCny) { _getNewEOBList() {
this.$message.warning("请输入回款金额"); let billDate = this.searchForm.billDate || [];
reject(); this.$apis
return; .QUERYBACKRECEIPTINFOLIST({
} pageNum: this.pagination.pageNum,
let receiptVoList = this.selectedRows.map((item) => { pageSize: this.pagination.pageSize,
return { backMoneyNo: this.backMoneyNo,
id: item.id, payorCode: this.form.payorCode,
backAmount: item.backAmount, ...this.searchForm,
arrearsAmount: item.arrearsAmount, receiptEndDate: billDate[1] ? billDate[1] + ' 23:59:59' : undefined,
}; receiptStartDate: billDate[0] ? billDate[0] + ' 00:00:00' : undefined
}); })
const valid = receiptVoList.some((item) => { .then((res) => {
const exist = !item.backAmount && item.backAmount !== 0 if (res.returnCode == '0000') {
return exist; let content = res.content || {};
}); this.pagination.total = content.total || 0;
if (valid) { this.dataList =
this.$message.warning("存在关联账单未输入回款金额"); content.list.map((item) => {
reject(); item.arrearsAmountShow = item.arrearsAmount;
return; item.arrearsAmount = '';
} return item;
}) || [];
} else {
this.$message.error(res.returnMsg);
}
});
},
//新建/保存回款
addNewEvt(backStatus) {
if (!this.form.payorCode) {
this.$message.warning('请选择保险公司');
return;
}
if (!this.form.backDate) {
this.$message.warning('请选择回款日期');
return;
}
if (!this.form.backAmountCny && this.form.backAmountCny !== 0) {
this.$message.warning('请输入回款金额(人民币)');
return;
}
let receiptVoList = this.selectedRows.map((item) => {
return {
id: item.id,
backAmount: item.backAmount,
arrearsAmount: item.arrearsAmount,
remark: item.remark
};
});
const flag = receiptVoList.some((item) => {
const exist = !item.backAmount && item.backAmount !== 0;
return exist;
});
if (flag) {
this.$message.warning('存在关联账单未输入回款金额');
return;
}
const formData = { const formData = {
...this.form, ...this.form,
receiptVoList, receiptVoList,
backDate: this.form.backDate backDate: this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD HH:mm:ss') : '',
? moment(this.form.backDate).format("YYYY-MM-DD HH:mm:ss") backMoneyNo: this.backMoneyNo, //回款编号
: "", backStatus // 0暂存 1结案
backMoneyNo: this.backMoneyNo, //回款编号 };
backStatus, // 0暂存 1结案
};
// 上传附件格式转换 // 上传附件格式转换
formData.fileList = this.fileList.map((d) => { formData.fileList = this.fileList.map((d) => {
const file = { const file = {
fileName: d.name, fileName: d.name,
fileUrl: d.url, fileUrl: d.url
}; };
return file; return file;
}); });
this.$apis.SAVEBACKMONEY(formData).then((res) => { this.$apis.SAVEBACKMONEY(formData).then((res) => {
if (res.returnCode == "0000") { const msg = backStatus === 1 ? '结案' : '暂存';
this.backMoneyNo = res.content; if (res.returnCode == '0000') {
this.savedStatus = true; this.backMoneyNo = res.content;
this.$message.success("成功"); this.savedStatus = true;
this.selectedRowKeys = []; this.$message.success(`${msg}成功`);
this.getData(); this.selectedRowKeys = [];
this._getNewEOBList(); this.getData();
this._getNewEOBList();
// this.$router.go(-1); // this.$router.go(-1);
resolve(); } else {
} else { this.$message.error(res.returnMsg);
this.$message.error(res.returnMsg); }
reject(); });
} },
});
});
},
/* ======== 上传区域 ======== */ /* ======== 上传区域 ======== */
// 上传之前 // 上传之前
beforeUpload() { beforeUpload() {
const len = this.fileList.length; const len = this.fileList.length;
if (len >= 5) { if (len >= 5) {
this.$message.warning("不能超过5个文件"); this.$message.warning('不能超过5个文件');
return false; return false;
} }
return true; return true;
}, },
// 删除文件 // 删除文件
removeFile(file) { removeFile(file) {
let index; let index;
this.fileList.forEach((item, i) => { this.fileList.forEach((item, i) => {
if (item.uid == file.uid) { if (item.uid == file.uid) {
index = i; index = i;
} }
}); });
this.fileList.splice(index, 1); this.fileList.splice(index, 1);
return true; return true;
}, },
// 上传文件 // 上传文件
uploadFile(fileData) { uploadFile(fileData) {
let formData = new FormData(); let formData = new FormData();
formData.append("file", fileData.file); formData.append('file', fileData.file);
this.$apis.UPLOADIMG(formData).then((res) => { this.$apis.UPLOADIMG(formData).then((res) => {
fileData.onSuccess(); fileData.onSuccess();
let tmp = { let tmp = {
uid: Math.random() * 10000, uid: Math.random() * 10000,
name: res.original, name: res.original,
status: "done", status: 'done',
url: res.url, url: res.url
}; };
this.fileList.push(tmp); this.fileList.push(tmp);
this.$forceUpdate(); this.$forceUpdate();
}); });
}, },
//导出报表 //导出报表
exportExcel(){ exportExcel() {
let filter = { let filter = {
backMoneyNo: this.backMoneyNo, backMoneyNo: this.backMoneyNo,
payorCode: this.form.payorCode, payorCode: this.form.payorCode
} };
this.$apis.EXPORTBACKRECEIPTLIST(filter).then(res => { this.$apis.EXPORTBACKRECEIPTLIST(filter).then((res) => {
exportFile(res, '已关联账单.xls'); exportFile(res, '已关联账单.xls');
}) });
}, },
// 保险公司支持输入搜索 // 保险公司支持输入搜索
filterOption(input,option ) { filterOption(input, option) {
return option.componentOptions.children[0].text.indexOf(input) >= 0 return option.componentOptions.children[0].text.indexOf(input) >= 0;
} }
}, }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.none-label { .none-label {
text-align: right; text-align: right;
.ant-form-item-label { .ant-form-item-label {
opacity: 0; opacity: 0;
} }
} }
.table-title { .all-list_box {
font-size: 15px; height: calc(100vh - 400px);
margin: 6px 0; overflow-y: auto;
display: flex; &.no-data {
align-items: center; display: flex;
justify-content: space-between; justify-content: center;
align-items: center;
color: red;
}
} }
.table-content { .table-content {
margin-bottom: 8px; ::v-deep {
tr.hide_ {
display: none;
}
td {
padding: 5px 16px !important;
}
}
} }
.search-form { .search-form {
margin-top: 24px; .ant-form .ant-form-item {
.ant-form .ant-form-item { margin-bottom: 4px;
margin-bottom: 4px; }
} .flex-col {
display: flex;
justify-content: space-around;
align-items: center;
height: 44px;
}
} }
.ant-btn .icon-class { .ant-btn .icon-class {
.mg-r(10); .mg-r(10);
} }
.success.ant-btn-link { .success.ant-btn-link {
color: #4cd964; color: #4cd964;
} }
.danger.ant-btn-link { .danger.ant-btn-link {
color: #ff3b30; color: #ff3b30;
} }
.burt-container { .burt-container {
height: calc(100vh - 86px); height: calc(100vh - 86px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
::v-deep { padding-bottom: 10px;
.ant-tabs { ::v-deep {
flex: 1; .ant-form-item {
min-height: 0; display: flex;
} &.ant-form-item-with-help {
} margin-bottom: 0;
}
}
.ant-tabs {
flex: 1;
min-height: 0;
}
}
.fixed_width {
max-width: 150px;
}
} }
.bill-content { .bill-content {
height: calc(100vh - 400px); overflow-y: auto;
overflow-y: auto; overflow-x: hidden;
overflow-x: hidden; padding-right: 12px;
padding-right: 12px; ::v-deep {
.ant-form-item {
margin-right: 0;
}
}
.pagination {
margin-top: 10px;
::v-deep .jump-page {
height: 30px;
}
}
} }
::v-deep .bill-form { ::v-deep .bill-form {
.ant-form .ant-form-item { .ant-form .ant-form-item {
margin-bottom: 4px !important; margin-bottom: 4px !important;
} }
}
.remark_inp {
width: 300px;
}
.red_inp {
::v-deep .ant-input {
color: red;
}
}
@media screen and (min-width: 1920px) {
.all-list_box {
height: calc(100vh - 420px);
}
}
@media screen and (min-width: 1920px) {
.all-list_box {
height: calc(100vh - 420px);
}
}
@media screen and (min-width: 1440px) {
.all-list_box {
height: calc(100vh - 400px);
}
} }
</style> </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