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

优化需求

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