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

分期作废

parent e0e5a7ff
......@@ -85,6 +85,10 @@ export const savebyStages = (data) => {
export const changeAmount = (data) => {
return request.post('/byStages/changeAmount', data);
};
// 分期审批作废
export const cancel = (data) => {
return request.get('/byStages/cancel', data);
};
// 分期申请列表
export const getByStagesPage = (params) => {
return request.get('/byStages/page', params);
......
......@@ -282,24 +282,27 @@
<template #footer>
<div style="flex: auto">
<el-button @click="showModal = false">取消</el-button>
<el-button
type="primary"
@click="submitForm('fail')"
v-if="
(currentDetail.flowStatus === 'pending' && authButtonListGet.includes('stages_tenant_apply_btn')) ||
(currentDetail.flowStatus === 'in_review' && authButtonListGet.includes('stages_apply_btn'))
"
>不通过</el-button
>
<el-button
type="primary"
@click="submitForm('pass')"
v-if="
(currentDetail.flowStatus === 'pending' && authButtonListGet.includes('stages_tenant_apply_btn')) ||
(currentDetail.flowStatus === 'in_review' && authButtonListGet.includes('stages_apply_btn'))
"
>通过</el-button
>
<el-button v-if="cancelShow" type="danger" @click="cancelForm()">作废</el-button>
<template v-else>
<el-button
type="primary"
@click="submitForm('fail')"
v-if="
(currentDetail.flowStatus === 'pending' && authButtonListGet.includes('stages_tenant_apply_btn')) ||
(currentDetail.flowStatus === 'in_review' && authButtonListGet.includes('stages_apply_btn'))
"
>不通过</el-button
>
<el-button
type="primary"
@click="submitForm('pass')"
v-if="
(currentDetail.flowStatus === 'pending' && authButtonListGet.includes('stages_tenant_apply_btn')) ||
(currentDetail.flowStatus === 'in_review' && authButtonListGet.includes('stages_apply_btn'))
"
>通过</el-button
>
</template>
</div>
</template>
<el-dialog v-model="dialogVisible">
......@@ -316,7 +319,7 @@
import { VxeTextEllipsis, VxeTooltip } from 'vxe-pc-ui';
import { listByBorrower } from '@/api/property';
import { ElInputNumber, ElMessage } from 'element-plus';
import { changeAmount } from '@/api/property';
import { changeAmount,cancel } from '@/api/property';
import { getByIdPlatforms } from '@/api/platform';
import { getAppEnvConfig } from '@/utils/env';
import Decimal from 'decimal.js';
......@@ -340,6 +343,7 @@
const editFirst = ref(false);
const tabledata = ref([]);
const splitdata = ref([]);
const cancelShow = ref(false)
const dialogImageUrl = ref('');
const dialogVisible = ref(false);
const downloadfile = inject('download');
......@@ -665,7 +669,8 @@
dialogImageUrl.value = uploadFile.url;
dialogVisible.value = true;
};
const openModal = async (detail) => {
const openModal = async (detail, cancel1) => {
cancelShow.value = cancel1
let caselistBy = [];
const res1 = await listByBorrower(detail?.borrower?.id);
if (res1.success && res1.result) {
......@@ -720,6 +725,21 @@
}, 500);
};
const emits = defineEmits(['success']);
const cancelForm = () => {
const params = {
id: currentDetail.value.id
}
cancel(params).then((res) => {
if (res.success) {
ElMessage.success({
message: '作废成功',
plain: true,
});
showModal.value = false;
emits('success');
}
});
}
const submitForm = (type) => {
let images = JSON.parse(JSON.stringify(form.images.map((v) => v.url)));
if (editFirst.value)
......
......@@ -169,8 +169,8 @@
],
toolbarConfig: { enabled: false },
});
const changeStatus = async (row) => {
splitDrawerRef.value.openModal(JSON.parse(JSON.stringify(row)));
const changeStatus = async (row, cancel) => {
splitDrawerRef.value.openModal(JSON.parse(JSON.stringify(row)), cancel);
};
const submitForm = async (type) => {
const ids = selectdList.value.map((v) => v.id).join(',');
......@@ -407,6 +407,17 @@
</ElButton>
</>
);
} else if (row.status === 'enable' && row.flowStatus === 'pass' && authButtonListGet.includes('stages_cancel_btn')) {
return (
<>
<ElButton type="primary" onClick={() => changeStatus(row, true)}>
作废
</ElButton>
<ElButton type="primary" onClick={() => changeStatus(row)}>
查看
</ElButton>
</>
);
} else {
return (
<>
......
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