Commit 100fd8e5 authored by 沈翠玲's avatar 沈翠玲

修改bug

parent 8954f8de
......@@ -70,8 +70,8 @@
"vue-router": "^4.5.0",
"vue3-count-to": "^1.1.2",
"vue3-print-nb": "^0.1.4",
"vxe-pc-ui": "^4.3.27",
"vxe-table": "^4.9.23",
"vxe-pc-ui": "^4.5.29",
"vxe-table": "4.12",
"ws": "^8.18.0"
},
"devDependencies": {
......
......@@ -98,6 +98,10 @@ export function setupVxeTabele(app) {
},
grid: {
size: 'small',
border: true,
minHeight: 400,
maxHeight: 900,
round: true
},
});
lazyVxeUI(app);
......
......@@ -144,7 +144,7 @@
<el-form-item class="w-full" label="还款总额:" prop="code">
<el-input
v-model="form.totalRepayAmount"
:disabled="currentDetail.flowStatus !== 'pending'"
:disabled="currentDetail.flowStatus !== 'pending' || !authButtonListGet.includes('stages_edit_btn')"
placeholder="请输入"
@change="changePeriod"
/>
......@@ -256,6 +256,7 @@
type="primary"
@click="editOrConfirm"
class="mr-1 my-2"
v-permission="'stages_edit_btn'"
v-if="currentDetail.flowStatus === 'pending'"
>{{ editFirst ? '确定' : '修改' }}</el-button
>
......@@ -403,6 +404,7 @@
console.log('other', other)
list.push({
period: i + 1,
id: splitdata.value[i].id,
playApplyDate: playApplyDate,
repayStatus: 'pending',
applyAmount: Decimal(form.totalRepayAmount).sub(Decimal(other)),
......@@ -410,6 +412,7 @@
} else {
list.push({
period: i + 1,
id: splitdata.value[i].id,
playApplyDate: playApplyDate,
repayStatus: 'pending',
applyAmount: crash,
......@@ -465,28 +468,17 @@
};
const options = ref([]);
const getPlatforms = (id) => {
for (let i = 2; i <= 6; i++) {
const maxStagesNum = Number(currentDetail.value.maxStagesNum) || 6;
for (let i = 2; i <= maxStagesNum; i++) {
options.value.push({
value: i,
label: i + '',
});
}
getByIdPlatforms(id).then((res) => {
if (res.success) {
if (res.result.maxStagesNum) {
const list = options.value.filter((v) => v.value > res.result.maxStagesNum);
list.forEach((e) => {
e['disabled'] = true;
});
}
if (res.result.minAmount) {
minAmount.value = res.result.minAmount;
}
}
//
});
minAmount.value = Number(currentDetail.value.minAmount);
};
const selectdList = ref([]);
const onCheckboxChange = (row) => {
selectdList.value = row.records;
......@@ -724,7 +716,7 @@
const arr = splitdata.value.filter((v) => v.applyAmount < minAmount.value);
if (arr.length > 0)
return ElMessage.warning({
message: '分期金额要大于借款平台的分期最低金额',
message: '分期金额要大于本批次的分期最低金额',
plain: true,
});
images = images.map((v) => {
......
......@@ -102,7 +102,8 @@
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="减免截止时间:" prop="code">
<el-date-picker v-model="form.applyDate" type="datetime" disabled />
<el-date-picker v-model="form.applyDate" type="datetime" disabled format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
......@@ -189,7 +190,7 @@
</el-row>
</el-form>
</div>
<div>
<div style="height: calc(100% - 300px);overflow: auto;">
<ProTable
:config="config"
ref="ProTableRef"
......@@ -375,7 +376,9 @@
return false;
},
},
minHeight: 200,
height: 230,
'min-height': 230,
autoResize: true,
columns: [
{ type: 'checkbox', title: '', width: '40px', fixed: 'left' },
{
......
......@@ -279,10 +279,10 @@
width: 140,
},
{
field: 'reduce.totalPayAmount',
field: 'repayAmount',
showOverflow: 'tooltip',
title: '应还金额',
search: { el: 'input', key: 'reduce.totalPayAmount', labelWidth: 90 },
search: { el: 'input', key: 'repayAmount', labelWidth: 90 },
width: 115,
},
{
......
......@@ -30,7 +30,8 @@
</el-col>
<el-col :span="12">
<el-form-item class="w-full" label="减免截止时间:" prop="code">
<el-date-picker v-model="form.applyDate" type="datetime" />
<el-date-picker v-model="form.applyDate" type="datetime" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
......@@ -116,7 +117,7 @@
</el-row>
</el-form>
<div>
<div style="height: calc(100% - 250px);overflow: auto;">
<ProTable
:config="config"
ref="ProTableRef"
......@@ -187,7 +188,7 @@
remark: '',
remainingAmount: 0,
commissionAmount: 0,
applyDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
applyDate: null,
});
const props = defineProps({
mergerCase: String,
......@@ -200,14 +201,14 @@
form.remainingAmount = 0;
form['commissionAmount'] = 0;
selectdList.value.forEach((item) => {
form.totalReduceAmount = Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)
form.totalReduceAmount = (Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)).toNumber()
);
form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.payAmount) || 0)
form.remainingAmount = (Decimal(form.remainingAmount).add(
Decimal(Number(item.payAmount) || 0)).toNumber()
);
form['commissionAmount'] = Decimal(form['commissionAmount']).add(
Decimal(item?.loan?.commissionAmount)
form['commissionAmount'] = (Decimal(form['commissionAmount']).add(
Decimal(item?.loan?.commissionAmount)).toNumber()
);
});
};
......@@ -268,14 +269,14 @@
form.remainingAmount = 0;
form.commissionAmount = 0;
selectdList.value.forEach((item) => {
form.totalReduceAmount = Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)
form.totalReduceAmount = (Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)).toNumber()
);
form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.payAmount) || 0)
form.remainingAmount = (Decimal(form.remainingAmount).add(
Decimal(Number(item.payAmount) || 0)).toNumber()
);
form['commissionAmount'] = Decimal(form['commissionAmount']).add(
Decimal(item?.loan?.commissionAmount)
form['commissionAmount'] = (Decimal(form['commissionAmount']).add(
Decimal(item?.loan?.commissionAmount)).toNumber()
);
});
};
......@@ -289,7 +290,8 @@
return row.loan.repayStatus !== 'over';
},
},
minHeight: 200,
height: 250,
'min-height': 250,
columns: [
{ type: 'checkbox', title: '', width: '40px', fixed: 'left' },
{
......@@ -377,15 +379,15 @@
toolbarConfig: { enabled: false },
});
const changeNum = (row) => {
row.payAmount = Decimal(row.loan.remainingAmount).sub(Decimal(row.reduceAmount));
row.payAmount = (Decimal(row.loan.remainingAmount).sub(Decimal(row.reduceAmount))).toNumber();
form.totalReduceAmount = 0;
form.remainingAmount = 0;
selectdList.value.forEach((item) => {
form.totalReduceAmount = Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)
form.totalReduceAmount = (Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)).toNumber()
);
form.remainingAmount = Decimal(form.remainingAmount).add(
Decimal(Number(item.payAmount) || 0)
form.remainingAmount = (Decimal(form.remainingAmount).add(
Decimal(Number(item.payAmount) || 0)).toNumber()
);
});
};
......@@ -410,14 +412,14 @@
};
list.push(listitem);
if (item.repayStatus !== 'over') {
form.totalReduceAmount = Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)
form.totalReduceAmount = (Decimal(form.totalReduceAmount).add(
Decimal(Number(item.reduceAmount) || 0)).toNumber()
);
a.push(listitem);
form['commissionAmount'] = Decimal(form['commissionAmount']).add(
Decimal(item.commissionAmount)
form['commissionAmount'] = (Decimal(form['commissionAmount']).add(
Decimal(item.commissionAmount)).toNumber()
);
form.remainingAmount = Decimal(form.remainingAmount).add(Decimal(payAmount));
form.remainingAmount = (Decimal(form.remainingAmount).add(Decimal(payAmount))).toNumber();
}
});
tabledata.value = list;
......@@ -430,6 +432,7 @@
}, 500);
};
const submitForm = () => {
console.log('form.totalReduceAmount', form.totalReduceAmount, form.commissionAmount)
if (form.totalReduceAmount > form.commissionAmount)
return ElMessage.warning({
message: '减免金额不能大于委案金额',
......
......@@ -121,7 +121,7 @@
return {
columns: [
{ type: 'checkbox', width: 60 },
{ type: 'seq', width: 50 },
{ type: 'seq', width: 50, title: '序号' },
{
field: 'code',
title: '联系人姓名',
......
......@@ -611,6 +611,7 @@
const splitCurrent = ref({
flowStatus: '',
});
const splitCanIndex = ref(0)
const returnModalRef = ref();
const repairModalRef = ref();
const reduceTRef = ref();
......@@ -873,7 +874,7 @@
const relationConfig = reactive({
minHeight: 200,
columns: [
{ type: 'seq', width: 60 },
{ type: 'seq', width: 60, title: '序号' },
{
field: 'name',
width: 100,
......@@ -1050,6 +1051,8 @@
});
const onCellClick = ({ row, rowIndex }) => {
splitDeData.value = row.byStagesRecords;
splitCanIndex.value = row.byStagesRecords.findIndex(v => v.repayStatus == 'pending')
console.log('splitCanIndexsplitCanIndex', splitCanIndex.value)
splitCurrent.value = row;
console.log('splitCurrent', splitCurrent);
};
......@@ -1201,6 +1204,7 @@
disabled={
row.repayStatus === 'over' ||
splitCurrent.value.flowStatus !== 'pass' ||
rowIndex !== splitCanIndex.value ||
(detail.value.repayStatus && detail.value.repayStatus === 'over')
}
>
......@@ -1266,21 +1270,26 @@
},
},
{
field: 'reduceAmount',
field: 'remainingAmount',
title: '剩余待还金额',
showOverflow: 'tooltip',
},
{
field: 'totalReduceAmount',
title: '减免金额',
width: 110,
showOverflow: 'tooltip',
},
{
title: '应还金额',
width: 110,
slots: {
default: ({ row }) => {
return (
<>{Array.from(new Set(row.reduceRecords.map((v) => v.reduceAmount))).join(',')}</>
<>{Decimal(row.remainingAmount).sub(row.totalReduceAmount)}</>
);
},
},
},
{
field: 'totalReduceAmount',
title: '减免金额(总计)',
width: 110,
showOverflow: 'tooltip',
},
{
......@@ -1288,11 +1297,7 @@
title: '减免案件数',
showOverflow: 'tooltip',
},
{
field: 'remainingAmount',
title: '剩余待还金额',
showOverflow: 'tooltip',
},
{
field: 'totalPayAmount',
title: '累计还款金额',
......
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