heshaofeng
2025-11-24 65f35360c70f00318c56f6fcb5138bdb0d7e589e
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/outbound/PickingConfirm.vue
@@ -26,11 +26,11 @@
            @keyup.enter.native="onBarcodeScan">
          </el-input>
          <el-button type="success" @click="confirmPicking">确认拣选</el-button>
          <el-button type="warning" @click="openSplitDialog">拆包</el-button>
          <el-button type="info" @click="openRevertSplitDialog">撤销拆包</el-button>
     <!--      <el-button type="warning" @click="openSplitDialog">拆包</el-button>
          <el-button type="info" @click="openRevertSplitDialog">撤销拆包</el-button> -->
      
          <el-button type="primary" @click="openBatchReturnDialog">回库</el-button>
          <el-button type="danger" @click="handleDirectOutbound">直接出库</el-button>
          <!-- <el-button type="danger" @click="handleDirectOutbound">直接出库</el-button>  -->
        </div>
      </el-card>
@@ -42,7 +42,7 @@
        <div class="summary-info">
          <el-tag type="warning">未拣选条数: {{summary.unpickedCount}}</el-tag>
          <el-tag type="danger">未拣选数量: {{summary.unpickedQuantity}}</el-tag>
          <el-tag type="success">已拣选条数: {{summary.pickedCount}}</el-tag>
    <!--       <el-tag type="success">已拣选条数: {{summary.pickedCount}}</el-tag> -->
          <el-tag type="info">托盘状态: {{palletStatus}}</el-tag>
        </div>
      </el-card>
@@ -291,6 +291,7 @@
      </div>
    </div>
  </div>
  <print-view ref="childs" @parentcall="parentcall"></print-view>
</template>
<script>
@@ -298,12 +299,11 @@
import { ref, defineComponent } from "vue";
import { ElMessage } from 'element-plus' 
import { useRoute } from 'vue-router'
import printView from "@/extension/outbound/extend/printView.vue"
export default defineComponent({
  name: 'PickingConfirm',
  components: {
  },
  components: {printView},
  props: {
    orderNo: {
      type: String,
@@ -552,7 +552,7 @@
      }
    },
    // æ‰¹é‡å›žåº“托盘码扫码
    // å›žåº“托盘码扫码
    onBatchReturnPalletScan() {
      if (!this.batchReturnForm.palletCode) return;
      
@@ -564,7 +564,7 @@
      }
    },
    // æ‰¹é‡å›žåº“确认
    // å›žåº“确认
    async handleBatchReturnConfirm() {
      // è¡¨å•验证
      if (this.$refs.batchReturnFormRef) {
@@ -587,25 +587,25 @@
      }
    },
    
    // æäº¤æ‰¹é‡å›žåº“请求
    // æäº¤å›žåº“请求
    async submitBatchReturn() {
      this.batchReturnLoading = true;
      
      try {
        const res = await this.http.post('/api/OutboundPicking/batch-return-to-stock', {
        const res = await this.http.post('/api/OutboundPicking/return-to-stock', {
          orderNo: this.batchReturnForm.orderNo,
          palletCode: this.batchReturnForm.palletCode
        });
        
        if (res.status) {
          this.$message.success('批量回库成功');
          this.$message.success(res.message);
          this.showBatchReturnDialog = false;
          this.loadData();
        } else {
          this.$message.error(res.message || '批量回库失败');
          this.$message.error(res.message || '回库失败');
        }
      } catch (error) {
        this.$message.error('批量回库失败');
        this.$message.error('回库失败');
      } finally {
        this.batchReturnLoading = false;
      }
@@ -844,7 +844,12 @@
          this.$message.success('拣选确认成功');
          this.scanData.barcode = ''; // æ¸…空物料条码
          this.loadData();
          console.log(res.data.splitResults)
          if(res.data && res.data.splitResults.length>0){
            // è°ƒç”¨å­ç»„件打印方法
            this.$refs.childs.open(res.data.splitResults);
            //this.$refs.childs.printSplitLabel(res.data.splitResults);
          }
          // æˆåŠŸåŽç»§ç»­èšç„¦åˆ°ç‰©æ–™æ¡ç è¾“å…¥æ¡†ï¼Œå‡†å¤‡ä¸‹ä¸€ä¸ªæ‰«ç 
          this.$nextTick(() => {
            this.$refs.barcodeInput.focus();
@@ -979,7 +984,7 @@
          barcode: this.returnForm.barcode
        });
        
        if (res.success) {
        if (res.status) {
          this.$message.success('回库成功');
          this.showReturnDialog = false;
          this.resetReturnForm();
@@ -1068,12 +1073,15 @@
        if (res.status) {
          this.$message.success('拆包成功');
          this.showSplitDialog = false;
              this.splitLoading = false;
          this.resetSplitForm();
          this.loadData();
        } else {
               this.splitLoading = false;
          this.$message.error(res.message || '拆包失败');
        }
      } catch (error) {
             this.splitLoading = false;
        this.$message.error('拆包失败');
      }
    },
@@ -1121,12 +1129,15 @@
        if (res.status) {
          this.$message.success('撤销拆包成功');
          this.showRevertSplitDialog = false;
           this.revertSplitLoading = false;
          this.revertSplitForm.originalBarcode = '';
          this.loadData();
        } else {
         this.revertSplitLoading = false;
          this.$message.error(res.message || '撤销拆包失败');
        }
      } catch (error) {
         this.revertSplitLoading = false;
        this.$message.error('撤销拆包失败');
      }
    },