From 6a5799976fe6f85ef93000db76875a036f208406 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期二, 16 四月 2024 17:06:23 +0800 Subject: [PATCH] # --- pages/phyz/checkLocDetl/locDetl.vue | 71 ++++++++++++++++++++++++++++++++++- 1 files changed, 69 insertions(+), 2 deletions(-) diff --git a/pages/phyz/checkLocDetl/locDetl.vue b/pages/phyz/checkLocDetl/locDetl.vue index 370633b..403450c 100644 --- a/pages/phyz/checkLocDetl/locDetl.vue +++ b/pages/phyz/checkLocDetl/locDetl.vue @@ -53,7 +53,7 @@ <!-- 搴曢儴鎿嶄綔鎸夐挳 --> <view class="buttom"> <button size="mini" type="primary" @click="changeSts('warn')">鏇存敼搴撲綅鐘舵��</button> - <button size="mini" type="primary" @click="agvStart('warn')">绾犳搴撲綅</button> + <button size="mini" type="primary" @click="changeStart('warn')">绾犳搴撲綅</button> </view> </view> </template> @@ -82,12 +82,14 @@ locDetlShow: false, isOpen: false, locSts: '', + locSts2: '', locStss: [ {title: 'F.鍦ㄥ簱',val: 'F'}, {title: 'D.绌烘《/绌烘爤鏉�',val: 'D'}, {title: 'O.绌哄簱浣�',val: 'O'}, {title: 'X.绂佺敤',val: 'X'}, - ] + ], + sourceLoc: '' } }, onShow() { @@ -101,6 +103,8 @@ console.log(data); _this.locNo = data.item.locNo _this.barcode = data.item.barcode + _this.sourceLoc = data.item.item + console.log(_this.sourceLoc); _this.getLocDetl(data.item.locNo,data.item.barcode) }) }, @@ -169,6 +173,69 @@ }, selected(option) { this.locSts = option.title + this.locSts2 = option.val + }, + changeCount() { + let _this = this + _this.sourceLoc.locSts = this.locSts2 + let barcode = _this.barcode + if (this.locSts2 == 'O') { + barcode = '' + } + let param = { + locNo: _this.sourceLoc.locNo, + locSts: _this.sourceLoc.locSts, + barcode: _this.barcode, + row1: _this.sourceLoc.row1, + bay1: _this.sourceLoc.bay1, + lev1: _this.sourceLoc.lev1, + floor: _this.sourceLoc.floor + } + Object.keys(_this.sourceLoc).forEach(function(key){ + if (_this.sourceLoc[key] == null) { + _this.sourceLoc[key] = '' + } + }) + uni.request({ + url: `${_this.baseUrl}/agv/locMast/update/auth`, + header: { + 'token': uni.getStorageSync('token'), + 'content-type': 'application/x-www-form-urlencoded' + }, + data: param, + method: 'POST', + success(res) { + res = res.data + if (res.code === 200) { + uni.showToast({ title: res.msg, icon: "error", position: 'top' }) + _this.$refs.chageDetl.close() + setTimeout(()=> { + uni.navigateBack() + },1000) + } 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' }) + } + } + }) + }, + changeStart() { + let _this = this + let param = {locNo:_this.locNo,containerCode: _this.barcode} + uni.request({ + url: `${_this.baseUrl}/agvMobile/update/detl/v1`, + data: param, + method: 'POST', + success(res) { + res = res.data + console.log(res); + if (res.code === 200) { + + } + } + }) } } } -- Gitblit v1.9.1