From bdca092494179de8c30f0a46ed77da9004cb6a6b Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 29 六月 2026 14:06:19 +0800
Subject: [PATCH] feat(pages): 优化1、出差审批增加出差开始时间和出差结束时间2、开放一些新增修改功能3、销售报价去掉数量

---
 src/pages/sales/salesQuotation/edit.vue |   27 ++++-----------------------
 1 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/src/pages/sales/salesQuotation/edit.vue b/src/pages/sales/salesQuotation/edit.vue
index bfcb930..5ac45f7 100644
--- a/src/pages/sales/salesQuotation/edit.vue
+++ b/src/pages/sales/salesQuotation/edit.vue
@@ -124,24 +124,12 @@
                             placeholder="璇疯緭鍏ュ崟浣�"
                             clearable />
                 </up-form-item>
-                <up-form-item label="鏁伴噺">
-                  <up-input v-model="product.quantity"
-                            type="number"
-                            placeholder="璇疯緭鍏ユ暟閲�"
-                            clearable
-                            @blur="calculateAmount(product)" />
-                </up-form-item>
                 <up-form-item label="鍗曚环">
                   <up-input v-model="product.unitPrice"
                             type="number"
                             placeholder="璇疯緭鍏ュ崟浠�"
                             clearable
                             @blur="calculateAmount(product)" />
-                </up-form-item>
-                <up-form-item label="閲戦">
-                  <up-input :model-value="formatAmount(product.amount)"
-                            disabled
-                            placeholder="鑷姩璁$畻" />
                 </up-form-item>
               </view>
             </view>
@@ -263,7 +251,7 @@
   const totalAmount = computed(() =>
     Number(
       (form.value.products || [])
-        .reduce((sum, item) => sum + Number(item.amount || 0), 0)
+        .reduce((sum, item) => sum + Number(item.unitPrice || 0), 0)
         .toFixed(2)
     )
   );
@@ -294,9 +282,7 @@
     productModelId: "",
     ProductModel: "",
     unit: "",
-    quantity: 1,
     unitPrice: 0,
-    amount: 0,
     modelOptions: [],
   });
 
@@ -322,9 +308,7 @@
   const goBack = () => uni.navigateBack();
 
   const calculateAmount = product => {
-    product.amount = Number(
-      (Number(product.quantity || 0) * Number(product.unitPrice || 0)).toFixed(2)
-    );
+    product.unitPrice = Number(Number(product.unitPrice || 0).toFixed(2));
     form.value.totalAmount = totalAmount.value;
   };
 
@@ -451,9 +435,7 @@
           productModelId: item.productModelId || "",
           ProductModel: item.ProductModel || item.specification || "",
           unit: item.unit || "",
-          quantity: Number(item.quantity || 1),
           unitPrice: Number(item.unitPrice || 0),
-          amount: Number(item.amount || 0),
           modelOptions: [],
         };
 
@@ -528,7 +510,6 @@
         !item.productId ||
         !item.productModelId ||
         !item.unit ||
-        !Number(item.quantity) ||
         !Number(item.unitPrice)
     );
     if (invalid) {
@@ -554,10 +535,10 @@
         product: item.product,
         productModelId: item.productModelId,
         ProductModel: item.ProductModel,
-        quantity: Number(item.quantity || 0),
+        quantity: 1,
         unit: item.unit,
         unitPrice: Number(item.unitPrice || 0),
-        amount: Number(item.amount || 0),
+        amount: Number(item.unitPrice || 0),
       })),
     };
     const action = quotationId.value ? updateQuotation : addQuotation;

--
Gitblit v1.9.3