zyh
2026-01-14 870e18d7cd8efc6616bfc84f3e8212ae1fd23966
pages/order/orderPakin3.vue
@@ -75,7 +75,7 @@
      </scroll-view>
      <!-- 底部操作按钮 -->
      <view class="buttom">、
      <view class="buttom">
         <button size="mini" type="primary" @click="combConfirm('warn')">组托</button>
         <button size="mini" @click="reset()">重置</button>
<!--          <button size="mini" type="primary" @click="combConfirmAndFillEmptyPallets('warn')">组托并补空托盘</button> -->
@@ -188,7 +188,6 @@
         }
      },
      onLoad() {
      },
      onShow() {
         this.baseUrl = uni.getStorageSync('baseUrl');
@@ -480,70 +479,6 @@
               this.dataList.unshift(mat)
            }
         },
         //组托并补空托盘
         combAndFillEmptyPallets() {
            uni.vibrateShort();
            let that = this;
            if (that.barcode === '') {
               this.messageText = "请扫描托盘条码"
               this.messageToggle('error')
               return;
            }
            if (that.dataList.length === 0) {
               this.messageText = "请添加商品列表"
               this.messageToggle('error')
               return;
            }
            if (that.floor === '') {
               this.messageText = "请选择仓库"
               this.messageToggle('error')
               return;
            }
            for (var i = 0; i < that.dataList.length; i++) {
               if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
                  this.messageText = that.dataList[i].matnr + '组托数量不能为0'
                  this.messageToggle('error')
                  return;
               }
            }
            uni.request({
               url: that.baseUrl + '/mobile/comb/auth',
               data: JSON.stringify({
                  beBatch : 1,
                  barcodeSize : this.fullPlt,
                  rsta: that.rsta,
                  barcode: that.barcode,
                  combMats: that.dataList
               }),
               method: 'POST',
               header: {
                  'token': uni.getStorageSync('token')
               },
               success(result) {
                  var res = result.data
                  if (res.code === 200) {
                     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')
                     setTimeout(() => {
                        uni.reLaunch({
                           url: '../login/login'
                        });
                     }, 1000);
                  } else {
                     that.messageText = res.msg
                     that.messageToggle('error')
                  }
               }
            });
         },
         // 修改批号
         revise(item, i) {
            this.matnr = this.dataList[i].matnr
@@ -608,8 +543,8 @@
         comb() {
            uni.vibrateShort();
            let that = this;
            if (that.orderNo === '') {
               this.messageText = "请输入订单条码"
            if (that.floor  === '') {
               this.messageText = "请输入入库单"
               this.messageToggle('error')
               return;
            }
@@ -621,7 +556,7 @@
            if (that.dataList.length === 0) {
               this.messageText = "请添加商品列表"
               this.messageToggle('error')
               return;
               return;
            }
            for (var i = 0; i < that.dataList.length; i++) {
               if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
@@ -636,7 +571,7 @@
            uni.request({
               url: that.baseUrl + '/mobile/comb/auth',
               data: JSON.stringify({
                  orderNo: that.orderNo,
                  orderNo: that.floor,
                  barcode: that.barcode,
                  combMats: that.dataList,
                  ck: that.floor,