diff --git a/src/views/oa/erp/timesheetInfo/index.vue b/src/views/oa/erp/timesheetInfo/index.vue
index fc150f4..189982c 100644
--- a/src/views/oa/erp/timesheetInfo/index.vue
+++ b/src/views/oa/erp/timesheetInfo/index.vue
@@ -145,7 +145,8 @@
-
+
+
diff --git a/src/views/oa/erp/timesheetSummary/index.vue b/src/views/oa/erp/timesheetSummary/index.vue
index f45d40a..6c70077 100644
--- a/src/views/oa/erp/timesheetSummary/index.vue
+++ b/src/views/oa/erp/timesheetSummary/index.vue
@@ -99,7 +99,7 @@
-
+
{{ adjustData.totalProjectHours }}
@@ -109,9 +109,21 @@
{{ adjustData.standardDays }}
-
-
人员搜索:
-
+
+
+ 人员搜索:
+
+
+
+
+
+ 原项目号:
+
+
+
+ 原项目名:
+
+
@@ -124,15 +136,31 @@
-
-
-
+
+
+
+
handleProjectChange(val, scope.row)"
+ >
+
+
+ -
+
+
+
+
+ handleProjectChange(val, scope.row)"
>
@@ -228,6 +256,7 @@ import {
import { TimesheetSummaryVO, TimesheetSummaryQuery, TimesheetSummaryForm } from '@/api/oa/erp/timesheetSummary/types';
import { getErpProjectInfoList } from '@/api/oa/erp/projectInfo';
import { allListDept } from '@/api/system/dept';
+import { listUser } from '@/api/system/user';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -249,6 +278,13 @@ const dialog = reactive({
});
const deptList = ref([]);
+const userList = ref([]);
+
+/** 查询用户列表 */
+const getUserList = async () => {
+ const res = await listUser({ pageNum: 1, pageSize: 1000 } as any);
+ userList.value = res.rows;
+};
/** 查询部门列表 */
const getDeptList = async () => {
@@ -262,8 +298,8 @@ const columns = ref([
{ key: 1, label: `租户编号`, visible: true },
{ key: 2, label: `汇总编号`, visible: true },
{ key: 3, label: `月份编码(YYYYMM)`, visible: true },
- { key: 4, label: `部门ID`, visible: true },
- { key: 5, label: `汇总人(部门负责人)用户ID`, visible: true },
+ { key: 4, label: `部门`, visible: true },
+ { key: 5, label: `部门负责人`, visible: true },
{ key: 6, label: `关联月标准工时ID`, visible: false },
{ key: 7, label: `月标准工时天数(冗余,取自标准月表)`, visible: true },
{ key: 8, label: `项目工时合计(天)`, visible: true },
@@ -409,7 +445,8 @@ const handleExport = () => {
proxy?.download(
'oa/erp/timesheetSummary/export',
{
- ...queryParams.value
+ ...queryParams.value,
+ summaryIds: ids.value
},
`timesheetSummary_${new Date().getTime()}.xlsx`
);
@@ -418,6 +455,7 @@ const handleExport = () => {
onMounted(() => {
getDeptList();
getList();
+ getUserList();
});
// 调整汇总明细逻辑
@@ -427,14 +465,22 @@ const adjustDialog = reactive({
});
const adjustData = ref(null);
const projectList = ref([]);
-const staffSearchName = ref('');
+const staffSearchUserId = ref(undefined);
+const staffSearchProjectCode = ref('');
+const staffSearchProjectName = ref('');
const filteredDetailList = computed(() => {
if (!adjustData.value || !adjustData.value.summaryDetailList) return [];
- if (!staffSearchName.value) return adjustData.value.summaryDetailList;
- return adjustData.value.summaryDetailList.filter(
- (item) => item.staffName && item.staffName.toLowerCase().includes(staffSearchName.value.toLowerCase())
- );
+ return adjustData.value.summaryDetailList.filter((item) => {
+ const matchUser = !staffSearchUserId.value || item.staffUserId === staffSearchUserId.value;
+ const matchProjCode =
+ !staffSearchProjectCode.value ||
+ (item.originalProjectCode && item.originalProjectCode.toLowerCase().includes(staffSearchProjectCode.value.toLowerCase()));
+ const matchProjName =
+ !staffSearchProjectName.value ||
+ (item.originalProjectName && item.originalProjectName.toLowerCase().includes(staffSearchProjectName.value.toLowerCase()));
+ return matchUser && matchProjCode && matchProjName;
+ });
});
const loadProjectList = async () => {
@@ -451,7 +497,9 @@ const handleAdjust = async (row: TimesheetSummaryVO) => {
const summaryId = row.summaryId;
const res = await getTimesheetSummary(summaryId);
adjustData.value = res.data;
- staffSearchName.value = '';
+ staffSearchUserId.value = undefined;
+ staffSearchProjectCode.value = '';
+ staffSearchProjectName.value = '';
await loadProjectList();