| | |
| | | </view> |
| | | <view class="square-content"> |
| | | <view class="content-input"> |
| | | <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMat()" |
| | | <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMatInput()" |
| | | :focus="focus" placeholder-style="line-height: 85rpx;"> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons> |
| | | </view> |
| | |
| | | <view class="revise-box "> |
| | | <view class="revise-box-top"> |
| | | <view class="color-block-blue"></view> |
| | | <text class="title">修改批号/数量</text> |
| | | <text class="title">修改数量</text> |
| | | </view> |
| | | <!-- <view class="" style="position: relative;left: 50px;margin-bottom: 20px;"> |
| | | <text style="display: inline-block;float: left;width: 60px;">批次:</text> |
| | |
| | | check:false, |
| | | checkText:'全选', |
| | | checkedData:[], |
| | | batch:'' |
| | | batch:'', |
| | | timeout: null, |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | }); |
| | | that.matnr = '' |
| | | }, |
| | | findMatInput() { |
| | | clearTimeout(this.timeout) |
| | | this.timeout = setTimeout(() => { |
| | | this.findMat() |
| | | },600) |
| | | }, |
| | | findMat() { |
| | | let that = this |
| | | uni.request({ |
| | |
| | | checkMat(mat) { |
| | | var len = this.matList.length |
| | | var add = true |
| | | for (var i = 0; i < len; i++) { |
| | | if (mat.matnr == this.matList[i].matnr&&mat.batch == this.matList[i].batch&&mat.orderNo == this.matList[i].orderNo) { |
| | | this.matList[i].anfme += mat.anfme |
| | | this.$forceUpdate() // 强制刷新 |
| | | add = false |
| | | } |
| | | } |
| | | // for (var i = 0; i < len; i++) { |
| | | // if (mat.matnr == this.matList[i].tiaoma){ |
| | | // uni.showToast({title: "条码重复扫了", icon: "none", position: 'top'}) |
| | | // } |
| | | // // if (mat.matnr == this.matList[i].matnr&&mat.batch == this.matList[i].batch&&mat.orderNo == this.matList[i].orderNo) { |
| | | // // this.matList[i].anfme += mat.anfme |
| | | // // this.$forceUpdate() // 强制刷新 |
| | | // // add = false |
| | | // // } |
| | | // } |
| | | if (add) { |
| | | this.matList.unshift(mat) |
| | | } |