skyouc
1 天以前 9382f2c611581996c9b015abeb079891acbddde4
pages/AGV/CachePakin.vue
@@ -48,21 +48,11 @@
                  <view class="left-item">{{item.maktx}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">规格:</view>
                  <view class="left-item">{{item.specs}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">批号:</view>
                  <view class="desc">供应商:</view>
                  <view class="left-item">
                     <uni-tag :text="item.batch" type="warning"></uni-tag>
                     <uni-tag :text="item.supCode" type="warning"></uni-tag>
                  </view>
               </view>
               <!-- <view class="list-left-item">
                  <view class="desc">重量:</view>
                  <view class="left-item">
                     <uni-tag :text="item.weight" type="warning"></uni-tag>
                  </view>
               </view> -->
               <view class="list-left-item">
                  <view class="desc">数量:</view>
                  <view class="left-item">{{item.anfme}}</view>
@@ -94,13 +84,11 @@
                  </view>
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">批号:</view>
                  <view class="popup-item-right"><input type="text" v-model="batch"></view>
                  <view class="desc">供应商:</view>
                  <view class="left-item">
                     <uni-tag :text="supCode" type="warning"></uni-tag>
                  </view>
               </view>
               <!-- <view class="popup-item">
                  <view class="popup-item-left">重量:</view>
                  <view class="popup-item-right"><input type="text" v-model="weight"></view>
               </view> -->
               <view class="popup-item">
                  <view class="popup-item-left">数量:</view>
                  <view class="popup-item-right" style="border: none;justify-content: center;">
@@ -157,7 +145,7 @@
            count: 0,
            rowNum: '',
            matnr: '',
            batch: '',
            supCode: '',
            weight: '',
            msgType1: 'success',
            msgType: 'success',
@@ -193,19 +181,19 @@
         },
         barcodeInput() {
            // 不设置定时器 会出现扫入的字符串不全
            setTimeout(() => {
               var len = this.barcode.length
               if (len != 8) {
                  uni.showToast({
                     title: '托盘码有误请重试',
                     icon: "none",
                     position: 'top'
                  });
                  this.barcodeFocuss()
                  return;
               }
               this.focuss()
            }, 200)
            // setTimeout(() => {
            //    var len = this.barcode.length
            //    if (len != 8) {
            //       uni.showToast({
            //          title: '托盘码有误请重试',
            //          icon: "none",
            //          position: 'top'
            //       });
            //       this.barcodeFocuss()
            //       return;
            //    }
            //    this.focuss()
            // }, 200)
         },
         // 托盘码有误重置
         barcodeFocuss() {
@@ -242,7 +230,7 @@
                  if (result.code === 200 && result.data) {
                     that.matData = result.data
                     that.matnr = ''
                     that.matData['batch'] = ''
                     that.matData['supCode'] = ''
                     uni.navigateTo({
                        url: "../mat/matSelected",
                        // 通过eventChannel向被打开页面传送数据
@@ -312,12 +300,12 @@
            for (var i = 0; i < len; i++) {
               if (mat.matnr == this.dataList[i].matnr) {
                  for (var j = 0; j < len; j++) {
                     if (mat.batch == this.dataList[j].batch) {
                     if (mat.supCode == this.dataList[j].supCode) {
                        sameItem = true
                     }
                  }
                  // 相同物料 不同批号  新加列表
                  if (mat.batch != this.dataList[i].batch) {
                  if (mat.supCode != this.dataList[i].supCode) {
                     this.$forceUpdate() // 强制刷新
                     if (sameItem) {
                        add = false
@@ -341,7 +329,7 @@
         revise(item, i) {
            this.matnr = this.dataList[i].matnr
            this.count = this.dataList[i].anfme
            this.batch = this.dataList[i].batch
            this.supCode = this.dataList[i].supCode
            this.weight = this.dataList[i].weight
            this.rowNum = i
            this.eject()
@@ -370,7 +358,7 @@
         },
         reviseConfirm() {
            this.dataList[this.rowNum].anfme = this.count
            this.dataList[this.rowNum].batch = this.batch
            this.dataList[this.rowNum].supCode = this.supCode
            this.dataList[this.rowNum].weight = this.weight
            this.matnr = ''
            this.messageText = "修改成功"
@@ -417,7 +405,8 @@
               data: JSON.stringify({
                  orderNo: that.orderNo,
                  barcode: that.barcode,
                  combMats: that.dataList
                  combMats: that.dataList,
                  type: '1'
               }),
               method: 'POST',
               header: {