| | |
| | | <view class="code-decs">托盘码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">站点码:</view> |
| | | <input type="text" placeholder="单纯下架不需要扫站点码" v-model="staNo" :focus="staNos" |
| | | @input="staNoInput()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">1批号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="batch1" :focus="batch1s" |
| | | @input="batch1Input()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">2批号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="batch2" :focus="batch2s" |
| | | @input="batch2Input()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">3批号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="batch3" :focus="batch33s" |
| | | > |
| | | </view> |
| | | <!-- <view class="item"> |
| | | <view class="code-decs">4批号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="batch4" :focus="barcodeFocus"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">5批号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="batch5" :focus="barcodeFocus"> |
| | | </view> --> |
| | | </view> |
| | | <view class="mat-list-title"> |
| | | 商品列表 |
| | | <view class="mat-list-title" style="color: red;"> |
| | | {{taskType}} |
| | | </view> |
| | | <scroll-view> |
| | | <view style="margin-top: 600rpx"> |
| | | <view class="list" v-for="(item,i) in dataList" :key="i"> |
| | | <view class="list-left"> |
| | | <view class="list-left-item"> |
| | |
| | | <uni-tag :text="item.matnr" type="primary"></uni-tag> |
| | | </view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <!-- <view class="list-left-item"> |
| | | <view class="desc">名称:</view> |
| | | <view class="left-item">{{item.maktx}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">规格:</view> |
| | | <view class="left-item">{{item.specs}}</view> |
| | | </view> |
| | | </view> --> |
| | | <view class="list-left-item"> |
| | | <view class="desc">订单:</view> |
| | | <view class="left-item">{{item.orderNo}}</view> |
| | | </view> |
| | | <!-- <view class="list-left-item"> |
| | | <view class="desc">重量:</view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">批号:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.weight" type="warning"></uni-tag> |
| | | <uni-tag :text="item.batch" type="warning"></uni-tag> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">数量:</view> |
| | | <view class="left-item">{{item.anfme}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view></view> |
| | | </scroll-view> |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | |
| | | @confirm="comb" @close="combClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- <view> |
| | | <uni-popup ref="combConfirm" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content" |
| | | @confirm="comb" @close="combClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> --> |
| | | <!-- 确认重置 --> |
| | | <view> |
| | | <uni-popup ref="resetConfirm" type="dialog"> |
| | |
| | | content: '', |
| | | barcodeFocus: true, |
| | | matFocus: false, |
| | | taskTypes: '出库信息', |
| | | staNos: false, |
| | | batch1s: false, |
| | | batch2s: false, |
| | | batch33s: false, |
| | | batch4s: false, |
| | | batch5s: false, |
| | | matData: '', |
| | | removeNum: 0, |
| | | taskType: '出库信息', |
| | | staNo: '', |
| | | batch1: '', |
| | | batch2: '', |
| | | batch3: '', |
| | | batch4: '', |
| | | batch5: '', |
| | | batcharry: [], |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | this.$refs.message.open() |
| | | }, |
| | | // barcode input 事件 |
| | | staNoInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | this.batch1ss() |
| | | }, 200) |
| | | }, |
| | | // barcode input 事件 |
| | | batch1Input() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | this.batch2ss() |
| | | }, 200) |
| | | }, |
| | | // barcode input 事件 |
| | | batch2Input() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | this.batch3ss() |
| | | }, 200) |
| | | }, |
| | | barcodeInput() { |
| | | let that = this; |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | this.focuss() |
| | | }, 200) |
| | | let that = this; |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/pakout/confirm/barcode/auth?barcode='+that.barcode, |
| | | header: { |
| | |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | that.dataList = res.data.list |
| | | if(res.data.ioType === 101){ |
| | | that.taskType = '全板出库' |
| | | }else if(res.data.ioType === 103){ |
| | | that.taskType = '拣料出库' |
| | | }else if(res.data.ioType === 107){ |
| | | that.taskType = '拣料出库' |
| | | } |
| | | }else{ |
| | | that.messageText = res.msg |
| | | that.messageToggle('error') |
| | |
| | | this.barcodeFocus = false; |
| | | this.matFocus = false; |
| | | setTimeout(() => { |
| | | this.matnr = ''; |
| | | this.matFocus = true; |
| | | this.staNo = ''; |
| | | this.staNos = true; |
| | | }, 100); |
| | | },// 站点光标清空重置 |
| | | batch1ss() { |
| | | this.barcodeFocus = false; |
| | | this.matFocus = false; |
| | | this.staNos = false; |
| | | setTimeout(() => { |
| | | this.batch1=''; |
| | | this.batch1s = true; |
| | | }, 100); |
| | | },// 2批号光标清空重置 |
| | | batch2ss() { |
| | | this.barcodeFocus = false; |
| | | this.matFocus = false; |
| | | this.staNos = false; |
| | | this.batch1s = false; |
| | | setTimeout(() => { |
| | | this.batch2=''; |
| | | this.batch2s = true; |
| | | }, 100); |
| | | },// 3批号光标清空重置 |
| | | batch3ss() { |
| | | this.barcodeFocus = false; |
| | | this.matFocus = false; |
| | | this.staNos = false; |
| | | this.batch1s = false; |
| | | this.batch2s = false; |
| | | setTimeout(() => { |
| | | this.batch3=''; |
| | | this.batch33s = true; |
| | | }, 100); |
| | | },// 4批号光标清空重置 |
| | | batch4ss() { |
| | | this.barcodeFocus = false; |
| | | this.matFocus = false; |
| | | this.staNos = false; |
| | | this.batch1s = false; |
| | | this.batch2s = false; |
| | | this.batch3s = false; |
| | | setTimeout(() => { |
| | | this.batch4=''; |
| | | this.batch4s = true; |
| | | }, 100); |
| | | }, |
| | | // 搜索物料 |
| | |
| | | comb() { |
| | | uni.vibrateShort(); |
| | | let that = this; |
| | | |
| | | if(this.batch1!=='' ){ |
| | | this.batcharry.push(this.batch1); |
| | | } |
| | | if(this.batch2!==''){ |
| | | this.batcharry.push(this.batch2); |
| | | } |
| | | if(this.batch3!==''){ |
| | | this.batcharry.push(this.batch3); |
| | | } |
| | | |
| | | for (var i = 0; i < this.batcharry.length-1; i++) { |
| | | for(var j = i+1; j < this.batcharry.length; j++) { |
| | | if(this.batcharry[i]===this.batcharry[j]){ |
| | | this.messageText = "批号重复" |
| | | this.messageToggle('error') |
| | | this.batcharry = []; |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | if(this.batcharry.length !== this.dataList.length){ |
| | | this.messageText = "批号数量不一致" |
| | | this.messageToggle('error') |
| | | this.batcharry = []; |
| | | return; |
| | | } |
| | | //判断扫的批号是否都是该托盘的批号 |
| | | for (var i = 0; i < this.batcharry.length; i++) { |
| | | var boo=false; |
| | | for(var j = 0; j < this.dataList.length; j++) { |
| | | if(this.batcharry[i]===this.dataList[j].batch){ |
| | | boo = true; |
| | | break; |
| | | } |
| | | } |
| | | if(!boo){ |
| | | this.messageText = "扫码输入的批号与该托盘的批号不一致" |
| | | this.messageToggle('error') |
| | | this.batcharry = []; |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if (that.barcode === '') { |
| | | this.messageText = "请扫描托盘条码" |
| | | this.messageToggle('error') |
| | |
| | | this.messageToggle('error') |
| | | return; |
| | | } |
| | | |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/pakout/confirm/auth', |
| | | data: that.dataList, |
| | |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | | this.barcodeFocuss() |
| | | this.batch1 = '' |
| | | this.batch2 = '' |
| | | this.batch3 = '' |
| | | this.batch4 = '' |
| | | this.batch5 = '' |
| | | }, |
| | | } |
| | | } |
| | |
| | | .code { |
| | | width: 100%; |
| | | position: fixed; |
| | | min-height: 100rpx; |
| | | min-height: 200rpx; |
| | | background-color: #FFF; |
| | | z-index: 10; |
| | | } |
| | |
| | | width: 100%; |
| | | background-color: white; |
| | | position: fixed; |
| | | margin-top: 100rpx; |
| | | margin-top: 500rpx; |
| | | z-index: 9; |
| | | /* border-top: 1px solid #DCDFE6; */ |
| | | text-align: center; |