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

分期作废

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