| | |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="code-decs">源站点:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="stationCode" :focus="stationCodeFocus" |
| | | @input="stationCodeInput()" > |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="stationCode" :focus="stationCodeFocus"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">目标站:</view> |
| | | <uni-combox :candidates="staList" placeholder="请选择站点" v-model="sta"></uni-combox> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="sta" :focus="stationCodeFocus"> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | this.token = uni.getStorageSync('token'); |
| | | }, |
| | | methods: { |
| | | stationCodeInput() { |
| | | let that = this; |
| | | that.staList = [] |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/AGVSite?locNo='+that.stationCode, |
| | | |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | let list = [] |
| | | Object.entries(res.data).forEach((value, key) => { |
| | | list.push(value[1]) |
| | | }); |
| | | that.staList = list |
| | | }else{ |
| | | that.messageText = res.msg |
| | | that.messageToggle('error') |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | pushDevNo() { |
| | | var devNo = {"devNo":this.stationCode} |
| | | if (this.dataList.length == 0) { |
| | |
| | | let newSta = that.sta.split("-") |
| | | |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/AGVMove?sourceStaNo='+that.stationCode+'&staNo='+newSta[0], |
| | | url: that.baseUrl + '/mobile/SITESITEAGVMove?sourceStaNo='+that.stationCode+'&staNo='+newSta[0], |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |