| | |
| | | <text class="modal-title">输入AGV站点</text> |
| | | </view> |
| | | <view class="modal-body"> |
| | | <view class="input-wrapper"> |
| | | <input class="agv-input" type="text" v-model="agvStationInput" placeholder="请输入AGV站点编号" /> |
| | | <view class="form-item"> |
| | | <text class="form-label">AGV站点</text> |
| | | <view class="input-wrapper"> |
| | | <input class="agv-input" type="text" v-model="agvStationInput" placeholder="请输入AGV站点编号" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <text class="form-label">目标库区</text> |
| | | <view class="input-wrapper picker-wrapper"> |
| | | <picker mode="selector" :range="rangeText" @change="pickerChange"> |
| | | <view class="picker-view"> |
| | | <text>{{ whAreaId ? selectedText : '请选择库区' }}</text> |
| | | <text class="cuIcon-right picker-arrow"></text> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="modal-footer"> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | whAreaId:'', |
| | | barcode: '', |
| | | container: '', |
| | | megreQty: '', |
| | |
| | | ...mapState('user', ['dynamicFields']), |
| | | allCount() { |
| | | return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0 |
| | | }, |
| | | rangeText() { |
| | | return this.range.map(item => item.text) |
| | | }, |
| | | selectedText() { |
| | | const found = this.range.find(item => item.value === this.whAreaId) |
| | | return found ? found.text : '请选择库区' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getRece() |
| | | // 获取按钮权限 |
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || []; |
| | | console.log('当前页面按钮权限:', this.buttonPermissions); |
| | | }, |
| | | methods: { |
| | | pickerChange(e) { |
| | | const index = e.detail.value |
| | | this.whAreaId = this.range[index].value |
| | | uni.setStorageSync('whAreaId', this.whAreaId) |
| | | }, |
| | | // 检查按钮权限 |
| | | hasButtonPermission(route) { |
| | | return this.buttonPermissions.includes(route); |
| | |
| | | }, |
| | | // 选择不需要AGV |
| | | handleAgvNo() { |
| | | |
| | | this.showAgvModal = false; |
| | | this.submitConfirm(''); |
| | | }, |
| | |
| | | if (this.agvStationInput.trim() === '') { |
| | | uni.showToast({ |
| | | title: "AGV站点不能为空", |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | | return; |
| | | } |
| | | if (this.whAreaId.trim() === '') { |
| | | uni.showToast({ |
| | | title: "目标库区不能为空", |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | |
| | | if (agvStation) { |
| | | requestData.staNo = agvStation; |
| | | requestData.agvSign = 1; |
| | | requestData.area = this.whAreaId; |
| | | }else{ |
| | | requestData.agvSign = 0; |
| | | } |
| | |
| | | }) |
| | | } |
| | | this.repeatClick = false |
| | | }, |
| | | async getRece() { |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/areas/receipt', {}, 'get') |
| | | if (code === 200) { |
| | | this.range = data.map(item => ({ |
| | | value: item.id, |
| | | text: item.warehouseId$ + "-- " + item.name |
| | | })); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | |
| | | |
| | | /* 弹窗内容 */ |
| | | .modal-body { |
| | | padding: 40rpx 30rpx; |
| | | padding: 30rpx; |
| | | } |
| | | |
| | | .form-item { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .form-item:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .form-label { |
| | | display: block; |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | font-weight: 500; |
| | | margin-bottom: 12rpx; |
| | | padding-left: 4rpx; |
| | | } |
| | | |
| | | .modal-message { |
| | |
| | | .input-wrapper { |
| | | background-color: #f5f7fa; |
| | | border-radius: 12rpx; |
| | | padding: 20rpx; |
| | | padding: 10rpx; |
| | | border: 2rpx solid #e4e7ed; |
| | | transition: border-color 0.2s; |
| | | } |
| | | |
| | | .input-wrapper:focus-within { |
| | | border-color: #0081ff; |
| | | } |
| | | |
| | | .picker-wrapper { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .agv-input { |
| | |
| | | background-color: transparent; |
| | | } |
| | | |
| | | .picker-view { |
| | | width: 100%; |
| | | height: 70rpx; |
| | | line-height: 70rpx; |
| | | font-size: 30rpx; |
| | | color: #333; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .picker-arrow { |
| | | color: #999; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | /* 弹窗底部按钮 */ |
| | | .modal-footer { |
| | | display: flex; |