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

Merge branch 'func_eccs_2250' into 'master'

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

See merge request !45
parents 4535ff39 fc72fcae
...@@ -22,7 +22,9 @@ import { ...@@ -22,7 +22,9 @@ import {
Spin, Spin,
Collapse, Collapse,
Tabs, Tabs,
Tooltip Tooltip,
Popover,
Empty
} from "ant-design-vue"; } from "ant-design-vue";
export default () => { export default () => {
...@@ -49,7 +51,9 @@ export default () => { ...@@ -49,7 +51,9 @@ export default () => {
Spin, Spin,
Collapse, Collapse,
Tabs, Tabs,
Tooltip Tooltip,
Popover,
Empty
]; ];
// 注册 // 注册
els.forEach((item) => { els.forEach((item) => {
......
...@@ -117,16 +117,19 @@ ...@@ -117,16 +117,19 @@
</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 slot="redText" slot-scope="text">
<span style="color: red">{{ text }}</span>
</template> </template>
</a-table> </a-table>
<!--分页--> <!--分页-->
...@@ -135,83 +138,98 @@ ...@@ -135,83 +138,98 @@
</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 },
{ title: '保险已支付', dataIndex: 'backAmount', width: 180 },
{ title: '保险欠费', dataIndex: 'insuranceArrearsAmount', width: 180 },
{ title: '个人欠费', dataIndex: 'arrearsAmount', width: 180, scopedSlots: { customRender: 'redText' } },
{ title: '备注', dataIndex: 'remark', width: 200, scopedSlots: { customRender: 'redText' } },
{ title: '未清余额', dataIndex: 'residueBackAmount', width: 180 },
{ title: '账龄', dataIndex: 'diffDay', width: 180 },
{
title: '操作',
key: 'operation',
width: '175px',
fixed: 'right',
scopedSlots: { customRender: 'operation' },
align: 'center'
}
]; ];
return { return {
columns, columns,
receiptTypeOptions, receiptTypeOptions,
form: {}, form: {},
pageForm: { pageForm: {
doctorCode: "", doctorCode: '',
patientName: "", patientName: '',
mrnNo: "", mrnNo: '',
paymentCode: "", paymentCode: '',
payorIds: [], payorIds: [],
visitTimeEnd: "", visitTimeEnd: '',
visitTimeStart: "", visitTimeStart: '',
receiptType: "", receiptType: '',
receiptNo: "" receiptNo: ''
}, },
patientTypeOptions: [ patientTypeOptions: [
{ {
name: "商保", name: '商保',
code: 1, code: 1
}, }
], //客户类型 ], //客户类型
companyOptions: [], //保险公司 companyOptions: [], //保险公司
doctorOptions: [], //就诊医生 doctorOptions: [], //就诊医生
paymentOptions: [ paymentOptions: [
{ {
name: "商保", name: '商保',
code: 1, code: 1
}, }
], //支付方式 ], //支付方式
dataList: [], dataList: [],
pagination: { pagination: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0
}, },
receiptTypeDict: { receiptTypeDict: {
'1': '收费', 1: '收费',
'2': '退费' 2: '退费'
}, },
statusOptions: [ statusOptions: [
{ {
name: '无效', name: '无效',
code:2 code: 2
}, },
{ {
name: '有效', name: '有效',
...@@ -221,7 +239,7 @@ export default { ...@@ -221,7 +239,7 @@ export default {
}; };
}, },
components: { components: {
BurtPagination, BurtPagination
}, },
computed: { computed: {
...mapState({ ...mapState({
...@@ -230,29 +248,26 @@ export default { ...@@ -230,29 +248,26 @@ export default {
}, },
created() { created() {
this._getCompanyOptions(); this._getCompanyOptions();
this._getDoctorListNoPage();//获取医生下拉选项 this._getDoctorListNoPage(); //获取医生下拉选项
}, },
methods: { methods: {
moment, moment,
// 选择框筛选 // 选择框筛选
filterCode(input, option) { filterCode(input, option) {
return ( return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
}, },
// 获取列表数据 // 获取列表数据
_getChargeList() { _getChargeList() {
const data = { const data = {
...this.pageForm, ...this.pageForm,
...this.pagination, ...this.pagination
}; };
this.$apis.GETCHARGELIST(data).then((res) => { this.$apis.GETCHARGELIST(data).then((res) => {
let content = res.content || {}; let content = res.content || {};
this.dataList = content.list.map(item => { this.dataList =
item.receiptTypeStr = this.receiptTypeDict[item.receiptType] || '' content.list.map((item) => {
return item item.receiptTypeStr = this.receiptTypeDict[item.receiptType] || '';
return item;
}) || []; }) || [];
this.pagination.total = content.total || 0; this.pagination.total = content.total || 0;
}); });
...@@ -264,53 +279,55 @@ export default { ...@@ -264,53 +279,55 @@ export default {
}); });
}, },
// 获取看诊医生下拉选项 // 获取看诊医生下拉选项
_getDoctorListNoPage(){ _getDoctorListNoPage() {
this.$apis.GETDOCTORlISTNOPAGE({"providerId": this.userInfo.providerId}).then((res) => { this.$apis.GETDOCTORlISTNOPAGE({ providerId: this.userInfo.providerId }).then((res) => {
if (res.returnCode === "0000") { if (res.returnCode === '0000') {
this.doctorOptions = res.content || []; this.doctorOptions = res.content || [];
}else{ } else {
this.$message.success(res.returnMsg); this.$message.success(res.returnMsg);
} }
}); });
}, },
// 选中就诊时间 // 选中就诊时间
onSelectVisitTime(date, dateString) { onSelectVisitTime(date, dateString) {
this.form.visitTimeStart = dateString[0] + ' 00:00:00' this.form.visitTimeStart = dateString[0] + ' 00:00:00';
this.form.visitTimeEnd = dateString[1] + ' 23:59:59' this.form.visitTimeEnd = dateString[1] + ' 23:59:59';
console.log(date, dateString); console.log(date, dateString);
}, },
// 重置 // 重置
handlerReset() { handlerReset() {
this.form = {} this.form = {};
}, },
//查看 //查看
detailEvt(record) { detailEvt(record) {
localStorage.setItem('chargeQueryDetail', JSON.stringify(record)); localStorage.setItem('chargeQueryDetail', JSON.stringify(record));
const { receiptNo } = record; const { receiptNo } = record;
this.$router.push({ this.$router.push({
name: "chargeQueryDetail", name: 'chargeQueryDetail',
query: { receiptNo }, query: { receiptNo }
}); });
}, },
//账单结算 //账单结算
receiptEvt(record){ receiptEvt(record) {
this.$modal.confirm({ this.$modal.confirm({
title: "结算", title: '结算',
content: "确定结算该账单?", content: '确定结算该账单?',
okText: "确定", okText: '确定',
cancelText: "取消", cancelText: '取消',
onOk: () => { onOk: () => {
this.$apis.RECEIPTSETTLEMENT({ this.$apis
.RECEIPTSETTLEMENT({
id: record.id id: record.id
}).then((res) => { })
if (res.returnCode === "0000") { .then((res) => {
if (res.returnCode === '0000') {
this.$message.success('结算成功'); this.$message.success('结算成功');
this._getChargeList(); this._getChargeList();
}else{ } else {
this.$message.error(res.returnMsg); this.$message.error(res.returnMsg);
} }
}); });
}, }
}); });
}, },
handlerSearch() { handlerSearch() {
...@@ -319,7 +336,7 @@ export default { ...@@ -319,7 +336,7 @@ export default {
return false; return false;
} }
this.pagination.pageNum = 1; this.pagination.pageNum = 1;
this.pageForm = this.$lodash.cloneDeep({...this.form, dateRange: undefined}); this.pageForm = this.$lodash.cloneDeep({ ...this.form, dateRange: undefined });
this._getChargeList(); this._getChargeList();
}); });
}, },
...@@ -328,15 +345,15 @@ export default { ...@@ -328,15 +345,15 @@ export default {
// this.$router.push("/customer/edit"); // 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>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
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>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
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>
...@@ -67,7 +67,11 @@ ...@@ -67,7 +67,11 @@
:data-source="dataList" :data-source="dataList"
:scroll="{ x: true }" :scroll="{ x: true }"
:pagination="false" :pagination="false"
:rowKey="record => {record.id+record.backMoneyNo}" :rowKey="
(record) => {
record.id + record.backMoneyNo;
}
"
> >
<template slot="index" slot-scope="text, record, index"> <template slot="index" slot-scope="text, record, index">
{{ index + 1 }} {{ index + 1 }}
...@@ -79,28 +83,51 @@ ...@@ -79,28 +83,51 @@
</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 },
{ title: '回款金额', dataIndex: 'paidAmountEob', width: 120 },
{
title: '个人欠费',
dataIndex: 'arrearsAmount',
width: 120,
customRender: (val) => {
return <span style="color: red;">{val}</span>;
}
},
{
title: '备注',
dataIndex: 'remark',
width: 180,
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 { return {
columns, columns,
...@@ -123,11 +150,11 @@ export default { ...@@ -123,11 +150,11 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
total: 0 total: 0
}, }
}; };
}, },
components: { components: {
BurtPagination, BurtPagination
}, },
created() { created() {
this.getList(); this.getList();
...@@ -136,17 +163,13 @@ export default { ...@@ -136,17 +163,13 @@ export default {
methods: { methods: {
// 选择框筛选 // 选择框筛选
filterCode(input, option) { filterCode(input, option) {
return ( return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
}, },
// 获取列表数据 // 获取列表数据
getList() { getList() {
const data = { const data = {
...this.pageForm, ...this.pageForm,
...this.pagination, ...this.pagination
}; };
this.$apis.backMoneyReport(data).then((res) => { this.$apis.backMoneyReport(data).then((res) => {
let content = res.content || {}; let content = res.content || {};
...@@ -163,17 +186,17 @@ export default { ...@@ -163,17 +186,17 @@ export default {
}, },
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;
}, },
...@@ -191,15 +214,15 @@ export default { ...@@ -191,15 +214,15 @@ export default {
}, },
//导出报表 //导出报表
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>
......
<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-form-model ref="form" layout="vertical" :model="form">
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="6" :sm="12"> <template v-if="activeKey === '0'">
<a-form-model-item label="保险公司"> <a-col :lg="7" :sm="12">
<a-form-model-item label="保险公司" prop="payorCode">
<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"
: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 :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
<a-form-model-item label="回款日期"> <a-form-model-item label="回款日期" prop="backDate">
<a-date-picker <a-date-picker
format="YYYY-MM-DD" format="YYYY-MM-DD"
format-value="YYYY-MM-DD 00:00:00" format-value="YYYY-MM-DD 00:00:00"
...@@ -40,9 +36,10 @@ ...@@ -40,9 +36,10 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="回款金额(人民币)"> <a-form-model-item label="回款金额(人民币)" prop="backAmountCny">
<a-input <a-input
class="fixed_width"
type="number" type="number"
v-model="form.backAmountCny" v-model="form.backAmountCny"
placeholder="请输入金额" placeholder="请输入金额"
...@@ -53,12 +50,13 @@ ...@@ -53,12 +50,13 @@
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
<a-form-model-item label="可核销余额"> <a-form-model-item label="可核销余额">
<a-input v-model="residueBackAmount" disabled /> <a-input class="fixed_width" v-model="residueBackAmount" disabled />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="7" :sm="12">
<a-form-model-item label="回款金额(美元)"> <a-form-model-item label="回款金额(美元)">
<a-input <a-input
class="fixed_width"
type="number" type="number"
v-model="form.backAmountUsd" v-model="form.backAmountUsd"
placeholder="请输入金额" placeholder="请输入金额"
...@@ -67,34 +65,19 @@ ...@@ -67,34 +65,19 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="6" :sm="12"> <a-col :lg="5" :sm="12">
<a-form-model-item label="汇率差"> <a-form-model-item label="汇率差">
<a-input <a-input v-model="form.backExchangeRate" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
v-model="form.backExchangeRate"
placeholder="请输入金额"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="EOB编号"> <a-form-model-item label="EOB编号">
<a-input <a-input v-model="form.eobNos" placeholder="请输入EOB编号" allow-clear :disabled="!isEdit" />
v-model="form.eobNos"
placeholder="请输入EOB编号"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
<a-form-model-item label="EOB备注"> <a-form-model-item label="EOB备注">
<a-input <a-input v-model="form.eobRemark" placeholder="请输入EOB备注" allow-clear :disabled="!isEdit" />
v-model="form.eobRemark"
placeholder="请输入EOB备注"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
...@@ -109,85 +92,56 @@ ...@@ -109,85 +92,56 @@
:beforeUpload="() => beforeUpload()" :beforeUpload="() => beforeUpload()"
:remove="(file) => removeFile(file)" :remove="(file) => removeFile(file)"
> >
<a-button type="primary"> <a-button type="primary"> <Icon name="ssiupload" :size="18" />上传文件 </a-button>
<Icon name="ssiupload" :size="18" />上传文件
</a-button>
</a-upload> </a-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
</a-form-model>
</template> </template>
<template v-else> <template v-else>
<!-- form --> <a-col :lg="9" :sm="12">
<a-form-model <a-form-model-item label="保险公司" prop="payorCode">
ref="form"
:labelCol="{ span: 5 }"
:wrapperCol="{ span: 16 }"
:model="form"
class="bill-form"
>
<a-row :gutter="30">
<a-col :lg="8" :sm="12">
<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
:filter-option="filterOption"
:disabled="!isEdit" :disabled="!isEdit"
style="min-width: 200px"
@change="changePayor" @change="changePayor"
:filterOption="filterCode"
> >
<a-select-option <a-select-option v-for="item in companyOptions" :key="item.payorCode" :value="item.payorCode">
v-for="item in companyOptions"
:key="item.id"
: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 :lg="8" :sm="12"> <a-col :lg="8" :sm="12">
<a-form-model-item label="回款金额(人民币)" prop="backAmountCny">
<a-input
class="fixed_width"
type="number"
v-model="form.backAmountCny"
placeholder="请输入金额"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item>
</a-col>
<a-col :lg="7" :sm="12">
<a-form-model-item label="可核销余额"> <a-form-model-item label="可核销余额">
<a-input v-model="residueBackAmount" disabled /> <a-input class="fixed_width" v-model="residueBackAmount" disabled />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</template>
</a-row> </a-row>
</a-form-model> </a-form-model>
<template v-if="activeKey === '1'">
<div class="bill-content"> <div class="bill-content">
<!-- 已关联账单 --> <a-tabs type="card" v-model="activeKey1">
<template v-if="selectedRows.length > 0"> <a-tab-pane v-for="pane in panes1" :key="pane.key" :tab="pane.title">
<div class="table-title"> <div>
<span>已关联账单</span> <a-row type="flex" align="middle" class="search-form">
<a-button class="mar-left10" type="primary" @click="exportExcel">
<Icon name="ssidaochu" :size="14" />导出
</a-button>
</div>
<a-table
class="table-content"
:columns="selectedColumns"
:data-source="selectedRows"
:scroll="{ x: '100%', y: 450 }"
:pagination="false"
>
<template slot="status" slot-scope="text">
<span :style="{color: text == 2 ? 'red' : ''}">{{ text==1?'有效':text==2?'无效':'' }}</span>
</template>
<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 <a-form-model
ref="searchForm" ref="searchForm"
layout="inline" layout="inline"
...@@ -195,8 +149,8 @@ ...@@ -195,8 +149,8 @@
:wrapperCol="{ span: 16 }" :wrapperCol="{ span: 16 }"
:model="searchForm" :model="searchForm"
> >
<a-row :gutter="30"> <a-row>
<a-col :lg="5" :sm="10"> <a-col :lg="4" :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"
...@@ -206,7 +160,7 @@ ...@@ -206,7 +160,7 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="4" :sm="10"> <a-col :lg="4" :sm="12">
<a-form-model-item label="病历号"> <a-form-model-item label="病历号">
<a-input <a-input
v-model="searchForm.mrnNo" v-model="searchForm.mrnNo"
...@@ -227,8 +181,8 @@ ...@@ -227,8 +181,8 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="4" :sm="12"> <a-col :lg="4" :sm="12">
<a-form-model-item label="状态"> <a-form-model-item label="状态" :labelCol="{ span: 7 }" :wrapperCol="{ span: 14 }">
<a-select style="width: 160px;" v-model="searchForm.rStatus" placeholder="请选择状态" allowClear> <a-select v-model="searchForm.rStatus" placeholder="请选择状态" allowClear>
<a-select-option v-for="item in statusOptions" :key="item.code" :value="item.code"> <a-select-option v-for="item in statusOptions" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
...@@ -245,38 +199,77 @@ ...@@ -245,38 +199,77 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="2" :sm="12"> <a-col class="flex-col" :lg="4" :sm="12">
<div class="btn-div mar-bottom10 none-label"> <div>
<a-button type="primary" @click="_getNewEOBList"> <a-button type="primary" @click="searchData">
<Icon name="ssisearch_active" :size="14" />查询 <Icon name="ssisearch_active" :size="14" />查询
</a-button> </a-button>
</div> </div>
<div v-if="activeKey1 === '0' && selectedRows.length > 0">
<a-button type="primary" @click="exportExcel">
<Icon name="ssidaochu" :size="14" />导出
</a-button>
</div>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
</a-row> </a-row>
<div class="table-title">账单列表</div> </div>
<!-- 已关联账单 -->
<template v-if="activeKey1 === '0'">
<template v-if="selectedRows.length > 0">
<div class="all-list_box">
<a-table
class="table-content"
:rowClassName="rowClassName"
:columns="selectedColumns"
:data-source="selectedRows"
:rowKey="'id'"
:scroll="{ x: '100%', y: tableHeight }"
:pagination="false"
>
<template slot="status" slot-scope="text">
<span :style="{ color: text == 2 ? 'red' : '' }">{{
text == 1 ? '有效' : text == 2 ? '无效' : ''
}}</span>
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" class="danger" @click.stop="delRecord(record, index)">删除</a-button>
</template>
</a-table>
</div>
</template>
<div class="all-list_box no-data" v-else><a-empty :image="simpleImage" /></div>
</template>
<template v-else>
<!-- table -->
<template v-if="isEdit">
<div class="all-list_box">
<a-table <a-table
class="table-content all-list"
:columns="columns" :columns="columns"
:data-source="dataList" :data-source="dataList"
:scroll="{ x: '100%', y: 300 }" :scroll="{ x: '100%', y: tableHeight1 }"
:pagination="false" :pagination="false"
:rowKey="'id'" :rowKey="'id'"
:row-selection="{ :row-selection="{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onSelect: onSelectChange, onSelect: onSelectChange,
onSelectAll: onSelectAll, onSelectAll: onSelectAll
}" }"
> >
<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> </a-table>
<BurtPagination <BurtPagination class="pagination" :pagination="pagination" @pageChange="pageChange" />
:pagination="pagination" </div>
@pageChange="pageChange" </template>
/>
</template> </template>
</a-tab-pane>
</a-tabs>
</div> </div>
</template> </template>
</a-tab-pane> </a-tab-pane>
...@@ -293,12 +286,17 @@ ...@@ -293,12 +286,17 @@
</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 {
...@@ -306,13 +304,13 @@ export default { ...@@ -306,13 +304,13 @@ export default {
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: [],
...@@ -321,106 +319,129 @@ export default { ...@@ -321,106 +319,129 @@ export default {
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',
],
activeKey: "0",
statusOptions: [ statusOptions: [
{ {
name: '无效', name: '无效',
code:2 code: 2
}, },
{ {
name: '有效', name: '有效',
code: 1 code: 1
} }
] ],
tableHeight: 200, // 已关联账单表格高度
tableHeight1: 200 // 全部账单表格高度
}; };
}, },
mixins: [mixins], mixins: [mixins],
components: { components: {
Goback, Goback,
BurtPagination, BurtPagination
}, },
computed: { computed: {
panes1() {
const panes = [{ title: '已关联账单', key: '0', show: true, content: 'Associated' }];
if (this.isEdit) {
panes.push({ title: '全部账单', key: '1', show: false, content: 'Insurance' });
}
return panes;
},
columns() { columns() {
const base = [ const base = [
{ {
title: "账单编号", title: '账单日期',
dataIndex: "receiptNo", dataIndex: 'receiptDate',
ellipsis: true, ellipsis: true,
width: 150, width: 160,
fixed: 'left'
}, },
{ {
title: "账单状态", title: '账单状态',
dataIndex: "status", dataIndex: 'status',
ellipsis: true, ellipsis: true,
width: 150 width: 100,
,scopedSlots: { customRender: "status" } fixed: 'left',
scopedSlots: { customRender: 'status' }
}, },
{ title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 195 },
{ {
title: "客户姓名", title: '客户姓名',
dataIndex: "patientName", dataIndex: 'patientName',
ellipsis: true, ellipsis: true,
width: 160, fixed: 'left',
width: 180
}, },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 195 }, { title: '病历号', dataIndex: 'mrnNo', ellipsis: true, width: 195 },
{ title: '保险公司', dataIndex: 'payorName', ellipsis: true, width: 195 },
{ {
title: "账单日期", title: '账单编号',
dataIndex: "receiptDate", dataIndex: 'receiptNo',
ellipsis: true, ellipsis: true,
width: 180, width: 150
}, },
{ {
title: "收银", title: '理赔账单金额',
dataIndex: "receiptTellerName", dataIndex: 'actualAmount',
ellipsis: true, ellipsis: true,
width: 120, width: 150
}, },
{ {
title: "理赔账单金额", title: '收银',
dataIndex: "actualAmount", dataIndex: 'receiptTellerName',
ellipsis: true, ellipsis: true,
width: 150, width: 120
}, },
{ {
title: "回款金额", title: '回款金额',
dataIndex: "writeOffAmount", dataIndex: 'writeOffAmount',
ellipsis: true, ellipsis: true,
width: 150, width: 150
}, },
{ {
title: "个人欠费", title: '个人欠费',
dataIndex: "arrearsAmountShow", dataIndex: 'arrearsAmountShow',
ellipsis: true, ellipsis: true,
width: 150, width: 150,
customRender: (val) => {
return <span style="color: red;">{val}</span>;
}
}, },
{ {
title: "未清余额", title: '备注',
dataIndex: "residueBackAmount", dataIndex: 'remark',
ellipsis: true, ellipsis: true,
width: 150, width: 200,
customRender: (val) => {
return <span style="color: red;">{val}</span>;
}
}, },
{
title: '未清余额',
dataIndex: 'residueBackAmount',
ellipsis: true,
width: 150
}
]; ];
return base; return base;
}, },
...@@ -428,8 +449,8 @@ export default { ...@@ -428,8 +449,8 @@ export default {
const base = JSON.parse(JSON.stringify(this.columns)); const base = JSON.parse(JSON.stringify(this.columns));
const changeAmount = this.changeAmount; const changeAmount = this.changeAmount;
base[8] = { base[8] = {
title: "回款金额", title: '回款金额',
dataIndex: "backAmount", dataIndex: 'backAmount',
ellipsis: true, ellipsis: true,
width: 150, width: 150,
customRender: (val, row) => { customRender: (val, row) => {
...@@ -438,63 +459,91 @@ export default { ...@@ -438,63 +459,91 @@ export default {
v-model={row.backAmount} v-model={row.backAmount}
allow-clear allow-clear
disabled={!this.isEdit} disabled={!this.isEdit}
style={{"color": row.backAmount == row.currentReceiptAmount ? '' : 'red'}} style={{ color: row.backAmount == row.currentReceiptAmount ? '' : 'red' }}
onBlur={() => { onBlur={() => {
changeAmount(row); changeAmount(row, 'backAmount');
}} }}
/> />
); );
}, }
}; };
base[10] = { base[10].customRender = (val, row) => {
title: "未清余额", return (
dataIndex: "residueBackAmount", <div>
{this.isEdit ? (
<a-popover title="备注" trigger="click">
<template slot="content">
<a-textarea
class="remark_inp red_inp"
v-model={row.remark}
auto-size={{ minRows: 3, maxRows: 5 }}
allow-clear
disabled={!this.isEdit}
></a-textarea>
</template>
<a-tooltip>
<template slot="title">{row.remark}</template>
<a-input class="red_inp" v-model={row.remark} allow-clear disabled={!this.isEdit} />
</a-tooltip>
</a-popover>
) : (
<a-tooltip>
<template slot="title">{row.remark}</template>
<a-input v-model={row.remark} disabled />
</a-tooltip>
)}
</div>
);
};
base[11] = {
title: '未清余额',
dataIndex: 'residueBackAmount',
ellipsis: true, ellipsis: true,
width: 150, width: 150,
customRender: (val, row) => { customRender: (val, row) => {
const residueBackAmount = const residueBackAmount =
Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0) - Number(row.arrearsAmount || 0); Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0) - Number(row.arrearsAmount || 0);
return Number(residueBackAmount.toFixed(2)); return Number(residueBackAmount.toFixed(2));
}, }
}; };
base[9] = { base[9] = {
title: "个人欠费", title: '个人欠费',
dataIndex: "arrearsAmount", dataIndex: 'arrearsAmount',
ellipsis: true, ellipsis: true,
width: 150, width: 150,
customRender: (val, row) => { customRender: (val, row) => {
return ( return (
<a-input-number <a-input-number
class="red_inp"
v-model={row.arrearsAmount} v-model={row.arrearsAmount}
allow-clear allow-clear
disabled={!this.isEdit} disabled={!this.isEdit}
onBlur={() => { onBlur={() => {
changeAmount(row); changeAmount(row, 'arrearsAmount');
}} }}
/> />
); );
}, }
}; };
base.splice(8, 0, { base.splice(8, 0, {
title: "余末金额", title: '余末金额',
dataIndex: "currentReceiptAmount", dataIndex: 'currentReceiptAmount',
ellipsis: true, ellipsis: true,
width: 150, width: 150
}); });
base.push({ base.push({
title: "回款日期", title: '回款日期',
dataIndex: "backDate", dataIndex: 'backDate',
ellipsis: true, ellipsis: true,
width: 150, width: 150
}); });
if (this.isEdit) { if (this.isEdit) {
base.push({ base.push({
title: "操作", title: '操作',
dataIndex: "operation", dataIndex: 'operation',
fixed: "right", fixed: 'right',
width: 100, width: 100,
scopedSlots: { customRender: "operation" }, scopedSlots: { customRender: 'operation' }
}); });
} }
return base; return base;
...@@ -506,21 +555,18 @@ export default { ...@@ -506,21 +555,18 @@ export default {
totalMoney -= Number(item.backAmount); totalMoney -= Number(item.backAmount);
}); });
return Number(totalMoney.toFixed(2)); return Number(totalMoney.toFixed(2));
}, }
}, },
created() { created() {
this.simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
const { backMoneyNo, isEdit } = this.$route.query; const { backMoneyNo, isEdit } = this.$route.query;
this.backMoneyNo = backMoneyNo; this.backMoneyNo = backMoneyNo;
this.isEdit = isEdit; this.isEdit = isEdit;
this._getCompanyOptions(); this._getCompanyOptions();
if (backMoneyNo) { if (backMoneyNo) {
const backMoneyDataDetail = JSON.parse( const backMoneyDataDetail = JSON.parse(localStorage.getItem('backMoneyDataDetail') || '{}');
localStorage.getItem("backMoneyDataDetail") || "{}"
);
this.form = backMoneyDataDetail; this.form = backMoneyDataDetail;
this.form.backDate = this.form.backDate this.form.backDate = this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00') : null;
? moment(this.form.backDate).format("YYYY-MM-DD 00:00:00")
: null;
// 如果有上传附件则显示列表 // 如果有上传附件则显示列表
if (backMoneyDataDetail.fileList) { if (backMoneyDataDetail.fileList) {
...@@ -528,27 +574,51 @@ export default { ...@@ -528,27 +574,51 @@ export default {
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();
} }
},
mounted() {
this.calcTableHeight();
this._getNewEOBList(); this._getNewEOBList();
}, },
methods: { methods: {
moment, moment,
// 计算表格最大高度
calcTableHeight() {
const dom = this.$refs.burt;
const containterH = dom.clientHeight;
const gobackH = document.querySelector('.back-container').clientHeight;
const style = window.getComputedStyle(dom, null);
const paddingT = parseFloat(style.getPropertyValue('padding-top'));
const paddingB = parseFloat(style.getPropertyValue('padding-bottom'));
const paddingSum = paddingT + paddingB;
this.tableHeight = containterH - 300 - gobackH - paddingSum;
this.tableHeight1 = containterH - 340 - gobackH - paddingSum;
// 设置每页展示条数
const pageSize = Math.floor((this.tableHeight1 - 10) / 32);
this.$set(this.pagination, 'pageSize', pageSize);
},
// 已关联账单表格行类名
rowClassName(record) {
return record.hidden ? 'hide_' : '';
},
// 账单查询
searchData() {
this._getNewEOBList();
this.getData();
},
// 选择框筛选 // 选择框筛选
filterCode(input, option) { filterCode(input, option) {
return ( return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
}, },
paneChange() { paneChange() {
this.$refs.ruleForm[0].clearValidate();
this.panes.forEach((item) => { this.panes.forEach((item) => {
item.show = false; item.show = false;
}); });
...@@ -559,45 +629,50 @@ export default { ...@@ -559,45 +629,50 @@ export default {
this.selectedRows.forEach((item) => { this.selectedRows.forEach((item) => {
totalMoney -= Number(item.backAmount); totalMoney -= Number(item.backAmount);
}); });
if(totalMoney < 0){ if (totalMoney < 0) {
this.$message.error('可核销余额不足') this.$message.error('可核销余额不足');
} }
if (Number(row.actualAmount || 0) - Number(row.backAmount || 0) < 0) { if (Number(row.actualAmount || 0) - Number(row.backAmount || 0) < 0) {
this.$message.warning("录入账单回款金额大于账单金额"); this.$message.warning('录入账单回款金额大于账单金额');
} }
}, },
onSelectChange(selectedRow, selected) { onSelectChange(selectedRow, selected) {
selectedRow['backAmount'] = this.residueBackAmount > selectedRow.currentReceiptAmount ? selectedRow.currentReceiptAmount: this.residueBackAmount; selectedRow['backAmount'] =
this.residueBackAmount > selectedRow.currentReceiptAmount
? selectedRow.currentReceiptAmount
: this.residueBackAmount;
if (selected) { if (selected) {
this.selectedRowKeys.push(selectedRow.id); this.selectedRowKeys.push(selectedRow.id);
this.selectedRows.push(selectedRow); this.selectedRows.push(selectedRow);
} else { } else {
const index = this.selectedRowKeys.findIndex( const index = this.selectedRowKeys.findIndex((item) => item === selectedRow.id);
(item) => item === selectedRow.id
);
this.selectedRowKeys.splice(index, 1); this.selectedRowKeys.splice(index, 1);
this.selectedRows.splice(index, 1); this.selectedRows.splice(index, 1);
this._confirmDelReceipt([selectedRow]); this._confirmDelReceipt([selectedRow]);
} }
this.addNewEvt(0) this.addNewEvt(0);
}, },
onSelectAll(selected, selectedRows, changeRows) { onSelectAll(selected, selectedRows, changeRows) {
console.log(selected, selectedRows, changeRows);
if (selected) { if (selected) {
this.selectedRowKeys = this.selectedRowKeys.concat( this.selectedRowKeys = this.selectedRowKeys.concat(changeRows.map((item) => item.id));
changeRows.map((item) => item.id) changeRows.forEach((item) => {
); const obj = {
this.selectedRows = this.selectedRows.concat(changeRows); ...item,
backAmount:
this.residueBackAmount > item.currentReceiptAmount ? item.currentReceiptAmount : this.residueBackAmount
};
this.selectedRows.push(obj);
});
// this.selectedRows = this.selectedRows.concat(chgRows);
} else { } else {
changeRows.forEach((item) => { changeRows.forEach((item) => {
const findIndex = this.selectedRowKeys.findIndex( const findIndex = this.selectedRowKeys.findIndex((rowId) => rowId === item.id);
(rowId) => rowId === item.id
);
this.selectedRowKeys.splice(findIndex, 1); this.selectedRowKeys.splice(findIndex, 1);
this.selectedRows.splice(findIndex, 1); this.selectedRows.splice(findIndex, 1);
}); });
this._confirmDelReceipt(changeRows); this._confirmDelReceipt(changeRows);
} }
this.addNewEvt(0);
}, },
delRecord(record, index) { delRecord(record, index) {
this.selectedRowKeys.splice(index, 1); this.selectedRowKeys.splice(index, 1);
...@@ -608,29 +683,25 @@ export default { ...@@ -608,29 +683,25 @@ export default {
} }
}, },
_confirmDelReceipt(records) { _confirmDelReceipt(records) {
console.log(records);
if (!this.backMoneyNo) return; if (!this.backMoneyNo) return;
const receiptVoList = records const receiptVoList = records
.filter((item) => { .filter((item) => {
const findIndex = this.relatedList.findIndex( const findIndex = this.relatedList.findIndex((rowId) => rowId === item.id);
(rowId) => rowId === item.id
);
return findIndex > -1; return findIndex > -1;
}) })
.map((item) => { .map((item) => {
return { return {
id: item.id, id: item.id
}; };
}); });
console.log(receiptVoList);
if (receiptVoList.length === 0) return; if (receiptVoList.length === 0) return;
this.$apis this.$apis
.DELETERECEIPTRECORD({ .DELETERECEIPTRECORD({
backMoneyNo: this.backMoneyNo, backMoneyNo: this.backMoneyNo,
receiptVoList, receiptVoList
}) })
.then((res) => { .then((res) => {
if (res.returnCode == "0000") { if (res.returnCode == '0000') {
this._getNewEOBList(); this._getNewEOBList();
} else { } else {
this.$message.error(res.returnMsg); this.$message.error(res.returnMsg);
...@@ -639,20 +710,17 @@ export default { ...@@ -639,20 +710,17 @@ export default {
}, },
// 修改保险公司 // 修改保险公司
changePayor() { changePayor() {
if ( if (this.selectedRowKeys.length > 0 && (this.form.id || this.savedStatus)) {
this.selectedRowKeys.length > 0 &&
(this.form.id || this.savedStatus)
) {
this.$modal.confirm({ this.$modal.confirm({
title: "提示", title: '提示',
content: "是否解除已关联账单", content: '是否解除已关联账单',
okText: "确认", okText: '确认',
cancelText: "取消", cancelText: '取消',
onOk: () => { onOk: () => {
this.selectedRowKeys = []; this.selectedRowKeys = [];
this.selectedRows = []; this.selectedRows = [];
}, },
onCancel: () => {}, onCancel: () => {}
}); });
} }
this._getNewEOBList(); this._getNewEOBList();
...@@ -660,7 +728,7 @@ export default { ...@@ -660,7 +728,7 @@ export default {
pageChange(pager) { pageChange(pager) {
this.pagination = { this.pagination = {
...this.pagination, ...this.pagination,
...pager, ...pager
}; };
this._getNewEOBList(); this._getNewEOBList();
}, },
...@@ -672,22 +740,33 @@ export default { ...@@ -672,22 +740,33 @@ export default {
}, },
// 获取已关联的账单 // 获取已关联的账单
getData() { getData() {
if (!this.backMoneyNo) {
if (this.activeKey1 === '0') {
this.$message.error('暂未关联账单,请在全部账单中添加账单');
}
return;
}
let billDate = this.searchForm.billDate || [];
this.$apis this.$apis
.QUERYBACKRECEIPTLIST({ .QUERYBACKRECEIPTLIST({
pageNum: 1, pageNum: 1,
pageSize: 999, pageSize: 999,
backMoneyNo: this.backMoneyNo, 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) => { .then((res) => {
if (res.returnCode == "0000") { if (res.returnCode == '0000') {
const list = res.content.list || []; const list = res.content.list || [];
this.selectedRowKeys = list.map((d) => d.id); let ids = [];
this.selectedRows = list.map((item) => { this.selectedRows = list.map((item) => {
item.relationed = true; item.relationed = true;
ids.push(item.id);
return item; return item;
}); });
this.relatedList = list.map((d) => d.id); this.selectedRowKeys = this.$lodash.cloneDeep(ids);
this.relatedList = this.$lodash.cloneDeep(ids);
} else { } else {
this.$message.error(res.returnMsg); this.$message.error(res.returnMsg);
} }
...@@ -703,17 +782,18 @@ export default { ...@@ -703,17 +782,18 @@ export default {
backMoneyNo: this.backMoneyNo, backMoneyNo: this.backMoneyNo,
payorCode: this.form.payorCode, payorCode: this.form.payorCode,
...this.searchForm, ...this.searchForm,
receiptEndDate: billDate[1] ? billDate[1] + " 23:59:59" : undefined, receiptEndDate: billDate[1] ? billDate[1] + ' 23:59:59' : undefined,
receiptStartDate: billDate[0] ? billDate[0] + " 00:00:00" : undefined, receiptStartDate: billDate[0] ? billDate[0] + ' 00:00:00' : undefined
}) })
.then((res) => { .then((res) => {
if (res.returnCode == "0000") { if (res.returnCode == '0000') {
let content = res.content || {}; let content = res.content || {};
this.pagination.total = content.total || 0; this.pagination.total = content.total || 0;
this.dataList = content.list.map(item => { this.dataList =
item.arrearsAmountShow = item.arrearsAmount content.list.map((item) => {
item.arrearsAmount = '' item.arrearsAmountShow = item.arrearsAmount;
return item item.arrearsAmount = '';
return item;
}) || []; }) || [];
} else { } else {
this.$message.error(res.returnMsg); this.$message.error(res.returnMsg);
...@@ -722,21 +802,16 @@ export default { ...@@ -722,21 +802,16 @@ export default {
}, },
//新建/保存回款 //新建/保存回款
addNewEvt(backStatus) { addNewEvt(backStatus) {
return new Promise((resolve, reject) => {
console.log(this.selectedRows);
if (!this.form.payorCode) { if (!this.form.payorCode) {
this.$message.warning("请选择保险公司"); this.$message.warning('请选择保险公司');
reject();
return; return;
} }
if (!this.form.backDate) { if (!this.form.backDate) {
this.$message.warning("请选择回款日期"); this.$message.warning('请选择回款日期');
reject();
return; return;
} }
if (!this.form.backAmountCny) { if (!this.form.backAmountCny && this.form.backAmountCny !== 0) {
this.$message.warning("请输入回款金额"); this.$message.warning('请输入回款金额(人民币)');
reject();
return; return;
} }
let receiptVoList = this.selectedRows.map((item) => { let receiptVoList = this.selectedRows.map((item) => {
...@@ -744,54 +819,50 @@ export default { ...@@ -744,54 +819,50 @@ export default {
id: item.id, id: item.id,
backAmount: item.backAmount, backAmount: item.backAmount,
arrearsAmount: item.arrearsAmount, arrearsAmount: item.arrearsAmount,
remark: item.remark
}; };
}); });
const valid = receiptVoList.some((item) => { const flag = receiptVoList.some((item) => {
const exist = !item.backAmount && item.backAmount !== 0 const exist = !item.backAmount && item.backAmount !== 0;
return exist; return exist;
}); });
if (valid) { if (flag) {
this.$message.warning("存在关联账单未输入回款金额"); this.$message.warning('存在关联账单未输入回款金额');
reject();
return; 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, //回款编号 backMoneyNo: this.backMoneyNo, //回款编号
backStatus, // 0暂存 1结案 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 ? '结案' : '暂存';
if (res.returnCode == '0000') {
this.backMoneyNo = res.content; this.backMoneyNo = res.content;
this.savedStatus = true; this.savedStatus = true;
this.$message.success("成功"); this.$message.success(`${msg}成功`);
this.selectedRowKeys = []; this.selectedRowKeys = [];
this.getData(); this.getData();
this._getNewEOBList(); this._getNewEOBList();
// this.$router.go(-1); // this.$router.go(-1);
resolve();
} else { } else {
this.$message.error(res.returnMsg); this.$message.error(res.returnMsg);
reject();
} }
}); });
});
}, },
/* ======== 上传区域 ======== */ /* ======== 上传区域 ======== */
...@@ -799,7 +870,7 @@ export default { ...@@ -799,7 +870,7 @@ export default {
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;
...@@ -818,14 +889,14 @@ export default { ...@@ -818,14 +889,14 @@ export default {
// 上传文件 // 上传文件
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);
...@@ -833,20 +904,20 @@ export default { ...@@ -833,20 +904,20 @@ export default {
}); });
}, },
//导出报表 //导出报表
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>
...@@ -857,21 +928,36 @@ export default { ...@@ -857,21 +928,36 @@ export default {
opacity: 0; opacity: 0;
} }
} }
.table-title { .all-list_box {
font-size: 15px; height: calc(100vh - 400px);
margin: 6px 0; overflow-y: auto;
&.no-data {
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
justify-content: space-between; 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);
...@@ -886,22 +972,66 @@ export default { ...@@ -886,22 +972,66 @@ export default {
height: calc(100vh - 86px); height: calc(100vh - 86px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-bottom: 10px;
::v-deep { ::v-deep {
.ant-form-item {
display: flex;
&.ant-form-item-with-help {
margin-bottom: 0;
}
}
.ant-tabs { .ant-tabs {
flex: 1; flex: 1;
min-height: 0; 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