From 2d9b1755730f5fbd4f91f9efb789659acbe48d7e Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期四, 09 四月 2026 11:53:06 +0800
Subject: [PATCH] feat(销售报价): 添加附件删除功能并修复文件ID提交问题

---
 src/views/salesManagement/salesQuotation/index.vue |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index 9cf7792..82a2cdb 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -407,7 +407,7 @@
 import { Search, Document, UserFilled, Box, EditPen, Plus, ArrowRight, Delete, Paperclip, View, Download } from '@element-plus/icons-vue'
 import Pagination from '@/components/PIMTable/Pagination.vue'
 import FormDialog from '@/components/Dialog/FormDialog.vue'
-import {getQuotationList,addQuotation,updateQuotation,deleteQuotation} from '@/api/salesManagement/salesQuotation.js'
+import {getQuotationList,addQuotation,updateQuotation,deleteQuotation,deleteFile} from '@/api/salesManagement/salesQuotation.js'
 import {userListNoPage} from "@/api/system/user.js";
 import { customerList, delLedgerFile } from "@/api/salesManagement/salesLedger.js";
 import {modelList, productTreeList} from "@/api/basicData/product.js";
@@ -893,7 +893,7 @@
 function handleRemove(file) {
   if (!isEdit.value) return
   if (!file?.id) return
-  delLedgerFile([file.id]).then((res) => {
+  deleteFile([file.id]).then((res) => {
     if (res?.code === 200) {
       ElMessage.success("鍒犻櫎鎴愬姛")
     } else {
@@ -939,6 +939,7 @@
       form.approveUserIds = approverNodes.value.map(node => node.userId).join(',')
 
       form.files = fileList.value.map(f => ({
+        id: f.id,
         tempId: f.tempId,
         name: f.name,
         url: f.url,
@@ -950,7 +951,6 @@
         const price = Number(product.unitPrice) || 0
         return sum + price
       }, 0)
-      
       if (isEdit.value) {
         // 缂栬緫
         const index = quotationList.value.findIndex(item => item.id === editId.value)

--
Gitblit v1.9.3