| | |
| | | |
| | | <view> |
| | | <uni-popup ref="upPalletPopup" type="dialog"> |
| | | <view class="popup2"> |
| | | <scroll-view scroll-y="true" style="height: 100%;background: #eee;border-radius: 10rpx;padding: 0 1vw;"> |
| | | <view class="popup3-input-title">盘头上架</view> |
| | | <view class="popup3-input-box"> |
| | | <uni-data-select v-model="chooseCacheSite" :localdata="chooseCacheSiteList" placeholder="请选择站点"></uni-data-select> |
| | | <uni-data-select v-model="chooseCacheSite" :localdata="chooseCacheSiteList" |
| | | placeholder="请选择站点"></uni-data-select> |
| | | </view> |
| | | <view class="popup3-input-box"> |
| | | <uni-data-select v-model="chooseMat" :localdata="emptyMatList" placeholder="请选择物料"></uni-data-select> |
| | | <uni-data-select v-model="chooseMat" :localdata="emptyMatList" |
| | | placeholder="请选择物料"></uni-data-select> |
| | | </view> |
| | | <view class="popup3-input-box"> |
| | | <text>订单号:</text> |
| | |
| | | </view> |
| | | <view class="button-nk" @click="goUp(2)">2个</view> |
| | | <view class="button-nk" @click="goUp(4)">4个</view> |
| | | </view> |
| | | </scroll-view> |
| | | </uni-popup> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | let network = uni.getStorageSync('Network') |
| | | this.baseUrl = `http://${network[0].ip}:${network[0].port}/${network[0].address}` |
| | | this.token = uni.getStorageSync('token'); |
| | | |
| | | |
| | | this.getEmptyMatList() |
| | | |
| | | uni.onNetworkStatusChange(function (res) { |
| | | if(!res.isConnected) { |
| | | |
| | | uni.onNetworkStatusChange(function(res) { |
| | | if (!res.isConnected) { |
| | | uni.showLoading({ |
| | | title: '网络断开...' |
| | | }); |
| | | }else { |
| | | } else { |
| | | uni.hideLoading(); |
| | | } |
| | | }); |
| | |
| | | let that = this |
| | | uni.request({ |
| | | url: `${that.baseUrl}/agv/getEmptyMat`, |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | method: 'GET', |
| | | success(res) { |
| | | res = res.data |
| | |
| | | }, |
| | | goUp(num) { |
| | | let data = {} |
| | | |
| | | if(this.chooseCacheSite == ''){ |
| | | |
| | | if (this.chooseCacheSite == '') { |
| | | uni.showToast({ |
| | | title: '请选择站点', |
| | | icon: "none", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | if(this.chooseMat == ''){ |
| | | |
| | | if (this.chooseMat == '') { |
| | | uni.showToast({ |
| | | title: '请选择物料', |
| | | icon: "none", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | if(this.code == ''){ |
| | | |
| | | if (this.code == '') { |
| | | uni.showToast({ |
| | | title: '请输入订单号', |
| | | icon: "none", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | if(this.meter == ''){ |
| | | |
| | | if (this.meter == '') { |
| | | uni.showToast({ |
| | | title: '请输入米数', |
| | | icon: "none", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | |
| | | data = { |
| | | originLocal: this.item.code, |
| | | targetLocal: this.chooseCacheSite, |
| | |
| | | workNumber: this.workNumber, |
| | | } |
| | | this.webServer(data) |
| | | setTimeout(()=>{ |
| | | setTimeout(() => { |
| | | this.$refs.upPalletPopup.close() |
| | | this.chooseMat = '' |
| | | this.code = '' |
| | | this.meter = '' |
| | | this.chooseCacheSite = '' |
| | | },300) |
| | | }, 300) |
| | | }, |
| | | goDown(num) { |
| | | let data = {} |
| | | |
| | | if(this.groundSite == ''){ |
| | | |
| | | if (this.groundSite == '') { |
| | | uni.showToast({ |
| | | title: '请选择站点', |
| | | icon: "none", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | |
| | | data = { |
| | | originLocal: this.item.code, |
| | | targetLocal: this.groundSite, |
| | |
| | | anfme: num, |
| | | } |
| | | this.webServer(data) |
| | | setTimeout(()=>{ |
| | | setTimeout(() => { |
| | | this.$refs.downPalletPopup.close() |
| | | },300) |
| | | }, 300) |
| | | }, |
| | | // 所有服务 |
| | | webServer(data) { |