pan
10 天以前 f692f869d5fe2e2aee9d3487dbba83e1821b7f6c
提交
已添加1个文件
已修改5个文件
1157 ■■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/views/outbound/BatchPickingConfirm.vue 626 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/CodeChunks.db-shm 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/SemanticSymbols.db-shm 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs 448 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_PickingRecord.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/InterfaceLog.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/outbound/BatchPickingConfirm.vue
@@ -92,7 +92,7 @@
    </div>
    <!-- æ‹†åŒ…弹窗 -->
    <div v-if="showCustomSplitDialog" class="custom-dialog-overlay">
    <div v-if="showCustomSplitDialog" class="custom-dialog-overlay" style="z-index: 2000;">
      <div class="custom-dialog-wrapper">
        <div class="custom-dialog">
          <div class="custom-dialog-header">
@@ -154,7 +154,7 @@
    </div>
    <!-- æ’¤é”€æ‹†åŒ…弹窗 -->
    <div v-if="showRevertSplitDialog" class="custom-dialog-overlay">
    <div v-if="showRevertSplitDialog" class="custom-dialog-overlay"  style="z-index: 2001;">
      <div class="custom-dialog-wrapper">
        <div class="custom-dialog">
          <div class="custom-dialog-header">
@@ -214,7 +214,7 @@
    </div>
    <!-- æ‹†åŒ…链信息弹窗 -->
<div v-if="showSplitChainDialog" class="custom-dialog-overlay">
<div v-if="showSplitChainDialog" class="custom-dialog-overlay"  style="z-index: 2002;">
  <div class="custom-dialog-wrapper">
    <div class="custom-dialog" style="width: 750px;">
      <div class="custom-dialog-header">
@@ -338,7 +338,7 @@
</div>
    <!-- æ‰¹é‡å›žåº“弹窗 -->
    <div v-if="showBatchReturnDialog" class="custom-dialog-overlay">
    <div v-if="showBatchReturnDialog" class="custom-dialog-overlay"  style="z-index: 2003;">
      <div class="custom-dialog-wrapper">
        <div class="custom-dialog">
          <div class="custom-dialog-header">
@@ -370,7 +370,7 @@
    </div>
    <!-- å–走空箱弹窗 -->
    <div v-if="showEmptyPalletDialog" class="custom-dialog-overlay">
    <div v-if="showEmptyPalletDialog" class="custom-dialog-overlay"  style="z-index: 2004;">
      <div class="custom-dialog-wrapper">
        <div class="custom-dialog">
          <div class="custom-dialog-header">
@@ -405,11 +405,12 @@
  </div>
</template>
<script>
import http from '@/api/http.js'
import { ref, defineComponent } from "vue";
import { defineComponent } from "vue";
import { ElMessage } from 'element-plus' 
import { useRoute } from 'vue-router'
import printView from "@/extension/outbound/extend/printView.vue"
export default defineComponent({
@@ -417,6 +418,7 @@
  components: {printView},
  data() {
    return {
      // ä¿æŒæ‰€æœ‰åŽŸå§‹æ•°æ®ç»“æž„ä¸å˜...
      scanData: {
        orderNo: '',
        palletCode: '',
@@ -432,21 +434,24 @@
      },
      palletStatus: '未知',
      
      // å¼¹çª—状态
      // å¼¹çª—状态 - å…³é”®ä¿®å¤ï¼šåªå…è®¸ä¸€ä¸ªå¼¹çª—打开
      activeDialog: null, // 'split', 'revert', 'batchReturn', 'emptyPallet', 'splitChain'
      showCustomSplitDialog: false,
      showRevertSplitDialog: false,
      showBatchReturnDialog: false,
      showEmptyPalletDialog: false,
      showSplitChainDialog: false, // æ–°å¢žï¼šæ‹†åŒ…链信息弹窗
      showSplitChainDialog: false,
      
        // æ·»åŠ é˜²é‡å¤ç‚¹å‡»æ ‡å¿—
      isOpeningDialog: false,
      // åŠ è½½çŠ¶æ€
      splitLoading: false,
      revertSplitLoading: false,
      batchReturnLoading: false,
      emptypalletOutLoading: false,
      splitChainLoading: false, // æ–°å¢žï¼šæ‹†åŒ…链加载状态
      splitChainLoading: false,
      
      // è¡¨å•数据
      // è¡¨å•数据...
      splitForm: {
        orderNo: '',
        palletCode: '',
@@ -472,14 +477,13 @@
        palletCode: ''
      },
      
      // æ–°å¢žï¼šæ‹†åŒ…链相关数据
      splitChainInfo: {
        originalBarcode: '',
        totalSplitTimes: 0,
        splitChain: []
      },
      
      // éªŒè¯è§„则
      // éªŒè¯è§„则...
      splitFormRules: {
        originalBarcode: [
          { required: true, message: '请输入原条码', trigger: 'blur' }
@@ -505,8 +509,17 @@
      isProcessing: false
    }
  },
  watch: {
    // å…³é”®ä¿®å¤ï¼šç¡®ä¿åŒä¸€æ—¶é—´åªæœ‰ä¸€ä¸ªå¼¹çª—打开
    activeDialog(newVal, oldVal) {
      this.showCustomSplitDialog = newVal === 'split'
      this.showRevertSplitDialog = newVal === 'revert'
      this.showBatchReturnDialog = newVal === 'batchReturn'
      this.showEmptyPalletDialog = newVal === 'emptyPallet'
      this.showSplitChainDialog = newVal === 'splitChain'
    }
  },
  computed: {
    // æ˜¯å¦å¯ä»¥å–消整个拆包链
    canCancelWholeChain() {
      return this.splitChainInfo.splitChain && 
             this.splitChainInfo.splitChain.some(item => !item.isReverted);
@@ -519,9 +532,13 @@
      this.batchReturnForm.orderNo = this.$route.query.orderNo;
      this.emptypalletOutForm.orderNo = this.$route.query.orderNo;
    }
    this.$nextTick(() => {
      this.$refs.palletInput.focus();
    // ä½¿ç”¨ requestAnimationFrame ç¡®ä¿é¡µé¢å®Œå…¨åŠ è½½
    requestAnimationFrame(() => {
      if (this.$refs.palletInput) {
        this.$refs.palletInput.focus();
      }
    });
  },
  methods: {
    goBack(){
@@ -568,16 +585,77 @@
      }
    },
    // æ‹†åŒ…相关方法
    openSplitDialog() {
   openSplitDialog() {
      console.log('开始打开拆包弹窗');
      if (this.isOpeningDialog) {
        console.log('正在打开弹窗,跳过');
        return;
      }
      if (!this.scanData.palletCode) {
        this.$message.warning('请先扫描托盘码');
        return;
      }
      this.showCustomSplitDialog = true;
      this.resetSplitForm();
      this.splitForm.orderNo = this.scanData.orderNo;
      this.splitForm.palletCode = this.scanData.palletCode;
      this.isOpeningDialog = true;
      try {
        // æ–¹æ³•1: ä½¿ç”¨ setTimeout ç¡®ä¿å¼‚步执行
        setTimeout(() => {
          console.log('执行弹窗打开逻辑');
          // å…ˆå…³é—­æ‰€æœ‰å¼¹çª—
          this.closeAllDialogsImmediately();
          // ä½¿ç”¨ requestAnimationFrame ç¡®ä¿åœ¨ä¸‹ä¸€å¸§æ‰“å¼€
          requestAnimationFrame(() => {
            console.log('设置弹窗状态为 true');
            // é‡ç½®è¡¨å•
            this.resetSplitForm();
            this.splitForm.orderNo = this.scanData.orderNo;
            this.splitForm.palletCode = this.scanData.palletCode;
            // å…³é”®ï¼šç›´æŽ¥è®¾ç½®å¼¹çª—状态
            this.showCustomSplitDialog = true;
            console.log('弹窗状态已设置,等待DOM更新');
            // ä½¿ç”¨ nextTick ç¡®ä¿DOM更新完成
            this.$nextTick(() => {
              console.log('DOM更新完成,弹窗应该显示了');
              this.isOpeningDialog = false;
              // å°è¯•聚焦到输入框
              setTimeout(() => {
                const input = this.$refs.splitFormRef?.$el?.querySelector('input');
                if (input) {
                  input.focus();
                  console.log('输入框已聚焦');
                }
              }, 100);
            });
          });
        }, 0);
      } catch (error) {
        console.error('打开拆包弹窗出错:', error);
        this.isOpeningDialog = false;
      }
    },
      closeAllDialogsImmediately() {
      console.log('立即关闭所有弹窗');
      // ç›´æŽ¥è®¾ç½®ä¸º false,不等待任何异步操作
      this.showCustomSplitDialog = false;
      this.showRevertSplitDialog = false;
      this.showBatchReturnDialog = false;
      this.showEmptyPalletDialog = false;
      this.showSplitChainDialog = false;
      // å¼ºåˆ¶DOM更新
      this.$forceUpdate();
    },
    async onSplitBarcodeScan() {
@@ -620,7 +698,7 @@
              });
              if (res.status) {
                this.$message.success('拆包成功');
                this.showCustomSplitDialog = false;
                this.closeAllDialogs();
                await this.loadPalletData();
              } else {
                this.$message.error(res.message || '拆包失败');
@@ -634,28 +712,24 @@
        });
      }
    },
// åœ¨æ‹†åŒ…弹窗中查看拆包链
async viewSplitChainFromSplit(barcode) {
  if (!barcode) {
    this.$message.warning('请先输入条码');
    return;
  }
  // å…ˆå…³é—­æ‹†åŒ…弹窗
  this.closeCustomSplitDialog();
  await this.$nextTick();
  // ç„¶åŽæ‰“开拆包链信息弹窗
  await this.viewSplitChain(barcode);
},
    async viewSplitChainFromSplit(barcode) {
      if (!barcode) {
        this.$message.warning('请先输入条码');
        return;
      }
      this.closeAllDialogs();
      setTimeout(() => {
        this.viewSplitChain(barcode);
      }, 50);
    },
    // æ’¤é”€æ‹†åŒ…
    async onRevertSplitBarcodeScan() {
      if (!this.revertSplitForm.newBarcode) return;
      this.revertSplitForm.newBarcode = this.revertSplitForm.newBarcode.replace(/\n/g, '').trim();
      // æ–°å¢žï¼šæ‰«æåŽè‡ªåŠ¨æ˜¾ç¤ºæ‹†åŒ…é“¾ä¿¡æ¯
      await this.viewSplitChain(this.revertSplitForm.newBarcode);
    },
    async handleRevertSplit() {
@@ -671,7 +745,7 @@
              });
              if (res.status) {
                this.$message.success('撤销拆包成功');
                this.showRevertSplitDialog = false;
                this.closeAllDialogs();
                await this.loadPalletData();
              } else {
                this.$message.error(res.message || '撤销拆包失败');
@@ -685,216 +759,140 @@
        });
      }
    },
// æŸ¥æ‰¾å®Œæ•´æ‹†åŒ…链(从根条码开始)
async findRootChain(currentBarcode) {
  this.splitChainLoading = true;
  try {
    const res = await http.post('/api/OutboundBatchPicking/find-root-split-chain', {
      orderNo: this.scanData.orderNo,
      barcode: currentBarcode
    });
    if (res.status) {
      this.splitChainInfo = res.data;
      this.$message.success('已加载完整拆包链');
    } else {
      this.$message.error(res.message || '查找完整拆包链失败');
    }
  } catch (error) {
    this.$message.error('查找完整拆包链失败');
  } finally {
    this.splitChainLoading = false;
  }
},
    // æ‹†åŒ…链相关方法
   // æŸ¥çœ‹æ‹†åŒ…链信息
async viewSplitChain(barcode) {
  if (!barcode) {
    this.$message.warning('请先输入条码');
    return;
  }
  this.splitChainLoading = true;
  try {
    const res = await http.post('/api/OutboundBatchPicking/split-package-chain-info', {
      orderNo: this.scanData.orderNo,
      barcode: barcode
    });
    if (res.status) {
      this.splitChainInfo = res.data;
      // æ˜¾ç¤ºæç¤ºä¿¡æ¯ï¼Œå‘Šè¯‰ç”¨æˆ·è¿™æ˜¯ä»€ä¹ˆç±»åž‹çš„æ‹†åŒ…链
      let chainType = "当前条码的拆包链";
      if (this.splitChainInfo.chainType === 'root') {
        chainType = "完整拆包链(从原始条码开始)";
      } else if (this.splitChainInfo.chainType === 'branch') {
        chainType = "分支拆包链";
    async findRootChain(currentBarcode) {
      this.splitChainLoading = true;
      try {
        const res = await http.post('/api/OutboundBatchPicking/find-root-split-chain', {
          orderNo: this.scanData.orderNo,
          barcode: currentBarcode
        });
        if (res.status) {
          this.splitChainInfo = res.data;
          this.$message.success('已加载完整拆包链');
        } else {
          this.$message.error(res.message || '查找完整拆包链失败');
        }
      } catch (error) {
        this.$message.error('查找完整拆包链失败');
      } finally {
        this.splitChainLoading = false;
      }
    },
    // æŸ¥çœ‹æ‹†åŒ…链信息
    async viewSplitChain(barcode) {
      if (!barcode) {
        this.$message.warning('请先输入条码');
        return;
      }
      
      this.$message.info(`已加载${chainType},共${this.splitChainInfo.totalSplitTimes}次拆包`);
      this.showSplitChainDialog = true;
    } else {
      this.$message.error(res.message || '获取拆包链信息失败');
    }
  } catch (error) {
    this.$message.error('获取拆包链信息失败');
  } finally {
    this.splitChainLoading = false;
  }
},
      this.splitChainLoading = true;
      try {
        const res = await http.post('/api/OutboundBatchPicking/split-package-chain-info', {
          orderNo: this.scanData.orderNo,
          barcode: barcode
        });
        if (res.status) {
          this.splitChainInfo = res.data;
          this.activeDialog = 'splitChain';
        } else {
          this.$message.error(res.message || '获取拆包链信息失败');
        }
      } catch (error) {
        this.$message.error('获取拆包链信息失败');
      } finally {
        this.splitChainLoading = false;
      }
    },
    // å…³é—­æ‹†åŒ…链信息弹窗
    closeSplitChainDialog() {
     closeSplitChainDialog() {
      this.showSplitChainDialog = false;
    },
    // åœ¨æ’¤é”€æ‹†åŒ…弹窗中查看拆包链
async viewSplitChainFromRevert(barcode) {
  if (!barcode) {
    this.$message.warning('请先输入条码');
    return;
  }
  // å…ˆå…³é—­æ’¤é”€æ‹†åŒ…弹窗
  this.closeRevertSplitDialog();
  await this.$nextTick();
  // ç„¶åŽæ‰“开拆包链信息弹窗
  await this.viewSplitChain(barcode);
},
// å¿«é€Ÿé‡æ–°æ‰“开拆包链弹窗
async quickReopenSplitChainDialog(barcode) {
  if (!barcode) return;
  this.showSplitChainDialog = true;
  this.splitChainLoading = true;
  try {
    const res = await http.post('/api/OutboundBatchPicking/split-package-chain-info', {
      orderNo: this.scanData.orderNo,
      barcode: barcode
    });
    if (res.status) {
      this.splitChainInfo = res.data;
    }
  } catch (error) {
    console.error('重新加载拆包链信息失败:', error);
  } finally {
    this.splitChainLoading = false;
  }
},
    // å–消单个拆包记录
async cancelSingleSplit(newBarcode) {
  // å…ˆè®°å½•当前信息,然后关闭弹窗
  const originalBarcode = this.splitChainInfo.originalBarcode;
  this.closeSplitChainDialog();
  await this.$nextTick();
  try {
    await this.$confirm(
      `确定要取消条码 ${newBarcode} çš„æ‹†åŒ…操作吗?`,
      '取消单个拆包',
      {
        confirmButtonText: '确定取消',
        cancelButtonText: '再想想',
        type: 'warning'
      }
    );
    this.revertSplitLoading = true;
    const res = await http.post('/api/OutboundBatchPicking/cancel-split', {
      orderNo: this.scanData.orderNo,
      palletCode: this.scanData.palletCode,
      newBarcode: newBarcode
    });
    if (res.status) {
      this.$message.success('取消拆包成功');
      await this.loadPalletData();
      // é‡æ–°æ‰“开弹窗显示更新后的状态
      await this.viewSplitChain(originalBarcode);
    } else {
      this.$message.error(res.message || '取消拆包失败');
      await this.viewSplitChain(originalBarcode);
    }
  } catch (error) {
    if (error === 'cancel') {
      // ç”¨æˆ·å–消后重新打开弹窗
      await this.viewSplitChain(originalBarcode);
    } else {
      this.$message.error('取消拆包失败');
      await this.viewSplitChain(originalBarcode);
    }
  } finally {
    this.revertSplitLoading = false;
  }
},
// å–消整个拆包链
async cancelWholeSplitChain() {
  // å…ˆè®°å½•当前拆包链信息,然后关闭弹窗
  const originalBarcode = this.splitChainInfo.originalBarcode;
  this.closeSplitChainDialog();
  // ç»™ä¸€ç‚¹æ—¶é—´è®©å¼¹çª—完全关闭
  await this.$nextTick();
  try {
    // çŽ°åœ¨æ˜¾ç¤ºç¡®è®¤å¯¹è¯æ¡†ï¼Œç¡®ä¿å®ƒåœ¨æœ€å‰é¢
    await this.$confirm(
      `确定要取消整个拆包链吗?\n这将取消从条码 ${originalBarcode} å¼€å§‹çš„æ‰€æœ‰æ‹†åŒ…操作。`,
      '取消拆包链确认',
      {
        confirmButtonText: '确定取消',
        cancelButtonText: '再想想',
        type: 'warning',
        center: true,
        closeOnClickModal: false
    // å–消单个拆包记录
    async cancelSingleSplit(newBarcode) {
      const originalBarcode = this.splitChainInfo.originalBarcode;
      try {
        await this.$confirm(
          `确定要取消条码 ${newBarcode} çš„æ‹†åŒ…操作吗?`,
          '取消单个拆包',
          {
            confirmButtonText: '确定取消',
            cancelButtonText: '再想想',
            type: 'warning'
          }
        );
        this.revertSplitLoading = true;
        const res = await http.post('/api/OutboundBatchPicking/cancel-split', {
          orderNo: this.scanData.orderNo,
          palletCode: this.scanData.palletCode,
          newBarcode: newBarcode
        });
        if (res.status) {
          this.$message.success('取消拆包成功');
          await this.loadPalletData();
          this.closeAllDialogs();
          setTimeout(() => {
            this.viewSplitChain(originalBarcode);
          }, 50);
        } else {
          this.$message.error(res.message || '取消拆包失败');
        }
      } catch (error) {
        if (error !== 'cancel') {
          this.$message.error('取消拆包失败');
        }
      } finally {
        this.revertSplitLoading = false;
      }
    );
    // ç”¨æˆ·ç¡®è®¤åŽæ‰§è¡Œå–消操作
    this.revertSplitLoading = true;
    const res = await http.post('/api/OutboundBatchPicking/cancel-split-chain', {
      orderNo: this.scanData.orderNo,
      palletCode: this.scanData.palletCode,
      startBarcode: originalBarcode
    });
    console.log('取消拆包链响应:', res);
    if (res.status) {
      this.$message.success('取消拆包链成功');
      await this.loadPalletData();
      // å¯é€‰ï¼šé‡æ–°æ‰“开拆包链信息弹窗显示更新后的状态
      // await this.viewSplitChain(originalBarcode);
    } else {
      this.$message.error(res.message || '取消拆包链失败');
      // å¤±è´¥åŽé‡æ–°æ‰“开弹窗
      await this.viewSplitChain(originalBarcode);
    }
  } catch (error) {
    // ç”¨æˆ·å–消操作
    if (error === 'cancel') {
      console.log('用户取消了拆包链操作');
      // ç”¨æˆ·å–消后重新打开弹窗
      await this.viewSplitChain(originalBarcode);
    } else {
      console.error('取消拆包链错误:', error);
      this.$message.error('取消拆包链失败: ' + error.message);
      // å‡ºé”™åŽé‡æ–°æ‰“开弹窗
      await this.viewSplitChain(originalBarcode);
    }
  } finally {
    this.revertSplitLoading = false;
  }
},
    },
    // å–消整个拆包链
    async cancelWholeSplitChain() {
      try {
        await this.$confirm(
          `确定要取消整个拆包链吗?\n这将取消从条码 ${this.splitChainInfo.originalBarcode} å¼€å§‹çš„æ‰€æœ‰æ‹†åŒ…操作。`,
          '取消拆包链确认',
          {
            confirmButtonText: '确定取消',
            cancelButtonText: '再想想',
            type: 'warning',
            center: true,
            closeOnClickModal: false
          }
        );
        this.revertSplitLoading = true;
        const res = await http.post('/api/OutboundBatchPicking/cancel-split-chain', {
          orderNo: this.scanData.orderNo,
          palletCode: this.scanData.palletCode,
          startBarcode: this.splitChainInfo.originalBarcode
        });
        if (res.status) {
          this.$message.success('取消拆包链成功');
          this.closeAllDialogs();
          await this.loadPalletData();
        } else {
          this.$message.error(res.message || '取消拆包链失败');
        }
      } catch (error) {
        if (error !== 'cancel') {
          this.$message.error('取消拆包链失败: ' + error.message);
        }
      } finally {
        this.revertSplitLoading = false;
      }
    },
    // æ£€æŸ¥æ¡ç æ˜¯å¦å·²è¢«åˆ†æ‹£
    hasPicked(barcode) {
@@ -908,17 +906,43 @@
      return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}`;
    },
    // å…³é”®ä¿®å¤ï¼šæ–°å¢žå…³é—­æ‰€æœ‰å¼¹çª—的方法
    closeAllDialogs() {
      this.activeDialog = null;
      // ç¡®ä¿æ‰€æœ‰å¼¹çª—状态都被重置
      this.showCustomSplitDialog = false;
      this.showRevertSplitDialog = false;
      this.showBatchReturnDialog = false;
      this.showEmptyPalletDialog = false;
      this.showSplitChainDialog = false;
    },
    // å›žåº“相关方法
    openBatchReturnDialog() {
      if (!this.scanData.palletCode) {
        this.$message.warning('请先扫描托盘码');
        return;
      }
      this.showBatchReturnDialog = true;
      this.batchReturnForm.orderNo = this.scanData.orderNo;
      this.batchReturnForm.palletCode = this.scanData.palletCode;
      this.batchReturnForm.unpickedCount = this.summary.unpickedCount;
      this.batchReturnForm.unpickedQuantity = this.summary.unpickedQuantity;
      if (this.isOpeningDialog) return;
      this.isOpeningDialog = true;
      setTimeout(() => {
        this.closeAllDialogsImmediately();
        requestAnimationFrame(() => {
          this.showBatchReturnDialog = true;
          this.batchReturnForm.orderNo = this.scanData.orderNo;
          this.batchReturnForm.palletCode = this.scanData.palletCode;
          this.batchReturnForm.unpickedCount = this.summary.unpickedCount;
          this.batchReturnForm.unpickedQuantity = this.summary.unpickedQuantity;
          this.$nextTick(() => {
            this.isOpeningDialog = false;
          });
        });
      }, 0);
    },
    async handleBatchReturnConfirm() {
@@ -930,7 +954,7 @@
        });
        if (res.status) {
          this.$message.success('回库成功');
          this.showBatchReturnDialog = false;
          this.closeAllDialogs();
          await this.loadPalletData();
        } else {
          this.$message.error(res.message || '回库失败');
@@ -943,10 +967,24 @@
    },
    // å–空箱方法
    handleEmptyPallet() {
      this.showEmptyPalletDialog = true;
      this.emptypalletOutForm.orderNo = this.scanData.orderNo;
      this.emptypalletOutForm.palletCode = '';
handleEmptyPallet() {
      if (this.isOpeningDialog) return;
      this.isOpeningDialog = true;
      setTimeout(() => {
        this.closeAllDialogsImmediately();
        requestAnimationFrame(() => {
          this.showEmptyPalletDialog = true;
          this.emptypalletOutForm.orderNo = this.scanData.orderNo;
          this.emptypalletOutForm.palletCode = '';
          this.$nextTick(() => {
            this.isOpeningDialog = false;
          });
        });
      }, 0);
    },
    async handleEmptyPalletConfirm() {
@@ -958,7 +996,7 @@
        });
        if (res.status) {
          this.$message.success('取走空箱成功');
          this.showEmptyPalletDialog = false;
          this.closeAllDialogs();
          await this.loadPalletData();
        } else {
          this.$message.error(res.message || '取走空箱失败');
@@ -974,9 +1012,13 @@
    async loadPalletData() {
      if (!this.scanData.orderNo || !this.scanData.palletCode) return;
      
      await this.loadUnpickedList();
      await this.loadPickedList();
      await this.loadPalletStatus();
      try {
        await this.loadUnpickedList();
        await this.loadPickedList();
        await this.loadPalletStatus();
      } catch (error) {
        console.error('加载托盘数据失败:', error);
      }
    },
    async loadUnpickedList() {
@@ -986,7 +1028,6 @@
          palletCode: this.scanData.palletCode
        });
        if (res.status) {
          //this.unpickedList = res.data || [];
          this.unpickedList = (res.data || []).filter(item => item.canPick === true);
          this.summary.unpickedCount = this.unpickedList.length;
          this.summary.unpickedQuantity = this.unpickedList.reduce((sum, item) => sum + (item.remainQuantity || 0), 0);
@@ -1003,16 +1044,10 @@
          palletCode: this.scanData.palletCode
        });
        if (res.status) {
          this.pickedList = res.data || [];
          this.pickedList = res.data.map(item => {
  // æ–¹å¼1:保留原barcode字段,新增currentBarcode
  return {
    ...item,
    currentBarcode: item.barcode
  };
});
          this.pickedList = res.data.map(item => ({
            ...item,
            currentBarcode: item.barcode
          }));
          this.summary.pickedCount = this.pickedList.length;
        }
      } catch (error) {
@@ -1116,17 +1151,31 @@
      this.resetSplitForm();
    },
    openRevertSplitDialog() {
      this.showRevertSplitDialog = true;
      this.revertSplitForm.newBarcode = '';
openRevertSplitDialog() {
      if (this.isOpeningDialog) return;
      this.isOpeningDialog = true;
      setTimeout(() => {
        this.closeAllDialogsImmediately();
        requestAnimationFrame(() => {
          this.showRevertSplitDialog = true;
          this.revertSplitForm.newBarcode = '';
          this.$nextTick(() => {
            this.isOpeningDialog = false;
          });
        });
      }, 0);
    },
    closeRevertSplitDialog() {
  closeRevertSplitDialog() {
      this.showRevertSplitDialog = false;
      this.revertSplitForm.newBarcode = '';
    },
    closeBatchReturnDialog() {
 closeBatchReturnDialog() {
      this.showBatchReturnDialog = false;
    },
@@ -1135,7 +1184,7 @@
      this.emptypalletOutForm.palletCode = this.emptypalletOutForm.palletCode.replace(/\n/g, '').trim();
    },
    closeEmptyPalletDialog() {
     closeEmptyPalletDialog() {
      this.showEmptyPalletDialog = false;
      this.emptypalletOutForm.palletCode = '';
    },
@@ -1182,19 +1231,7 @@
  color: #909399;
}
/* è‡ªå®šä¹‰å¼¹çª—样式 */
:deep(.el-message-box) {
  z-index: 10010 !important;
}
:deep(.el-overlay) {
  z-index: 10009 !important;
}
:deep(.el-message) {
  z-index: 10011 !important;
}
/* è‡ªå®šä¹‰å¼¹çª—样式 - å…³é”®ä¿®å¤ */
.custom-dialog-overlay {
  position: fixed;
  top: 0;
@@ -1205,12 +1242,12 @@
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000; /* ä¿æŒä¸€ä¸ªåˆç†çš„ z-index */
  z-index: 9999; /* æé«˜z-index确保在最上层 */
}
.custom-dialog-wrapper {
  position: relative;
  z-index: 2001;
  z-index: 10000;
}
.custom-dialog {
@@ -1276,14 +1313,7 @@
    flex-direction: column;
    align-items: stretch;
  }
  /* ç¡®ä¿ç¡®è®¤å¯¹è¯æ¡†åœ¨æœ€å‰é¢ */
.el-message-box__wrapper {
  z-index: 10001 !important;
}
.el-message {
  z-index: 10002 !important;
}
  .scanner-form .el-input {
    width: 100%;
  }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/CodeChunks.db-shm
Binary files differ
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/SemanticSymbols.db-shm
Binary files differ
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs
@@ -430,218 +430,46 @@
                    return WebResponseContent.Instance.Error("没有需要回传的分拣记录");
                var documentNo = UniqueValueGenerator.Generate();
                var feedModel = new FeedbackOutboundRequestModel
                var groups = pickingRecords.GroupBy(x => x.FeedBackMesDocumentNo).ToList();
                foreach (var group in groups)
                {
                    reqCode = Guid.NewGuid().ToString(),
                    reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                    business_type = outboundOrder.BusinessType,
                    factoryArea = outboundOrder.FactoryArea,
                    operationType = 1,
                    Operator = outboundOrder.Operator != "" ? outboundOrder.Operator : App.User.UserName,
                    orderNo = outboundOrder.UpperOrderNo,
                    documentsNO = documentNo,
                    status = outboundOrder.OrderStatus,
                    details = new List<FeedbackOutboundDetailsModel>()
                };
                var detailIds = new List<int>();
                // å¡«å……明细和条码信息
                foreach (var detail in orderDetails)
                {
                    // æŸ¥è¯¢è¯¥æ˜Žç»†å¯¹åº”的锁定条码记录
                    var detailPicks = pickingRecords.Where(x => x.OrderNo == orderNo
                                   && detail.Id == x.OrderDetailId).ToList();
                    if (!detailPicks.Any())
                    List<Dt_PickingRecord> records = group.ToList(); // è¯¥åˆ†ç»„下的所有记录
                    if (string.IsNullOrEmpty(group.Key))
                    {
                        continue;
                    }
                    var detailModel = new FeedbackOutboundDetailsModel
                    {
                        materialCode = detail.MaterielCode,
                        lineNo = detail.lineNo,
                        warehouseCode = detail.WarehouseCode,
                        qty = detail.BarcodeQty,
                        currentDeliveryQty = 0,
                        unit = detail.BarcodeUnit,
                        barcodes = new List<WIDESEA_DTO.Outbound.BarcodesModel>()
                    };
                    // å¡«å……条码信息(含单位转换)
                    foreach (var item in detailPicks)
                    {
                        if (item.PickQuantity <= 0)
                        var emptydocumentNo = UniqueValueGenerator.Generate();
                        records.ForEach(x => { x.FeedBackMesDocumentNo = emptydocumentNo; });
                        var result=   await _pickingRecoreRepository.Db.Insertable(records).ExecuteCommandAsync();
                        if (result > 0)
                        {
                            continue;
                        }
                        var barModel = new WIDESEA_DTO.Outbound.BarcodesModel
                        {
                            barcode = item.Barcode,
                            supplyCode = item.SupplyCode,
                            batchNo = item.BatchNo,
                            unit = item.BarcodeUnit,
                            qty = item.PickQuantity
                        };
                        // å•位不一致时转换
                        if (detail.BarcodeUnit != detail.Unit)
                        {
                            var convertResult = await _materialUnitService.ConvertAsync(
                                item.MaterielCode, item.PickQuantity, detail.Unit, detail.BarcodeUnit);
                            barModel.unit = convertResult.Unit;
                            barModel.qty = convertResult.Quantity;
                        }
                        else
                        {
                            barModel.qty = item.PickQuantity;
                        }
                        detailModel.currentDeliveryQty += barModel.qty;
                        detailModel.barcodes.Add(barModel);
                    }
                    detailIds.Add(detail.Id);
                    feedModel.details.Add(detailModel);
                }
                feedModel.details = feedModel.details.GroupBy(item => new { item.materialCode, item.lineNo, item.warehouseCode, item.unit, item.qty }).Select(group => new FeedbackOutboundDetailsModel
                {
                    materialCode = group.Key.materialCode,
                    lineNo = group.Key.lineNo,
                    warehouseCode = group.Key.warehouseCode,
                    qty = group.Key.qty,
                    currentDeliveryQty = group.Sum(x => x.currentDeliveryQty),
                    unit = group.Key.unit,
                    barcodes = group.SelectMany(x => x.barcodes.GroupBy(o => new { o.barcode, o.supplyCode, o.batchNo, o.unit }).Select(row => new WIDESEA_DTO.Outbound.BarcodesModel
                    {
                        barcode = row.Key.barcode,
                        supplyCode = row.Key.supplyCode,
                        batchNo = row.Key.batchNo,
                        unit = row.Key.unit,
                        qty = row.Sum(y => y.qty)
                    })).ToList()
                }).ToList();
                var allCompleted = true;
                // ç­›é€‰å¾…回传的明细(ReturnToMESStatus=0)
                var pendingDetails = orderDetails.Where(x => x.ReturnToMESStatus == 0).ToList();
                foreach (var detail in pendingDetails)
                {
                    if (detail.OverOutQuantity < detail.NeedOutQuantity)
                    {
                        allCompleted = false;
                    }
                }
                // å­˜åœ¨å›žä¼ å¤±è´¥çš„æ˜Žç»†ï¼ˆReturnToMESStatus=2),标记未完成
                if (orderDetails.Any(x => x.ReturnToMESStatus == 2))
                {
                    allCompleted = false;
                }
                //  æ›´æ–°è®¢å•状态
                int newStatus = allCompleted ? (int)OutOrderStatusEnum.出库完成 : (int)OutOrderStatusEnum.出库中;
                if (outboundOrder.OrderStatus != newStatus)
                {
                    int updateCount = await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>()
                        .SetColumns(x => x.OrderStatus == newStatus)
                        .Where(x => x.OrderNo == orderNo)
                        .ExecuteCommandAsync();
                    if (updateCount <= 0)
                    {
                        _logger.LogWarning($"更新出库单状态失败 - OrderNo: {orderNo}, ç›®æ ‡çŠ¶æ€: {newStatus}");
                    }
                }
                // è°ƒç”¨MES回传接口
                var mesResult = await FeedbackOutbound(feedModel);
                if (mesResult == null || mesResult.code != 200)
                {
                    // æ›´æ–°æ˜Žç»†ä¸ºå›žä¼ å¤±è´¥ï¼ˆReturnToMESStatus=2)
                    await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
                        .SetColumns(it => new Dt_OutboundOrderDetail
                        {
                            ReturnToMESStatus = 2,
                            documentsNO = documentNo,
                        })
                        .Where(x => detailIds.Contains(x.Id))
                        .ExecuteCommandAsync();
                    return WebResponseContent.Instance.Error($"回传MES失败");
                }
                foreach (var record in pickingRecords.Where(x => detailIds.Contains(x.OrderDetailId)).ToList())
                {
                    record.ReturnToMESStatus = 1;
                }
                var updates = pickingRecords.Where(x => detailIds.Contains(x.OrderDetailId)).ToList();
                updates.ForEach(x =>
                {
                    x.ReturnToMESStatus = 1;
                });
                await _pickingRecoreRepository.Db.Updateable(updates).ExecuteCommandAsync();
                if (allCompleted)
                {
                    //MES回传成功:更新明细为回传成功状态
                    await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
                        .SetColumns(it => new Dt_OutboundOrderDetail
                        {
                            ReturnToMESStatus = 1,
                            documentsNO = documentNo,
                        })
                        .Where(x => detailIds.Contains(x.Id))
                        .ExecuteCommandAsync();
                }
                // æ ¡éªŒæ˜¯å¦æ‰€æœ‰æ˜Žç»†éƒ½å®Œæˆï¼Œæ›´æ–°è®¢å•最终状态
                if (allCompleted && newStatus == (int)OutOrderStatusEnum.出库完成)
                {
                    await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>()
                        .SetColumns(x => new Dt_OutboundOrder
                        {
                            ReturnToMESStatus = 1,
                            OrderStatus = newStatus
                        })
                        .Where(x => x.OrderNo == orderNo)
                        .ExecuteCommandAsync();
                }
                else
                {
                    // äºŒæ¬¡æ ¡éªŒæ˜¯å¦æ‰€æœ‰æœªå›žä¼ æ˜Žç»†éƒ½å·²å®Œæˆ
                    var dbOrderDetails = await _outboundOrderDetailService.Db.Queryable<Dt_OutboundOrderDetail>()
                        .LeftJoin<Dt_OutboundOrder>((o, item) => o.OrderId == item.Id)
                        .Where((o, item) => item.OrderNo == orderNo && item.ReturnToMESStatus != 1)
                        .Select((o, item) => o)
                        .ToListAsync();
                    var secAllCompleted = true;
                    foreach (var detail in dbOrderDetails.Where(x => x.ReturnToMESStatus == 0).ToList())
                    {
                        if (detail.OverOutQuantity < detail.NeedOutQuantity)
                        {
                            secAllCompleted = false;
                            break;
                        }
                    }
                    if (secAllCompleted)
                    {
                        await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>()
                            .SetColumns(it => new Dt_OutboundOrder
                            (bool _flowControl, WebResponseContent _value) = await FeedBackBatchToMes(outboundOrder, orderNo, orderDetails, pickingRecords, emptydocumentNo);
                            if (!_flowControl)
                            {
                                ReturnToMESStatus = 1,
                                OrderStatus = OutOrderStatusEnum.出库完成.ObjToInt(),
                            })
                            .Where(x => x.OrderNo == orderNo)
                            .ExecuteCommandAsync();
                                return _value;
                            }
                        }
                    }
                    else
                    {
                        (bool _flowControl, WebResponseContent _value) = await FeedBackBatchToMes(outboundOrder, orderNo, orderDetails, pickingRecords, group.Key);
                        if (!_flowControl)
                        {
                            return _value;
                        }
                    }
                }
                //var documentNo = UniqueValueGenerator.Generate();
                //(bool flowControl, WebResponseContent value) = await FeedBackBatchToMes(outboundOrder, orderNo, orderDetails, pickingRecords, documentNo);
                //if (!flowControl)
                //{
                //    return value;
                //}
                // å›žä¼ æˆåŠŸçš„æœ€ç»ˆè¿”å›ž
                response = WebResponseContent.Instance.OK($"回传MES成功,单据号:{documentNo}");
                response = WebResponseContent.Instance.OK($"回传MES成功,单据号:{orderNo}");
            }
            catch (Exception ex)
            {
@@ -656,6 +484,218 @@
            return response;
        }
        private async Task<(bool flowControl, WebResponseContent value)> FeedBackBatchToMes(Dt_OutboundOrder outboundOrder, string orderNo, List<Dt_OutboundOrderDetail> orderDetails, List<Dt_PickingRecord> pickingRecords, string documentNo)
        {
            var feedModel = new FeedbackOutboundRequestModel
            {
                reqCode = Guid.NewGuid().ToString(),
                reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                business_type = outboundOrder.BusinessType,
                factoryArea = outboundOrder.FactoryArea,
                operationType = 1,
                Operator = outboundOrder.Operator != "" ? outboundOrder.Operator : App.User.UserName,
                orderNo = outboundOrder.UpperOrderNo,
                documentsNO = documentNo,
                status = outboundOrder.OrderStatus,
                details = new List<FeedbackOutboundDetailsModel>()
            };
            var detailIds = new List<int>();
            // å¡«å……明细和条码信息
            foreach (var detail in orderDetails)
            {
                // æŸ¥è¯¢è¯¥æ˜Žç»†å¯¹åº”的锁定条码记录
                var detailPicks = pickingRecords.Where(x => x.OrderNo == orderNo
                               && detail.Id == x.OrderDetailId).ToList();
                if (!detailPicks.Any())
                {
                    continue;
                }
                var detailModel = new FeedbackOutboundDetailsModel
                {
                    materialCode = detail.MaterielCode,
                    lineNo = detail.lineNo,
                    warehouseCode = detail.WarehouseCode,
                    qty = detail.BarcodeQty,
                    currentDeliveryQty = 0,
                    unit = detail.BarcodeUnit,
                    barcodes = new List<WIDESEA_DTO.Outbound.BarcodesModel>()
                };
                // å¡«å……条码信息(含单位转换)
                foreach (var item in detailPicks)
                {
                    if (item.PickQuantity <= 0)
                    {
                        continue;
                    }
                    var barModel = new WIDESEA_DTO.Outbound.BarcodesModel
                    {
                        barcode = item.Barcode,
                        supplyCode = item.SupplyCode,
                        batchNo = item.BatchNo,
                        unit = item.BarcodeUnit,
                        qty = item.PickQuantity
                    };
                    // å•位不一致时转换
                    if (detail.BarcodeUnit != detail.Unit)
                    {
                        var convertResult = await _materialUnitService.ConvertAsync(
                            item.MaterielCode, item.PickQuantity, detail.Unit, detail.BarcodeUnit);
                        barModel.unit = convertResult.Unit;
                        barModel.qty = convertResult.Quantity;
                    }
                    else
                    {
                        barModel.qty = item.PickQuantity;
                    }
                    detailModel.currentDeliveryQty += barModel.qty;
                    detailModel.barcodes.Add(barModel);
                }
                detailIds.Add(detail.Id);
                feedModel.details.Add(detailModel);
            }
            feedModel.details = feedModel.details.GroupBy(item => new { item.materialCode, item.lineNo, item.warehouseCode, item.unit, item.qty }).Select(group => new FeedbackOutboundDetailsModel
            {
                materialCode = group.Key.materialCode,
                lineNo = group.Key.lineNo,
                warehouseCode = group.Key.warehouseCode,
                qty = group.Key.qty,
                currentDeliveryQty = group.Sum(x => x.currentDeliveryQty),
                unit = group.Key.unit,
                barcodes = group.SelectMany(x => x.barcodes.GroupBy(o => new { o.barcode, o.supplyCode, o.batchNo, o.unit }).Select(row => new WIDESEA_DTO.Outbound.BarcodesModel
                {
                    barcode = row.Key.barcode,
                    supplyCode = row.Key.supplyCode,
                    batchNo = row.Key.batchNo,
                    unit = row.Key.unit,
                    qty = row.Sum(y => y.qty)
                })).ToList()
            }).ToList();
            var allCompleted = true;
            // ç­›é€‰å¾…回传的明细(ReturnToMESStatus=0)
            var pendingDetails = orderDetails.Where(x => x.ReturnToMESStatus == 0).ToList();
            foreach (var detail in pendingDetails)
            {
                if (detail.OverOutQuantity < detail.NeedOutQuantity)
                {
                    allCompleted = false;
                }
            }
            // å­˜åœ¨å›žä¼ å¤±è´¥çš„æ˜Žç»†ï¼ˆReturnToMESStatus=2),标记未完成
            if (orderDetails.Any(x => x.ReturnToMESStatus == 2))
            {
                allCompleted = false;
            }
            //  æ›´æ–°è®¢å•状态
            int newStatus = allCompleted ? (int)OutOrderStatusEnum.出库完成 : (int)OutOrderStatusEnum.出库中;
            if (outboundOrder.OrderStatus != newStatus)
            {
                int updateCount = await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>()
                    .SetColumns(x => x.OrderStatus == newStatus)
                    .Where(x => x.OrderNo == orderNo)
                    .ExecuteCommandAsync();
                if (updateCount <= 0)
                {
                    _logger.LogWarning($"更新出库单状态失败 - OrderNo: {orderNo}, ç›®æ ‡çŠ¶æ€: {newStatus}");
                }
            }
            // è°ƒç”¨MES回传接口
            var mesResult = await FeedbackOutbound(feedModel);
            if (mesResult == null || mesResult.code != 200)
            {
                // æ›´æ–°æ˜Žç»†ä¸ºå›žä¼ å¤±è´¥ï¼ˆReturnToMESStatus=2)
                await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
                    .SetColumns(it => new Dt_OutboundOrderDetail
                    {
                        ReturnToMESStatus = 2,
                        documentsNO = documentNo,
                    })
                    .Where(x => detailIds.Contains(x.Id))
                    .ExecuteCommandAsync();
                return (flowControl: false, value: WebResponseContent.Instance.Error($"回传MES失败"));
            }
            foreach (var record in pickingRecords.Where(x => detailIds.Contains(x.OrderDetailId)).ToList())
            {
                record.ReturnToMESStatus = 1;
            }
            var updates = pickingRecords.Where(x => detailIds.Contains(x.OrderDetailId)).ToList();
            updates.ForEach(x =>
            {
                x.ReturnToMESStatus = 1;
            });
            await _pickingRecoreRepository.Db.Updateable(updates).ExecuteCommandAsync();
            if (allCompleted)
            {
                //MES回传成功:更新明细为回传成功状态
                await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
                    .SetColumns(it => new Dt_OutboundOrderDetail
                    {
                        ReturnToMESStatus = 1,
                        documentsNO = documentNo,
                    })
                    .Where(x => detailIds.Contains(x.Id))
                    .ExecuteCommandAsync();
            }
            // æ ¡éªŒæ˜¯å¦æ‰€æœ‰æ˜Žç»†éƒ½å®Œæˆï¼Œæ›´æ–°è®¢å•最终状态
            if (allCompleted && newStatus == (int)OutOrderStatusEnum.出库完成)
            {
                await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>()
                    .SetColumns(x => new Dt_OutboundOrder
                    {
                        ReturnToMESStatus = 1,
                        OrderStatus = newStatus
                    })
                    .Where(x => x.OrderNo == orderNo)
                    .ExecuteCommandAsync();
            }
            else
            {
                // äºŒæ¬¡æ ¡éªŒæ˜¯å¦æ‰€æœ‰æœªå›žä¼ æ˜Žç»†éƒ½å·²å®Œæˆ
                var dbOrderDetails = await _outboundOrderDetailService.Db.Queryable<Dt_OutboundOrderDetail>()
                    .LeftJoin<Dt_OutboundOrder>((o, item) => o.OrderId == item.Id)
                    .Where((o, item) => item.OrderNo == orderNo && item.ReturnToMESStatus != 1)
                    .Select((o, item) => o)
                    .ToListAsync();
                var secAllCompleted = true;
                foreach (var detail in dbOrderDetails.Where(x => x.ReturnToMESStatus == 0).ToList())
                {
                    if (detail.OverOutQuantity < detail.NeedOutQuantity)
                    {
                        secAllCompleted = false;
                        break;
                    }
                }
                if (secAllCompleted)
                {
                    await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>()
                        .SetColumns(it => new Dt_OutboundOrder
                        {
                            ReturnToMESStatus = 1,
                            OrderStatus = OutOrderStatusEnum.出库完成.ObjToInt(),
                        })
                        .Where(x => x.OrderNo == orderNo)
                        .ExecuteCommandAsync();
                }
            }
            return (flowControl: true, value: null);
        }
        private async Task<WebResponseContent> HandleOutboundOrderToMESCompletion(Dt_OutboundOrder outboundOrder, string orderNo)
        {
            // å‰ç½®å‚数校验:空值直接返回错误
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_PickingRecord.cs
@@ -8,11 +8,11 @@
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// æ‹£é€‰è®°å½•表
    /// </summary>
    [SugarTable(nameof(Dt_PickingRecord), "拣选记录表")]
    public class Dt_PickingRecord : BaseEntity
@@ -20,7 +20,7 @@
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        public int TaskNo { get; set; }
        public int TaskNo { get; set; }
        public string OrderNo { get; set; }
        public int OrderDetailId { get; set; }
@@ -93,6 +93,8 @@
        public decimal BarcodeMoveQty { get; set; }
        public int ReturnToMESStatus { get; set; }
        public string FeedBackMesDocumentNo { get; set; }
    }
@@ -114,7 +116,7 @@
        /// å›žåº“数量
        /// </summary>
        public decimal ReturnQty { get; set; }
        public DateTime ReturnTime { get; set; }
        /// <summary>
        /// 0-待回库 1-已回库
@@ -126,7 +128,7 @@
    /// æ‹†åŒ…记录表
    /// </summary>
    [SugarTable("Dt_SplitPackageRecord")]
    public class Dt_SplitPackageRecord: BaseEntity
    public class Dt_SplitPackageRecord : BaseEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
@@ -140,8 +142,8 @@
        public int OutStockLockInfoId { get; set; } // å…³è”的出库锁定信息
        public string OriginalBarcode { get; set; } // åŽŸæ¡ç 
        public string NewBarcode { get; set; } // æ–°æ¡ç 
        public string FactoryArea { get; set; }
        public string FactoryArea { get; set; }
        /// <summary>
        /// æ‹†åˆ†æ•°é‡ï¼ˆæ–°æ¡ç æ•°é‡ï¼‰
        /// </summary>
@@ -162,7 +164,7 @@
        [SugarColumn(IsNullable = true)]
        public decimal? OriginalStockQuantity { get; set; }
       public decimal StockBeforeSplit { get; set; }
        public decimal StockBeforeSplit { get; set; }
        public decimal AssignBeforeSplit { get; set; }
    }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/InterfaceLog.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models.Outbound
{
    /// <summary>
    /// æŽ¥å£æ—¥å¿—记录表
    /// </summary>
    [SugarTable("Dt_InterfaceLog")]
    public class Dt_InterfaceLog : BaseEntity
    {
        /// <summary>
        /// ä¸»é”®ID(自增)
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
        public long Id { get; set; }
        /// <summary>
        /// è®¢å•号
        /// </summary>
        [SugarColumn(ColumnName = "OrderNo", Length = 100, IsNullable = false)]
        [Required(ErrorMessage = "订单号不能为空")]
        public string OrderNo { get; set; }
        /// <summary>
        /// æ–‡æ¡£å·
        /// </summary>
        [SugarColumn(ColumnName = "DocumentNo", Length = 100, IsNullable = true)]
        public string? DocumentNo { get; set; }
        /// <summary>
        /// è®¢å•类型
        /// </summary>
        [SugarColumn(ColumnName = "OrderType", Length = 50, IsNullable = true)]
        [Required(ErrorMessage = "订单类型不能为空")]
        public string OrderType { get; set; }
        /// <summary>
        /// JSON内容
        /// </summary>
        [SugarColumn(ColumnName = "Content", IsNullable = true, ColumnDataType = "nvarchar(max)")]
        [Required(ErrorMessage = "内容不能为空")]
        public string Content { get; set; }
        public int ReturnToMESStatus { get; set; }
        /// <summary>
        /// è½¯åˆ é™¤æ ‡å¿—
        /// </summary>
        [SugarColumn(ColumnName = "IsDeleted", IsNullable = false)]
        public bool IsDeleted { get; set; } = false;
    }
}