From d6e9c96bebac09e62578b6c902bc23441b44017c Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 16 六月 2026 13:50:26 +0800
Subject: [PATCH] fix:协同审批删除取消
---
src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js | 61 ++++++++++++++++++++++--------
1 files changed, 44 insertions(+), 17 deletions(-)
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
index 67b9213..30df120 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
@@ -60,7 +60,8 @@
const submitTemplatesLoading = ref(false);
const submitTemplateCards = computed(() => {
- if (selectedBusinessType.value == null || selectedBusinessType.value === "") return [];
+ if (selectedBusinessType.value == null || selectedBusinessType.value === "")
+ return [];
return allSubmitTemplates.value.filter((card) =>
matchBusinessTypeValue(card.businessType, selectedBusinessType.value)
);
@@ -101,23 +102,36 @@
const isSubmitEdit = computed(() => submitDialog.mode === "edit");
const submitDialogTitle = computed(() => {
if (submitDialog.mode === "edit") {
- return `淇敼${activeTemplate.value?.label || submitForm.templateName || "瀹℃壒"}`;
+ return `淇敼${
+ activeTemplate.value?.label || submitForm.templateName || "瀹℃壒"
+ }`;
}
if (submitDialog.step === 1) return "閫夋嫨妯℃澘绫诲瀷";
- if (submitDialog.step === 2) return `閫夋嫨瀹℃壒妯℃澘${businessTypeLabel(selectedBusinessType.value) ? `锛�${businessTypeLabel(selectedBusinessType.value)}锛塦 : ""}`;
+ if (submitDialog.step === 2)
+ return `閫夋嫨瀹℃壒妯℃澘${
+ businessTypeLabel(selectedBusinessType.value)
+ ? `锛�${businessTypeLabel(selectedBusinessType.value)}锛塦
+ : ""
+ }`;
return `鎻愪氦${activeTemplate.value?.label || "瀹℃壒"}`;
});
- const selectedBusinessTypeLabel = computed(() => businessTypeLabel(selectedBusinessType.value));
+ const selectedBusinessTypeLabel = computed(() =>
+ businessTypeLabel(selectedBusinessType.value)
+ );
function businessTypeLabel(type) {
if (type == null || type === "") return "";
- const hit = submitBusinessTypeOptions.value.find((x) => matchBusinessTypeValue(x.value, type));
+ const hit = submitBusinessTypeOptions.value.find((x) =>
+ matchBusinessTypeValue(x.value, type)
+ );
return hit?.label || "";
}
function countTemplatesByBusinessType(type) {
- return allSubmitTemplates.value.filter((card) => matchBusinessTypeValue(card.businessType, type)).length;
+ return allSubmitTemplates.value.filter((card) =>
+ matchBusinessTypeValue(card.businessType, type)
+ ).length;
}
const activeTemplate = computed(() => submitForm.templateSnapshot || null);
@@ -130,7 +144,9 @@
});
const submitFormRules = computed(() => ({
- templateKey: [{ required: true, message: "璇烽�夋嫨瀹℃壒绫诲瀷", trigger: "change" }],
+ templateKey: [
+ { required: true, message: "璇烽�夋嫨瀹℃壒绫诲瀷", trigger: "change" },
+ ],
...buildFormPayloadRules(submitFormFields.value),
}));
@@ -186,11 +202,11 @@
disabled: (row) => row.approvalStatus !== "pending" || !row.isApprove,
clickFun: (row) => openApprove(row),
},
- {
- name: "鍒犻櫎",
- type: "danger",
- clickFun: (row) => removeInstance(row),
- },
+ // {
+ // name: "鍒犻櫎",
+ // type: "danger",
+ // clickFun: (row) => removeInstance(row),
+ // },
],
},
]);
@@ -336,7 +352,9 @@
try {
await navigateToReimburseManageForEdit(proxy?.$router, moduleKey, rid);
} catch {
- ElMessage.warning("鏈壘鍒板樊鏃�/璐圭敤鎶ラ攢鑿滃崟璺敱锛岃浠庡乏渚ц彍鍗曡繘鍏ュ悗鍐嶇紪杈�");
+ ElMessage.warning(
+ "鏈壘鍒板樊鏃�/璐圭敤鎶ラ攢鑿滃崟璺敱锛岃浠庡乏渚ц彍鍗曡繘鍏ュ悗鍐嶇紪杈�"
+ );
}
return;
}
@@ -361,7 +379,9 @@
templateKey: String(card.id),
...applied,
businessType:
- applied.businessType ?? card.businessType ?? selectedBusinessType.value,
+ applied.businessType ??
+ card.businessType ??
+ selectedBusinessType.value,
});
submitDialog.step = 3;
} catch {
@@ -402,7 +422,9 @@
return false;
}
if (!activeTemplate.value) return false;
- const bindingCheck = validateTemplateBinding({ flowNodes: submitForm.flowNodes });
+ const bindingCheck = validateTemplateBinding({
+ flowNodes: submitForm.flowNodes,
+ });
if (!bindingCheck.ok) {
ElMessage.warning(bindingCheck.message);
return false;
@@ -441,7 +463,9 @@
return false;
}
if (!activeTemplate.value) return false;
- const bindingCheck = validateTemplateBinding({ flowNodes: submitForm.flowNodes });
+ const bindingCheck = validateTemplateBinding({
+ flowNodes: submitForm.flowNodes,
+ });
if (!bindingCheck.ok) {
ElMessage.warning(bindingCheck.message);
return false;
@@ -463,7 +487,10 @@
);
submitDialog.visible = false;
await fetchApprovalList();
- if (detailDialog.visible && detailRow.value?.id === submitForm.instanceId) {
+ if (
+ detailDialog.visible &&
+ detailRow.value?.id === submitForm.instanceId
+ ) {
const hit = tableData.value.find((r) => r.id === submitForm.instanceId);
if (hit) detailRow.value = { ...hit };
else detailDialog.visible = false;
--
Gitblit v1.9.3