From 4057a78368f09b08e08034788dc38c54dd6d5778 Mon Sep 17 00:00:00 2001 From: ljx <15723110242@139.com> Date: Mon, 15 Sep 2025 18:04:57 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/utils/ruoyi.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.development b/.env.development index b8354ec..15482f5 100644 --- a/.env.development +++ b/.env.development @@ -7,7 +7,7 @@ VITE_APP_ENV = 'development' # 开发环境 # VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 李陈杰 209 -VITE_APP_BASE_API = 'http://192.168.110.180:8899' +# VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 李陈杰 209 # VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 曾涛 diff --git a/src/utils/ruoyi.ts b/src/utils/ruoyi.ts index c92994d..817fbad 100644 --- a/src/utils/ruoyi.ts +++ b/src/utils/ruoyi.ts @@ -74,6 +74,11 @@ export const formatPrice = (price, show = true) => { const fixedNum = num.toFixed(4); const [integer, decimal] = fixedNum.split('.'); + // 检查小数部分是否为0 + if (decimal === '0000') { + return `${integer}.00`; + } + // 千分位处理 const formattedInteger = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ','); From 2ea9d901b5fc9b3cefe8d6c4d85f2a8d90f832e3 Mon Sep 17 00:00:00 2001 From: ljx <15723110242@139.com> Date: Mon, 15 Sep 2025 19:12:23 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/header.vue | 29 +++++++++++-------- src/views/largeScreen/components/header.vue | 29 +++++++++++-------- .../ProjectScreen/components/header.vue | 25 +++++++++------- 3 files changed, 48 insertions(+), 35 deletions(-) diff --git a/src/views/enterpriseLarge/digitalizationScreen/components/header.vue b/src/views/enterpriseLarge/digitalizationScreen/components/header.vue index 56c3916..fe3f97e 100644 --- a/src/views/enterpriseLarge/digitalizationScreen/components/header.vue +++ b/src/views/enterpriseLarge/digitalizationScreen/components/header.vue @@ -23,7 +23,7 @@ v-for="(item, i) in weatherList" :key="i" class="weather-item" - :style="{ transform: `translateY(-${offsetY}px)`, transition: transition }" + :style="{ transform: `translateY(-${offsetY}vw)`, transition: transition }" >
{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°
@@ -39,7 +39,7 @@
设置图标 - 管理系统 + 管理系统
@@ -89,7 +89,7 @@ const emit = defineEmits(['changePage']); const safetyDay = ref(0); const weatherList = ref([]); const timer = ref(0); -const offsetY = ref(0); +const offsetY = ref(0); const curIndex = ref(0); const transition = ref('transform 0.5s ease'); const pendingPause = ref(false); @@ -119,7 +119,7 @@ function judgeDayOrNight(sunRise: string, sunSet: string) { const setWeatherScroll = () => { curIndex.value += 1; transition.value = 'transform 0.3s ease'; - offsetY.value = curIndex.value * 60; + offsetY.value = curIndex.value * 2; if (curIndex.value === weatherList.value.length - 1) { setTimeout(() => { @@ -232,13 +232,13 @@ onUnmounted(() => { .title > div:first-child { /* 第一个子元素的样式 */ - font-size: 38px; + font-size: 2vw; letter-spacing: 0.1em; } .title > div:last-child { /* 最后一个子元素的样式 */ - font-size: 14px; + font-size: 1vw; } /* 顶部栏容器:Flex 水平布局 + 垂直居中 */ @@ -260,22 +260,25 @@ onUnmounted(() => { align-items: center; .weather-list { - height: 60px; + height: 2vw; overflow: hidden; .weather-item { - height: 60px; - line-height: 60px; + height: 2vw; display: flex; align-items: center; + justify-content: center; + // padding: 10px 0; + // box-sizing: border-box; + font-size: 0.8vw; & > div:last-child { margin-left: 10px; } img { - width: 50px; - height: 50px; + width: 3vw; + height: 3vw; } } } @@ -305,10 +308,12 @@ onUnmounted(() => { /* 右侧区域(管理系统):图标 + 文字水平排列 */ .right-section { + width: 5.5vw; display: flex; align-items: center; + justify-content: center; font-family: 'AlimamaShuHeiTi', sans-serif; - font-size: 20px; + font-size: 1vw; cursor: pointer; } diff --git a/src/views/largeScreen/components/header.vue b/src/views/largeScreen/components/header.vue index 02848cf..fc782ac 100644 --- a/src/views/largeScreen/components/header.vue +++ b/src/views/largeScreen/components/header.vue @@ -23,7 +23,7 @@ v-for="(item, i) in weatherList" :key="i" class="weather-item" - :style="{ transform: `translateY(-${offsetY}px)`, transition: transition }" + :style="{ transform: `translateY(-${offsetY}vw)`, transition: transition }" >
{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°
@@ -79,7 +79,7 @@ const userStore = useUserStoreHook(); const currentProject = computed(() => userStore.selectedProject); // 天气轮播相关变量 -const weatherList = ref([]); +const weatherList = ref([]); const offsetY = ref(0); const curIndex = ref(0); const transition = ref('transform 0.5s ease'); @@ -103,7 +103,7 @@ function judgeDayOrNight(sunRise: string, sunSet: string) { const setWeatherScroll = () => { curIndex.value += 1; transition.value = 'transform 0.3s ease'; - offsetY.value = curIndex.value * 60; // 每个天气项高度60px,需和样式一致 + offsetY.value = curIndex.value * 2; // 每个天气项高度60px,需和样式一致 // 轮播到最后一项时,无缝衔接回第一项 if (curIndex.value === weatherList.value.length - 1) { @@ -160,7 +160,7 @@ const getWeatherData = async () => { weatherList.value = res.data; // 处理每一天的天气(白天/夜晚切换图标和状态) - weatherList.value.forEach((item) => { + weatherList.value.forEach((item: any) => { const isDay = judgeDayOrNight(item.sunRise, item.sunSet); item.status = isDay ? item.dayStatus : item.nightStatus; item.icon = isDay ? item.dayIcon : item.nightIcon; @@ -250,13 +250,13 @@ onUnmounted(() => { .title > div:first-child { /* 第一个子元素的样式 */ - font-size: 38px; + font-size: 2vw; letter-spacing: 0.1em; } .title > div:last-child { /* 最后一个子元素的样式 */ - font-size: 14px; + font-size: 1vw; } /* 顶部栏容器:Flex 水平布局 + 垂直居中 */ @@ -278,22 +278,25 @@ onUnmounted(() => { align-items: center; .weather-list { - height: 60px; + height: 2vw; overflow: hidden; .weather-item { - height: 60px; - line-height: 60px; + height: 2vw; display: flex; align-items: center; + justify-content: center; + // padding: 10px 0; + // box-sizing: border-box; + font-size: 0.8vw; & > div:last-child { margin-left: 10px; } img { - width: 50px; - height: 50px; + width: 3vw; + height: 3vw; } } } @@ -323,10 +326,12 @@ onUnmounted(() => { /* 右侧区域(管理系统):图标 + 文字水平排列 */ .right-section { + width: 5.5vw; display: flex; align-items: center; + justify-content: center; font-family: 'AlimamaShuHeiTi', sans-serif; - font-size: 20px; + font-size: 1vw; cursor: pointer; } diff --git a/src/views/projectLarge/ProjectScreen/components/header.vue b/src/views/projectLarge/ProjectScreen/components/header.vue index a1e3eb2..b891b0d 100644 --- a/src/views/projectLarge/ProjectScreen/components/header.vue +++ b/src/views/projectLarge/ProjectScreen/components/header.vue @@ -23,7 +23,7 @@ v-for="(item, i) in weatherList" :key="i" class="weather-item" - :style="{ transform: `translateY(-${offsetY}px)`, transition: transition }" + :style="{ transform: `translateY(-${offsetY}vw)`, transition: transition }" >
{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°
@@ -39,7 +39,7 @@
设置图标 - 管理系统 + 管理系统
@@ -129,7 +129,7 @@ function judgeDayOrNight(sunRise: string, sunSet: string) { const setWeatherScroll = () => { curIndex.value += 1; transition.value = 'transform 0.3s ease'; - offsetY.value = curIndex.value * 60; + offsetY.value = curIndex.value * 2; if (curIndex.value === weatherList.value.length - 1) { setTimeout(() => { @@ -242,13 +242,13 @@ onUnmounted(() => { .title > div:first-child { /* 第一个子元素的样式 */ - font-size: 38px; + font-size: 2vw; letter-spacing: 0.1em; } .title > div:last-child { /* 最后一个子元素的样式 */ - font-size: 26px; + font-size: 1.5vw; } /* 顶部栏容器:Flex 水平布局 + 垂直居中 */ @@ -270,22 +270,23 @@ onUnmounted(() => { align-items: center; .weather-list { - height: 60px; + height: 2vw; overflow: hidden; .weather-item { - height: 60px; - line-height: 60px; + height: 2vw; display: flex; align-items: center; + justify-content: center; + font-size: 0.8vw; & > div:last-child { margin-left: 10px; } img { - width: 50px; - height: 50px; + width: 3vw; + height: 3vw; } } } @@ -315,10 +316,12 @@ onUnmounted(() => { /* 右侧区域(管理系统):图标 + 文字水平排列 */ .right-section { + width: 5.5vw; display: flex; align-items: center; + justify-content: center; font-family: 'AlimamaShuHeiTi', sans-serif; - font-size: 20px; + font-size: 1vw; cursor: pointer; } From 371c599bdfbc7e7a9ab6cf88ee5d364a48542dfe Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Mon, 15 Sep 2025 19:42:35 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=90=88=E8=A7=84=E6=80=A7=E6=89=8B?= =?UTF-8?q?=E7=BB=AD=E5=A2=9E=E5=8A=A0=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formalitiesAreConsolidated/index.vue | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/views/formalities/formalitiesAreConsolidated/index.vue b/src/views/formalities/formalitiesAreConsolidated/index.vue index fad4d4a..43938b3 100644 --- a/src/views/formalities/formalitiesAreConsolidated/index.vue +++ b/src/views/formalities/formalitiesAreConsolidated/index.vue @@ -67,6 +67,17 @@ +
@@ -235,6 +249,7 @@ + @@ -539,6 +554,16 @@ const handleUpdateStatus = async (row?: FormalitiesAreConsolidatedVO) => { updateStatusVisible.value = true; }; +const handleDelete = async (row?: any) => { + const _ids = row?.id || ids.value; + await proxy?.$modal.confirm('是否确认删除数据项?').finally(() => (fileLoading.value = false)); + fileLoading.value = true; + + await delFormalitiesAreConsolidated(_ids); + proxy?.$modal.msgSuccess('删除成功'); + await getList(); +}; + const submitStatus = async () => { statusFormRef.value?.validate(async (valid: boolean) => { if (valid) { From 0b6dcc98e83f91017e0a2fee941861efb4853897 Mon Sep 17 00:00:00 2001 From: taoge1020 Date: Mon, 15 Sep 2025 20:09:56 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formalitiesAreConsolidated/index.vue | 11 +- src/views/project/attendance/index.vue | 28 +- .../busSalaryDetails/component/detail.vue | 102 ++++ .../busSalaryDetails/component/edit.vue | 146 +++++ .../busSalaryDetails/component/model.ts | 57 ++ src/views/project/busSalaryDetails/index.vue | 563 ++++++++++++++++++ 6 files changed, 903 insertions(+), 4 deletions(-) create mode 100644 src/views/project/busSalaryDetails/component/detail.vue create mode 100644 src/views/project/busSalaryDetails/component/edit.vue create mode 100644 src/views/project/busSalaryDetails/component/model.ts create mode 100644 src/views/project/busSalaryDetails/index.vue diff --git a/src/views/formalities/formalitiesAreConsolidated/index.vue b/src/views/formalities/formalitiesAreConsolidated/index.vue index fad4d4a..2e693de 100644 --- a/src/views/formalities/formalitiesAreConsolidated/index.vue +++ b/src/views/formalities/formalitiesAreConsolidated/index.vue @@ -82,11 +82,18 @@ - + diff --git a/src/views/project/attendance/index.vue b/src/views/project/attendance/index.vue index 9d79f7f..b99239a 100644 --- a/src/views/project/attendance/index.vue +++ b/src/views/project/attendance/index.vue @@ -31,6 +31,7 @@ 搜索 重置 + 导出 @@ -234,6 +235,17 @@ const dialog = reactive({ details: false, title: '' }); +const now = new Date(); + +// 获取年份(4位数字) +const year = now.getFullYear(); + +// 获取月份(注意:getMonth() 返回 0-11,需要 +1 转换为 1-12) +const month = now.getMonth() + 1; + +// 格式化月份为两位数(不足两位补0),拼接成年月字符串 +const currentYearMonth = `${year}-${month.toString().padStart(2, '0')}`; + const echartsOption = ref({}); const initFormData: AttendanceForm = { id: undefined, @@ -260,7 +272,7 @@ const data = reactive>({ pageNum: 1, pageSize: 10, userName: undefined, - clockDate: undefined, + clockDate: currentYearMonth, clockStatus: undefined, commuter: undefined, projectId: currentProject.value?.id, @@ -454,7 +466,19 @@ const init = () => { handleQuery(); }); }; - +const onExport = () => { + try { + console.log(queryParams.value.clockDate); + proxy?.download( + 'project/attendance/exportList', + { projectId: currentProject.value?.id, clockDate: queryParams.value.clockDate }, + `考勤列表_${queryParams.value.clockDate}.xlsx` + ); + } catch (error) { + ElMessage.error('导出失败,请重试'); + console.error('文件导出错误:', error); + } +}; //监听项目id刷新数据 const listeningProject = watch( () => currentProject.value?.id, diff --git a/src/views/project/busSalaryDetails/component/detail.vue b/src/views/project/busSalaryDetails/component/detail.vue new file mode 100644 index 0000000..db5d506 --- /dev/null +++ b/src/views/project/busSalaryDetails/component/detail.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/views/project/busSalaryDetails/component/edit.vue b/src/views/project/busSalaryDetails/component/edit.vue new file mode 100644 index 0000000..0d08744 --- /dev/null +++ b/src/views/project/busSalaryDetails/component/edit.vue @@ -0,0 +1,146 @@ + + + diff --git a/src/views/project/busSalaryDetails/component/model.ts b/src/views/project/busSalaryDetails/component/model.ts new file mode 100644 index 0000000..70b95a1 --- /dev/null +++ b/src/views/project/busSalaryDetails/component/model.ts @@ -0,0 +1,57 @@ +export interface BusSalaryDetailsTableColumns { + id:number + sfzNumber:string; // 身份证 + name:string; // 户名 + account:string; // 账户 + sumDuration:number; // 当月总时长 + salary:number; // 薪水(天) + dateOfIssue:string; // 发放年月 + lister:string; // 制表人 + createdAt:string; // 创建时间 +} + + +export interface BusSalaryDetailsInfoData { + id:number|undefined; // 主键ID + sfzNumber:string|undefined; // 身份证 + name:string|undefined; // 户名 + account:string|undefined; // 账户 + sumDuration:number|undefined; // 当月总时长 + salary:number|undefined; // 薪水(天) + projectId:number|undefined; // 项目id + teamId:number|undefined; // 班组id + projectName:string|undefined; // 项目名称 + teamName:string|undefined; // 班组名称 + dateOfIssue:string|undefined; // 发放年月 + lister:string|undefined; // 制表人 + createdAt:string|undefined; // 创建时间 + updatedAt:string|undefined; // 更新时间 + deletedAt:string|undefined; // 删除时间 +} + + +export interface BusSalaryDetailsTableDataState { + ids:any[]; + tableData: { + data: Array; + total: number; + loading: boolean; + param: { + pageNum: number; + pageSize: number; + id: number|undefined; + sfzNumber: string|undefined; + projectId: number|undefined; + teamId: number|undefined; + dateRange: string[]; + }; + }; +} + + +export interface BusSalaryDetailsEditState{ + loading:boolean; + isShowDialog: boolean; + formData:BusSalaryDetailsInfoData; + rules: object; +} \ No newline at end of file diff --git a/src/views/project/busSalaryDetails/index.vue b/src/views/project/busSalaryDetails/index.vue new file mode 100644 index 0000000..227cbdb --- /dev/null +++ b/src/views/project/busSalaryDetails/index.vue @@ -0,0 +1,563 @@ + + + From 41623c7facab50af35d3091b09c43c7c661b4b4a Mon Sep 17 00:00:00 2001 From: taoge1020 Date: Tue, 16 Sep 2025 09:03:48 +0800 Subject: [PATCH 5/7] 2 --- .env.development | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.development b/.env.development index c17e50e..6f45dfa 100644 --- a/.env.development +++ b/.env.development @@ -15,7 +15,7 @@ VITE_APP_BASE_API = 'http://192.168.110.149:8899' # 罗成 # VITE_APP_BASE_API = 'http://192.168.110.188:8899' # 朱银 -VITE_APP_BASE_API = 'http://192.168.110.149:8899' +# VITE_APP_BASE_API = 'http://192.168.110.149:8899' #曾涛 # VITE_APP_BASE_API = 'http://192.168.110.171:8899' # 屈展航 From 275ba221572abc6b58a4e748dbbf8c4591ad60e1 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Tue, 16 Sep 2025 09:41:15 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=80=BB=E8=BF=9B=E5=BA=A6=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 6 +-- .../constructionSchedulePlan/types.ts | 1 + .../constructionSchedulePlan/index.vue | 43 +++++++++++++------ 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.env.development b/.env.development index c17e50e..54a314d 100644 --- a/.env.development +++ b/.env.development @@ -9,13 +9,13 @@ VITE_APP_ENV = 'development' # 李陈杰 209 # VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 李陈杰 209 -# VITE_APP_BASE_API = 'http://192.168.110.209:8899' + VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 曾涛 -VITE_APP_BASE_API = 'http://192.168.110.149:8899' +# VITE_APP_BASE_API = 'http://192.168.110.149:8899' # 罗成 # VITE_APP_BASE_API = 'http://192.168.110.188:8899' # 朱银 -VITE_APP_BASE_API = 'http://192.168.110.149:8899' +# VITE_APP_BASE_API = 'http://192.168.110.149:8899' #曾涛 # VITE_APP_BASE_API = 'http://192.168.110.171:8899' # 屈展航 diff --git a/src/api/progress/constructionSchedulePlan/types.ts b/src/api/progress/constructionSchedulePlan/types.ts index a75768b..864ed67 100644 --- a/src/api/progress/constructionSchedulePlan/types.ts +++ b/src/api/progress/constructionSchedulePlan/types.ts @@ -66,6 +66,7 @@ export interface ConstructionSchedulePlanForm extends BaseEntity { */ id?: string | number; parentId?: string | number; + projectStructureName?: string; /** * 项目ID */ diff --git a/src/views/progress/constructionSchedulePlan/index.vue b/src/views/progress/constructionSchedulePlan/index.vue index d99a8fe..3d4f00a 100644 --- a/src/views/progress/constructionSchedulePlan/index.vue +++ b/src/views/progress/constructionSchedulePlan/index.vue @@ -27,6 +27,21 @@ 新增 + + + 导入 + + + + 导出 + 展开/折叠 @@ -126,22 +141,10 @@ - + - + @@ -221,6 +224,7 @@ const initFormData = { remark: undefined, projectStructureName: undefined }; +const file = ref(); const data = reactive>({ form: { ...initFormData }, @@ -279,6 +283,17 @@ const cancel = () => { dialog.visible = false; }; +const handleExport = async () => { + const ids = queryParams.value.projectId; + proxy?.download('/progress/constructionSchedulePlan/exportTemplate/' + ids, {}, `施工里程碑计划模版.xlsx`, true); +}; + +const handleSuccess = () => { + console.log(111); + proxy.$modal.msgSuccess('操作成功'); + getList(); +}; + // 表单重置 const reset = () => { form.value = { ...initFormData }; From ef85a3cd0f1712f895e75ee9dfdeb49d49cac226 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Tue, 16 Sep 2025 16:08:13 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/materials/batchPlan/index.ts | 2 +- src/api/project/busSalaryDetails/index.ts | 15 + src/utils/request.ts | 45 ++ src/views/materials/batchPlan/index.vue | 8 +- .../busSalaryDetails/component/model.ts | 95 ++- src/views/project/busSalaryDetails/index.vue | 717 ++++++------------ 7 files changed, 333 insertions(+), 553 deletions(-) create mode 100644 src/api/project/busSalaryDetails/index.ts diff --git a/.env.development b/.env.development index 54a314d..edc5753 100644 --- a/.env.development +++ b/.env.development @@ -5,11 +5,11 @@ VITE_APP_TITLE = 煤科建管平台 VITE_APP_ENV = 'development' # 开发环境 -# VITE_APP_BASE_API = 'http://192.168.110.180:8899' +VITE_APP_BASE_API = 'http://192.168.110.180:8899' # 李陈杰 209 # VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 李陈杰 209 - VITE_APP_BASE_API = 'http://192.168.110.209:8899' +# VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 曾涛 # VITE_APP_BASE_API = 'http://192.168.110.149:8899' # 罗成 diff --git a/src/api/materials/batchPlan/index.ts b/src/api/materials/batchPlan/index.ts index 5b9690b..7031776 100644 --- a/src/api/materials/batchPlan/index.ts +++ b/src/api/materials/batchPlan/index.ts @@ -155,7 +155,7 @@ export const coryEngineeringList = (query: any): AxiosPromise => { */ export const obtainTheVersion = (query: any) => { return request({ - url: '/cailiaoshebei/mrpBase/obtainTheVersion', + url: '/design/billofquantitiesVersions/obtainAllClassification', method: 'get', params: query }); diff --git a/src/api/project/busSalaryDetails/index.ts b/src/api/project/busSalaryDetails/index.ts new file mode 100644 index 0000000..7041181 --- /dev/null +++ b/src/api/project/busSalaryDetails/index.ts @@ -0,0 +1,15 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; + +/** + * 分页查询项目薪资详情列表 + * @param query + * @returns {*} + */ +export const listBusSalaryDetails = (query?: any): AxiosPromise => { + return request({ + url: '/contractor/userSalaryDetail/salaryPageList', + method: 'get', + params: query + }); +}; diff --git a/src/utils/request.ts b/src/utils/request.ts index 0ff507c..66780df 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -212,5 +212,50 @@ export function download(url: string, params: any, fileName: string, isHeader?: downloadLoadingInstance.close(); }); } +/** + * GET 下载方法 + * @param url 请求地址 + * @param params 请求参数 + * @param fileName 保存文件名 + * @param isHeader 是否使用 json header + */ +export function downloadGet(url: string, params: any, fileName: string, isHeader?: boolean) { + downloadLoadingInstance = ElLoading.service({ + text: '正在下载数据,请稍候', + background: 'rgba(0, 0, 0, 0.7)' + }); + + // 拼接参数 + let query = tansParams(params); + if (query) { + url += '?' + query; + } + + const config = { + headers: isHeader ? { 'Content-Type': 'application/json' } : { 'Content-Type': 'application/x-www-form-urlencoded' }, + responseType: 'blob' as const + }; + + return service + .get(url, config) + .then(async (resp: any) => { + const isLogin = blobValidate(resp); + if (isLogin) { + const blob = new Blob([resp]); + FileSaver.saveAs(blob, fileName); + } else { + const resText = await resp.data.text(); + const rspObj = JSON.parse(resText); + const errMsg = (rspObj && (rspObj.msg || rspObj.message)) || '下载失败'; + ElMessage.error(errMsg); + } + downloadLoadingInstance.close(); + }) + .catch((err: any) => { + console.error(err); + ElMessage.error('下载文件出现错误,请联系管理员!'); + downloadLoadingInstance.close(); + }); +} // 导出 axios 实例 export default service; diff --git a/src/views/materials/batchPlan/index.vue b/src/views/materials/batchPlan/index.vue index 671c92b..37cc6b2 100644 --- a/src/views/materials/batchPlan/index.vue +++ b/src/views/materials/batchPlan/index.vue @@ -911,7 +911,7 @@ @@ -1496,10 +1496,10 @@ const handleAudit = async () => { }; /** 获取物资列表(按版本号筛选) */ -const getNameList = (versions: string) => { +const getNameList = (sid: string) => { coryEngineeringList({ projectId: currentProject.value?.id, - versions + sid }) .then((res: any) => { nameList.value = res.data || []; @@ -1554,7 +1554,7 @@ const listeningProject = watch( if (newId !== oldId && newId) { queryParams.value.mainData.projectId = newId; queryParams.value.batchData.projectId = newId; - form.value.mrpBaseBo.projectId = newId; + form.value.mrpBaseBo.projectId = newId as number; getList(); getVersion(); // 重新获取对应项目的版本号 } diff --git a/src/views/project/busSalaryDetails/component/model.ts b/src/views/project/busSalaryDetails/component/model.ts index 70b95a1..5c91f14 100644 --- a/src/views/project/busSalaryDetails/component/model.ts +++ b/src/views/project/busSalaryDetails/component/model.ts @@ -1,57 +1,54 @@ -export interface BusSalaryDetailsTableColumns { - id:number - sfzNumber:string; // 身份证 - name:string; // 户名 - account:string; // 账户 - sumDuration:number; // 当月总时长 - salary:number; // 薪水(天) - dateOfIssue:string; // 发放年月 - lister:string; // 制表人 - createdAt:string; // 创建时间 +export interface BusSalaryDetailsTableColumns { + id: number; + sfzNumber: string; // 身份证 + name: string; // 户名 + account: string; // 账户 + sumDuration: number; // 当月总时长 + salary: number; // 薪水(天) + dateOfIssue: string; // 发放年月 + lister: string; // 制表人 + createdAt: string; // 创建时间 } - -export interface BusSalaryDetailsInfoData { - id:number|undefined; // 主键ID - sfzNumber:string|undefined; // 身份证 - name:string|undefined; // 户名 - account:string|undefined; // 账户 - sumDuration:number|undefined; // 当月总时长 - salary:number|undefined; // 薪水(天) - projectId:number|undefined; // 项目id - teamId:number|undefined; // 班组id - projectName:string|undefined; // 项目名称 - teamName:string|undefined; // 班组名称 - dateOfIssue:string|undefined; // 发放年月 - lister:string|undefined; // 制表人 - createdAt:string|undefined; // 创建时间 - updatedAt:string|undefined; // 更新时间 - deletedAt:string|undefined; // 删除时间 +export interface BusSalaryDetailsInfoData { + id: number | undefined; // 主键ID + sfzNumber: string | undefined; // 身份证 + name: string | undefined; // 户名 + account: string | undefined; // 账户 + sumDuration: number | undefined; // 当月总时长 + salary: number | undefined; // 薪水(天) + projectId: number | undefined; // 项目id + teamId: number | undefined; // 班组id + projectName: string | undefined; // 项目名称 + teamName: string | undefined; // 班组名称 + dateOfIssue: string | undefined; // 发放年月 + lister: string | undefined; // 制表人 + createdAt: string | undefined; // 创建时间 + updatedAt: string | undefined; // 更新时间 + deletedAt: string | undefined; // 删除时间 } - export interface BusSalaryDetailsTableDataState { - ids:any[]; - tableData: { - data: Array; - total: number; - loading: boolean; - param: { - pageNum: number; - pageSize: number; - id: number|undefined; - sfzNumber: string|undefined; - projectId: number|undefined; - teamId: number|undefined; - dateRange: string[]; - }; + ids: any[]; + tableData: { + data: Array; + total: number; + loading: boolean; + param: { + pageNum: number; + pageSize: number; + id: number | undefined; + sfzNumber: string | undefined; + projectId: string | undefined; + teamId: number | undefined; + dateRange: string[]; }; + }; } - -export interface BusSalaryDetailsEditState{ - loading:boolean; - isShowDialog: boolean; - formData:BusSalaryDetailsInfoData; - rules: object; -} \ No newline at end of file +export interface BusSalaryDetailsEditState { + loading: boolean; + isShowDialog: boolean; + formData: BusSalaryDetailsInfoData; + rules: object; +} diff --git a/src/views/project/busSalaryDetails/index.vue b/src/views/project/busSalaryDetails/index.vue index 227cbdb..7192689 100644 --- a/src/views/project/busSalaryDetails/index.vue +++ b/src/views/project/busSalaryDetails/index.vue @@ -3,83 +3,80 @@ - + - - - + + + + - - - - +