gongchunyi
8 天以前 990257e90f992cccbfbdd5e3bebd27b0ae5402a8
src/views/collaborativeApproval/approvalProcess/index.vue
@@ -124,8 +124,8 @@
    </el-card>
    <!-- 弹窗组件 -->
    <info-form-dia ref="infoFormDia" @close="handleQuery" :approveType="currentApproveType"></info-form-dia>
    <approval-dia ref="approvalDia" @close="handleQuery" :approveType="currentApproveType"></approval-dia>
    <info-form-dia ref="infoFormDia" @close="handleDialogClose" :approveType="currentApproveType"></info-form-dia>
    <approval-dia ref="approvalDia" @close="handleDialogClose" :approveType="currentApproveType"></approval-dia>
    <FileList v-if="fileDialogVisible"
              v-model:visible="fileDialogVisible"
              record-type="approve_process"
@@ -207,6 +207,7 @@
// 动态表格列配置,根据审批类型生成列
const tableColumnCopy = computed(() => {
  const isLeaveType = currentApproveType.value === 2; // 请假管理
  const isBusinessTripType = currentApproveType.value === 3; // 出差管理
  const isReimburseType = currentApproveType.value === 4; // 报销管理
  const isQuotationType = currentApproveType.value === 6; // 报价审批
  const isPurchaseType = currentApproveType.value === 5; // 采购审批
@@ -274,26 +275,52 @@
      width: 120
    });
  }
  // 请假管理:开始日期 / 结束日期
  if (isLeaveType) {
    baseColumns.push(
      { label: "开始日期", prop: "startDate", width: 120 },
      { label: "结束日期", prop: "endDate", width: 120 }
    );
  }
  
  // 日期列(根据类型动态配置)
  baseColumns.push(
    {
      label: isLeaveType ? "开始日期" : "申请日期",
      prop: isLeaveType ? "startDate" : "approveTime",
      width: 200
    },
    {
      label: "结束日期",
      prop: isLeaveType ? "endDate" : "approveOverTime",
      width: 120
    }
  );
  // 出差管理:开始时间 / 结束时间(不含秒)
  if (isBusinessTripType) {
    baseColumns.push(
      {
        label: "开始时间",
        prop: "startDateTime",
        width: 180,
        formatData: (val) => val ? val.substring(0, 16) : ''
      },
      {
        label: "结束时间",
        prop: "endDateTime",
        width: 180,
        formatData: (val) => val ? val.substring(0, 16) : ''
      }
    );
  }
  
  // 当前审批人列
  baseColumns.push({
    label: "当前审批人",
    prop: "approveUserCurrentName",
    width: 120
  });
  // 申请时间 - 所有类型都显示
  baseColumns.push({
    label: "申请时间",
    prop: "approveTime",
    width: 180,
  });
  // 审批时间 - 所有类型都显示
  baseColumns.push({
    label: "审批时间",
    prop: "approveOverTime",
    width: 180,
  });
  
  // 操作列
@@ -375,6 +402,10 @@
  getList();
};
const handleDialogClose = () => {
  getList();
};
// 打开附件弹窗
const recordId =ref(0)
const fileDialogVisible = ref(false)
@@ -398,6 +429,10 @@
    page.total = res.data.total;
    // 更新当前类型数量
    typeCounts.value[activeTab.value] = res.data.total;
    if (res.data.records.length === 0 && page.current > 1) {
      page.current = Math.max(1, Math.ceil(res.data.total / page.size));
      getList();
    }
  }).catch(err => {
    tableLoading.value = false;
  })