From f0080b1fb1219eb06f1265033afb659d86f69699 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期六, 07 二月 2026 16:06:09 +0800
Subject: [PATCH] 组托ASN

---
 pages/listing/matnrPalletising.vue |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index 0a72781..7dd5f0c 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -21,7 +21,7 @@
 <!--				</view>-->
 				<view class="cu-form-group">
 					<view class="title">ASN鍗曞彿</view>
-					<input placeholder="璇疯緭鍏SN鍗曞彿" v-model="asnCode"></input>
+					<input placeholder="璇疯緭鍏SN鍗曞彿" v-model="asnCode" @input="onAsnCodeInput" @confirm="onAsnCodeConfirm"></input>
 				</view>
 			</form>
 			<view class="flex solid-bottom padding-sm justify-between">
@@ -145,6 +145,7 @@
 				matnrCode: '',
 				max: 99999999,
 				searchTimer: null,
+				asnCodeTimer: null,
 			}
 		},
 		computed: {
@@ -170,6 +171,26 @@
 					this.searchTimer = setTimeout(() => {
 						this.getDet();
 					}, 500);
+				}
+			},
+			onAsnCodeInput(e) {
+				// 鎵弿ASN鍗曞彿鏃惰嚜鍔ㄨЕ鍙戞煡璇�
+				if (e.detail && e.detail.value && e.detail.value.trim() !== '') {
+					this.asnCode = e.detail.value;
+					// 寤惰繜涓�涓嬪啀鏌ヨ锛岄伩鍏嶉绻佽姹�
+					if (this.asnCodeTimer) {
+						clearTimeout(this.asnCodeTimer);
+					}
+					this.asnCodeTimer = setTimeout(() => {
+						// 鎵弿ASN鍗曞彿鏃讹紝鑷姩鍔犺浇璇ヨ鍗曠殑鐗╂枡淇℃伅
+						this.getDet();
+					}, 500);
+				}
+			},
+			onAsnCodeConfirm() {
+				// 纭杈撳叆ASN鍗曞彿鏃讹紝绔嬪嵆瑙﹀彂鏌ヨ
+				if (this.asnCode && this.asnCode.trim() !== '') {
+					this.getDet();
 				}
 			},
 			async search() {
@@ -219,7 +240,7 @@
 				}
 				if (that.asnCode && that.asnCode.trim() !== '') {
 					requestParams.asnCode = that.asnCode.trim();
-					requestParams.code = that.asnCode.trim();
+					// requestParams.code = that.asnCode.trim();
 				}
 				if (req && req.batch) {
 					requestParams.batch = req.batch;
@@ -393,6 +414,9 @@
 			clear() {
 				this.list = []
 				this.barcode = ''
+				this.asnCode = ''
+				this.matnrCode = ''
+				this.container = ''
 			},
 			next() {
 				if (this.list.length) {
@@ -461,6 +485,8 @@
 					this.list = []
 					this.barcode = ''
 					this.container = ''
+					this.asnCode = ''
+					this.matnrCode = ''
 					this.isconfirm = false
 				} else {
 					uni.showToast({

--
Gitblit v1.9.1