Commit 84f7b49a authored by 王安伟's avatar 王安伟

【商保系统】-回款管理-账单列表和已关联账单样式调整

parent c096c57c
This diff is collapsed.
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<Goback ref="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">
<a-form-model ref="form" :model="form"> <a-form-model ref="ruleForm" :model="form" :rules="rules">
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="7" :sm="12"> <a-col :lg="7" :sm="12">
<a-form-model-item label="保险公司"> <a-form-model-item label="保险公司" prop="payorCode">
<a-select <a-select
v-model="form.payorCode" v-model="form.payorCode"
placeholder="请选择保险公司" placeholder="请选择保险公司"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</a-col> </a-col>
<template v-if="activeKey === '0'"> <template v-if="activeKey === '0'">
<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"
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</a-col> </a-col>
</template> </template>
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="回款金额(人民币)"> <a-form-model-item label="回款金额(人民币)" prop="backAmountCny">
<a-input <a-input
type="number" type="number"
v-model="form.backAmountCny" v-model="form.backAmountCny"
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
</a-table> </a-table>
</div> </div>
</template> </template>
<div class="all-list_box no-data" v-else>暂未关联,前往全部账单关联</div>
</template> </template>
<template v-else> <template v-else>
<!-- table --> <!-- table -->
...@@ -257,10 +258,6 @@ const panes = [ ...@@ -257,10 +258,6 @@ const panes = [
{ title: '基础信息', key: '0', show: true, content: 'PaymentClaims' }, { title: '基础信息', key: '0', show: true, content: 'PaymentClaims' },
{ title: '账单列表', key: '1', show: false, content: 'Insurance' } { title: '账单列表', key: '1', show: false, content: 'Insurance' }
]; ];
const panes1 = [
{ title: '已关联账单', key: '0', show: true, content: 'Associated' },
{ title: '全部账单', key: '1', show: false, content: 'Insurance' }
];
export default { export default {
data() { data() {
return { return {
...@@ -288,9 +285,10 @@ export default { ...@@ -288,9 +285,10 @@ export default {
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: {
...@@ -302,7 +300,6 @@ export default { ...@@ -302,7 +300,6 @@ export default {
relatedList: [], relatedList: [],
panes: Object.seal(panes), panes: Object.seal(panes),
panes1: Object.seal(panes1),
activeKey: '0', activeKey: '0',
activeKey1: '0', activeKey1: '0',
statusOptions: [ statusOptions: [
...@@ -324,34 +321,44 @@ export default { ...@@ -324,34 +321,44 @@ export default {
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,
fixed: 'left',
scopedSlots: { customRender: 'status' } scopedSlots: { customRender: 'status' }
}, },
{ title: '病历号', dataIndex: 'mrnNo', ellipsis: true, width: 195 },
{ {
title: '客户姓名', title: '客户姓名',
dataIndex: 'patientName', dataIndex: 'patientName',
ellipsis: true, ellipsis: true,
width: 160 width: 120,
fixed: 'left'
}, },
{ title: '病历号', dataIndex: 'mrnNo', ellipsis: true, width: 195 },
{ title: '保险公司', dataIndex: 'payorName', 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: '收银',
...@@ -554,6 +561,7 @@ export default { ...@@ -554,6 +561,7 @@ export default {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; return 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;
}); });
...@@ -589,10 +597,16 @@ export default { ...@@ -589,10 +597,16 @@ export default {
this.addNewEvt(0); this.addNewEvt(0);
}, },
onSelectAll(selected, selectedRows, changeRows) { onSelectAll(selected, selectedRows, changeRows) {
console.log(selected, selectedRows, changeRows); let chgRows = changeRows.map((item) => {
return {
...item,
backAmount:
this.residueBackAmount > item.currentReceiptAmount ? item.currentReceiptAmount : this.residueBackAmount
};
});
if (selected) { if (selected) {
this.selectedRowKeys = this.selectedRowKeys.concat(changeRows.map((item) => item.id)); this.selectedRowKeys = this.selectedRowKeys.concat(changeRows.map((item) => item.id));
this.selectedRows = this.selectedRows.concat(changeRows); this.selectedRows = this.selectedRows.concat(chgRows);
} else { } else {
changeRows.forEach((item) => { changeRows.forEach((item) => {
const findIndex = this.selectedRowKeys.findIndex((rowId) => rowId === item.id); const findIndex = this.selectedRowKeys.findIndex((rowId) => rowId === item.id);
...@@ -601,6 +615,7 @@ export default { ...@@ -601,6 +615,7 @@ export default {
}); });
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);
...@@ -670,6 +685,10 @@ export default { ...@@ -670,6 +685,10 @@ export default {
}, },
// 获取已关联的账单 // 获取已关联的账单
getData() { getData() {
if (!this.backMoneyNo) {
this.$message.error('暂未关联账单,请在全部账单中添加账单');
return;
}
let billDate = this.searchForm.billDate || []; let billDate = this.searchForm.billDate || [];
this.$apis this.$apis
.QUERYBACKRECEIPTLIST({ .QUERYBACKRECEIPTLIST({
...@@ -727,73 +746,65 @@ export default { ...@@ -727,73 +746,65 @@ export default {
}, },
//新建/保存回款 //新建/保存回款
addNewEvt(backStatus) { addNewEvt(backStatus) {
return new Promise((resolve, reject) => { if (!this.form.payorCode) {
if (!this.form.payorCode) { this.$message.warning('请选择保险公司');
this.$message.warning('请选择保险公司'); return;
reject(); }
return; if (!this.form.backDate) {
} this.$message.warning('请选择回款日期');
if (!this.form.backDate) { return;
this.$message.warning('请选择回款日期'); }
reject(); if (!this.form.backAmountCny) {
return; this.$message.warning('请输入回款金额(人民币)');
} return;
if (!this.form.backAmountCny) { }
this.$message.warning('请输入回款金额'); let receiptVoList = this.selectedRows.map((item) => {
reject(); return {
return; id: item.id,
} backAmount: item.backAmount,
let receiptVoList = this.selectedRows.map((item) => { arrearsAmount: item.arrearsAmount,
return { remark: item.remark
id: item.id,
backAmount: item.backAmount,
arrearsAmount: item.arrearsAmount,
remark: item.remark
};
});
const valid = receiptVoList.some((item) => {
const exist = !item.backAmount && item.backAmount !== 0;
return exist;
});
if (valid) {
this.$message.warning('存在关联账单未输入回款金额');
reject();
return;
}
const formData = {
...this.form,
receiptVoList,
backDate: this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD HH:mm:ss') : '',
backMoneyNo: this.backMoneyNo, //回款编号
backStatus // 0暂存 1结案
}; };
});
const flag = receiptVoList.some((item) => {
const exist = !item.backAmount && item.backAmount !== 0;
return exist;
});
if (flag) {
this.$message.warning('存在关联账单未输入回款金额');
return;
}
// 上传附件格式转换 const formData = {
formData.fileList = this.fileList.map((d) => { ...this.form,
const file = { receiptVoList,
fileName: d.name, backDate: this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD HH:mm:ss') : '',
fileUrl: d.url backMoneyNo: this.backMoneyNo, //回款编号
}; backStatus // 0暂存 1结案
return file; };
});
this.$apis.SAVEBACKMONEY(formData).then((res) => { // 上传附件格式转换
if (res.returnCode == '0000') { formData.fileList = this.fileList.map((d) => {
this.backMoneyNo = res.content; const file = {
this.savedStatus = true; fileName: d.name,
this.$message.success('成功'); fileUrl: d.url
this.selectedRowKeys = []; };
this.getData(); return file;
this._getNewEOBList(); });
// this.$router.go(-1); this.$apis.SAVEBACKMONEY(formData).then((res) => {
resolve(); if (res.returnCode == '0000') {
} else { this.backMoneyNo = res.content;
this.$message.error(res.returnMsg); this.savedStatus = true;
reject(); this.$message.success('成功');
} this.selectedRowKeys = [];
}); this.getData();
this._getNewEOBList();
// this.$router.go(-1);
} else {
this.$message.error(res.returnMsg);
}
}); });
}, },
...@@ -863,6 +874,12 @@ export default { ...@@ -863,6 +874,12 @@ export default {
.all-list_box { .all-list_box {
height: calc(100vh - 430px); height: calc(100vh - 430px);
overflow-y: auto; overflow-y: auto;
&.no-data {
display: flex;
justify-content: center;
align-items: center;
color: red;
}
} }
.table-content { .table-content {
::v-deep { ::v-deep {
...@@ -902,6 +919,9 @@ export default { ...@@ -902,6 +919,9 @@ export default {
::v-deep { ::v-deep {
.ant-form-item { .ant-form-item {
display: flex; display: flex;
&.ant-form-item-with-help {
margin-bottom: 0;
}
} }
.ant-tabs { .ant-tabs {
flex: 1; flex: 1;
......
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