| | |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "审批状态", |
| | | prop: "approveStatus", |
| | | dataType: "tag", |
| | | width: 100, |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "待审核"; |
| | | } else if (params == 1) { |
| | | return "审核中"; |
| | | } else if (params == 2) { |
| | | return "审核完成"; |
| | | } else if (params == 4) { |
| | | return "已重新提交"; |
| | | } else { |
| | | return '不通过'; |
| | | } |
| | | const tableColumn = computed(() => { |
| | | const baseColumns = [ |
| | | { |
| | | label: "审批状态", |
| | | prop: "approveStatus", |
| | | dataType: "tag", |
| | | width: 100, |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "待审核"; |
| | | } else if (params == 1) { |
| | | return "审核中"; |
| | | } else if (params == 2) { |
| | | return "审核完成"; |
| | | } else if (params == 4) { |
| | | return "已重新提交"; |
| | | } else { |
| | | return '不通过'; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "warning"; |
| | | } else if (params == 1) { |
| | | return "primary"; |
| | | } else if (params == 2) { |
| | | return "success"; |
| | | } else if (params == 4) { |
| | | return ""; |
| | | } else { |
| | | return 'danger'; |
| | | } |
| | | }, |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "warning"; |
| | | } else if (params == 1) { |
| | | return "primary"; |
| | | } else if (params == 2) { |
| | | return "success"; |
| | | } else if (params == 4) { |
| | | return ""; |
| | | } else { |
| | | return 'danger'; |
| | | } |
| | | { |
| | | label: "流程编号", |
| | | prop: "approveId", |
| | | width: 170 |
| | | }, |
| | | }, |
| | | { |
| | | label: "流程编号", |
| | | prop: "approveId", |
| | | width: 170 |
| | | }, |
| | | { |
| | | label: "申请部门", |
| | | prop: "approveDeptName", |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: "审批事由", |
| | | prop: "approveReason", |
| | | width: 200 |
| | | }, |
| | | { |
| | | label: "申请人", |
| | | prop: "approveUserName", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "申请日期", |
| | | prop: "approveTime", |
| | | width: 200 |
| | | }, |
| | | { |
| | | label: "结束日期", |
| | | prop: "approveOverTime", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "当前审批人", |
| | | prop: "approveUserCurrentName", |
| | | width: 120 |
| | | }, |
| | | { |
| | | { |
| | | label: "申请部门", |
| | | prop: "approveDeptName", |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: "审批事由", |
| | | prop: "approveReason", |
| | | width: 200 |
| | | }, |
| | | { |
| | | label: "申请人", |
| | | prop: "approveUserName", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "申请日期", |
| | | prop: "approveTime", |
| | | width: 200 |
| | | }, |
| | | { |
| | | label: "结束日期", |
| | | prop: "approveOverTime", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "当前审批人", |
| | | prop: "approveUserCurrentName", |
| | | width: 120 |
| | | } |
| | | ]; |
| | | |
| | | // 如果是报销管理审批表(approveType=4),添加报销金额列 |
| | | if (props.approveType == 4) { |
| | | baseColumns.push({ |
| | | label: "报销金额", |
| | | prop: "price", |
| | | width: 120, |
| | | fixed: "right", |
| | | formatData: (params) => { |
| | | if (params) { |
| | | return `¥${Number(params).toFixed(2)}`; |
| | | } |
| | | return '-' |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 添加操作列 |
| | | baseColumns.push({ |
| | | dataType: "action", |
| | | label: "操作", |
| | | align: "center", |
| | |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | }); |
| | | |
| | | return baseColumns; |
| | | }); |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const tableLoading = ref(false); |