From c6e93113bc2df7dbffd2f2ffe8b19c127d343614 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 09 一月 2026 14:08:54 +0800
Subject: [PATCH] fix: 出库调整

---
 src/pages/outbound/material.vue |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/pages/outbound/material.vue b/src/pages/outbound/material.vue
index 477cbd4..01ac482 100644
--- a/src/pages/outbound/material.vue
+++ b/src/pages/outbound/material.vue
@@ -114,7 +114,7 @@
     </view>
 
     <!-- 搴曢儴鎸夐挳 -->
-    <view v-if="goodsList.length > 1" class="outbound_footer">
+    <view v-if="goodsList.length > 0" class="outbound_footer">
       <wd-button block @click="handleOutbound" style="background: #0d867f">
         <text class="text-[#fff]">鍑哄簱</text>
       </wd-button>
@@ -139,6 +139,7 @@
 const scanRef = ref();
 const materialId = ref<string>("");
 const vbillcode = ref<string>("");
+const vsrccode = ref<string>("");
 
 // 鐗╂枡淇℃伅鍒楄〃
 const materialList = ref<any[]>([]);
@@ -262,6 +263,13 @@
     // 宸插嚭搴撴牎楠�
     if (tagData?.state === "宸插嚭搴�") {
       toast.error("璇ユ潯鐮佸凡鍑哄簱锛屾棤娉曢噸澶嶅嚭搴�");
+      return;
+    }
+
+    // 鍚堝悓鍙锋牎楠岋細妫�鏌ユ壂鐮佺殑鍚堝悓鍙锋槸鍚︾瓑浜庡彂璐у崟鐨剉srccode
+    const scannedContractNo = tagData?.contractno || "";
+    if (scannedContractNo && vsrccode.value && scannedContractNo !== vsrccode.value) {
+      toast.error(`鍚堝悓鍙�"${scannedContractNo}"涓庡綋鍓嶅彂璐у崟涓嶅尮閰峘);
       return;
     }
 
@@ -419,6 +427,7 @@
 onLoad((options: any) => {
   materialId.value = options.id || "";
   vbillcode.value = options.vbillcode || "";
+  vsrccode.value = options.vsrccode || "";
   getMaterialDetail();
 });
 

--
Gitblit v1.9.3