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) { export function exportStatistics(query) {
return request({ return request({
url: '/restaurant/statistics/export', url: '/restaurant/statistics/export',
method: 'get', method: 'post',
params: query params: query
}) })
} }

View File

@ -91,6 +91,19 @@ export const constantRoutes = [
meta: { title: '个人中心', icon: 'user' } 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']" v-hasPermi="['attendance:statistical:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="info" type="info"
plain plain
@ -51,7 +51,7 @@
@click="handleimport" @click="handleimport"
v-hasPermi="['attendance:statistical:import']" v-hasPermi="['attendance:statistical:import']"
>导入</el-button> >导入</el-button>
</el-col> </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -123,7 +123,7 @@
@click="handlemiddleDetail(scope.row)">{{ scope.row.middleShiftNumber}} @click="handlemiddleDetail(scope.row)">{{ scope.row.middleShiftNumber}}
</el-button> </el-button>
</el-table-column> </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"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -360,7 +360,7 @@
<el-button @click="upload.open = false"> </el-button> <el-button @click="upload.open = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>

View File

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

View File

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

View File

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