north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -1003,6 +1003,23 @@
    return
  }
  const reportingWorkTime = titleUploadData.value.reportingWorkTime
    const currentTime = new Date()
    const targetTime = new Date(reportingWorkTime)
    //未来时间
    if (targetTime > currentTime) {
      ElMessage.error(t('reportingWorks.futureTime'))
      return
    }
    // 两个时间的毫秒差
    const diffMs = currentTime - targetTime
    // 转换为天数
    const diffDays = diffMs / (1000 * 60 * 60 * 24)
    if (diffDays > 15) {
      ElMessage.error(t('reportingWorks.longTime'))
      return
    }
  const seenIds = {}
  const uniqueByOrderNum = xGrid.value.getTableData().fullData.filter(item => {
    // 检查item的id是否已经在seenIds中
@@ -1282,27 +1299,6 @@
      //判断早晚班
      titleUploadData.value.classes=t('reportingWorks.early')
      titleUploadData.value.reportingWorkTime = formatCurrentTime()
      //处理编号列
      //定义存放编号数组
      const s01Values = [];
      for (let i = 0; i < res.data.Detail.length; i++) {
        const s01Values = [];
        // 遍历 detailList 数组,提取 S01 值到 s01Values 数组
        if (res.data.Detail[i].other_columns!=null|| res.data.Detail[i].other_columns!=undefined){
          res.data.Detail.forEach(element => {
            const otherColumnsObject = JSON.parse(element.other_columns);
            const s01Value = otherColumnsObject.S01;
            s01Values.push(s01Value || ''); // 如果 S01 值为空,添加空字符串或者其他默认值
          });
          // 将 s01Values 中的值赋给每个订单详情对象的 s01Value 属性
          res.data.Detail.forEach((detail, index) => {
            detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 赋值给 s01Value 属性
          });
        }
      }
      //绑定下方表格