From fdd3687e392462822226fd4e0ffc20c92a1caaba Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 十一月 2026 16:08:30 +0800
Subject: [PATCH] refactor(app): 移除页面附件上传功能

---
 src/pages/mes/pd/project/detail.vue |   55 -------------------------------------------------------
 1 files changed, 0 insertions(+), 55 deletions(-)

diff --git a/src/pages/mes/pd/project/detail.vue b/src/pages/mes/pd/project/detail.vue
index 61a290d..511345b 100644
--- a/src/pages/mes/pd/project/detail.vue
+++ b/src/pages/mes/pd/project/detail.vue
@@ -4,7 +4,6 @@
   import { getSimpleDictDataList, type DictData } from "../../../../api/crm";
   import {
     archivePdProject,
-    choosePdFile,
     createPdDocument,
     deletePdDocument,
     getPdDocumentAuditPage,
@@ -15,13 +14,11 @@
     submitPdProjectApproval,
     updatePdDocument,
     updatePdDocumentAudit,
-    uploadPdFile,
     uploadPdProject,
     type PdApproveProcess,
     type PdDocument,
     type PdDocumentAudit,
     type PdProject,
-    type PickedFile,
   } from "../../../../api/product-design";
   import { useAuth } from "../../../../stores/auth";
   import PickerSheet from "../../process-design/components/PickerSheet.vue";
@@ -180,47 +177,6 @@
 
   function onDocTypePicked(keys: Array<number | string>) {
     docForm.value.documentType = keys[0] === undefined || keys[0] === "" ? undefined : String(keys[0]);
-  }
-
-  /** 閫夋嫨鏂囦欢骞朵笂浼狅細璧� /system/storage-blob/upload锛屽彇鍥� id 浣滀负 blobIds锛堜笁绔吋瀹癸級 */
-  async function chooseFile() {
-    if (!state.accessToken) return;
-    let files: PickedFile[] = [];
-    try {
-      files = await choosePdFile(9);
-    } catch (error) {
-      // 鐢ㄦ埛涓诲姩鍙栨秷涓嶆彁绀猴紱鐪熷け璐ユ墠鎻愮ず
-      const msg = error instanceof Error ? error.message : "";
-      if (msg && !/cancel/i.test(msg)) toast(msg);
-      return;
-    }
-    if (!files.length) return;
-    uni.showLoading({ title: "涓婁紶涓��", mask: true });
-    try {
-      for (const file of files) {
-        const attachment = await uploadPdFile(state.accessToken, file.path);
-        if (attachment.id) {
-          docForm.value.blobIds = [...(docForm.value.blobIds ?? []), attachment.id];
-          docAttachments.value = [
-            ...docAttachments.value,
-            { id: attachment.id, name: attachment.name || file.name, url: attachment.url },
-          ];
-        }
-      }
-      toast("涓婁紶鎴愬姛");
-    } catch (error) {
-      toast(error instanceof Error ? error.message : "涓婁紶澶辫触");
-    } finally {
-      uni.hideLoading();
-    }
-  }
-
-  function removeAttachment(index: number) {
-    const target = docAttachments.value[index];
-    docAttachments.value = docAttachments.value.filter((_, i) => i !== index);
-    if (target?.id) {
-      docForm.value.blobIds = (docForm.value.blobIds ?? []).filter(id => id !== target.id);
-    }
   }
 
   async function submitDoc() {
@@ -630,17 +586,6 @@
           <view class="field">
             <text class="label required">鐗堟湰</text>
             <input v-model="docForm.documentVersion" placeholder="璇疯緭鍏ョ増鏈�" />
-          </view>
-          <view class="field column">
-            <text class="label">闄勪欢</text>
-            <view class="files">
-              <view v-for="(file, index) in docAttachments" :key="file.id ?? index" class="file">
-                <text class="file-name">{{ file.name || `闄勪欢${index + 1}` }}</text>
-                <text class="file-del" @click="removeAttachment(index)">绉婚櫎</text>
-              </view>
-              <text v-if="!docAttachments.length" class="file-empty">鏆傛湭涓婁紶闄勪欢</text>
-            </view>
-            <button class="upload" @click="chooseFile">閫夋嫨鏂囦欢涓婁紶</button>
           </view>
           <view class="field column">
             <text class="label">澶囨敞</text>

--
Gitblit v1.9.3