| | |
| | | <view class="title">接驳站点</view> |
| | | <input |
| | | placeholder=" 请扫描接驳站点条码" |
| | | v-model="barcode" |
| | | v-model="agvStationInput" |
| | | @input="checkAgvStation" |
| | | /> |
| | | </view> |
| | | |
| | |
| | | range: [], |
| | | curCode: '', |
| | | palletTypeId: '', |
| | | isconfirm : false |
| | | isconfirm: false, |
| | | agvStationInput: '', // AGV站点输入值 |
| | | agvStationName: '' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | (this.palletTypeId = uni.getStorageSync('palletTypeId')) |
| | | }, |
| | | methods: { |
| | | async checkAgvStation() { |
| | | const that = this |
| | | if (this.agvStationInput === '' || this.agvStationInput === null) { |
| | | uni.showToast({ |
| | | title: '容器码为空', |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | return |
| | | } |
| | | const { code, data, msg } = await request('/check/agvStation', { |
| | | transferStationNo: this.agvStationInput |
| | | }) |
| | | if (code === 200) { |
| | | this.agvStationName = data.stationName |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | setTimeout(function () { |
| | | that.agvStationName = '' |
| | | that.agvStationInput = '' |
| | | }, 200) |
| | | } |
| | | }, |
| | | selChange(val) { |
| | | uni.setStorageSync('palletTypeId', val.value) |
| | | }, |
| | |
| | | }, |
| | | |
| | | async confirm() { |
| | | if (this.barcode === '' || this.barcode === null) { |
| | | if (this.agvStationName === '' || this.agvStationName === null) { |
| | | uni.showToast({ |
| | | title: '接驳站点不能为空', |
| | | icon: 'none' |
| | |
| | | const { code, data, msg } = await request( |
| | | '/callForEmptyContainers', |
| | | { |
| | | staNo: this.barcode, |
| | | staNo: this.agvStationName, |
| | | type: this.palletTypeId |
| | | } |
| | | ) |
| | |
| | | }finally{ |
| | | this.isconfirm = false |
| | | } |
| | | |
| | | } |
| | | |
| | | // const { |