Commit 3dfc41fc authored by 王安伟's avatar 王安伟

Merge branch 'func_eccs_2250' into test

parents 94db2c8f 14c447ce
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
} from "ant-design-vue";
export default () => {
let els = [ export default () => {
Row, let els = [
Col, Row,
menu, Col,
dropdown, menu,
Table, dropdown,
message, Table,
pagination, message,
FormModel, pagination,
Select, FormModel,
DatePicker, Select,
Input, DatePicker,
InputNumber, Input,
Radio, InputNumber,
upload, Radio,
Button, upload,
notification, Button,
popconfirm, notification,
Modal, popconfirm,
modal, Modal,
Spin, modal,
Collapse, Spin,
Tabs, Collapse,
Tooltip Tabs,
]; Tooltip,
// 注册 Popover
els.forEach((item) => { ];
Vue.use(item); // 注册
}); els.forEach((item) => {
// 全局提示 Vue.use(item);
Vue.prototype.$msg = notification; });
Vue.prototype.$message = message; // 全局提示
Vue.prototype.$modal = Modal; Vue.prototype.$msg = notification;
}; Vue.prototype.$message = message;
Vue.prototype.$modal = Modal;
};
<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, { title: '个人欠费', dataIndex: 'arrearsAmountShow', width: 120 },
billRange: null, { title: '备注', dataIndex: 'remark', width: 180 },
returnRange: null, { title: '回款日期', dataIndex: 'eobBackDate', width: 120 },
form: { { title: '回款编号', dataIndex: 'backMoneyNo', width: 120 },
payorCode: '', { title: 'EOB号', dataIndex: 'eobNo', width: 120 },
mrnNo: '', { title: 'EOB备注', dataIndex: 'eobName', width: 120 },
patientName: '', { title: '账龄', dataIndex: 'diffDay', width: 120 }
receiptDateStart: '', ];
receiptDateEnd: '', return {
eobBackDateStart: '', columns,
eobBackDateEnd: '' billRange: null,
}, returnRange: null,
pageForm: {}, // 搜索form 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>
...@@ -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: '收银',
...@@ -416,14 +423,30 @@ export default { ...@@ -416,14 +423,30 @@ export default {
}; };
base[10].customRender = (val, row) => { base[10].customRender = (val, row) => {
return ( return (
<a-input <div>
v-model={row.remark} {this.isEdit ? (
allow-clear <a-popover title="备注" trigger="click">
disabled={!this.isEdit} <template slot="content">
onBlur={() => { <a-textarea
this.syncData(row); class="remark_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 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] = { base[11] = {
...@@ -536,14 +559,6 @@ export default { ...@@ -536,14 +559,6 @@ export default {
rowClassName(record) { rowClassName(record) {
return record.hidden ? 'hide_' : ''; return record.hidden ? 'hide_' : '';
}, },
// 已关联账单数据同步
syncData(row, field) {
this.selectedRows.forEach((item) => {
if (item.id === row.id) {
item[field] = row[field];
}
});
},
// 账单查询 // 账单查询
searchData() { searchData() {
this._getNewEOBList(); this._getNewEOBList();
...@@ -554,12 +569,13 @@ export default { ...@@ -554,12 +569,13 @@ 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;
}); });
this.panes[Number(this.activeKey)].show = true; this.panes[Number(this.activeKey)].show = true;
}, },
changeAmount(row, field) { changeAmount(row) {
let totalMoney = Number(this.form.backAmountCny || 0); let totalMoney = Number(this.form.backAmountCny || 0);
this.selectedRows.forEach((item) => { this.selectedRows.forEach((item) => {
totalMoney -= Number(item.backAmount); totalMoney -= Number(item.backAmount);
...@@ -570,7 +586,6 @@ export default { ...@@ -570,7 +586,6 @@ export default {
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('录入账单回款金额大于账单金额');
} }
this.syncData(row, field);
}, },
onSelectChange(selectedRow, selected) { onSelectChange(selectedRow, selected) {
selectedRow['backAmount'] = selectedRow['backAmount'] =
...@@ -589,10 +604,16 @@ export default { ...@@ -589,10 +604,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 +622,7 @@ export default { ...@@ -601,6 +622,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 +692,10 @@ export default { ...@@ -670,6 +692,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 +753,65 @@ export default { ...@@ -727,73 +753,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 +881,12 @@ export default { ...@@ -863,6 +881,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 +926,9 @@ export default { ...@@ -902,6 +926,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;
...@@ -930,4 +957,7 @@ export default { ...@@ -930,4 +957,7 @@ export default {
margin-bottom: 4px !important; margin-bottom: 4px !important;
} }
} }
.remark_inp {
width: 300px;
}
</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