From 7609c865e80fea169c5c393c55631628aef2f6ed Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 24 九月 2025 17:15:04 +0800
Subject: [PATCH] 核磅录入创建核磅单的创建逻辑修改/重复扫码相同数据添加多条问题修复

---
 pages/storeManagement/CancelMaterialRequisition/index.vue |   35 ++++++++++++++++++++++-------------
 1 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/pages/storeManagement/CancelMaterialRequisition/index.vue b/pages/storeManagement/CancelMaterialRequisition/index.vue
index 31cd906..3a9717d 100644
--- a/pages/storeManagement/CancelMaterialRequisition/index.vue
+++ b/pages/storeManagement/CancelMaterialRequisition/index.vue
@@ -51,7 +51,7 @@
                   <view class="_label-name">鍑�閲嶏細</view>
                 </view>
                 <view class="_content">
-                  {{ item.NW }}
+                  {{ item.KW }}
                 </view>
               </view>
             </view>
@@ -95,7 +95,7 @@
                 </view>
                 <view class="packing-registration-param-item-right">
                   <text class="item-one item-two">{{
-                    detailedList.NW
+                    detailedList.KW
                   }}</text>
                 </view>
               </view>
@@ -150,23 +150,32 @@
     });
   },
   methods: {
-	    // 鍥炴樉鎵爜鐨勪俊鎭�
+    cancel() {
+      // 澶勭悊鍙栨秷閫昏緫
+      this.showModal = false;
+    },
+    // 鍥炴樉鎵爜鐨勪俊鎭�
     saveForm(val) {
 		this.detailedList = val;
         this.showModal = true;
 	  },
 	confirm() {
-    //   // 澶勭悊纭閫昏緫
-    //   this.$u.api.shiftingParking
-    //     .hasScanSn({
-    //       ...this.detailedList,
-    //     })
-    //     .then((res) => {
-    //       this.hasScanSnList.push(this.detailedList);
-    //       console.log("璁板綍", this.hasScanSnList);
-    //       this.$u.toast("鍙栨秷棰嗘枡鎴愬姛");
-		//     });
+      // 澶勭悊纭閫昏緫
+      this.$u.api.cancelMaterialRequisition
+        .cancelMaterialRequisition({
+          ...this.detailedList,
+        })
+        .then((res) => {
           this.hasScanSnList.push(this.detailedList);
+          console.log("璁板綍", this.hasScanSnList);
+          this.$u.toast("鍙栨秷棰嗘枡鎴愬姛");
+        })
+        .catch((err) => {
+          uni.showToast({
+            title: res.msg || "缃戠粶閿欒锛屽彇娑堥鏂欏け璐�",
+            icon: "none",
+          });
+        });
     },
   },
 };

--
Gitblit v1.9.3