| | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <!-- 工作档 --> |
| | | <view class="wrkMast"> |
| | | <view >工作号</view> |
| | | <view>工作类型</view> |
| | | <view>源库位</view> |
| | | </view> |
| | | |
| | | |
| | | <!-- 弹窗 --> |
| | | <!-- 修改数量 --> |
| | | <view> |
| | | <uni-popup ref="emptyPakin" type="dialog"> |
| | | <view class="popup"> |
| | |
| | | </uni-popup> |
| | | </view> |
| | | |
| | | <!-- 弹窗 --> |
| | | <view> |
| | | <uni-popup ref="emptyOut" type="dialog"> |
| | | <view class="popup"> |
| | | <!-- 标题 --> |
| | | <view class="title">请选择货架类型</view> |
| | | <view class="popup-item"> |
| | | <view class="dropdown" @click="toggleDropdown()"> |
| | | <input type="text" style="width: 650rpx;" v-model="containerType" placeholder="请选择货架类型"> |
| | | <uni-icons :type="isOpen ? 'top' : 'bottom'" color="#c1c1c1" style="margin-left: 10rpx;"></uni-icons> |
| | | <scroll-view scroll-y="ture" class="dropdown-content" v-if="isOpen"> |
| | | <view class="dropdown-item" v-for="option in selects" @click="selected(option)">{{option}}</view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | <view class="btn"> |
| | | <view class="btn-left" @click="emptyOutClose">取消</view> |
| | | <view class="btn-right" @click="emptyOutConfirm()">出库</view> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" type="primary" @click="emptyPakin()" v-if="btnType == 'emptyPakin'">空板入库</button> |
| | | <button size="mini" type="primary" @click="emptyPakin()" v-if="btnType == 'emptyPakin'">空板入库</button> |
| | | <button size="mini" type="primary" @click="emptyOut()" v-if="btnType == 'emptyPakin'">呼叫空板</button> |
| | | <button size="mini" type="primary" @click="containerMoveOut()" v-if="btnType == 'out'">确认出库</button> |
| | | <button size="mini" type="primary" @click="pickIn()" v-if="btnType == 'pick'">已拣料回库</button> |
| | | </view> |
| | |
| | | loadingText: '更新状态' |
| | | }, |
| | | btnType: 'emptyPakin', |
| | | barcode: '' |
| | | barcode: '', |
| | | containerType: '', |
| | | selects: [], |
| | | option: '', |
| | | isOpen: false |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | |
| | | if (res.data.records[0].locSts == 'O') { |
| | | _this.btnType = 'emptyPakin' |
| | | } else if (res.data.records[0].locSts == 'F') { |
| | |
| | | } else { |
| | | _this.btnType = 'working' |
| | | } |
| | | |
| | | setTimeout(()=>{ |
| | | for (let k of res.data.records) { |
| | | if (k.locSts != 'O') { |
| | |
| | | _this.station = res.data.records[0] |
| | | _this.reload.loading = false |
| | | _this.reload.loadingText = '更新状态' |
| | | _this.getContainerType() |
| | | },500) |
| | | |
| | | _this.getWrkMast() |
| | | } else if (res.code == 403) { |
| | | uni.showToast({ title: res.msg, icon: "error", position: 'top' }) |
| | | setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); |
| | |
| | | this.$refs.emptyPakin.close() |
| | | }, |
| | | emptyPakinConfirm() { |
| | | this.emptyPakinClose() |
| | | let _this = this; |
| | | if (this.barcode.length != 6) { |
| | | uni.showToast({ title: '货架条码异常', icon: "error", position: 'top' }) |
| | | return |
| | | } |
| | | let params = [] |
| | | let param = { devNo: this.station.devNo, containerCode: this.barcode, } |
| | | params.push(param) |
| | | this.emptyPakinClose() |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agvMobile/pakin/empty/auth`, |
| | | data: { pad: params }, |
| | | method: 'POST', |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | success(res) { |
| | | var res = result.data |
| | | var res = res.data |
| | | if (res.code === 200) { |
| | | setTimeout(()=> { |
| | | _this.barcode = '' |
| | |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | emptyOut() { |
| | | this.$refs.emptyOut.open() |
| | | }, |
| | | emptyOutClose() { |
| | | this.$refs.emptyOut.close() |
| | | }, |
| | | emptyOutConfirm() { |
| | | this.emptyOutClose() |
| | | let _this = this; |
| | | let params = [] |
| | | let param = { devNo: this.station.devNo, containerType: this.containerType, } |
| | | params.push(param) |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agvMobile/pakout/empty/auth`, |
| | | data: { pad: params }, |
| | | method: 'POST', |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | success(res) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | setTimeout(()=> { |
| | | _this.containerType = '' |
| | | _this.reloadStation() |
| | | },1000) |
| | | uni.showToast({ title: '呼叫成功', icon: "success", position: 'top' }) |
| | | } else if (res.code == 403) { |
| | | uni.showToast({ title: res.msg, icon: "error", position: 'top' }) |
| | | setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); |
| | | } else { |
| | | uni.showToast({ title: res.msg, icon: "error", position: 'top' }) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | getContainerType() { |
| | | let _this = this |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agvMobile/pakout/empty/container/selector/auth`, |
| | | header: {'token': uni.getStorageSync('token')}, |
| | | data: JSON.stringify({devNo: _this.station.devNo}), |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | _this.selects = res.data |
| | | } |
| | | console.log(res); |
| | | } |
| | | }) |
| | | }, |
| | | // 开启 / 关闭下拉框 |
| | | toggleDropdown() { |
| | | this.isOpen = !this.isOpen |
| | | }, |
| | | // 选择货架类型 |
| | | selected(option) { |
| | | this.containerType = option |
| | | }, |
| | | // 查询工作档 |
| | | getWrkMast() { |
| | | let _this = this |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agv/wrkMast/list/auth`, |
| | | header: {'token': uni.getStorageSync('token')}, |
| | | data: { |
| | | curr: 1, |
| | | limit: 1000, |
| | | condition: _this.station.devNo |
| | | }, |
| | | method: 'GET', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | for (let item of res.data.records) { |
| | | |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | } |
| | | |
| | | |
| | | .wrkMast { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | .popup { |
| | | width: 80vw; |
| | | min-height: 100rpx; |
| | | background-color: #FFF; |
| | | border-radius: 25rpx; |
| | | position: relative; |
| | | } |
| | | .title { |
| | | height: 100rpx; |
| | |
| | | font-size: 16px; |
| | | } |
| | | .popup-item { |
| | | position: relative; |
| | | height: 80rpx; |
| | | line-height: 80rpx; |
| | | display: flex; |
| | |
| | | align-items: center; |
| | | color: #409EFF; |
| | | } |
| | | |
| | | .dropdown { |
| | | position: relative; |
| | | display: flex; |
| | | width: 93%; |
| | | align-items: center; |
| | | padding: 0rpx 20rpx; |
| | | } |
| | | .dropdown-content { |
| | | position: absolute; |
| | | top: calc(100% + 15rpx); |
| | | left: 0; |
| | | width: calc(100% - 20rpx); |
| | | max-height: 300rpx; |
| | | background-color: #fff; |
| | | box-shadow: 0 0px 6px rgba(0, 0, 0, 0.3); |
| | | border-radius: 8rpx; |
| | | z-index: 10; |
| | | } |
| | | .dropdown-item { |
| | | padding: 12rpx; |
| | | line-height: 1.2; |
| | | font-size: 22px; |
| | | color: #3a3a3a; |
| | | } |
| | | </style> |