buhuazhen
2026-05-29 5c30f301d6d4a5b8fc1183e06aaea8dc366d3540
src/views/collaborativeApproval/approvalProcess/index.vue
@@ -10,7 +10,7 @@
      <el-tab-pane label="报价审批" name="6"></el-tab-pane>
      <el-tab-pane label="发货审批" name="7"></el-tab-pane>
    </el-tabs>
    <div class="search_form">
      <div>
        <span class="search_title">流程编号:</span>
@@ -21,6 +21,15 @@
            @change="handleQuery"
            clearable
            :prefix-icon="Search"
        />
        <span class="search_title ml10" v-if="currentApproveType === 7">销售单号:</span>
        <el-input
            v-if="currentApproveType === 7"
            v-model="searchForm.salesContractNo"
            style="width: 240px"
            placeholder="请输入销售单号搜索"
            @change="handleQuery"
            clearable
        />
        <span class="search_title ml10">审批状态:</span>
            <el-select v-model="searchForm.approveStatus" clearable @change="handleQuery" style="width: 240px">
@@ -95,6 +104,7 @@
  // 切换标签页时重置搜索条件和分页,并重新加载数据
  searchForm.value.approveId = '';
  searchForm.value.approveStatus = '';
  searchForm.value.salesContractNo = '';
  page.current = 1;
  getList();
};
@@ -104,6 +114,7 @@
  searchForm: {
      approveId: "",
      approveStatus: "",
      salesContractNo: "",
  },
});
const { searchForm } = toRefs(data);
@@ -114,7 +125,7 @@
  const isReimburseType = currentApproveType.value === 4; // 报销管理
  const isQuotationType = currentApproveType.value === 6; // 报价审批
  const isPurchaseType = currentApproveType.value === 5; // 采购审批
  // 基础列配置
  const baseColumns = [
    {
@@ -160,7 +171,7 @@
      width: 220
    },
    {
      label: isQuotationType ? "报价单号" : isPurchaseType ? "采购合同号" : "审批事由",
      label: isQuotationType ? "报价单号" : isPurchaseType ? "采购单号" : "审批事由",
      prop: "approveReason",
    },
    {
@@ -169,7 +180,20 @@
      width: 120
    }
  ];
  // 发货审批显示销售单号列
  if (currentApproveType.value === 7) {
    // 在申请部门后面插入销售单号列
    const deptIndex = baseColumns.findIndex(col => col.prop === 'approveDeptName');
    if (deptIndex !== -1) {
      baseColumns.splice(deptIndex + 1, 0, {
        label: "销售单号",
        prop: "salesContractNo",
        width: 170
      });
    }
  }
  // 金额列(仅报销管理显示)
  if (isReimburseType) {
    baseColumns.push({
@@ -178,7 +202,7 @@
      width: 120
    });
  }
  // 日期列(根据类型动态配置)
  baseColumns.push(
    {
@@ -192,14 +216,14 @@
      width: 120
    }
  );
  // 当前审批人列
  baseColumns.push({
    label: "当前审批人",
    prop: "approveUserCurrentName",
    width: 120
  });
  // 操作列
  const actionOperations = [
    {
@@ -257,7 +281,7 @@
    width: 230,
    operation: actionOperations,
  });
  return baseColumns;
});
const tableData = ref([]);
@@ -371,17 +395,17 @@
  // 根据URL参数设置标签页和查询条件
  const approveType = route.query.approveType;
  const approveId = route.query.approveId;
  if (approveType) {
    // 设置标签页(approveType 对应 activeTab 的 name)
    activeTab.value = String(approveType);
  }
  if (approveId) {
    // 设置流程编号查询条件
    searchForm.value.approveId = String(approveId);
  }
  // 查询列表
  getList();
});