待我处理-关闭变更完成

This commit is contained in:
2026-09-16 09:20:21 +08:00
parent 098e92026e
commit 8272d0653f
3 changed files with 57 additions and 25 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ export const generatedRoutes: GeneratedRoute[] = [
path: '/my/highriskdetail',
component: 'view.my_highriskdetail',
meta: {
title: '高风险场景详情',
title: '变更详情',
constant: true,
hideInMenu: true,
i18nKey: 'route.my_highriskdetail'
+16 -1
View File
@@ -14,4 +14,19 @@ export function myTasksWithdrawApi(id:number,data: {reason:string}) {
method: 'post',
data,
});
}
}
// 关闭变更
export function myTasksCloseApi(change_id:number) {
return request({
url: `/api/changes/${change_id}/close`,
method: 'post',
});
}
// 资料关闭
export function myTasksCloseMaterialApi(change_id:number,data: any) {
return request({
url: `/api/materials/${change_id}/material-close`,
method: 'post',
data,
});
}
+40 -23
View File
@@ -5,7 +5,7 @@ import { useThemeStore } from '@/store/modules/theme';
import { useRouterPush } from '@/hooks/common/router';
import { tagTextColor, tagBgColor, tagBorderColor } from '@/utils/common';
import { systemConfigApi } from '@/service/api/system';
import { myTasksListApi, myTasksWithdrawApi } from '@/service/api/myTasks';
import { myTasksListApi, myTasksWithdrawApi, myTasksCloseApi } from '@/service/api/myTasks';
const themeStore = useThemeStore();
const { routerPushByKey } = useRouterPush();
@@ -88,27 +88,34 @@ const opts = computed<Opt[]>(() => {
return list;
});
// 打开详情
const openDetail = (c: any) => {
routerPushByKey("my_highriskdetail",{ query: { id: c.id.toString() } });
};
// 打开处置申请、修改重报
const openDisposal = (c: any,type:string = '') => {
currentRow.value = c;
if(type==='reject'){
window.$message?.info("该任务暂无处置申请");
return;
// 打开详情、修改重报
const openDetail = (c: any,type:string = '') => {
if(type==='detail'){
routerPushByKey("my_highriskdetail",{ query: { id: c.change_id.toString() } });
}
if(type==='edit'){
routerPushByKey("my_initiatechange",{ query: { id: c.change_id.toString() } });
}
};
// 打开资料关闭
const openDocClose = (c: any) => {
currentRow.value = c;
// routerPushByKey("my_docclose",{ query: { id: c.change_id.toString() } });
};
// 打开处置申请
const openDisposal = (c: any,) => {
currentRow.value = c;
disposalModal.value = true;
};
// 打开资料关闭、关闭变更
const openClosure = (c: any,type:string = '') => {
if(type==='reject'){
window.$message?.info("关闭该变更(驳回后不再推进,流程终止并归档备查)");
return;
// 关闭变更
const closeChange = async (c: any) => {
const {error} = await myTasksCloseApi(c?.change_id);
if(!error){
window.$message?.success(`关闭变更成功`);
getList();
}
};
// 打开进度
const openProgress = (c: any) => {
currentRow.value = c;
@@ -374,23 +381,33 @@ onMounted(() => {
<!-- 右区 -->
<!-- 审批中 -->
<div v-if="c.status === 'APPROVING'" class="flex gap-1.5">
<NButton class="text-xs" text type="primary" @click="openDetail(c)">详情</NButton>
<NButton class="text-xs" text type="primary" @click="openDetail(c,'detail')">详情</NButton>
<NButton class="text-xs" text type="warning" @click="openProgress(c)">进度</NButton>
<NButton class="text-xs" text type="error" @click="openWithdraw(c)">撤回</NButton>
</div>
<!-- 审批通过 -->
<div v-if="c.status === 'APPROVED'" class="flex gap-1.5">
<NButton class="text-xs" text type="primary" @click="openDetail(c)">详情</NButton>
<NButton class="text-xs" text type="primary" @click="openDetail(c,'detail')">详情</NButton>
<NButton class="text-xs" text type="warning" @click="openProgress(c)">进度</NButton>
<NButton class="text-xs" text type="primary" @click="openDisposal(c)">处置申请</NButton>
<NButton class="text-xs" text type="error" @click="openClosure(c)">资料关闭</NButton>
<NButton class="text-xs" text type="error" @click="openDocClose(c)">资料关闭</NButton>
</div>
<!-- 驳回处理 -->
<div v-if="c.status === 'REJECTED'" class="flex gap-1.5">
<NButton class="text-xs" text type="primary" @click="openDetail(c)">详情</NButton>
<NButton class="text-xs" text type="primary" @click="openDetail(c,'detail')">详情</NButton>
<NButton class="text-xs" text type="warning" @click="openProgress(c)">进度</NButton>
<NButton class="text-xs" text type="primary" @click="openDisposal(c,'reject')">修改重报</NButton>
<NButton class="text-xs" text type="error" @click="openClosure(c,'reject')">关闭变更</NButton>
<NButton class="text-xs" text type="primary" @click="openDetail(c,'edit')">修改重报</NButton>
<NPopconfirm
positive-text="确定"
:positiveButtonProps="{ size: 'tiny' }"
:negativeButtonProps="{ size: 'tiny' }"
@positive-click="closeChange(c)"
>
<template #trigger>
<NButton class="text-xs" text type="error">关闭变更</NButton>
</template>
确定关闭该变更吗
</NPopconfirm>
</div>
</div>
</div>