| | |
| | | <view>{{text}}</view> |
| | | <view class="button-nk" @click="upTray()">{{btnTitle1}}</view> |
| | | <view class="button-nk" @click="downTray">{{btnTitle2}}</view> |
| | | <view v-show="outType" class="button-nk" @click="downTray1">{{btnTitle3}}</view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | |
| | | text: '', |
| | | btnTitle1: '', |
| | | btnTitle2: '', |
| | | btnTitle3: '', |
| | | outType: '', |
| | | stationType: 'load' |
| | | } |
| | | }, |
| | |
| | | this.item = item |
| | | this.text = item.name |
| | | if (type == 'left') { |
| | | this.outType = false |
| | | this.btnTitle1 = '地面站放置托盘(上架)' |
| | | this.btnTitle2 = '托盘站取置地面(下架)' |
| | | } else { |
| | | this.outType = true |
| | | this.btnTitle1 = '托盘-仓库(入库)' |
| | | this.btnTitle2 = '仓库-托盘(出库)' |
| | | this.btnTitle2 = '仓库-空托盘(出库)' |
| | | this.btnTitle3 = '仓库-满托盘(出库)' |
| | | } |
| | | this.$refs.revise.open(type) |
| | | }, |
| | |
| | | } |
| | | // this.text = originLocal + targetLocal |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agv/inBound`, |
| | | url: `${_this.baseUrl}/agv/requestTask`, |
| | | data: { |
| | | originLocal: originLocal, |
| | | targetLocal: targetLocal, |
| | |
| | | this.$refs.revise.close() |
| | | uni.showToast({ title: '操作成功', icon: "none", position: 'top' }) |
| | | } else { |
| | | uni.showToast({ title: '异常!!!', icon: "none", position: 'top' }) |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }) |
| | | } |
| | | |
| | | } |
| | |
| | | originLocal = this.item.traget, |
| | | targetLocal = this.item.code |
| | | } else { |
| | | type = 'out' // 出库 |
| | | type = 'out1' // 出库 |
| | | originLocal = 'KW-C' |
| | | targetLocal = this.item.code |
| | | } |
| | | // this.text = originLocal + targetLocal |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agv/inBound`, |
| | | url: `${_this.baseUrl}/agv/requestTask`, |
| | | data: { |
| | | originLocal: originLocal, |
| | | targetLocal: targetLocal, |
| | |
| | | this.$refs.revise.close() |
| | | uni.showToast({ title: '操作成功', icon: "none", position: 'top' }) |
| | | } else { |
| | | uni.showToast({ title: '异常!!!', icon: "none", position: 'top' }) |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | downTray1() { |
| | | let _this = this |
| | | let type = '',originLocal = '',targetLocal = ''; |
| | | if (this.item.type == 'foolr') { |
| | | type = 'unload', // 下架 |
| | | originLocal = this.item.traget, |
| | | targetLocal = this.item.code |
| | | } else { |
| | | type = 'out2' // 出库 |
| | | originLocal = 'KW-C' |
| | | targetLocal = this.item.code |
| | | } |
| | | // this.text = originLocal + targetLocal |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agv/requestTask`, |
| | | data: { |
| | | originLocal: originLocal, |
| | | targetLocal: targetLocal, |
| | | type: type |
| | | }, |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | this.$refs.revise.close() |
| | | uni.showToast({ title: '操作成功', icon: "none", position: 'top' }) |
| | | } else { |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }) |
| | | } |
| | | } |
| | | }) |