From f6b1cc963ef72303c99a4eb3aa7774d46406869d Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期二, 23 九月 2025 11:12:59 +0800
Subject: [PATCH] 增加核磅录入提交重复扫码判断逻辑,提交后清空数据

---
 pages/wareHouse/nuclearScale/createwriteoffform.vue |   75 +++++++++++++++++++------------------
 1 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/pages/wareHouse/nuclearScale/createwriteoffform.vue b/pages/wareHouse/nuclearScale/createwriteoffform.vue
index 29fcb08..2a2b921 100644
--- a/pages/wareHouse/nuclearScale/createwriteoffform.vue
+++ b/pages/wareHouse/nuclearScale/createwriteoffform.vue
@@ -98,7 +98,7 @@
         :border-bottom="false"
         prop="shippingNoticeNo1"
         style="font-size: small"
-		:label-width="245"
+        :label-width="245"
       >
         <u-input v-model="form.shippingNoticeNo1" placeholder="" disabled />
       </u-form-item>
@@ -141,7 +141,7 @@
         :border-bottom="false"
         prop="shippingNoticeNo2"
         style="font-size: small"
-		:label-width="245"
+        :label-width="245"
       >
         <u-input v-model="form.shippingNoticeNo2" placeholder="" disabled />
       </u-form-item>
@@ -247,22 +247,25 @@
       @confirm="confirmSelection"
       @cancel="cancel"
     >
-    <scroll-view scroll-y="true" style="height: 100%; transform: translateZ(0); -webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;"></scroll-view>
-      <view class="popup-content">
-        <view class="popup-header">
-          <checkbox-group @change="checkboxChange">
-            <label
-              class="checkbox-item"
-              v-for="(item, index) in checkboxList"
-              :key="index"
-            >
-              <checkbox :value="item.value" :checked="item.checked" />
-              <text class="label">{{ item.label }}</text>
-            </label>
-          </checkbox-group>
-        </view>
+      <view class="popup-content" style="padding: 20rpx">
+        <scroll-view
+          scroll-y="true"
+          style="height: 400rpx; transform: translateZ(0)"
+        >
+          <view class="popup-header">
+            <checkbox-group @change="checkboxChange">
+              <label
+                class="checkbox-item"
+                v-for="(item, index) in checkboxList"
+                :key="index"
+              >
+                <checkbox :value="item.value" :checked="item.checked" />
+                <text class="label">{{ item.label }}</text>
+              </label>
+            </checkbox-group>
+          </view>
+        </scroll-view>
       </view>
-    <scroll-view/>
     </u-modal>
   </div>
 </template>
@@ -564,21 +567,21 @@
       const selectedIndex = e.target.value;
       const selectedCustomer = storage[selectedIndex];
 
-      // 妫�鏌ユ槸鍚﹂�夋嫨浜嗙浉鍚岀殑瀹㈡埛
-      if (code === "customerName1" && this.selClientIndex2 === selectedIndex) {
-        uni.showToast({
-          title: "涓嶈兘閫夋嫨鐩稿悓鐨勫鎴�",
-          icon: "none",
-        });
-        return;
-      }
-      if (code === "customerName2" && this.selClientIndex1 === selectedIndex) {
-        uni.showToast({
-          title: "涓嶈兘閫夋嫨鐩稿悓鐨勫鎴�",
-          icon: "none",
-        });
-        return;
-      }
+      // // 妫�鏌ユ槸鍚﹂�夋嫨浜嗙浉鍚岀殑瀹㈡埛
+      // if (code === "customerName1" && this.selClientIndex2 === selectedIndex) {
+      //   uni.showToast({
+      //     title: "涓嶈兘閫夋嫨鐩稿悓鐨勫鎴�",
+      //     icon: "none",
+      //   });
+      //   return;
+      // }
+      // if (code === "customerName2" && this.selClientIndex1 === selectedIndex) {
+      //   uni.showToast({
+      //     title: "涓嶈兘閫夋嫨鐩稿悓鐨勫鎴�",
+      //     icon: "none",
+      //   });
+      //   return;
+      // }
 
       if (code === "customerName2") {
         this.selClientIndex2 = selectedIndex;
@@ -658,7 +661,7 @@
       try {
         // 缁熶竴琛ㄥ崟楠岃瘉
         if (!(await this.validateForm())) return;
-
+        // 绉婚櫎鍐椾綑鐨勯獙璇佷唬鐮�
         // 鏋勫缓鎻愪氦鏁版嵁
         const submitData = this.buildSubmitData().customerList;
         console.log("鎻愪氦鐨勬暟鎹�", submitData);
@@ -705,9 +708,9 @@
         return false;
       }
 
-      // 瀹㈡埛鍚嶇О楠岃瘉
-      if (!this.form.customerName1 || !this.form.customerName2) {
-        throw { type: "validation", message: "璇峰厛閫夋嫨瀹㈡埛鍚嶇О" };
+      // 瀹㈡埛鍚嶇О楠岃瘉 - 淇敼涓鸿嚦灏戞湁涓�涓湁鍊�
+      if (!this.form.customerName1 && !this.form.customerName2) {
+        throw { type: "validation", message: "璇疯嚦灏戦�夋嫨涓�涓鎴峰悕绉�" };
       }
 
       return true;

--
Gitblit v1.9.3