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/sale/order/form.vue |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/src/pages/sale/order/form.vue b/src/pages/sale/order/form.vue
index d9f3069..b4d5bf8 100644
--- a/src/pages/sale/order/form.vue
+++ b/src/pages/sale/order/form.vue
@@ -18,8 +18,6 @@
     getCustomerSimpleList,
     getMaterialSimpleList,
   } from "../../../api/crm";
-  import type { StorageFile } from "../../../api/crm";
-  import { uploadCertificateFile } from "../../../api/supplier";
   import { useAuth } from "../../../stores/auth";
   import { materialOptionText } from "../../../utils/material";
 
@@ -168,28 +166,6 @@
     form.items?.splice(index, 1);
     recalc();
   }
-  function chooseAttachment() {
-    if (!state.accessToken) return;
-    uni.chooseFile({
-      count: 1,
-      success: async result => {
-        const file = result.tempFiles?.[0];
-        if (!file?.path) return;
-        try {
-          const attachment = await uploadCertificateFile(state.accessToken!, file.path);
-          form.blobIds = [...(form.blobIds || []), attachment.id];
-          form.attachmentList = [...(form.attachmentList || []), attachment as StorageFile];
-          uni.showToast({ title: "涓婁紶鎴愬姛", icon: "success" });
-        } catch (e) {
-          uni.showToast({ title: e instanceof Error ? e.message : "涓婁紶澶辫触", icon: "none" });
-        }
-      },
-    });
-  }
-  function removeAttachment(index: number) {
-    form.blobIds?.splice(index, 1);
-    form.attachmentList?.splice(index, 1);
-  }
   async function save() {
     if (!state.accessToken || saving.value) return;
     if (!editable.value)
@@ -284,9 +260,6 @@
                 @change="selectUser"><view class="picker">{{ userLabel() }}<text>鈥�</text></view></picker></view>
       <view class="field area"><text>澶囨敞</text><textarea v-model="form.remark"
                   placeholder="璇疯緭鍏ュ娉�" ></textarea></view>
-      <view class="field column"><text>闄勪欢</text><view class="attachments"><button @click="chooseAttachment">涓婁紶闄勪欢</button><text v-for="(file, index) in form.attachmentList"
-                  :key="file.id"
-                  @click="removeAttachment(index)">{{ file.name || `闄勪欢 #${file.id}` }} 脳</text></view></view>
     </view>
     <view class="card">
       <view class="sectionHead"><text>閿�鍞骇鍝佹竻鍗�</text><button @click="addItem">娣诲姞閿�鍞骇鍝�</button></view>

--
Gitblit v1.9.3