From aac25494288e33d02bcd3bb319db0db8288acd94 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期二, 25 二月 2025 14:12:03 +0800
Subject: [PATCH] 20250225A

---
 pages/phyz/stationManage/confirmProcessed.vue |   68 +++++++++++++++++++++++++++++++--
 1 files changed, 63 insertions(+), 5 deletions(-)

diff --git a/pages/phyz/stationManage/confirmProcessed.vue b/pages/phyz/stationManage/confirmProcessed.vue
index 4a33e24..f1984d5 100644
--- a/pages/phyz/stationManage/confirmProcessed.vue
+++ b/pages/phyz/stationManage/confirmProcessed.vue
@@ -45,7 +45,7 @@
 					<view class="title">鍑哄簱鏁伴噺</view>
 					<view class="popup-item">
 						<view>
-							<uni-number-box :value="data.anfme" :step='1' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
+							<uni-number-box :value="data.anfme" :step='0.01' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
 						</view>
 						
 					</view>
@@ -77,6 +77,12 @@
 						<view class="popup-item-left">绔欑偣鍙�:</view>
 						<view class="popup-item-right"><input type="text" v-model="devNo"></view>
 					</view>
+					<view class="popup-item">
+						<view class="popup-item-left">鐩爣妤煎眰:</view>
+						<view class="popup-item-right" style="border: none;">
+							<uni-combox style="height: 50rpx;" :candidates="floorList" placeholder="璇烽�夋嫨鐩爣妤煎眰" v-model="floor">
+						</uni-combox></view>
+					</view>
 					<view class="btn">
 						<button class="btn-left" @click="processedClose">鍙栨秷</button>
 						<button class="btn-right" @click="processedConfirm()" :disabled="processedDis">鍔犲伐瀹屾垚</button>
@@ -99,6 +105,8 @@
 				baseUrl: '',
 				token: '',
 				dataList: [],
+				floorList:['浜屽巶','涓夊巶'],
+				floor: '',
 				count: 0,
 				containerType: '',
 				isOpen: true,
@@ -120,13 +128,52 @@
 			const eventChannel = this.getOpenerEventChannel();
 			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
 			eventChannel.on('item', function(data) {
+				console.log(data);
 				for (let k of data.item) {
 					k['maxCount'] = k.anfme
+					_this.getWrkDetl(k.wrkNo)
 				}
-				_this.dataList = require('lodash').cloneDeep(data.item)
+				// _this.dataList = require('lodash').cloneDeep(data.item)
 			})
 		},
 		methods: {
+			// 鑾峰彇宸ヤ綔鏄庣粏
+			getWrkDetl(wrkNo) {
+				let _this = this
+				uni.request({
+					url: `${_this.baseUrl}/agv/wrkDetl/list/auth`,
+					header: {'token': uni.getStorageSync('token')},
+					data: {
+						curr: 1,
+						limit: 1000,
+						wrk_no: wrkNo
+					},
+					method: 'GET',
+					success(res) {
+						res = res.data
+						if (res.code === 200) {
+							for (let k of res.data.records) {
+								k['maxCount'] = k.anfme
+								if (k.threeCode) {
+									if (k.threeCode.includes("B")) {
+										_this.floor = '浜屽巶'
+									} else if (k.threeCode.includes("G")) {
+										_this.floor = '涓夊巶'
+									} else {
+										_this.floor = ''
+									}
+								}
+							}
+							_this.dataList = res.data.records
+						} 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' })
+						}
+					}
+				})
+			},
 			processed() {
 				this.$refs.process.open()
 			},
@@ -134,12 +181,22 @@
 				this.$refs.process.close()
 			},
 			processedConfirm() {
+				let factor = ''
+				if (!this.floor) {
+					uni.showToast({ title: '璇烽�夋嫨妤煎眰', icon: "error", position: 'top' })
+					return
+				}
+				if (this.floor == '浜屽巶') {
+					factor = 'B'
+				} else if (this.floor == '涓夊巶') {
+					factor = 'G'
+				}
 				this.processedDis = true
 				let that = this
 				uni.request({
-					url: that.baseUrl + '/agvMobile/hand/control/processed',
+					url: that.baseUrl + '/agvMobile/hand/control/processed/v2',
 					header: {'token': uni.getStorageSync('token')},
-					data: {devNo: that.devNo, barcode: that.barcode,wrkDetls:that.dataList},
+					data: {devNo: that.devNo, barcode: that.barcode,wrkDetls:that.dataList,factory: factor},
 					method: 'POST',
 					success(result) {
 						that.processedDis = false
@@ -295,7 +352,7 @@
 		justify-content: center;
 	}
 	.popup-item-left {
-		width: 16vw;
+		/* width: 16vw; */
 		padding-right: 20rpx;
 		text-align: right;
 		color: #606266;
@@ -332,6 +389,7 @@
 	.btn-right {
 		display: flex;
 		flex: 1;
+		height: 100%;
 		justify-content: center;
 		align-items: center;
 		color: #409EFF;

--
Gitblit v1.9.1