From f314d9b1b05d96c1a1e443470064eeeed8917f93 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期一, 30 六月 2025 14:07:07 +0800
Subject: [PATCH] Changes

---
 pages/pakin/pakin.vue |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index 1035979..2eb054b 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -2,7 +2,7 @@
 	<view>
 		<view class="code">
 			<view class="item">
-				<view class="code-decs">鎵樼洏鐮�:</view>
+				<view class="code-decs">绔欑偣鐮�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
 					@input="barcodeInput()">
 			</view>
@@ -41,7 +41,7 @@
 						<view class="left-item">{{item.specs}}</view>
 					</view>
 					<view class="list-left-item">
-						<view class="desc">鎵瑰彿锛�</view>
+						<view class="desc" style="width: 38%;">鎯呭喌璇存槑锛�</view>
 						<view class="left-item">
 							<uni-tag :text="item.batch" type="warning"></uni-tag>
 						</view>
@@ -82,10 +82,10 @@
 								style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
 						</view>
 					</view>
-					<!-- <view class="popup-item">
-						<view class="popup-item-left">鎵瑰彿:</view>
-						<view class="popup-item-right"><input type="text" v-model="batch"></view>
-					</view> -->
+					<view class="popup-item">
+						<view class="popup-item-left" style="width: 20vw;">鎯呭喌璇存槑:</view>
+						<view class="popup-item-right" style="width: 46vw;"><input type="text" v-model="batch"></view>
+					</view>
 					<!-- <view class="popup-item">
 						<view class="popup-item-left">閲嶉噺:</view>
 						<view class="popup-item-right"><input type="text" v-model="weight"></view>
@@ -172,10 +172,11 @@
 			},
 			// barcode input 浜嬩欢
 			barcodeInput() {
+				this.barcode = this.barcode.replace(/^\{|\}$/g, '')
 				// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
 				setTimeout(() => {
 					var len = this.barcode.length
-					if (len != 8) {
+					if (len != 3) {
 						uni.showToast({
 							title: '鎵樼洏鐮佹湁璇閲嶈瘯',
 							icon: "none",
@@ -198,7 +199,8 @@
 			},
 			// 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
 			focuss() {
-				this.focus = false;
+				this.barcodeFocus = false;
+				this.matFocus = false;
 				setTimeout(() => {
 					this.matnr = '';
 					this.matFocus = true;
@@ -207,10 +209,19 @@
 			// 鎼滅储鐗╂枡
 			findMat() {
 				let that = this
+				var mat = that.matnr
+				let submitMat 
+				let newMatnr
+				if (mat.includes(';')) {
+					newMatnr = mat.split(';')
+					submitMat = newMatnr[1]
+				} else {
+					submitMat = mat
+				}
 				uni.request({
 					url: that.baseUrl + '/mat/auth',
 					data: {
-						matnr: that.matnr
+						matnr: submitMat
 					},
 					header: {
 						'token': uni.getStorageSync('token')
@@ -312,6 +323,7 @@
 				if (add) {
 					this.dataList.unshift(mat)
 				}
+				this.$forceUpdate() // 寮哄埗鍒锋柊
 			},
 			// 淇敼鎵瑰彿
 			revise(item, i) {

--
Gitblit v1.9.1