| | |
| | | <view> |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="code-decs">订单号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="orderNo" :focus="orderNoFocus" |
| | | @input="orderNoInput()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">托盘码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">物料码:</view> |
| | | <view class="code-decs">台车托盘:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="carBarcode" :focus="orderNoFocus" |
| | | @input="orderNoInput()"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">BS码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> |
| | | <view class="item-right"> |
| | | <button></button> |
| | |
| | | <view class="left-item">{{item.maktx}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">供应商:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.suppCode" type="warning"></uni-tag> |
| | | </view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">规格:</view> |
| | | <view class="left-item">{{item.specs}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">批号:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.batch" type="warning"></uni-tag> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="list-left-item"> |
| | | <view class="desc">重量:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.weight" type="warning"></uni-tag> |
| | | </view> |
| | | </view> --> |
| | | <view class="list-left-item"> |
| | | <view class="desc">数量:</view> |
| | | <view class="left-item">{{item.anfme}}</view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">批号:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="batch"></view> |
| | | <view class="popup-item-left">供应商:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="suppCode"></view> |
| | | </view> |
| | | <!-- <view class="popup-item"> |
| | | <view class="popup-item-left">重量:</view> |
| | |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">数量:</view> |
| | | <view class="popup-item-right" style="border: none;justify-content: center;"> |
| | | <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" /> |
| | | <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" |
| | | @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | <view class="btn"> |
| | |
| | | baseUrl: '', |
| | | token: '', |
| | | barcode: '', |
| | | carBarcode: '', |
| | | bsCode: '', |
| | | orderNo: null, |
| | | dataList: [], |
| | | count: 0, |
| | | rowNum: '', |
| | | matnr: '', |
| | | batch: '', |
| | | suppCode: '', |
| | | weight: '', |
| | | msgType1: 'success', |
| | | msgType: 'success', |
| | |
| | | // barcode input 事件 |
| | | orderNoInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.orderNo.length |
| | | // this.barcodeFocuss() |
| | | }, 200) |
| | | // setTimeout(() => { |
| | | // var len = this.orderNo.length |
| | | // // this.barcodeFocuss() |
| | | // }, 200) |
| | | }, |
| | | barcodeInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | if (len != 8) { |
| | | uni.showToast({ |
| | | title: '托盘码有误请重试', |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | this.focuss() |
| | | }, 200) |
| | | // setTimeout(() => { |
| | | // var len = this.barcode.length |
| | | // if (len != 8) { |
| | | // uni.showToast({ |
| | | // title: '托盘码有误请重试', |
| | | // icon: "none", |
| | | // position: 'top' |
| | | // }); |
| | | // this.barcodeFocuss() |
| | | // return; |
| | | // } |
| | | // this.focuss() |
| | | // }, 200) |
| | | }, |
| | | // 托盘码有误重置 |
| | | barcodeFocuss() { |
| | |
| | | findMat() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/scan/order/mats', |
| | | url: that.baseUrl + '/mobile/cache/task/list', |
| | | method: 'POST', |
| | | data: { |
| | | orderNo: that.orderNo, |
| | | matnr: that.matnr |
| | | barcode: that.barcode, |
| | | bsCode: that.matnr, |
| | | carBarcode: that.carBarcode |
| | | }, |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | |
| | | if (result.code === 200 && result.data) { |
| | | that.matData = result.data |
| | | that.matnr = '' |
| | | that.matData['batch'] = '' |
| | | that.matData['suppCode'] = '' |
| | | uni.navigateTo({ |
| | | url: "../mat/matSelected", |
| | | // 通过eventChannel向被打开页面传送数据 |
| | |
| | | }, |
| | | selectMat() { |
| | | let that = this |
| | | if (that.orderNo == null || that.orderNo == undefined ) { |
| | | if (that.orderNo == null || that.orderNo == undefined) { |
| | | that.messageText = '请填写订单编号!!' |
| | | that.messageToggle('error') |
| | | return; |
| | | } |
| | | |
| | | |
| | | uni.navigateTo({ |
| | | url: "../mat/matQuery", |
| | | success: function(res) { |
| | |
| | | }, |
| | | checkMat(mat) { |
| | | var len = this.dataList.length |
| | | var add = true ,sameItem = false |
| | | var add = true, |
| | | sameItem = false |
| | | for (var i = 0; i < len; i++) { |
| | | if (mat.matnr == this.dataList[i].matnr) { |
| | | for (var j = 0; j < len; j++) { |
| | | if (mat.batch == this.dataList[j].batch) { |
| | | if (mat.suppCode == this.dataList[j].suppCode) { |
| | | sameItem = true |
| | | } |
| | | } |
| | | // 相同物料 不同批号 新加列表 |
| | | if (mat.batch != this.dataList[i].batch) { |
| | | if (mat.suppCode != this.dataList[i].suppCode) { |
| | | this.$forceUpdate() // 强制刷新 |
| | | if (sameItem) { |
| | | add = false |
| | | } else { |
| | | add = true |
| | | } |
| | | |
| | | |
| | | } else { |
| | | // 相同物料相同批号 数量累加 |
| | | this.dataList[i].anfme += mat.anfme |
| | |
| | | revise(item, i) { |
| | | this.matnr = this.dataList[i].matnr |
| | | this.count = this.dataList[i].anfme |
| | | this.batch = this.dataList[i].batch |
| | | this.suppCode = this.dataList[i].suppCode |
| | | this.bsCode = this.dataList[i].threeCode |
| | | this.weight = this.dataList[i].weight |
| | | this.rowNum = i |
| | | this.eject() |
| | |
| | | }, |
| | | // 列表移除按钮 |
| | | remove(item, i, type) { |
| | | this.removeNum = i |
| | | this.removeNum = i |
| | | this.msgType = type |
| | | this.title = '警告' |
| | | this.content = '是否移除当前商品!' |
| | |
| | | }, |
| | | reviseConfirm() { |
| | | this.dataList[this.rowNum].anfme = this.count |
| | | this.dataList[this.rowNum].batch = this.batch |
| | | this.dataList[this.rowNum].suppCode = this.suppCode |
| | | this.dataList[this.rowNum].weight = this.weight |
| | | this.matnr = '' |
| | | this.messageText = "修改成功" |
| | |
| | | } |
| | | } |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/comb/auth', |
| | | url: that.baseUrl + '/mobile/cache/comb/auth', |
| | | data: JSON.stringify({ |
| | | orderNo: that.orderNo, |
| | | barcode: that.barcode, |
| | | combMats: that.dataList |
| | | combMats: that.dataList, |
| | | type: '0' |
| | | }), |
| | | method: 'POST', |
| | | header: { |
| | |
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | |
| | | .list:first-child { |
| | | margin-top: 460rpx; |
| | | margin-top: 420rpx; |
| | | } |
| | | |
| | | .code { |
| | | width: 100%; |
| | | position: fixed; |
| | |
| | | text-align: center; |
| | | box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); |
| | | } |
| | | </style> |
| | | </style> |