From 8da567101119df5e51546ab5741c0936475dcbb1 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 25 五月 2026 01:39:32 +0800
Subject: [PATCH] fix: 售后详情、移除金额相关、自定义数量

---
 src/views/customerService/feedbackRegistration/components/formDia.vue |   45 +++++++++++++++++++++++++++------------------
 1 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/src/views/customerService/feedbackRegistration/components/formDia.vue b/src/views/customerService/feedbackRegistration/components/formDia.vue
index 5932032..e606107 100644
--- a/src/views/customerService/feedbackRegistration/components/formDia.vue
+++ b/src/views/customerService/feedbackRegistration/components/formDia.vue
@@ -97,6 +97,9 @@
                 {{ getShippingStatusText(row) }}
               </el-tag>
             </template>
+            <template #quantity="{ row }">
+              <el-input-number v-model="row.quantity" :min="0" size="small" />
+            </template>
           </PIMTable>
         </div>
       </div>
@@ -147,6 +150,7 @@
       salesContractNo: "",
       proDesc: "",
       customerName: "",
+      productModelQuantities: "",
     },
     rules: {
       customerName: [
@@ -240,25 +244,12 @@
       align: "center",
     },
     { label: "鍙戣揣鏃ユ湡", prop: "shippingDate", minWidth: 100, align: "center" },
-    { label: "鏁伴噺", prop: "quantity", width: 100 },
-    { label: "绋庣巼(%)", prop: "taxRate", width: 100 },
     {
-      label: "鍚◣鍗曚环(鍏�)",
-      prop: "taxInclusiveUnitPrice",
-      width: 160,
-      formatData: formatCurrency,
-    },
-    {
-      label: "鍚◣鎬讳环(鍏�)",
-      prop: "taxInclusiveTotalPrice",
-      width: 160,
-      formatData: formatCurrency,
-    },
-    {
-      label: "涓嶅惈绋庢�讳环(鍏�)",
-      prop: "taxExclusiveTotalPrice",
-      width: 160,
-      formatData: formatCurrency,
+      label: "鏁伴噺",
+      prop: "quantity",
+      width: 140,
+      dataType: "slot",
+      slot: "quantity",
     },
     {
       dataType: "action",
@@ -446,6 +437,21 @@
               id: item.id,
             })
           );
+          const opt = associatedSalesOrderNumberOptions.value.find(
+            item => item.value === form.value.salesContractNo
+          );
+          if (opt) {
+            let restoredData = (opt.productData || []).map(normalizeProductRow);
+            const selectedIds = form.value.productModelIds ? String(form.value.productModelIds).split(",") : [];
+            const quantities = form.value.productModelQuantities ? String(form.value.productModelQuantities).split(",") : [];
+            tableData.value = restoredData.filter(item => selectedIds.includes(String(item.id))).map(item => {
+              let qIndex = selectedIds.indexOf(String(item.id));
+              if (qIndex !== -1 && qIndex < quantities.length && quantities[qIndex] !== "") {
+                 item.quantity = Number(quantities[qIndex]);
+              }
+              return item;
+            });
+          }
         }
       }
       console.log(form.value);
@@ -458,6 +464,9 @@
         form.value.productModelIds = tableData.value
           .map(item => item.id)
           .join(",");
+        form.value.productModelQuantities = tableData.value
+          .map(item => item.quantity || 0)
+          .join(",");
         if (operationType.value === "add") {
           afterSalesServiceAdd(form.value).then(response => {
             proxy.$modal.msgSuccess("鏂板鎴愬姛");

--
Gitblit v1.9.3