#
whycq
2022-05-19 d8c2e4943409efa3ad1a6e8229d33a1e43247886
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,7 +93,25 @@
         const UPORT = uni.getStorageSync('UPORT');
         this.basePORT = UPORT
      },
      onLoad() {
         setInterval(()=>{
            uni.hideKeyboard()
         },20)
      },
      methods: {
         nextInput() {
            if (this.barcode.length == 8) {
               this.foucss()
            }
         },
         barcodeFocuss() {
            let that = this;
            that.barcodeFocus = false;
            setTimeout(()=>{
               that.matnrId = '';
               that.barcodeFocus = true;
            }, 100);
         },
         foucss() {
            let that = this;
            that.focus = false;
@@ -114,6 +132,7 @@
            this.matnrId = '';
            this.matList = [];
            this.barcode = '';
            this.barcodeFocuss();
         },
         removeBarcode() {
            this.barcode = ''
@@ -162,6 +181,7 @@
                     that.barcode = '';
                     that.matList = '';
                     that.matList = [];
                     that.barcodeFocuss();
                  } else if (res.code == 403) {
                     uni.showToast({title: res.msg, icon: "none", position: 'top'})
                     setTimeout(() => {
@@ -194,7 +214,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 +221,7 @@
                        if(that.matList[i].batch == str[2]) {
                           that.messageToggle('warn');
                           that.messageText = '重复扫描';
                           that.foucss();
                           add = false;
                        }
                     }