#
whycq
2025-01-03 6680177b03517192349b20ef287875d0384b0cca
pages/pakin/pakin.vue
@@ -6,6 +6,7 @@
            <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
               @input="barcodeInput()">
         </view>
         <view class="item">
            <view class="code-decs">物料码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()">
@@ -14,6 +15,11 @@
               <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text>
               <uni-icons type="right" color="#c1c1c1"></uni-icons>
            </view>
         </view>
         <view class="item">
            <view class="code-decs">备注:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="locname" :focus="barcodeFocus"
               >
         </view>
      </view>
      <view class="mat-list-title">
@@ -47,6 +53,16 @@
                  </view>
               </view>
               <view class="list-left-item">
                  <view class="desc">包装号:</view>
                  <view class="left-item">{{item.itemNum}}</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>
               </view>
@@ -77,13 +93,22 @@
                  </view>
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">合同号:</view>
                  <view class="popup-item-left">批号:</view>
                  <view class="popup-item-right"><input type="text" v-model="batch"></view>
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">包装号:</view>
                  <view class="popup-item-right"><input type="text" v-model="itemNum"></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;">
                     <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue" />
                     <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
                  </view>
               </view>
               <view class="btn">
@@ -136,6 +161,7 @@
            rowNum: '',
            matnr: '',
            batch: '',
            weight: '',
            msgType1: 'success',
            msgType: 'success',
            messageText: '',
@@ -145,6 +171,8 @@
            matFocus: false,
            matData: '',
            removeNum: 0,
            locname:'',
            itemNum:''
         }
      },
      onLoad() {
@@ -226,9 +254,9 @@
                           },
                        },
                     });
                  } else if (res.code == 403) {
                  } else if (result.code == 403) {
                     uni.showToast({
                        title: res.msg,
                        title: result.msg,
                        icon: "none",
                        position: 'top'
                     })
@@ -239,7 +267,7 @@
                     }, 1000);
                  } else {
                     uni.showToast({
                        title: res.msg,
                        title: result.msg,
                        icon: "none",
                        position: 'top'
                     })
@@ -276,13 +304,13 @@
            var add = true ,sameItem = false
            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) {
                        sameItem = true
                     }
                  }
                  // for (var j = 0; j < len; j++) {
                  //    if (mat.batch == this.dataList[j].batch) {
                  //       sameItem = true
                  //    }
                  // }
                  // 相同物料 不同批号  新加列表
                  if (mat.batch != this.dataList[i].batch) {
                  if (mat.batch != this.dataList[i].batch || mat.itemNum != this.dataList[i].itemNum) {
                     this.$forceUpdate() // 强制刷新
                     if (sameItem) {
                        add = false
@@ -306,7 +334,9 @@
         revise(item, i) {
            this.matnr = this.dataList[i].matnr
            this.count = this.dataList[i].anfme
            this.batch = this.dataList[i].batch
            this.batch = this.dataList[i].batch
            this.itemNum = this.dataList[i].itemNum
            this.weight = this.dataList[i].weight
            this.rowNum = i
            this.eject()
         },
@@ -335,6 +365,9 @@
         reviseConfirm() {
            this.dataList[this.rowNum].anfme = this.count
            this.dataList[this.rowNum].batch = this.batch
            this.dataList[this.rowNum].units = this.units
            this.dataList[this.rowNum].memo = this.memo
            this.dataList[this.rowNum].weight = this.weight
            this.matnr = ''
            this.messageText = "修改成功"
            this.messageToggle('success')
@@ -379,6 +412,7 @@
               url: that.baseUrl + '/mobile/comb/auth',
               data: JSON.stringify({
                  barcode: that.barcode,
                  locname: that.locname,
                  combMats: that.dataList
               }),
               method: 'POST',
@@ -391,6 +425,9 @@
                     that.resst();
                     that.messageText = "组托成功"
                     that.messageToggle('success')
                     const innerAudioContext = uni.createInnerAudioContext();
                     innerAudioContext.src = '/static/music/pakinOk.mp3';
                     innerAudioContext.play()
                  } else if (res.code == 403) {
                     that.messageText = res.msg
                     that.messageToggle('error')
@@ -415,6 +452,9 @@
         // 确认重置
         resetConfirm() {
            this.dataList = []
            this.barcode = ''
            this.locname = ''
            this.matnr = ''
            this.messageText = "重置完成"
            this.messageToggle('success')
         },
@@ -426,6 +466,7 @@
         resst() {
            this.dataList = []
            this.barcode = ''
            this.locname = ''
            this.barcodeFocuss()
         },
      }
@@ -434,6 +475,10 @@
<style>
   @import url('../../static/css/wms.css/wms.css');
   .list:first-child {
      margin-top: 300rpx;
   }
   .code {
      width: 100%;
@@ -446,7 +491,7 @@
   .item {
      display: flex;
      align-items: center;
      height: 100rpx;
      height: 70rpx;
      margin-left: 20rpx;
      border-bottom: 1px solid #DCDFE6;
   }
@@ -473,15 +518,15 @@
   }
   .mat-list-title {
      height: 80rpx;
      line-height: 80rpx;
      height: 60rpx;
      line-height: 60rpx;
      width: 100%;
      background-color: white;
      position: fixed;
      margin-top: 200rpx;
      margin-top: 210rpx;
      z-index: 9;
      /* border-top: 1px solid #DCDFE6; */
      text-align: center;
      box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
      box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
   }
</style>