30教龄教职工管理:搜索新增截止日期,新增'即将满30年 周年满30年 超30年'查询和统计; 教职工汇总的查询范围:由cnd.and("u.isThirtyTeach", "=", 1)标记,改成会员cnd.and("u.member", "=", 1);
This commit is contained in:
+29
-3
@@ -41,6 +41,8 @@ import org.nutz.mvc.upload.UploadAdaptor;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -84,14 +86,15 @@ public class ThirtyTeachController {
|
|||||||
@ApiOperation("一键设置三十龄教工")
|
@ApiOperation("一键设置三十龄教工")
|
||||||
@SaCheckPermission("thirtyTeach.manage")
|
@SaCheckPermission("thirtyTeach.manage")
|
||||||
@SLog(type = "30龄教工-教职工管理", tag = "设置三十龄教工",msg = "设置三十龄教工设置教龄${args[0]}")
|
@SLog(type = "30龄教工-教职工管理", tag = "设置三十龄教工",msg = "设置三十龄教工设置教龄${args[0]}")
|
||||||
public Result setThirtyTeach(Integer setNum, boolean isFlag){
|
public Result setThirtyTeach(Integer setNum, String deadlineDate, boolean isFlag){
|
||||||
if (isFlag) {
|
if (isFlag) {
|
||||||
sysUserService.update(Chain.make("isThirtyTeach", 0), Cnd.NEW());
|
sysUserService.update(Chain.make("isThirtyTeach", 0), Cnd.NEW());
|
||||||
}
|
}
|
||||||
|
String teachNumDate = getTeachNumDate(deadlineDate);
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("arrivalAtSchoolDate", "is not", null);
|
cnd.and("arrivalAtSchoolDate", "is not", null);
|
||||||
cnd.and("arrivalAtSchoolDate", "!=", "");
|
cnd.and("arrivalAtSchoolDate", "!=", "");
|
||||||
cnd.and("TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), CURDATE())", ">", setNum);
|
cnd.and("TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), " + teachNumDate + ")", ">=", setNum);
|
||||||
sysUserService.update(Chain.make("isThirtyTeach", 1), cnd);
|
sysUserService.update(Chain.make("isThirtyTeach", 1), cnd);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
@@ -124,6 +127,7 @@ public class ThirtyTeachController {
|
|||||||
entityList.add(new ExcelExportEntity("工号", "loginname", 20));
|
entityList.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
entityList.add(new ExcelExportEntity("姓名", "username", 20));
|
entityList.add(new ExcelExportEntity("姓名", "username", 20));
|
||||||
entityList.add(new ExcelExportEntity("性别", "sex", 20));
|
entityList.add(new ExcelExportEntity("性别", "sex", 20));
|
||||||
|
entityList.add(new ExcelExportEntity("入校时间", "arrivalAtSchoolDate", 20));
|
||||||
entityList.add(new ExcelExportEntity("教龄(年)", "teachNum", 20));
|
entityList.add(new ExcelExportEntity("教龄(年)", "teachNum", 20));
|
||||||
entityList.add(new ExcelExportEntity("电话", "mobile", 20));
|
entityList.add(new ExcelExportEntity("电话", "mobile", 20));
|
||||||
entityList.add(new ExcelExportEntity("工会", "unionName", 20));
|
entityList.add(new ExcelExportEntity("工会", "unionName", 20));
|
||||||
@@ -131,10 +135,12 @@ public class ThirtyTeachController {
|
|||||||
entityList.add(new ExcelExportEntity("在职状态", "userState", 20));
|
entityList.add(new ExcelExportEntity("在职状态", "userState", 20));
|
||||||
entityList.add(new ExcelExportEntity("教职工类别", "personType", 20));
|
entityList.add(new ExcelExportEntity("教职工类别", "personType", 20));
|
||||||
entityList.add(new ExcelExportEntity("荣誉证办理年月", "thirtyCertificateProcessingTime", 20));
|
entityList.add(new ExcelExportEntity("荣誉证办理年月", "thirtyCertificateProcessingTime", 20));
|
||||||
|
String exportDeadlineDate = getExportDeadlineDate(pageForm.getDeadlineDate());
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setTitle("30教龄教职工名单(教龄计算截止日期:" + exportDeadlineDate + ")");
|
||||||
exportParams.setType(ExcelType.XSSF);
|
exportParams.setType(ExcelType.XSSF);
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, list);
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, list);
|
||||||
CommonDownloadUtil.download("30教龄教职工名单.xlsx", workbook, response);
|
CommonDownloadUtil.download("30教龄教职工名单(截止" + exportDeadlineDate + ").xlsx", workbook, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@@ -232,5 +238,25 @@ public class ThirtyTeachController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getTeachNumDate(String deadlineDate) {
|
||||||
|
if (StrUtil.isNotBlank(deadlineDate)) {
|
||||||
|
try {
|
||||||
|
return "'" + LocalDate.parse(deadlineDate, DateTimeFormatter.ISO_LOCAL_DATE) + "'";
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "CURDATE()";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getExportDeadlineDate(String deadlineDate) {
|
||||||
|
if (StrUtil.isNotBlank(deadlineDate)) {
|
||||||
|
try {
|
||||||
|
return LocalDate.parse(deadlineDate, DateTimeFormatter.ISO_LOCAL_DATE).toString();
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return LocalDate.now().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-5
@@ -58,14 +58,18 @@ public class ThirtyTeachSummaryController {
|
|||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
su.*,
|
su.*,
|
||||||
COUNT( u.id ) AS userNum
|
COUNT( u.id ) AS userNum,
|
||||||
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, CONCAT(u.arrivalAtSchoolDate, '-01'), CURDATE()) = 29 THEN 1 ELSE 0 END) AS willThirtyNum,
|
||||||
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, CONCAT(u.arrivalAtSchoolDate, '-01'), CURDATE()) = 30 THEN 1 ELSE 0 END) AS anniversaryThirtyNum,
|
||||||
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, CONCAT(u.arrivalAtSchoolDate, '-01'), CURDATE()) > 30 THEN 1 ELSE 0 END) AS overThirtyNum
|
||||||
FROM
|
FROM
|
||||||
sys_union su
|
sys_union su
|
||||||
LEFT JOIN `vw_user` u ON u.unionid = su.id
|
LEFT JOIN `vw_user` u ON u.unionid = su.id
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("u.isThirtyTeach", "=", 1);
|
//cnd.and("u.isThirtyTeach", "=", 1);
|
||||||
|
cnd.and("u.member", "=", 1);
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||||
}
|
}
|
||||||
@@ -87,14 +91,19 @@ public class ThirtyTeachSummaryController {
|
|||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
su.*,
|
su.*,
|
||||||
COUNT( u.id ) AS userNum
|
COUNT( u.id ) AS userNum,
|
||||||
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, CONCAT(u.arrivalAtSchoolDate, '-01'), CURDATE()) = 29 THEN 1 ELSE 0 END) AS willThirtyNum,
|
||||||
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, CONCAT(u.arrivalAtSchoolDate, '-01'), CURDATE()) = 30 THEN 1 ELSE 0 END) AS anniversaryThirtyNum,
|
||||||
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, CONCAT(u.arrivalAtSchoolDate, '-01'), CURDATE()) > 30 THEN 1 ELSE 0 END) AS overThirtyNum
|
||||||
FROM
|
FROM
|
||||||
sys_union su
|
sys_union su
|
||||||
LEFT JOIN `vw_user` u ON u.unionid = su.id
|
LEFT JOIN `vw_user` u ON u.unionid = su.id
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("u.isThirtyTeach", "=", 1);
|
// cnd.and("u.isThirtyTeach", "=", 1);
|
||||||
|
//教职工汇总范围: 由标记用户改成全体会员
|
||||||
|
cnd.and("u.member", "=", 1);
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||||
}
|
}
|
||||||
@@ -110,7 +119,16 @@ public class ThirtyTeachSummaryController {
|
|||||||
no.setFormat("isAddIndex");
|
no.setFormat("isAddIndex");
|
||||||
entityList.add(no);
|
entityList.add(no);
|
||||||
entityList.add(new ExcelExportEntity("分工会", "name", 20));
|
entityList.add(new ExcelExportEntity("分工会", "name", 20));
|
||||||
ExcelExportEntity entity = new ExcelExportEntity("在职人数", "userNum", 20);
|
ExcelExportEntity willThirtyNum = new ExcelExportEntity("即将满30年", "willThirtyNum", 20);
|
||||||
|
willThirtyNum.setType(10);
|
||||||
|
entityList.add(willThirtyNum);
|
||||||
|
ExcelExportEntity anniversaryThirtyNum = new ExcelExportEntity("周年满30年", "anniversaryThirtyNum", 20);
|
||||||
|
anniversaryThirtyNum.setType(10);
|
||||||
|
entityList.add(anniversaryThirtyNum);
|
||||||
|
ExcelExportEntity overThirtyNum = new ExcelExportEntity("超过30年", "overThirtyNum", 20);
|
||||||
|
overThirtyNum.setType(10);
|
||||||
|
entityList.add(overThirtyNum);
|
||||||
|
ExcelExportEntity entity = new ExcelExportEntity("人数", "userNum", 20);
|
||||||
entity.setType(10);
|
entity.setType(10);
|
||||||
entityList.add(entity);
|
entityList.add(entity);
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
|
|||||||
+4
@@ -15,6 +15,10 @@ public class ThirtyTeachPageForm extends PageForm {
|
|||||||
private String unitId;
|
private String unitId;
|
||||||
//进校时长
|
//进校时长
|
||||||
private String teachNum;
|
private String teachNum;
|
||||||
|
//教龄标签
|
||||||
|
private String teachYearTag;
|
||||||
|
//截止日期
|
||||||
|
private String deadlineDate;
|
||||||
//办证年月
|
//办证年月
|
||||||
private String thirtyCertificateProcessingTime;
|
private String thirtyCertificateProcessingTime;
|
||||||
private String userState;
|
private String userState;
|
||||||
|
|||||||
+32
-3
@@ -15,6 +15,9 @@ import org.nutz.dao.sql.Sql;
|
|||||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhf
|
* @author zhf
|
||||||
* @date 2025/7/28 11:53
|
* @date 2025/7/28 11:53
|
||||||
@@ -28,6 +31,8 @@ public class ThirtyTeachServiceImpl extends BaseServiceImpl implements ThirtyTea
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Sql getSql(ThirtyTeachPageForm pageForm) {
|
public Sql getSql(ThirtyTeachPageForm pageForm) {
|
||||||
|
String teachNumDate = getTeachNumDate(pageForm.getDeadlineDate());
|
||||||
|
String teachNumSql = "TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), " + teachNumDate + ")";
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
id,
|
||||||
@@ -41,13 +46,14 @@ public class ThirtyTeachServiceImpl extends BaseServiceImpl implements ThirtyTea
|
|||||||
unitName,
|
unitName,
|
||||||
mobile,
|
mobile,
|
||||||
birthday,
|
birthday,
|
||||||
|
arrivalAtSchoolDate,
|
||||||
thirtyCertificateProcessingTime,
|
thirtyCertificateProcessingTime,
|
||||||
false as isEditThirtyCertificateProcessingTime,
|
false as isEditThirtyCertificateProcessingTime,
|
||||||
TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), CURDATE()) AS teachNum
|
%s AS teachNum
|
||||||
FROM
|
FROM
|
||||||
`vw_user`
|
`vw_user`
|
||||||
$condition
|
$condition
|
||||||
""");
|
""".formatted(teachNumSql));
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("isThirtyTeach", "=", 1);
|
cnd.and("isThirtyTeach", "=", 1);
|
||||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
@@ -60,7 +66,20 @@ public class ThirtyTeachServiceImpl extends BaseServiceImpl implements ThirtyTea
|
|||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
cnd.and("unionId", "=", SecurityUtil.getUnionId());
|
cnd.and("unionId", "=", SecurityUtil.getUnionId());
|
||||||
}
|
}
|
||||||
cnd.andEX("TIMESTAMPDIFF(YEAR, CONCAT(arrivalAtSchoolDate, '-01'), CURDATE())", "=", pageForm.getTeachNum());
|
if ("will30".equals(pageForm.getTeachYearTag())) {
|
||||||
|
cnd.and(teachNumSql, "=", 29);
|
||||||
|
} else if ("anniversary30".equals(pageForm.getTeachYearTag())) {
|
||||||
|
cnd.and(teachNumSql, "=", 30);
|
||||||
|
} else if ("over30".equals(pageForm.getTeachYearTag())) {
|
||||||
|
cnd.and(teachNumSql, ">", 30);
|
||||||
|
} else if ("ge30".equals(pageForm.getTeachYearTag())) {
|
||||||
|
cnd.and(teachNumSql, ">=", 30);
|
||||||
|
} else {
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getDeadlineDate())) {
|
||||||
|
cnd.and(teachNumSql, ">=", 30);
|
||||||
|
}
|
||||||
|
cnd.andEX(teachNumSql, "=", pageForm.getTeachNum());
|
||||||
|
}
|
||||||
cnd.andEX("unionId", "=", pageForm.getUnionId());
|
cnd.andEX("unionId", "=", pageForm.getUnionId());
|
||||||
cnd.andEX("unitId", "=", pageForm.getUnitId());
|
cnd.andEX("unitId", "=", pageForm.getUnitId());
|
||||||
cnd.andEX("personType", "=", pageForm.getPersonType());
|
cnd.andEX("personType", "=", pageForm.getPersonType());
|
||||||
@@ -75,4 +94,14 @@ public class ThirtyTeachServiceImpl extends BaseServiceImpl implements ThirtyTea
|
|||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getTeachNumDate(String deadlineDate) {
|
||||||
|
if (StrUtil.isNotBlank(deadlineDate)) {
|
||||||
|
try {
|
||||||
|
return "'" + LocalDate.parse(deadlineDate, DateTimeFormatter.ISO_LOCAL_DATE) + "'";
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "CURDATE()";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,9 +32,24 @@ layout("/layouts/platform.html"){
|
|||||||
<search-item label="进校时长">
|
<search-item label="进校时长">
|
||||||
<el-input placeholder="请输入进校时长" clearable v-model="pageForm.teachNum"
|
<el-input placeholder="请输入进校时长" clearable v-model="pageForm.teachNum"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@input="pageForm.teachYearTag = ''"
|
||||||
@keyup.enter.native="doSearch">
|
@keyup.enter.native="doSearch">
|
||||||
</el-input>
|
</el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
<search-item label="截止日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="pageForm.deadlineDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择截止日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 100%">
|
||||||
|
</el-date-picker>
|
||||||
|
<div v-if="pageForm.deadlineDate && pageForm.deadlineDate !== currentDate"
|
||||||
|
class="text-warning"
|
||||||
|
style="font-size: 12px; margin-top: 5px">
|
||||||
|
当前按所选截止日期计算进校时长
|
||||||
|
</div>
|
||||||
|
</search-item>
|
||||||
<search-item label="办证年份">
|
<search-item label="办证年份">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
format="yyyy"
|
format="yyyy"
|
||||||
@@ -61,7 +76,26 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool label="教职工管理">
|
<table-tool>
|
||||||
|
<template #label>
|
||||||
|
<span>教职工管理</span>
|
||||||
|
<el-tag :type="pageForm.teachYearTag === 'will30' ? '' : 'info'"
|
||||||
|
style="cursor: pointer; margin-left: 15px; margin-right: 5px; font-weight: normal"
|
||||||
|
@click="selectTeachYearTag('will30')">即将满30年
|
||||||
|
</el-tag>
|
||||||
|
<el-tag :type="pageForm.teachYearTag === 'anniversary30' ? '' : 'info'"
|
||||||
|
style="cursor: pointer; margin-right: 5px; font-weight: normal"
|
||||||
|
@click="selectTeachYearTag('anniversary30')">周年满30年
|
||||||
|
</el-tag>
|
||||||
|
<el-tag :type="pageForm.teachYearTag === 'over30' ? '' : 'info'"
|
||||||
|
style="cursor: pointer; margin-right: 10px; font-weight: normal"
|
||||||
|
@click="selectTeachYearTag('over30')">超30年
|
||||||
|
</el-tag>
|
||||||
|
<!--<el-tag :type="pageForm.teachYearTag === 'ge30' ? '' : 'info'"
|
||||||
|
style="cursor: pointer; margin-right: 10px"
|
||||||
|
@click="selectTeachYearTag('ge30')">30年及以上</el-tag>-->
|
||||||
|
</template>
|
||||||
|
|
||||||
<el-button size="small" @click="batchDelete" type="primary">
|
<el-button size="small" @click="batchDelete" type="primary">
|
||||||
批量删除
|
批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -107,6 +141,9 @@ layout("/layouts/platform.html"){
|
|||||||
<i class="fa fa-circle ml5"></i> 否
|
<i class="fa fa-circle ml5"></i> 否
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="column.prop==='arrivalAtSchoolDate'" v-slot="{row}">
|
||||||
|
{{ row.arrivalAtSchoolDate ? $moment(row.arrivalAtSchoolDate).format('YYYY-MM-DD') : '' }}
|
||||||
|
</template>
|
||||||
<template v-else-if="column.prop==='thirtyCertificateProcessingTime'" v-slot="{row}">
|
<template v-else-if="column.prop==='thirtyCertificateProcessingTime'" v-slot="{row}">
|
||||||
<span v-if="row.isEditThirtyCertificateProcessingTime">
|
<span v-if="row.isEditThirtyCertificateProcessingTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -149,12 +186,27 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-diaLog title="一键设置" :visible.sync="setThirtyTeachVisible" :close-on-click-modal="false" width="50%">
|
<el-diaLog title="一键设置" :visible.sync="setThirtyTeachVisible" :close-on-click-modal="false" width="50%">
|
||||||
|
|
||||||
<el-form label-width="120px">
|
<el-form label-width="220px">
|
||||||
<el-form-item label="设置年限">
|
<el-form-item label="设置年限(范围:大于等于)">
|
||||||
<el-input placeholder="请输入要设置的年限" v-model="setThirtyTeachData.setNum" type="number"
|
<el-input placeholder="请输入要设置的年限" v-model="setThirtyTeachData.setNum" type="number"
|
||||||
style="width: 80%"></el-input>
|
style="width: 80%"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="截止日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="setThirtyTeachData.deadlineDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择截止日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 80%">
|
||||||
|
</el-date-picker>
|
||||||
|
<div v-if="setThirtyTeachData.deadlineDate && setThirtyTeachData.deadlineDate !== currentDate"
|
||||||
|
class="text-warning"
|
||||||
|
style="font-size: 12px; margin-top: 5px">
|
||||||
|
将按所选截止日期计算满足设置年限的人员
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="更新模式">
|
<el-form-item label="更新模式">
|
||||||
<el-radio-group v-model="setThirtyTeachData.isFlag">
|
<el-radio-group v-model="setThirtyTeachData.isFlag">
|
||||||
<el-radio-button label="true">清空更新</el-radio-button>
|
<el-radio-button label="true">清空更新</el-radio-button>
|
||||||
@@ -188,6 +240,7 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'loginname', label: '工号', sortable: true},
|
{prop: 'loginname', label: '工号', sortable: true},
|
||||||
{prop: 'username', label: '姓名', sortable: true},
|
{prop: 'username', label: '姓名', sortable: true},
|
||||||
{prop: 'sex', label: '性别'},
|
{prop: 'sex', label: '性别'},
|
||||||
|
{prop: 'arrivalAtSchoolDate', label: '入校时间', sortable: true, width: 120},
|
||||||
{prop: 'teachNum', label: '进校时长(年)', sortable: true},
|
{prop: 'teachNum', label: '进校时长(年)', sortable: true},
|
||||||
{prop: 'personType', label: '教职工类别', sortable: true},
|
{prop: 'personType', label: '教职工类别', sortable: true},
|
||||||
{prop: 'userState', label: '在职状态', sortable: true},
|
{prop: 'userState', label: '在职状态', sortable: true},
|
||||||
@@ -199,8 +252,10 @@ layout("/layouts/platform.html"){
|
|||||||
],
|
],
|
||||||
|
|
||||||
setThirtyTeachVisible: false,
|
setThirtyTeachVisible: false,
|
||||||
|
currentDate: new Date().getFullYear() + '-' + String(new Date().getMonth() + 1).padStart(2, '0') + '-' + String(new Date().getDate()).padStart(2, '0'),
|
||||||
setThirtyTeachData: {
|
setThirtyTeachData: {
|
||||||
setNum: 30,
|
setNum: 29,
|
||||||
|
deadlineDate: '',
|
||||||
isFlag: false
|
isFlag: false
|
||||||
},
|
},
|
||||||
checkUsers: [],
|
checkUsers: [],
|
||||||
@@ -209,7 +264,9 @@ layout("/layouts/platform.html"){
|
|||||||
unionId: '',
|
unionId: '',
|
||||||
unitId: '',
|
unitId: '',
|
||||||
personType: '',
|
personType: '',
|
||||||
userState: ''
|
userState: '',
|
||||||
|
teachYearTag: '',
|
||||||
|
deadlineDate: ''
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -241,9 +298,26 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
},
|
},
|
||||||
doExport() {
|
doExport() {
|
||||||
const {searchKeyword, unionId, unitId, personType, userState} = this.pageForm
|
const {
|
||||||
|
searchKeyword,
|
||||||
|
unionId,
|
||||||
|
unitId,
|
||||||
|
personType,
|
||||||
|
userState,
|
||||||
|
deadlineDate,
|
||||||
|
teachYearTag
|
||||||
|
} = this.pageForm
|
||||||
window.open('/platform/thirtyTeach/manage/doExport?searchKeyword=' + searchKeyword + '&unionId=' + unionId + '&unitId=' + unitId +
|
window.open('/platform/thirtyTeach/manage/doExport?searchKeyword=' + searchKeyword + '&unionId=' + unionId + '&unitId=' + unitId +
|
||||||
'&personType=' + personType + '&userState=' + userState)
|
'&personType=' + personType + '&userState=' + userState + '&deadlineDate=' + deadlineDate + '&teachYearTag=' + teachYearTag)
|
||||||
|
},
|
||||||
|
selectTeachYearTag(value) {
|
||||||
|
if (this.pageForm.teachYearTag === value) {
|
||||||
|
this.$set(this.pageForm, "teachYearTag", "")
|
||||||
|
} else {
|
||||||
|
this.$set(this.pageForm, "teachYearTag", value)
|
||||||
|
this.$set(this.pageForm, "teachNum", "")
|
||||||
|
}
|
||||||
|
this.doSearch()
|
||||||
},
|
},
|
||||||
doSet() {
|
doSet() {
|
||||||
if (!this.setThirtyTeachData.setNum) {
|
if (!this.setThirtyTeachData.setNum) {
|
||||||
@@ -252,6 +326,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
this.$axios.post('/platform/thirtyTeach/manage/setThirtyTeach', {
|
this.$axios.post('/platform/thirtyTeach/manage/setThirtyTeach', {
|
||||||
setNum: this.setThirtyTeachData.setNum,
|
setNum: this.setThirtyTeachData.setNum,
|
||||||
|
deadlineDate: this.setThirtyTeachData.deadlineDate,
|
||||||
isFlag: this.setThirtyTeachData.isFlag,
|
isFlag: this.setThirtyTeachData.isFlag,
|
||||||
}).then(resp => {
|
}).then(resp => {
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
@@ -293,7 +368,8 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
setThirtyTeach() {
|
setThirtyTeach() {
|
||||||
this.setThirtyTeachData = {
|
this.setThirtyTeachData = {
|
||||||
setNum: 30,
|
setNum: 29,
|
||||||
|
deadlineDate: this.currentDate,
|
||||||
isFlag: false
|
isFlag: false
|
||||||
}
|
}
|
||||||
this.setThirtyTeachVisible = true
|
this.setThirtyTeachVisible = true
|
||||||
@@ -330,6 +406,8 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
this.$set(this.pageForm, "deadlineDate", this.currentDate)
|
||||||
|
this.$set(this.setThirtyTeachData, "deadlineDate", this.currentDate)
|
||||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||||
this.pageData()
|
this.pageData()
|
||||||
|
|||||||
@@ -71,7 +71,10 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'name', label: '分工会名称', sortable: true},
|
{prop: 'name', label: '分工会名称', sortable: true},
|
||||||
{prop: 'userNum', label: '在职人数', sortable: true},
|
{prop: 'willThirtyNum', label: '即将满30年', sortable: true},
|
||||||
|
{prop: 'anniversaryThirtyNum', label: '周年满30年', sortable: true},
|
||||||
|
{prop: 'overThirtyNum', label: '超过30年', sortable: true},
|
||||||
|
{prop: 'userNum', label: '人数', sortable: true},
|
||||||
],
|
],
|
||||||
unionOptions: [],
|
unionOptions: [],
|
||||||
unitOptions: [],
|
unitOptions: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user