From aaa700a2efc44c2f633f2c83885bc67ddcbcd770 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期三, 23 九月 2026 09:10:36 +0800
Subject: [PATCH] feat: 台账品名/材质/规格手工录入与产品编号选填、审批模板启用锁定编辑
---
src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue | 88 +++++++++++++++++++++++++++++++------------
1 files changed, 63 insertions(+), 25 deletions(-)
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue b/src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue
index d094c13..8e67f9f 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-template/index.vue
@@ -119,7 +119,7 @@
placeholder="濡傦細椤圭洰绔嬮」瀹℃壒"
maxlength="50"
show-word-limit
- :disabled="isEditingBuiltin"
+ :disabled="isEditFormLocked"
/>
</el-form-item>
@@ -134,7 +134,7 @@
v-model="form.businessType"
placeholder="璇烽�夋嫨"
style="width: 100%"
- :disabled="isEditingBuiltin"
+ :disabled="isEditFormLocked"
>
<el-option
@@ -183,6 +183,8 @@
show-word-limit
+ :disabled="isEditFormLocked"
+
/>
</el-form-item>
@@ -192,7 +194,8 @@
<FormConfigEditor
v-model="form.formConfigData"
:exclude-template-id="form.id"
- :disable-import="isEditingBuiltin"
+ :disable-import="isEditFormLocked"
+ :readonly="isEditFormLocked"
:locked-field-uids="isEditingBuiltin ? form.lockedFormFieldUids : []"
/>
@@ -202,7 +205,7 @@
<el-form-item label="瀹℃壒娴佺▼" required>
- <TemplateFlowEditor v-model="form.flowNodes" :user-options="flowUserOptions" />
+ <TemplateFlowEditor v-model="form.flowNodes" :user-options="flowUserOptions" :readonly="isEditFormLocked" />
<p class="flow-tip">
@@ -216,7 +219,7 @@
<div class="upload-block">
- <FileUpload v-model:file-list="form.storageBlobDTOs" :limit="10" button-text="鐐瑰嚮閫夋嫨鏂囦欢" />
+ <FileUpload v-model:file-list="form.storageBlobDTOs" :limit="10" button-text="鐐瑰嚮閫夋嫨鏂囦欢" :disabled="isEditFormLocked" />
</div>
@@ -380,23 +383,18 @@
<template v-if="detailAttachments.length">
- <el-tag
-
- v-for="(f, i) in detailAttachments"
-
- :key="i"
-
- class="detail-attachment-tag"
-
- type="info"
-
- effect="plain"
-
- >
-
- {{ attachmentDisplayName(f) }}
-
- </el-tag>
+ <div class="detail-attachment-list">
+ <div
+ v-for="(f, i) in detailAttachments"
+ :key="i"
+ class="detail-attachment-item"
+ @click="openAttachmentFile(f)"
+ >
+ <el-icon class="attachment-icon"><Document /></el-icon>
+ <span class="attachment-name">{{ attachmentDisplayName(f) }}</span>
+ <el-icon class="attachment-download"><Download /></el-icon>
+ </div>
+ </div>
</template>
@@ -422,7 +420,7 @@
<script setup>
-import { ArrowRight, Plus, RefreshRight } from "@element-plus/icons-vue";
+import { ArrowRight, Document, Download, Plus, RefreshRight } from "@element-plus/icons-vue";
import { ElMessage } from "element-plus";
@@ -477,6 +475,8 @@
isEditingBuiltin,
+ isEditFormLocked,
+
detailDialog,
detailRow,
@@ -525,6 +525,14 @@
}
+function openAttachmentFile(file) {
+ const url = file?.url || file?.previewURL || file?.downloadURL || file?.previewUrl || "";
+ if (url) {
+ window.open(url, "_blank");
+ } else {
+ ElMessage.warning("鏃犳硶鎵撳紑璇ラ檮浠�");
+ }
+}
function unwrapArray(payload) {
@@ -795,10 +803,40 @@
}
-.detail-attachment-tag {
+.detail-attachment-list {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
+}
- margin: 0 8px 8px 0;
+.detail-attachment-item {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ padding: 8px 12px;
+ background: var(--el-fill-color-light);
+ border-radius: 6px;
+ cursor: pointer;
+ transition: background 0.2s;
+}
+.detail-attachment-item:hover {
+ background: var(--el-fill-color);
+}
+
+.attachment-icon {
+ font-size: 16px;
+ color: var(--el-text-color-regular);
+}
+
+.attachment-name {
+ font-size: 14px;
+ color: var(--el-text-color-primary);
+}
+
+.attachment-download {
+ font-size: 14px;
+ color: var(--el-text-color-secondary);
}
.text-muted {
--
Gitblit v1.9.3