From b79425dae011de5edcf8885f0cfb4c04bb84831f Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期六, 07 六月 2025 08:53:39 +0800
Subject: [PATCH] 123

---
 pages/basics/stockCheck.vue |  101 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 65 insertions(+), 36 deletions(-)

diff --git a/pages/basics/stockCheck.vue b/pages/basics/stockCheck.vue
index 99c649c..4c07320 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,12 +12,25 @@
 						<uni-combox @input="getCheckDetl" emptyTips="鏆傛棤鏁版嵁" :candidates="staNoList" v-model="staNo" placeholder="璇烽�夋嫨"></uni-combox>
 					</view>
 				</view>
+			</view> -->
+			
+			<view class="square-2">
+				<view class="square-title">
+					<view class="title-sign"><view class="sign"></view></view>
+					<view class="title-text"><text>鎵樼洏鏉$爜</text></view>
+				</view>
+				<view class="square-content">
+					<view class="content-input">
+						<input v-model="barcode"  @input="getCheckDetl" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8"placeholder-style="line-height:  85rpx;">
+						<uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode" ></uni-icons>
+					</view>
+				</view>
 			</view>
 			<view class="pak-data-box">
 				<view class="box-top">
 					<view class="color-block-blue"></view>
 					<text class="title">鍟嗗搧鍒楄〃</text>
-					<button class="cu-btn bg-blue" @click="selectMat()">+ 娣诲姞</button>
+					<!-- <button class="cu-btn bg-blue" @click="selectMat()">+ 娣诲姞</button> -->
 				</view>
 			</view>
 			<view class="pak-data-box"  v-show="matList.length === 0">
@@ -79,8 +92,10 @@
 	export default {
 		data() {
 			return {
-				matList:[{matnr:'LSH90152025',maktx:'灏奸緳澶�',batch:'',anfme:'10'}],
+				commonUrl:null,
+				matList:[],
 				staNoList:[],
+				barcode: '',
 				staNo:'',
 				matnr:'',
 				enableQty:'',
@@ -95,41 +110,48 @@
 			this.baseIP = UIP;
 			const UPORT = uni.getStorageSync('UPORT');
 			this.basePORT = UPORT
-			this.getOutBound();
+			const PROJ = uni.getStorageSync('UPROJ');
+			this.baseUrl = PROJ
+			this.getUrl()
+			//this.getOutBound();
 		},
 		methods: {
-			getOutBound() {         // 鑾峰彇鍑哄簱鍙�
-				let that = this
-				uni.request({
-					url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/available/take/check/site',
-					method: 'POST',
-					header: {
-						'token':uni.getStorageSync('token')
-					},
-					success(result) {
-						var res = result.data
-						if (res.code === 200) {
-							that.staNoList = res.data
-						} else if (res.code == 403) {
-							uni.showToast({title: res.msg, icon: "none", position: 'top'})
-							setTimeout(() => {
-								uni.reLaunch({
-									url: '../login/login'
-								});
-							}, 1000);
-						} else {
-							uni.showToast({title: res.msg, icon: "none",position: 'top'})
-						}
-					},
-				});
-			}, // getOutBound
+			// 鑾峰彇url
+			getUrl() {
+				this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
+			},
+			// getOutBound() {         // 鑾峰彇鍑哄簱鍙�
+			// 	let that = this
+			// 	uni.request({
+			// 		url: that.commonUrl + '/available/take/check/site',
+			// 		method: 'POST',
+			// 		header: {
+			// 			'token':uni.getStorageSync('token')
+			// 		},
+			// 		success(result) {
+			// 			var res = result.data
+			// 			if (res.code === 200) {
+			// 				that.staNoList = res.data
+			// 			} else if (res.code == 403) {
+			// 				uni.showToast({title: res.msg, icon: "none", position: 'top'})
+			// 				setTimeout(() => {
+			// 					uni.reLaunch({
+			// 						url: '../login/login'
+			// 					});
+			// 				}, 1000);
+			// 			} else {
+			// 				uni.showToast({title: res.msg, icon: "none",position: 'top'})
+			// 			}
+			// 		},
+			// 	});
+			// }, // getOutBound
 			getCheckDetl() {   // 鑾峰彇鍑哄簱鍙h揣鐗╀俊鎭�
 				let that = this
 				uni.request({
-					url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/checkDetl/auth',
-					method: 'POST',
+					url: that.commonUrl + '/mobile/checkDetl/auth/v2',
+					method: 'GET',
 					data: {
-						staNo:that.staNo
+						barcode:that.barcode
 					},
 					header: {
 						'token':uni.getStorageSync('token')
@@ -137,8 +159,10 @@
 					success(result) {
 						var res = result.data
 						console.log(result)
-						if (res.code === 200) {
+						console.log(that.barcode)
+						if (res.code === 200||res.data) {
 							console.log(res.data)
+							that.matList =res.data.wrkDetls
 						} else if (res.code == 403) {
 							uni.showToast({title: res.msg, icon: "none", position: 'top'})
 							setTimeout(() => {
@@ -174,7 +198,7 @@
 			findMat() {
 				let that = this
 				uni.request({
-				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth',
+				    url: that.commonUrl + '/mat/auth',
 				    data: {
 						matnr:that.matnr
 				    },
@@ -240,11 +264,13 @@
 			},
 			adjust() {
 				let that = this
+				console.log(that.matList)
 				uni.request({
-					url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/adjust/auth',
+					url: that.commonUrl + '/mobile/adjust/auth',
 					method: 'POST',
 					data: {
-						combParam: that.matList
+						wrkDetls: that.matList,
+						barcode: that.barcode
 					},
 					header: {
 						'token':uni.getStorageSync('token')
@@ -266,6 +292,9 @@
 						}
 					},
 				});
+			},
+			removeBarcode() {
+				this.barcode = ''
 			}
 		} // methods
 	} // exprot

--
Gitblit v1.9.1