处置申请完成

This commit is contained in:
2026-09-18 14:04:16 +08:00
parent ef8bca3c92
commit da61394d36
5 changed files with 948 additions and 709 deletions
+17
View File
@@ -30,3 +30,20 @@ export function myTasksCloseMaterialApi(change_id:number,data: any) {
data,
});
}
// 处置申请保存提交
export function myTasksDisposalSubmitApi(change_id:number,data: any) {
return request({
url: `/api/changes/${change_id}/disposal`,
method: 'post',
data,
});
}
// 新增检查项
export function myTasksAddItemApi(change_id:number,data: any) {
return request({
url: `/api/changes/${change_id}/pssr/item`,
method: 'post',
data,
});
}
-1
View File
@@ -178,7 +178,6 @@ const handleFileType = (type:string) => {
}
// 打开预览
const preview = (file:any) => {
console.log(file)
previewFile.value = file;
previewModal.value = true;
}
File diff suppressed because it is too large Load Diff
@@ -246,7 +246,7 @@ defineExpose({clearApprovers, setRegenerateLoading})
<NSelect :value="approvers[item.id]" multiple :options="item.members" label-field="user_name" value-field="user_id"
@update:value="(v) => updateApprover(item.id, v)" />
</div>
<NButton type="primary" class="w-full" @click="finishApprover">完成设置</NButton>
<NButton v-if="flowList.length" type="primary" class="w-full" @click="finishApprover">完成设置</NButton>
</div>
</NDrawerContent>
</NDrawer>
+82 -54
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue';
import { ref, onMounted } from 'vue';
import { Icon } from '@iconify/vue'
import { useThemeStore } from '@/store/modules/theme';
import { useRouterPush } from '@/hooks/common/router';
@@ -64,29 +64,10 @@ const tabChange = (k: string) => {
}
};
const SUB_ORDERS: any[] = [];
const subsOf = (id: string) => SUB_ORDERS.filter((s:any) => s.parentId === id);
const pendingSubs = computed(() => subsOf(currentRow.value?.id).filter((s:any) => s.status === "审批中"));
interface Opt { act: any; name: string; desc: string; disabled?: boolean; note?: string }
const convPassed = computed(() => subsOf(currentRow.value?.id).some((s) => s.kind === "permanent" && s.status === "已通过"));
const convActive = computed(() => subsOf(currentRow.value?.id).some((s) => s.kind === "permanent" && s.status !== "已驳回"));
const extActive = computed(() => subsOf(currentRow.value?.id).some((s) => s.kind === "extend" && s.status === "审批中"));
const opts = computed<Opt[]>(() => {
const list: Opt[] = [
{ act: "restore", name: "申请恢复", desc: "投用后申请恢复原状:生成恢复操作票(执行类单据,随单归档,无需另行审批),现场恢复并拍照确认后纳入归档" },
];
if (currentRow.value?.dur === "临时" && !convPassed.value) {
list.push(
{ act: "extend", name: currentRow.value?.extended ? "申请延期(已延期 1 次)" : "申请延期", desc: "临时变更到期前申请延期:子单走属地 + 主管部门简化审批,通过后回写原单到期时间 · 至多延期 1 次", disabled: !!currentRow.value?.extended || extActive.value, note: extActive.value ? "延期子单审批中" : currentRow.value?.extended ? "本变更已延期 1 次,不可再次延期" : "" },
{ act: "permanent", name: "申请转为永久", desc: "临时运行一个验证周期效果稳定后转永久:按永久变更补齐风险评估与完整审批链,通过后原临时变更自动关闭", disabled: convActive.value, note: convActive.value ? "转永久子单审批中 / 已通过" : "" },
);
}
list.push(
{ act: "unimpl", name: "未实施情况说明", desc: "审批通过后变更未实施:填写情况说明(未实施原因、现场维持原状确认),知会原审批人后直接转入关闭流程" },
{ act: "unuse", name: "未投用情况说明", desc: "变更已实施完成但未正式投用:填写情况说明(含现场状态与后续安排),知会原审批人后直接转入关闭流程" },
);
return list;
});
// 处置申请跳转
const jumpTo = (act: string) => {
routerPushByKey("details_disposal",{ query: { id: currentRow.value?.change_id.toString(),type:act } });
}
// 打开详情、修改重报
const openDetail = (c: any,type:string = '') => {
@@ -101,7 +82,7 @@ const openDetail = (c: any,type:string = '') => {
// 打开资料关闭
const openDocClose = (c: any) => {
currentRow.value = c;
// routerPushByKey("my_docclose",{ query: { id: c.change_id.toString() } });
routerPushByKey("details_closedoc",{ query: { id: c.change_id.toString() } });
};
// 打开处置申请
const openDisposal = (c: any,) => {
@@ -384,7 +365,6 @@ onMounted(() => {
<div v-if="c.status === 'APPROVING'" class="flex gap-1.5">
<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="openWithdraw(c)">撤回</NButton>
</div>
<!-- 审批通过 -->
@@ -493,39 +473,40 @@ onMounted(() => {
v-model:show="disposalModal"
preset="card"
:auto-focus="false"
:style="{ width: '670px', height: 'auto' }"
:style="{ width: '700px', height: 'auto' }"
:segmented="{ content: true, footer: false }"
>
<template #header>
<div class="flex items-center gap-2 flex-wrap">
<h3 class="text-base font-semibold text-slate-800">处置申请 · {{ currentRow?.title }}</h3>
<span class="shrink-0 border-slate-200 bg-slate-100 font-mono text-xs text-slate-600 px-1.5 py-0.5 border rounded-md">编号{{ currentRow?.id }}</span>
<span class="shrink-0 border-slate-200 bg-slate-100 font-mono text-xs text-slate-600 px-1.5 py-0.5 border rounded-md">编号{{ currentRow?.change_no }}</span>
</div>
</template>
<template #default>
<div class="rounded-lg border bg-white px-4 py-3">
<div class="flex flex-wrap items-center gap-2">
<NTag v-if="currentRow?.level=== '重要'" type="error" size="small">{{ currentRow?.level }}</NTag>
<NTag v-else type="primary" size="small">{{ currentRow?.level }}</NTag>
<NTag v-if="currentRow?.dur=== '临时'" type="warning" size="small">{{ currentRow?.dur }}</NTag>
<NTag v-else type="primary" size="small">{{ currentRow?.dur }}</NTag>
<NTag v-if="currentRow?.status==='审批中'" size="small" type="warning">{{currentRow?.status}}</NTag>
<NTag v-if="currentRow?.status==='已批准'" size="small" type="primary">{{currentRow?.status}}</NTag>
<NTag v-if="currentRow?.status==='实施中'" size="small" type="warning">{{currentRow?.status}}</NTag>
<NTag v-if="currentRow?.status==='待PSSR'" size="small" type="warning">{{currentRow?.status}}</NTag>
<NTag v-if="currentRow?.status==='待验收'" size="small" type="success">{{currentRow?.status}}</NTag>
<NTag v-if="currentRow?.status==='待关闭'" size="small" type="error">{{currentRow?.status}}</NTag>
<NTag v-if="currentRow?.status==='已关闭'" size="small" type="primary">{{currentRow?.status}}</NTag>
<span v-if="currentRow?.applyTime" class="text-[11px] text-slate-400">申请 {{ currentRow?.applyTime }}</span>
<span v-if="currentRow?.dur === '临时' && currentRow?.deadline" class="text-[11px] text-amber-600">
到期 {{ currentRow?.deadline }}{{ (currentRow?.day ?? 0) < 0 ? ` · 已超期 ${-(currentRow?.day ?? 0)} ` : currentRow?.day !== undefined ? ` · ${currentRow?.day} ` : '' }}
</span>
<!-- 变更等级 -->
<NTag
size="small"
:color="{
color: tagBgColor(getChangeLevel(currentRow?.change_level)?.color),
textColor: tagTextColor(getChangeLevel(currentRow?.change_level)?.color),
borderColor: tagBorderColor(getChangeLevel(currentRow?.change_level)?.color),
}"
>{{getChangeLevel(currentRow?.change_level)?.label}}</NTag>
<!-- 变更时限 -->
<NTag v-if="currentRow?.duration_type===2" size="small" type="warning">临时</NTag>
<NTag v-if="currentRow?.duration_type===1" size="small" type="primary">永久</NTag>
<NTag v-if="currentRow?.urgent===1" size="small" type="error">紧急</NTag>
<!-- 变更状态 -->
<NTag v-if="currentRow?.status==='APPROVING'" size="small" type="warning">审批中</NTag>
<NTag v-if="currentRow?.status==='APPROVED'" size="small" type="success">已通过</NTag>
<span v-if="currentRow?.apply_time" class="text-[11px] text-slate-400">申请 {{ currentRow?.apply_time.slice(0, 16) }}</span>
<!-- 超期/临期/延期 -->
<NTag v-if="currentRow?.overdue_status===2" size="small" type="error">已超期 {{ currentRow?.overdue_days }} </NTag>
<NTag v-if="currentRow?.overdue_status===1" size="small" type="warning">临期 · {{ currentRow?.overdue_days }} </NTag>
<NTag v-if="currentRow?.extend_count" size="small">已延期 {{ currentRow?.extend_count }} </NTag>
</div>
<div class="mt-1 text-[11px] text-slate-400">{{ currentRow?.detail }}</div>
</div>
<!-- 进行中的子单提示 -->
<div v-if="pendingSubs.length" class="rounded-lg border border-amber-200 bg-amber-50/60 px-4 py-2.5 text-xs text-amber-700">
已有子单在审批中{{ pendingSubs.map((s:any) => s.id).join('、') }} · 审批进度见待我处理列表行内展示
</div>
<!-- 处置选项 -->
<div class="rounded-lg border bg-white mt-3">
@@ -534,21 +515,68 @@ onMounted(() => {
<span class="ml-2 text-[11px] font-normal text-slate-400">申请恢复所有变更可发起申请延期 / 申请转为永久仅临时变更可用</span>
</div>
<div class="divide-y">
<div v-for="o in opts" :key="o.act" class="flex flex-wrap items-center gap-3 px-4 py-3.5">
<!-- 未实施情况说明 -->
<div class="flex flex-wrap items-center gap-3 px-4 py-3.5">
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2">
<span class="text-sm font-semibold text-slate-800">{{ o.name }}</span>
<NTag v-if="o.note" type="warning" size="small">{{ o.note }}</NTag>
<span class="text-sm font-semibold text-slate-800">未实施情况说明</span>
</div>
<div class="mt-0.5 text-[11px] leading-4 text-slate-400">{{ o.desc }}</div>
<div class="mt-0.5 text-[11px] leading-4 text-slate-400">审批通过后变更未实施填写情况说明未实施原因现场维持原状确认知会原审批人后直接转入关闭流程</div>
</div>
<NButton size="small" type="primary" :disabled="o.disabled">
<NButton size="small" type="primary" @click="jumpTo('unExecute')">
发起<Icon icon="formkit:right" class="size-12px text-white ml-1" />
</NButton>
</div>
<!-- 未投用情况说明 -->
<div class="flex flex-wrap items-center gap-3 px-4 py-3.5">
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2">
<span class="text-sm font-semibold text-slate-800">未投用情况说明</span>
</div>
<div class="mt-0.5 text-[11px] leading-4 text-slate-400">变更已实施完成但未正式投用填写情况说明含现场状态与后续安排知会原审批人后直接转入关闭流程</div>
</div>
<NButton size="small" type="primary" @click="jumpTo('unUse')">
发起<Icon icon="formkit:right" class="size-12px text-white ml-1" />
</NButton>
</div>
<!-- 申请恢复 -->
<div class="flex flex-wrap items-center gap-3 px-4 py-3.5">
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2">
<span class="text-sm font-semibold text-slate-800">申请恢复</span>
</div>
<div class="mt-0.5 text-[11px] leading-4 text-slate-400">投用后申请恢复原状生成恢复操作票执行类单据随单归档无需另行审批现场恢复并拍照确认后纳入归档</div>
</div>
<NButton size="small" type="primary" @click="jumpTo('recover')">
发起<Icon icon="formkit:right" class="size-12px text-white ml-1" />
</NButton>
</div>
<!-- 申请延期 -->
<div v-if="currentRow?.duration_type===2" class="flex flex-wrap items-center gap-3 px-4 py-3.5">
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2">
<span class="text-sm font-semibold text-slate-800">申请延期</span>
</div>
<div class="mt-0.5 text-[11px] leading-4 text-slate-400">临时变更到期前申请延期子单走属地 + 主管部门简化审批通过后回写原单到期时间 · 至多延期 1 </div>
</div>
<NButton size="small" type="primary" @click="jumpTo('delay')">
发起<Icon icon="formkit:right" class="size-12px text-white ml-1" />
</NButton>
</div>
<!-- 申请转为永久 -->
<div v-if="currentRow?.duration_type===2" class="flex flex-wrap items-center gap-3 px-4 py-3.5">
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2">
<span class="text-sm font-semibold text-slate-800">申请转为永久</span>
</div>
<div class="mt-0.5 text-[11px] leading-4 text-slate-400">临时运行一个验证周期效果稳定后转永久按永久变更补齐风险评估与完整审批链通过后原临时变更自动关闭</div>
</div>
<NButton size="small" type="primary" @click="jumpTo('transform')">
发起<Icon icon="formkit:right" class="size-12px text-white ml-1" />
</NButton>
</div>
</div>
</div>
</template>
</NModal>
</NCard>