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

修改bug

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