From 5085370bbbce02c5111fa73e75c136f7fcdcbb51 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 01 二月 2023 08:12:51 +0800
Subject: [PATCH] #

---
 pages/basics/pickOffLines.vue |   53 ++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 48 insertions(+), 5 deletions(-)

diff --git a/pages/basics/pickOffLines.vue b/pages/basics/pickOffLines.vue
index 5bf4caa..63cceff 100644
--- a/pages/basics/pickOffLines.vue
+++ b/pages/basics/pickOffLines.vue
@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<scroll-view scroll-y class="scroll-Y">
-		<view class="square-2">
+		<!-- <view class="square-2">
 			<view class="square-title">
 				<view class="title-sign"><view class="sign"></view></view>
 				<view class="title-text"><text>鎷h揣鍗曟潯鐮�</text></view>
@@ -11,6 +11,22 @@
 					<input readonly="value" v-model="doc_num" type="text" placeholder="鎵爜 / 杈撳叆" 
 					:focus="barcodeFocus" @input="nextInput">
 					<uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
+				</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>鎷h揣鍗曟潯鐮�</text></view>
+			</view>
+			<view class="square-content">
+				<view class="content-input-btn">
+					<input v-model="doc_num" type="text" placeholder="鎵爜 / 杈撳叆" 
+					:focus="barcodeFocus" @input="nextInput" placeholder-style="line-height:  85rpx;">
+					<uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
+				</view>
+				<view class="content-btn">
+					<button class="cu-btn bg-blue pda-btn" @click="selectPakin()">+鎻愬彇</button>
 				</view>
 			</view>
 		</view>
@@ -123,6 +139,26 @@
 			getUrl() {
 				this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
 			},
+			// 閫夋嫨璁㈠崟
+			selectPakin() {
+				let that = this
+				uni.vibrateShort();
+				uni.navigateTo({
+					url: "pickOffLinesList",
+					events: {
+					    // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
+					    acceptDataFromOpenedPage: function(data) {
+							that.doc_num = data.data
+							that.nextInput(that.doc_num)
+					    },
+					},
+					success: function(res) {
+					    // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
+					    res.eventChannel.emit('commonUrl', {commonUrl:that.commonUrl })
+					},
+					
+				});
+			},
 			nextInput() {
 				let that = this
 				uni.request({
@@ -171,23 +207,30 @@
 			},
 			confirm() {
 				let that = this
-				if(!that.matList[that.index].locNo == this) {
+				if(!that.matList[that.index].locNo == that.locNo) {
 					uni.showToast({title: '璇风‘璁ゅ簱浣嶅彿鏄惁姝g‘', icon: "none", position: 'top'});
+					return
 				}
 				this.matList[this.index].status= 1
-				console.log(this.matList[this.index]);
 				uni.request({
 					url: that.commonUrl + '/manPakOut/finish',
 					data:JSON.stringify(that.matList[that.index]),
 					method:'POST',
 					success(result) {
-						console.log(result);
 						var res = result.data
 						if(res.code === 200) {
 							that.popShow = false
 							that.matList[that.index].btnText= '宸插嚭搴�'
 							that.matList[that.index].btnType = 'primary'
-							
+						} 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'})
 						}
 					}
 				})

--
Gitblit v1.9.1