From a8e681a32ad2012bcd1dce0cac0a5507b027f3e6 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期六, 25 五月 2024 12:59:12 +0800
Subject: [PATCH] #

---
 pages/phyz/stationManage/stationDetl.vue |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 1 deletions(-)

diff --git a/pages/phyz/stationManage/stationDetl.vue b/pages/phyz/stationManage/stationDetl.vue
index b8fafe7..8732f84 100644
--- a/pages/phyz/stationManage/stationDetl.vue
+++ b/pages/phyz/stationManage/stationDetl.vue
@@ -75,6 +75,23 @@
 				</view>
 			</uni-popup>
 		</view>
+		<!-- 寮圭獥 -->
+		<view>
+			<uni-popup ref="doBack" type="dialog">
+				<view class="popup">
+					<!-- 鏍囬 -->
+					<view class="title">璇疯緭鍏ョ┖璐ф灦鐮�</view>
+					<view class="popup-item">
+						<view class="popup-item-left">璐ф灦鐮�:</view>
+						<view class="popup-item-right"><input type="text" v-model="barcode"></view>
+					</view>
+					<view class="btn">
+						<view class="btn-left" @click="doBackClose">鍙栨秷</view>
+						<view class="btn-right" @click="doBackConfirm()">閫�搴�</view>
+					</view>
+				</view>
+			</uni-popup>
+		</view>
 		
 		<!-- 寮圭獥 -->
 		<view>
@@ -164,7 +181,7 @@
 						<view class="popup-item-right"><input type="text" v-model="barcode"></view>
 					</view>
 					<view class="btn">
-						<view class="btn-left" @click="pickInClose">鍙栨秷</view>
+						<view class="btn-left" @click="allocationInClose">鍙栨秷</view>
 						<view class="btn-right" @click="allocationInConfirm()">纭杩涘満</view>
 					</view>
 				</view>
@@ -175,6 +192,7 @@
 		
 		<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
 		<view class="buttom">
+			<button size="mini" type="warn" @click="doBack()" v-if="btnType == 'out' || btnType == 'pick'">閫�搴�</button>
 			<button size="mini" type="primary" @click="emptyPakin()" v-if="btnType == 'emptyPakin'">绌烘澘鍏ュ簱</button>
 			<button size="mini" type="primary" @click="emptyOut()" v-if="btnType == 'emptyPakin'">鍛煎彨绌烘澘</button>
 			<button size="mini" type="primary" @click="doContainerMoveOut2()" v-if="btnType == 'out'">璐ф灦绂诲満</button>
@@ -432,6 +450,9 @@
 								} else if (wrkMast.ioType == 111) {
 									wrkMast['ioTitle'] = '璋冩嫧鍑哄簱'
 									_this.btnType = 'allocationOut'
+								} else if (wrkMast.ioType == 112) {
+									wrkMast['ioTitle'] = '璋冩嫧鍏ュ簱'
+									_this.btnType = 'null'
 								}
 								if (wrkMast.barcode == barcode) {
 									mast = wrkMast
@@ -518,6 +539,7 @@
 				let devNo = {devNo:[this.station.devNo],barcode: _this.barcode}
 				uni.request({
 					url: `${_this.baseUrl}/agv/basDevp/visualized/container/moveOut`,
+					header: { 'token': uni.getStorageSync('token')},
 					data: JSON.stringify(devNo),
 					method: 'POST',
 					success(res) {
@@ -551,6 +573,7 @@
 				let devNo = {devNo:[this.station.devNo],barcode: _this.barcode}
 				uni.request({
 					url: `${_this.baseUrl}/agv/basDevp/visualized/container/moveOut2`,
+					header: { 'token': uni.getStorageSync('token')},
 					data: JSON.stringify(devNo),
 					method: 'POST',
 					success(res) {
@@ -601,6 +624,7 @@
 				let _this = this
 				uni.request({
 					url: `${_this.baseUrl}/agv/basDevp/visualized/container/pickIn`,
+					header: { 'token': uni.getStorageSync('token')},
 					data: {devNo: _this.station.devNo,barcode: _this.barcode},
 					method: 'POST',
 					success(res) {
@@ -707,6 +731,40 @@
 						}
 					}
 				});
+			},
+			doBack() {
+				this.$refs.doBack.open()
+			},
+			doBackClose() {
+				this.$refs.doBack.close()
+			},
+			doBackConfirm() {
+				let that = this
+				let params = []
+				let param = { devNo: this.station.devNo, containerCode: this.station.barcode, }
+				params.push(param)
+				uni.request({
+					url: that.baseUrl + '/agvMobile/hand/control/doBack',
+					header: {'token': uni.getStorageSync('token')},
+					data: {devNo: that.station.devNo, barcode: that.barcode},
+					method: 'POST',
+					success(result) {
+						var res = result.data
+						if (res.code === 200) {
+							that.$refs.doBack.close()
+							setTimeout(()=> {
+								that.barcode = ''
+								that.reloadStation()
+							},1000)
+							uni.showToast({ title: '閫�搴撲换鍔$敵璇锋垚鍔�', icon: "success", position: 'top' })
+						} else if (res.code == 403) {
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+							setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+						} else {
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+						}
+					}
+				});
 			}
 			
 		}

--
Gitblit v1.9.1