feat(销售报价): 添加附件删除功能并修复文件ID提交问题
- 新增销售报价附件删除API接口
- 将附件删除功能从销售台账模块迁移至销售报价模块
- 修复编辑报价时附件ID未提交的问题,确保文件关联正确
| | |
| | | responseType: "blob", |
| | | }); |
| | | } |
| | | |
| | | // 删除文件 |
| | | // salesQuotationFile/del |
| | | export function deleteFile(data) { |
| | | return request({ |
| | | url: "/salesQuotationFile/del", |
| | | method: "delete", |
| | | data: data, |
| | | }); |
| | | } |
| | |
| | | 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"; |
| | |
| | | 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 { |
| | |
| | | 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, |
| | |
| | | const price = Number(product.unitPrice) || 0 |
| | | return sum + price |
| | | }, 0) |
| | | |
| | | if (isEdit.value) { |
| | | // 编辑 |
| | | const index = quotationList.value.findIndex(item => item.id === editId.value) |