flx:修改bug

This commit is contained in:
Rain_ 2025-06-25 16:33:11 +08:00
parent b3e919fb79
commit 2541fc6a54
5 changed files with 124 additions and 42 deletions

View File

@ -3,8 +3,8 @@
<template v-if="setDialog == false">
<div class="searchBox whiteBlock">
<el-form size="medium" :model="pageInfo" ref="queryForm" :inline="true">
<el-form-item label="考勤组名称" prop="riskPointName">
<el-input v-model="pageInfo.riskPointName" placeholder="请输入"></el-input>
<el-form-item label="考勤组名称" prop="groupName">
<el-input v-model="pageInfo.groupName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="handleQuery">查询</el-button>
@ -175,7 +175,7 @@
待选择人员({{ selectLeftTableData.length }}/{{ staffInfo.total }})
</div>
<div>
<el-checkbox v-model="searchInfo.checked">包含下级</el-checkbox>
<el-checkbox @change="getUpdatePersonListFn" v-model="searchInfo.checked">包含下级</el-checkbox>
</div>
</div>
<div class="flex">
@ -626,7 +626,7 @@
待选择人员({{ selectLeftTableData.length }}/{{ staffInfo.total }})
</div>
<div>
<el-checkbox v-model="searchInfo.checked">包含下级</el-checkbox>
<el-checkbox @change="getUpdatePersonListFn" v-model="searchInfo.checked">包含下级</el-checkbox>
</div>
</div>
<div class="flex">
@ -874,6 +874,7 @@ export default {
total: 0,
pageNo: 1,
pageSize: 10,
groupName: "",
},
rulesList: [],
personList: [],
@ -952,13 +953,16 @@ export default {
mounted() {
this.getDataList();
this.getEnterpriseListFn();
this.getTeamList();
this.getDepartmentList();
// this.getTeamList();
// this.getDepartmentList();
},
methods: {
setAddPersonnelDialog() {
this.selectList = [];
this.getUpdatePersonListFn();
this.selectRightTableData = [];
this.selectInfo.total = this.selectList.length;
this.getRiskListLibraryList();
this.title = "新增";
// this.$nextTick(() => {
// this.$refs["attendanceInfo"].clearValidate();
@ -991,6 +995,9 @@ export default {
},
setControlListDialog(type, row) {
this.batchSettingType = type;
this.selectRightTableData = [];
this.selectList = [];
this.selectInfo.total = this.selectList.length;
if (row && row.id) {
this.attendanceInfo = {
...row,
@ -1006,7 +1013,9 @@ export default {
} else if (type == 2 || type == 3) {
this.getSelectedPersonListFn();
}
this.$nextTick(() => {
this.$refs["attendanceInfo"].clearValidate();
});
this.setDialog = true;
},
@ -1083,15 +1092,19 @@ export default {
});
},
onEnterpriseChange() {
// this.selectWorkerInfo.teamId = "";
// this.selectWorkerInfo.departmentId = "";
// this.getTeamList();
// this.getDepartmentList();
this.selectWorkerInfo.teamId = "";
this.selectWorkerInfo.departmentId = "";
this.teamOptions = [];
this.departmentOptions = [];
if(this.selectWorkerInfo.enterpriseId) {
this.getTeamList();
this.getDepartmentList();
}
},
/** 查询班组列表 */
getTeamList() {
const params = {
// enterpriseId: this.selectWorkerInfo.enterpriseId,
enterpriseId: this.selectWorkerInfo.enterpriseId,
projectSn: this.$store.state.projectSn,
};
teamList(params).then((res) => {
@ -1102,7 +1115,7 @@ export default {
/** 查询部门列表 */
getDepartmentList() {
const params = {
// enterpriseId: this.selectWorkerInfo.enterpriseId,
enterpriseId: this.selectWorkerInfo.enterpriseId,
projectSn: this.$store.state.projectSn,
};
departmentList(params).then((res) => {
@ -1177,6 +1190,7 @@ export default {
projectSn: this.$store.state.projectSn,
pageNo: this.pageInfo.pageNo,
pageSize: this.pageInfo.pageSize,
groupName: this.pageInfo.groupName,
};
getWorkerAttendanceGroupV2PageApi(requestData).then((res) => {
this.rulesList = res.result.records;
@ -1189,12 +1203,14 @@ export default {
},
handleRefresh() {
this.pageInfo.pageNo = 1;
this.pageInfo.groupName = "";
this.getDataList();
},
handleNodeClick(data) {
console.log(data);
this.selectedInfo = {};
this.treeListDetail = data;
this.selectLeftTableData = [];
this.getUpdatePersonListFn();
},
selectSearchTypeChange() {

View File

@ -348,7 +348,7 @@
<div class="switch-box">
<div>是否开启加班</div>
<el-switch v-model="workerInfo.isOpenOvertime"> </el-switch>
<div></div>
<div>{{workerInfo.isOpenOvertime ? '是': ''}}</div>
</div>
<template v-if="workerInfo.isOpenOvertime">
<div class="rules-box">
@ -690,7 +690,7 @@ export default {
ratio2dayHour: "",
ratio2dayDay: "",
ratio2dayLess1: "",
isOpenOvertime: "",
isOpenOvertime: false,
overtimeHourType: "",
dailyHour: "",
overtimeHourStart: "",

View File

@ -2122,7 +2122,7 @@
</el-table-column>
<el-table-column align="center" prop="deductScore" label="生效时间">
<template slot-scope="scope">
{{scope.row.effect_begin ? scope.row.effect_begin : "--"}} - {{scope.row.effect_end ? scope.row.effect_end : "--"}}
{{scope.row.effectBegin ? scope.row.effectBegin : "--"}} - {{scope.row.effectEnd ? scope.row.effectEnd : "长期"}}
</template>
</el-table-column>
</el-table>

View File

@ -67,7 +67,7 @@
<el-form-item label="姓名" prop="workerName">
<el-input v-model="queryParams.workerName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="日期范围" prop="month">
<el-form-item label="月份" prop="month">
<el-date-picker
v-model="queryParams.month"
type="month"
@ -76,6 +76,38 @@
>
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="日期范围" prop="effectiveTime">
<el-date-picker
:picker-options="pickerOptions"
v-model="queryParams.effectiveTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:clearable="false"
>
</el-date-picker>
</el-form-item> -->
<el-form-item label="工时范围" prop="effectiveTime">
<div class="hourval">
<el-input-number
:controls="false"
v-model="queryParams.hourVal_begin"
controls-position="right"
:min="0"
:max="queryParams.hourVal_end ? queryParams.hourVal_end : 100"
></el-input-number>
<p>-</p>
<el-input-number
:controls="false"
v-model="queryParams.hourVal_end"
controls-position="right"
:min="queryParams.hourVal_begin ? queryParams.hourVal_begin : 0"
:max="100"
></el-input-number>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="handleQuery">查询</el-button>
<el-button type="warning" plain @click="handleRefresh">刷新</el-button>
@ -85,7 +117,9 @@
</el-form-item>
</el-form>
</div>
<div class="table-header">{{ $store.state.currentProDetail.projectName }}项目异常工时统计表</div>
<div class="table-header">
{{ $store.state.currentProDetail.projectName }}项目异常工时统计表
</div>
<el-table
ref="multipleTable"
:data="tableData"
@ -140,7 +174,7 @@
>
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.inTimeList" :key="index">
{{ item.inTimeList ? item.inTimeList : "--" }}
{{ item.inTimeList ? item.inTimeList : "--" }}
</div>
<span v-if="scope.row.inTimeList.length == 0">--</span>
</template>
@ -153,7 +187,7 @@
>
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.outTimeList" :key="index">
{{ item.inTimeList ? item.inTimeList : "--" }}
{{ item.inTimeList ? item.inTimeList : "--" }}
</div>
<span v-if="scope.row.outTimeList.length == 0">--</span>
</template>
@ -204,6 +238,9 @@ export default {
departmentId: "",
workerName: "",
month: "",
effectiveTime: [],
hourVal_begin: "",
hourVal_end: "",
},
total: 0,
personTypeList: [
@ -234,8 +271,8 @@ export default {
this.getQualityRegionList();
this.getEnterpriseListFn();
this.getTeamList();
this.getDepartmentList();
// this.getTeamList();
// this.getDepartmentList();
},
methods: {
//
@ -249,15 +286,19 @@ export default {
});
},
onEnterpriseChange() {
// this.queryParams.teamId = "";
// this.queryParams.departmentId = "";
// this.getTeamList();
// this.getDepartmentList();
this.queryParams.teamId = "";
this.queryParams.departmentId = "";
this.teamOptions = [];
this.departmentOptions = [];
if(this.queryParams.enterpriseId) {
this.getTeamList();
this.getDepartmentList();
}
},
/** 查询班组列表 */
getTeamList() {
const params = {
// enterpriseId: this.queryParams.enterpriseId,
enterpriseId: this.queryParams.enterpriseId,
projectSn: this.$store.state.projectSn,
};
teamList(params).then((res) => {
@ -268,7 +309,7 @@ export default {
/** 查询部门列表 */
getDepartmentList() {
const params = {
// enterpriseId: this.queryParams.enterpriseId,
enterpriseId: this.queryParams.enterpriseId,
projectSn: this.$store.state.projectSn,
};
departmentList(params).then((res) => {
@ -290,6 +331,8 @@ export default {
teamId: this.queryParams.teamId,
departmentId: this.queryParams.departmentId,
workerName: this.queryParams.workerName,
hourVal_begin: this.queryParams.hourVal_begin,
hourVal_end: this.queryParams.hourVal_end,
};
this.exportDownload(requestData, objFn[command], "异常工时统计表.xlsx");
}
@ -343,7 +386,13 @@ export default {
this.queryParams.teamId = "";
this.queryParams.departmentId = "";
this.queryParams.workerName = "";
this.queryParams.hourVal_begin = "";
this.queryParams.hourVal_end = "";
this.queryParams.month = dayjs().format("YYYY-MM");
this.queryParams.effectiveTime = [
dayjs().startOf("month").format("YYYY-MM-DD"),
dayjs().endOf("month").format("YYYY-MM-DD"),
];
this.getQualityRegionList();
},
//
@ -358,18 +407,20 @@ export default {
teamId: this.queryParams.teamId,
departmentId: this.queryParams.departmentId,
workerName: this.queryParams.workerName,
hourVal_begin: this.queryParams.hourVal_begin,
hourVal_end: this.queryParams.hourVal_end,
};
// getQualityRegionListApi
getExceptionHourStatisticsListApi(data).then((res) => {
console.log(res);
if (res.code == 200) {
this.tableData = res.result.records.map(item => {
this.tableData = res.result.records.map((item) => {
return {
...item,
outTimeList: item.outTimeList instanceof Array ? item.outTimeList : [],
inTimeList: item.inTimeList instanceof Array ? item.inTimeList : [],
}
...item,
outTimeList: item.outTimeList instanceof Array ? item.outTimeList : [],
inTimeList: item.inTimeList instanceof Array ? item.inTimeList : [],
};
});
this.total = res.result.total;
}
@ -379,6 +430,17 @@ export default {
};
</script>
<style lang="less" scoped>
.hourval {
display: flex;
align-items: center;
justify-content: space-between;
> p {
margin: 0 8px;
}
.el-input-number {
width: 85px;
}
}
.table-header {
display: flex;
justify-content: center;

View File

@ -240,8 +240,8 @@ export default {
this.getQualityRegionList();
this.getEnterpriseListFn();
this.getTeamList();
this.getDepartmentList();
// this.getTeamList();
// this.getDepartmentList();
},
methods: {
getPickDate(pick) {
@ -274,15 +274,19 @@ export default {
});
},
onEnterpriseChange() {
// this.queryParams.teamId = "";
// this.queryParams.departmentId = "";
// this.getTeamList();
// this.getDepartmentList();
this.queryParams.teamId = "";
this.queryParams.departmentId = "";
this.teamOptions = [];
this.departmentOptions = [];
if(this.queryParams.enterpriseId) {
this.getTeamList();
this.getDepartmentList();
}
},
/** 查询班组列表 */
getTeamList() {
const params = {
// enterpriseId: this.queryParams.enterpriseId,
enterpriseId: this.queryParams.enterpriseId,
projectSn: this.$store.state.projectSn,
};
teamList(params).then((res) => {
@ -293,7 +297,7 @@ export default {
/** 查询部门列表 */
getDepartmentList() {
const params = {
// enterpriseId: this.queryParams.enterpriseId,
enterpriseId: this.queryParams.enterpriseId,
projectSn: this.$store.state.projectSn,
};
departmentList(params).then((res) => {