Commit 1269063e authored by tanghao's avatar tanghao

失效状态显示和控制

parent 9cfef90f
...@@ -63,12 +63,13 @@ ...@@ -63,12 +63,13 @@
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
const srcList = ref([]); const srcList = ref([]);
const RefImage = ref(false); const RefImage = ref(false);
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus } = useDict( const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus,Status } = useDict(
'PhoneResultStatus', 'PhoneResultStatus',
'ReduceType', 'ReduceType',
'FlowStatus', 'FlowStatus',
'FollowStatus', 'FollowStatus',
'CaseStatus' 'CaseStatus',
'Status'
); );
const downloadfile = inject('download'); const downloadfile = inject('download');
const activeName = ref('pending'); const activeName = ref('pending');
...@@ -292,6 +293,26 @@ ...@@ -292,6 +293,26 @@
}, },
width: 115, width: 115,
}, },
{
field: 'status',
title: '状态',
showOverflow: 'tooltip',
width: 80,
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.status
? Status.value?.find((v) => v.value === row.status)?.label
: ''}
</>
);
},
},
},
{ {
field: 'totalPeriod', field: 'totalPeriod',
showOverflow: 'tooltip', showOverflow: 'tooltip',
...@@ -370,7 +391,7 @@ ...@@ -370,7 +391,7 @@
width: 120, width: 120,
slots: { slots: {
default: ({ row, rowIndex }) => { default: ({ row, rowIndex }) => {
if (row.flowStatus === 'pending' && authButtonListGet.includes('stages_tenant_apply_btn')) { if (row.status === 'enable' && row.flowStatus === 'pending' && authButtonListGet.includes('stages_tenant_apply_btn')) {
return ( return (
<> <>
<ElButton type="primary" onClick={() => changeStatus(row)}> <ElButton type="primary" onClick={() => changeStatus(row)}>
...@@ -378,7 +399,7 @@ ...@@ -378,7 +399,7 @@
</ElButton> </ElButton>
</> </>
); );
} else if (row.flowStatus === 'in_review' && authButtonListGet.includes('stages_apply_btn')) { } else if (row.status === 'enable' && row.flowStatus === 'in_review' && authButtonListGet.includes('stages_apply_btn')) {
return ( return (
<> <>
<ElButton type="primary" onClick={() => changeStatus(row)}> <ElButton type="primary" onClick={() => changeStatus(row)}>
......
...@@ -62,12 +62,13 @@ ...@@ -62,12 +62,13 @@
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
const reduceDrawerRef = ref(); const reduceDrawerRef = ref();
const { authButtonListGet } = useAuthStore(); // 获取用户权限列表 const { authButtonListGet } = useAuthStore(); // 获取用户权限列表
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus } = useDict( const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus,Status } = useDict(
'PhoneResultStatus', 'PhoneResultStatus',
'ReduceType', 'ReduceType',
'FlowStatus', 'FlowStatus',
'FollowStatus', 'FollowStatus',
'CaseStatus' 'CaseStatus',
'Status'
); );
const downloadfile = inject('download'); const downloadfile = inject('download');
const ProTableRef = ref(); const ProTableRef = ref();
...@@ -312,13 +313,33 @@ ...@@ -312,13 +313,33 @@
props: { type: 'datetime', valueFormat: 'YYYY-MM-DD HH:mm:ss' }, props: { type: 'datetime', valueFormat: 'YYYY-MM-DD HH:mm:ss' },
}, },
}, },
{
field: 'status',
showOverflow: 'tooltip',
title: '状态',
width: 80,
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.status
? Status.value?.find((v) => v.value === row.status)?.label
: ''}
</>
);
},
},
},
{ {
field: 'code', field: 'code',
title: '操作', title: '操作',
width: 120, width: 120,
slots: { slots: {
default: ({ row, rowIndex }) => { default: ({ row, rowIndex }) => {
if (row.flowStatus === 'pending' && authButtonListGet.includes('reduction_tenant_apply_btn')) { if (row.status==='enable' && row.flowStatus === 'pending' && authButtonListGet.includes('reduction_tenant_apply_btn')) {
return ( return (
<> <>
<ElButton type="primary" onClick={() => changeStatus(row)}> <ElButton type="primary" onClick={() => changeStatus(row)}>
...@@ -326,7 +347,7 @@ ...@@ -326,7 +347,7 @@
</ElButton> </ElButton>
</> </>
); );
} else if (row.flowStatus === 'in_review' && authButtonListGet.includes('reduction_apply_btn')) { } else if (row.status==='enable' && row.flowStatus === 'in_review' && authButtonListGet.includes('reduction_apply_btn')) {
return ( return (
<> <>
<ElButton type="primary" onClick={() => changeStatus(row)}> <ElButton type="primary" onClick={() => changeStatus(row)}>
......
...@@ -374,6 +374,7 @@ ...@@ -374,6 +374,7 @@
distributeType: currentAllBtn.value, distributeType: currentAllBtn.value,
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
tabledata.value = res.result;
ElMessage.success({ ElMessage.success({
message: '保存成功', message: '保存成功',
plain: true, plain: true,
...@@ -503,8 +504,9 @@ ...@@ -503,8 +504,9 @@
// 进行合计 // 进行合计
const sumNum = (costForm, type) => { const sumNum = (costForm, type) => {
let total = 0; let total = 0;
console.log(costForm)
for (let i = 0; i < costForm.length; i++) { for (let i = 0; i < costForm.length; i++) {
total = Decimal(total).add(Decimal(costForm[i][type])); total = Decimal(total).add(Decimal(costForm[i][type]==null?0:costForm[i][type]));
} }
return total; return total;
}; };
......
...@@ -576,14 +576,15 @@ ...@@ -576,14 +576,15 @@
import { saveAudit } from '@/api/audit'; import { saveAudit } from '@/api/audit';
import Decimal from 'decimal.js'; import Decimal from 'decimal.js';
import { useDict } from '@/hooks/useDict'; import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, RepayType, FlowStatus, FollowStatus, AuditStatus, CaseStatus } = const { PhoneResultStatus, RepayType, FlowStatus, FollowStatus, AuditStatus, CaseStatus ,Status} =
useDict( useDict(
'PhoneResultStatus', 'PhoneResultStatus',
'RepayType', 'RepayType',
'FlowStatus', 'FlowStatus',
'FollowStatus', 'FollowStatus',
'AuditStatus', 'AuditStatus',
'CaseStatus' 'CaseStatus',
'Status'
); );
import { inject } from 'vue'; import { inject } from 'vue';
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
...@@ -612,6 +613,7 @@ ...@@ -612,6 +613,7 @@
const caseDetailRef = ref(); const caseDetailRef = ref();
const splitCurrent = ref({ const splitCurrent = ref({
flowStatus: '', flowStatus: '',
status:''
}); });
const splitCanIndex = ref(0) const splitCanIndex = ref(0)
const returnModalRef = ref(); const returnModalRef = ref();
...@@ -725,6 +727,24 @@ ...@@ -725,6 +727,24 @@
title: '借款平台', title: '借款平台',
showOverflow: 'tooltip', showOverflow: 'tooltip',
}, },
{
field: 'status',
title: '状态',
showOverflow: 'tooltip',
width: 80,
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.status
? Status.value?.find((v) => v.value === row.status)?.label
: ''}
</>
);
},
},
},
], ],
toolbarConfig: { enabled: false }, toolbarConfig: { enabled: false },
}); });
...@@ -1141,6 +1161,26 @@ ...@@ -1141,6 +1161,26 @@
}, },
}, },
}, },
{
field: 'status',
title: '状态',
showOverflow: 'tooltip',
width: 80,
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.status
? Status.value?.find((v) => v.value === row.status)?.label
: ''}
</>
);
},
},
},
{ {
field: 'remainingAmount', field: 'remainingAmount',
title: '剩余待还金额', title: '剩余待还金额',
...@@ -1171,6 +1211,7 @@ ...@@ -1171,6 +1211,7 @@
onCellClick: onCellClick, onCellClick: onCellClick,
toolbarConfig: { enabled: false }, toolbarConfig: { enabled: false },
}); });
const splitDeConfig = reactive({ const splitDeConfig = reactive({
columns: [ columns: [
{ {
...@@ -1213,6 +1254,7 @@ ...@@ -1213,6 +1254,7 @@
onClick={() => returnCrash(row, '分期还款')} onClick={() => returnCrash(row, '分期还款')}
disabled={ disabled={
row.repayStatus === 'over' || row.repayStatus === 'over' ||
splitCurrent.value.status ==='disable' ||
splitCurrent.value.flowStatus !== 'pass' || splitCurrent.value.flowStatus !== 'pass' ||
rowIndex !== splitCanIndex.value || rowIndex !== splitCanIndex.value ||
(detail.value.repayStatus && detail.value.repayStatus === 'over') (detail.value.repayStatus && detail.value.repayStatus === 'over')
...@@ -1347,6 +1389,25 @@ ...@@ -1347,6 +1389,25 @@
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '减免生效时间', title: '减免生效时间',
}, },
{
field: 'status',
showOverflow: 'tooltip',
title: '状态',
fieldNames: { label: 'label', value: 'value' },
slots: {
default: ({ row }) => {
return (
<>
{row.status
? Status.value?.find((v) => v.value === row.status)?.label
: ''}
</>
);
},
},
},
{ {
field: 'code', field: 'code',
title: '附件', title: '附件',
...@@ -1379,6 +1440,7 @@ ...@@ -1379,6 +1440,7 @@
type="primary" type="primary"
onClick={() => returnCrash(row, '结清减免还款')} onClick={() => returnCrash(row, '结清减免还款')}
disabled={ disabled={
row.status === 'disable' ||
row.repayStatus === 'over' || row.repayStatus === 'over' ||
row.flowStatus !== 'pass' || row.flowStatus !== 'pass' ||
(detail.value.repayStatus && detail.value.repayStatus === 'over') (detail.value.repayStatus && detail.value.repayStatus === 'over')
......
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