#
whycq
2022-05-16 f1befa80c8e88d3c2cd7d2f268c4b8678d2108e8
pages/basics/outPakin.vue
@@ -21,7 +21,7 @@
            </view>
            <view class="square-content">
               <view class="content-input">
                  <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMat()"
                  <input v-model="matnrId" type="text" placeholder="扫码 / 输入" @input="findMat()"
                  :focus="focus" @focus="focuss" >
                  <!-- @focus="focuss" -->
                  <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons>
@@ -77,14 +77,16 @@
            type: 'center',
            searchBox: 'hide',
            pick:'hide',
            matnr:'',
            matList:[{matnr:'1101842-10000',batch:'22047515999'}],
            matnrId:'',
            // matList:[{matnr:'1101842-10000',batch:'22047515999'}],
            matList:[],
            result: '',
            listLen:0,
            msgType: 'success',
            messageText: '这是一条成功提示',
         }
      },
      mounted(){
         const UIP = uni.getStorageSync('UIP');
         this.baseIP = UIP;
@@ -106,7 +108,7 @@
         resst() {
            this.matList = []
            this.barcode = ''
            this.matnr = ''
            this.matnrId = ''
            uni.vibrateShort();
         },
         removeBarcode() {
@@ -123,7 +125,7 @@
            this.$nextTick(function() {
               this.focus = true;
            });
            this.matnr = ''
            this.matnrId = ''
            uni.vibrateShort();
         },
         remove(item,index) {
@@ -183,13 +185,14 @@
         
         findMat() {
            let that = this
            let str = that.matnr.split('-')
            that.matnr = str[0]+'-'+str[1]
            let str = that.matnrId.split('-')
            let matnr = str[0]+'-'+str[1]
            // that.matnr = str[0]+'-'+str[1]
            uni.showLoading();
            uni.request({
                url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth',
                data: {
                  matnr:that.matnr
                  matnr:matnr
                },
                header: {
                  'token':uni.getStorageSync('token')
@@ -226,7 +229,7 @@
                        // uni.hideKeyboard();
                        that.matList.unshift(res.data)
                     }
                     that.matnr = ''
                     that.matnrId = ''
                     that.listLen = that.matList.length;
                     uni.hideLoading();
                  } else if (res.code == 403) {
@@ -237,9 +240,11 @@
                           url: '../login/login'
                        });
                     }, 1000);
                     uni.hideLoading();
                  } else {
                     that.messageToggle('error')
                     that.messageText = res.msg
                     uni.hideLoading();
                     // uni.showToast({title: res.msg, icon: "none",position: 'top'})
                  }
               }
@@ -375,7 +380,7 @@
   }
   .data-list {
      border-bottom: 1px solid #d8d8d8;
      height: 90rpx;
      height: 130rpx;
      margin: 15rpx;
      border-radius: 20rpx;
   }
@@ -397,7 +402,7 @@
      display: inline-block;
      float: left;
      margin-left: 6%;
      height: 100rpx;
      height: 130rpx;
      /* line-height: 100rpx; */
      color: #676767;
   }
@@ -405,13 +410,13 @@
      font-size: 14px;
      font-weight: 700;
      /* padding-top: 15rpx; */
      padding-top: 8rpx;
      padding-top: 15rpx;
   }
   .data-list-right {
      display: inline-block;
      float: right;
      height: 100rpx;
      line-height: 100rpx;
      height: 130rpx;
      line-height: 130rpx;
      margin-right: 10%;
   }
</style>