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 | 15 +++++++--------
src/pages/outbound/index.vue | 2 +-
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/pages/outbound/index.vue b/src/pages/outbound/index.vue
index ba578af..707a393 100644
--- a/src/pages/outbound/index.vue
+++ b/src/pages/outbound/index.vue
@@ -139,7 +139,7 @@
// 璺宠浆鍒扮墿鏂欒鎯呴〉
const toMaterialDetail = (item: any) => {
uni.navigateTo({
- url: `/pages/outbound/material?id=${item.deliveryid}&vbillcode=${item.vbillcode}`,
+ url: `/pages/outbound/material?id=${item.deliveryid}&vbillcode=${item.vbillcode}&vsrccode=${item.vsrccode || ""}`,
});
};
</script>
diff --git a/src/pages/outbound/material.vue b/src/pages/outbound/material.vue
index 13cf15b..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[]>([]);
@@ -265,13 +266,10 @@
return;
}
- // 瑙勬牸鍨嬪彿鏍¢獙锛氭鏌ユ壂鐮佺殑瑙勬牸鍨嬪彿鏄惁鍦ㄧ墿鏂欏垪琛ㄤ腑
- const scannedModel = tagData?.model || "";
- const modelExists = materialList.value.some(
- (material) => material.materialspec === scannedModel
- );
- if (!modelExists && scannedModel) {
- toast.error(`瑙勬牸鍨嬪彿"${scannedModel}"涓嶅湪褰撳墠鍙戣揣鍗曠殑鐗╂枡鍒楄〃涓璥);
+ // 鍚堝悓鍙锋牎楠岋細妫�鏌ユ壂鐮佺殑鍚堝悓鍙锋槸鍚︾瓑浜庡彂璐у崟鐨剉srccode
+ const scannedContractNo = tagData?.contractno || "";
+ if (scannedContractNo && vsrccode.value && scannedContractNo !== vsrccode.value) {
+ toast.error(`鍚堝悓鍙�"${scannedContractNo}"涓庡綋鍓嶅彂璐у崟涓嶅尮閰峘);
return;
}
@@ -429,6 +427,7 @@
onLoad((options: any) => {
materialId.value = options.id || "";
vbillcode.value = options.vbillcode || "";
+ vsrccode.value = options.vsrccode || "";
getMaterialDetail();
});
--
Gitblit v1.9.3