Commit dc241fcc authored by 沈翠玲's avatar 沈翠玲

优化需求

parent 2cf2496c
......@@ -380,6 +380,14 @@
});
const changeNum = (row) => {
row.payAmount = (Decimal(row.loan.remainingAmount).sub(Decimal(row.reduceAmount))).toNumber();
if(row.payAmount < 0) {
row.reduceAmount = row.loan.remainingAmount
row.payAmount = 0
ElMessage.warning({
message: '该案件减免金额不能大于委案金额',
plain: true,
});
}
form.totalReduceAmount = 0;
form.remainingAmount = 0;
selectdList.value.forEach((item) => {
......@@ -439,7 +447,12 @@
plain: true,
});
const list = JSON.parse(JSON.stringify(selectdList.value));
if (!list || list.length === 0) {
return ElMessage.warning({
message: '至少勾选一个案件',
plain: true,
});
}
list.forEach((item) => {
delete item.payAmount;
});
......
......@@ -68,7 +68,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="w-full" label="实际还款时间:" prop="name">
<el-form-item class="w-full" label="实际还款时间:" prop="realRepayTime">
<el-date-picker
v-model="form.realRepayTime"
class="w-full"
......@@ -79,7 +79,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="w-full" label="付款凭证:" prop="name">
<el-form-item class="w-full" label="付款凭证:" required>
<el-upload
v-model:file-list="form.images"
:action="url"
......@@ -306,6 +306,10 @@
dialogVisible.value = true;
};
const submitForm = () => {
if(!form.images || form.images.length === 0) return ElMessage.warning({
message: '付款凭证必须上传',
plain: true,
});
let images = JSON.parse(JSON.stringify(form.images.map((v) => v.url)));
images = images.map((v) => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '');
......
......@@ -563,7 +563,12 @@
message: '分期金额要大于本批次的分期最低金额',
plain: true,
});
if (!selectdList.value || selectdList.value.length === 0) {
return ElMessage.warning({
message: '至少勾选一个案件',
plain: true,
});
}
let images = form.images.map((v) => v.url);
images = images.map((v) => {
return v.replace(envs.VITE_GLOB_API_URL_PREFIX + '/sys/static/', '');
......
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