feat(personnelMatters): 添加加班详情页面并优化相关功能

- 新增加班详情页面路由和组件
- 修改请假管理页面,注释掉操作列
- 优化员工餐费统计导出功能- 修复人员事项相关页面的路由跳转问题
This commit is contained in:
tzy 2025-06-05 09:04:01 +08:00
parent 892e1e2633
commit d11269c954
7 changed files with 40 additions and 23 deletions

View File

@ -30,7 +30,7 @@ export function updateStatistics(data) {
export function exportStatistics(query) {
return request({
url: '/restaurant/statistics/export',
method: 'get',
method: 'post',
params: query
})
}

View File

@ -91,6 +91,19 @@ export const constantRoutes = [
meta: { title: '个人中心', icon: 'user' }
}
]
},
{
path: '/personnelMatters/overTimeDetail',
component: Layout,
hidden: true,
children: [
{
path: 'index',
component: () => import('@/views/personnelMatters/overTimeDetail/index'),
name: 'OverTimeDetail',
meta: { title: '加班详情', activeMenu: '/personnelMatters/overTime' }
}
]
}
]

View File

@ -42,7 +42,7 @@
v-hasPermi="['attendance:statistical:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="info"
plain
@ -51,7 +51,7 @@
@click="handleimport"
v-hasPermi="['attendance:statistical:import']"
>导入</el-button>
</el-col>
</el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -123,7 +123,7 @@
@click="handlemiddleDetail(scope.row)">{{ scope.row.middleShiftNumber}}
</el-button>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -360,7 +360,7 @@
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>

View File

@ -38,7 +38,7 @@
</el-row>
<el-table v-loading="loading" :data="leaveList">
<el-table-column label="部门" align="center" prop="deptName" />
<el-table-column label="员工姓名" align="center" prop="name" >
<template slot-scope="scope">
@ -59,7 +59,7 @@
<el-table-column label="陪产假时长" align="center" prop="paternityHours" />
<el-table-column label="丧假时长" align="center" prop="funeralHours" />
<el-table-column label="工伤假时长" align="center" prop="workHours" />
<el-table-column label="操作" align="center" width="200">
<!-- <el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button
size="mini"
@ -68,17 +68,17 @@
@click="handleDelete(scope.row)"
v-hasPermi="['personnelMatters:leave:remove']"
>删除</el-button>
<el-button
&lt;!&ndash; <el-button
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.leaveHours==0"
@click="handleUpdate(scope.row)"
v-hasPermi="['personnelMatters:leave:edit']"
>修改</el-button>
>修改</el-button>&ndash;&gt;
</template>
</el-table-column>
</el-table-column>-->
</el-table>
<pagination
@ -191,7 +191,7 @@
<el-button @click="cancelDetail"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -214,7 +214,6 @@ export default {
autoCalculation: true,
leaveTitle:"请假详情",
leaveDrawer:false,
holidaysType:[],
//
detailList: [],
@ -233,7 +232,7 @@ export default {
],
}
},
//
loading: true,
//
@ -285,7 +284,7 @@ export default {
methods: {
getholidaysType(){
getNewDicts("holidays_type").then(res => {
this.detail.holidaysType = res.data;
this.detail.holidaysType = res.data;
});
},
//

View File

@ -285,10 +285,10 @@ export default {
},
handleDetail(row){
this.$router.push({
path: "/personnelMatters/overTimeDetail",
path: "/personnelMatters/overTimeDetail/index",
query: {
overTimeId: row.id,
name:row.name
name: row.name
}
});
},

View File

@ -128,9 +128,14 @@ export default {
};
},
created() {
var param = this.$route.query
this.queryParams.name = param.name;
this.queryParams.overTimeId = param.overTimeId;
const { overTimeId, name } = this.$route.query;
if (!overTimeId || !name) {
this.$modal.msgError("参数错误");
this.$router.push("/personnelMatters/overTime");
return;
}
this.queryParams.name = name;
this.queryParams.overTimeId = overTimeId;
this.getList();
},
methods: {

View File

@ -278,9 +278,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('restaurant/statistics/export', {
...this.queryParams
}, `员工餐费明细_${new Date().getTime()}.xlsx`)
exportStatistics(this.queryParams).then(response => {
this.downloadExcel(response.msg);
})
},
/** 科大实习生导出 */
handleExportKd(){