#
whycq
2022-05-19 0868fd176a6e83400c8f2fd7c118f564b71259a9
pages/basics/outPakin.vue
@@ -9,7 +9,7 @@
            <view class="square-content">
               <view class="content-input">
                  <input readonly="value" v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8"
                  :focus="barcodeFocus">
                  :focus="barcodeFocus" @input="nextInput">
                  <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
               </view>
            </view>
@@ -93,13 +93,24 @@
         const UPORT = uni.getStorageSync('UPORT');
         this.basePORT = UPORT
      },
      onLoad() {
         setInterval(()=>{
            uni.hideKeyboard()
         },20)
      },
      methods: {
         nextInput() {
            if (this.barcode.length == 8) {
               this.foucss()
            }
         },
         foucss() {
            let that = this;
            that.focus = false;
            setTimeout(()=>{
               that.matnrId = '';
               that.focus = true;
            }, 100);
         },
         clear() {
@@ -111,6 +122,7 @@
            this.$refs.message.open()
         },
         resst() {
            this.barcodeFocus = true
            this.matnrId = '';
            this.matList = [];
            this.barcode = '';
@@ -194,7 +206,6 @@
                  let res = result.data
                  if (res.code === 200 && res.data) {
                     let add = true;
                     let mat = res.data;
                     mat['batch'] = str[2];
                     mat['anfme'] = 1
@@ -202,6 +213,7 @@
                        if(that.matList[i].batch == str[2]) {
                           that.messageToggle('warn');
                           that.messageText = '重复扫描';
                           that.foucss();
                           add = false;
                        }
                     }