#
whycq
2023-07-07 fd232a4478aeb37f207902cb0c2353ee5d4f2bf1
pages/basics/pakin.vue
@@ -9,7 +9,7 @@
            <view class="square-content">
               <view class="content-input">
                  <input v-model="barcode" type="text" placeholder="扫码 / 输入" 
                  :focus="barcodeFocus" @confirm="barcodeInput()" placeholder-style="line-height:  85rpx;">
                  :focus="barcodeFocus" @input="checkedBarcode()" placeholder-style="line-height:  85rpx;">
                  <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
               </view>
            </view>
@@ -68,9 +68,12 @@
                  <!-- <view>
                     <checkbox :value="item.id+''" :checked="item.checked" style="display: block;" />
                  </view> -->
                  <view class="matnr"><text style="width: 400rpx;">编码:{{item.matnr}}</text></view>
                  <table>
                     <tr><td>编号:</td><td>{{item.matnr}}</td></tr>
                  </table>
                  <view><text style="width: 400rpx;">品名:{{item.maktx}}</text></view>
                  <view><text style="width: 400rpx;">规格:{{item.specs}}</text></view>
                  <view><text style="width: 400rpx;">入库区域:{{item.matType$}}</text></view>
                  <view><text style="width: 400rpx;">批号:{{item.batch}}</text></view>
                  <view><text style="width: 400rpx;">客户信息:{{item.cstmr}}</text></view>
                  <view>
@@ -156,7 +159,7 @@
            searchBox: 'hide',
            pick:'hide',
            matnr:'',
            matList:[{}],
            matList:[],
            result: '',
            enableQty:'',
            count:'',
@@ -193,6 +196,28 @@
         // 获取url
         getUrl() {
            this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
         },
         // 检查条码
         checkedBarcode() {
            let that = this
            uni.request({
               url: that.commonUrl + '/mobile/barcode/auth',
               data: {
                  barcode: that.barcode,
               },
               header: {
                  'token':uni.getStorageSync('token')
               },
               success(result) {
                  var res = result.data
                  if (res.code === 500) {
                     that.barcodeFocuss()
                     uni.showToast({title: res.msg, icon: "none", position: 'top'});
                  } else if(res.code === 200) {
                     that.barcodeInput()
                  }
               }
            })
         },
         // 冻结
         isFrozen() {
@@ -407,7 +432,7 @@
            }
            if (add) {
               if(mat.batch === '' || mat.batch === null) {
                  mat.batch = today
                  // mat.batch = today
               }
               this.matList.unshift(mat)
            }
@@ -444,6 +469,7 @@
            this.count = this.matList[index].anfme
            this.batch = this.matList[index].batch
            this.memo = this.matList[index].memo
            this.cstmr = this.matList[index].cstmr
            this.rowNum = index
            this.eject()
         },
@@ -459,6 +485,7 @@
            this.matList[this.rowNum].anfme = this.count
            this.matList[this.rowNum].batch = this.batch
            this.matList[this.rowNum].memo = this.memo
            this.matList[this.rowNum].cstmr = this.cstmr
            this.$refs.revise.close()
            this.$forceUpdate() // 强制刷新
         },
@@ -631,15 +658,16 @@
   }
   .data-list {
      border-bottom: 1px solid #d8d8d8;
      height: 250rpx;
      min-height: 320rpx;
      margin: 15rpx;
      border-radius: 20rpx;
      display: flex;
   }
   .data-list:first-child {
      margin-top: 20rpx;
   }
   .data-list:last-child {
      margin-bottom: 120rpx;
      margin-bottom: 180rpx;
   }
   /* .data-list-left {
      display: inline-block;
@@ -650,11 +678,12 @@
      line-height: 180rpx;
   } */
   .data-list-left {
      display: inline-block;
      float: left;
      margin-left: 6%;
      height: 180rpx;
      min-height: 320rpx;
      color: #676767;
      width: 500rpx;
      color: #676767;
      max-width: 450rpx;
   }
   .matnr {
      padding-top: 10rpx;
@@ -662,8 +691,8 @@
   .data-list-right {
      display: inline-block;
      float: right;
      height: 250rpx;
      line-height: 250rpx;
      min-height: 290rpx;
      line-height: 290rpx;
   }
   /* display: inline-block;
   float: right;