|  |  |  | 
|---|
|  |  |  | <view class="item"> | 
|---|
|  |  |  | <view class="code-decs">库位码:</view> | 
|---|
|  |  |  | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" | 
|---|
|  |  |  | @confirm="barcodeInput()"> | 
|---|
|  |  |  | @input="barcodeInput()"> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="item"> | 
|---|
|  |  |  | <view class="code-decs">物料号:</view> | 
|---|
|  |  |  | 
|---|
|  |  |  | baseUrl: '', | 
|---|
|  |  |  | token: '', | 
|---|
|  |  |  | order: '', | 
|---|
|  |  |  | orderFocus: true, | 
|---|
|  |  |  | barcode: '', | 
|---|
|  |  |  | barcodeFocus: '', | 
|---|
|  |  |  | dataList: [], | 
|---|
|  |  |  | 
|---|
|  |  |  | messageText: '', | 
|---|
|  |  |  | title: '', | 
|---|
|  |  |  | content: '', | 
|---|
|  |  |  | barcodeFocus: false, | 
|---|
|  |  |  | barcodeFocus: true, | 
|---|
|  |  |  | matFocus: false, | 
|---|
|  |  |  | matData: '' | 
|---|
|  |  |  | matData: '', | 
|---|
|  |  |  | removeNum: 0 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onShow() { | 
|---|
|  |  |  | 
|---|
|  |  |  | messageToggle(type) { | 
|---|
|  |  |  | this.msgType1 = type | 
|---|
|  |  |  | this.$refs.message.open() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | barcodeInput() { | 
|---|
|  |  |  | // 不设置定时器 会出现扫入的字符串不全 | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.focuss() | 
|---|
|  |  |  | }, 200) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 托盘码有误重置 | 
|---|
|  |  |  | barcodeFocuss() { | 
|---|
|  |  |  | let that = this; | 
|---|
|  |  |  | that.barcodeFocus = false; | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | that.barcode = ''; | 
|---|
|  |  |  | that.barcodeFocus = true; | 
|---|
|  |  |  | }, 100); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 商品光标清空重置 | 
|---|
|  |  |  | focuss() { | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.matnr = ''; | 
|---|
|  |  |  | this.matFocus = true; | 
|---|
|  |  |  | }, 100); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 搜索物料 | 
|---|
|  |  |  | findMat() { | 
|---|
|  |  |  | 
|---|
|  |  |  | events: { | 
|---|
|  |  |  | matList: function(data) { | 
|---|
|  |  |  | that.checkMat(data.data) | 
|---|
|  |  |  | that.focuss() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 列表移除按钮 | 
|---|
|  |  |  | remove(item, i, type) { | 
|---|
|  |  |  | this.removeNum  = i | 
|---|
|  |  |  | this.msgType = type | 
|---|
|  |  |  | this.title = '警告' | 
|---|
|  |  |  | this.content = '是否移除当前商品!' | 
|---|
|  |  |  | 
|---|
|  |  |  | removeConfirm(i) { | 
|---|
|  |  |  | this.messageText = "移除成功" | 
|---|
|  |  |  | this.messageToggle('success') | 
|---|
|  |  |  | this.dataList.splice(i, 1) | 
|---|
|  |  |  | this.dataList.splice(this.removeNum, 1) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | reviseConfirm() { | 
|---|
|  |  |  | this.dataList[this.rowNum].anfme = this.count | 
|---|