| | |
| | | <view> |
| | | <uni-popup ref="revise" type="dialog"> |
| | | <view class="popup"> |
| | | <view>{{text}}</view> |
| | | <view class="popup3-input-title">{{text}}</view> |
| | | <view class="button-nk" @click="upTray()">{{btnTitle1}}</view> |
| | | <view class="button-nk" @click="downTray()">{{btnTitle2}}</view> |
| | | <view v-show="outType" class="button-nk" @click="downTray1()">{{btnTitle3}}</view> |
| | |
| | | <view> |
| | | <uni-popup ref="numberPopup" type="dialog"> |
| | | <view class="popup2"> |
| | | <view>上架数量</view> |
| | | <view class="popup3-input-title">{{tipsTitle}}</view> |
| | | <view class="button-nk" @click="goUp(2)">2个</view> |
| | | <view class="button-nk" @click="goUp(4)">4个</view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <view> |
| | | <uni-popup ref="numberPopup" type="dialog"> |
| | | <view class="popup2"> |
| | | <view>上架数量</view> |
| | | <view class="button-nk" @click="goUp(2)">2个</view> |
| | | <view class="button-nk" @click="goUp(4)">4个</view> |
| | | <uni-popup ref="inputPopup" type="dialog"> |
| | | <view class="popup3"> |
| | | <view class="popup3-input-title">{{tipsTitle}}</view> |
| | | <view class="popup3-input-box"> |
| | | <text>{{desc}}:</text> |
| | | <view style="margin-left: 3rpx;"> |
| | | <input type="text" v-model="code"/> |
| | | </view> |
| | | </view> |
| | | <view class="popup3-input-box" v-if="meterShow"> |
| | | <text>米数:</text> |
| | | <view style="margin-left: 3rpx;"> |
| | | <input type="text" v-model="meter"/> |
| | | </view> |
| | | </view> |
| | | <view class="button-nk" @click="confirm(2)">确定</view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import code from '../../../uni_modules/uview-ui/libs/config/props/code'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | type: '' , |
| | | originLocal: '', |
| | | targetLocal: '', |
| | | code: '', |
| | | meter: '', |
| | | meterShow: '', |
| | | desc: '', |
| | | tipsTitle: '' |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | this.type = 'load', // 上架 |
| | | this.originLocal = this.item.code, |
| | | this.targetLocal = this.item.traget |
| | | this.tipsTitle = '上架数量' |
| | | this.numberPopup() |
| | | } else { |
| | | this.type = 'in' // 入库 |
| | |
| | | this.type = 'unload', // 下架 |
| | | this.originLocal = this.item.traget, |
| | | this.targetLocal = this.item.code |
| | | this.tipsTitle = '下架数量' |
| | | this.numberPopup() |
| | | } else { |
| | | this.type = 'out1' // 出库 |
| | | this.originLocal = 'KW-C' |
| | | this.targetLocal = this.item.code |
| | | this.inputPopup() |
| | | } |
| | | }, |
| | | downTray1() { |
| | | let _this = this |
| | | let type = '',originLocal = '',targetLocal = ''; |
| | | if (this.item.type == 'foolr') { |
| | | type = 'unload', // 下架 |
| | | originLocal = this.item.traget, |
| | | targetLocal = this.item.code |
| | | this.type = 'unload', // 下架 |
| | | this.originLocal = this.item.traget, |
| | | this.targetLocal = this.item.code |
| | | } else { |
| | | type = 'out2' // 出库 |
| | | originLocal = 'KW-C' |
| | | targetLocal = this.item.code |
| | | this.type = 'out2' // 出库 |
| | | this.originLocal = 'KW-C' |
| | | this.targetLocal = this.item.code |
| | | this.inputPopup() |
| | | } |
| | | // this.text = originLocal + targetLocal |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agv/requestTask`, |
| | | data: { |
| | | originLocal: originLocal, |
| | | targetLocal: targetLocal, |
| | | type: type |
| | | }, |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | this.$refs.revise.close() |
| | | uni.showToast({ title: '操作成功', icon: "none", position: 'top' }) |
| | | } else { |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | numberPopup() { |
| | | this.$refs.numberPopup.open('center') |
| | | }, |
| | | inputPopup() { |
| | | if (this.type == 'out1') { |
| | | this.tipsTitle = '空托盘出库' |
| | | this.desc = '物料码' |
| | | this.meterShow = false |
| | | } else { |
| | | this.tipsTitle = '满托盘出库' |
| | | this.desc = '订单号' |
| | | this.meterShow = true |
| | | } |
| | | this.$refs.inputPopup.open('center') |
| | | }, |
| | | // 上 / 下 架数量 |
| | | goUp(num) { |
| | |
| | | type: this.type, |
| | | } |
| | | this.webServer(data) |
| | | setTimeout(()=>{ |
| | | this.$refs.numberPopup.close() |
| | | },300) |
| | | }, |
| | | confirm() { |
| | | let data = {} |
| | | if (this.type == 'out1') { |
| | | data = { |
| | | originLocal: this.originLocal, |
| | | targetLocal: this.targetLocal, |
| | | type: this.type, |
| | | matnr: this.code, |
| | | anfme: 4 |
| | | } |
| | | } else { |
| | | data = { |
| | | originLocal: this.originLocal, |
| | | targetLocal: this.targetLocal, |
| | | type: this.type, |
| | | orderNo: this.code, |
| | | meter: this.meter |
| | | } |
| | | } |
| | | this.webServer(data) |
| | | setTimeout(()=>{ |
| | | this.$refs.inputPopup.close() |
| | | this.code = '' |
| | | this.meter = '' |
| | | },300) |
| | | }, |
| | | // 所有服务 |
| | | webServer(data) { |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | border-radius: 10rpx; |
| | | } |
| | | .popup3 { |
| | | background-color: #eee; |
| | | width: 50vw; |
| | | padding: 0 10vw; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | border-radius: 10rpx; |
| | | color: #565656; |
| | | } |
| | | .popup3-input-title { |
| | | text-align: center; |
| | | margin: 10rpx; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | .popup3-input-box { |
| | | display: flex; |
| | | border: 1px solid #cecece; |
| | | border-radius: 5rpx; |
| | | padding: 2rpx 10rpx; |
| | | margin: 20rpx; |
| | | } |
| | | </style> |