|  |  | 
 |  |  |                     success(res) { | 
 |  |  |                         res = res.data | 
 |  |  |                         that.elements = [ | 
 |  |  |                             { | 
 |  |  |                                 title: '组件入库', | 
 |  |  |                                 name: 'modulePakin', | 
 |  |  |                                 color: 'green', | 
 |  |  |                                 cuIcon: 'order', | 
 |  |  |                                 url: '/pakin/modulePakin' | 
 |  |  |                             }, | 
 |  |  |                             // { | 
 |  |  |                             //     title: '组件入库', | 
 |  |  |                             //     name: 'modulePakin', | 
 |  |  |                             //     color: 'green', | 
 |  |  |                             //     cuIcon: 'order', | 
 |  |  |                             //     url: '/pakin/modulePakin' | 
 |  |  |                             // }, | 
 |  |  |                         ] | 
 |  |  |                         if (res.code === 200) { | 
 |  |  |                             if (res.data == undefined || res.data == null || res.data == "") { | 
 
 |  |  | 
 |  |  |             eventChannel.on('mat', function(data) { | 
 |  |  |                 that.mat = data.data | 
 |  |  |                 console.log(data.data); | 
 |  |  |                 // that.mat.anfme = 0  | 
 |  |  |                 that.mat.anfme = 1 | 
 |  |  |             }) | 
 |  |  |              | 
 |  |  |              | 
 
 |  |  | 
 |  |  |             <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> | 
 |  |  | 
 |  |  |                 this.msgType1 = type | 
 |  |  |                 this.$refs.message.open() | 
 |  |  |             }, | 
 |  |  |             barcodeInput() { | 
 |  |  |                 // 不设置定时器 会出现扫入的字符串不全 | 
 |  |  |                 setTimeout(() => { | 
 |  |  |                     var len = this.barcode.length | 
 |  |  |                     if (len != 8) { | 
 |  |  |                         uni.showToast({ | 
 |  |  |                             title: '托盘码有误请重试', | 
 |  |  |                             icon: "none", | 
 |  |  |                             position: 'top' | 
 |  |  |                         }); | 
 |  |  |                         this.barcodeFocuss() | 
 |  |  |                         return; | 
 |  |  |                     } | 
 |  |  |                     this.focuss() | 
 |  |  |                 }, 200) | 
 |  |  |             }, | 
 |  |  |             // 托盘码有误重置 | 
 |  |  |             barcodeFocuss() { | 
 |  |  |                 let that = this; | 
 |  |  |                 that.barcodeFocus = false; | 
 |  |  |                 setTimeout(() => { | 
 |  |  |                     that.barcode = ''; | 
 |  |  |                     that.barcodeFocus = true; | 
 |  |  |                 }, 100); | 
 |  |  |             }, | 
 |  |  |             // 商品光标清空重置 | 
 |  |  |             focuss() { | 
 |  |  |                 this.matFocus = false; | 
 |  |  |                 setTimeout(() => { | 
 |  |  |                     this.matnr = ''; | 
 |  |  |                     this.matFocus = true; | 
 |  |  |                 }, 100); | 
 |  |  |             }, | 
 |  |  |             // 搜索物料 | 
 |  |  |             findMat() { | 
 |  |  |                 let that = this | 
 |  |  |                 var matnr =  that.matnr.split(";") | 
 |  |  |                 that.order = matnr[0] | 
 |  |  |                 that.anfme = matnr[3] | 
 |  |  |                 that.matnr = matnr[1] | 
 |  |  |                 if (matnr[1]) { | 
 |  |  | 					 | 
 |  |  |                     that.order = matnr[0] | 
 |  |  |                     that.anfme = matnr[3] | 
 |  |  |                     that.matnr = matnr[1] | 
 |  |  |                 }  | 
 |  |  |                 console.log(11112); | 
 |  |  |                 uni.request({ | 
 |  |  |                     url: that.baseUrl + '/mat/auth', | 
 |  |  |                     data: { | 
 |  |  | 
 |  |  |                     }, | 
 |  |  |                     success(result) { | 
 |  |  |                         result = result.data | 
 |  |  |                         if (result.code === 200 && result.data) { | 
 |  |  |                         if (result.code === 200) { | 
 |  |  |                             if (result.data === null) { | 
 |  |  |                                 uni.showToast({ | 
 |  |  |                                     title: '无物料', | 
 |  |  |                                     icon: "error", | 
 |  |  |                                     position: 'top' | 
 |  |  |                                 }) | 
 |  |  |                                 that.focuss() | 
 |  |  |                                 return | 
 |  |  |                             } | 
 |  |  |                             that.matData = result.data | 
 |  |  |                             that.matnr = '' | 
 |  |  |                              | 
 
 |  |  | 
 |  |  |             }, | 
 |  |  |             // 商品光标清空重置 | 
 |  |  |             focuss() { | 
 |  |  |                 this.focus = false; | 
 |  |  |                 this.barcodeFocus = false; | 
 |  |  |                 this.matFocus = false; | 
 |  |  |                 setTimeout(() => { | 
 |  |  |                     this.matnr = ''; | 
 |  |  |                     this.matFocus = true; |