| | |
| | | <form> |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">接驳站点</view> |
| | | <input placeholder="请扫描接驳站点条码" v-model="agvStation" ></input> |
| | | <input placeholder="请扫描接驳站点条码" v-model="agvStationInput" @input="checkAgvStation"></input> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | |
| | | whAreaId:'', |
| | | repeatClick: false, |
| | | buttonPermissions: [] ,// 按钮权限列表 |
| | | agvStation:'' |
| | | |
| | | agvStationInput: '', // AGV站点输入值 |
| | | agvStationName: '' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | console.log('当前页面按钮权限:', this.buttonPermissions); |
| | | }, |
| | | 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) |
| | | } |
| | | }, |
| | | hasButtonPermission(route) { |
| | | return this.buttonPermissions.includes(route); |
| | | }, |
| | |
| | | }, |
| | | |
| | | async confirm() { |
| | | if(this.agvStation === '' || this.agvStation ===null){ |
| | | if(this.agvStationName === '' || this.agvStationName ===null){ |
| | | uni.showToast({ |
| | | title: "接驳站点不能为空", |
| | | icon: "none", |
| | |
| | | data, |
| | | msg |
| | | } = await request('/AGV/task/start',{ |
| | | staNo: this.agvStation, |
| | | staNo: this.agvStationName, |
| | | area: this.whAreaId, |
| | | barcode:this.barcode |
| | | } |