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/crm/business/detail.vue                  |   33 ---
 src/pages/mes/pd/project/detail.vue                |   55 ------
 src/pages/supplier/access/index.vue                |   43 ----
 src/pages/aftersales/AftersalesAttachmentField.vue |   23 --
 src/pages/bpm/components/BpmFormRenderer.vue       |   15 -
 src/pages/crm/receivable/form.vue                  |    2 
 src/pages/crm/contract/detail.vue                  |   33 ---
 src/pages/crm/invoice/form.vue                     |    9 
 src/pages/purchase/components/PurchaseForm.vue     |   41 ----
 src/pages/crm/clue/detail.vue                      |   33 ---
 src/pages/supplier/certificate/index.vue           |   41 ----
 src/pages/hrm/HrmAttachmentField.vue               |   47 ----
 src/pages/bpm/process-instance/detail.vue          |   51 -----
 src/pages/sale/order/form.vue                      |   27 ---
 src/pages/srm/tender/form.vue                      |   42 ----
 src/pages/crm/customer/detail.vue                  |   33 ---
 16 files changed, 23 insertions(+), 505 deletions(-)

diff --git a/src/pages/aftersales/AftersalesAttachmentField.vue b/src/pages/aftersales/AftersalesAttachmentField.vue
index 037c7a8..2279a4a 100644
--- a/src/pages/aftersales/AftersalesAttachmentField.vue
+++ b/src/pages/aftersales/AftersalesAttachmentField.vue
@@ -1,22 +1,7 @@
 <script setup lang="ts">
-import { ref } from "vue";
-import { chooseAftersalesFiles, uploadAftersalesFile, type AftersalesAttachment } from "../../api/aftersales";
-const props = withDefaults(defineProps<{ modelValue?: number[]; files?: AftersalesAttachment[]; token?: string | null; readonly?: boolean }>(), { modelValue: () => [], files: () => [], token: null, readonly: false });
-const emit = defineEmits<{ "update:modelValue": [value: number[]]; "update:files": [value: AftersalesAttachment[]] }>();
-const uploading = ref(false);
-async function addFiles() {
-  if (!props.token || uploading.value || props.readonly) return;
-  const left = 10 - props.modelValue.length;
-  if (left <= 0) return uni.showToast({ title: "鏈�澶氫笂浼� 10 涓檮浠�", icon: "none" });
-  try {
-    const picked = await chooseAftersalesFiles(left); uploading.value = true;
-    const ids = [...props.modelValue], files = [...props.files];
-    for (const file of picked) { const saved = await uploadAftersalesFile(props.token, file.path); ids.push(saved.id); files.push({ ...saved, name: saved.name || file.name }); }
-    emit("update:modelValue", ids); emit("update:files", files);
-  } catch (error) { if (!String(error).includes("cancel")) uni.showToast({ title: "闄勪欢涓婁紶澶辫触", icon: "none" }); }
-  finally { uploading.value = false; }
-}
-function remove(index: number) { emit("update:modelValue", props.modelValue.filter((_, i) => i !== index)); emit("update:files", props.files.filter((_, i) => i !== index)); }
+import type { AftersalesAttachment } from "../../api/aftersales";
+withDefaults(defineProps<{ modelValue?: number[]; files?: AftersalesAttachment[]; token?: string | null; readonly?: boolean }>(), { modelValue: () => [], files: () => [], token: null, readonly: false });
+defineEmits<{ "update:modelValue": [value: number[]]; "update:files": [value: AftersalesAttachment[]] }>();
 function preview(file: AftersalesAttachment) {
   if (!file.url) return uni.showToast({ title: "闄勪欢鏆傛棤鍙闂湴鍧�", icon: "none" });
   const url = file.url;
@@ -39,5 +24,5 @@
   // #endif
 }
 </script>
-<template><view class="attachments"><view class="attachment-head"><text>闄勪欢</text><button v-if="!readonly" :loading="uploading" @click="addFiles">娣诲姞闄勪欢</button></view><view v-for="(file,index) in files" :key="file.id" class="file"><text class="file-name" @click="preview(file)">{{ file.name || `闄勪欢 ${index+1}` }}</text><text v-if="!readonly" @click="remove(index)">鍒犻櫎</text></view><text v-if="!files.length" class="empty">鏆傛棤闄勪欢</text></view></template>
+<template><view v-if="files.length" class="attachments"><view class="attachment-head"><text>闄勪欢</text></view><view v-for="(file,index) in files" :key="file.id" class="file"><text class="file-name" @click="preview(file)">{{ file.name || `闄勪欢 ${index+1}` }}</text></view></view></template>
 <style scoped lang="scss">.attachments{padding:20rpx 24rpx}.attachment-head,.file{display:flex;align-items:center;justify-content:space-between;gap:20rpx}.attachment-head{color:#33455d;font-size:27rpx}.attachment-head button{width:150rpx;height:56rpx;margin:0;color:var(--color-primary, #1769d8);font-size:23rpx;line-height:54rpx;background:#f3f7fd;border:1rpx solid #b9d1f2}.attachment-head button::after{border:0}.file{padding:14rpx 0;color:#526780;font-size:24rpx}.file-name{min-width:0;flex:1;overflow:hidden;color:var(--color-primary, #1769d8);text-decoration:underline;text-overflow:ellipsis;white-space:nowrap}.file text:last-child{flex:none;color:#cf4d4d}.empty{display:block;margin-top:14rpx;color:#9aa7b8;font-size:24rpx}</style>
diff --git a/src/pages/bpm/components/BpmFormRenderer.vue b/src/pages/bpm/components/BpmFormRenderer.vue
index 720bcc9..0d2c193 100644
--- a/src/pages/bpm/components/BpmFormRenderer.vue
+++ b/src/pages/bpm/components/BpmFormRenderer.vue
@@ -153,23 +153,12 @@
     return "";
   }
 
-  /** 涓婁紶鍚庣殑鏂囦欢鍊硷紙鏁扮粍锛屽厓绱犱负 { name, url } 鎴� url 瀛楃涓诧級 */
-  const uploading = computed(() => false);
-
+  /** 鍘嗗彶鏂囦欢鍊间粎鐢ㄤ簬鍙灞曠ず锛孉pp 绔笉鎻愪緵闄勪欢涓婁紶銆� */
   function fileList(field: FormField) {
     const value = getValue(field);
     if (!Array.isArray(value)) return [];
     return value.map(item =>
       typeof item === "string" ? { name: item, url: item } : item,
-    );
-  }
-
-  async function removeFile(field: FormField, index: number) {
-    const list = fileList(field);
-    const next = list.filter((_, i) => i !== index);
-    setValue(
-      field.field,
-      next.map(item => item.value ?? item.url ?? item),
     );
   }
 
@@ -323,9 +312,7 @@
       <view v-else-if="field.kind === 'image' || field.kind === 'file'" class="upload">
         <view v-for="(file, index) in fileList(field)" :key="index" class="upload-item">
           <text class="upload-name">{{ file.name || `鏂囦欢${index + 1}` }}</text>
-          <text class="upload-remove" @click="removeFile(field, index)">鍒犻櫎</text>
         </view>
-        <text class="upload-tip">{{ field.placeholder }}</text>
       </view>
 
       <!-- 鍏滃簳锛氫笉鏀寔鐨勭粍浠舵寜鏂囨湰褰曞叆锛屼繚璇佸�艰兘濉笂 -->
diff --git a/src/pages/bpm/process-instance/detail.vue b/src/pages/bpm/process-instance/detail.vue
index 8497eed..316e96c 100644
--- a/src/pages/bpm/process-instance/detail.vue
+++ b/src/pages/bpm/process-instance/detail.vue
@@ -4,7 +4,6 @@
   import { getSimpleDictDataList, type DictData } from "../../../api/crm";
   import {
     approveTask,
-    chooseBpmFile,
     copyTask,
     delegateTask,
     getApprovalDetail,
@@ -17,7 +16,6 @@
     signCreateTask,
     signDeleteTask,
     transferTask,
-    uploadBpmFile,
     type BpmApprovalDetail,
     type BpmApprovalNode,
     type BpmDept,
@@ -550,43 +548,6 @@
     });
   }
 
-  /* ---------- 闄勪欢涓婁紶 ---------- */
-
-  const uploading = ref(false);
-
-  async function chooseAttachment() {
-    if (!state.accessToken || uploading.value) return;
-    let files: Array<{ path: string; name?: string }> = [];
-    try {
-      files = await chooseBpmFile(9);
-    } catch (error) {
-      const msg = error instanceof Error ? error.message : "";
-      if (msg && !/cancel/i.test(msg)) toast(msg);
-      return;
-    }
-    if (!files.length) return;
-    uploading.value = true;
-    uni.showLoading({ title: "涓婁紶涓��", mask: true });
-    try {
-      for (const file of files) {
-        const saved = await uploadBpmFile(state.accessToken, file.path);
-        if (saved.url) operationAttachments.value = [...operationAttachments.value, saved.url];
-      }
-      toast("涓婁紶鎴愬姛");
-    } catch (error) {
-      toast(error instanceof Error ? error.message : "涓婁紶澶辫触");
-    } finally {
-      uploading.value = false;
-      uni.hideLoading();
-    }
-  }
-
-  const operationAttachments = ref<string[]>([]);
-
-  function removeAttachment(index: number) {
-    operationAttachments.value = operationAttachments.value.filter((_, i) => i !== index);
-  }
-
   onLoad(async query => {
     processInstanceId.value = query?.id ? String(query.id) : "";
     taskId.value = query?.taskId ? String(query.taskId) : "";
@@ -811,18 +772,6 @@
             class="modal-textarea"
             placeholder="璇疯緭鍏ュ鎵规剰瑙�"
           />
-        </view>
-
-        <!-- 闄勪欢 -->
-        <view class="modal-field">
-          <text class="modal-label">闄勪欢</text>
-          <view class="attach-list">
-            <view v-for="(url, index) in operationAttachments" :key="url" class="attach-item">
-              <text class="attach-name">闄勪欢 {{ index + 1 }}</text>
-              <text class="attach-remove" @click="removeAttachment(index)">鍒犻櫎</text>
-            </view>
-          </view>
-          <button class="attach-btn" :loading="uploading" @click="chooseAttachment">娣诲姞闄勪欢</button>
         </view>
 
         <view class="modal-actions">
diff --git a/src/pages/crm/business/detail.vue b/src/pages/crm/business/detail.vue
index 1c47e6d..2d5d9f3 100644
--- a/src/pages/crm/business/detail.vue
+++ b/src/pages/crm/business/detail.vue
@@ -218,36 +218,8 @@
       },
     });
   }
-  async function chooseFollowFile() {
-    if (!state.accessToken || uploading.value) return;
-    uni.chooseFile({
-      count: 10 - followForm.blobIds.length,
-      success: async result => {
-        uploading.value = true;
-        try {
-          for (const file of result.tempFiles || []) {
-            if (!file.path) continue;
-            const attachment = await uploadCrmFile(state.accessToken!, file.path);
-            followForm.blobIds.push(attachment.id);
-            followForm.attachments.push(attachment);
-          }
-        } catch (error) {
-          uni.showToast({
-            title: error instanceof Error ? error.message : "闄勪欢涓婁紶澶辫触",
-            icon: "none",
-          });
-        } finally {
-          uploading.value = false;
-        }
-      },
-    });
-  }
   function removeImage(index: number) {
     followForm.picUrls.splice(index, 1);
-  }
-  function removeFile(index: number) {
-    followForm.blobIds.splice(index, 1);
-    followForm.attachments.splice(index, 1);
   }
   async function saveFollow() {
     if (
@@ -411,10 +383,7 @@
                        @click="uni.previewImage({urls:followForm.picUrls,current:url})" /><text @click="removeImage(index)">脳</text>
               </view>
             </view>
-            <view class="upload-head"><text>闄勪欢</text><text @click="chooseFollowFile">涓婁紶闄勪欢</text></view>
-            <view v-for="(item,index) in followForm.attachments"
-                  :key="item.id"
-                  class="file-item"><text>{{item.name || `闄勪欢 #${item.id}`}}</text><text @click="removeFile(index)">鍒犻櫎</text></view><button class="primary"
+            <button class="primary"
                     :loading="saving || uploading"
                     @click="saveFollow">淇濆瓨璺熻繘</button>
           </view>
diff --git a/src/pages/crm/clue/detail.vue b/src/pages/crm/clue/detail.vue
index 713c062..8df4c15 100644
--- a/src/pages/crm/clue/detail.vue
+++ b/src/pages/crm/clue/detail.vue
@@ -144,36 +144,8 @@
       },
     });
   }
-  async function chooseFollowFile() {
-    if (!state.accessToken || uploading.value) return;
-    uni.chooseFile({
-      count: 10 - followForm.blobIds.length,
-      success: async result => {
-        uploading.value = true;
-        try {
-          for (const file of result.tempFiles || []) {
-            if (!file.path) continue;
-            const attachment = await uploadCrmFile(state.accessToken!, file.path);
-            followForm.blobIds.push(attachment.id);
-            followForm.attachments.push(attachment);
-          }
-        } catch (error) {
-          uni.showToast({
-            title: error instanceof Error ? error.message : "闄勪欢涓婁紶澶辫触",
-            icon: "none",
-          });
-        } finally {
-          uploading.value = false;
-        }
-      },
-    });
-  }
   function removeImage(index: number) {
     followForm.picUrls.splice(index, 1);
-  }
-  function removeFile(index: number) {
-    followForm.blobIds.splice(index, 1);
-    followForm.attachments.splice(index, 1);
   }
   async function saveFollow() {
     if (
@@ -356,10 +328,7 @@
                        @click="uni.previewImage({urls:followForm.picUrls,current:url})" /><text @click="removeImage(index)">脳</text>
               </view>
             </view>
-            <view class="upload-head"><text>闄勪欢</text><text @click="chooseFollowFile">涓婁紶闄勪欢</text></view>
-            <view v-for="(item,index) in followForm.attachments"
-                  :key="item.id"
-                  class="file-item"><text>{{item.name || `闄勪欢 #${item.id}`}}</text><text @click="removeFile(index)">鍒犻櫎</text></view><button class="primary"
+            <button class="primary"
                     :loading="saving || uploading"
                     @click="saveFollow">淇濆瓨璺熻繘</button>
           </view>
diff --git a/src/pages/crm/contract/detail.vue b/src/pages/crm/contract/detail.vue
index 4c83e7e..0fd2fd8 100644
--- a/src/pages/crm/contract/detail.vue
+++ b/src/pages/crm/contract/detail.vue
@@ -260,36 +260,8 @@
       },
     });
   }
-  async function chooseFile() {
-    if (!state.accessToken || uploading.value) return;
-    uni.chooseFile({
-      count: 10 - follow.blobIds.length,
-      success: async result => {
-        uploading.value = true;
-        try {
-          for (const file of result.tempFiles || []) {
-            if (!file.path) continue;
-            const attachment = await uploadCrmFile(state.accessToken!, file.path);
-            follow.blobIds.push(attachment.id);
-            follow.attachments.push(attachment);
-          }
-        } catch (error) {
-          uni.showToast({
-            title: error instanceof Error ? error.message : "闄勪欢涓婁紶澶辫触",
-            icon: "none",
-          });
-        } finally {
-          uploading.value = false;
-        }
-      },
-    });
-  }
   function removeImage(index: number) {
     follow.picUrls.splice(index, 1);
-  }
-  function removeFile(index: number) {
-    follow.blobIds.splice(index, 1);
-    follow.attachments.splice(index, 1);
   }
   async function saveFollow() {
     if (
@@ -520,10 +492,7 @@
                        @click="uni.previewImage({urls:follow.picUrls,current:url})" /><text @click="removeImage(index)">脳</text>
               </view>
             </view>
-            <view class="upload-head"><text>闄勪欢</text><text @click="chooseFile">涓婁紶闄勪欢</text></view>
-            <view v-for="(file,index) in follow.attachments"
-                  :key="file.id"
-                  class="file"><text>{{file.name||`闄勪欢 #${file.id}`}}</text><text @click="removeFile(index)">鍒犻櫎</text></view><button class="primary"
+            <button class="primary"
                     :loading="saving||uploading"
                     @click="saveFollow">淇濆瓨璺熻繘</button>
           </view>
diff --git a/src/pages/crm/customer/detail.vue b/src/pages/crm/customer/detail.vue
index aa23080..5ebc095 100644
--- a/src/pages/crm/customer/detail.vue
+++ b/src/pages/crm/customer/detail.vue
@@ -395,36 +395,8 @@
       },
     });
   }
-  async function chooseFile() {
-    if (!state.accessToken || uploading.value) return;
-    uni.chooseFile({
-      count: 10 - follow.blobIds.length,
-      success: async result => {
-        uploading.value = true;
-        try {
-          for (const file of result.tempFiles || []) {
-            if (!file.path) continue;
-            const attachment = await uploadCrmFile(state.accessToken!, file.path);
-            follow.blobIds.push(attachment.id);
-            follow.attachments.push(attachment);
-          }
-        } catch (error) {
-          uni.showToast({
-            title: error instanceof Error ? error.message : "闄勪欢涓婁紶澶辫触",
-            icon: "none",
-          });
-        } finally {
-          uploading.value = false;
-        }
-      },
-    });
-  }
   function removeImage(index: number) {
     follow.picUrls.splice(index, 1);
-  }
-  function removeFile(index: number) {
-    follow.blobIds.splice(index, 1);
-    follow.attachments.splice(index, 1);
   }
   async function saveFollow() {
     if (
@@ -614,10 +586,7 @@
                        @click="uni.previewImage({urls:follow.picUrls,current:url})" /><text @click="removeImage(index)">脳</text>
               </view>
             </view>
-            <view class="upload-head"><text>闄勪欢</text><text @click="chooseFile">涓婁紶闄勪欢</text></view>
-            <view v-for="(file,index) in follow.attachments"
-                  :key="file.id"
-                  class="file"><text>{{file.name||`闄勪欢 #${file.id}`}}</text><text @click="removeFile(index)">鍒犻櫎</text></view><button class="primary"
+            <button class="primary"
                     :loading="saving||uploading"
                     @click="saveFollow">淇濆瓨璺熻繘</button>
           </view>
diff --git a/src/pages/crm/invoice/form.vue b/src/pages/crm/invoice/form.vue
index ef6b84b..3a212c1 100644
--- a/src/pages/crm/invoice/form.vue
+++ b/src/pages/crm/invoice/form.vue
@@ -1,15 +1,14 @@
 <script setup lang="ts">
 import { computed, reactive, ref } from 'vue';
 import { onLoad } from '@dcloudio/uni-app';
-import { createInvoice, getContractPage, getCrmUserList, getCustomerSimpleList, getInvoice, getSimpleDictDataList, updateInvoice, uploadCrmFile, type CrmContract, type CrmCustomerSimple, type CrmInvoice, type DictData, type StorageFile } from '../../../api/crm';
+import { createInvoice, getContractPage, getCrmUserList, getCustomerSimpleList, getInvoice, getSimpleDictDataList, updateInvoice, type CrmContract, type CrmCustomerSimple, type CrmInvoice, type DictData } from '../../../api/crm';
 import type { UserSimple } from '../../../api/purchase'; import { useAuth } from '../../../stores/auth';
-const { state } = useAuth(); const id=ref<number>(),saving=ref(false),uploading=ref(false),customers=ref<CrmCustomerSimple[]>([]),contracts=ref<CrmContract[]>([]),users=ref<UserSimple[]>([]),dicts=ref<DictData[]>([]),attachments=ref<StorageFile[]>([]);
+const { state } = useAuth(); const id=ref<number>(),saving=ref(false),customers=ref<CrmCustomerSimple[]>([]),contracts=ref<CrmContract[]>([]),users=ref<UserSimple[]>([]),dicts=ref<DictData[]>([]);
 const form=reactive<CrmInvoice>({customerId:undefined,contractId:undefined,ownerUserId:undefined,invoiceType:undefined,invoiceNo:'',invoiceTitle:'',price:undefined,invoiceTime:'',remark:'',blobIds:[]});
 const invoiceTypes=computed(()=>dicts.value.filter(x=>x.dictType==='crm_invoice_type'&&x.status!==1)); const label=(items:any[],value?:number,key='name')=>items.find(x=>x.id===value)?.[key]||'璇烽�夋嫨';
 function selectCustomer(index:number){const x=customers.value[index];form.customerId=x.id;form.customerName=x.name;form.contractId=undefined;form.contract=undefined;} function selectContract(index:number){const x=contracts.value[index];form.contractId=x.id;form.contract={id:x.id,no:x.no,name:x.name};form.customerId=x.customerId;form.customerName=x.customerName;}
-async function chooseFile(){if(!state.accessToken||uploading.value)return; uni.chooseFile({count:10-(form.blobIds?.length||0),success:async result=>{uploading.value=true;try{for(const file of result.tempFiles||[]){if(!file.path)continue;const saved=await uploadCrmFile(state.accessToken!,file.path);form.blobIds?.push(saved.id);attachments.value.push(saved);}}catch(error){uni.showToast({title:error instanceof Error?error.message:'闄勪欢涓婁紶澶辫触',icon:'none'});}finally{uploading.value=false;}}});}
 async function save(){if(!state.accessToken||saving.value)return;if(!form.customerId||!form.contractId||!form.ownerUserId||form.invoiceType===undefined||!Number(form.price)||!form.invoiceTime)return uni.showToast({title:'璇峰~鍐欏鎴枫�佸悎鍚屻�佽礋璐d汉銆佸彂绁ㄧ被鍨嬨�侀噾棰濆拰鏃ユ湡',icon:'none'});saving.value=true;try{const data={...form,price:Number(form.price),invoiceTime:`${form.invoiceTime} 00:00:00`};if(id.value)await updateInvoice(state.accessToken,{...data,id:id.value});else await createInvoice(state.accessToken,data);uni.showToast({title:'淇濆瓨鎴愬姛',icon:'success'});setTimeout(()=>uni.navigateBack(),500);}catch(error){uni.showToast({title:error instanceof Error?error.message:'淇濆瓨澶辫触',icon:'none'});}finally{saving.value=false;}}
-onLoad(async query=>{id.value=query.id?Number(query.id):undefined;if(!state.accessToken)return;try{const [customerData,contractData,userData,dictData]=await Promise.all([getCustomerSimpleList(state.accessToken),getContractPage(state.accessToken,{pageNo:1,pageSize:100}),getCrmUserList(state.accessToken),getSimpleDictDataList(state.accessToken)]);customers.value=customerData;contracts.value=contractData.list;users.value=userData;dicts.value=dictData;if(id.value){const data=await getInvoice(state.accessToken,id.value);Object.assign(form,data,{invoiceTime:data.invoiceTime?.slice(0,10)||'',blobIds:data.attachmentList?.map(x=>x.id)||data.blobIds||[]});attachments.value=data.attachmentList||[];}else{form.ownerUserId=state.user?.id;form.ownerUserName=state.user?.nickname;}}catch(error){uni.showToast({title:error instanceof Error?error.message:'鏁版嵁鍔犺浇澶辫触',icon:'none'});}});
+onLoad(async query=>{id.value=query.id?Number(query.id):undefined;if(!state.accessToken)return;try{const [customerData,contractData,userData,dictData]=await Promise.all([getCustomerSimpleList(state.accessToken),getContractPage(state.accessToken,{pageNo:1,pageSize:100}),getCrmUserList(state.accessToken),getSimpleDictDataList(state.accessToken)]);customers.value=customerData;contracts.value=contractData.list;users.value=userData;dicts.value=dictData;if(id.value){const data=await getInvoice(state.accessToken,id.value);Object.assign(form,data,{invoiceTime:data.invoiceTime?.slice(0,10)||'',blobIds:data.attachmentList?.map(x=>x.id)||data.blobIds||[]});}else{form.ownerUserId=state.user?.id;form.ownerUserName=state.user?.nickname;}}catch(error){uni.showToast({title:error instanceof Error?error.message:'鏁版嵁鍔犺浇澶辫触',icon:'none'});}});
 </script>
-<template><view class="page"><view class="card"><view class="section">寮�绁ㄤ俊鎭�</view><view class="field"><text>瀹㈡埛 <text class="required">*</text></text><picker :range="customers" range-key="name" @change="selectCustomer(Number($event.detail.value))"><view class="picker">{{form.customerName||label(customers,form.customerId)}}<text>鈥�</text></view></picker></view><view class="field"><text>鍚堝悓 <text class="required">*</text></text><picker :range="contracts" range-key="name" @change="selectContract(Number($event.detail.value))"><view class="picker">{{form.contract?.name||form.contract?.no||label(contracts,form.contractId)}}<text>鈥�</text></view></picker></view><view class="field"><text>璐熻矗浜� <text class="required">*</text></text><picker :disabled="Boolean(id)" :range="users" range-key="nickname" @change="form.ownerUserId=users[Number($event.detail.value)].id;form.ownerUserName=users[Number($event.detail.value)].nickname"><view class="picker">{{form.ownerUserName||label(users,form.ownerUserId,'nickname')}}<text>鈥�</text></view></picker></view><view class="field"><text>鍙戠エ绫诲瀷 <text class="required">*</text></text><picker :range="invoiceTypes" range-key="label" @change="form.invoiceType=Number(invoiceTypes[Number($event.detail.value)].value)"><view class="picker">{{invoiceTypes.find(x=>Number(x.value)===form.invoiceType)?.label||'璇烽�夋嫨鍙戠エ绫诲瀷'}}<text>鈥�</text></view></picker></view><view class="field"><text>鍙戠エ鍙风爜</text><input v-model="form.invoiceNo" placeholder="璇疯緭鍏ュ彂绁ㄥ彿鐮�"/></view><view class="field"><text>鍙戠エ鎶ご</text><input v-model="form.invoiceTitle" placeholder="璇疯緭鍏ュ彂绁ㄦ姮澶�"/></view><view class="field"><text>寮�绁ㄩ噾棰� <text class="required">*</text></text><input :value="form.price===undefined?'':String(form.price)" type="digit" placeholder="璇疯緭鍏ュ紑绁ㄩ噾棰�" @input="form.price=Number($event.detail.value||0)"/></view><view class="field"><text>寮�绁ㄦ棩鏈� <text class="required">*</text></text><picker mode="date" :value="form.invoiceTime" @change="form.invoiceTime=$event.detail.value"><view class="picker">{{form.invoiceTime||'璇烽�夋嫨鏃ユ湡'}}<text>鈥�</text></view></picker></view><view class="field column"><text>鍙戠エ闄勪欢</text><button class="upload" :loading="uploading" @click="chooseFile">娣诲姞闄勪欢</button><text v-for="(file,index) in attachments" :key="file.id" class="file">{{file.name||`闄勪欢 ${index+1}`}} <text @click="form.blobIds?.splice(index,1);attachments.splice(index,1)">鍒犻櫎</text></text></view><view class="field column"><text>澶囨敞</text><textarea v-model="form.remark" placeholder="璇疯緭鍏ュ娉�"></textarea></view></view><button class="save" :loading="saving" :disabled="saving" @click="save">淇濆瓨</button></view></template>
+<template><view class="page"><view class="card"><view class="section">寮�绁ㄤ俊鎭�</view><view class="field"><text>瀹㈡埛 <text class="required">*</text></text><picker :range="customers" range-key="name" @change="selectCustomer(Number($event.detail.value))"><view class="picker">{{form.customerName||label(customers,form.customerId)}}<text>鈥�</text></view></picker></view><view class="field"><text>鍚堝悓 <text class="required">*</text></text><picker :range="contracts" range-key="name" @change="selectContract(Number($event.detail.value))"><view class="picker">{{form.contract?.name||form.contract?.no||label(contracts,form.contractId)}}<text>鈥�</text></view></picker></view><view class="field"><text>璐熻矗浜� <text class="required">*</text></text><picker :disabled="Boolean(id)" :range="users" range-key="nickname" @change="form.ownerUserId=users[Number($event.detail.value)].id;form.ownerUserName=users[Number($event.detail.value)].nickname"><view class="picker">{{form.ownerUserName||label(users,form.ownerUserId,'nickname')}}<text>鈥�</text></view></picker></view><view class="field"><text>鍙戠エ绫诲瀷 <text class="required">*</text></text><picker :range="invoiceTypes" range-key="label" @change="form.invoiceType=Number(invoiceTypes[Number($event.detail.value)].value)"><view class="picker">{{invoiceTypes.find(x=>Number(x.value)===form.invoiceType)?.label||'璇烽�夋嫨鍙戠エ绫诲瀷'}}<text>鈥�</text></view></picker></view><view class="field"><text>鍙戠エ鍙风爜</text><input v-model="form.invoiceNo" placeholder="璇疯緭鍏ュ彂绁ㄥ彿鐮�"/></view><view class="field"><text>鍙戠エ鎶ご</text><input v-model="form.invoiceTitle" placeholder="璇疯緭鍏ュ彂绁ㄦ姮澶�"/></view><view class="field"><text>寮�绁ㄩ噾棰� <text class="required">*</text></text><input :value="form.price===undefined?'':String(form.price)" type="digit" placeholder="璇疯緭鍏ュ紑绁ㄩ噾棰�" @input="form.price=Number($event.detail.value||0)"/></view><view class="field"><text>寮�绁ㄦ棩鏈� <text class="required">*</text></text><picker mode="date" :value="form.invoiceTime" @change="form.invoiceTime=$event.detail.value"><view class="picker">{{form.invoiceTime||'璇烽�夋嫨鏃ユ湡'}}<text>鈥�</text></view></picker></view><view class="field column"><text>澶囨敞</text><textarea v-model="form.remark" placeholder="璇疯緭鍏ュ娉�"></textarea></view></view><button class="save" :loading="saving" :disabled="saving" @click="save">淇濆瓨</button></view></template>
 <style lang="scss" scoped>.page{min-height:100vh;padding:24rpx 30rpx 70rpx;background:#f6f7f9}.card{overflow:hidden;background:#fff;border-radius:16rpx}.section{padding:22rpx 24rpx 12rpx;color:var(--color-primary, #1769d8);font-size:25rpx;font-weight:600;background:#f8fbff}.field{display:flex;align-items:center;min-height:96rpx;padding:0 24rpx;gap:20rpx;border-bottom:1rpx solid #eef1f5}.field>text:first-child{width:190rpx;color:#33455d;font-size:27rpx}.required{color:#e34b4b}.field input,.field picker,.picker{flex:1;color:#1e3049;font-size:27rpx}.picker{display:flex;justify-content:space-between;color:#65758a}.picker text{color:#8092a7;font-size:36rpx}.column{align-items:flex-start;flex-direction:column;padding:20rpx 24rpx}.column>text:first-child{width:auto}.column textarea{width:100%;height:130rpx;font-size:27rpx}.upload{margin:0;color:var(--color-primary, #1769d8);font-size:24rpx;background:var(--color-primary-soft, #f5f8ff);border:1rpx solid var(--color-primary-border, #8ab3ee)}.file{width:100%;color:#65758a!important;font-size:24rpx!important}.file text{float:right;color:#c65050}.save{margin-top:32rpx;color:#fff;background:var(--color-primary, #1769d8);border-radius:12rpx;font-size:30rpx}.save::after,.upload::after{border:0}</style>
diff --git a/src/pages/crm/receivable/form.vue b/src/pages/crm/receivable/form.vue
index 6a7c2e7..2fa1d9f 100644
--- a/src/pages/crm/receivable/form.vue
+++ b/src/pages/crm/receivable/form.vue
@@ -27,7 +27,7 @@
 const returnTypeLabel = () => returnTypes.value.find(item => Number(item.value) === form.returnType)?.label || "璇烽�夋嫨鍥炴鏂瑰紡";
 async function loadRelated() { if (!state.accessToken || !form.contractId) { invoices.value = []; plans.value = []; return; } const [invoiceData, planData] = await Promise.all([getInvoiceSimpleList(state.accessToken, form.contractId), form.customerId ? getReceivablePlanSimpleList(state.accessToken, form.customerId, form.contractId) : Promise.resolve([])]); invoices.value = invoiceData; plans.value = planData; }
 function selectCustomer(index: number) { const customer = customers.value[index]; form.customerId = customer.id; form.customerName = customer.name; form.contractId = undefined; form.contractNo = undefined; form.invoiceId = undefined; form.planId = undefined; form.returnTime = ""; form.returnType = undefined; form.price = undefined; invoices.value = []; plans.value = []; }
-async function selectContract(index: number) { const contract = availableContracts.value[index]; form.contractId = contract.id; form.contractNo = contract.no || contract.name; form.customerId = contract.customerId; form.customerName = contract.customerName; form.invoiceId = undefined; form.planId = undefined; form.returnTime = ""; form.returnType = undefined; form.price = undefined; await loadRelated(); uni.showToast({ title: "璇峰厛瀹屾垚寮�绁ㄥ苟涓婁紶鍙戠エ闄勪欢锛屽啀杩涜鍥炴鎿嶄綔", icon: "none", duration: 2400 }); }
+async function selectContract(index: number) { const contract = availableContracts.value[index]; form.contractId = contract.id; form.contractNo = contract.no || contract.name; form.customerId = contract.customerId; form.customerName = contract.customerName; form.invoiceId = undefined; form.planId = undefined; form.returnTime = ""; form.returnType = undefined; form.price = undefined; await loadRelated(); uni.showToast({ title: "璇峰厛瀹屾垚寮�绁紝鍐嶈繘琛屽洖娆炬搷浣�", icon: "none", duration: 2400 }); }
 function selectPlan(index: number) { const plan = plans.value[index]; form.planId = plan.id; form.returnTime = plan.returnTime?.slice(0, 10) || ""; form.returnType = plan.returnType; form.price = plan.price; }
 async function save() { if (!state.accessToken || saving.value || !editable.value) return; if (!form.customerId || !form.contractId || !form.invoiceId || !form.ownerUserId || !form.returnTime || form.returnType === undefined || !Number(form.price)) return uni.showToast({ title: "璇峰~鍐欏鎴枫�佸悎鍚屻�佸叧鑱斿彂绁ㄣ�佽礋璐d汉銆佸洖娆炬棩鏈熴�佹柟寮忓拰閲戦", icon: "none" }); saving.value = true; try { const data = { ...form, returnTime: `${form.returnTime} 00:00:00`, price: Number(form.price) }; if (id.value) await updateReceivable(state.accessToken, { ...data, id: id.value }); else await createReceivable(state.accessToken, data); uni.showToast({ title: "淇濆瓨鎴愬姛", icon: "success" }); setTimeout(() => uni.navigateBack(), 500); } catch (error) { uni.showToast({ title: error instanceof Error ? error.message : "淇濆瓨澶辫触", icon: "none" }); } finally { saving.value = false; } }
 onLoad(async query => { id.value = query.id ? Number(query.id) : undefined; const contractId = query.contractId ? Number(query.contractId) : undefined; const customerId = query.customerId ? Number(query.customerId) : undefined; const planId = query.planId ? Number(query.planId) : undefined; if (!state.accessToken) return; try { const [customerData, contractData, userData, dictData] = await Promise.all([getCustomerSimpleList(state.accessToken), getContractPage(state.accessToken, { pageNo: 1, pageSize: 100 }), getCrmUserList(state.accessToken), getSimpleDictDataList(state.accessToken)]); customers.value = customerData; contracts.value = contractData.list; users.value = userData; dicts.value = dictData; if (id.value) { const data = await getReceivable(state.accessToken, id.value); Object.assign(form, data, { returnTime: data.returnTime?.slice(0, 10) || "" }); await loadRelated(); } else { form.customerId = customerId; form.customerName = customers.value.find(item => item.id === customerId)?.name; form.ownerUserId = state.user?.id; form.ownerUserName = state.user?.nickname; if (contractId) { const contract = contracts.value.find(item => item.id === contractId) || await getContract(state.accessToken, contractId); if (!contracts.value.some(item => item.id === contract.id)) contracts.value.push(contract); form.contractId = contract.id; form.contractNo = contract.no || contract.name; form.customerId = contract.customerId; form.customerName = contract.customerName; await loadRelated(); } if (planId && form.customerId && form.contractId) { const plan = plans.value.find(item => item.id === planId); if (plan) selectPlan(plans.value.indexOf(plan)); } } } catch (error) { uni.showToast({ title: error instanceof Error ? error.message : "鏁版嵁鍔犺浇澶辫触", icon: "none" }); } });
diff --git a/src/pages/hrm/HrmAttachmentField.vue b/src/pages/hrm/HrmAttachmentField.vue
index a76f26d..8880048 100644
--- a/src/pages/hrm/HrmAttachmentField.vue
+++ b/src/pages/hrm/HrmAttachmentField.vue
@@ -1,63 +1,30 @@
 <script setup lang="ts">
-import { ref } from "vue";
-import { chooseHrmFiles, uploadHrmFile, type HrmAttachment } from "../../api/hrm";
-
-const props = withDefaults(defineProps<{
+import type { HrmAttachment } from "../../api/hrm";
+withDefaults(defineProps<{
   modelValue?: number[];
   files?: HrmAttachment[];
   token?: string | null;
   readonly?: boolean;
 }>(), { modelValue: () => [], files: () => [], token: null, readonly: false });
-const emit = defineEmits<{
+defineEmits<{
   "update:modelValue": [value: number[]];
   "update:files": [value: HrmAttachment[]];
 }>();
-const uploading = ref(false);
-
-async function addFiles() {
-  if (!props.token || uploading.value || props.readonly) return;
-  const remaining = 10 - props.modelValue.length;
-  if (remaining <= 0) return uni.showToast({ title: "鏈�澶氫笂浼� 10 涓檮浠�", icon: "none" });
-  try {
-    const picked = await chooseHrmFiles(remaining);
-    if (!picked.length) return;
-    uploading.value = true;
-    const ids = [...props.modelValue];
-    const files = [...props.files];
-    for (const item of picked) {
-      const uploaded = await uploadHrmFile(props.token, item.path);
-      ids.push(uploaded.id);
-      files.push({ ...uploaded, name: uploaded.name || item.name });
-    }
-    emit("update:modelValue", ids);
-    emit("update:files", files);
-  } catch (error) {
-    const message = error instanceof Error ? error.message : "闄勪欢涓婁紶澶辫触";
-    if (!String(message).includes("cancel")) uni.showToast({ title: message, icon: "none" });
-  } finally {
-    uploading.value = false;
-  }
-}
-
-function remove(index: number) {
-  emit("update:modelValue", props.modelValue.filter((_, itemIndex) => itemIndex !== index));
-  emit("update:files", props.files.filter((_, itemIndex) => itemIndex !== index));
-}
 </script>
 
 <template>
-  <view class="attachment-field">
+  <view v-if="files.length" class="attachment-field">
     <view class="attachment-head">
       <text>闄勪欢</text>
-      <button v-if="!readonly" :loading="uploading" :disabled="uploading||modelValue.length>=10" @click="addFiles">娣诲姞闄勪欢</button>
+
     </view>
     <view v-if="files.length" class="attachment-list">
       <view v-for="(file,index) in files" :key="file.id" class="attachment-item">
         <text>{{ file.name || `闄勪欢 ${index + 1}` }}</text>
-        <text v-if="!readonly" class="remove" @click="remove(index)">鍒犻櫎</text>
+
       </view>
     </view>
-    <text v-else class="empty">鏆傛棤闄勪欢</text>
+
   </view>
 </template>
 
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>
diff --git a/src/pages/purchase/components/PurchaseForm.vue b/src/pages/purchase/components/PurchaseForm.vue
index cf96678..77483d5 100644
--- a/src/pages/purchase/components/PurchaseForm.vue
+++ b/src/pages/purchase/components/PurchaseForm.vue
@@ -19,8 +19,6 @@
   import { getMaterialPage, type MaterialItem } from "../../../api/basic-data";
   import {
     getSupplierSimpleList,
-    uploadCertificateFile,
-    type StorageAttachment,
     type SupplierItem,
   } from "../../../api/supplier";
   import { useAuth } from "../../../stores/auth";
@@ -188,35 +186,6 @@
     );
     form.totalPrice = total;
     form.paymentPrice = total - (form.discountPrice || 0);
-  }
-  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];
-          uni.showToast({ title: "涓婁紶鎴愬姛", icon: "success" });
-        } catch (error) {
-          uni.showToast({ title: message(error), icon: "none" });
-        }
-      },
-    });
-  }
-  function removeAttachment(index: number) {
-    form.blobIds?.splice(index, 1);
-    form.attachmentList?.splice(index, 1);
-  }
-  function previewAttachment(attachment: StorageAttachment) {
-    if (attachment.url) uni.previewImage({ urls: [attachment.url] });
-    else uni.showToast({ title: "闄勪欢鍦板潃涓嶅彲鐢�", icon: "none" });
   }
   async function load() {
     if (!state.accessToken) return;
@@ -627,16 +596,6 @@
             class="summary"><text>鍚堣</text>
         <view><text>鏁伴噺锛歿{ (form.items || []).reduce((sum, item) => sum + (item.count || 0), 0).toFixed(3) }}</text><text>閲戦锛毬� {{ (form.items || []).reduce((sum, item) => sum + (kind === 'request' ? requestItemAmount(item) : orderItemAmounts(item).totalAmount), 0).toFixed(2) }}</text></view>
       </view>
-    </view>
-    <view class="card attachments">
-      <view class="section"><text>闄勪欢</text><button @click="chooseAttachment">涓婁紶闄勪欢</button></view>
-      <view v-if="form.attachmentList?.length">
-        <view v-for="(attachment, index) in form.attachmentList"
-              :key="attachment.id"
-              class="attachment"><text @click="previewAttachment(attachment)">{{ attachment.name || `闄勪欢 #${attachment.id}` }}</text><text class="danger"
-                @click="removeAttachment(index)">鍒犻櫎</text></view>
-      </view><text v-else
-            class="empty">鏆傛棤闄勪欢</text>
     </view>
     <button class="save"
             :loading="saving"
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>
diff --git a/src/pages/srm/tender/form.vue b/src/pages/srm/tender/form.vue
index 2ae0c6d..4f1e868 100644
--- a/src/pages/srm/tender/form.vue
+++ b/src/pages/srm/tender/form.vue
@@ -6,8 +6,6 @@
     getTenderProject,
     updateTenderProject,
     updateTenderProjectInfo,
-    uploadTenderFile,
-    type StorageAttachment,
     type TenderProject,
   } from "../../../api/srm";
   import { useAuth } from "../../../stores/auth";
@@ -43,40 +41,6 @@
   }
   const partialEditable = () =>
     Boolean(id.value && [1, 2].includes(form.tenderStatus || 0));
-  async function chooseAttachment() {
-    if (!state.accessToken) return;
-    uni.chooseFile({
-      count: 1,
-      extension: ["jpg", "jpeg", "png", "pdf", "doc", "docx"],
-      success: async result => {
-        const file = result.tempFiles?.[0];
-        if (!file?.path) return;
-        try {
-          const attachment = await uploadTenderFile(
-            state.accessToken!,
-            file.path
-          );
-          form.blobIds = [...(form.blobIds || []), attachment.id];
-          form.attachmentList = [...(form.attachmentList || []), attachment];
-          uni.showToast({ title: "涓婁紶鎴愬姛", icon: "success" });
-        } catch (error) {
-          uni.showToast({
-            title: error instanceof Error ? error.message : "涓婁紶澶辫触",
-            icon: "none",
-          });
-        }
-      },
-    });
-  }
-  function removeAttachment(index: number) {
-    form.blobIds?.splice(index, 1);
-    form.attachmentList?.splice(index, 1);
-  }
-  function previewAttachment(item: StorageAttachment) {
-    const url = item.previewURL || item.url;
-    if (url) uni.previewImage({ urls: [url] });
-    else uni.showToast({ title: "闄勪欢鍦板潃涓嶅彲鐢�", icon: "none" });
-  }
   async function save() {
     if (!form.tenderNo.trim() || !form.tenderName.trim())
       return uni.showToast({ title: "璇峰~鍐欐嫑鏍囩紪鍙峰拰鍚嶇О", icon: "none" });
@@ -200,12 +164,6 @@
       </template>
       <view class="field column"><text>璧勮川瑕佹眰</text><textarea v-model="form.qualificationRequirements"
                   placeholder="璇疯緭鍏ヨ祫璐ㄨ姹�" ></textarea></view>
-      <view class="attachments">
-        <view class="attachmentHead"><text>璧勮川瑕佹眰闄勪欢</text><text @click="chooseAttachment">涓婁紶闄勪欢</text></view>
-        <view v-for="(item,index) in form.attachmentList"
-              :key="item.id"
-              class="attachment"><text @click="previewAttachment(item)">{{item.name||`闄勪欢${index+1}`}}</text><text @click="removeAttachment(index)">鍒犻櫎</text></view>
-      </view>
     </view>
     <button class="save"
             :loading="saving"
diff --git a/src/pages/supplier/access/index.vue b/src/pages/supplier/access/index.vue
index e650c91..a7cf580 100644
--- a/src/pages/supplier/access/index.vue
+++ b/src/pages/supplier/access/index.vue
@@ -13,8 +13,6 @@
     reviewQuality,
     submitApply,
     updateApply,
-    uploadCertificateFile,
-    type StorageAttachment,
     type SupplierApplyItem,
     type SupplierItem,
   } from "../../../api/supplier";
@@ -132,40 +130,6 @@
         address: supplier.address || "",
         taxNo: supplier.taxNo || "",
       });
-  }
-  async function chooseAttachment() {
-    if (!state.accessToken) return;
-    uni.chooseFile({
-      count: 1,
-      extension: ["jpg", "jpeg", "png", "pdf", "doc", "docx"],
-      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];
-          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);
-  }
-  function previewAttachment(item: StorageAttachment) {
-    const url = item.previewURL || item.url;
-    if (url) uni.previewImage({ urls: [url] });
-    else uni.showToast({ title: "闄勪欢鍦板潃涓嶅彲鐢�", icon: "none" });
   }
   async function save() {
     if (!form.supplierId && !form.supplierName.trim())
@@ -329,12 +293,7 @@
                  placeholder="绋庡彿" /></view>
         <view class="area"><text>澶囨敞</text><textarea v-model="form.remark"
                     placeholder="澶囨敞" ></textarea></view>
-        <view class="attachments">
-          <view class="attachmentHead"><text>鍑嗗叆璧勬枡</text><text @click="chooseAttachment">涓婁紶闄勪欢</text></view>
-          <view v-for="(item,index) in form.attachmentList"
-                :key="item.id"
-                class="attachment"><text @click="previewAttachment(item)">{{item.name||`闄勪欢${index+1}`}}</text><text @click="removeAttachment(index)">鍒犻櫎</text></view>
-        </view><button class="save"
+<button class="save"
                 @click="save">淇濆瓨鑽夌</button>
       </scroll-view></view>
     <view v-if="reviewOpen"
diff --git a/src/pages/supplier/certificate/index.vue b/src/pages/supplier/certificate/index.vue
index 5c523ff..ea32f1d 100644
--- a/src/pages/supplier/certificate/index.vue
+++ b/src/pages/supplier/certificate/index.vue
@@ -9,10 +9,8 @@
     getExpiringCertificates,
     getSupplierSimpleList,
     updateCertificate,
-    uploadCertificateFile,
     type SupplierCertificateItem,
     type SupplierItem,
-    type StorageAttachment,
   } from "../../../api/supplier";
   import { useAuth } from "../../../stores/auth";
   import { statusToneClass } from "../../../utils/status";
@@ -169,38 +167,6 @@
       });
     }
   }
-  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];
-          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);
-  }
-  function previewAttachment(item: StorageAttachment) {
-    if (item.url) uni.previewImage({ urls: [item.url] });
-    else uni.showToast({ title: "闄勪欢鍦板潃涓嶅彲鐢�", icon: "none" });
-  }
   onShow(() => load(true));
   onPullDownRefresh(async () => {
     await load(true);
@@ -304,12 +270,7 @@
         </view>
         <view class="area"><text>澶囨敞</text><textarea v-model="form.remark"
                     placeholder="澶囨敞" ></textarea></view>
-        <view class="attachments">
-          <view class="attachmentHead"><text>璇佷功闄勪欢</text><text @click="chooseAttachment">涓婁紶闄勪欢</text></view>
-          <view v-for="(item,index) in form.attachmentList"
-                :key="item.id"
-                class="attachment"><text @click="previewAttachment(item)">{{item.name||`闄勪欢${index+1}`}}</text><text @click="removeAttachment(index)">鍒犻櫎</text></view>
-        </view><button class="save"
+<button class="save"
                 @click="save">淇濆瓨</button>
       </scroll-view></view>
   </view>

--
Gitblit v1.9.3