From f9adfa16fdf2012e915908ea1fed19f75d5107a4 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 30 五月 2026 17:14:02 +0800
Subject: [PATCH] 新疆马铃薯 1.报价提交问题
---
src/views/salesManagement/salesQuotation/index.vue | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index fce764f..3944b41 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -70,7 +70,7 @@
</el-table-column>
<el-table-column label="鎿嶄綔" width="200" fixed="right" align="center">
<template #default="scope">
- <el-button link type="primary" @click="handleEdit(scope.row)" :disabled="!['寰呭鎵�','鎷掔粷'].includes(scope.row.status)">缂栬緫</el-button>
+ <el-button link type="primary" @click="handleEdit(scope.row)">缂栬緫</el-button>
<el-button link type="primary" @click="handleView(scope.row)" style="color: #67C23A">鏌ョ湅</el-button>
<el-button link type="danger" @click="handleDelete(scope.row)">鍒犻櫎</el-button>
</template>
@@ -338,9 +338,6 @@
products: [],
subtotal: 0,
freight: 0,
- otherFee: 0,
- discountRate: 0,
- discountAmount: 0,
totalAmount: 0
})
@@ -595,10 +592,6 @@
}
})) : []
form.subtotal = row.subtotal || 0
- form.freight = row.freight || 0
- form.otherFee = row.otherFee || 0
- form.discountRate = row.discountRate || 0
- form.discountAmount = row.discountAmount || 0
form.totalAmount = row.totalAmount || 0
dialogVisible.value = true
@@ -639,8 +632,6 @@
form.subtotal = 0
form.freight = 0
form.otherFee = 0
- form.discountRate = 0
- form.discountAmount = 0
form.totalAmount = 0
}
@@ -693,11 +684,19 @@
}, 0)
form.customer = customerOption.value.find(item => item.id === form.customerId)?.customerName || ''
+
+ // 鍓旈櫎 products 涓殑 modelOptions 瀛楁锛屼互鍙� form 涓殑 subtotal銆乫reight 瀛楁
+ const { subtotal, freight, ...formWithoutSubtotal } = form
+ const submitData = {
+ ...formWithoutSubtotal,
+ products: form.products.map(({ modelOptions, ...rest }) => rest)
+ }
+
if (isEdit.value) {
// 缂栬緫
const index = quotationList.value.findIndex(item => item.id === editId.value)
if (index > -1) {
- updateQuotation(form).then(res=>{
+ updateQuotation(submitData).then(res=>{
// console.log(res)
if(res.code===200){
ElMessage.success('缂栬緫鎴愬姛')
@@ -708,7 +707,7 @@
}
} else {
// 鏂板
- addQuotation(form).then(res=>{
+ addQuotation(submitData).then(res=>{
if(res.code===200){
ElMessage.success('鏂板鎴愬姛')
dialogVisible.value = false
@@ -763,9 +762,6 @@
})) : [],
subtotal: item.subtotal || 0,
freight: item.freight || 0,
- otherFee: item.otherFee || 0,
- discountRate: item.discountRate || 0,
- discountAmount: item.discountAmount || 0,
totalAmount: item.totalAmount || 0
}))
pagination.total = res.data.total
--
Gitblit v1.9.3