From b624d975fd53160946d09be3dcb46633a636de5c Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期日, 07 四月 2024 18:56:24 +0800 Subject: [PATCH] # --- pages/phyz/stationManage/stationDetl.vue | 43 +++++++++++++++++++++++++------------------ 1 files changed, 25 insertions(+), 18 deletions(-) diff --git a/pages/phyz/stationManage/stationDetl.vue b/pages/phyz/stationManage/stationDetl.vue index 57be4db..2d13aed 100644 --- a/pages/phyz/stationManage/stationDetl.vue +++ b/pages/phyz/stationManage/stationDetl.vue @@ -180,7 +180,7 @@ _this.getContainerType() },500) - _this.getWrkMast() + _this.getWrkMast(res.data.records[0].barcode) } else if (res.code == 403) { uni.showToast({ title: res.msg, icon: "error", position: 'top' }) setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); @@ -317,7 +317,7 @@ this.containerType = option }, // 鏌ヨ宸ヤ綔妗� - getWrkMast() { + getWrkMast(barcode) { let _this = this uni.request({ url: `${_this.baseUrl}/agv/wrkMast/list/auth`, @@ -331,23 +331,30 @@ success(res) { res = res.data if (res.code === 200 && res.data.records.length > 0) { - if (res.data.records[0].ioType == 1) { - res.data.records[0]['ioTitle'] = '鍏ュ簱' - } else if (res.data.records[0].ioType == 10) { - res.data.records[0]['ioTitle'] = '绌烘澘鍏ュ簱' - } else if (res.data.records[0].ioType == 53) { - res.data.records[0]['ioTitle'] = '鎷f枡鍥炲簱' - } else if (res.data.records[0].ioType == 101) { - res.data.records[0]['ioTitle'] = '鍏ㄦ澘鍑哄簱' - _this.btnType = 'out' - } else if (res.data.records[0].ioType == 103) { - res.data.records[0]['ioTitle'] = '鎷f枡鍑哄簱' - _this.btnType = 'pick' - } else if (res.data.records[0].ioType == 110) { - res.data.records[0]['ioTitle'] = '绌烘澘鍑哄簱' + let mast = null + for (let wrkMast of res.data.records) { + if (wrkMast.ioType == 1) { + wrkMast['ioTitle'] = '鍏ュ簱' + } else if (wrkMast.ioType == 10) { + wrkMast['ioTitle'] = '绌烘澘鍏ュ簱' + } else if (wrkMast.ioType == 53) { + wrkMast['ioTitle'] = '鎷f枡鍥炲簱' + } else if (wrkMast.ioType == 101) { + wrkMast['ioTitle'] = '鍏ㄦ澘鍑哄簱' + _this.btnType = 'out' + } else if (wrkMast.ioType == 103) { + wrkMast['ioTitle'] = '鎷f枡鍑哄簱' + _this.btnType = 'pick' + } else if (wrkMast.ioType == 110) { + wrkMast['ioTitle'] = '绌烘澘鍑哄簱' + } + if (wrkMast.barcode == barcode) { + mast = wrkMast + } } - _this.wrkMast = res.data.records[0] - _this.getWrkDetl(_this.wrkMast.wrkNo) + + _this.wrkMast = mast + _this.getWrkDetl(mast.wrkNo) } else if (res.code === 200 && res.data.records.length == 0) { _this.wrkMast = null _this.wrkDetls = [] -- Gitblit v1.9.1