处置申请完成

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, 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) => { const preview = (file:any) => {
console.log(file)
previewFile.value = file; previewFile.value = file;
previewModal.value = true; 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" <NSelect :value="approvers[item.id]" multiple :options="item.members" label-field="user_name" value-field="user_id"
@update:value="(v) => updateApprover(item.id, v)" /> @update:value="(v) => updateApprover(item.id, v)" />
</div> </div>
<NButton type="primary" class="w-full" @click="finishApprover">完成设置</NButton> <NButton v-if="flowList.length" type="primary" class="w-full" @click="finishApprover">完成设置</NButton>
</div> </div>
</NDrawerContent> </NDrawerContent>
</NDrawer> </NDrawer>
+82 -54
View File
@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { Icon } from '@iconify/vue' import { Icon } from '@iconify/vue'
import { useThemeStore } from '@/store/modules/theme'; import { useThemeStore } from '@/store/modules/theme';
import { useRouterPush } from '@/hooks/common/router'; 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 jumpTo = (act: string) => {
const pendingSubs = computed(() => subsOf(currentRow.value?.id).filter((s:any) => s.status === "审批中")); routerPushByKey("details_disposal",{ query: { id: currentRow.value?.change_id.toString(),type:act } });
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 openDetail = (c: any,type:string = '') => { const openDetail = (c: any,type:string = '') => {
@@ -101,7 +82,7 @@ const openDetail = (c: any,type:string = '') => {
// 打开资料关闭 // 打开资料关闭
const openDocClose = (c: any) => { const openDocClose = (c: any) => {
currentRow.value = c; 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,) => { const openDisposal = (c: any,) => {
@@ -384,7 +365,6 @@ onMounted(() => {
<div v-if="c.status === 'APPROVING'" class="flex gap-1.5"> <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="primary" @click="openDetail(c,'detail')">详情</NButton>
<NButton class="text-xs" text type="warning" @click="openProgress(c)">进度</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> <NButton class="text-xs" text type="error" @click="openWithdraw(c)">撤回</NButton>
</div> </div>
<!-- 审批通过 --> <!-- 审批通过 -->
@@ -493,39 +473,40 @@ onMounted(() => {
v-model:show="disposalModal" v-model:show="disposalModal"
preset="card" preset="card"
:auto-focus="false" :auto-focus="false"
:style="{ width: '670px', height: 'auto' }" :style="{ width: '700px', height: 'auto' }"
:segmented="{ content: true, footer: false }" :segmented="{ content: true, footer: false }"
> >
<template #header> <template #header>
<div class="flex items-center gap-2 flex-wrap"> <div class="flex items-center gap-2 flex-wrap">
<h3 class="text-base font-semibold text-slate-800">处置申请 · {{ currentRow?.title }}</h3> <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> </div>
</template> </template>
<template #default> <template #default>
<div class="rounded-lg border bg-white px-4 py-3"> <div class="rounded-lg border bg-white px-4 py-3">
<div class="flex flex-wrap items-center gap-2"> <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
<NTag v-if="currentRow?.dur=== '临时'" type="warning" size="small">{{ currentRow?.dur }}</NTag> size="small"
<NTag v-else type="primary" size="small">{{ currentRow?.dur }}</NTag> :color="{
<NTag v-if="currentRow?.status==='审批中'" size="small" type="warning">{{currentRow?.status}}</NTag> color: tagBgColor(getChangeLevel(currentRow?.change_level)?.color),
<NTag v-if="currentRow?.status==='已批准'" size="small" type="primary">{{currentRow?.status}}</NTag> textColor: tagTextColor(getChangeLevel(currentRow?.change_level)?.color),
<NTag v-if="currentRow?.status==='实施中'" size="small" type="warning">{{currentRow?.status}}</NTag> borderColor: tagBorderColor(getChangeLevel(currentRow?.change_level)?.color),
<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> >{{getChangeLevel(currentRow?.change_level)?.label}}</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> <NTag v-if="currentRow?.duration_type===2" size="small" type="warning">临时</NTag>
<span v-if="currentRow?.applyTime" class="text-[11px] text-slate-400">申请 {{ currentRow?.applyTime }}</span> <NTag v-if="currentRow?.duration_type===1" size="small" type="primary">永久</NTag>
<span v-if="currentRow?.dur === '临时' && currentRow?.deadline" class="text-[11px] text-amber-600"> <NTag v-if="currentRow?.urgent===1" size="small" type="error">紧急</NTag>
到期 {{ currentRow?.deadline }}{{ (currentRow?.day ?? 0) < 0 ? ` · 已超期 ${-(currentRow?.day ?? 0)} ` : currentRow?.day !== undefined ? ` · ${currentRow?.day} ` : '' }} <!-- 变更状态 -->
</span> <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>
<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>
<!-- 处置选项 --> <!-- 处置选项 -->
<div class="rounded-lg border bg-white mt-3"> <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> <span class="ml-2 text-[11px] font-normal text-slate-400">申请恢复所有变更可发起申请延期 / 申请转为永久仅临时变更可用</span>
</div> </div>
<div class="divide-y"> <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="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2"> <div class="flex flex-wrap items-center gap-2">
<span class="text-sm font-semibold text-slate-800">{{ o.name }}</span> <span class="text-sm font-semibold text-slate-800">未实施情况说明</span>
<NTag v-if="o.note" type="warning" size="small">{{ o.note }}</NTag>
</div> </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> </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" /> 发起<Icon icon="formkit:right" class="size-12px text-white ml-1" />
</NButton> </NButton>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
</NModal> </NModal>
</NCard> </NCard>