#
whycq
2022-04-24 4ec20722756ba84c36b9690f6a24bec50c760fd9
pages/basics/offline.vue
@@ -8,7 +8,8 @@
            </view>
            <view class="square-content">
               <view class="content-input">
                  <input v-model="barcode" type="text" placeholder="扫码 / 输入" maxlength="8">
                  <input v-model="barcode" type="text" placeholder="扫码 / 输入"
                        maxlength="8" :focus="barcodeFocus" @focus="focuss">
                  <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
               </view>
            </view>
@@ -34,7 +35,8 @@
            </view>
            <view class="square-content">
               <view class="content-input">
                  <input v-model="matNo" type="text" placeholder="扫码 / 输入" @input="findMat()" :focus="focus">
                  <input v-model="matNo" type="text" placeholder="扫码 / 输入"
                        @input="findMat()" :focus="focus" @focus="focuss" >
                  <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMat()"></uni-icons>
               </view>
            </view>
@@ -132,7 +134,8 @@
      data() {
         return {
            barcode: '',
            matList:[],
            barcodeFocus:true,
            matList:[{barcode:'92992929292'}],
            matNo:'',
            mat:null,
            type: 'center',
@@ -146,7 +149,8 @@
            enableQty:'',
            msgType: 'success',
            messageText: '这是一条成功提示',
            focus:true
            focus:false
         }
      },
      mounted(){
@@ -156,6 +160,9 @@
         this.basePORT = UPORT
      },
      methods: {
         focuss() {
            uni.hideKeyboard()
         },
         messageToggle(type) {
            this.msgType = type
            this.messageText = `这是一条${type}消息提示`
@@ -170,10 +177,18 @@
         removeBarcode() {
            this.barcode = ''
            uni.vibrateShort();
            this.barcodeFocus = false;
            this.$nextTick(function() {
               this.barcodeFocus = true;
            });
         },
         removeMat() {
            this.matNo = ''
            uni.vibrateShort();
            this.focus = false;
            this.$nextTick(function() {
               this.focus = true;
            });
         },
         eject(type) {
            this.type = type