Merge remote-tracking branch 'origin/main'
# Conflicts: # src/main/java/com/budwk/app/zhgh/democratic/suggestionBox/controller/SuggestionBoxQueryController.java # src/main/java/com/budwk/app/zhgh/democratic/suggestionBox/controller/SuggestionXghController.java # src/main/resources/views/platform/zhgh/democratic/suggestionBox/query/index.html # src/main/resources/views/platform/zhgh/democratic/suggestionBox/xgh/index.html
This commit is contained in:
+2
-1
@@ -32,6 +32,7 @@ import org.nutz.mvc.annotation.Ok;
|
|||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@@ -80,7 +81,7 @@ public class CadreTrainingSignUpController {
|
|||||||
@ApiOperation("提交申请")
|
@ApiOperation("提交申请")
|
||||||
@SaCheckPermission(value = {"cadreTraining.branchUnionSignUp", "h5.cadreTraining.branchUnionSignUp"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"cadreTraining.branchUnionSignUp", "h5.cadreTraining.branchUnionSignUp"}, mode = SaMode.OR)
|
||||||
public Result submit(@Param("data") CadreTrainingSignUp cadreTrainingSignUp) {
|
public Result submit(@Param("data") CadreTrainingSignUp cadreTrainingSignUp) {
|
||||||
if (StrUtil.isBlank(cadreTrainingSignUp.getId())) cadreTrainingSignUp.setApplyTime(DateUtil.now());
|
if (StrUtil.isBlank(cadreTrainingSignUp.getId())) cadreTrainingSignUp.setApplyTime(new Date());
|
||||||
|
|
||||||
dao.insertOrUpdate(cadreTrainingSignUp);
|
dao.insertOrUpdate(cadreTrainingSignUp);
|
||||||
// 开启流程实例
|
// 开启流程实例
|
||||||
|
|||||||
+3
-2
@@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
import org.nutz.dao.entity.annotation.*;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -80,8 +81,8 @@ public class CadreTrainingSignUp extends BaseModel {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("报名时间")
|
@Comment("报名时间")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private String applyTime;
|
private Date applyTime;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("备注")
|
@Comment("备注")
|
||||||
|
|||||||
+116
@@ -0,0 +1,116 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.exerciseCard.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.exerciseCard.model.ExerciseCard;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.exerciseCard.service.ExerciseCardService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : hongqiwei
|
||||||
|
* @description :
|
||||||
|
* @createDate : 2025/10/13 15:00
|
||||||
|
*/
|
||||||
|
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/exerciseCard/apply")
|
||||||
|
@Api("健身卡-信息填报")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
public class ExerciseCardApplyController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
@Inject
|
||||||
|
private ExerciseCardService exerciseCardService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/dayofficework/exerciseCard/apply/index.html")
|
||||||
|
@SaCheckPermission("exerciseCard.apply")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("保存申请")
|
||||||
|
@SaCheckPermission(value = {"exerciseCard.apply", "h5.exerciseCard.apply"}, mode = SaMode.OR)
|
||||||
|
@SLog(tag = "健身卡-信息填报", msg = "保存信息填报")
|
||||||
|
public Result save(@Param("data") ExerciseCard exerciseCard) {
|
||||||
|
if (StrUtil.isBlank(exerciseCard.getId())) exerciseCard.setApplyTime(new Date());
|
||||||
|
dao.insertOrUpdate(exerciseCard);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result findOne(String id) {
|
||||||
|
return Result.success(baseService.dao().fetch(ExerciseCard.class, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("获取受助人")
|
||||||
|
@SaCheckPermission("exerciseCard.apply")
|
||||||
|
public Result queryUsers(String key){
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
loginname,
|
||||||
|
username,
|
||||||
|
birthday,
|
||||||
|
mobile,
|
||||||
|
sex,
|
||||||
|
unitName,
|
||||||
|
unionName,
|
||||||
|
unionId,
|
||||||
|
unitId
|
||||||
|
FROM
|
||||||
|
`vw_user`
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
|
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_OPERATOR.name())) {
|
||||||
|
cnd.and("unionId", "=", SecurityUtil.getUnionId());
|
||||||
|
} else {
|
||||||
|
cnd.and("id", "=", SecurityUtil.getUserId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Strings.isNotBlank(key)) {
|
||||||
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
group.orLike("username", key);
|
||||||
|
group.orLike("loginname", key);
|
||||||
|
cnd.and(group);
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = exerciseCardService.listPageMap(1, 10, sql);
|
||||||
|
return Result.success().addData(pagination.getList());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
+145
@@ -0,0 +1,145 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.exerciseCard.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.excel.EasyExcel;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.exerciseCard.service.ExerciseCardService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.exerciseCard.vo.ExercisePeopleImportVo;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.maternityLeave.service.MaternityLeaveService;
|
||||||
|
import com.budwk.app.zhgh.staffmanage.member.vo.MemberImportVo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.AdaptBy;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
import org.nutz.mvc.upload.UploadAdaptor;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : hongqiwei
|
||||||
|
* @description :
|
||||||
|
* @createDate : 2025/10/13 15:11
|
||||||
|
*/
|
||||||
|
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/exerciseCard/query")
|
||||||
|
@Api("查询条件")
|
||||||
|
@Ok("json:full")
|
||||||
|
@Slf4j
|
||||||
|
public class ExerciseCardQueryController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private ExerciseCardService exerciseCardService;
|
||||||
|
|
||||||
|
@At("/index")
|
||||||
|
@Ok("beetl:/platform/zhgh/dayofficework/exerciseCard/query/index.html")
|
||||||
|
@SaCheckPermission("exerciseCard.query")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission(value = {"exerciseCard.query", "h5.exerciseCard.query"}, mode = SaMode.OR)
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
Integer year,
|
||||||
|
String unionId,
|
||||||
|
String unitId,
|
||||||
|
String searchKeyword,
|
||||||
|
String sex) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
// 年度查询条件
|
||||||
|
cnd.andEX("year(applyTime)", "=", year);
|
||||||
|
|
||||||
|
// 姓名和工号查询条件
|
||||||
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 工会、单位名称查询条件
|
||||||
|
cnd.andEX("unionId", "=", unionId);
|
||||||
|
cnd.andEX("unitId", "=", unitId);
|
||||||
|
|
||||||
|
// 性别查询条件
|
||||||
|
cnd.andEX("sex", "=", sex);
|
||||||
|
|
||||||
|
cnd.desc("applyTime");
|
||||||
|
Pagination pagination = exerciseCardService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission(value = {"exerciseCard.query", "h5.exerciseCard.query"}, mode = SaMode.OR)
|
||||||
|
@SLog( tag = "删除工会报销", msg = "删除工会报销")
|
||||||
|
public Result delete(@Param("id") String id) {
|
||||||
|
exerciseCardService.delete(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@ApiOperation("导入模板下载")
|
||||||
|
@SaCheckPermission("exerciseCard.query")
|
||||||
|
public void downloadTemplate(HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
String fileName = URLEncoder.encode("人员导入模版", "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
|
EasyExcel.write(response.getOutputStream(), ExercisePeopleImportVo.class)
|
||||||
|
.sheet("人员导入模版")
|
||||||
|
.doWrite(ArrayList::new);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("导出失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@ApiOperation("导入人员")
|
||||||
|
@SaCheckPermission("exerciseCard.query")
|
||||||
|
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||||
|
public Result importData(TempFile file, Boolean isFlag) {
|
||||||
|
try {
|
||||||
|
System.out.println(isFlag);
|
||||||
|
NutMap nutMap = exerciseCardService.handlingMemberImport(file, isFlag);
|
||||||
|
if (Lang.isNotEmpty(nutMap)) {
|
||||||
|
return Result.success(nutMap);
|
||||||
|
}
|
||||||
|
return Result.success("导入成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.error();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.exerciseCard.model;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : hongqiwei
|
||||||
|
* @description :
|
||||||
|
* @createDate : 2025/10/13 14:39
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("exercise_card")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("健身卡")
|
||||||
|
public class ExerciseCard extends BaseModel implements Serializable {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("userId")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("性别")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATE)
|
||||||
|
@Comment("出生年月")
|
||||||
|
private Date birthday;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("工号")
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("所在工会Id")
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("所在工会")
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
@Comment("所在单位Id")
|
||||||
|
private String unitId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||||
|
@Comment("所在单位")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("初始额度")
|
||||||
|
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
|
||||||
|
private Double initMoney;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("当前额度")
|
||||||
|
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
|
||||||
|
private Double money;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("健身卡使用情况记录")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> usages;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("录入时间")
|
||||||
|
private Date applyTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.exerciseCard.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.exerciseCard.model.ExerciseCard;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
|
||||||
|
|
||||||
|
public interface ExerciseCardService extends BaseService<ExerciseCard> {
|
||||||
|
/**
|
||||||
|
* 导入会员数据处理
|
||||||
|
* @param file 文件
|
||||||
|
* @param isFlag 是否清空更新
|
||||||
|
*/
|
||||||
|
NutMap handlingMemberImport(TempFile file, Boolean isFlag);
|
||||||
|
}
|
||||||
+178
@@ -0,0 +1,178 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.exerciseCard.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.base.utils.EasyExcelUtil;
|
||||||
|
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
||||||
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.exerciseCard.model.ExerciseCard;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.exerciseCard.service.ExerciseCardService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.exerciseCard.vo.ExercisePeopleImportVo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
|
import org.nutz.lang.random.R;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
import org.nutz.dao.entity.Record;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : hongqiwei
|
||||||
|
* @description :
|
||||||
|
* @createDate : 2025/10/13 15:19
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class ExerciseCardServiceImpl extends BaseServiceImpl<ExerciseCard> implements ExerciseCardService {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ManyAddOrRenewUtil manyAddOrRenewUtil;
|
||||||
|
|
||||||
|
public ExerciseCardServiceImpl(Dao dao) {super(dao);}
|
||||||
|
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@Override
|
||||||
|
public NutMap handlingMemberImport(TempFile file, Boolean isFlag) {
|
||||||
|
List<T> ts = EasyExcelUtil.syncReadModel(file.getFile(), ExercisePeopleImportVo.class, 0, 1);
|
||||||
|
List<ExercisePeopleImportVo> list = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(ExercisePeopleImportVo.class);
|
||||||
|
|
||||||
|
// 获取系统用户
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
List<Sys_user> dataUserList = dao().query(Sys_user.class, cnd);
|
||||||
|
Map<String, Sys_user> userMap = dataUserList.stream().collect(Collectors.toMap(Sys_user::getLoginname, v -> v));
|
||||||
|
|
||||||
|
Sql vwUserSql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
loginname,
|
||||||
|
username,
|
||||||
|
birthday,
|
||||||
|
mobile,
|
||||||
|
sex,
|
||||||
|
unitName,
|
||||||
|
unionName,
|
||||||
|
unionId,
|
||||||
|
unitId
|
||||||
|
FROM
|
||||||
|
`vw_user`
|
||||||
|
""");
|
||||||
|
vwUserSql.setCallback(Sqls.callback.records());
|
||||||
|
dao().execute(vwUserSql);
|
||||||
|
List<Record> vwUserList = vwUserSql.getList(Record.class);
|
||||||
|
Map<String, Record> vwUserMap = vwUserList.stream().collect(Collectors.toMap(r -> r.getString("loginname"), r -> r));
|
||||||
|
|
||||||
|
List<ExerciseCard> exerciseCardList = new ArrayList<>();
|
||||||
|
List<Sys_user> insertOrUpdateUserList = new ArrayList<>();
|
||||||
|
|
||||||
|
//返回错误记录
|
||||||
|
List<ExercisePeopleImportVo> errorInfos = new ArrayList<>();
|
||||||
|
|
||||||
|
for (ExercisePeopleImportVo v : list) {
|
||||||
|
if (StrUtil.isNotBlank(v.getLoginName())) {
|
||||||
|
v.setLoginName(v.getLoginName().trim());
|
||||||
|
} else {
|
||||||
|
v.setErrorInfo("工号不能为空!");
|
||||||
|
errorInfos.add(v);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断是否在系统中
|
||||||
|
Sys_user user = userMap.get(v.getLoginName());
|
||||||
|
|
||||||
|
if (user == null) {
|
||||||
|
v.setErrorInfo("该人员没有录入系统中!");
|
||||||
|
errorInfos.add(v);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//设置excel列的数据
|
||||||
|
user.setUsername(v.getUsername());
|
||||||
|
if (StrUtil.isNotBlank(v.getSex())) {
|
||||||
|
user.setSex(v.getSex());
|
||||||
|
}
|
||||||
|
|
||||||
|
insertOrUpdateUserList.add(user);
|
||||||
|
|
||||||
|
// 创建运动卡记录并设置用户详细信息
|
||||||
|
ExerciseCard exerciseCard = new ExerciseCard();
|
||||||
|
exerciseCard.setId(R.UU32());
|
||||||
|
|
||||||
|
// 根据工号查询vw_user视图,设置人员信息
|
||||||
|
Record vwUser = vwUserMap.get(v.getLoginName());
|
||||||
|
if (vwUser != null) {
|
||||||
|
exerciseCard.setUserId(vwUser.getString("id"));
|
||||||
|
exerciseCard.setBirthday(DateUtil.parse(vwUser.getString("birthday"), "yyyy-MM-dd"));
|
||||||
|
exerciseCard.setUnionId(vwUser.getString("unionId"));
|
||||||
|
exerciseCard.setUnitId(vwUser.getString("unitId"));
|
||||||
|
exerciseCard.setSex(vwUser.getString("sex"));
|
||||||
|
exerciseCard.setUnionName(vwUser.getString("unionName"));
|
||||||
|
exerciseCard.setUnitName(vwUser.getString("unitName"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置其他基本信息
|
||||||
|
exerciseCard.setLoginName(v.getLoginName());
|
||||||
|
exerciseCard.setUserName(v.getUsername());
|
||||||
|
exerciseCard.setApplyTime(new Date()); // 设置当前时间为申请时间
|
||||||
|
|
||||||
|
// 设置额度信息
|
||||||
|
if (v.getInitMoney() != null) {
|
||||||
|
try {
|
||||||
|
exerciseCard.setInitMoney(Double.valueOf(v.getInitMoney()));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
v.setErrorInfo("初始额度格式错误!");
|
||||||
|
errorInfos.add(v);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (v.getMoney() != null) {
|
||||||
|
try {
|
||||||
|
exerciseCard.setMoney(Double.valueOf(v.getMoney()));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
v.setErrorInfo("当前额度格式错误!");
|
||||||
|
errorInfos.add(v);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exerciseCardList.add(exerciseCard);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Lang.isNotEmpty(insertOrUpdateUserList)) {
|
||||||
|
manyAddOrRenewUtil.asyncExecuteInsertOrUpdate(insertOrUpdateUserList,200);
|
||||||
|
|
||||||
|
// 批量保存运动卡记录
|
||||||
|
if (Lang.isNotEmpty(exerciseCardList)) {
|
||||||
|
manyAddOrRenewUtil.asyncExecuteInsert(exerciseCardList,200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果有错误数据就返回给前端
|
||||||
|
if (Lang.isNotEmpty(errorInfos)) {
|
||||||
|
NutMap nutMap = NutMap.NEW();
|
||||||
|
nutMap.setv("totalCount", list.size());
|
||||||
|
nutMap.setv("successCount", Math.max(list.size() - errorInfos.size(), 0));
|
||||||
|
nutMap.setv("errorCount", errorInfos.size());
|
||||||
|
nutMap.setv("errorList", errorInfos.stream().map(v -> {
|
||||||
|
return NutMap.NEW().addv("工号", v.getLoginName()).addv("姓名", v.getUsername()).addv("错误原因", v.getErrorInfo());
|
||||||
|
}).collect(Collectors.toList()));
|
||||||
|
return nutMap;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.exerciseCard.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
|
||||||
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @Author hongqiwei
|
||||||
|
* @name:ExercisePeopleImportVo
|
||||||
|
* @Date 2025/10/14 10:04
|
||||||
|
* @注释
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode
|
||||||
|
@ContentRowHeight(20) // 内容行高
|
||||||
|
@HeadRowHeight(20) // 表头行高
|
||||||
|
@ColumnWidth(25) //列宽
|
||||||
|
public class ExercisePeopleImportVo {
|
||||||
|
|
||||||
|
@ExcelProperty("工号")
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@ExcelProperty("姓名")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ExcelProperty("性别")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
@ExcelProperty("工会")
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
@ExcelProperty("单位")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@ExcelProperty("初始额度")
|
||||||
|
private Double initMoney;
|
||||||
|
|
||||||
|
@ExcelProperty("当前额度")
|
||||||
|
private Double money;
|
||||||
|
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String errorInfo;
|
||||||
|
|
||||||
|
}
|
||||||
+216
@@ -0,0 +1,216 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.model.ExcelImportRes;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.base.utils.EasyExcelUtil;
|
||||||
|
import com.budwk.app.sys.views.View_user;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.healthCheckup.template.HealthCheckupImportTemp;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.model.RetireSouvenirsBatch;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.model.RetireSouvenirsLedger;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.service.RetireSouvenirsBatchService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.template.RetireSouvenirsImportTemp;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.mvc.annotation.AdaptBy;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
import org.nutz.mvc.upload.UploadAdaptor;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsBatchController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 9:51
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@Ok("json:full")
|
||||||
|
@ApiOperation("批次管理")
|
||||||
|
@At("/platform/retireSouvenirs/batch")
|
||||||
|
public class RetireSouvenirsBatchController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private RetireSouvenirsBatchService batchService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/dayofficework/retiresouvenirs/batch/index.html")
|
||||||
|
@SaCheckPermission("retireSouvenirs.batch")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("retireSouvenirs.batch")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "year") Integer year) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
select
|
||||||
|
b.*,
|
||||||
|
u.username as userName,
|
||||||
|
(select count(1) from retire_souvenirs_ledger where batchId = b.id) as count
|
||||||
|
from
|
||||||
|
retire_souvenirs_batch b
|
||||||
|
left join vw_user u on u.id = b .createdBy
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
|
cnd.andEX("b.year", "=", year);
|
||||||
|
cnd.and(Cnd.likeEX("b.name", pageForm.getSearchKeyword()));
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = batchService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/修改批次")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("retireSouvenirs.batch")
|
||||||
|
@SLog(tag = "退休人员纪念品-批次管理", msg = "新增/修改批次")
|
||||||
|
public Result submit(RetireSouvenirsBatch batch) {
|
||||||
|
batchService.insertOrUpdate(batch);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除批次")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("retireSouvenirs.batch")
|
||||||
|
@SLog(tag = "退休人员纪念品-批次管理", msg = "删除批次")
|
||||||
|
public Result delete(String id) {
|
||||||
|
batchService.delete(id);
|
||||||
|
batchService.dao().clear(RetireSouvenirsLedger.class, Cnd.where(RetireSouvenirsLedger::getBatchId, "=", id));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询批次")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("retireSouvenirs")
|
||||||
|
public Result selectList() {
|
||||||
|
List<RetireSouvenirsBatch> list = batchService.query(Cnd.NEW().desc(RetireSouvenirsBatch::getCreatedAt));
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@ApiOperation("下载人员名单导入模版")
|
||||||
|
@SaCheckPermission("retireSouvenirs.batch")
|
||||||
|
public void downloadTem(HttpServletResponse response) {
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
entities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("退休时间", "retireTime", 20));
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
||||||
|
CommonDownloadUtil.download("退休人员名单导入模版.xlsx", workbook, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("退休人员名单导入")
|
||||||
|
@SLog(tag = "退休人员纪念品-批次管理", msg = "人员名单导入")
|
||||||
|
@SaCheckPermission("retireSouvenirs.batch")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||||
|
public Result temImport(TempFile file, String batchId, String type) {
|
||||||
|
|
||||||
|
if(StrUtil.isBlank(batchId)) {
|
||||||
|
return Result.error("批次信息为空");
|
||||||
|
}
|
||||||
|
if("clear".equals(type)) {
|
||||||
|
dao.clear(RetireSouvenirsLedger.class, Cnd.where(RetireSouvenirsLedger::getBatchId, "=", batchId));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<T> ts = EasyExcelUtil.syncReadModel(file.getFile(), RetireSouvenirsImportTemp.class, 0, 1);
|
||||||
|
List<RetireSouvenirsImportTemp> importTemps = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(RetireSouvenirsImportTemp.class);
|
||||||
|
|
||||||
|
List<String> loginNames = importTemps.stream().map(RetireSouvenirsImportTemp::getLoginName).filter(Strings::isNotBlank).toList();
|
||||||
|
List<View_user> userList = dao.query(View_user.class, Cnd.where(View_user::getLoginname, "in", loginNames));
|
||||||
|
Map<String, View_user> userMap = userList.stream().collect(Collectors.toMap(View_user::getLoginname, o -> o));
|
||||||
|
|
||||||
|
String[] patterns = {
|
||||||
|
"yyyy-MM-dd",
|
||||||
|
"yyyy/MM/dd",
|
||||||
|
"yyyy-MM",
|
||||||
|
"yyyy/MM",
|
||||||
|
"yyyyMM",
|
||||||
|
"yyyyMMdd",
|
||||||
|
"yyyy年MM月dd日",
|
||||||
|
"yyyy年M月d日"
|
||||||
|
};
|
||||||
|
|
||||||
|
List<RetireSouvenirsLedger> result = new ArrayList<>();
|
||||||
|
for (int i = 0; i < importTemps.size(); i++) {
|
||||||
|
RetireSouvenirsImportTemp temp = importTemps.get(i);
|
||||||
|
|
||||||
|
if (StrUtil.isBlank(temp.getLoginName())) {
|
||||||
|
temp.setErrInfo("工号为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (importTemps.stream().filter(s -> s.getLoginName().equals(temp.getLoginName())).count() > 1) {
|
||||||
|
temp.setErrInfo("重复数据", i + 1);
|
||||||
|
}
|
||||||
|
View_user user = userMap.get(temp.getLoginName());
|
||||||
|
if (user == null) {
|
||||||
|
temp.setErrInfo("无此用户", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime retireTime = DateUtil.parse(temp.getRetireTime(), patterns);
|
||||||
|
String format = DateUtil.format(retireTime, DatePattern.NORM_DATE_PATTERN);
|
||||||
|
|
||||||
|
RetireSouvenirsLedger ledger = new RetireSouvenirsLedger();
|
||||||
|
ledger.setBatchId(batchId);
|
||||||
|
ledger.setUserId(user.getId());
|
||||||
|
ledger.setReceive(false);
|
||||||
|
ledger.setRetireTime(format);
|
||||||
|
result.add(ledger);
|
||||||
|
}
|
||||||
|
|
||||||
|
dao.insert(result);
|
||||||
|
// 创建结果集
|
||||||
|
ExcelImportRes<RetireSouvenirsImportTemp> excelImportRes = new ExcelImportRes<>();
|
||||||
|
excelImportRes.setTotalRecords(importTemps.size());
|
||||||
|
excelImportRes.setSuccessCount(Math.max(result.size() - excelImportRes.getFailedCount(), 0));
|
||||||
|
// 添加错误记录
|
||||||
|
excelImportRes.setErrorDetails(importTemps.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).toList());
|
||||||
|
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||||
|
|
||||||
|
return Result.success(excelImportRes);
|
||||||
|
}
|
||||||
|
}
|
||||||
+227
@@ -0,0 +1,227 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.message.service.GlobalMessageSendService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.model.RetireSouvenirsLedger;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.model.RetireSouvenirsMsg;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.service.RetireSouvenirsLedgerService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.vo.RetireSouvenirsLedgerPageForm;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.entity.annotation.SQL;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsLedgerController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 9:52
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@Ok("json:full")
|
||||||
|
@ApiOperation("人员台账")
|
||||||
|
@At("/platform/retireSouvenirs/ledger")
|
||||||
|
public class RetireSouvenirsLedgerController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private RetireSouvenirsLedgerService ledgerService;
|
||||||
|
@Inject
|
||||||
|
private GlobalMessageSendService sendService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/dayofficework/retiresouvenirs/ledger/index.html")
|
||||||
|
@SaCheckPermission("retireSouvenirs.ledger")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("retireSouvenirs.ledger")
|
||||||
|
public Result pageData(RetireSouvenirsLedgerPageForm pageForm) {
|
||||||
|
Sql sql = this.generateSql(pageForm);
|
||||||
|
Pagination pagination = ledgerService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除人员")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("retireSouvenirs.ledger")
|
||||||
|
@SLog(tag = "退休人员纪念品-人员台账", msg = "删除人员")
|
||||||
|
public Result delete(String id) {
|
||||||
|
ledgerService.delete(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("设置领取状态")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("retireSouvenirs.ledger")
|
||||||
|
@SLog(tag = "退休人员纪念品-人员台账", msg = "设置领取状态")
|
||||||
|
public Result receive(String id) {
|
||||||
|
RetireSouvenirsLedger ledger = ledgerService.fetch(id);
|
||||||
|
ledger.setReceive(!ledger.getReceive());
|
||||||
|
ledgerService.update(ledger);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("短信提醒")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("retireSouvenirs.ledger")
|
||||||
|
@SLog(tag = "退休人员纪念品-人员台账", msg = "短信提醒")
|
||||||
|
public Result msg(@Param(value = "pageForm") RetireSouvenirsLedgerPageForm pageForm,
|
||||||
|
@Param(value = "message") String message) {
|
||||||
|
Sql sql = this.generateSql(pageForm);
|
||||||
|
List<NutMap> listMap = ledgerService.listMap(sql);
|
||||||
|
|
||||||
|
List<RetireSouvenirsMsg> msgList = listMap.stream().map(o -> {
|
||||||
|
RetireSouvenirsMsg msg = new RetireSouvenirsMsg();
|
||||||
|
msg.setBatchId(pageForm.getBatchId());
|
||||||
|
msg.setUserId(o.getString("userId"));
|
||||||
|
msg.setSendUserId(SecurityUtil.getUserId());
|
||||||
|
msg.setSendUserName(SecurityUtil.getUserUsername());
|
||||||
|
msg.setMessage(message);
|
||||||
|
msg.setSendTime(DateUtil.now());
|
||||||
|
return msg;
|
||||||
|
}).toList();
|
||||||
|
List<String> list = listMap.stream().map(o -> o.getString("loginName")).toList();
|
||||||
|
|
||||||
|
sendService.sendMessage("智慧工会", message, list);
|
||||||
|
dao.insert(msgList);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询短信发送记录")
|
||||||
|
@SaCheckPermission("retireSouvenirs.ledger")
|
||||||
|
public Result selectMsgList(String batchId, String userId) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and(RetireSouvenirsMsg::getBatchId, "=", batchId);
|
||||||
|
cnd.and(RetireSouvenirsMsg::getUserId, "=", userId);
|
||||||
|
cnd.desc(RetireSouvenirsMsg::getSendTime);
|
||||||
|
List<RetireSouvenirsMsg> list = dao.query(RetireSouvenirsMsg.class, cnd);
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除短信发送记录")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("retireSouvenirs.ledger")
|
||||||
|
@SLog(tag = "退休人员纪念品-人员台账", msg = "删除短信发送记录")
|
||||||
|
public Result deleteMsg(String id) {
|
||||||
|
dao.delete(RetireSouvenirsMsg.class, id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("retireSouvenirs.ledger")
|
||||||
|
@ApiOperation("导出退休人员名单")
|
||||||
|
public void download(RetireSouvenirsLedgerPageForm pageForm,
|
||||||
|
HttpServletResponse response) {
|
||||||
|
Sql sql = this.generateSql(pageForm);
|
||||||
|
List<NutMap> listMap = ledgerService.listMap(sql);
|
||||||
|
|
||||||
|
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||||
|
exportEntities.add(new ExcelExportEntity("姓名", "userName", 16));
|
||||||
|
exportEntities.add(new ExcelExportEntity("工号", "loginName", 16));
|
||||||
|
exportEntities.add(new ExcelExportEntity("性别", "sex", 10));
|
||||||
|
exportEntities.add(new ExcelExportEntity("联系方式", "mobile", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属单位", "unitName", 30));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属工会", "unionName", 30));
|
||||||
|
exportEntities.add(new ExcelExportEntity("退休时间", "retireTimeFormat", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("是否领取", "receiveStatus", 10));
|
||||||
|
exportEntities.add(new ExcelExportEntity("签字", "sign", 20));
|
||||||
|
|
||||||
|
try {
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, listMap);
|
||||||
|
CommonDownloadUtil.download("退休人员名单台账.xlsx", workbook, response);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Sql generateSql(RetireSouvenirsLedgerPageForm pageForm) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
l.*,
|
||||||
|
u.userName,
|
||||||
|
u.loginName,
|
||||||
|
u.sex,
|
||||||
|
u.mobile,
|
||||||
|
u.unitName,
|
||||||
|
u.unionName,
|
||||||
|
if(l.receive = true, '已领取', '未领取') as receiveStatus,
|
||||||
|
DATE_FORMAT(l.retireTime, '%Y-%m') as retireTimeFormat,
|
||||||
|
(select count(1) from retire_souvenirs_msg where batchId = l.batchId and userId = l.userId) as msgCount
|
||||||
|
FROM
|
||||||
|
retire_souvenirs_ledger l
|
||||||
|
LEFT JOIN vw_user u ON u.id = l.userId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
|
cnd.andEX("l.batchId", "=", pageForm.getBatchId());
|
||||||
|
cnd.andEX("year(l.retireTime)", "=", pageForm.getYear());
|
||||||
|
if("prev".equals(pageForm.getSelectTime())) {
|
||||||
|
String time = DateUtil.thisYear() + "-" + String.format("%02d", pageForm.getMonth()) + "-01";
|
||||||
|
cnd.andEX("l.retireTime", "<", time);
|
||||||
|
} else {
|
||||||
|
cnd.andEX("month(l.retireTime)", "=", pageForm.getMonth());
|
||||||
|
}
|
||||||
|
cnd.andEX("u.unitId", "=", pageForm.getUnitId());
|
||||||
|
cnd.andEX("u.unionId", "=", pageForm.getUnionId());
|
||||||
|
cnd.andEX("l.receive", "=", pageForm.getReceive());
|
||||||
|
|
||||||
|
if(StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
group.orLike("u.userName", pageForm.getSearchKeyword());
|
||||||
|
group.orLike("u.loginName", pageForm.getSearchKeyword());
|
||||||
|
cnd.and(group);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.asc("l.receive").asc("l.retireTime");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return sql;
|
||||||
|
}
|
||||||
|
}
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsBatch
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 9:52
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description 退休人员纪念品批次管理
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Table
|
||||||
|
@Comment("退休人员纪念品-批次管理")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class RetireSouvenirsBatch extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Column
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("年度")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("批次名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("备注")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 600)
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
+54
@@ -0,0 +1,54 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsLedger
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 9:52
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description 退休人员纪念品人员台账管理
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Table
|
||||||
|
@Comment("退休人员纪念品-人员台账")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class RetireSouvenirsLedger extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Column
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("批次id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String batchId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("人员Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("退休时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String retireTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否领取")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("0")
|
||||||
|
private Boolean receive;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("领取时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String receiveTime;
|
||||||
|
}
|
||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsMsg
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/15 10:03
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Table
|
||||||
|
@Comment("退休人员纪念品-短信发送记录")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class RetireSouvenirsMsg extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Column
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("批次id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String batchId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("人员Id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("发送人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String sendUserId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("发送人姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String sendUserName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("发送内容")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 600)
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("发送时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
private String sendTime;
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.model.RetireSouvenirsBatch;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsBatchService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 14:22
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface RetireSouvenirsBatchService extends BaseService<RetireSouvenirsBatch> {
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.model.RetireSouvenirsLedger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsLedgerService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 14:22
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface RetireSouvenirsLedgerService extends BaseService<RetireSouvenirsLedger> {
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.model.RetireSouvenirsBatch;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.service.RetireSouvenirsBatchService;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsBatchServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 14:22
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class RetireSouvenirsBatchServiceImpl extends BaseServiceImpl<RetireSouvenirsBatch> implements RetireSouvenirsBatchService {
|
||||||
|
|
||||||
|
public RetireSouvenirsBatchServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.model.RetireSouvenirsLedger;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.retiresouvenirs.service.RetireSouvenirsLedgerService;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsLedgerServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 14:23
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class RetireSouvenirsLedgerServiceImpl extends BaseServiceImpl<RetireSouvenirsLedger> implements RetireSouvenirsLedgerService {
|
||||||
|
|
||||||
|
public RetireSouvenirsLedgerServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.template;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
|
||||||
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
||||||
|
import com.budwk.app.base.model.ExcelImportError;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsImportTemp
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/14 15:21
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ContentRowHeight(20)
|
||||||
|
@HeadRowHeight(20)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
public class RetireSouvenirsImportTemp extends ExcelImportError {
|
||||||
|
|
||||||
|
@ExcelProperty("工号" )
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@ExcelProperty("姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@ExcelProperty("退休时间")
|
||||||
|
private String retireTime;
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.retiresouvenirs.vo;
|
||||||
|
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RetireSouvenirsLedgerPageForm
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/10/15 9:52
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RetireSouvenirsLedgerPageForm extends PageForm {
|
||||||
|
|
||||||
|
private String batchId;
|
||||||
|
private Integer year;
|
||||||
|
private Integer month;
|
||||||
|
private String unitId;
|
||||||
|
private String unionId;
|
||||||
|
private String selectTime;
|
||||||
|
private Boolean receive;
|
||||||
|
}
|
||||||
+3
-3
@@ -84,7 +84,7 @@ public class UnionReimburseApplyController {
|
|||||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||||
@SLog(type = "unionReimburse", tag = "工会报销-报销申请", msg = "保存报销申请")
|
@SLog(type = "unionReimburse", tag = "工会报销-报销申请", msg = "保存报销申请")
|
||||||
public Result save(@Param("data") UnionReimburse unionReimburse) {
|
public Result save(@Param("data") UnionReimburse unionReimburse) {
|
||||||
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(new Date());
|
||||||
dao.insertOrUpdate(unionReimburse);
|
dao.insertOrUpdate(unionReimburse);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ public class UnionReimburseApplyController {
|
|||||||
@ApiOperation("提交申请")
|
@ApiOperation("提交申请")
|
||||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||||
public Result submit(@Param("data") UnionReimburse unionReimburse) {
|
public Result submit(@Param("data") UnionReimburse unionReimburse) {
|
||||||
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(new Date());
|
||||||
|
|
||||||
dao.insertOrUpdate(unionReimburse);
|
dao.insertOrUpdate(unionReimburse);
|
||||||
// 开启流程实例
|
// 开启流程实例
|
||||||
@@ -115,7 +115,7 @@ public class UnionReimburseApplyController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||||
public Result submitAgain(@Param("data") UnionReimburse unionReimburse, @Param("taskId") Long taskId) {
|
public Result submitAgain(@Param("data") UnionReimburse unionReimburse, @Param("taskId") Long taskId) {
|
||||||
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(new Date());
|
||||||
|
|
||||||
dao.insertOrUpdate(unionReimburse);
|
dao.insertOrUpdate(unionReimburse);
|
||||||
|
|
||||||
|
|||||||
+8
-4
@@ -24,6 +24,7 @@ import org.nutz.dao.Cnd;
|
|||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -71,7 +72,7 @@ public class UnionReimburseCollectController {
|
|||||||
@Param(value = "unionId") String unionId,
|
@Param(value = "unionId") String unionId,
|
||||||
@Param(value = "unitId") String unitId,
|
@Param(value = "unitId") String unitId,
|
||||||
@Param(value = "reimburseProject") String reimburseProject,
|
@Param(value = "reimburseProject") String reimburseProject,
|
||||||
@Param(value = "userName") String userName) {
|
@Param(value = "userName") String searchKeyword) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.*,
|
info.*,
|
||||||
@@ -108,9 +109,12 @@ public class UnionReimburseCollectController {
|
|||||||
|
|
||||||
// 报销项目查询条件
|
// 报销项目查询条件
|
||||||
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
||||||
// 经办人姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 只查询流程实例状态为20的数据(已完成状态)
|
// 只查询流程实例状态为20的数据(已完成状态)
|
||||||
|
|||||||
+12
-8
@@ -18,6 +18,7 @@ import org.nutz.aop.interceptor.ioc.TransAop;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -61,11 +62,11 @@ public class UnionReimburseMineController {
|
|||||||
@ApiOperation("分页查询")
|
@ApiOperation("分页查询")
|
||||||
@SaCheckPermission(value = {"unionReimburse.mine", "h5.unionReimburse.mine"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"unionReimburse.mine", "h5.unionReimburse.mine"}, mode = SaMode.OR)
|
||||||
public Result pageData(PageForm pageForm,
|
public Result pageData(PageForm pageForm,
|
||||||
@Param(value = "year") Integer year,
|
Integer year,
|
||||||
@Param(value = "unionId") String unionId,
|
String unionId,
|
||||||
@Param(value = "unitId") String unitId,
|
String unitId,
|
||||||
@Param(value = "reimburseProject") String reimburseProject,
|
String reimburseProject,
|
||||||
@Param(value = "userName") String userName) {
|
String searchKeyword) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.*,
|
info.*,
|
||||||
@@ -102,9 +103,12 @@ public class UnionReimburseMineController {
|
|||||||
|
|
||||||
// 报销项目查询条件
|
// 报销项目查询条件
|
||||||
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
||||||
// 经办人姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
cnd.desc("info.createTime");
|
cnd.desc("info.createTime");
|
||||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
|
|||||||
+8
-4
@@ -18,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -57,7 +58,7 @@ public class UnionReimburseReviewController {
|
|||||||
String unionId,
|
String unionId,
|
||||||
String unitId,
|
String unitId,
|
||||||
String reimburseProject,
|
String reimburseProject,
|
||||||
String userName) {
|
String searchKeyword) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.*,
|
info.*,
|
||||||
@@ -106,9 +107,12 @@ public class UnionReimburseReviewController {
|
|||||||
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
cnd.andEX("info.reimburseProject", "=", reimburseProject);
|
||||||
|
|
||||||
|
|
||||||
// 经办人姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("info.createTime");
|
cnd.desc("info.createTime");
|
||||||
|
|||||||
+3
-3
@@ -50,7 +50,7 @@ public class UnionReimburseFundSourceInterceptor implements FlowInterceptor {
|
|||||||
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
||||||
detail.setProjectName(unionReimburse.getActivityName());
|
detail.setProjectName(unionReimburse.getActivityName());
|
||||||
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
||||||
detail.setActivityTime(unionReimburse.getCreateTime());
|
detail.setActivityTime(String.valueOf(unionReimburse.getCreateTime()));
|
||||||
detail.setOutlayManageId(outlayManageSchool.getId());
|
detail.setOutlayManageId(outlayManageSchool.getId());
|
||||||
|
|
||||||
dao.insert(detail);
|
dao.insert(detail);
|
||||||
@@ -74,7 +74,7 @@ public class UnionReimburseFundSourceInterceptor implements FlowInterceptor {
|
|||||||
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
||||||
detail.setProjectName(unionReimburse.getActivityName());
|
detail.setProjectName(unionReimburse.getActivityName());
|
||||||
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
||||||
detail.setActivityTime(unionReimburse.getCreateTime());
|
detail.setActivityTime(String.valueOf(unionReimburse.getCreateTime()));
|
||||||
detail.setOutlayManageId(outlayManageUnion.getId());
|
detail.setOutlayManageId(outlayManageUnion.getId());
|
||||||
|
|
||||||
dao.insert(detail);
|
dao.insert(detail);
|
||||||
@@ -98,7 +98,7 @@ public class UnionReimburseFundSourceInterceptor implements FlowInterceptor {
|
|||||||
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
detail.setAdjustReason(unionReimburse.getReimburseProject());
|
||||||
detail.setProjectName(unionReimburse.getActivityName());
|
detail.setProjectName(unionReimburse.getActivityName());
|
||||||
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
detail.setActivityNumber(unionReimburse.getActivityNumber());
|
||||||
detail.setActivityTime(unionReimburse.getCreateTime());
|
detail.setActivityTime(String.valueOf(unionReimburse.getCreateTime()));
|
||||||
detail.setOutlayManageId(outlayManageClub.getId());
|
detail.setOutlayManageId(outlayManageClub.getId());
|
||||||
|
|
||||||
dao.insert(detail);
|
dao.insert(detail);
|
||||||
|
|||||||
+4
-4
@@ -172,7 +172,7 @@ public class UnionReimburse extends BaseModel {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("慰问时间")
|
@Comment("慰问时间")
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private Date condolenceTime;
|
private Date condolenceTime;
|
||||||
|
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ public class UnionReimburse extends BaseModel {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("活动时间")
|
@Comment("活动时间")
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private Date activityTime;
|
private Date activityTime;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@@ -222,7 +222,7 @@ public class UnionReimburse extends BaseModel {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("申请时间")
|
@Comment("申请时间")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private String createTime;
|
private Date createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-3
@@ -1,5 +1,6 @@
|
|||||||
package com.budwk.app.zhgh.democratic.suggestionBox.controller;
|
package com.budwk.app.zhgh.democratic.suggestionBox.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -52,7 +53,12 @@ public class SuggestionBoxQueryController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission(value = {"suggestionBox.query", "h5.suggestionBox.query"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"suggestionBox.query", "h5.suggestionBox.query"}, mode = SaMode.OR)
|
||||||
public Result pageData(Integer pageNumber, Integer pageSize, String searchKeyword, Integer year, String unionId, String unitId) {
|
public Result pageData(Integer pageNumber,
|
||||||
|
Integer pageSize,
|
||||||
|
String searchKeyword,
|
||||||
|
String unionId,
|
||||||
|
String unitId,
|
||||||
|
Integer year) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.id,
|
info.id,
|
||||||
@@ -90,8 +96,11 @@ public class SuggestionBoxQueryController {
|
|||||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.where().andLike("info.title", searchKeyword);
|
cnd.where().andLike("info.title", searchKeyword);
|
||||||
}
|
}
|
||||||
cnd.and("info.unionId", "=", unionId);
|
// 工会、单位名称查询条件
|
||||||
cnd.and("info.unitId", "=", unitId);
|
cnd.andEX("unionId", "=", unionId);
|
||||||
|
cnd.andEX("unitId", "=", unitId);
|
||||||
|
// 只查询流程实例状态为20的数据(已完成状态)
|
||||||
|
cnd.and("ins.state", "=", 20);
|
||||||
cnd.desc("info.submitTime");
|
cnd.desc("info.submitTime");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination<NutMap> pagination = suggestionBoxService.listPageMap(pageNumber, pageSize, sql);
|
Pagination<NutMap> pagination = suggestionBoxService.listPageMap(pageNumber, pageSize, sql);
|
||||||
|
|||||||
+11
-3
@@ -15,6 +15,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -51,7 +52,13 @@ public class SuggestionXghController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission(value = {"suggestionBox.xgh", "h5.suggestionBox.xgh"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"suggestionBox.xgh", "h5.suggestionBox.xgh"}, mode = SaMode.OR)
|
||||||
public Result pageData(PageForm pageForm, String taskId, String searchKeyword, Integer year, String unionId, String unitId, boolean approval) {
|
public Result pageData(PageForm pageForm,
|
||||||
|
String taskId,
|
||||||
|
String searchKeyword,
|
||||||
|
Integer year,
|
||||||
|
String unionId,
|
||||||
|
String unitId,
|
||||||
|
boolean approval) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.id,
|
info.id,
|
||||||
@@ -102,8 +109,9 @@ public class SuggestionXghController {
|
|||||||
cnd.where().andLike("info.title", searchKeyword);
|
cnd.where().andLike("info.title", searchKeyword);
|
||||||
}
|
}
|
||||||
|
|
||||||
cnd.and("info.unionId", "=", unionId);
|
// 工会、单位名称查询条件
|
||||||
cnd.and("info.unitId", "=", unitId);
|
cnd.andEX("unionId", "=", unionId);
|
||||||
|
cnd.andEX("unitId", "=", unitId);
|
||||||
|
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("info.submitTime");
|
cnd.desc("info.submitTime");
|
||||||
|
|||||||
+8
-4
@@ -23,6 +23,7 @@ import org.nutz.aop.interceptor.ioc.TransAop;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -70,7 +71,7 @@ public class DsznfmtxCollectController {
|
|||||||
Integer year,
|
Integer year,
|
||||||
String unionId,
|
String unionId,
|
||||||
String unitId,
|
String unitId,
|
||||||
String userName,
|
String searchKeyword,
|
||||||
String sex) {
|
String sex) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -109,9 +110,12 @@ public class DsznfmtxCollectController {
|
|||||||
// 性别查询条件
|
// 性别查询条件
|
||||||
cnd.andEX("info.sex", "=", sex);
|
cnd.andEX("info.sex", "=", sex);
|
||||||
|
|
||||||
// 姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 只查询流程实例状态为20的数据(已完成状态)
|
// 只查询流程实例状态为20的数据(已完成状态)
|
||||||
|
|||||||
+8
-4
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -59,7 +60,7 @@ public class DsznfmtxSchoolAuditController {
|
|||||||
Integer year,
|
Integer year,
|
||||||
String unionId,
|
String unionId,
|
||||||
String unitId,
|
String unitId,
|
||||||
String userName,
|
String searchKeyword,
|
||||||
String sex) {
|
String sex) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -108,9 +109,12 @@ public class DsznfmtxSchoolAuditController {
|
|||||||
// 性别查询条件
|
// 性别查询条件
|
||||||
cnd.andEX("info.sex", "=", sex);
|
cnd.andEX("info.sex", "=", sex);
|
||||||
|
|
||||||
// 姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("info.applyTime");
|
cnd.desc("info.applyTime");
|
||||||
|
|||||||
+8
-4
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -59,7 +60,7 @@ public class DsznfmtxUnionAuditController {
|
|||||||
Integer year,
|
Integer year,
|
||||||
String unionId,
|
String unionId,
|
||||||
String unitId,
|
String unitId,
|
||||||
String userName,
|
String searchKeyword,
|
||||||
String sex) {
|
String sex) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -108,9 +109,12 @@ public class DsznfmtxUnionAuditController {
|
|||||||
// 性别查询条件
|
// 性别查询条件
|
||||||
cnd.andEX("info.sex", "=", sex);
|
cnd.andEX("info.sex", "=", sex);
|
||||||
|
|
||||||
// 姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("info.applyTime");
|
cnd.desc("info.applyTime");
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.budwk.app.base.model.BaseModel;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.nutz.dao.entity.annotation.*;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -24,11 +25,10 @@ import java.util.List;
|
|||||||
@Comment("独生子女父母退休")
|
@Comment("独生子女父母退休")
|
||||||
public class Dsznfmtx extends BaseModel implements Serializable {
|
public class Dsznfmtx extends BaseModel implements Serializable {
|
||||||
|
|
||||||
@Column
|
|
||||||
@Name
|
@Name
|
||||||
@Comment("id")
|
@Comment("id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@Prev(els = {@EL("uuid()")})
|
@PrevInsert(uu32 = true)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@@ -47,7 +47,7 @@ public class Dsznfmtx extends BaseModel implements Serializable {
|
|||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("出生年月")
|
@Comment("出生年月")
|
||||||
private Date birthday;
|
private Date birthday;
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ public class Dsznfmtx extends BaseModel implements Serializable {
|
|||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("退休时间")
|
@Comment("退休时间")
|
||||||
private Date retireTime;
|
private Date retireTime;
|
||||||
|
|
||||||
@@ -97,17 +97,17 @@ public class Dsznfmtx extends BaseModel implements Serializable {
|
|||||||
private String loverUnitName;
|
private String loverUnitName;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("结婚日期")
|
@Comment("结婚日期")
|
||||||
private Date marryTime;
|
private Date marryTime;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("子女出生日期")
|
@Comment("子女出生日期")
|
||||||
private Date childrenBirthday;
|
private Date childrenBirthday;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("领独生子女证时间")
|
@Comment("领独生子女证时间")
|
||||||
private Date getCertificateTime;
|
private Date getCertificateTime;
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ public class Dsznfmtx extends BaseModel implements Serializable {
|
|||||||
private String bonus;
|
private String bonus;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME,width = 50)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
@Comment("申请时间")
|
@Comment("申请时间")
|
||||||
private Date applyTime;
|
private Date applyTime;
|
||||||
|
|
||||||
|
|||||||
+9
-5
@@ -24,6 +24,7 @@ import org.nutz.aop.interceptor.ioc.TransAop;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -66,12 +67,12 @@ public class MaternityLeaveCollectController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("分页查询")
|
@ApiOperation("分页查询")
|
||||||
@SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"maternityLeave.collect", "h5.maternityLeave.collect"}, mode = SaMode.OR)
|
||||||
public Result pageData(PageForm pageForm,
|
public Result pageData(PageForm pageForm,
|
||||||
Integer year,
|
Integer year,
|
||||||
String unionId,
|
String unionId,
|
||||||
String unitId,
|
String unitId,
|
||||||
String userName,
|
String searchKeyword,
|
||||||
String sex) {
|
String sex) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -110,9 +111,12 @@ public class MaternityLeaveCollectController {
|
|||||||
// 性别查询条件
|
// 性别查询条件
|
||||||
cnd.andEX("info.sex", "=", sex);
|
cnd.andEX("info.sex", "=", sex);
|
||||||
|
|
||||||
// 姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 只查询流程实例状态为20的数据(已完成状态)
|
// 只查询流程实例状态为20的数据(已完成状态)
|
||||||
|
|||||||
+8
-4
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -59,7 +60,7 @@ public class MaternityLeaveSchoolAuditController {
|
|||||||
Integer year,
|
Integer year,
|
||||||
String unionId,
|
String unionId,
|
||||||
String unitId,
|
String unitId,
|
||||||
String userName,
|
String searchKeyword,
|
||||||
String sex) {
|
String sex) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -108,9 +109,12 @@ public class MaternityLeaveSchoolAuditController {
|
|||||||
// 性别查询条件
|
// 性别查询条件
|
||||||
cnd.andEX("info.sex", "=", sex);
|
cnd.andEX("info.sex", "=", sex);
|
||||||
|
|
||||||
// 姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("info.applyTime");
|
cnd.desc("info.applyTime");
|
||||||
|
|||||||
+8
-4
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -59,7 +60,7 @@ public class MaternityLeaveUnionAuditController {
|
|||||||
Integer year,
|
Integer year,
|
||||||
String unionId,
|
String unionId,
|
||||||
String unitId,
|
String unitId,
|
||||||
String userName,
|
String searchKeyword,
|
||||||
String sex) {
|
String sex) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -108,9 +109,12 @@ public class MaternityLeaveUnionAuditController {
|
|||||||
// 性别查询条件
|
// 性别查询条件
|
||||||
cnd.andEX("info.sex", "=", sex);
|
cnd.andEX("info.sex", "=", sex);
|
||||||
|
|
||||||
// 姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("info.applyTime");
|
cnd.desc("info.applyTime");
|
||||||
|
|||||||
+9
-8
@@ -1,9 +1,11 @@
|
|||||||
package com.budwk.app.zhgh.staffbenefit.maternityLeave.models;
|
package com.budwk.app.zhgh.staffbenefit.maternityLeave.models;
|
||||||
|
|
||||||
|
import com.aspose.slides.internal.og.all;
|
||||||
import com.budwk.app.base.model.BaseModel;
|
import com.budwk.app.base.model.BaseModel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.nutz.dao.entity.annotation.*;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -21,11 +23,10 @@ import java.util.Date;
|
|||||||
@Comment("生育休假")
|
@Comment("生育休假")
|
||||||
public class MaternityLeave extends BaseModel implements Serializable {
|
public class MaternityLeave extends BaseModel implements Serializable {
|
||||||
|
|
||||||
@Column
|
|
||||||
@Name
|
@Name
|
||||||
@Comment("id")
|
@Comment("id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@Prev(els = {@EL("uuid()")})
|
@PrevInsert(uu32 = true)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@@ -49,7 +50,7 @@ public class MaternityLeave extends BaseModel implements Serializable {
|
|||||||
private String nation;
|
private String nation;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("出生年月")
|
@Comment("出生年月")
|
||||||
private Date birthday;
|
private Date birthday;
|
||||||
|
|
||||||
@@ -99,7 +100,7 @@ public class MaternityLeave extends BaseModel implements Serializable {
|
|||||||
private String loverNation;
|
private String loverNation;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("出生年月")
|
@Comment("出生年月")
|
||||||
private Date loverBirthday;
|
private Date loverBirthday;
|
||||||
|
|
||||||
@@ -154,22 +155,22 @@ public class MaternityLeave extends BaseModel implements Serializable {
|
|||||||
private String leaveDays;
|
private String leaveDays;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("子女出生日期")
|
@Comment("子女出生日期")
|
||||||
private Date childrenBirthday;
|
private Date childrenBirthday;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("休假开始时间")
|
@Comment("休假开始时间")
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.DATETIME, width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("休假结束时间")
|
@Comment("休假结束时间")
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.VARCHAR,width = 50)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
@Comment("填写时间")
|
@Comment("填写时间")
|
||||||
private Date applyTime;
|
private Date applyTime;
|
||||||
|
|
||||||
|
|||||||
+8
-4
@@ -24,6 +24,7 @@ import org.nutz.aop.interceptor.ioc.TransAop;
|
|||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -71,7 +72,7 @@ public class MutualInsuranceCollectController {
|
|||||||
String projectId,
|
String projectId,
|
||||||
String unionId,
|
String unionId,
|
||||||
String unitId,
|
String unitId,
|
||||||
String userName,
|
String searchKeyword,
|
||||||
String sex) {
|
String sex) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -113,9 +114,12 @@ public class MutualInsuranceCollectController {
|
|||||||
// 性别查询条件
|
// 性别查询条件
|
||||||
cnd.andEX("info.sex", "=", sex);
|
cnd.andEX("info.sex", "=", sex);
|
||||||
|
|
||||||
// 姓名查询条件
|
// 姓名和工号查询条件
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", "%" + searchKeyword + "%");
|
||||||
|
seg.orLike("info.loginName", "%" + searchKeyword + "%");
|
||||||
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 只查询流程实例状态为20的数据(已完成状态)
|
// 只查询流程实例状态为20的数据(已完成状态)
|
||||||
|
|||||||
-130
@@ -1,130 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
|
||||||
import com.budwk.app.base.param.PageForm;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.base.utils.PageUtil;
|
|
||||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
|
||||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author : hongqiwei
|
|
||||||
* @description :
|
|
||||||
* @createDate : 2025/9/23 17:35
|
|
||||||
*/
|
|
||||||
|
|
||||||
@IocBean
|
|
||||||
@At("/platform/mutualInsurance/schoolAudit")
|
|
||||||
@Api("校工会审核")
|
|
||||||
@Ok("json:full")
|
|
||||||
@Slf4j
|
|
||||||
public class MutualInsuranceSchoolAuditController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
|
||||||
|
|
||||||
@At("/index")
|
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/schoolAudit/index.html")
|
|
||||||
@SaCheckPermission("mutualInsurance.schoolAudit")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
@At("/h5")
|
|
||||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/schoolAudit/index.html")
|
|
||||||
@SaCheckPermission("h5.mutualInsurance.schoolAudit")
|
|
||||||
public void h5Index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ApiOperation("分页查询")
|
|
||||||
@SaCheckPermission(value = {"mutualInsurance.schoolAudit", "h5.mutualInsurance.schoolAudit"}, mode = SaMode.OR)
|
|
||||||
public Result pageData(PageForm pageForm,
|
|
||||||
boolean approval,
|
|
||||||
String projectId,
|
|
||||||
String unionId,
|
|
||||||
String unitId,
|
|
||||||
String userName,
|
|
||||||
String sex) {
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
info.*,
|
|
||||||
ins.id AS instanceId,
|
|
||||||
ins.businessNo,
|
|
||||||
ins.state instanceState,
|
|
||||||
ins.variable instanceVariable,
|
|
||||||
ins.processDefineId instanceProcessDefineId,
|
|
||||||
t.id taskId,
|
|
||||||
t.taskName AS taskKey,
|
|
||||||
t.displayName taskName,
|
|
||||||
t.taskType,
|
|
||||||
t.performType taskPerformType,
|
|
||||||
t.taskState,
|
|
||||||
t.finishTime,
|
|
||||||
t.taskParentId,
|
|
||||||
t.variable taskVariable,
|
|
||||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
|
||||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
|
||||||
FROM
|
|
||||||
wf_process_task t
|
|
||||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
|
||||||
LEFT JOIN mutual_insurance_user_info info ON info.id = ins.businessNo
|
|
||||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
|
||||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
|
||||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
|
||||||
$condition
|
|
||||||
""");
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
cnd.and("t.taskName", "=", "3e4e3785-64f4-4e7c-89bc-ea54dca216cd");
|
|
||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
|
||||||
|
|
||||||
if (approval) {
|
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
|
||||||
} else {
|
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
|
||||||
}
|
|
||||||
// 年度查询条件
|
|
||||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
|
||||||
|
|
||||||
//事项id查询
|
|
||||||
cnd.andEX("info.projectId", "=", projectId);
|
|
||||||
|
|
||||||
// 工会、单位名称查询条件
|
|
||||||
cnd.andEX("info.unionId", "=", unionId);
|
|
||||||
cnd.andEX("info.unitId", "=", unitId);
|
|
||||||
|
|
||||||
// 性别查询条件
|
|
||||||
cnd.andEX("info.sex", "=", sex);
|
|
||||||
|
|
||||||
// 姓名查询条件
|
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
|
||||||
}
|
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
|
||||||
cnd.desc("info.applyTime");
|
|
||||||
} else {
|
|
||||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
|
||||||
}
|
|
||||||
cnd.groupBy("t.id");
|
|
||||||
cnd.desc("t.createdAt");
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
|
||||||
return Result.success(pagination);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-130
@@ -1,130 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
|
||||||
import com.budwk.app.base.param.PageForm;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.base.utils.PageUtil;
|
|
||||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
|
||||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author : hongqiwei
|
|
||||||
* @description :
|
|
||||||
* @createDate : 2025/9/23 17:42
|
|
||||||
*/
|
|
||||||
|
|
||||||
@IocBean
|
|
||||||
@At("/platform/mutualInsurance/secretaryAudit")
|
|
||||||
@Api("党委书记审核")
|
|
||||||
@Ok("json:full")
|
|
||||||
@Slf4j
|
|
||||||
public class MutualInsuranceSecretaryAuditController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
|
||||||
|
|
||||||
@At("/index")
|
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/secretaryAudit/index.html")
|
|
||||||
@SaCheckPermission("mutualInsurance.secretaryAudit")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
@At("/h5")
|
|
||||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/secretaryAudit/index.html")
|
|
||||||
@SaCheckPermission("h5.mutualInsurance.secretaryAudit")
|
|
||||||
public void h5Index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ApiOperation("分页查询")
|
|
||||||
@SaCheckPermission(value = {"mutualInsurance.secretaryAudit", "h5.mutualInsurance.secretaryAudit"}, mode = SaMode.OR)
|
|
||||||
public Result pageData(PageForm pageForm,
|
|
||||||
boolean approval,
|
|
||||||
String projectId,
|
|
||||||
String unionId,
|
|
||||||
String unitId,
|
|
||||||
String userName,
|
|
||||||
String sex) {
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
info.*,
|
|
||||||
ins.id AS instanceId,
|
|
||||||
ins.businessNo,
|
|
||||||
ins.state instanceState,
|
|
||||||
ins.variable instanceVariable,
|
|
||||||
ins.processDefineId instanceProcessDefineId,
|
|
||||||
t.id taskId,
|
|
||||||
t.taskName AS taskKey,
|
|
||||||
t.displayName taskName,
|
|
||||||
t.taskType,
|
|
||||||
t.performType taskPerformType,
|
|
||||||
t.taskState,
|
|
||||||
t.finishTime,
|
|
||||||
t.taskParentId,
|
|
||||||
t.variable taskVariable,
|
|
||||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
|
||||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
|
||||||
FROM
|
|
||||||
wf_process_task t
|
|
||||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
|
||||||
LEFT JOIN mutual_insurance_user_info info ON info.id = ins.businessNo
|
|
||||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
|
||||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
|
||||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
|
||||||
$condition
|
|
||||||
""");
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
cnd.and("t.taskName", "=", "8567fa6e-7207-4958-ab82-767e22d04159");
|
|
||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
|
||||||
|
|
||||||
if (approval) {
|
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
|
||||||
} else {
|
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
|
||||||
}
|
|
||||||
// 年度查询条件
|
|
||||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
|
||||||
|
|
||||||
//事项id查询
|
|
||||||
cnd.andEX("info.projectId", "=", projectId);
|
|
||||||
|
|
||||||
// 工会、单位名称查询条件
|
|
||||||
cnd.andEX("info.unionId", "=", unionId);
|
|
||||||
cnd.andEX("info.unitId", "=", unitId);
|
|
||||||
|
|
||||||
// 性别查询条件
|
|
||||||
cnd.andEX("info.sex", "=", sex);
|
|
||||||
|
|
||||||
// 姓名查询条件
|
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
|
||||||
}
|
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
|
||||||
cnd.desc("info.applyTime");
|
|
||||||
} else {
|
|
||||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
|
||||||
}
|
|
||||||
cnd.groupBy("t.id");
|
|
||||||
cnd.desc("t.createdAt");
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
|
||||||
return Result.success(pagination);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-130
@@ -1,130 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.staffbenefit.mutualInsurance.controller;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import cn.dev33.satoken.annotation.SaMode;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
|
||||||
import com.budwk.app.base.param.PageForm;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.base.utils.PageUtil;
|
|
||||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
|
||||||
import com.budwk.app.zhgh.staffbenefit.mutualInsurance.service.MutualInsuranceUserService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author : hongqiwei
|
|
||||||
* @description :
|
|
||||||
* @createDate : 2025/9/23 17:35
|
|
||||||
*/
|
|
||||||
|
|
||||||
@IocBean
|
|
||||||
@At("/platform/mutualInsurance/unionAudit")
|
|
||||||
@Api("分工会审核")
|
|
||||||
@Ok("json:full")
|
|
||||||
@Slf4j
|
|
||||||
public class MutualInsuranceUnionAuditController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private MutualInsuranceUserService mutualInsuranceUserService;
|
|
||||||
@At("/index")
|
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/mutualInsurance/unionAudit/index.html")
|
|
||||||
@SaCheckPermission("mutualInsurance.unionAudit")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
@At("/h5")
|
|
||||||
@Ok("beetl:/platform/zhghh5/staffbenefit/mutualInsurance/unionAudit/index.html")
|
|
||||||
@SaCheckPermission("h5.mutualInsurance.unionAudit")
|
|
||||||
public void h5Index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ApiOperation("分页查询")
|
|
||||||
@SaCheckPermission(value = {"mutualInsurance.unionAudit", "h5.mutualInsurance.unionAudit"}, mode = SaMode.OR)
|
|
||||||
public Result pageData(PageForm pageForm,
|
|
||||||
boolean approval,
|
|
||||||
String projectId,
|
|
||||||
String unionId,
|
|
||||||
String unitId,
|
|
||||||
String userName,
|
|
||||||
String sex) {
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
info.*,
|
|
||||||
ins.id AS instanceId,
|
|
||||||
ins.businessNo,
|
|
||||||
ins.state instanceState,
|
|
||||||
ins.variable instanceVariable,
|
|
||||||
ins.processDefineId instanceProcessDefineId,
|
|
||||||
t.id taskId,
|
|
||||||
t.taskName AS taskKey,
|
|
||||||
t.displayName taskName,
|
|
||||||
t.taskType,
|
|
||||||
t.performType taskPerformType,
|
|
||||||
t.taskState,
|
|
||||||
t.finishTime,
|
|
||||||
t.taskParentId,
|
|
||||||
t.variable taskVariable,
|
|
||||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
|
||||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
|
||||||
FROM
|
|
||||||
wf_process_task t
|
|
||||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
|
||||||
LEFT JOIN mutual_insurance_user_info info ON info.id = ins.businessNo
|
|
||||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
|
||||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
|
||||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
|
||||||
$condition
|
|
||||||
""");
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
cnd.and("t.taskName", "=", "7e4a33fb-cd1e-4373-9bc5-815125568471");
|
|
||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
|
||||||
|
|
||||||
if (approval) {
|
|
||||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
|
||||||
} else {
|
|
||||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
|
||||||
}
|
|
||||||
// 年度查询条件
|
|
||||||
// cnd.andEX("year(info.applyTime)", "=", year);
|
|
||||||
|
|
||||||
//事项id查询
|
|
||||||
cnd.andEX("info.projectId", "=", projectId);
|
|
||||||
|
|
||||||
// 工会、单位名称查询条件
|
|
||||||
cnd.andEX("info.unionId", "=", unionId);
|
|
||||||
cnd.andEX("info.unitId", "=", unitId);
|
|
||||||
|
|
||||||
// 性别查询条件
|
|
||||||
cnd.andEX("info.sex", "=", sex);
|
|
||||||
|
|
||||||
// 姓名查询条件
|
|
||||||
if (StrUtil.isNotBlank(userName)) {
|
|
||||||
cnd.and("info.userName", "like", "%" + userName + "%");
|
|
||||||
}
|
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
|
||||||
cnd.desc("info.applyTime");
|
|
||||||
} else {
|
|
||||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
|
||||||
}
|
|
||||||
cnd.groupBy("t.id");
|
|
||||||
cnd.desc("t.createdAt");
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
Pagination<NutMap> pagination = mutualInsuranceUserService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
|
||||||
return Result.success(pagination);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+1
-1
@@ -140,7 +140,7 @@ public class MutualInsuranceUserInfo extends BaseModel implements Serializable {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("出险时间")
|
@Comment("出险时间")
|
||||||
@ColDefine(type = ColType.DATE)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private Date dangerTime;
|
private Date dangerTime;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
|
|||||||
+3
-1
@@ -29,6 +29,8 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@At("/platform/childManage/write")
|
@At("/platform/childManage/write")
|
||||||
@Ok("json:full")
|
@Ok("json:full")
|
||||||
@@ -58,7 +60,7 @@ public class ChildManageWriteController {
|
|||||||
@SaCheckPermission(value = {"childManage.write", "h5.childManage.write"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"childManage.write", "h5.childManage.write"}, mode = SaMode.OR)
|
||||||
@SLog(tag = "子女信息管理-信息填写", msg = "保存子女信息")
|
@SLog(tag = "子女信息管理-信息填写", msg = "保存子女信息")
|
||||||
public Result save(@Param("data") ChildManage childManage) {
|
public Result save(@Param("data") ChildManage childManage) {
|
||||||
if(StrUtil.isBlank(childManage.getId())) childManage.setApplyTime(DateUtil.now());
|
if(StrUtil.isBlank(childManage.getId())) childManage.setApplyTime(new Date());
|
||||||
dao.insertOrUpdate(childManage);
|
dao.insertOrUpdate(childManage);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ import com.budwk.app.base.model.BaseModel;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.nutz.dao.entity.annotation.*;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,7 +33,7 @@ public class ChildManage extends BaseModel implements Serializable {
|
|||||||
@Name
|
@Name
|
||||||
@Comment("id")
|
@Comment("id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@Prev(els = {@EL("uuid()")})
|
@PrevInsert(uu32 = true)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
@@ -137,9 +139,9 @@ public class ChildManage extends BaseModel implements Serializable {
|
|||||||
private String childrenIdCard;
|
private String childrenIdCard;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.VARCHAR,width = 30)
|
@ColDefine(type = ColType.DATE)
|
||||||
@Comment("出身年月")
|
@Comment("出身年月")
|
||||||
private String childrenBirthday;
|
private Date childrenBirthday;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.VARCHAR,width = 30)
|
@ColDefine(type = ColType.VARCHAR,width = 30)
|
||||||
@@ -178,9 +180,9 @@ public class ChildManage extends BaseModel implements Serializable {
|
|||||||
private String note;
|
private String note;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.VARCHAR,width = 50)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
@Comment("填写时间")
|
@Comment("填写时间")
|
||||||
private String applyTime;
|
private Date applyTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -49,7 +49,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in clubList"
|
v-for="item in clubList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.clubName"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -317,6 +317,8 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.init()
|
this.init()
|
||||||
|
//社团查询
|
||||||
|
this.$businessTool.listCLubByRole().then((res) => (this.clubList = res))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+6
-6
@@ -25,8 +25,8 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName" @keyup.enter.native="doSearch"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.userName" @keyup.enter.native="doSearch"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -34,9 +34,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option label="女" value="女"></el-option>
|
<el-option label="女" value="女"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -44,9 +44,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
+6
-6
@@ -24,8 +24,8 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName" @keyup.enter.native="doSearch"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.userName" @keyup.enter.native="doSearch"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -33,9 +33,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option label="女" value="女"></el-option>
|
<el-option label="女" value="女"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -43,9 +43,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -0,0 +1,325 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<h3 style="color: var(--color-primary)" slot="header">信息填报</h3>
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||||
|
<el-descriptions :column="3" border>
|
||||||
|
<el-descriptions-item label="职工姓名">
|
||||||
|
<el-form-item prop="userId">
|
||||||
|
<el-select :remote-method="queryUsers"
|
||||||
|
@change="userChange"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
placeholder="输入工号或者姓名查找"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="selectedUserId">
|
||||||
|
<el-option :key="o.id"
|
||||||
|
:label="o.username+'('+o.loginname+')'"
|
||||||
|
:value="o.id"
|
||||||
|
v-for="o in userList"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="工号">
|
||||||
|
<el-form-item prop="loginName">
|
||||||
|
<el-input v-model="formData.loginName" readonly size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="性别">
|
||||||
|
<el-form-item prop="sex">
|
||||||
|
<el-input v-model="formData.sex" readonly size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="出生年月">
|
||||||
|
<el-form-item prop="birthday">
|
||||||
|
<el-input :value="formatDate(formData.birthday)" readonly size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="工会">
|
||||||
|
<el-form-item prop="unionName">
|
||||||
|
<el-input v-model="formData.unionName" readonly size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="单位">
|
||||||
|
<el-form-item prop="unitName">
|
||||||
|
<el-input v-model="formData.unitName" readonly size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="初始额度">
|
||||||
|
<el-form-item prop="initMoney">
|
||||||
|
<el-input v-model="formData.initMoney" readonly size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="剩余额度" :span="2">
|
||||||
|
<el-form-item prop="money">
|
||||||
|
<el-input v-model="formData.money" readonly size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="健身卡使用情况记录" :span="3">
|
||||||
|
<el-form-item prop="usages">
|
||||||
|
<el-table :data="formData.usages" border size="small">
|
||||||
|
<el-table-column label="使用时间" prop="useTime" >
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="row.useTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="请选择使用时间"
|
||||||
|
style="width: 100%">
|
||||||
|
</el-date-picker>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="使用地点" prop="place">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-input v-model="row.place" maxlength="100"
|
||||||
|
placeholder="请输入使用地点"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="使用项目" prop="project">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-input v-model="row.project" maxlength="100" placeholder="请输入使用项目"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="花费额度" prop="useMoney" >
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-input v-model="row.useMoney" maxlength="10" placeholder="请输入花费额度"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="100">
|
||||||
|
<template slot="header">
|
||||||
|
<el-button type="primary" size="mini" @click="addUsage">添加</el-button>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
@click="removeUsage(scope.$index)">
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-form>
|
||||||
|
<el-row type="flex" justify="end" class="mt20">
|
||||||
|
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
store,
|
||||||
|
dicts: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bizId: GetQueryString("bizId"),
|
||||||
|
formData: {
|
||||||
|
usages: []
|
||||||
|
},
|
||||||
|
userList: [],
|
||||||
|
selectedUserId: '',
|
||||||
|
formRules: {
|
||||||
|
userId: [{ required: true, message: '请选择职工', trigger: 'change' }],
|
||||||
|
userName: [{ required: true, message: '职工姓名不能为空', trigger: 'blur' }],
|
||||||
|
sex: [{ required: true, message: '性别不能为空', trigger: 'blur' }],
|
||||||
|
birthday: [{ required: true, message: '出生年月不能为空', trigger: 'blur' }],
|
||||||
|
unionName: [{ required: true, message: '工会单位不能为空', trigger: 'blur' }],
|
||||||
|
unitName: [{ required: true, message: '单位不能为空', trigger: 'blur' }],
|
||||||
|
initMoney: [{ required: true, message: '初始额度不能为空', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// 监听formData.usages的变化,实时计算剩余额度
|
||||||
|
'formData.usages': {
|
||||||
|
handler(newVal) {
|
||||||
|
this.calculateRemainingMoney();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// 添加使用记录方法
|
||||||
|
addUsage() {
|
||||||
|
if (!this.formData.usages) {
|
||||||
|
this.$set(this.formData, 'usages', []);
|
||||||
|
}
|
||||||
|
this.formData.usages.push({
|
||||||
|
useTime: '',
|
||||||
|
place: '',
|
||||||
|
project: '',
|
||||||
|
useMoney: ''
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除使用记录方法
|
||||||
|
removeUsage(index) {
|
||||||
|
if (this.formData.usages && this.formData.usages.length > 0) {
|
||||||
|
this.formData.usages.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 计算剩余额度
|
||||||
|
calculateRemainingMoney() {
|
||||||
|
if (this.formData.initMoney) {
|
||||||
|
const totalUsed = this.formData.usages.reduce((sum, usage) => {
|
||||||
|
const useMoney = parseFloat(usage.useMoney) || 0;
|
||||||
|
return sum + useMoney;
|
||||||
|
}, 0);
|
||||||
|
this.$set(this.formData, 'money', this.formData.initMoney - totalUsed);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 检查额度是否足够
|
||||||
|
checkBalance() {
|
||||||
|
if (this.formData.money < 0) {
|
||||||
|
this.$message.error('余额不足!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
// 查询用户
|
||||||
|
queryUsers(key) {
|
||||||
|
if (!key) return;
|
||||||
|
this.$axios.get("/platform/exerciseCard/apply/queryUsers", {
|
||||||
|
params: { key }
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.userList = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 用户选择变化
|
||||||
|
userChange(userId) {
|
||||||
|
const user = this.userList.find(item => item.id === userId);
|
||||||
|
this.selectedUserId = userId;
|
||||||
|
if (user) {
|
||||||
|
this.$set(this.formData, 'userId', user.id);
|
||||||
|
this.$set(this.formData, 'userName', user.username);
|
||||||
|
this.$set(this.formData, 'loginName', user.loginname);
|
||||||
|
this.$set(this.formData, 'sex', user.sex);
|
||||||
|
this.$set(this.formData, 'unitId', user.unitId);
|
||||||
|
this.$set(this.formData, 'unitName', user.unitName);
|
||||||
|
this.$set(this.formData, 'unionId', user.unionId);
|
||||||
|
this.$set(this.formData, 'unionName', user.unionName);
|
||||||
|
this.$set(this.formData, 'birthday', user.birthday);
|
||||||
|
this.$set(this.formData, 'initMoney', 300);
|
||||||
|
this.$set(this.formData, 'money', 300);
|
||||||
|
} else {
|
||||||
|
// 清空表单数据
|
||||||
|
this.$set(this.formData, 'userId', null);
|
||||||
|
this.$set(this.formData, 'userName', null);
|
||||||
|
this.$set(this.formData, 'loginName', null);
|
||||||
|
this.$set(this.formData, 'sex', null);
|
||||||
|
this.$set(this.formData, 'unitId', null);
|
||||||
|
this.$set(this.formData, 'unitName', null);
|
||||||
|
this.$set(this.formData, 'unionId', null);
|
||||||
|
this.$set(this.formData, 'unionName', null);
|
||||||
|
this.$set(this.formData, 'birthday', null);
|
||||||
|
this.$set(this.formData, 'initMoney', null);
|
||||||
|
this.$set(this.formData, 'money', null);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 添加日期格式化方法
|
||||||
|
formatDate(date) {
|
||||||
|
if (!date) return '';
|
||||||
|
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||||
|
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||||
|
// 如果包含时间,只取日期部分
|
||||||
|
if (date.length > 10) {
|
||||||
|
return date.substring(0, 10);
|
||||||
|
}
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
// 否则转换为 yyyy-MM-dd 格式
|
||||||
|
try {
|
||||||
|
const d = new Date(date);
|
||||||
|
if (isNaN(d.getTime())) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
const year = d.getFullYear();
|
||||||
|
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(d.getDate()).padStart(2, '0');
|
||||||
|
return year + '-' + month + '-' + day;
|
||||||
|
} catch (e) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 保存
|
||||||
|
onSave() {
|
||||||
|
if (!this.checkBalance()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/exerciseCard/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
commonUtil.pjaxPush('/platform/exerciseCard/query/index')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提交验证
|
||||||
|
validateBeforeSubmit() {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
resolve(true);
|
||||||
|
} else {
|
||||||
|
this.$message.error('请完善表单信息并勾选申报理由');
|
||||||
|
resolve(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async findOne(id) {
|
||||||
|
const resp = await $.get('/platform/exerciseCard/apply/findOne', {id})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
return resp.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
init() {
|
||||||
|
if (this.bizId) {
|
||||||
|
this.findOne(this.bizId).then(async data => {
|
||||||
|
this.formData = data || {}
|
||||||
|
// 设置选中的用户ID
|
||||||
|
if (data && data.userId) {
|
||||||
|
this.selectedUserId = data.userId;
|
||||||
|
if (data.loginName) {
|
||||||
|
this.queryUsers(data.loginName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
const EXERCISECARD_INFO = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<table-tool label="人员信息"></table-tool>
|
||||||
|
<el-descriptions :column="3" border class="flow-task-form">
|
||||||
|
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="职工姓名">{{viewData.userName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="出生年月">{{formatDate(viewData.birthday)}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="工会">{{viewData.unionName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="单位">{{viewData.unitName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="初始额度">{{viewData.initMoney}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="当前额度" :span="2">{{viewData.money}}</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="健身卡使用情况记录" :span="3">
|
||||||
|
<el-table :data="viewData.usages" border size="small">
|
||||||
|
<el-table-column label="使用时间" prop="useTime"></el-table-column>
|
||||||
|
<el-table-column label="使用地点" prop="place"></el-table-column>
|
||||||
|
<el-table-column label="使用项目" prop="project"></el-table-column>
|
||||||
|
<el-table-column label="花费额度" prop="useMoney"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
store,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
viewData: {
|
||||||
|
usages: [] // 初始化使用记录数组
|
||||||
|
},
|
||||||
|
doneTasks: [],
|
||||||
|
row: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 添加日期格式化方法
|
||||||
|
formatDate(date) {
|
||||||
|
if (!date) return '';
|
||||||
|
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||||
|
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||||
|
// 如果包含时间,只取日期部分
|
||||||
|
if (date.length > 10) {
|
||||||
|
return date.substring(0, 10);
|
||||||
|
}
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
// 否则转换为 yyyy-MM-dd 格式
|
||||||
|
try {
|
||||||
|
const d = new Date(date);
|
||||||
|
if (isNaN(d.getTime())) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
const year = d.getFullYear();
|
||||||
|
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(d.getDate()).padStart(2, '0');
|
||||||
|
return year + '-' + month + '-' + day;
|
||||||
|
} catch (e) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 打开
|
||||||
|
onOpen(row) {
|
||||||
|
this.row = row
|
||||||
|
this.visible = true
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取申请信息
|
||||||
|
getInfo() {
|
||||||
|
this.$axios.post('/platform/exerciseCard/apply/findOne', {id: this.row.id}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.viewData = res.data || {}
|
||||||
|
// 确保usages字段存在
|
||||||
|
if (!this.viewData.usages) {
|
||||||
|
this.$set(this.viewData, 'usages', [])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
<div id="app">
|
||||||
|
<guava ref="guava">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
|
style="width: 100%"></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="姓名/工号">
|
||||||
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="性别">
|
||||||
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
|
<el-option label="男" value="男"></el-option>
|
||||||
|
<el-option label="女" value="女"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="分工会">
|
||||||
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
|
placeholder="请选择分工会" clearable>
|
||||||
|
<el-option v-for="item in unionOptions"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="单位">
|
||||||
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
|
placeholder="请选择单位" clearable>
|
||||||
|
<el-option v-for="item in unitOptions"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool>
|
||||||
|
<el-button type="primary" size="small" icon="el-icon-upload2" @click="openImport">导入人员</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
|
<el-table-column prop="initMoney" label="初始额度"></el-table-column>
|
||||||
|
<el-table-column prop="money" label="剩余额度"></el-table-column>
|
||||||
|
<el-table-column prop="applyTime" label="录入时间"></el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" fixed="right" width="300px">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
|
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-dialog title="人员导入" :visible.sync="importDialog" width="50%" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||||
|
<file-import
|
||||||
|
ref="viewImport"
|
||||||
|
temp_url="/platform/exerciseCard/query/downloadTemplate"
|
||||||
|
post_url="/platform/exerciseCard/query/importData"
|
||||||
|
@flush="successImport"
|
||||||
|
></file-import>
|
||||||
|
</el-dialog>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
<template #view>
|
||||||
|
<exercise-card-info ref="exerciseCardInfoRef"></exercise-card-info>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<!--#include('../common/info.js'){}#-->
|
||||||
|
new Vue({
|
||||||
|
el: "#app",
|
||||||
|
store,
|
||||||
|
//分页数据
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"exercise-card-info": EXERCISECARD_INFO
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageDataUrl: "/platform/exerciseCard/query/pageData",
|
||||||
|
unionOptions: [],
|
||||||
|
unitOptions: [],
|
||||||
|
userOptions: [],
|
||||||
|
importDialog: false,
|
||||||
|
checkedFields: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"exercise-card-info": EXERCISECARD_INFO,
|
||||||
|
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openImport() {
|
||||||
|
this.importDialog = true
|
||||||
|
},
|
||||||
|
successImport() {
|
||||||
|
this.importDialog = false
|
||||||
|
this.pageData()
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(()=>{
|
||||||
|
this.$refs.exerciseCardInfoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
commonUtil.pjaxPush('/platform/exerciseCard/apply/index', { bizId: row.id})
|
||||||
|
},
|
||||||
|
onDelete(id) {
|
||||||
|
this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/exerciseCard/query/delete", {id}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.pageData()
|
||||||
|
//工会查询
|
||||||
|
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||||
|
//单位查询
|
||||||
|
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+78
@@ -0,0 +1,78 @@
|
|||||||
|
const basicForm = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-dialog :title="formData.id ? '编辑':'新增'" :visible.sync="visible" width="40%" :close-on-click-modal="false">
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||||
|
<el-form-item label="年度" prop="year">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.year"
|
||||||
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="请选择年度"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批次名称" prop="name">
|
||||||
|
<el-input type="text" v-model="formData.name" maxlength="50"
|
||||||
|
placeholder="请输入批次名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input type="textarea" v-model="formData.remark" placeholder="请输入备注"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="$emit('refresh'); visible = false">取消</el-button>
|
||||||
|
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {
|
||||||
|
year: new Date().getFullYear().toString(),
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
year: [{required: true, message: '必填', trigger: ['blur']}],
|
||||||
|
name: [{required: true, message: '必填', trigger: ['blur']}],
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
if(row && row.id) {
|
||||||
|
this.$set(row, 'year', row.year.toString())
|
||||||
|
this.formData = clone(row)
|
||||||
|
} else {
|
||||||
|
this.formData = {
|
||||||
|
year: new Date().getFullYear().toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post("/platform/retireSouvenirs/batch/submit", this.formData)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
this.visible = false
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
+163
@@ -0,0 +1,163 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="pageForm.year"
|
||||||
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="请选择年度"
|
||||||
|
@change="doSearch"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="批次名称:">
|
||||||
|
<el-input placeholder="请输入批次名称查询" clearable v-model="pageForm.searchKeyword"
|
||||||
|
@keyup.enter.native="doSearch">
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt20">
|
||||||
|
<table-tool label="批次列表">
|
||||||
|
<el-button type="primary" size="small" @click="onAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
新增批次
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||||
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{ row }" v-if="column.prop === 'createdAt'">
|
||||||
|
{{ $moment(row.createdAt).format('YYYY-MM-DD') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="300">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-dropdown style="margin-right: 10px">
|
||||||
|
<el-button type="primary" size="mini">
|
||||||
|
导入人员
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item @click.native="onImport(row, 'clear')">清空</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click.native="onImport(row, 'append')">追加</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
|
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<basic-form ref="basicFormRef" @refresh="refresh"></basic-form>
|
||||||
|
|
||||||
|
<excel-import
|
||||||
|
ref="excelImportRef"
|
||||||
|
url="/platform/retireSouvenirs/batch/temImport"
|
||||||
|
template_url="/platform/retireSouvenirs/batch/downloadTem"
|
||||||
|
:visible.sync="importVisible"
|
||||||
|
title="导入人员名单"
|
||||||
|
width="700px"
|
||||||
|
:extra_params="importParams"
|
||||||
|
@import-success="doSearch"
|
||||||
|
></excel-import>
|
||||||
|
</guava>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('basicForm.js'){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"basic-form": basicForm,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableColumns: [
|
||||||
|
{prop: 'year', label: '年度'},
|
||||||
|
{prop: 'name', label: '批次名称'},
|
||||||
|
{prop: 'remark', label: '备注'},
|
||||||
|
{prop: 'userName', label: '创建人'},
|
||||||
|
{prop: 'createdAt', label: '创建时间'},
|
||||||
|
{prop: 'count', label: '关联人员数'},
|
||||||
|
],
|
||||||
|
importVisible: false,
|
||||||
|
importParams: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onImport(row, type) {
|
||||||
|
this.importParams = {
|
||||||
|
batchId: row.id,
|
||||||
|
type: type
|
||||||
|
}
|
||||||
|
this.importVisible = true
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.guava.index()
|
||||||
|
},
|
||||||
|
onAdd() {
|
||||||
|
this.$refs.basicFormRef.onOpen()
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.$refs.basicFormRef.onOpen(row)
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
let msg = row.count > 0 ? '该批次下有' + row.count + '条数据,' : ''
|
||||||
|
this.$confirm(msg + "您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/retireSouvenirs/batch/delete", { id: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+383
@@ -0,0 +1,383 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.search-other {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.search-other-label {
|
||||||
|
width: 90px;
|
||||||
|
min-width: 90px;
|
||||||
|
color: rgb(100, 100, 100);
|
||||||
|
margin-right: 10px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.search-other > div {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.search-other .el-tag {
|
||||||
|
margin-right: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.search-other .el-link {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="批次名称:">
|
||||||
|
<el-select v-model="pageForm.batchId" @change="doSearch" style="width: 100%"
|
||||||
|
placeholder="请选择批次名称" filterable>
|
||||||
|
<el-option v-for="item in batchOptions"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="退休年份:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="pageForm.year"
|
||||||
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="请选择退休年份"
|
||||||
|
@change="doSearch"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="退休月份:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="pageForm.month"
|
||||||
|
type="month"
|
||||||
|
value-format="MM"
|
||||||
|
placeholder="请选择退休月份"
|
||||||
|
@change="doSearch"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="领取状态:">
|
||||||
|
<el-select v-model="pageForm.receive" @change="doSearch" style="width: 100%"
|
||||||
|
placeholder="请选择领取状态" filterable clearable>
|
||||||
|
<el-option :value="null" label="全部"></el-option>
|
||||||
|
<el-option :value="false" label="未领取"></el-option>
|
||||||
|
<el-option :value="true" label="已领取"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="工号/姓名:">
|
||||||
|
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询" clearable></el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属单位:">
|
||||||
|
<el-select @change="doSearch"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择单位"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.unitId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="所属工会:">
|
||||||
|
<el-select v-model="pageForm.unionId"
|
||||||
|
placeholder="请选择所属工会"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
@change="doSearch"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in unionOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div class="search-other">
|
||||||
|
<div class="search-other-label">快捷查询:</div>
|
||||||
|
<div>
|
||||||
|
<el-tag style="margin-right: 10px;cursor: pointer"
|
||||||
|
:effect="pageForm.selectTime === 'current' ? 'dark' : 'plain'"
|
||||||
|
@click="tagClick('current')">
|
||||||
|
当月未领取(退休时间在当前月份,并且未领取)
|
||||||
|
</el-tag>
|
||||||
|
<el-tag style="margin-right: 10px;cursor: pointer"
|
||||||
|
:effect="pageForm.selectTime === 'prev' ? 'dark' : 'plain'"
|
||||||
|
@click="tagClick('prev')">
|
||||||
|
逾期未领取(退休时间在当前月份之前,并且未领取)
|
||||||
|
</el-tag>
|
||||||
|
<el-link type="danger"
|
||||||
|
v-if="pageForm.selectTime !== ''"
|
||||||
|
:underline="false"
|
||||||
|
@click="tagClear">清空
|
||||||
|
</el-link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt20">
|
||||||
|
<table-tool label="人员列表">
|
||||||
|
<el-button type="primary" size="small" @click="onMsg" icon="el-icon-mobile-phone">短信提醒</el-button>
|
||||||
|
<el-button type="primary" size="small" @click="onExport" icon="el-icon-download">导出名单</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||||
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{ row }" v-if="column.prop === 'receive'">
|
||||||
|
<span v-if="row.receive === true" style="color: #15db81;">已领取</span>
|
||||||
|
<span v-else>未领取</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }" v-else-if="column.prop === 'msgCount'">
|
||||||
|
<el-link type="primary" @click="onMsgView(row)">{{ row.msgCount }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="200">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button v-if="row.receive === false" @click="onReceive(row)" size="mini" type="primary">设置领取</el-button>
|
||||||
|
<el-button v-if="row.receive === true" @click="onReceive(row)" size="mini" type="info">设置未领取</el-button>
|
||||||
|
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
</guava>
|
||||||
|
|
||||||
|
<el-dialog title="短信提醒" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false">
|
||||||
|
|
||||||
|
<el-alert
|
||||||
|
:title="'当前查询条件筛选人数为:' + pageForm.totalCount + '人'"
|
||||||
|
type="info"
|
||||||
|
class="mb5"
|
||||||
|
effect="dark">
|
||||||
|
</el-alert>
|
||||||
|
|
||||||
|
<el-alert
|
||||||
|
title="发送内容示例:老师您好,您有退休纪念品还未领取,请于xx及时到xx领取。"
|
||||||
|
type="info"
|
||||||
|
class="mb20"
|
||||||
|
effect="dark">
|
||||||
|
</el-alert>
|
||||||
|
|
||||||
|
<el-input type="textarea" v-model="message" placeholder="请输入发送内容" :rows="4"></el-input>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="doMsg">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="短信发送记录" :visible.sync="msgDialogVisible" :close-on-click-modal="false">
|
||||||
|
|
||||||
|
<el-table :data="msgTableData" max-height="500" size="small">
|
||||||
|
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||||
|
<el-table-column label="发送时间" prop="sendTime"></el-table-column>
|
||||||
|
<el-table-column label="发送内容" prop="message" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="发送人" prop="sendUserName"></el-table-column>
|
||||||
|
<el-table-column label="操作" width="100">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<el-button @click="onDeleteMsg(row)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="msgDialogVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageForm: {
|
||||||
|
receive: null,
|
||||||
|
},
|
||||||
|
tableColumns: [
|
||||||
|
{prop: 'userName', label: '姓名'},
|
||||||
|
{prop: 'loginName', label: '工号'},
|
||||||
|
{prop: 'sex', label: '性别'},
|
||||||
|
{prop: 'mobile', label: '联系方式'},
|
||||||
|
{prop: 'unitName', label: '所属单位'},
|
||||||
|
{prop: 'unionName', label: '所属工会'},
|
||||||
|
{prop: 'retireTimeFormat', label: '退休时间'},
|
||||||
|
{prop: 'msgCount', label: '短信提醒次数'},
|
||||||
|
{prop: 'receive', label: '是否领取'},
|
||||||
|
],
|
||||||
|
batchOptions: [],
|
||||||
|
unitOptions: [],
|
||||||
|
unionOptions: [],
|
||||||
|
message: '',
|
||||||
|
dialogVisible: false,
|
||||||
|
|
||||||
|
msgRow: {},
|
||||||
|
msgTableData: {},
|
||||||
|
msgDialogVisible: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onDeleteMsg(row) {
|
||||||
|
this.$confirm("您确定要删除短信记录吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post("/platform/retireSouvenirs/ledger/deleteMsg", {
|
||||||
|
id: row.id,
|
||||||
|
})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.onMsgView(this.msgRow)
|
||||||
|
this.pageData()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onMsgView(row) {
|
||||||
|
this.msgRow = row
|
||||||
|
this.$axios.post("/platform/retireSouvenirs/ledger/selectMsgList", {
|
||||||
|
'batchId': row.batchId,
|
||||||
|
'userId': row.userId,
|
||||||
|
}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.msgTableData = resp.data
|
||||||
|
this.msgDialogVisible = true
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onMsg() {
|
||||||
|
this.message = ''
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
doMsg() {
|
||||||
|
if(!this.message) {
|
||||||
|
this.$message.warning('请输入发送内容')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$confirm("您确定要发送短信吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/retireSouvenirs/ledger/msg", {
|
||||||
|
'pageForm': JSON.stringify(this.pageForm),
|
||||||
|
'message': this.message,
|
||||||
|
}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.pageData()
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.dialogVisible = false
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tagClick(type) {
|
||||||
|
this.$set(this.pageForm, 'month', (new Date().getMonth() + 1).toString())
|
||||||
|
this.$set(this.pageForm, 'receive', false)
|
||||||
|
this.$set(this.pageForm, 'selectTime', type)
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
tagClear() {
|
||||||
|
this.$set(this.pageForm, 'month', '')
|
||||||
|
this.$set(this.pageForm, 'receive', null)
|
||||||
|
this.$set(this.pageForm, 'selectTime', '')
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
onExport() {
|
||||||
|
this.$downLoad(loc() + "/download", this.pageForm)
|
||||||
|
},
|
||||||
|
onReceive(row) {
|
||||||
|
this.$confirm("您确定要设置吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/retireSouvenirs/ledger/receive", { id: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/retireSouvenirs/ledger/delete", { id: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectList() {
|
||||||
|
this.$axios.post("/platform/retireSouvenirs/batch/selectList").then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.batchOptions = res.data
|
||||||
|
if(this.batchOptions.length > 0) {
|
||||||
|
this.$set(this.pageForm, 'batchId', this.batchOptions[0].id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.selectList()
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
this.unitOptions = await this.$businessTool.listUnit()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+2
-5
@@ -252,9 +252,9 @@ layout("/layouts/platform.html"){
|
|||||||
reimburseProject: [{required: true, message: '请选择报销项目', trigger: ["change", "blur"]}],
|
reimburseProject: [{required: true, message: '请选择报销项目', trigger: ["change", "blur"]}],
|
||||||
reimburseFundSource: [{required: true, message: '请选择经费来源', trigger: ["change", "blur"]}],
|
reimburseFundSource: [{required: true, message: '请选择经费来源', trigger: ["change", "blur"]}],
|
||||||
bankUserName: [{required: true, message: '请填写户名', trigger: ["change", "blur"]}],
|
bankUserName: [{required: true, message: '请填写户名', trigger: ["change", "blur"]}],
|
||||||
bankCardNumber: [{required: true, message: '请填写银行账号', trigger: ["change", "blur"]}],
|
bankCardNumber: [ {required: true, message: '请填写银行账号', trigger: ["change", "blur"]},{ pattern: /^([1-9]{1})(\d{15}|\d{18})$/, message: '请输入正确的银行卡号', trigger: 'blur' }],
|
||||||
bankOfDeposit: [{required: true, message: '请填写开户行', trigger: ["change", "blur"]}],
|
bankOfDeposit: [{required: true, message: '请填写开户行', trigger: ["change", "blur"]}],
|
||||||
condolencePeopleMobile: [{required: true, message: '请填写联系方式', trigger: ["change", "blur"]}],
|
condolenceMobile: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }],
|
||||||
condolenceTime: [{required: true, message: '请选择慰问时间', trigger: ["change", "blur"]}],
|
condolenceTime: [{required: true, message: '请选择慰问时间', trigger: ["change", "blur"]}],
|
||||||
invoiceNumber: [{required: true, message: '请填写发票张数', trigger: ["change", "blur"]}],
|
invoiceNumber: [{required: true, message: '请填写发票张数', trigger: ["change", "blur"]}],
|
||||||
invoice: [{required: true, message: '请填写发票号码', trigger: ["change", "blur"]}],
|
invoice: [{required: true, message: '请填写发票号码', trigger: ["change", "blur"]}],
|
||||||
@@ -547,9 +547,6 @@ layout("/layouts/platform.html"){
|
|||||||
id: this.formData.condolenceId,
|
id: this.formData.condolenceId,
|
||||||
userName: this.formData.condolenceName,
|
userName: this.formData.condolenceName,
|
||||||
mobile: this.formData.condolenceMobile || '',
|
mobile: this.formData.condolenceMobile || '',
|
||||||
loginName: this.formData.condolenceLoginName || '',
|
|
||||||
unitName: this.formData.condolenceUnitName || '',
|
|
||||||
sex: this.formData.condolenceSex || ''
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-46
@@ -9,9 +9,12 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="姓名/工号">
|
||||||
|
<el-input placeholder="请输入经办人姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -19,9 +22,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -39,26 +42,6 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="经办人">
|
|
||||||
<el-select
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="pageForm.userName"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
placeholder="请输入经办人姓名或工号查询"
|
|
||||||
:remote-method="createRemoteMethod(userOptions)"
|
|
||||||
@change="userChange">
|
|
||||||
<el-option
|
|
||||||
v-for="item in userOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
|
|
||||||
</search>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
@@ -129,32 +112,10 @@ layout("/layouts/platform.html"){
|
|||||||
pageDataUrl: "/platform/unionReimburse/collect/pageData",
|
pageDataUrl: "/platform/unionReimburse/collect/pageData",
|
||||||
unionOptions: [],
|
unionOptions: [],
|
||||||
unitOptions: [],
|
unitOptions: [],
|
||||||
userOptions: [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
methods: {
|
methods: {
|
||||||
//查询经办人
|
|
||||||
createRemoteMethod(options) {
|
|
||||||
return (keyword) => {
|
|
||||||
this.selectQueryUser(keyword, options)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectQueryUser(keyword, options) {
|
|
||||||
options.length = 0
|
|
||||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {keyword: keyword}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
options.push(...res.data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
userChange(val) {
|
|
||||||
const user = this.userOptions.find(o => o.id === val)
|
|
||||||
if (user) {
|
|
||||||
const { userName } = user
|
|
||||||
this.$set(this.pageForm, "userName", userName)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onView(row) {
|
onView(row) {
|
||||||
this.$refs.guava.edit(()=>{
|
this.$refs.guava.edit(()=>{
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
|
|||||||
@@ -40,13 +40,13 @@ const unionReimburseInfo = {
|
|||||||
<el-descriptions-item label="联系方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.condolenceMobile}}</el-descriptions-item>
|
<el-descriptions-item label="联系方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.condolenceMobile}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="慰问类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.typeName}}</el-descriptions-item>
|
<el-descriptions-item label="慰问类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.typeName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="慰问金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.money}}</el-descriptions-item>
|
<el-descriptions-item label="慰问金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.money}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="慰问时间" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{viewData.condolenceTime}}</el-descriptions-item>
|
<el-descriptions-item label="慰问时间" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{formatDate(viewData.condolenceTime)}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="活动名称" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.activityName}}</el-descriptions-item>
|
<el-descriptions-item label="活动名称" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.activityName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="活动类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{viewData.activityType}}</el-descriptions-item>
|
<el-descriptions-item label="活动类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{viewData.activityType}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="活动人数" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{viewData.activityNumber}}</el-descriptions-item>
|
<el-descriptions-item label="活动人数" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{viewData.activityNumber}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="活动地点" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.activityPlace}}</el-descriptions-item>
|
<el-descriptions-item label="活动地点" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.activityPlace}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.money}}</el-descriptions-item>
|
<el-descriptions-item label="报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.money}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="活动时间" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{viewData.activityTime}}</el-descriptions-item>
|
<el-descriptions-item label="活动时间" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{formatDate(viewData.activityTime)}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="发票张数" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{viewData.invoiceNumber}}</el-descriptions-item>
|
<el-descriptions-item label="发票张数" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{viewData.invoiceNumber}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="发票号码" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{viewData.invoice}}</el-descriptions-item>
|
<el-descriptions-item label="发票号码" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{viewData.invoice}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="支付内容" :span="2">{{viewData.paymentNotes}}</el-descriptions-item>
|
<el-descriptions-item label="支付内容" :span="2">{{viewData.paymentNotes}}</el-descriptions-item>
|
||||||
@@ -110,6 +110,31 @@ const unionReimburseInfo = {
|
|||||||
this.getInfo()
|
this.getInfo()
|
||||||
this.getDoneTasks()
|
this.getDoneTasks()
|
||||||
},
|
},
|
||||||
|
// 添加日期格式化方法
|
||||||
|
formatDate(date) {
|
||||||
|
if (!date) return '';
|
||||||
|
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||||
|
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||||
|
// 如果包含时间,只取日期部分
|
||||||
|
if (date.length > 10) {
|
||||||
|
return date.substring(0, 10);
|
||||||
|
}
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
// 否则转换为 yyyy-MM-dd 格式
|
||||||
|
try {
|
||||||
|
const d = new Date(date);
|
||||||
|
if (isNaN(d.getTime())) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
const year = d.getFullYear();
|
||||||
|
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(d.getDate()).padStart(2, '0');
|
||||||
|
return year + '-' + month + '-' + day;
|
||||||
|
} catch (e) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 获取申请信息
|
// 获取申请信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
|
|||||||
+7
-47
@@ -9,9 +9,12 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="姓名/工号">
|
||||||
|
<el-input placeholder="请输入经办人姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -19,9 +22,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -39,26 +42,6 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="经办人">
|
|
||||||
<el-select
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="pageForm.userName"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
placeholder="请输入经办人姓名或工号查询"
|
|
||||||
:remote-method="createRemoteMethod(userOptions)"
|
|
||||||
@change="userChange">
|
|
||||||
<el-option
|
|
||||||
v-for="item in userOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
|
|
||||||
</search>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
@@ -129,33 +112,10 @@ layout("/layouts/platform.html"){
|
|||||||
pageDataUrl: "/platform/unionReimburse/mine/pageData",
|
pageDataUrl: "/platform/unionReimburse/mine/pageData",
|
||||||
unionOptions: [],
|
unionOptions: [],
|
||||||
unitOptions: [],
|
unitOptions: [],
|
||||||
userOptions: [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
methods: {
|
methods: {
|
||||||
//查询经办人
|
|
||||||
createRemoteMethod(options) {
|
|
||||||
return (keyword) => {
|
|
||||||
this.selectQueryUser(keyword, options)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectQueryUser(keyword, options) {
|
|
||||||
options.length = 0
|
|
||||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {keyword: keyword}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
options.push(...res.data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
userChange(val) {
|
|
||||||
const user = this.userOptions.find(o => o.id === val)
|
|
||||||
if (user) {
|
|
||||||
const { userName } = user
|
|
||||||
this.$set(this.pageForm, "userName", userName)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onView(row) {
|
onView(row) {
|
||||||
this.$refs.guava.view(()=>{
|
this.$refs.guava.view(()=>{
|
||||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||||
|
|||||||
+7
-47
@@ -9,9 +9,12 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="姓名/工号">
|
||||||
|
<el-input placeholder="请输入经办人姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -19,9 +22,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -39,26 +42,6 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="经办人">
|
|
||||||
<el-select
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="pageForm.userName"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
placeholder="请输入经办人姓名或工号查询"
|
|
||||||
:remote-method="createRemoteMethod(userOptions)"
|
|
||||||
@change="userChange">
|
|
||||||
<el-option
|
|
||||||
v-for="item in userOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
|
|
||||||
</search>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
@@ -158,33 +141,10 @@ layout("/layouts/platform.html"){
|
|||||||
showApprovalForm: false,
|
showApprovalForm: false,
|
||||||
unionOptions: [],
|
unionOptions: [],
|
||||||
unitOptions: [],
|
unitOptions: [],
|
||||||
userOptions: [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
methods: {
|
methods: {
|
||||||
//查询经办人
|
|
||||||
createRemoteMethod(options) {
|
|
||||||
return (keyword) => {
|
|
||||||
this.selectQueryUser(keyword, options)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectQueryUser(keyword, options) {
|
|
||||||
options.length = 0
|
|
||||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {keyword: keyword}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
options.push(...res.data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
userChange(val) {
|
|
||||||
const user = this.userOptions.find(o => o.id === val)
|
|
||||||
if (user) {
|
|
||||||
const { userName } = user
|
|
||||||
this.$set(this.pageForm, "userName", userName)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onView(row) {
|
onView(row) {
|
||||||
this.$refs.guava.edit(()=>{
|
this.$refs.guava.edit(()=>{
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
|
|||||||
+16
-8
@@ -17,7 +17,7 @@ layout("/layouts/platform.html"){
|
|||||||
filterable
|
filterable
|
||||||
placeholder="请选择教代会"
|
placeholder="请选择教代会"
|
||||||
style="width:100%;"
|
style="width:100%;"
|
||||||
@change="doSearch"
|
@change="getAllDelegation(pageForm.teacherMeetId);doSearch()"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in teacherMeets"
|
v-for="item in teacherMeets"
|
||||||
@@ -27,6 +27,13 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
<search-item label="代表团" >
|
||||||
|
<el-select clearable filterable placeholder="代表团" style="width: 100%"
|
||||||
|
v-model="pageForm.delegationId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in delegations"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
<search-item label="分工会">
|
<search-item label="分工会">
|
||||||
<el-select clearable filterable placeholder="分工会" style="width: 100%"
|
<el-select clearable filterable placeholder="分工会" style="width: 100%"
|
||||||
v-model="pageForm.unionId">
|
v-model="pageForm.unionId">
|
||||||
@@ -58,13 +65,14 @@ layout("/layouts/platform.html"){
|
|||||||
fixed
|
fixed
|
||||||
type="index"
|
type="index"
|
||||||
width="50"></el-table-column>
|
width="50"></el-table-column>
|
||||||
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
|
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||||
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
|
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||||
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
|
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||||
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
|
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||||
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
|
<el-table-column label="所属单位" prop="unitName"></el-table-column>
|
||||||
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
|
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="100" fixed="right">
|
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||||
|
<el-table-column label="操作" width="100" fixed="right">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
title="团长二次推选"
|
title="团长最终投票"
|
||||||
width="70%"
|
width="70%"
|
||||||
|
|
||||||
>
|
>
|
||||||
@@ -36,7 +36,7 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
|
|||||||
</div>
|
</div>
|
||||||
</el-transfer>
|
</el-transfer>
|
||||||
<span slot="footer">
|
<span slot="footer">
|
||||||
<span style="color:red;font-size: 15px; display:flex;text-align: right;">推选名额:{{delegationQuotaCount}}个</span>
|
<span style="color:red;font-size: 15px; display:flex;text-align: right;">投票名额:{{delegationQuotaCount}}个</span>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
||||||
|
|||||||
+34
-17
@@ -34,6 +34,13 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
<search-item label="代表团" >
|
||||||
|
<el-select clearable filterable placeholder="代表团" style="width: 100%"
|
||||||
|
v-model="pageForm.delegationId">
|
||||||
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
|
v-for="item in delegations"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
<search-item label="所属工会">
|
<search-item label="所属工会">
|
||||||
<el-select clearable filterable placeholder="所属工会" style="width: 100%"
|
<el-select clearable filterable placeholder="所属工会" style="width: 100%"
|
||||||
v-model="pageForm.unionId" @change="flushUnits" @clear="flushUnits">
|
v-model="pageForm.unionId" @change="flushUnits" @clear="flushUnits">
|
||||||
@@ -76,15 +83,15 @@ layout("/layouts/platform.html"){
|
|||||||
fixed
|
fixed
|
||||||
type="index"
|
type="index"
|
||||||
width="50"></el-table-column>
|
width="50"></el-table-column>
|
||||||
<el-table-column align="center" label="工号" prop="loginName"></el-table-column>
|
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||||
<el-table-column align="center" label="姓名" prop="userName"></el-table-column>
|
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||||
<el-table-column align="center" label="年龄" prop="age"></el-table-column>
|
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||||
<el-table-column align="center" label="性别" prop="sex"></el-table-column>
|
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||||
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
|
<el-table-column label="所属单位" prop="unitName"></el-table-column>
|
||||||
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
|
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||||
<el-table-column align="center" label="所属代表团" prop="delegationName"></el-table-column>
|
<el-table-column label="所属代表团" prop="delegationName"></el-table-column>
|
||||||
<el-table-column align="center" label="票数" prop="pushCount"></el-table-column>
|
<el-table-column label="票数" prop="pushCount"></el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="130" fixed="right">
|
<el-table-column label="操作" width="130" fixed="right">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -102,14 +109,14 @@ layout("/layouts/platform.html"){
|
|||||||
<el-dialog title="投票详情" :close-on-click-modal="false" :visible.sync="infoDialogVisible" top="50px"
|
<el-dialog title="投票详情" :close-on-click-modal="false" :visible.sync="infoDialogVisible" top="50px"
|
||||||
width="60%">
|
width="60%">
|
||||||
<el-table :data="chooseUserTableData" max-height="500">
|
<el-table :data="chooseUserTableData" max-height="500">
|
||||||
<el-table-column align="center" header-align="center" label="序号" type="index" width="60px"></el-table-column>
|
<el-table-column label="序号" type="index" width="60px"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" prop="pushUserName" label="推选人"></el-table-column>
|
<el-table-column prop="pushUserName" label="推选人"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" prop="pushLoginName" label="推选人工号"></el-table-column>
|
<el-table-column prop="pushLoginName" label="推选人工号"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" prop="mobile" label="联系方式"></el-table-column>
|
<el-table-column prop="mobile" label="联系方式"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" prop="unitName" label="所属单位"></el-table-column>
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" prop="delegationName" label="所属代表团"></el-table-column>
|
<el-table-column prop="delegationName" label="所属代表团"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" prop="pushDate" label="推选时间">
|
<el-table-column prop="pushDate" label="推选时间">
|
||||||
<template #default="{row}">
|
<template #default="{row}">
|
||||||
{{ $moment(row.pushDate).format('YYYY-MM-DD') }}
|
{{ $moment(row.pushDate).format('YYYY-MM-DD') }}
|
||||||
</template>
|
</template>
|
||||||
@@ -137,6 +144,8 @@ layout("/layouts/platform.html"){
|
|||||||
unitOptions: [],
|
unitOptions: [],
|
||||||
chooseUserTableData: [],
|
chooseUserTableData: [],
|
||||||
infoDialogVisible: false,
|
infoDialogVisible: false,
|
||||||
|
|
||||||
|
delegations: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
@@ -177,11 +186,19 @@ layout("/layouts/platform.html"){
|
|||||||
this.teacherMeets = resp.data
|
this.teacherMeets = resp.data
|
||||||
if (this.teacherMeets && this.teacherMeets.length > 0) {
|
if (this.teacherMeets && this.teacherMeets.length > 0) {
|
||||||
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
|
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
|
||||||
|
this.getAllDelegation(this.teacherMeets[0].id)
|
||||||
this.pageData()
|
this.pageData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getAllDelegation(id) {
|
||||||
|
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.delegations = resp.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column prop="title" label="标题" min-width="300px"></el-table-column>
|
<el-table-column prop="title" label="标题" min-width="300px"></el-table-column>
|
||||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
|
|||||||
@@ -12,14 +12,24 @@ layout("/layouts/platform.html"){
|
|||||||
<search-item label="标题">
|
<search-item label="标题">
|
||||||
<el-input v-model="pageForm.title" placeholder="标题" clearable></el-input>
|
<el-input v-model="pageForm.title" placeholder="标题" clearable></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="所属工会">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable style="width: 100%">
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
placeholder="请选择分工会" clearable>
|
||||||
|
<el-option v-for="item in unionOptions"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="所属单位:">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位" filterable clearable style="width: 100%">
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
<el-option v-for="item in unitOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
placeholder="请选择单位" clearable>
|
||||||
|
<el-option v-for="item in unitOptions"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
</search>
|
</search>
|
||||||
@@ -28,11 +38,11 @@ layout("/layouts/platform.html"){
|
|||||||
<table-tool></table-tool>
|
<table-tool></table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
<el-table-column prop="title" label="标题" min-width="300px"></el-table-column>
|
<el-table-column prop="title" label="标题"></el-table-column>
|
||||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
<!-- <el-table-column prop="submitTime" label="投稿时间"></el-table-column>-->
|
<!-- <el-table-column prop="submitTime" label="投稿时间"></el-table-column>-->
|
||||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
@@ -113,9 +123,11 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
|
||||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
|
||||||
this.pageData()
|
this.pageData()
|
||||||
|
//工会查询
|
||||||
|
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||||
|
//单位查询
|
||||||
|
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -12,14 +12,24 @@ layout("/layouts/platform.html"){
|
|||||||
<search-item label="标题">
|
<search-item label="标题">
|
||||||
<el-input v-model="pageForm.title" placeholder="标题" clearable></el-input>
|
<el-input v-model="pageForm.title" placeholder="标题" clearable></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="所属工会">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable style="width: 100%">
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
placeholder="请选择分工会" clearable>
|
||||||
|
<el-option v-for="item in unionOptions"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="所属单位:">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位" filterable clearable style="width: 100%">
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
<el-option v-for="item in unitOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
placeholder="请选择单位" clearable>
|
||||||
|
<el-option v-for="item in unitOptions"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
</search>
|
</search>
|
||||||
@@ -33,11 +43,11 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
<el-table-column prop="title" label="标题" min-width="300px"></el-table-column>
|
<el-table-column prop="title" label="标题"></el-table-column>
|
||||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
<!-- <el-table-column prop="submitTime" label="投稿时间"></el-table-column>-->
|
<!-- <el-table-column prop="submitTime" label="投稿时间"></el-table-column>-->
|
||||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
@@ -161,9 +171,11 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
|
||||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
|
||||||
this.pageData()
|
this.pageData()
|
||||||
|
//工会查询
|
||||||
|
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||||
|
//单位查询
|
||||||
|
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -244,6 +244,26 @@ layout("/layouts/platform.html"){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 添加检查用户状态的方法
|
||||||
|
async checkUserStatus() {
|
||||||
|
// 检查是否为退休人员
|
||||||
|
const isRetired = await this.checkRetirementStatus();
|
||||||
|
if (!isRetired) {
|
||||||
|
this.$message.warning('您不是退休人员,无法申请此项福利');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果不是编辑状态,检查是否已申请过
|
||||||
|
if (!this.bizId) {
|
||||||
|
const isApplied = await this.checkUserApplication();
|
||||||
|
if (isApplied) {
|
||||||
|
this.$message.warning('您已经提交过申请,不能重复申请');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // 返回 true 表示检查通过
|
||||||
|
},
|
||||||
// 添加检查是否为退休人员的方法
|
// 添加检查是否为退休人员的方法
|
||||||
async checkRetirementStatus() {
|
async checkRetirementStatus() {
|
||||||
try {
|
try {
|
||||||
@@ -274,20 +294,10 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
// 检查是否为退休人员
|
// 检查用户状态,如果检查失败则直接返回
|
||||||
const isRetired = await this.checkRetirementStatus();
|
const statusCheckPassed = await this.checkUserStatus();
|
||||||
if (!isRetired) {
|
if (!statusCheckPassed) return;
|
||||||
this.$message.warning('您不是退休人员,无法申请此项福利');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.bizId) {
|
|
||||||
const isApplied = await this.checkUserApplication();
|
|
||||||
if (isApplied) {
|
|
||||||
this.$message.warning('您已经提交过申请,不能重复申请');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const isValid = await this.validateBeforeSubmit();
|
const isValid = await this.validateBeforeSubmit();
|
||||||
if (!isValid) return;
|
if (!isValid) return;
|
||||||
|
|
||||||
@@ -337,6 +347,7 @@ layout("/layouts/platform.html"){
|
|||||||
if (this.bizId) {
|
if (this.bizId) {
|
||||||
this.findOne(this.bizId).then(async data => {
|
this.findOne(this.bizId).then(async data => {
|
||||||
this.formData = data
|
this.formData = data
|
||||||
|
console( data)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const {id, username, loginname, union, unit, sex, birthday} = this.$store.state.user
|
const {id, username, loginname, union, unit, sex, birthday} = this.$store.state.user
|
||||||
@@ -356,7 +367,8 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.init()
|
this.init();
|
||||||
|
this.checkUserStatus();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -18,9 +18,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option label="女" value="女"></el-option>
|
<el-option label="女" value="女"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -28,9 +28,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -46,6 +46,7 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
@@ -53,7 +54,6 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column prop="retireTime" label="退休时间"></el-table-column>
|
<el-table-column prop="retireTime" label="退休时间"></el-table-column>
|
||||||
<el-table-column prop="bonus" label="奖励金额"></el-table-column>
|
<el-table-column prop="bonus" label="奖励金额"></el-table-column>
|
||||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ layout("/layouts/platform.html"){
|
|||||||
<table-tool></table-tool>
|
<table-tool></table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -18,9 +18,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option label="女" value="女"></el-option>
|
<el-option label="女" value="女"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -28,9 +28,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -49,6 +49,7 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -19,9 +19,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<template v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN', 'BRANCH_UNION_CHAIRMAN'])">
|
<template v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN', 'BRANCH_UNION_CHAIRMAN'])">
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -29,9 +29,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -50,6 +50,7 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
|||||||
+29
-20
@@ -12,7 +12,6 @@ layout("/layouts/platform.html"){
|
|||||||
<el-descriptions-item label="职工姓名">{{formData.userName}}</el-descriptions-item>
|
<el-descriptions-item label="职工姓名">{{formData.userName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="性别">{{formData.sex}}</el-descriptions-item>
|
<el-descriptions-item label="性别">{{formData.sex}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="民族">{{formData.nation}}</el-descriptions-item>
|
<el-descriptions-item label="民族">{{formData.nation}}</el-descriptions-item>
|
||||||
<!-- 修改出生年月的显示方式 -->
|
|
||||||
<el-descriptions-item label="出生年月">{{formatDate(formData.birthday)}}</el-descriptions-item>
|
<el-descriptions-item label="出生年月">{{formatDate(formData.birthday)}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="工作单位" >{{formData.unitName}}</el-descriptions-item>
|
<el-descriptions-item label="工作单位" >{{formData.unitName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="电话" >{{formData.mobile}}</el-descriptions-item>
|
<el-descriptions-item label="电话" >{{formData.mobile}}</el-descriptions-item>
|
||||||
@@ -32,23 +31,19 @@ layout("/layouts/platform.html"){
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="民族">
|
<el-descriptions-item label="民族">
|
||||||
<el-form-item label="民族" prop="loverNation">
|
<el-form-item label="民族" prop="loverNation">
|
||||||
<el-select clearable placeholder="请选择民族"
|
<dict-select v-model="formData.loverNation" code="USER_NATION" style="width: 100%" placeholder="请选择民族">
|
||||||
style="width: 100%;"
|
</dict-select>
|
||||||
v-model="formData.loverNation">
|
|
||||||
<el-option :label="item.name" :value="item.code"
|
|
||||||
v-for="item in dict.type.USER_NATION"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="出生年月" >
|
<el-descriptions-item label="出生年月" >
|
||||||
<el-form-item label="出生年月" prop="loverBirthday">
|
<el-form-item prop="loverBirthday">
|
||||||
<el-date-picker type="date"
|
<el-date-picker
|
||||||
v-model="formData.loverBirthday"
|
v-model="formData.loverBirthday"
|
||||||
placeholder="请选择"
|
type="date"
|
||||||
clearable
|
placeholder="请选择出生年月"
|
||||||
style="width: 100%"
|
style="width: 100%;"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd">
|
||||||
></el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="工作单位" span="2">
|
<el-descriptions-item label="工作单位" span="2">
|
||||||
@@ -167,7 +162,6 @@ layout("/layouts/platform.html"){
|
|||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
store,
|
store,
|
||||||
dicts: ["USER_NATION"],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
bizId: GetQueryString("bizId"),
|
bizId: GetQueryString("bizId"),
|
||||||
@@ -180,9 +174,26 @@ layout("/layouts/platform.html"){
|
|||||||
loverBirthday: [{ required: true, message: '请选择爱人出生年月', trigger: 'change' }],
|
loverBirthday: [{ required: true, message: '请选择爱人出生年月', trigger: 'change' }],
|
||||||
loverUnitName: [{ required: true, message: '请输入爱人工作单位', trigger: 'blur' }],
|
loverUnitName: [{ required: true, message: '请输入爱人工作单位', trigger: 'blur' }],
|
||||||
startTime: [{ required: true, message: '请选择休假开始时间', trigger: 'change' }],
|
startTime: [{ required: true, message: '请选择休假开始时间', trigger: 'change' }],
|
||||||
endTime: [{ required: true, message: '请选择休假结束时间', trigger: 'change' }],
|
endTime: [{ required: true, message: '请选择休假结束时间', trigger: 'change' },
|
||||||
childrenBirthday: [{ required: true, message: '请选择子女出生日期', trigger: 'change' }]
|
{validator: (rule, value, callback) => {
|
||||||
|
if (this.formData.startTime && value) {
|
||||||
|
const startDate = new Date(this.formData.startTime);
|
||||||
|
const endDate = new Date(value);
|
||||||
|
if (endDate < startDate) {
|
||||||
|
callback(new Error('休假结束时间不能早于开始时间'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
childrenBirthday: [{ required: true, message: '请选择子女出生日期', trigger: 'change' }]
|
||||||
|
}
|
||||||
|
,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -284,13 +295,13 @@ layout("/layouts/platform.html"){
|
|||||||
const year = endDate.getFullYear();
|
const year = endDate.getFullYear();
|
||||||
const month = String(endDate.getMonth() + 1).padStart(2, '0');
|
const month = String(endDate.getMonth() + 1).padStart(2, '0');
|
||||||
const day = String(endDate.getDate()).padStart(2, '0');
|
const day = String(endDate.getDate()).padStart(2, '0');
|
||||||
// 使用字符串拼接代替模板字符串,避免与Beetl冲突
|
|
||||||
this.$set(this.formData, 'endTime', year + '-' + month + '-' + day);
|
this.$set(this.formData, 'endTime', year + '-' + month + '-' + day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
onSave() {
|
onSave() {
|
||||||
|
console.log(this.formData);
|
||||||
this.$confirm("您确定保存吗?", "提示", {
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@@ -384,8 +395,6 @@ layout("/layouts/platform.html"){
|
|||||||
birthday: birthday,
|
birthday: birthday,
|
||||||
mobile:mobile
|
mobile:mobile
|
||||||
}
|
}
|
||||||
console.log('FormData birthday:', this.formData.birthday);
|
|
||||||
|
|
||||||
// 根据性别设置默认值
|
// 根据性别设置默认值
|
||||||
if (this.isMale) {
|
if (this.isMale) {
|
||||||
// 男性默认设置
|
// 男性默认设置
|
||||||
|
|||||||
+7
-7
@@ -9,8 +9,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -18,9 +18,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option label="女" value="女"></el-option>
|
<el-option label="女" value="女"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -28,9 +28,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -46,13 +46,13 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||||
|
|||||||
@@ -99,6 +99,14 @@ const maternityLeaveInfo = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 打开
|
||||||
|
onOpen(row) {
|
||||||
|
this.row = row
|
||||||
|
this.visible = true
|
||||||
|
this.getInfo()
|
||||||
|
this.getDoneTasks()
|
||||||
|
},
|
||||||
|
|
||||||
// 添加日期格式化方法
|
// 添加日期格式化方法
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
if (!date) return '';
|
if (!date) return '';
|
||||||
@@ -124,13 +132,6 @@ const maternityLeaveInfo = {
|
|||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 打开
|
|
||||||
onOpen(row) {
|
|
||||||
this.row = row
|
|
||||||
this.visible = true
|
|
||||||
this.getInfo()
|
|
||||||
this.getDoneTasks()
|
|
||||||
},
|
|
||||||
|
|
||||||
// 获取申请信息
|
// 获取申请信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ layout("/layouts/platform.html"){
|
|||||||
<table-tool></table-tool>
|
<table-tool></table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
|||||||
+7
-6
@@ -9,8 +9,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -18,9 +18,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option label="女" value="女"></el-option>
|
<el-option label="女" value="女"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -28,9 +28,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -49,6 +49,7 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
|||||||
+7
-6
@@ -9,8 +9,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -19,9 +19,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<template v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN', 'BRANCH_UNION_CHAIRMAN'])">
|
<template v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN', 'BRANCH_UNION_CHAIRMAN'])">
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -29,9 +29,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -50,6 +50,7 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||||
|
|||||||
+7
-7
@@ -5,7 +5,7 @@ layout("/layouts/platform.html"){
|
|||||||
<guava ref="guava">
|
<guava ref="guava">
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<snaker-start slot="header" label="省级互助保障" define_key="SJHZBZ" ></snaker-start>
|
<h3 style="color: var(--color-primary)" slot="header">省级互助保障</h3>
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="140px" label-position="right"
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="140px" label-position="right"
|
||||||
label-suffix=":">
|
label-suffix=":">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
@@ -105,7 +105,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="age" label="年龄">
|
<el-form-item prop="age" label="年龄">
|
||||||
<el-input v-model="formData.age" placeholder="请输入年龄"></el-input>
|
<el-input v-model="formData.age" placeholder="请输入年龄" type="number"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="bankCardNumber" label="银行卡账号">
|
<el-form-item prop="bankCardNumber" label="银行卡账号">
|
||||||
<el-input v-model="formData.bankCardNumber" placeholder="请输入银行卡账号"></el-input>
|
<el-input v-model="formData.bankCardNumber" placeholder="请输入银行卡账号" type="number"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -250,10 +250,10 @@ layout("/layouts/platform.html"){
|
|||||||
unitName: [{ required: true, message: '请填写所属单位', trigger: 'blur' }],
|
unitName: [{ required: true, message: '请填写所属单位', trigger: 'blur' }],
|
||||||
unionName: [{ required: true, message: '请填写所属工会', trigger: 'blur' }],
|
unionName: [{ required: true, message: '请填写所属工会', trigger: 'blur' }],
|
||||||
sex: [{ required: true, message: '请填写性别', trigger: 'blur' }],
|
sex: [{ required: true, message: '请填写性别', trigger: 'blur' }],
|
||||||
mobile: [{ required: true, message: '请填写手机号', trigger: 'blur' }],
|
mobile: [{ required: true, message: '请填写手机号', trigger: 'blur' },{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }],
|
||||||
idCard: [{ required: true, message: '请填写身份证号', trigger: 'blur' }],
|
idCard: [{ required: true, message: '请填写身份证号', trigger: 'blur' }, {pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码', trigger: 'blur'}],
|
||||||
medicalInsuranceState: [{ required: true, message: '请选择医保状态', trigger: 'change' }],
|
age: [{ required: true, message: '请输入年龄', trigger: 'blur' }, { type: 'number', min: 16, max: 60, message: '年龄必须在16-60岁之间', trigger: 'blur', transform: (value) => Number(value) }],
|
||||||
insuranceUserState: [{ required: true, message: '请选择在职状态', trigger: 'change' }],
|
bankCardNumber: [ { pattern: /^([1-9]{1})(\d{15}|\d{18})$/, message: '请输入正确的银行卡号', trigger: 'blur' }],
|
||||||
sign: [{ required: true, message: '请签字', trigger: 'change' }]
|
sign: [{ required: true, message: '请签字', trigger: 'change' }]
|
||||||
},
|
},
|
||||||
projectList: [],
|
projectList: [],
|
||||||
|
|||||||
+7
-6
@@ -23,8 +23,8 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="姓名">
|
<search-item label="姓名/工号">
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="性别">
|
<search-item label="性别">
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||||
@@ -32,9 +32,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option label="女" value="女"></el-option>
|
<el-option label="女" value="女"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="工会名称">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择工会名称" clearable>
|
placeholder="请选择分工会" clearable>
|
||||||
<el-option v-for="item in unionOptions"
|
<el-option v-for="item in unionOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -42,9 +42,9 @@ layout("/layouts/platform.html"){
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="单位名称">
|
<search-item label="单位">
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择单位名称" clearable>
|
placeholder="请选择单位" clearable>
|
||||||
<el-option v-for="item in unitOptions"
|
<el-option v-for="item in unitOptions"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -60,6 +60,7 @@ layout("/layouts/platform.html"){
|
|||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="age" label="年龄"></el-table-column>
|
<el-table-column prop="age" label="年龄"></el-table-column>
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
const userInfo = {
|
const userInfo = {
|
||||||
template: /*language=HTML*/ `
|
template: /*language=HTML*/ `
|
||||||
<div>
|
<div>
|
||||||
<div class="process-title">
|
|
||||||
申请信息
|
|
||||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
|
||||||
</div>
|
|
||||||
<table-tool label="人员信息"></table-tool>
|
<table-tool label="人员信息"></table-tool>
|
||||||
<el-descriptions :column="2" border class="flow-task-form">
|
<el-descriptions :column="2" border class="flow-task-form">
|
||||||
<el-descriptions-item label="所属事项">{{viewData.projectName}}</el-descriptions-item>
|
<el-descriptions-item label="所属事项">{{viewData.projectName}}</el-descriptions-item>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ layout("/layouts/platform.html"){
|
|||||||
<table-tool></table-tool>
|
<table-tool></table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
|
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||||
<el-table-column prop="age" label="年龄"></el-table-column>
|
<el-table-column prop="age" label="年龄"></el-table-column>
|
||||||
|
|||||||
-240
@@ -1,240 +0,0 @@
|
|||||||
<!--#
|
|
||||||
layout("/layouts/platform.html"){
|
|
||||||
#-->
|
|
||||||
<div id="app">
|
|
||||||
<guava ref="guava">
|
|
||||||
<el-card shadow="never">
|
|
||||||
<search @search="doSearch">
|
|
||||||
<search-item label="年度">
|
|
||||||
<el-date-picker v-model="pageForm.year"
|
|
||||||
type="year"
|
|
||||||
value-format="yyyy"
|
|
||||||
placeholder="年度"
|
|
||||||
style="width: 100%"
|
|
||||||
@change="getProjectByYear"
|
|
||||||
></el-date-picker>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="事项名称">
|
|
||||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
|
||||||
<el-option v-for="item in projectList"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.projectName"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="姓名">
|
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="性别">
|
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
|
||||||
<el-option label="男" value="男"></el-option>
|
|
||||||
<el-option label="女" value="女"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="工会名称">
|
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
|
||||||
placeholder="请选择工会名称" clearable>
|
|
||||||
<el-option v-for="item in unionOptions"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="单位名称">
|
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
|
||||||
placeholder="请选择单位名称" clearable>
|
|
||||||
<el-option v-for="item in unitOptions"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
</search>
|
|
||||||
</el-card>
|
|
||||||
<el-card shadow="never">
|
|
||||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
|
||||||
<el-radio-button :label="true">已审核</el-radio-button>
|
|
||||||
<el-radio-button :label="false">未审核</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</table-tool>
|
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
|
||||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
|
||||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
|
||||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
|
||||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
|
||||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
|
||||||
size="small"></enum-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" fixed="right" width="300px">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
|
||||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
|
||||||
</el-button>
|
|
||||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
|
||||||
</el-card>
|
|
||||||
<template #view>
|
|
||||||
<user-info ref="userInfoInfoRef">
|
|
||||||
<div v-if="showApprovalForm">
|
|
||||||
<div class="process-title">
|
|
||||||
{{formData.taskName}}
|
|
||||||
</div>
|
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
|
||||||
class="flow-task-form">
|
|
||||||
<el-form-item label="审批意见" prop="tf_opinion"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row type="flex" justify="end">
|
|
||||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
|
||||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
|
||||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
|
||||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</user-info>
|
|
||||||
</template>
|
|
||||||
</guava>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
<!--#include('../common/userInfo.js'){}#-->
|
|
||||||
new Vue({
|
|
||||||
el: "#app",
|
|
||||||
store,
|
|
||||||
//分页数据
|
|
||||||
mixins: [initTableMixins],
|
|
||||||
components: {
|
|
||||||
"user-info": userInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
pageDataUrl: "/platform/mutualInsurance/schoolAudit/pageData",
|
|
||||||
pageForm: {
|
|
||||||
approval: false
|
|
||||||
},
|
|
||||||
formData: {},
|
|
||||||
showApprovalForm: false,
|
|
||||||
unionOptions: [],
|
|
||||||
unitOptions: [],
|
|
||||||
userOptions: [],
|
|
||||||
projectList: [],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
,
|
|
||||||
methods: {
|
|
||||||
onView(row) {
|
|
||||||
this.$refs.guava.view(()=>{
|
|
||||||
this.showApprovalForm = false;
|
|
||||||
this.$refs.userInfoInfoRef.onOpen(row)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openAudit(row) {
|
|
||||||
this.$refs.guava.view(()=>{
|
|
||||||
this.showApprovalForm = true
|
|
||||||
this.formData = {
|
|
||||||
processTaskId: row.taskId,
|
|
||||||
taskName: row.curTaskName
|
|
||||||
}
|
|
||||||
this.$refs.userInfoInfoRef.onOpen(row)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onRevoke(row) {
|
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.pageData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleTaskAction(val) {
|
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
|
||||||
data: JSON.stringify({
|
|
||||||
...this.formData,
|
|
||||||
submitType: val
|
|
||||||
})
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$refs.guava.index()
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.doSearch()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 根据年度获取项目列表
|
|
||||||
async getProjectByYear() {
|
|
||||||
if (!this.pageForm.year) {
|
|
||||||
this.projectList = [];
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
// 修改为互助保障项目的查询接口
|
|
||||||
const res = await this.$axios.post("/platform/mutualInsurance/apply/listProject", {
|
|
||||||
year: this.pageForm.year
|
|
||||||
});
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.projectList = res.data;
|
|
||||||
// 如果当前选中的项目不在新列表中,清空选择
|
|
||||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("获取项目列表失败:", error);
|
|
||||||
this.projectList = [];
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.pageData()
|
|
||||||
//工会查询
|
|
||||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
|
||||||
//单位查询
|
|
||||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
|
||||||
// 设置默认年份为当前年份
|
|
||||||
const currentYear = new Date().getFullYear().toString();
|
|
||||||
this.$set(this.pageForm, 'year', currentYear);
|
|
||||||
// 获取当前年份的项目列表
|
|
||||||
this.getProjectByYear();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!--#
|
|
||||||
}
|
|
||||||
#-->
|
|
||||||
-240
@@ -1,240 +0,0 @@
|
|||||||
<!--#
|
|
||||||
layout("/layouts/platform.html"){
|
|
||||||
#-->
|
|
||||||
<div id="app">
|
|
||||||
<guava ref="guava">
|
|
||||||
<el-card shadow="never">
|
|
||||||
<search @search="doSearch">
|
|
||||||
<search-item label="年度">
|
|
||||||
<el-date-picker v-model="pageForm.year"
|
|
||||||
type="year"
|
|
||||||
value-format="yyyy"
|
|
||||||
placeholder="年度"
|
|
||||||
style="width: 100%"
|
|
||||||
@change="getProjectByYear"
|
|
||||||
></el-date-picker>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="事项名称">
|
|
||||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
|
||||||
<el-option v-for="item in projectList"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.projectName"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="姓名">
|
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="性别">
|
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
|
||||||
<el-option label="男" value="男"></el-option>
|
|
||||||
<el-option label="女" value="女"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="工会名称">
|
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
|
||||||
placeholder="请选择工会名称" clearable>
|
|
||||||
<el-option v-for="item in unionOptions"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="单位名称">
|
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
|
||||||
placeholder="请选择单位名称" clearable>
|
|
||||||
<el-option v-for="item in unitOptions"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
</search>
|
|
||||||
</el-card>
|
|
||||||
<el-card shadow="never">
|
|
||||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
|
||||||
<el-radio-button :label="true">已审核</el-radio-button>
|
|
||||||
<el-radio-button :label="false">未审核</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</table-tool>
|
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
|
||||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
|
||||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
|
||||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
|
||||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
|
||||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
|
||||||
size="small"></enum-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" fixed="right" width="300px">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
|
||||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
|
||||||
</el-button>
|
|
||||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
|
||||||
</el-card>
|
|
||||||
<template #view>
|
|
||||||
<user-info ref="userInfoInfoRef">
|
|
||||||
<div v-if="showApprovalForm">
|
|
||||||
<div class="process-title">
|
|
||||||
{{formData.taskName}}
|
|
||||||
</div>
|
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
|
||||||
class="flow-task-form">
|
|
||||||
<el-form-item label="审批意见" prop="tf_opinion"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row type="flex" justify="end">
|
|
||||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
|
||||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
|
||||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
|
||||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</user-info>
|
|
||||||
</template>
|
|
||||||
</guava>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
<!--#include('../common/userInfo.js'){}#-->
|
|
||||||
new Vue({
|
|
||||||
el: "#app",
|
|
||||||
store,
|
|
||||||
//分页数据
|
|
||||||
mixins: [initTableMixins],
|
|
||||||
components: {
|
|
||||||
"user-info": userInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
pageDataUrl: "/platform/mutualInsurance/secretaryAudit/pageData",
|
|
||||||
pageForm: {
|
|
||||||
approval: false
|
|
||||||
},
|
|
||||||
formData: {},
|
|
||||||
showApprovalForm: false,
|
|
||||||
unionOptions: [],
|
|
||||||
unitOptions: [],
|
|
||||||
userOptions: [],
|
|
||||||
projectList: [],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
,
|
|
||||||
methods: {
|
|
||||||
onView(row) {
|
|
||||||
this.$refs.guava.view(()=>{
|
|
||||||
this.showApprovalForm = false;
|
|
||||||
this.$refs.userInfoInfoRef.onOpen(row)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openAudit(row) {
|
|
||||||
this.$refs.guava.view(()=>{
|
|
||||||
this.showApprovalForm = true
|
|
||||||
this.formData = {
|
|
||||||
processTaskId: row.taskId,
|
|
||||||
taskName: row.curTaskName
|
|
||||||
}
|
|
||||||
this.$refs.userInfoInfoRef.onOpen(row)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onRevoke(row) {
|
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.pageData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleTaskAction(val) {
|
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
|
||||||
data: JSON.stringify({
|
|
||||||
...this.formData,
|
|
||||||
submitType: val
|
|
||||||
})
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$refs.guava.index()
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.doSearch()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 根据年度获取项目列表
|
|
||||||
async getProjectByYear() {
|
|
||||||
if (!this.pageForm.year) {
|
|
||||||
this.projectList = [];
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
// 修改为互助保障项目的查询接口
|
|
||||||
const res = await this.$axios.post("/platform/mutualInsurance/apply/listProject", {
|
|
||||||
year: this.pageForm.year
|
|
||||||
});
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.projectList = res.data;
|
|
||||||
// 如果当前选中的项目不在新列表中,清空选择
|
|
||||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("获取项目列表失败:", error);
|
|
||||||
this.projectList = [];
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.pageData()
|
|
||||||
//工会查询
|
|
||||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
|
||||||
//单位查询
|
|
||||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
|
||||||
// 设置默认年份为当前年份
|
|
||||||
const currentYear = new Date().getFullYear().toString();
|
|
||||||
this.$set(this.pageForm, 'year', currentYear);
|
|
||||||
// 获取当前年份的项目列表
|
|
||||||
this.getProjectByYear();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!--#
|
|
||||||
}
|
|
||||||
#-->
|
|
||||||
-240
@@ -1,240 +0,0 @@
|
|||||||
<!--#
|
|
||||||
layout("/layouts/platform.html"){
|
|
||||||
#-->
|
|
||||||
<div id="app">
|
|
||||||
<guava ref="guava">
|
|
||||||
<el-card shadow="never">
|
|
||||||
<search @search="doSearch">
|
|
||||||
<search-item label="年度">
|
|
||||||
<el-date-picker v-model="pageForm.year"
|
|
||||||
type="year"
|
|
||||||
value-format="yyyy"
|
|
||||||
placeholder="年度"
|
|
||||||
style="width: 100%"
|
|
||||||
@change="getProjectByYear"
|
|
||||||
></el-date-picker>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="事项名称">
|
|
||||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
|
||||||
<el-option v-for="item in projectList"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.projectName"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="姓名">
|
|
||||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="性别">
|
|
||||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
|
||||||
<el-option label="男" value="男"></el-option>
|
|
||||||
<el-option label="女" value="女"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="工会名称">
|
|
||||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
|
||||||
placeholder="请选择工会名称" clearable>
|
|
||||||
<el-option v-for="item in unionOptions"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
<search-item label="单位名称">
|
|
||||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
|
||||||
placeholder="请选择单位名称" clearable>
|
|
||||||
<el-option v-for="item in unitOptions"
|
|
||||||
:value="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</search-item>
|
|
||||||
</search>
|
|
||||||
</el-card>
|
|
||||||
<el-card shadow="never">
|
|
||||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
|
||||||
<el-radio-button :label="true">已审核</el-radio-button>
|
|
||||||
<el-radio-button :label="false">未审核</el-radio-button>
|
|
||||||
</el-radio-group>
|
|
||||||
</table-tool>
|
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
|
||||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
|
||||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
|
||||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
|
||||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
|
||||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
|
||||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
|
||||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
|
||||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
|
||||||
size="small"></enum-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" fixed="right" width="300px">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
|
||||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
|
||||||
</el-button>
|
|
||||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
|
||||||
</el-card>
|
|
||||||
<template #view>
|
|
||||||
<user-info ref="userInfoInfoRef">
|
|
||||||
<div v-if="showApprovalForm">
|
|
||||||
<div class="process-title">
|
|
||||||
{{formData.taskName}}
|
|
||||||
</div>
|
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
|
||||||
class="flow-task-form">
|
|
||||||
<el-form-item label="审批意见" prop="tf_opinion"
|
|
||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
|
||||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row type="flex" justify="end">
|
|
||||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
|
||||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
|
||||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
|
||||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</user-info>
|
|
||||||
</template>
|
|
||||||
</guava>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
<!--#include('../common/userInfo.js'){}#-->
|
|
||||||
new Vue({
|
|
||||||
el: "#app",
|
|
||||||
store,
|
|
||||||
//分页数据
|
|
||||||
mixins: [initTableMixins],
|
|
||||||
components: {
|
|
||||||
"user-info": userInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
pageDataUrl: "/platform/mutualInsurance/unionAudit/pageData",
|
|
||||||
pageForm: {
|
|
||||||
approval: false
|
|
||||||
},
|
|
||||||
formData: {},
|
|
||||||
showApprovalForm: false,
|
|
||||||
unionOptions: [],
|
|
||||||
unitOptions: [],
|
|
||||||
userOptions: [],
|
|
||||||
projectList: [],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
,
|
|
||||||
methods: {
|
|
||||||
onView(row) {
|
|
||||||
this.$refs.guava.view(()=>{
|
|
||||||
this.showApprovalForm = false;
|
|
||||||
this.$refs.userInfoInfoRef.onOpen(row)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openAudit(row) {
|
|
||||||
this.$refs.guava.view(()=>{
|
|
||||||
this.showApprovalForm = true
|
|
||||||
this.formData = {
|
|
||||||
processTaskId: row.taskId,
|
|
||||||
taskName: row.curTaskName
|
|
||||||
}
|
|
||||||
this.$refs.userInfoInfoRef.onOpen(row)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onRevoke(row) {
|
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.pageData()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleTaskAction(val) {
|
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
}).then(() => {
|
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
|
||||||
data: JSON.stringify({
|
|
||||||
...this.formData,
|
|
||||||
submitType: val
|
|
||||||
})
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$refs.guava.index()
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.doSearch()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 根据年度获取项目列表
|
|
||||||
async getProjectByYear() {
|
|
||||||
if (!this.pageForm.year) {
|
|
||||||
this.projectList = [];
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
// 修改为互助保障项目的查询接口
|
|
||||||
const res = await this.$axios.post("/platform/mutualInsurance/apply/listProject", {
|
|
||||||
year: this.pageForm.year
|
|
||||||
});
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.projectList = res.data;
|
|
||||||
// 如果当前选中的项目不在新列表中,清空选择
|
|
||||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("获取项目列表失败:", error);
|
|
||||||
this.projectList = [];
|
|
||||||
this.pageForm.projectId = "";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.pageData()
|
|
||||||
//工会查询
|
|
||||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
|
||||||
//单位查询
|
|
||||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
|
||||||
// 设置默认年份为当前年份
|
|
||||||
const currentYear = new Date().getFullYear().toString();
|
|
||||||
this.$set(this.pageForm, 'year', currentYear);
|
|
||||||
// 获取当前年份的项目列表
|
|
||||||
this.getProjectByYear();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!--#
|
|
||||||
}
|
|
||||||
#-->
|
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
const childManageInfo = {
|
const childManageInfo = {
|
||||||
template: /*language=HTML*/ `
|
template: /*language=HTML*/ `
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="process-title">
|
<table-tool label="子女信息"></table-tool>
|
||||||
子女信息
|
|
||||||
</div>
|
|
||||||
<el-descriptions :column="3" border>
|
<el-descriptions :column="3" border>
|
||||||
<el-descriptions-item label="就读年级">
|
<el-descriptions-item label="就读年级">
|
||||||
<dict-tag :options="dict.type.CHILD_MANAGE_GRADE"
|
<dict-tag :options="dict.type.CHILD_MANAGE_GRADE"
|
||||||
@@ -13,7 +10,7 @@ const childManageInfo = {
|
|||||||
<el-descriptions-item label="入学年份">{{viewData.childrenYear}}</el-descriptions-item>
|
<el-descriptions-item label="入学年份">{{viewData.childrenYear}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="姓名">{{viewData.childrenName}}</el-descriptions-item>
|
<el-descriptions-item label="姓名">{{viewData.childrenName}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="身份证号">{{viewData.childrenIdCard}}</el-descriptions-item>
|
<el-descriptions-item label="身份证号">{{viewData.childrenIdCard}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="出生日期">{{viewData.childrenBirthday}}</el-descriptions-item>
|
<el-descriptions-item label="出生日期">{{formatDate(viewData.childrenBirthday)}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="性别">{{viewData.childrenSex}}</el-descriptions-item>
|
<el-descriptions-item label="性别">{{viewData.childrenSex}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="国籍">{{viewData.childrenCountry}}</el-descriptions-item>
|
<el-descriptions-item label="国籍">{{viewData.childrenCountry}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="就读学校">{{viewData.childrenCurrentSchool}}</el-descriptions-item>
|
<el-descriptions-item label="就读学校">{{viewData.childrenCurrentSchool}}</el-descriptions-item>
|
||||||
@@ -45,6 +42,31 @@ const childManageInfo = {
|
|||||||
this.row = row
|
this.row = row
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
},
|
},
|
||||||
|
// 添加日期格式化方法
|
||||||
|
formatDate(date) {
|
||||||
|
if (!date) return '';
|
||||||
|
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||||
|
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||||
|
// 如果包含时间,只取日期部分
|
||||||
|
if (date.length > 10) {
|
||||||
|
return date.substring(0, 10);
|
||||||
|
}
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
// 否则转换为 yyyy-MM-dd 格式
|
||||||
|
try {
|
||||||
|
const d = new Date(date);
|
||||||
|
if (isNaN(d.getTime())) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
const year = d.getFullYear();
|
||||||
|
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(d.getDate()).padStart(2, '0');
|
||||||
|
return year + '-' + month + '-' + day;
|
||||||
|
} catch (e) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取申请信息
|
// 获取申请信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
this.$axios.post('/platform/childManage/write/findOne', {id: this.row.id}).then((res) => {
|
this.$axios.post('/platform/childManage/write/findOne', {id: this.row.id}).then((res) => {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ layout("/layouts/platform.html"){
|
|||||||
v-for="item in dict.type.CHILD_MANAGE_GRADE"></el-option>
|
v-for="item in dict.type.CHILD_MANAGE_GRADE"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="模糊查询">
|
<search-item label="姓名">
|
||||||
<el-input @keyup.enter.native="doSearch" clearable
|
<el-input @keyup.enter.native="doSearch" clearable
|
||||||
placeholder="请输入内容"
|
placeholder="请输入内容"
|
||||||
v-model="pageForm.searchKeyword">
|
v-model="pageForm.searchKeyword">
|
||||||
@@ -45,15 +45,15 @@ layout("/layouts/platform.html"){
|
|||||||
<el-option label="女" value="女"></el-option>
|
<el-option label="女" value="女"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="所属工会">
|
<search-item label="分工会">
|
||||||
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" clearable style="width: 100%"
|
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" clearable style="width: 100%"
|
||||||
@change="flushUnits" @clear="flushUnits">
|
@change="flushUnits" @clear="flushUnits">
|
||||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="所属单位">
|
<search-item label="单位">
|
||||||
<el-select placeholder="所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
|
<el-select placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId" clearable
|
||||||
filterable>
|
filterable>
|
||||||
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -123,7 +123,7 @@ layout("/layouts/platform.html"){
|
|||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
store,
|
store,
|
||||||
dicts: ["CHILD_MANAGE_GRADE", "CHILD_MANAGE_GRADE"],
|
dicts: ["CHILD_MANAGE_GRADE"],
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: {
|
components: {
|
||||||
"child-manage-info": childManageInfo
|
"child-manage-info": childManageInfo
|
||||||
|
|||||||
@@ -4,19 +4,15 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<snaker-start slot="header" label="信息填报" define_key="XXTB"></snaker-start>
|
<h3 style="color: var(--color-primary)" slot="header">信息填报</h3>
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||||
class="flow-task-form">
|
class="flow-task-form">
|
||||||
<table-tool label="子女信息"></table-tool>
|
<table-tool label="子女信息"></table-tool>
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
<el-descriptions-item label="就读年级">
|
<el-descriptions-item label="就读年级">
|
||||||
<el-form-item prop="childRelationship">
|
<el-form-item prop="childRelationship">
|
||||||
<el-select clearable placeholder="请选择就读年级"
|
<dict-select v-model="formData.childRelationship" code="CHILD_MANAGE_GRADE" style="width: 100%" placeholder="请选择就读年级">
|
||||||
style="width: 100%;"
|
</dict-select>
|
||||||
v-model="formData.childrenGrade">
|
|
||||||
<el-option :label="item.name" :value="item.code"
|
|
||||||
v-for="item in dict.type.CHILD_MANAGE_GRADE"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item></el-descriptions-item>
|
</el-form-item></el-descriptions-item>
|
||||||
<el-descriptions-item label="入学年份">
|
<el-descriptions-item label="入学年份">
|
||||||
<el-form-item prop="childrenBirthday">
|
<el-form-item prop="childrenBirthday">
|
||||||
@@ -72,7 +68,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-descriptions-item label="中考总成绩">
|
<el-descriptions-item label="中考总成绩">
|
||||||
<el-form-item prop="childrenMiddleScore">
|
<el-form-item prop="childrenMiddleScore">
|
||||||
<el-input v-model="formData.childrenMiddleScore" placeholder="请输入中考总成绩"
|
<el-input v-model="formData.childrenMiddleScore" placeholder="请输入中考总成绩"
|
||||||
maxlength="30"></el-input>
|
maxlength="30" type="number"></el-input>
|
||||||
</el-form-item></el-descriptions-item></el-descriptions-item>
|
</el-form-item></el-descriptions-item></el-descriptions-item>
|
||||||
<el-descriptions-item label="学科组合">
|
<el-descriptions-item label="学科组合">
|
||||||
<el-form-item prop="childrenSubjectCombination">
|
<el-form-item prop="childrenSubjectCombination">
|
||||||
@@ -181,15 +177,22 @@ layout("/layouts/platform.html"){
|
|||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
store,
|
store,
|
||||||
dicts: ["CHILD_MANAGE_GRADE"],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
bizId: GetQueryString("bizId"),
|
bizId: GetQueryString("bizId"),
|
||||||
formData: {},
|
formData: {},
|
||||||
userOptions: [],
|
userOptions: [],
|
||||||
userOptions2: [], // 添加母亲的用户选项
|
userOptions2: [],
|
||||||
formRules: {
|
formRules: {
|
||||||
},
|
childRelationship: [{ required: true, message: '请选择就读年级', trigger: 'change' }],
|
||||||
|
childrenYear: [{ required: true, message: '请选择入学年份', trigger: 'change' }],
|
||||||
|
childrenName: [{ required: true, message: '请输入子女姓名', trigger: 'blur' }],
|
||||||
|
childrenIdCard: [{ required: true, message: '请输入子女身份证号', trigger: 'blur' }, {pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码', trigger: 'blur'}],
|
||||||
|
childrenBirthday: [{ required: true, message: '请选择子女出生日期', trigger: 'change' }],
|
||||||
|
childrenSex: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
||||||
|
guardianMobile1: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }],
|
||||||
|
guardianMobile2: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
+17
@@ -589,6 +589,15 @@ layout("/layouts/platform_h5.html"){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 银行卡号格式验证
|
||||||
|
if (this.formData.bankCardNumber) {
|
||||||
|
const bankCardRegex = /^([1-9]{1})(\d{15}|\d{18})$/;
|
||||||
|
if (!bankCardRegex.test(this.formData.bankCardNumber)) {
|
||||||
|
this.$toast.fail("请输入正确的银行卡号");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.formData.bankOfDeposit) {
|
if (!this.formData.bankOfDeposit) {
|
||||||
this.$toast.fail("请填写开户行");
|
this.$toast.fail("请填写开户行");
|
||||||
return false;
|
return false;
|
||||||
@@ -604,6 +613,14 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$toast.fail("请填写慰问对象联系方式");
|
this.$toast.fail("请填写慰问对象联系方式");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// 慰问对象手机号验证
|
||||||
|
if (this.formData.condolenceMobile) {
|
||||||
|
const mobileRegex = /^1[3-9]\d{9}$/;
|
||||||
|
if (!mobileRegex.test(this.formData.condolenceMobile)) {
|
||||||
|
this.$toast.fail("请输入正确的慰问对象手机号码");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!this.formData.condolenceType) {
|
if (!this.formData.condolenceType) {
|
||||||
this.$toast.fail("请选择慰问类型");
|
this.$toast.fail("请选择慰问类型");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -34,13 +34,13 @@ const UNION_REIMBURSE_INFO = {
|
|||||||
<van-cell title="联系方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.condolenceMobile }}</van-cell>
|
<van-cell title="联系方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.condolenceMobile }}</van-cell>
|
||||||
<van-cell title="慰问类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.typeName }}</van-cell>
|
<van-cell title="慰问类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.typeName }}</van-cell>
|
||||||
<van-cell title="慰问金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.money }}</van-cell>
|
<van-cell title="慰问金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.money }}</van-cell>
|
||||||
<van-cell title="慰问时间" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.condolenceTime }}</van-cell>
|
<van-cell title="慰问时间" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ formatDate(viewData.condolenceTime) }}</van-cell>
|
||||||
<van-cell title="活动名称" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.activityName }}</van-cell>
|
<van-cell title="活动名称" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.activityName }}</van-cell>
|
||||||
<van-cell title="活动类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{ viewData.activityType }}</van-cell>
|
<van-cell title="活动类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{ viewData.activityType }}</van-cell>
|
||||||
<van-cell title="活动人数" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{ viewData.activityNumber }}</van-cell>
|
<van-cell title="活动人数" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{ viewData.activityNumber }}</van-cell>
|
||||||
<van-cell title="活动地点" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.activityPlace }}</van-cell>
|
<van-cell title="活动地点" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.activityPlace }}</van-cell>
|
||||||
<van-cell title="报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.money }}</van-cell>
|
<van-cell title="报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.money }}</van-cell>
|
||||||
<van-cell title="活动时间" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.activityTime }}</van-cell>
|
<van-cell title="活动时间" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ formatDate(viewData.activityTime) }}</van-cell>
|
||||||
<van-cell title="发票张数" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{ viewData.invoiceNumber }}</van-cell>
|
<van-cell title="发票张数" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{ viewData.invoiceNumber }}</van-cell>
|
||||||
<van-cell title="发票号码" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{ viewData.invoice }}</van-cell>
|
<van-cell title="发票号码" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{ viewData.invoice }}</van-cell>
|
||||||
<van-cell title="支付内容">{{ viewData.paymentNotes }}</van-cell>
|
<van-cell title="支付内容">{{ viewData.paymentNotes }}</van-cell>
|
||||||
@@ -111,6 +111,31 @@ const UNION_REIMBURSE_INFO = {
|
|||||||
this.getInfo()
|
this.getInfo()
|
||||||
this.getDoneTasks()
|
this.getDoneTasks()
|
||||||
},
|
},
|
||||||
|
// 添加日期格式化方法
|
||||||
|
formatDate(date) {
|
||||||
|
if (!date) return '';
|
||||||
|
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||||
|
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||||
|
// 如果包含时间,只取日期部分
|
||||||
|
if (date.length > 10) {
|
||||||
|
return date.substring(0, 10);
|
||||||
|
}
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
// 否则转换为 yyyy-MM-dd 格式
|
||||||
|
try {
|
||||||
|
const d = new Date(date);
|
||||||
|
if (isNaN(d.getTime())) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
const year = d.getFullYear();
|
||||||
|
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(d.getDate()).padStart(2, '0');
|
||||||
|
return year + '-' + month + '-' + day;
|
||||||
|
} catch (e) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
},
|
||||||
// 关闭
|
// 关闭
|
||||||
onClose(){
|
onClose(){
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
|||||||
@@ -267,9 +267,9 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (!this.formData.retireFiles || this.formData.retireFiles.length === 0) {
|
if (!this.formData.retireFiles || this.formData.retireFiles.length === 0) {
|
||||||
errors.push('请上传退休证');
|
errors.push('请上传退休证');
|
||||||
}
|
}
|
||||||
if (!this.formData.sign) {
|
// if (!this.formData.sign) {
|
||||||
errors.push('请签字');
|
// errors.push('请签字');
|
||||||
}
|
// }
|
||||||
if (!this.formData.declarationAgreed) {
|
if (!this.formData.declarationAgreed) {
|
||||||
errors.push('请阅读并同意声明');
|
errors.push('请阅读并同意声明');
|
||||||
}
|
}
|
||||||
@@ -407,7 +407,22 @@ layout("/layouts/platform_h5.html"){
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
await this.init();
|
await this.init();
|
||||||
|
|
||||||
|
// 页面初始化完成后立即检查退休状态和申请状态
|
||||||
|
const isRetired = await this.checkRetirementStatus();
|
||||||
|
if (!isRetired) {
|
||||||
|
this.$toast.fail('您不是退休人员,无法申请此项福利');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.bizId) { // 如果不是编辑已有记录,则检查是否已申请
|
||||||
|
const isApplied = await this.checkUserApplication();
|
||||||
|
if (isApplied) {
|
||||||
|
this.$toast.fail('您已经提交过申请,不能重复申请');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -416,6 +416,14 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (!this.formData.childrenBirthday) {
|
if (!this.formData.childrenBirthday) {
|
||||||
errors.push('请选择子女出生日期');
|
errors.push('请选择子女出生日期');
|
||||||
}
|
}
|
||||||
|
// 添加时间顺序验证
|
||||||
|
if (this.formData.startTime && this.formData.endTime) {
|
||||||
|
const startDate = new Date(this.formData.startTime);
|
||||||
|
const endDate = new Date(this.formData.endTime);
|
||||||
|
if (endDate < startDate) {
|
||||||
|
errors.push('休假结束时间不能早于开始时间');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return errors;
|
return errors;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</dict-tag></van-cell>
|
</dict-tag></van-cell>
|
||||||
<van-cell title="入学年份">{{ viewData.childrenYear }}</van-cell>
|
<van-cell title="入学年份">{{ viewData.childrenYear }}</van-cell>
|
||||||
<van-cell title="身份证号">{{ viewData.childrenIdCard }}</van-cell>
|
<van-cell title="身份证号">{{ viewData.childrenIdCard }}</van-cell>
|
||||||
<van-cell title="出生日期">{{ viewData.childrenBirthday }}</van-cell>
|
<van-cell title="出生日期">{{ formatDate(viewData.childrenBirthday) }}</van-cell>
|
||||||
<van-cell title="性别">{{ viewData.childrenSex }}</van-cell>
|
<van-cell title="性别">{{ viewData.childrenSex }}</van-cell>
|
||||||
<van-cell title="国籍">{{ viewData.childrenCountry }}</van-cell>
|
<van-cell title="国籍">{{ viewData.childrenCountry }}</van-cell>
|
||||||
<van-cell title="就读学校">{{ viewData.childrenCurrentSchool }}</van-cell>
|
<van-cell title="就读学校">{{ viewData.childrenCurrentSchool }}</van-cell>
|
||||||
@@ -50,6 +50,31 @@
|
|||||||
this.visible = true
|
this.visible = true
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
},
|
},
|
||||||
|
// 添加日期格式化方法
|
||||||
|
formatDate(date) {
|
||||||
|
if (!date) return '';
|
||||||
|
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||||
|
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||||
|
// 如果包含时间,只取日期部分
|
||||||
|
if (date.length > 10) {
|
||||||
|
return date.substring(0, 10);
|
||||||
|
}
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
// 否则转换为 yyyy-MM-dd 格式
|
||||||
|
try {
|
||||||
|
const d = new Date(date);
|
||||||
|
if (isNaN(d.getTime())) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
const year = d.getFullYear();
|
||||||
|
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(d.getDate()).padStart(2, '0');
|
||||||
|
return year + '-' + month + '-' + day;
|
||||||
|
} catch (e) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
},
|
||||||
// 关闭
|
// 关闭
|
||||||
onClose(){
|
onClose(){
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
|||||||
@@ -46,8 +46,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
show-toolbar
|
show-toolbar
|
||||||
></van-picker>
|
></van-picker>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
<van-field label="身份证号" v-model="formData.childrenIdCard" placeholder="请输入身份证号"></van-field>
|
|
||||||
<van-field
|
<van-field
|
||||||
|
label="身份证号"
|
||||||
|
v-model="formData.childrenIdCard"
|
||||||
|
placeholder="请输入身份证号"
|
||||||
|
:rules="formRules.childrenIdCard"
|
||||||
|
required
|
||||||
|
></van-field> <van-field
|
||||||
label="出生年月"
|
label="出生年月"
|
||||||
v-model="formData.childrenBirthday"
|
v-model="formData.childrenBirthday"
|
||||||
placeholder="请选择出生年月"
|
placeholder="请选择出生年月"
|
||||||
@@ -96,16 +101,25 @@ layout("/layouts/platform_h5.html"){
|
|||||||
|
|
||||||
<van-field label="监护人1" v-model="formData.guardianUserName1" readonly placeholder="读取信息中心数据"></van-field>
|
<van-field label="监护人1" v-model="formData.guardianUserName1" readonly placeholder="读取信息中心数据"></van-field>
|
||||||
<van-field label="工号" v-model="formData.guardianLoginName1" readonly placeholder="读取信息中心数据"></van-field>
|
<van-field label="工号" v-model="formData.guardianLoginName1" readonly placeholder="读取信息中心数据"></van-field>
|
||||||
<van-field label="手机号码" v-model="formData.guardianMobile1" readonly placeholder="读取信息中心数据"></van-field>
|
<van-field
|
||||||
|
label="手机号码"
|
||||||
|
v-model="formData.guardianMobile1"
|
||||||
|
readonly
|
||||||
|
placeholder="读取信息中心数据"
|
||||||
|
:rules="formRules.guardianMobile1"
|
||||||
|
></van-field>
|
||||||
<van-field label="所在单位" v-model="formData.guardianUnitName1" readonly placeholder="读取信息中心数据"></van-field>
|
<van-field label="所在单位" v-model="formData.guardianUnitName1" readonly placeholder="读取信息中心数据"></van-field>
|
||||||
|
|
||||||
<van-field
|
<van-field
|
||||||
label="监护人2"
|
label="监护人2"
|
||||||
v-model="formData.guardianUserName2"
|
v-model="formData.guardianUserName2"
|
||||||
placeholder="请输入监护人姓名"
|
placeholder="请输入监护人姓名"
|
||||||
></van-field>
|
></van-field>
|
||||||
<van-field label="工号" v-model="formData.guardianLoginName2" placeholder="没有则不填" ></van-field>
|
<van-field label="工号" v-model="formData.guardianLoginName2" placeholder="没有则不填" ></van-field>
|
||||||
<van-field label="手机号码" v-model="formData.guardianMobile2" placeholder="请输入手机号码"></van-field>
|
<van-field
|
||||||
|
label="手机号码"
|
||||||
|
v-model="formData.guardianMobile2"
|
||||||
|
placeholder="请输入手机号码"
|
||||||
|
></van-field>
|
||||||
<van-field label="所在单位" v-model="formData.guardianUnitName2" placeholder="请输入所在单位"></van-field>
|
<van-field label="所在单位" v-model="formData.guardianUnitName2" placeholder="请输入所在单位"></van-field>
|
||||||
<van-field
|
<van-field
|
||||||
label="备注"
|
label="备注"
|
||||||
@@ -190,11 +204,21 @@ layout("/layouts/platform_h5.html"){
|
|||||||
currentDate: new Date(), // 添加这一行
|
currentDate: new Date(), // 添加这一行
|
||||||
minDate: new Date(1900, 0, 1),
|
minDate: new Date(1900, 0, 1),
|
||||||
maxDate: new Date(),
|
maxDate: new Date(),
|
||||||
|
formRules: {
|
||||||
|
childrenIdCard: [
|
||||||
|
{ pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码' }
|
||||||
|
],
|
||||||
|
guardianMobile1: [
|
||||||
|
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' }
|
||||||
|
],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onSave() {
|
onSave() {
|
||||||
|
// 先进行表单验证
|
||||||
|
this.$refs.formRef.validate().then(() => {
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
message: "您确定保存吗?"
|
message: "您确定保存吗?"
|
||||||
@@ -212,6 +236,9 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
// 验证失败,Vant 会自动显示错误信息
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onChildrenGradeConfirm(o) {
|
onChildrenGradeConfirm(o) {
|
||||||
// 显示名称给用户看
|
// 显示名称给用户看
|
||||||
|
|||||||
Reference in New Issue
Block a user