Commit 14c447ce authored by 王安伟's avatar 王安伟

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

parent 84f7b49a
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;
};
...@@ -423,14 +423,30 @@ export default { ...@@ -423,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] = {
...@@ -543,14 +559,6 @@ export default { ...@@ -543,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();
...@@ -567,7 +575,7 @@ export default { ...@@ -567,7 +575,7 @@ export default {
}); });
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);
...@@ -578,7 +586,6 @@ export default { ...@@ -578,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'] =
...@@ -950,4 +957,7 @@ export default { ...@@ -950,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