From 79c97902cc5bae4f8202bebf7c1d4f25b6e59da8 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期二, 08 四月 2025 11:18:16 +0800
Subject: [PATCH] #更新pda

---
 pages/basics/stockCheck.vue |   78 +++++++++++++++++++++++++++++++++++---
 1 files changed, 71 insertions(+), 7 deletions(-)

diff --git a/pages/basics/stockCheck.vue b/pages/basics/stockCheck.vue
index 2fa1509..353bc78 100644
--- a/pages/basics/stockCheck.vue
+++ b/pages/basics/stockCheck.vue
@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<scroll-view scroll-y>
-			<view class="pak-seach-box">
+<!-- 			<view class="pak-seach-box">
 				<view class="box-top">
 					<view class="color-block-blue"></view>
 					<text class="title">閫夋嫨绔欏彴</text>
@@ -12,7 +12,7 @@
 						<uni-combox @input="getCheckDetl" emptyTips="鏆傛棤鏁版嵁" :candidates="staNoList" v-model="staNo" placeholder="璇烽�夋嫨"></uni-combox>
 					</view>
 				</view>
-			</view>
+			</view> -->
 			
 			<view class="square-2">
 				<view class="square-title">
@@ -57,7 +57,7 @@
 					<button class="cu-btn lg" @click="resst()">閲嶇疆</button>
 				</view>
 				<view>
-					<button class="cu-btn lg pakin-btn bg-blue" @click="adjust()">纭</button>
+					<button class="cu-btn lg pakin-btn bg-blue" @click="confirm()">纭</button>
 				</view>
 			</view>
 		</scroll-view>
@@ -196,9 +196,9 @@
 			findMat() {
 				let that = this
 				uni.request({
-				    url: that.commonUrl + '/mat/auth',
+				    url: that.commonUrl + '/plate/out/startFree',
 				    data: {
-						matnr:that.matnr
+						barcode:that.barcode
 				    },
 				    header: {
 						'token':uni.getStorageSync('token')
@@ -253,9 +253,73 @@
 				
 			},
 			confirm() {
-				this.matList[this.rowNum].anfme = this.count
-				this.$refs.revise.close()
+				let that = this;
+				console.log("褰撳墠鏉$爜鏄細", that.barcode);
+
+				if (!that.barcode) {
+					uni.showToast({
+						title: '璇峰厛杈撳叆鎴栨壂鐮佹墭鐩樻潯鐮�',
+						icon: 'none'
+					});
+					return;
+				}
+
+				uni.request({
+					url: that.commonUrl + '/plate/out/startFree',
+					method: 'POST',
+					data: JSON.stringify(that.barcode), // 娉ㄦ剰杩欓噷鐩存帴浼犲瓧绗︿覆
+					header: {
+						'token': uni.getStorageSync('token'),
+						'Content-Type': 'application/json' // 閲嶈锛屽憡璇夊悗绔綘鍙戠殑鏄� JSON 瀛楃涓�
+					},
+					success(result) {
+						uni.vibrateShort();
+						let res = result.data;
+
+						if (res.code === 200) {
+							uni.showToast({
+								title: res.msg || '鍑哄簱鍚姩鎴愬姛',
+								icon: 'success'
+							});
+
+							// 娓呯┖鎵樼洏鏉$爜
+							that.barcode = '';
+
+							// 濡傛灉鏈� matData 鍐嶈烦杞�
+							if (res.data) {
+								that.matData = res.data;
+
+								uni.navigateTo({
+									url: "matQuery",
+									events: {
+										matList: function(data) {
+											that.matList.push(data.data);
+										},
+									},
+									success: function(res) {
+										res.eventChannel.emit('matData', {
+											data: that.matData
+										});
+									}
+								});
+							}
+						} else {
+							uni.showToast({
+								title: res.msg || '鍑哄簱鍚姩澶辫触',
+								icon: 'none'
+							});
+						}
+					},
+					fail(err) {
+						uni.showToast({
+							title: '缃戠粶璇锋眰澶辫触',
+							icon: 'none'
+						});
+						console.error('璇锋眰澶辫触锛�', err);
+					}
+				});
 			},
+
 			resst() {
 				this.matList = []
 				this.staNo = ''

--
Gitblit v1.9.1