From a35b0b523942a7ccb3c7a06b9803d551765f7388 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 11 二月 2026 13:41:14 +0800
Subject: [PATCH] 销售台账新增第二个产品时,选择信息对应填写后,选择的数据展示到第一个产品去

---
 src/pages/procurementManagement/procurementLedger/index.vue |   29 ++++++++------
 src/pages/sales/salesAccount/detail.vue                     |   10 ++--
 src/pages/sales/salesAccount/index.vue                      |   41 ++++++++++----------
 3 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/src/pages/procurementManagement/procurementLedger/index.vue b/src/pages/procurementManagement/procurementLedger/index.vue
index b2784d6..4547182 100644
--- a/src/pages/procurementManagement/procurementLedger/index.vue
+++ b/src/pages/procurementManagement/procurementLedger/index.vue
@@ -77,17 +77,13 @@
               </view>
             </view>
             <!-- 浠呴潪鈥滃鎵归�氳繃鈥濈殑鍙拌处灞曠ず鍒犻櫎鎸夐挳 -->
-            <view
-              class="detail-row"
-              v-if="item.approvalStatus !== 3"
-              style="justify-content: flex-end; margin-top: 8px;"
-            >
-              <up-button
-                type="error"
-                size="small"
-                plain
-                @click.stop="handleDelete(item)"
-              >
+            <view class="detail-row"
+                  v-if="item.approvalStatus !== 3"
+                  style="justify-content: flex-end; margin-top: 8px;">
+              <up-button type="error"
+                         size="small"
+                         plain
+                         @click.stop="handleDelete(item)">
                 鍒犻櫎
               </up-button>
             </view>
@@ -114,7 +110,10 @@
   import { onShow } from "@dcloudio/uni-app";
   import useUserStore from "@/store/modules/user";
   import PageHeader from "@/components/PageHeader.vue";
-  import { purchaseListPage, delPurchase } from "@/api/procurementManagement/procurementLedger";
+  import {
+    purchaseListPage,
+    delPurchase,
+  } from "@/api/procurementManagement/procurementLedger";
   const userStore = useUserStore();
   const approvalStatusText = {
     1: "寰呭鏍�",
@@ -180,6 +179,7 @@
     try {
       // 璁剧疆鎿嶄綔绫诲瀷
       uni.setStorageSync("operationType", type);
+      uni.removeStorageSync("editData");
 
       // 濡傛灉鏄煡鐪嬫垨缂栬緫鎿嶄綔
       if (type !== "add") {
@@ -265,7 +265,10 @@
               // 鍙湁鍦ㄧ湡姝e紓甯告椂锛屾墠鍦ㄨ繖閲屽厹搴曟彁绀�
               const msg =
                 (error && error.msg) ||
-                (error && error.response && error.response.data && error.response.data.msg) ||
+                (error &&
+                  error.response &&
+                  error.response.data &&
+                  error.response.data.msg) ||
                 (error && error.message) ||
                 "鍒犻櫎澶辫触";
               uni.showToast({
diff --git a/src/pages/sales/salesAccount/detail.vue b/src/pages/sales/salesAccount/detail.vue
index 0bfa174..f8a42ab 100644
--- a/src/pages/sales/salesAccount/detail.vue
+++ b/src/pages/sales/salesAccount/detail.vue
@@ -25,7 +25,7 @@
                   placeholder="鐐瑰嚮閫夋嫨涓氬姟鍛�" />
         <template #right>
           <up-icon name="arrow-right"
-                   @click="showPicker = true"></up-icon>
+                   @click=" showPicker = true"></up-icon>
         </template>
       </up-form-item>
       <up-form-item label="瀹㈡埛鍚嶇О"
@@ -184,7 +184,7 @@
                         @click="openCategoryPicker(idx)" />
               <template #right>
                 <up-icon name="arrow-right"
-                         @click="showCategoryPicker = true"></up-icon>
+                         @click="openCategoryPicker(idx)"></up-icon>
               </template>
             </up-form-item>
             <!-- 瑙勬牸鍨嬪彿 -->
@@ -197,7 +197,7 @@
                         @click="openSpecificationPicker(idx)" />
               <template #right>
                 <up-icon name="arrow-right"
-                         @click="showSpecificationPicker = true"></up-icon>
+                         @click="openSpecificationPicker(idx)"></up-icon>
               </template>
             </up-form-item>
             <!-- 缁戝畾鏈哄櫒 -->
@@ -229,7 +229,7 @@
                         @click="openTaxRatePicker(idx)" />
               <template #right>
                 <up-icon name="arrow-right"
-                         @click="showTaxRatePicker = true"></up-icon>
+                         @click="openTaxRatePicker(idx)"></up-icon>
               </template>
             </up-form-item>
             <!-- 鍚◣鍗曚环 -->
@@ -278,7 +278,7 @@
                         @click="openInvoiceTypePicker(idx)" />
               <template #right>
                 <up-icon name="arrow-right"
-                         @click="showInvoiceTypePicker = true"></up-icon>
+                         @click="openInvoiceTypePicker(idx)"></up-icon>
               </template>
             </up-form-item>
           </view>
diff --git a/src/pages/sales/salesAccount/index.vue b/src/pages/sales/salesAccount/index.vue
index 60ec732..b5b378a 100644
--- a/src/pages/sales/salesAccount/index.vue
+++ b/src/pages/sales/salesAccount/index.vue
@@ -80,25 +80,25 @@
             <up-divider></up-divider>
             <view class="detail-buttons">
               <u-button class="detail-button"
-                      size="small"
-                      type="primary"
-                      @click.stop="handleInfo('edit', item)">
-              缂栬緫
-            </u-button>
+                        size="small"
+                        type="primary"
+                        @click.stop="handleInfo('edit', item)">
+                缂栬緫
+              </u-button>
               <u-button class="detail-button"
-                      size="small"
-                      type="primary"
-                      plain
-                      @click.stop="openOut(item)">
-              鍙戣揣鐘舵��
-            </u-button>
-            <u-button class="detail-button"
-                      size="small"
-                      type="error"
-                      plain
-                      @click.stop="handleDelete(item)">
-              鍒犻櫎
-            </u-button>
+                        size="small"
+                        type="primary"
+                        plain
+                        @click.stop="openOut(item)">
+                鍙戣揣鐘舵��
+              </u-button>
+              <u-button class="detail-button"
+                        size="small"
+                        type="error"
+                        plain
+                        @click.stop="handleDelete(item)">
+                鍒犻櫎
+              </u-button>
             </view>
           </view>
         </view>
@@ -152,9 +152,7 @@
       const statusStr = (p.shippingStatus ?? "").toString();
       // 鍖呭惈鈥滃彂璐р�濇垨鏈夊彂璐ф棩鏈�/杞︾墝鍙疯涓哄凡鍙戣揣
       return (
-        statusStr.includes("鍙戣揣") ||
-        !!p.shippingDate ||
-        !!p.shippingCarNumber
+        statusStr.includes("鍙戣揣") || !!p.shippingDate || !!p.shippingCarNumber
       );
     });
   };
@@ -240,6 +238,7 @@
     try {
       // 璁剧疆鎿嶄綔绫诲瀷
       uni.setStorageSync("operationType", type);
+      uni.removeStorageSync("editData");
 
       // 濡傛灉鏄煡鐪嬫垨缂栬緫鎿嶄綔
       if (type !== "add") {

--
Gitblit v1.9.3