From 2643f4abc8b28c93badd8e187e55cbc4a916dc8d Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Wed, 9 Apr 2025 18:07:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=8D=A1=E8=AE=B0=E5=BD=95,=E8=AF=B7?= =?UTF-8?q?=E5=81=87=E8=AE=B0=E5=BD=95,=E6=96=BD=E5=B7=A5=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=88=97=E8=A1=A8=E6=97=A5=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +- src/api/project/attendance/types.ts | 10 +- src/api/project/constructionUser/index.ts | 18 +- src/api/project/constructionUser/types.ts | 13 + src/api/project/workerDailyReport/index.ts | 63 ++++ src/api/project/workerDailyReport/types.ts | 111 +++++++ src/components/ProjectSelector/index.vue | 4 +- src/store/modules/user.ts | 24 +- src/utils/projectTeam.ts | 22 ++ src/views/project/attendance/index.vue | 24 +- src/views/project/attendanceRecords/index.vue | 30 +- src/views/project/constructionUser/index.vue | 142 +++++++-- src/views/project/leave/index.vue | 124 +++++--- src/views/project/reissueCard/index.vue | 127 +++++--- src/views/project/workerDailyReport/index.vue | 283 ++++++++++++++++++ 15 files changed, 827 insertions(+), 172 deletions(-) create mode 100644 src/api/project/workerDailyReport/index.ts create mode 100644 src/api/project/workerDailyReport/types.ts create mode 100644 src/utils/projectTeam.ts create mode 100644 src/views/project/workerDailyReport/index.vue diff --git a/src/App.vue b/src/App.vue index 66dbed6..3c662b1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,13 +8,15 @@ import useSettingsStore from '@/store/modules/settings'; import { handleThemeStyle } from '@/utils/theme'; import useAppStore from '@/store/modules/app'; - +import { getProjectTeam } from './utils/projectTeam'; +import { useUserStore } from '@/store/modules/user'; const appStore = useAppStore(); onMounted(() => { nextTick(() => { // 初始化主题样式 handleThemeStyle(useSettingsStore().theme); + getProjectTeam(); }); }); diff --git a/src/api/project/attendance/types.ts b/src/api/project/attendance/types.ts index 2b80ba4..c27ff3d 100644 --- a/src/api/project/attendance/types.ts +++ b/src/api/project/attendance/types.ts @@ -54,7 +54,15 @@ export interface AttendanceMonthVO { id: string | number; clockDate: string; status: string; - attendanceList: monthList[]; + attendanceList?: monthList[]; + clockList?: clockObject; +} + +interface clockObject { + downClockTime?: string; + downClockPic?: string; + upClockTime?: string; + upClockPic?: string; } interface monthList { diff --git a/src/api/project/constructionUser/index.ts b/src/api/project/constructionUser/index.ts index dee8ffe..3a26dc4 100644 --- a/src/api/project/constructionUser/index.ts +++ b/src/api/project/constructionUser/index.ts @@ -10,8 +10,24 @@ import { ConstructionUserSalaryForm, ConstructionUserExitForm, ConstructionUserTemplateForm, - ConstructionUserMembeForm + ConstructionUserMembeForm, + ConstructionMonthQuery } from '@/api/project/constructionUser/types'; +import { AttendanceMonthVO } from '../attendance/types'; + +/** + * 查询施工人员月份考勤列表 + * @param query + * @returns {*} + */ + +export const listConstructionMonth = (query?: ConstructionMonthQuery): AxiosPromise => { + return request({ + url: '/project/constructionUser/list/attendance/month', + method: 'get', + params: query + }); +}; /** * 查询施工人员列表 diff --git a/src/api/project/constructionUser/types.ts b/src/api/project/constructionUser/types.ts index ed25ef9..d52b4d7 100644 --- a/src/api/project/constructionUser/types.ts +++ b/src/api/project/constructionUser/types.ts @@ -197,6 +197,19 @@ export interface skipType { id: string | number; } +export interface ConstructionMonthQuery { + /** + * id + */ + userId: string | number; + + /** + * 打卡月份 + + */ + clockMonth?: string | number; +} + export interface ConstructionUserMembeForm { /** * 用户id diff --git a/src/api/project/workerDailyReport/index.ts b/src/api/project/workerDailyReport/index.ts new file mode 100644 index 0000000..5a6f373 --- /dev/null +++ b/src/api/project/workerDailyReport/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { WorkerDailyReportVO, WorkerDailyReportForm, WorkerDailyReportQuery } from '@/api/project/workerDailyReport/types'; + +/** + * 查询施工人员日报列表 + * @param query + * @returns {*} + */ + +export const listWorkerDailyReport = (query?: WorkerDailyReportQuery): AxiosPromise => { + return request({ + url: '/project/workerDailyReport/list', + method: 'get', + params: query + }); +}; + +/** + * 查询施工人员日报详细 + * @param id + */ +export const getWorkerDailyReport = (id: string | number): AxiosPromise => { + return request({ + url: '/project/workerDailyReport/' + id, + method: 'get' + }); +}; + +/** + * 新增施工人员日报 + * @param data + */ +export const addWorkerDailyReport = (data: WorkerDailyReportForm) => { + return request({ + url: '/project/workerDailyReport', + method: 'post', + data: data + }); +}; + +/** + * 修改施工人员日报 + * @param data + */ +export const updateWorkerDailyReport = (data: WorkerDailyReportForm) => { + return request({ + url: '/project/workerDailyReport', + method: 'put', + data: data + }); +}; + +/** + * 删除施工人员日报 + * @param id + */ +export const delWorkerDailyReport = (id: string | number | Array) => { + return request({ + url: '/project/workerDailyReport/' + id, + method: 'delete' + }); +}; diff --git a/src/api/project/workerDailyReport/types.ts b/src/api/project/workerDailyReport/types.ts new file mode 100644 index 0000000..318c8f9 --- /dev/null +++ b/src/api/project/workerDailyReport/types.ts @@ -0,0 +1,111 @@ +export interface WorkerDailyReportVO { + /** + * 申请人名字 + */ + userName: string; + + /** + * 今日完成工作 + */ + todayCompletedWork: string; + + /** + * 未完成工作 + */ + unfinishedWork: string; + + /** + * 明日工作 + */ + tomorrowWork: string; + + /** + * 需协调与帮助 + */ + coordinationHelp: string; + +} + +export interface WorkerDailyReportForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 申请人id + */ + userId?: string | number; + + /** + * 申请人名字 + */ + userName?: string; + + /** + * 今日完成工作 + */ + todayCompletedWork?: string; + + /** + * 未完成工作 + */ + unfinishedWork?: string; + + /** + * 明日工作 + */ + tomorrowWork?: string; + + /** + * 需协调与帮助 + */ + coordinationHelp?: string; + + /** + * 附件 + */ + file?: string; + +} + +export interface WorkerDailyReportQuery extends PageQuery { + + /** + * 项目id + */ + projectId?: string | number; + + /** + * 班组id + */ + teamId?: string | number; + + /** + * 申请人id + */ + userId?: string | number; + + /** + * 申请人名字 + */ + userName?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/components/ProjectSelector/index.vue b/src/components/ProjectSelector/index.vue index f9e7c3f..a705fb9 100644 --- a/src/components/ProjectSelector/index.vue +++ b/src/components/ProjectSelector/index.vue @@ -18,6 +18,7 @@ diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 57a6c68..a6ae5e0 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -5,17 +5,26 @@ import { LoginData, UserProject } from '@/api/types'; import defAva from '@/assets/images/profile.jpg'; import store from '@/store'; import { defineStore } from 'pinia'; +import { SpecialType } from '@/api/project/workWage/types'; // 添加两个函数用于操作localStorage const saveSelectedProjectToStorage = (project) => { localStorage.setItem('selectedProject', JSON.stringify(project)); }; +const saveProjectTeamToStorage = (project) => { + localStorage.setItem('ProjectTeamList', JSON.stringify(project)); +}; const getSelectedProjectFromStorage = () => { const stored = localStorage.getItem('selectedProject'); return stored ? JSON.parse(stored) : null; }; +const getProjectTeamListFromStorage = () => { + const stored = localStorage.getItem('ProjectTeamList'); + return stored ? JSON.parse(stored) : null; +}; + export const useUserStore = defineStore('user', () => { const token = ref(getToken()); const name = ref(''); @@ -29,6 +38,7 @@ export const useUserStore = defineStore('user', () => { const projects = ref>([]); // 从localStorage获取缓存的项目,如果没有则默认为null const selectedProject = ref<{ id: string; name: string } | null>(getSelectedProjectFromStorage()); + const ProjectTeamList = ref(getProjectTeamListFromStorage()); /** * 登录 @@ -112,14 +122,12 @@ export const useUserStore = defineStore('user', () => { const setSelectedProject = (project: { id: string; name: string }) => { selectedProject.value = project; - // 将选中的项目保存到localStorage saveSelectedProjectToStorage(project); + }; - // ** 切换项目后,需要清空当前项目下的所有缓存数据 ** - // 清空 pinia 缓存 - // store.$reset(); - // console.log("选择的新项目名称:" + selectedProject.value.name) - // console.log("选择的新项目id:" + selectedProject.value.id) + const setProjectTeamList = (project: SpecialType[]) => { + ProjectTeamList.value = project; + saveProjectTeamToStorage(project); }; return { @@ -136,8 +144,10 @@ export const useUserStore = defineStore('user', () => { setAvatar, setProjects, setSelectedProject, + setProjectTeamList, projects, - selectedProject + selectedProject, + ProjectTeamList }; }); diff --git a/src/utils/projectTeam.ts b/src/utils/projectTeam.ts new file mode 100644 index 0000000..fb90161 --- /dev/null +++ b/src/utils/projectTeam.ts @@ -0,0 +1,22 @@ +//获取班组列表 +import { listProjectTeam } from '@/api/project/projectTeam'; +import { ProjectTeamVO } from '@/api/project/projectTeam/types'; +import store from '@/store'; +import { useUserStore } from '@/store/modules/user'; + +const userStore = useUserStore(store); +export const getProjectTeam = async () => { + const { id } = userStore.selectedProject; + const res = await listProjectTeam({ + pageNum: 1, + pageSize: 20, + orderByColumn: 'createTime', + isAsc: 'desc', + projectId: id + }); + const list = res.rows.map((projectTeam: ProjectTeamVO) => ({ + value: projectTeam.id, + label: projectTeam.teamName + })); + userStore.setProjectTeamList(list); +}; diff --git a/src/views/project/attendance/index.vue b/src/views/project/attendance/index.vue index c412586..65dcd77 100644 --- a/src/views/project/attendance/index.vue +++ b/src/views/project/attendance/index.vue @@ -9,7 +9,7 @@ - + @@ -210,6 +210,7 @@ import type { CalendarDateType, CalendarInstance } from 'element-plus'; const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 const currentProject = computed(() => userStore.selectedProject); +const ProjectTeam = computed(() => userStore.ProjectTeamList); const attendanceList = ref([]); const attendanceTwoWeekList = ref([]); const buttonLoading = ref(false); @@ -222,8 +223,6 @@ const total = ref(0); const calendarList = ref(); const queryFormRef = ref(); const attendanceFormRef = ref(); -//班组列表 -const projectTeamOpt = ref([]); const dialog = reactive({ visible: false, details: false, @@ -308,7 +307,7 @@ const selectDate = async (val: CalendarDateType, date) => { if (!calendar.value) return; calendar.value.selectDate(val); const clockMonth = incrementMonth(date, val == 'prev-month' ? -1 : 1); - const res = await listAttendanceMonth({ id: dialog.id, clockMonth }); + const res = await listAttendanceMonth({ userId: dialog.id, clockMonth }); calendarList.value = res.data; }; @@ -321,22 +320,6 @@ const getList = async () => { loading.value = false; }; -const getProjectTeamList = async () => { - loading.value = true; - const res = await listProjectTeam({ - pageNum: 1, - pageSize: 20, - orderByColumn: 'createTime', - isAsc: 'desc', - projectId: currentProject.value.id - }); - projectTeamOpt.value = res.rows.map((projectTeam: ProjectTeamVO) => ({ - value: projectTeam.id, - label: projectTeam.teamName - })); - loading.value = false; -}; - /** 查询近两周考勤列表 */ const getListTwoWeek = async () => { loading.value = true; @@ -450,7 +433,6 @@ const submitForm = () => { onMounted(() => { getList(); getListTwoWeek(); - getProjectTeamList(); }); diff --git a/src/views/project/attendanceRecords/index.vue b/src/views/project/attendanceRecords/index.vue index 647e0b8..26b150a 100644 --- a/src/views/project/attendanceRecords/index.vue +++ b/src/views/project/attendanceRecords/index.vue @@ -9,7 +9,7 @@ - + @@ -56,7 +56,9 @@ @@ -83,7 +85,6 @@ const ids = ref>([]); const single = ref(true); const multiple = ref(true); const total = ref(0); -const projectTeamOpt = ref([]); const queryFormRef = ref(); const attendanceFormRef = ref(); @@ -95,11 +96,12 @@ const dialog = reactive({ const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 const currentProject = computed(() => userStore.selectedProject); +const ProjectTeam = computed(() => userStore.ProjectTeamList); const initFormData: AttendanceForm = { id: undefined, userId: undefined, facePic: undefined, - projectId: undefined, + projectId: currentProject.value?.id, onClockTime: undefined, offClockTime: undefined, clockDate: undefined, @@ -118,7 +120,7 @@ const data = reactive>({ pageNum: 1, pageSize: 10, userName: undefined, - projectId: undefined, + projectId: currentProject.value?.id, clockDate: undefined, clockStatus: undefined, commuter: undefined, @@ -158,25 +160,7 @@ const resetQuery = () => { handleQuery(); }; -/** 搜索班组操作 */ -const getProjectTeamList = async () => { - loading.value = true; - const res = await listProjectTeam({ - pageNum: 1, - pageSize: 20, - orderByColumn: 'createTime', - isAsc: 'desc', - projectId: currentProject.value.id - }); - projectTeamOpt.value = res.rows.map((projectTeam: ProjectTeamVO) => ({ - value: projectTeam.id, - label: projectTeam.teamName - })); - loading.value = false; -}; - onMounted(() => { getList(); - getProjectTeamList(); }); diff --git a/src/views/project/constructionUser/index.vue b/src/views/project/constructionUser/index.vue index d7e4a83..25d4dc4 100644 --- a/src/views/project/constructionUser/index.vue +++ b/src/views/project/constructionUser/index.vue @@ -14,7 +14,7 @@ - + @@ -166,6 +166,7 @@ 修改 + 打卡 黑名单 @@ -429,6 +430,24 @@ + + + + + + @@ -447,7 +466,8 @@ import { updateConstructionUserSalary, getConstructionUserExit, dowloadConstructionUserTemplate, - importConstructionUserInfo + importConstructionUserInfo, + listConstructionMonth } from '@/api/project/constructionUser'; import { ConstructionUserForm, @@ -472,7 +492,10 @@ import { ConstructionUserFileQuery } from '@/api/project/constructionUserFile/types'; import { ElLoadingService } from 'element-plus'; -const imgurl = 'http://zmkg.cqet.top:8899/wxfile/upload_file/2024-12-03/1.jpg'; +import type { CalendarDateType, CalendarInstance } from 'element-plus'; +import { AttendanceMonthVO } from '@/api/project/attendance/types'; + +const calendar = ref(); const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_status_type, wage_measure_unit_type } = toRefs( proxy?.useDict('type_of_work', 'user_sex_type', 'user_clock_type', 'user_file_type', 'user_status_type', 'wage_measure_unit_type') @@ -481,6 +504,7 @@ const { type_of_work, user_sex_type, user_clock_type, user_file_type, user_statu const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 const currentProject = computed(() => userStore.selectedProject); +const ProjectTeam = computed(() => userStore.ProjectTeamList); const constructionUserList = ref([]); const buttonLoading = ref(false); const loading = ref(true); @@ -495,8 +519,11 @@ const showFaceDrawer = ref(false); const statusDialog = ref(false); const playCardStatus = ref(false); const playCardLoding = ref(false); +const playCardCalendar = ref(false); const salaryStatus = ref(false); const exitStatus = ref(false); +const calendarDay = ref(null); +const monthValue = ref(null); const informationStatus = ref(false); const filePath = ref(''); const exitList = ref([]); @@ -506,9 +533,11 @@ const fileList = ref([]); const queryFormRef = ref(); const constructionUserFormRef = ref(); const skipName = ref(''); +const calendarList = ref>([]); const dialog = reactive({ visible: false, - title: '' + title: '', + id: undefined }); const baseUrl = import.meta.env.VITE_APP_BASE_API; //人员迁移条件 @@ -649,6 +678,28 @@ const uploadStatusColor = computed(() => (str: string) => { const { queryParams, form, rules } = toRefs(data); +//打卡时间下标 +const playCardIdx = computed(() => (date) => { + return calendarList.value.findIndex((item) => item.clockDate == date.day); +}); + +//打卡状态颜色 +const playCardColor = computed(() => (date) => { + const idx = calendarList.value[playCardIdx.value(date)]?.status; + switch (idx) { + case '1': + return 'green'; + case '2': + return 'orange'; + case '3': + return 'red'; + case '4': + return 'gray'; + default: + return ''; + } +}); + /** 查询施工人员列表 */ const getList = async () => { loading.value = true; @@ -658,6 +709,30 @@ const getList = async () => { loading.value = false; }; +/** 查看打卡记录详情 */ +const handleViewPlayCard = async (idx: number) => { + const statusColor = calendarList.value[idx]?.status; + if (idx == -1 || statusColor == '4' || statusColor == '3') { + return proxy?.$modal.msgWarning('暂无打卡记录数据'); + } + const { downClockTime, downClockPic, upClockTime, upClockPic } = calendarList.value[idx]?.clockList; + ElNotification({ + title: '温馨提示', + dangerouslyUseHTMLString: true, + message: `
+ 头像: +
+ +
+
上班打卡时间:${upClockTime ? upClockTime : ''}
+ 头像: +
+ +
+
下班打卡时间:${downClockTime ? downClockTime : ''}` + }); +}; + const selectProject = (e: any) => { //选中项目筛选出项目下的分包单位并清空分包单位value contractorList.value = skipOptions.value.filter((item) => item.id == e)[0].contractorList; @@ -690,23 +765,10 @@ const getContractorList = async () => { loading.value = false; }; -const projectTeamOpt = ref([]); - -/** 查询当前项目下的班组列表 */ -const getProjectTeamList = async () => { - loading.value = true; - const res = await listProjectTeam({ - pageNum: 1, - pageSize: 20, - orderByColumn: 'createTime', - isAsc: 'desc', - projectId: currentProject.value.id - }); - projectTeamOpt.value = res.rows.map((projectTeam: ProjectTeamVO) => ({ - value: projectTeam.id, - label: projectTeam.teamName - })); - loading.value = false; +const handleMonth = async (e: any) => { + calendarDay.value = e; + const res = await listConstructionMonth({ userId: dialog.id, clockMonth: e }); + calendarList.value = res.data; }; /** 上传安全协议书按钮操作 */ @@ -732,7 +794,7 @@ const updateProjectFile = async () => { }; const getTeamName = (teamId: string | number) => { - const team = projectTeamOpt.value.find((item: any) => item.value === teamId); + const team = ProjectTeam.value.find((item: any) => item.value === teamId); return team ? team.label : teamId; }; @@ -792,6 +854,17 @@ const handleShowDrawer = (row?: ConstructionUserVO) => { showDetailDrawer.value = true; }; +//打卡按钮 +const handlePlayCard = async (row: ConstructionUserVO) => { + const _id = row?.id || ids.value[0]; + skipName.value = row?.userName; + + const res = await listConstructionMonth({ userId: _id }); + calendarList.value = res.data; + dialog.id = _id; + playCardCalendar.value = true; +}; + //下载模板 const downloadTemplate = async () => { const loadingInstance = ElLoadingService({ @@ -961,10 +1034,28 @@ const handleClockStatus = async (row: ConstructionUserVO) => { onMounted(() => { getList(); getContractorList(); - getProjectTeamList(); }); diff --git a/src/views/project/leave/index.vue b/src/views/project/leave/index.vue index 8d0c213..ae6d527 100644 --- a/src/views/project/leave/index.vue +++ b/src/views/project/leave/index.vue @@ -9,7 +9,7 @@
- + - - - - - - - - - - - - + +
+ 补卡申请 + + + + + {{ detailObj.userTime }} + + + + + {{ detailObj.gangerExplain ? detailObj.gangerExplain : '暂无' }} + + + + + {{ detailObj.gangerTime ? detailObj.gangerTime : '暂无' }} + + + + + {{ detailObj.managerExplain ? detailObj.managerExplain : '暂无' }} + + + + + {{ detailObj.managerTime ? detailObj.managerTime : '暂无' }} + + + + +
+
+ 审核进度 + + + + + + + + + + + +
@@ -200,7 +237,6 @@ const total = ref(0); const queryFormRef = ref(); const leaveFormRef = ref(); -const projectTeamOpt = ref([]); const dialog = reactive({ visible: false, title: '', @@ -210,6 +246,7 @@ const dialog = reactive({ const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 const currentProject = computed(() => userStore.selectedProject); +const ProjectTeam = computed(() => userStore.ProjectTeamList); const initFormData: LeaveForm = { id: undefined, userId: undefined, @@ -370,25 +407,20 @@ const handleExport = () => { ); }; -/** 搜索班组操作 */ -const getProjectTeamList = async () => { - loading.value = true; - const res = await listProjectTeam({ - pageNum: 1, - pageSize: 20, - orderByColumn: 'createTime', - isAsc: 'desc', - projectId: currentProject.value.id - }); - projectTeamOpt.value = res.rows.map((projectTeam: ProjectTeamVO) => ({ - value: projectTeam.id, - label: projectTeam.teamName - })); - loading.value = false; -}; - onMounted(() => { getList(); - getProjectTeamList(); }); + diff --git a/src/views/project/reissueCard/index.vue b/src/views/project/reissueCard/index.vue index 0eec5d5..2b88d9d 100644 --- a/src/views/project/reissueCard/index.vue +++ b/src/views/project/reissueCard/index.vue @@ -14,7 +14,7 @@ - + @@ -107,32 +107,67 @@
- - - - - - - - - - - - + +
+ 补卡申请 + + + + + {{ detailObj.userTime }} + + + + + {{ detailObj.gangerExplain ? detailObj.gangerExplain : '暂无' }} + + + + + {{ detailObj.gangerTime ? detailObj.gangerTime : '暂无' }} + + + + + {{ detailObj.managerExplain ? detailObj.managerExplain : '暂无' }} + + + + + {{ detailObj.managerTime ? detailObj.managerTime : '暂无' }} + + + + +
+
+ 审核进度 + + + + + + + + + + + +
@@ -171,7 +206,6 @@ const ids = ref>([]); const single = ref(true); const multiple = ref(true); const total = ref(0); -const projectTeamOpt = ref([]); const queryFormRef = ref(); const reissueCardFormRef = ref(); const auditForm = reactive({ @@ -188,6 +222,7 @@ const dialog = reactive({ const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 const currentProject = computed(() => userStore.selectedProject); +const ProjectTeam = computed(() => userStore.ProjectTeamList); const initFormData: ReissueCardForm = { id: undefined, userId: undefined, @@ -197,7 +232,7 @@ const initFormData: ReissueCardForm = { gangerExplain: undefined, managerOpinion: undefined, managerExplain: undefined, - projectId: undefined, + projectId: currentProject.value?.id, attendanceId: undefined, remark: undefined }; @@ -209,7 +244,7 @@ const data = reactive>({ userName: undefined, gangerOpinion: undefined, managerOpinion: undefined, - projectId: undefined, + projectId: currentProject.value?.id, teamId: undefined, reissueCardType: undefined, params: {} @@ -311,23 +346,6 @@ const handleUpdate = async (row?: ReissueCardVO) => { dialog.title = '修改施工人员补卡申请'; }; -/** 搜索班组操作 */ -const getProjectTeamList = async () => { - loading.value = true; - const res = await listProjectTeam({ - pageNum: 1, - pageSize: 20, - orderByColumn: 'createTime', - isAsc: 'desc', - projectId: currentProject.value.id - }); - projectTeamOpt.value = res.rows.map((projectTeam: ProjectTeamVO) => ({ - value: projectTeam.id, - label: projectTeam.teamName - })); - loading.value = false; -}; - const handleDetail = (row: ReissueCardVO) => { detailObj.value = row; dialog.details = true; @@ -345,6 +363,19 @@ const submitAudit = async () => { onMounted(() => { getList(); - getProjectTeamList(); }); + + diff --git a/src/views/project/workerDailyReport/index.vue b/src/views/project/workerDailyReport/index.vue new file mode 100644 index 0000000..0167f3b --- /dev/null +++ b/src/views/project/workerDailyReport/index.vue @@ -0,0 +1,283 @@ + + +