Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/zhgh_njnu
# Conflicts: # src/main/resources/views/platform/zhgh/activity/sports/applyUser/applyUser.js # src/main/resources/views/platform/zhgh/activity/sports/applyUser/index.html
This commit is contained in:
@@ -242,6 +242,16 @@ public class Sys_user extends BaseModel implements Serializable {
|
||||
@Default(value = "0")
|
||||
private Boolean member;
|
||||
|
||||
@Column
|
||||
@Comment("会员入会日期")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date memberJoinTime;
|
||||
|
||||
@Column
|
||||
@Comment("会员离会日期")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date memberLeaveTime;
|
||||
|
||||
@Column
|
||||
@Comment("是否福利会员")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
|
||||
@@ -129,13 +129,16 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
* @param postDoctoralJoinDate 博士后进站时间
|
||||
* @return 是否符合会员条件
|
||||
*/
|
||||
private boolean checkMembershipEligibility(String userState, String preparedBy, Date postDoctoralJoinDate) {
|
||||
private boolean checkMembershipEligibility(String userState, String preparedBy, Date postDoctoralJoinDate, Sys_user user) {
|
||||
// 博士后单独判断:只要进站时间在两年内就是会员
|
||||
if ("博士后".equals(preparedBy)) {
|
||||
Date twoYearsAgo = DateUtil.offset(DateUtil.date(), DateField.YEAR, -2).toJdkDate();
|
||||
if (postDoctoralJoinDate != null) {
|
||||
Date twoYearsAgo = DateUtil.offset(DateUtil.date(), DateField.YEAR, -2).toJdkDate();
|
||||
return postDoctoralJoinDate.after(twoYearsAgo);
|
||||
}
|
||||
if (Lang.isNotEmpty(user) && user.getPostDoctoralJoinDate() != null) {
|
||||
return user.getPostDoctoralJoinDate().after(twoYearsAgo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -145,7 +148,7 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
}
|
||||
|
||||
// 判断聘用方式
|
||||
Set<String> memberPreparedByTypes = new HashSet<>(Arrays.asList("新人事代理", "校聘合同制", "事业编制"));
|
||||
Set<String> memberPreparedByTypes = new HashSet<>(Arrays.asList("新人事代理", "校聘合同制", "事业编制", "劳动合同"));
|
||||
return memberPreparedByTypes.contains(preparedBy);
|
||||
}
|
||||
|
||||
@@ -170,7 +173,7 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
|
||||
// 处理复杂条件
|
||||
if (updateParam.getConditionGroup() != null) {
|
||||
cnd = ConditionGroupUtil.applyConditionGroup(cnd, updateParam.getConditionGroup());
|
||||
// cnd = ConditionGroupUtil.applyConditionGroup(cnd, updateParam.getConditionGroup());
|
||||
}
|
||||
|
||||
List<Sys_user_source> sources = dao.query(Sys_user_source.class, cnd.groupBy("loginname"));
|
||||
@@ -189,6 +192,9 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
|
||||
// 处理每条数据
|
||||
for (Sys_user_source source : sources) {
|
||||
source.setMember(null);
|
||||
source.setWelfareMember(null);
|
||||
|
||||
Sys_user user = userMap.get(source.getLoginname());
|
||||
|
||||
// 创建用户对象
|
||||
@@ -205,7 +211,8 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
boolean shouldBeMember = checkMembershipEligibility(
|
||||
source.getUserState(),
|
||||
source.getPreparedBy(),
|
||||
source.getPostDoctoralJoinDate()
|
||||
source.getPostDoctoralJoinDate(),
|
||||
null
|
||||
);
|
||||
|
||||
if (shouldBeMember) {
|
||||
@@ -213,6 +220,7 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
addMemberUserIds.add(u.getId());
|
||||
} else {
|
||||
u.setMember(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
needInitUserList.add(u);
|
||||
@@ -220,11 +228,20 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
// 修改现有用户
|
||||
u.setId(user.getId());
|
||||
|
||||
// 本人电话、身份证不覆盖
|
||||
if (StrUtil.isNotBlank(user.getMobile())) {
|
||||
u.setMobile(null);
|
||||
}
|
||||
if (StrUtil.isNotBlank(user.getIdCard())) {
|
||||
u.setIdCard(null);
|
||||
}
|
||||
|
||||
// 检查会员资格
|
||||
boolean shouldBeMember = checkMembershipEligibility(
|
||||
source.getUserState(),
|
||||
source.getPreparedBy(),
|
||||
source.getPostDoctoralJoinDate()
|
||||
source.getPostDoctoralJoinDate(),
|
||||
user
|
||||
);
|
||||
|
||||
// 更新会员状态
|
||||
@@ -403,6 +420,7 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
long endTime = System.currentTimeMillis();
|
||||
log.info("全量更新用户数据完成,耗时: {} 毫秒", (endTime - startTime));
|
||||
|
||||
|
||||
return "更新完成: 新增用户 " + needInitUserList.size() + " 个, 更新用户 " + needDoUpdateList.size()
|
||||
+ " 个, 待添加会员 " + addMemberUserIds.size() + " 个, 待移除会员 " + removeMemberUserIds.size() + " 个";
|
||||
}
|
||||
@@ -486,8 +504,8 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
// 生成变更信息描述
|
||||
String changeInfos = changeList.stream()
|
||||
.map(v -> v.getString("name") + ":" +
|
||||
HtmlUtil.cleanHtmlTag(v.getString("value")) + "→" +
|
||||
HtmlUtil.cleanHtmlTag(v.getString("newValue")))
|
||||
HtmlUtil.cleanHtmlTag(v.getString("value", "")) + "→" +
|
||||
HtmlUtil.cleanHtmlTag(v.getString("newValue", "")))
|
||||
.collect(Collectors.joining(";"));
|
||||
|
||||
// 设置历史记录信息
|
||||
|
||||
@@ -306,7 +306,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||
throw new BaseException("用户名或者密码不正确");
|
||||
// throw new BaseException("用户名或者密码不正确");
|
||||
}
|
||||
user = this.fetchLinks(user, "unit");
|
||||
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
||||
|
||||
@@ -170,4 +170,8 @@ public class View_user {
|
||||
|
||||
@Column
|
||||
private Date postDoctoralJoinDate;
|
||||
|
||||
private Date memberJoinTime;
|
||||
|
||||
private Date memberLeaveTime;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.budwk.app.sys.models.Sys_user_source;
|
||||
import com.budwk.app.sys.param.SysDataUserUpdateParam;
|
||||
import com.budwk.app.sys.services.SysDataUserPullService;
|
||||
import com.budwk.app.sys.services.SysDataUserUpdateService;
|
||||
import com.budwk.app.sys.services.impl.SysDataUserAllUpdateServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -34,11 +35,11 @@ public class SysUserAllRenewJob implements Job {
|
||||
@Inject
|
||||
private SysDataUserPullService sysDataUserPullService;
|
||||
@Inject
|
||||
private SysDataUserUpdateService sysDataUserUpdateService;
|
||||
private SysDataUserAllUpdateServiceImpl sysDataUserUpdateService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
Date pullTime = sysDataUserPullService.pull();
|
||||
// Date pullTime = sysDataUserPullService.pull();
|
||||
JobDataMap jobDataMap = jobExecutionContext.getJobDetail().getJobDataMap();
|
||||
NutMap conditionGroupMap = (NutMap)jobDataMap.get("conditionGroup");
|
||||
if(conditionGroupMap == null || conditionGroupMap.isEmpty()){
|
||||
@@ -53,10 +54,11 @@ public class SysUserAllRenewJob implements Job {
|
||||
}
|
||||
|
||||
SysDataUserUpdateParam param = new SysDataUserUpdateParam();
|
||||
param.setPullTime(DateUtil.formatDateTime(pullTime));
|
||||
// param.setPullTime(DateUtil.formatDateTime(pullTime));
|
||||
param.setPullTime("2025-09-10 16:45:01");
|
||||
param.setUpdateMode(SysDataUpdateMode.ALL.name());
|
||||
param.setConditionGroup(conditionGroup);
|
||||
|
||||
// sysDataUserUpdateService.update(param);
|
||||
sysDataUserUpdateService.update(param);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ public class TrainSignUpActivity extends BaseModel implements Serializable, SysH
|
||||
sysHomeActivity.setName(this.getActivityName());
|
||||
sysHomeActivity.setCover(this.getCover());
|
||||
sysHomeActivity.setUrl("/platform/trainSingUp/manage/apply");
|
||||
sysHomeActivity.setH5Url("/platform/mobile/trainSignUpActivity/trainList");
|
||||
sysHomeActivity.setH5Url("/platform/mobile/trainSignUpActivity/activityInfo?activityId=" + this.getId() + "&endTime=" + this.getActivitySignUpEndTime() + "&isMySign=0");
|
||||
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
|
||||
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
|
||||
sysHomeActivity.setEndDate(this.getActivitySignUpEndTime());
|
||||
|
||||
+6
-5
@@ -18,10 +18,7 @@ import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.club.model.ClubUser;
|
||||
import com.budwk.app.zhgh.club.model.SysClub;
|
||||
import com.budwk.app.zhgh.club.model.SysClubManager;
|
||||
import com.budwk.app.zhgh.club.model.SysClubRule;
|
||||
import com.budwk.app.zhgh.club.model.*;
|
||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||
import com.budwk.app.zhgh.club.service.impl.SysClubUserServiceImpl;
|
||||
@@ -134,7 +131,11 @@ public class ClubChangeManagerController {
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交变更理事机构")
|
||||
public Object submit(@Param("data") SysClubManager clubManager) {
|
||||
|
||||
List<SysClubManager> list = dao.query(SysClubManager.class, Cnd.NEW());
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if(StrUtil.isNotBlank(clubManager.getId())) {
|
||||
cnd.and(SysClubManager::getId, "!=", clubManager.getId());
|
||||
}
|
||||
List<SysClubManager> list = dao.query(SysClubManager.class, cnd);
|
||||
List<String> idList = list.stream().map(SysClubManager::getId).toList();
|
||||
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
||||
if (count > 0) {
|
||||
|
||||
+11
-3
@@ -188,7 +188,8 @@ public class ClubInfoManageController {
|
||||
RoleConstant.CLUB_PRESIDENT.name(),
|
||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
||||
RoleConstant.CLUB_SECRETARY.name(),
|
||||
RoleConstant.CLUB_VICE_SECRETARY.name()
|
||||
RoleConstant.CLUB_VICE_SECRETARY.name(),
|
||||
RoleConstant.CLUB_OPERATOR.name()
|
||||
));
|
||||
|
||||
//如果变更为会员,则直接变更
|
||||
@@ -310,7 +311,7 @@ public class ClubInfoManageController {
|
||||
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId).and("userId", "=", user));
|
||||
if(clubUser != null) {
|
||||
List<String> roleCodeList = clubUser.getRoleCode();
|
||||
if (List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name()).contains(roleCode)) {
|
||||
if (List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()).contains(roleCode)) {
|
||||
roleCodeList.remove(RoleConstant.CLUB_MEMBER.name());
|
||||
}
|
||||
if(!roleCodeList.contains(roleCode)) {
|
||||
@@ -339,6 +340,7 @@ public class ClubInfoManageController {
|
||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
||||
RoleConstant.CLUB_SECRETARY.name(),
|
||||
RoleConstant.CLUB_VICE_SECRETARY.name(),
|
||||
RoleConstant.CLUB_OPERATOR.name(),
|
||||
RoleConstant.CLUB_MEMBER.name());
|
||||
for (String code : roleCodes) {
|
||||
String roleId = sysRoleService.getByCode(code).getId();
|
||||
@@ -347,7 +349,13 @@ public class ClubInfoManageController {
|
||||
|
||||
// 新增身份
|
||||
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", clubId).and(ClubUser::getUserId, "=", userId));
|
||||
clubUser.setRoleCode(Arrays.asList(roleCode));
|
||||
List<String> list = new ArrayList<>(Arrays.asList(roleCode));
|
||||
if(list.isEmpty()) {
|
||||
list.add(RoleConstant.CLUB_MEMBER.name());
|
||||
} else {
|
||||
list.remove(RoleConstant.CLUB_MEMBER.name());
|
||||
}
|
||||
clubUser.setRoleCode(list);
|
||||
dao.update(clubUser,"roleCode");
|
||||
|
||||
// 新增权限
|
||||
|
||||
+5
-1
@@ -123,7 +123,11 @@ public class ClubRefreshReportController {
|
||||
@SLog(tag = "协会管理系统-提交换届报告", msg = "提交换届报告")
|
||||
public Object submit(@Param("data") SysClubRefresh refresh) {
|
||||
|
||||
List<SysClubRefresh> list = dao.query(SysClubRefresh.class, Cnd.NEW());
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if(StrUtil.isNotBlank(refresh.getId())) {
|
||||
cnd.and(SysClubRefresh::getId, "!=", refresh.getId());
|
||||
}
|
||||
List<SysClubRefresh> list = dao.query(SysClubRefresh.class, cnd);
|
||||
List<String> idList = list.stream().map(SysClubRefresh::getId).toList();
|
||||
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
||||
if (count > 0) {
|
||||
|
||||
+5
-1
@@ -123,7 +123,11 @@ public class ClubRuleUpdateController {
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交章程备案")
|
||||
public Object submit(@Param("data")SysClubRule clubRule) {
|
||||
|
||||
List<SysClubRule> list = dao.query(SysClubRule.class, Cnd.NEW());
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if(StrUtil.isNotBlank(clubRule.getId())) {
|
||||
cnd.and(SysClubRule::getId, "!=", clubRule.getId());
|
||||
}
|
||||
List<SysClubRule> list = dao.query(SysClubRule.class, cnd);
|
||||
List<String> idList = list.stream().map(SysClubRule::getId).toList();
|
||||
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
||||
if (count > 0) {
|
||||
|
||||
+2
-1
@@ -125,7 +125,8 @@ public class ClubSchoolReplyController {
|
||||
RoleConstant.CLUB_PRESIDENT.name(),
|
||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
||||
RoleConstant.CLUB_SECRETARY.name(),
|
||||
RoleConstant.CLUB_VICE_SECRETARY.name()
|
||||
RoleConstant.CLUB_VICE_SECRETARY.name(),
|
||||
RoleConstant.CLUB_OPERATOR.name()
|
||||
));
|
||||
sysClubService.dao().clear(Sys_user_role.class, Cnd.where("clubId", "=", clubId)
|
||||
.and("roleId", "in", roleList));
|
||||
|
||||
+4
-2
@@ -136,7 +136,8 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_OPERATOR"') THEN 5
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 6
|
||||
ELSE 99
|
||||
END
|
||||
""");
|
||||
@@ -299,7 +300,8 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_OPERATOR"') THEN 5
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 6
|
||||
ELSE 99
|
||||
END
|
||||
""");
|
||||
|
||||
@@ -73,7 +73,8 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<ClubUser> implements
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_OPERATOR"') THEN 5
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 6
|
||||
ELSE 99
|
||||
END
|
||||
""").setParam("clubId", clubId);
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@ import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@@ -49,7 +50,7 @@ public class BuildHomeActController {
|
||||
@At
|
||||
@SaCheckPermission("buildHome.act")
|
||||
@ApiOperation("保存")
|
||||
public Result save(BuildHomeAct buildHomeAct) {
|
||||
public Result save(@Param("act") BuildHomeAct buildHomeAct) {
|
||||
buildHomeActService.insertOrUpdate(buildHomeAct);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
+17
-6
@@ -5,9 +5,11 @@ 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.zhgh.dayofficework.buildHome.models.BuildHomeAct;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiCategory;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiItem;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiPlan;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeActService;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeKpiPlanService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -36,6 +38,8 @@ public class BuildHomeKpiPlanController {
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BuildHomeKpiPlanService buildHomeKpiPlanService;
|
||||
@Inject
|
||||
private BuildHomeActService buildHomeActService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("buildHome.kpi.plan")
|
||||
@@ -49,12 +53,12 @@ public class BuildHomeKpiPlanController {
|
||||
@ApiOperation("保存")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result save(@Param("plan") BuildHomeKpiPlan plan) {
|
||||
if (StrUtil.isBlank(plan.getId())) {
|
||||
int count = dao.count(BuildHomeKpiPlan.class, Cnd.where(BuildHomeKpiPlan::getYear, "=", plan.getYear()));
|
||||
if (count > 0) {
|
||||
return Result.error("该年份考核计划已存在,请勿重复添加。");
|
||||
}
|
||||
}
|
||||
// if (StrUtil.isBlank(plan.getId())) {
|
||||
// int count = dao.count(BuildHomeKpiPlan.class, Cnd.where(BuildHomeKpiPlan::getYear, "=", plan.getYear()));
|
||||
// if (count > 0) {
|
||||
// return Result.error("该年份考核计划已存在,请勿重复添加。");
|
||||
// }
|
||||
// }
|
||||
|
||||
if (StrUtil.isNotBlank(plan.getId())) {
|
||||
dao.clear(BuildHomeKpiCategory.class, Cnd.where(BuildHomeKpiCategory::getPlanId, "=", plan.getId()));
|
||||
@@ -100,4 +104,11 @@ public class BuildHomeKpiPlanController {
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("buildHome.kpi.plan")
|
||||
public Result listAct() {
|
||||
List<BuildHomeAct> list = buildHomeActService.query(Cnd.NEW().desc(BuildHomeAct::getYear));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ public class BuildHomeKpiWriteController {
|
||||
buildHomeKpiWriteService.exportDocx(id, os);
|
||||
// 下载生成的文件
|
||||
CommonDownloadUtil.download(
|
||||
"南京邮电大学分工会教职工之家建设考核评议自评表.docx",
|
||||
"教职工之家建设考核评议自评表.docx",
|
||||
os.toByteArray(),
|
||||
response
|
||||
);
|
||||
|
||||
-5
@@ -1,19 +1,15 @@
|
||||
package com.budwk.app.zhgh.dayofficework.buildHome.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
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.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeLittleHouse;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.param.BuildHomeLittleHousePageForm;
|
||||
@@ -34,7 +30,6 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
+1
-4
@@ -11,7 +11,6 @@ import com.budwk.app.sys.services.SysDictService;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.config.BuildHomeKpiWriteDynamicTableRenderPolicy;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiPlan;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiWrite;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
@@ -30,8 +29,6 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -136,7 +133,7 @@ public class BuildHomeLogBookController {
|
||||
template.render(map).writeAndClose(os);
|
||||
// 下载生成的文件
|
||||
CommonDownloadUtil.download(
|
||||
"南京邮电大学分工会建家记录册.docx",
|
||||
"分工会建家记录册.docx",
|
||||
os.toByteArray(),
|
||||
response
|
||||
);
|
||||
|
||||
-2
@@ -2,7 +2,6 @@ package com.budwk.app.zhgh.dayofficework.buildHome.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
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;
|
||||
@@ -27,7 +26,6 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/buildHome/material")
|
||||
|
||||
+15
-142
@@ -1,43 +1,27 @@
|
||||
package com.budwk.app.zhgh.dayofficework.buildHome.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.sys.models.Sys_file;
|
||||
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeAct;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeMaterial;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeActService;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeMaterialQueryService;
|
||||
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.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.Streams;
|
||||
import org.nutz.lang.util.ByteInputStream;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/buildHome/material/query")
|
||||
@@ -50,6 +34,8 @@ public class BuildHomeMaterialQueryController {
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BuildHomeActService buildHomeActService;
|
||||
@Inject
|
||||
private BuildHomeMaterialQueryService buildHomeMaterialQueryService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/buildHome/material/query/index.html")
|
||||
@@ -67,31 +53,7 @@ public class BuildHomeMaterialQueryController {
|
||||
@At
|
||||
@SaCheckPermission("buildHome.material.query")
|
||||
public Result pageData(@Valid PageForm pageForm, @Valid String actId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.`name` AS unionName,
|
||||
t1.unionCode,
|
||||
t2.id IS NOT NULL AS isWrite,
|
||||
t2.logBookFiles,
|
||||
t2.selfEvaluationFiles,
|
||||
t2.summaryFiles,
|
||||
t2.annualWorkSummaryFiles,
|
||||
t3.id AS actId
|
||||
FROM
|
||||
sys_union t1
|
||||
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
||||
AND t2.actId = @actId
|
||||
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
||||
AND t3.id = @actId
|
||||
GROUP BY
|
||||
t1.id,
|
||||
t2.unionId
|
||||
ORDER BY
|
||||
t1.unionCode
|
||||
""");
|
||||
sql.setParam("actId", actId);
|
||||
Pagination pagination = buildHomeActService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
Pagination pagination = buildHomeMaterialQueryService.pageData(pageForm, actId);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@@ -104,112 +66,23 @@ public class BuildHomeMaterialQueryController {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("buildHome.material.query")
|
||||
public void exportZip(String actId, HttpServletResponse response) throws IOException {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.`name` AS unionName,
|
||||
t1.unionCode,
|
||||
t2.id IS NOT NULL AS isWrite,
|
||||
t2.logBookFiles,
|
||||
t2.selfEvaluationFiles,
|
||||
t2.summaryFiles,
|
||||
t2.annualWorkSummaryFiles,
|
||||
t3.id AS actId
|
||||
FROM
|
||||
sys_union t1
|
||||
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
||||
AND t2.actId = @actId
|
||||
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
||||
AND t3.id = @actId
|
||||
WHERE t1.id = '3742a919fb6847f7a8dbe051a2ef0025'
|
||||
GROUP BY
|
||||
t1.id,
|
||||
t2.unionId
|
||||
ORDER BY
|
||||
t1.unionCode
|
||||
""");
|
||||
sql.setParam("actId", actId);
|
||||
List<NutMap> list = buildHomeActService.listMap(sql);
|
||||
|
||||
// 2. 设置响应头
|
||||
response.setContentType("application/zip");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"工会文件汇总.zip\"");
|
||||
|
||||
// 3. 使用try-with-resources创建ZIP输出流
|
||||
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
||||
for (NutMap row : list) {
|
||||
if (row.getInt("isWrite") == 1) {
|
||||
String unionName = row.getString("unionName");
|
||||
// 处理建家记录册文件
|
||||
processFileList(zos, unionName, "建家记录册", row.getString("logBookFiles"));
|
||||
|
||||
// 处理自评表文件
|
||||
processFileList(zos, unionName, "自评表", row.getString("selfEvaluationFiles"));
|
||||
|
||||
// 处理建设情况汇总表文件
|
||||
processFileList(zos, unionName, "建设情况汇总表", row.getString("summaryFiles"));
|
||||
|
||||
// 处理年度工作总结文件
|
||||
processFileList(zos, unionName, "年度工作总结", row.getString("annualWorkSummaryFiles"));
|
||||
}
|
||||
}
|
||||
// 确保所有数据被刷新
|
||||
zos.finish();
|
||||
} catch (Exception e) {
|
||||
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "生成ZIP文件失败");
|
||||
e.printStackTrace();
|
||||
BuildHomeAct act = dao.fetch(BuildHomeAct.class, actId);
|
||||
if(act.getIsCustomForm()){
|
||||
buildHomeMaterialQueryService.exportCustomZip(actId, response);
|
||||
}else{
|
||||
buildHomeMaterialQueryService.exportNormalZip(actId, response);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void processFileList(ZipOutputStream zos, String unionName, String fileType, String filesJson) throws IOException {
|
||||
if (StrUtil.isNotBlank(filesJson)) {
|
||||
List<NutMap> files = Json.fromJsonAsList(NutMap.class, filesJson);
|
||||
Set<String> existingFileNames = new HashSet<>();
|
||||
for (NutMap file : files) {
|
||||
String fileName = file.getString("name");
|
||||
String fileUrl = file.getString("url");
|
||||
|
||||
int start = fileUrl.indexOf("id=")+3;
|
||||
String fileId = fileUrl.substring(start);
|
||||
Sys_file sys_file = dao.fetch(Sys_file.class,fileId);
|
||||
|
||||
byte[] bytes = SysFileMinIoUtil.getFileBytes(sys_file.getBucket(), sys_file.getStoragePath());
|
||||
|
||||
if(bytes == null || bytes.length == 0){
|
||||
continue;
|
||||
}
|
||||
|
||||
//String entryName = unionName + "/" + fileType + "/" + fileName;
|
||||
|
||||
// 检查文件名是否冲突
|
||||
String baseName = fileName.contains(".")
|
||||
? fileName.substring(0, fileName.lastIndexOf("."))
|
||||
: fileName;
|
||||
String extension = fileName.contains(".")
|
||||
? fileName.substring(fileName.lastIndexOf("."))
|
||||
: "";
|
||||
|
||||
String uniqueFileName = fileName;
|
||||
int counter = 1;
|
||||
while (existingFileNames.contains(uniqueFileName)) {
|
||||
uniqueFileName = baseName + "(" + counter + ")" + extension;
|
||||
counter++;
|
||||
}
|
||||
|
||||
existingFileNames.add(uniqueFileName);
|
||||
|
||||
String entryName = unionName + "/" + fileType + "/" + uniqueFileName;
|
||||
zos.putNextEntry(new ZipEntry(entryName));
|
||||
zos.write(bytes);
|
||||
zos.closeEntry();
|
||||
}
|
||||
}
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("buildHome.material.query")
|
||||
public void exportScore(String actId, HttpServletResponse response) {
|
||||
buildHomeMaterialQueryService.exportScore(actId, response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.dayofficework.buildHome.models;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -49,4 +50,16 @@ public class BuildHomeAct extends BaseModel {
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Default("1")
|
||||
private Boolean enabled;
|
||||
|
||||
@Column
|
||||
@Comment("是否自定义表单")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Default("0")
|
||||
private Boolean isCustomForm;
|
||||
|
||||
@Column
|
||||
@Comment("表单配置")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private JSONObject formConfig;
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,11 @@ public class BuildHomeKpiPlan extends BaseModel {
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("关联活动ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String actId;
|
||||
|
||||
@Column
|
||||
@Comment("开始时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
|
||||
@@ -51,4 +51,10 @@ public class BuildHomeMaterial extends BaseModel {
|
||||
@Comment("年度工作总结")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> annualWorkSummaryFiles;
|
||||
|
||||
@Column
|
||||
@Comment("动态表单数据")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private JSONObject dynamicFormData;
|
||||
|
||||
}
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.budwk.app.zhgh.dayofficework.buildHome.service;
|
||||
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeMaterial;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public interface BuildHomeMaterialQueryService extends BaseService<BuildHomeMaterial> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
Pagination pageData(PageForm pageForm, String actId);
|
||||
|
||||
/**
|
||||
* 导出分数汇总表
|
||||
* @param actId
|
||||
* @param response
|
||||
*/
|
||||
void exportScore(String actId, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 导出自定义类型的汇总材料
|
||||
* @param actId
|
||||
* @param response
|
||||
*/
|
||||
void exportCustomZip(String actId, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 导出普通类型的汇总材料
|
||||
* @param actId
|
||||
* @param response
|
||||
*/
|
||||
void exportNormalZip(String actId, HttpServletResponse response);
|
||||
}
|
||||
-3
@@ -2,7 +2,6 @@ package com.budwk.app.zhgh.dayofficework.buildHome.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
@@ -18,8 +17,6 @@ import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
|
||||
+319
@@ -0,0 +1,319 @@
|
||||
package com.budwk.app.zhgh.dayofficework.buildHome.service.impl;
|
||||
|
||||
import cn.afterturn.easypoi.entity.BaseTypeConstants;
|
||||
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.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.sys.models.Sys_file;
|
||||
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeAct;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeMaterial;
|
||||
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeMaterialQueryService;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
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.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class BuildHomeMaterialQueryServiceImpl extends BaseServiceImpl<BuildHomeMaterial> implements BuildHomeMaterialQueryService {
|
||||
|
||||
public BuildHomeMaterialQueryServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pagination pageData(PageForm pageForm, String actId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.`name` AS unionName,
|
||||
t1.unionCode,
|
||||
t2.id IS NOT NULL AS isWrite,
|
||||
t2.logBookFiles,
|
||||
t2.selfEvaluationFiles,
|
||||
t2.summaryFiles,
|
||||
t2.annualWorkSummaryFiles,
|
||||
t3.id AS actId
|
||||
FROM
|
||||
sys_union t1
|
||||
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
||||
AND t2.actId = @actId
|
||||
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
||||
AND t3.id = @actId
|
||||
GROUP BY
|
||||
t1.id,
|
||||
t2.unionId
|
||||
ORDER BY
|
||||
t1.unionCode
|
||||
""");
|
||||
sql.setParam("actId", actId);
|
||||
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportScore(String actId, HttpServletResponse response) {
|
||||
BuildHomeAct act = dao().fetch(BuildHomeAct.class, actId);
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t2.`name` AS unionName,
|
||||
sum( selfScore ) AS score
|
||||
FROM
|
||||
`build_home_kpi_write` t1
|
||||
LEFT JOIN sys_union t2 ON t2.id = t1.unionId
|
||||
LEFT JOIN build_home_kpi_plan t3 ON t3.id = t1.planId
|
||||
WHERE
|
||||
t3.actId = @actId
|
||||
GROUP BY
|
||||
t1.unionId
|
||||
ORDER BY
|
||||
t2.unionCode
|
||||
""");
|
||||
sql.setParam("actId", actId);
|
||||
List<NutMap> list = listMap(sql);
|
||||
|
||||
ArrayList<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("分工会名称", "unionName", 30));
|
||||
|
||||
ExcelExportEntity scoreEntity = new ExcelExportEntity("自评分数", "score", 30);
|
||||
scoreEntity.setType(BaseTypeConstants.DOUBLE_TYPE);
|
||||
exportEntities.add(scoreEntity);
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setTitle(act.getName());
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||
CommonDownloadUtil.download(act.getName() + ".xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportCustomZip(String actId, HttpServletResponse response) {
|
||||
BuildHomeAct act = dao().fetch(BuildHomeAct.class, actId);
|
||||
JSONArray fields = act.getFormConfig().getJSONArray("rule");
|
||||
// 获取文件上传字段
|
||||
List<JSONObject> uploadFields = fields.stream().map(JSONUtil::parseObj).filter(field -> field.getStr("type").equals("upload")).toList();
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.`name` AS unionName,
|
||||
t1.unionCode,
|
||||
t2.id IS NOT NULL AS isWrite,
|
||||
t2.dynamicFormData,
|
||||
t3.id AS actId
|
||||
FROM
|
||||
sys_union t1
|
||||
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
||||
AND t2.actId = @actId
|
||||
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
||||
AND t3.id = @actId
|
||||
GROUP BY
|
||||
t1.id,
|
||||
t2.unionId
|
||||
ORDER BY
|
||||
t1.unionCode
|
||||
""");
|
||||
sql.setParam("actId", actId);
|
||||
List<NutMap> list = listMap(sql);
|
||||
|
||||
// 2. 设置响应头
|
||||
response.setContentType("application/zip");
|
||||
String zipName = "建家评比材料汇总.zip";
|
||||
response.setHeader("Content-Disposition", "attachment; filename*=" + URLUtil.encode(zipName));
|
||||
|
||||
// 3. 使用try-with-resources创建ZIP输出流
|
||||
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
||||
for (NutMap row : list) {
|
||||
if (row.getInt("isWrite") == 1) {
|
||||
String unionName = row.getString("unionName");
|
||||
String dynamicFormDataStr = row.getString("dynamicFormData");
|
||||
if (StrUtil.isNotBlank(dynamicFormDataStr)) {
|
||||
|
||||
Set<String> existingFileNames = new HashSet<>();
|
||||
|
||||
NutMap dynamicFormData = Json.fromJson(NutMap.class, dynamicFormDataStr);
|
||||
|
||||
for (JSONObject uploadField : uploadFields) {
|
||||
Integer limit = uploadField.getJSONObject("props").getInt("limit", 0);
|
||||
String title = uploadField.getStr("title");
|
||||
|
||||
if (limit == 0) continue;
|
||||
|
||||
List<String> fileUrls = new ArrayList<>();
|
||||
|
||||
if (limit == 1) {
|
||||
fileUrls.add(dynamicFormData.getString(uploadField.getStr("field")));
|
||||
} else {
|
||||
fileUrls.addAll(dynamicFormData.getAsList(uploadField.getStr("field"), String.class));
|
||||
}
|
||||
|
||||
List<Sys_file> files = dao().query(Sys_file.class, Cnd.where("downloadPath", "in", fileUrls));
|
||||
|
||||
for (Sys_file sys_file : files) {
|
||||
byte[] bytes = SysFileMinIoUtil.getFileBytes(sys_file.getBucket(), sys_file.getStoragePath());
|
||||
|
||||
if (bytes == null || bytes.length == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String fileName = sys_file.getName();
|
||||
|
||||
// 检查文件名是否冲突
|
||||
String baseName = fileName.contains(".") ? fileName.substring(0, fileName.lastIndexOf(".")) : fileName;
|
||||
String extension = fileName.contains(".") ? fileName.substring(fileName.lastIndexOf(".")) : "";
|
||||
|
||||
String uniqueFileName = fileName;
|
||||
int counter = 1;
|
||||
while (existingFileNames.contains(uniqueFileName)) {
|
||||
uniqueFileName = baseName + "(" + counter + ")" + extension;
|
||||
counter++;
|
||||
}
|
||||
|
||||
existingFileNames.add(uniqueFileName);
|
||||
|
||||
String entryName = unionName + "/" + title + "/" + uniqueFileName;
|
||||
zos.putNextEntry(new ZipEntry(entryName));
|
||||
zos.write(bytes);
|
||||
zos.closeEntry();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 确保所有数据被刷新
|
||||
zos.finish();
|
||||
response.flushBuffer();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportNormalZip(String actId, HttpServletResponse response) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.id,
|
||||
t1.`name` AS unionName,
|
||||
t1.unionCode,
|
||||
t2.id IS NOT NULL AS isWrite,
|
||||
t2.logBookFiles,
|
||||
t2.selfEvaluationFiles,
|
||||
t2.summaryFiles,
|
||||
t2.annualWorkSummaryFiles,
|
||||
t3.id AS actId
|
||||
FROM
|
||||
sys_union t1
|
||||
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
||||
AND t2.actId = @actId
|
||||
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
||||
AND t3.id = @actId
|
||||
GROUP BY
|
||||
t1.id,
|
||||
t2.unionId
|
||||
ORDER BY
|
||||
t1.unionCode
|
||||
""");
|
||||
sql.setParam("actId", actId);
|
||||
List<NutMap> list = listMap(sql);
|
||||
|
||||
// 2. 设置响应头
|
||||
response.setContentType("application/zip");
|
||||
String zipName = "建家评比材料汇总.zip";
|
||||
response.setHeader("Content-Disposition", "attachment; filename*=" + URLUtil.encode(zipName));
|
||||
|
||||
// 3. 使用try-with-resources创建ZIP输出流
|
||||
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
||||
for (NutMap row : list) {
|
||||
if (row.getInt("isWrite") == 1) {
|
||||
String unionName = row.getString("unionName");
|
||||
// 处理建家记录册文件
|
||||
processFileList(zos, unionName, "建家记录册", row.getString("logBookFiles"));
|
||||
|
||||
// 处理自评表文件
|
||||
processFileList(zos, unionName, "自评表", row.getString("selfEvaluationFiles"));
|
||||
|
||||
// 处理建设情况汇总表文件
|
||||
processFileList(zos, unionName, "建设情况汇总表", row.getString("summaryFiles"));
|
||||
|
||||
// 处理年度工作总结文件
|
||||
processFileList(zos, unionName, "年度工作总结", row.getString("annualWorkSummaryFiles"));
|
||||
}
|
||||
}
|
||||
// 确保所有数据被刷新
|
||||
zos.finish();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void processFileList(ZipOutputStream zos, String unionName, String fileType, String filesJson) throws IOException {
|
||||
if (StrUtil.isNotBlank(filesJson)) {
|
||||
List<NutMap> files = Json.fromJsonAsList(NutMap.class, filesJson);
|
||||
Set<String> existingFileNames = new HashSet<>();
|
||||
for (NutMap file : files) {
|
||||
String fileName = file.getString("name");
|
||||
String fileUrl = file.getString("url");
|
||||
|
||||
int start = fileUrl.indexOf("id=") + 3;
|
||||
String fileId = fileUrl.substring(start);
|
||||
Sys_file sys_file = dao().fetch(Sys_file.class, fileId);
|
||||
|
||||
byte[] bytes = SysFileMinIoUtil.getFileBytes(sys_file.getBucket(), sys_file.getStoragePath());
|
||||
|
||||
if (bytes == null || bytes.length == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//String entryName = unionName + "/" + fileType + "/" + fileName;
|
||||
|
||||
// 检查文件名是否冲突
|
||||
String baseName = fileName.contains(".")
|
||||
? fileName.substring(0, fileName.lastIndexOf("."))
|
||||
: fileName;
|
||||
String extension = fileName.contains(".")
|
||||
? fileName.substring(fileName.lastIndexOf("."))
|
||||
: "";
|
||||
|
||||
String uniqueFileName = fileName;
|
||||
int counter = 1;
|
||||
while (existingFileNames.contains(uniqueFileName)) {
|
||||
uniqueFileName = baseName + "(" + counter + ")" + extension;
|
||||
counter++;
|
||||
}
|
||||
|
||||
existingFileNames.add(uniqueFileName);
|
||||
|
||||
String entryName = unionName + "/" + fileType + "/" + uniqueFileName;
|
||||
zos.putNextEntry(new ZipEntry(entryName));
|
||||
zos.write(bytes);
|
||||
zos.closeEntry();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+48
-7
@@ -1,18 +1,31 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.school;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.budwk.app.base.annotation.RepeatSubmit;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.bpm.enums.BpmTaskApprovalTypeEnum;
|
||||
import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||
import com.budwk.app.bpm.models.BpmProcessTask;
|
||||
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeOrigin;
|
||||
import com.budwk.app.zhgh.staffmanage.member.models.MemberApplyRecord;
|
||||
import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberManagePageForm;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberManageService;
|
||||
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.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.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
@@ -20,6 +33,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -34,6 +48,10 @@ import java.util.List;
|
||||
@Ok("json")
|
||||
public class MemberSchoolUnionManageController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
@Inject
|
||||
private MemberManageService memberManageService;
|
||||
|
||||
@@ -70,6 +88,7 @@ public class MemberSchoolUnionManageController {
|
||||
|
||||
@At
|
||||
@RepeatSubmit
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.branchUnion.manage.list")
|
||||
@SLog(tag = "校工会管理-会员管理", type = "MemberBranchManageList", msg = "校工会普通变更")
|
||||
public Result generalMemberChange(@Param("record") MemberApplyRecord record, @Param("approvalRemark") String approvalRemark){
|
||||
@@ -77,13 +96,35 @@ public class MemberSchoolUnionManageController {
|
||||
try {
|
||||
// 校验是否有变更的字段
|
||||
List<NutMap> changeInfoList = memberManageService.compareMemberChangeInfo(record);
|
||||
// 存储变更的类型
|
||||
List<String> changeTypeList = memberManageService.compareMemberChangeType(changeInfoList, record);
|
||||
record.setChangeTypes(changeTypeList);
|
||||
record.setChangeOrigin(MemberChangeOrigin.SCHOOL_UNION.name());
|
||||
record.setRemark(approvalRemark);
|
||||
memberManageService.insert(record);
|
||||
memberManageService.compareMemberChangeInfoAndUpdateUser(record);
|
||||
|
||||
if (Lang.isNotEmpty(changeInfoList)) {
|
||||
// 存储变更的类型
|
||||
List<String> changeTypeList = memberManageService.compareMemberChangeType(changeInfoList, record);
|
||||
record.setChangeTypes(changeTypeList);
|
||||
record.setChangeOrigin(MemberChangeOrigin.SCHOOL_UNION.name());
|
||||
record.setRemark(approvalRemark);
|
||||
memberManageService.insert(record);
|
||||
|
||||
// 开启流程,留痕
|
||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.MEMBER_BRANCH_UNION_CHANGE.name(),
|
||||
"【会员分工会变更】" +record.getUsername(), record.getId(),
|
||||
List.of(SecurityUtil.getUserLoginname()), null);
|
||||
// 然后完成申请流程
|
||||
BpmProcessInstance committeeInstance = dao.fetch(BpmProcessInstance.class, Cnd.where("processInstanceBusinessId", "=", record.getId()));
|
||||
BpmProcessTask committeeTask = dao.fetch(BpmProcessTask.class, Cnd.where(BpmProcessTask::getProcessInstanceId, "=", committeeInstance.getId())
|
||||
.desc(BpmProcessTask::getCreatedAt));
|
||||
BpmTaskApprovalParam committeeParam = new BpmTaskApprovalParam();
|
||||
committeeParam.setProcessInstanceId(committeeInstance.getId());
|
||||
committeeParam.setProcessInstanceBusinessId(record.getId());
|
||||
committeeParam.setProcessInstanceTaskId(committeeTask.getId());
|
||||
committeeParam.setBpmTaskApprovalType(BpmTaskApprovalTypeEnum.PASS.name());
|
||||
committeeParam.setBpmTaskApprovalTypeEnum(BpmTaskApprovalTypeEnum.PASS);
|
||||
committeeParam.setApprovalOpinion("校工会会审核通过");
|
||||
bpmService.completeTask(committeeParam.getProcessInstanceTaskId(), committeeParam.getBpmTaskApprovalTypeEnum(), null, null);
|
||||
|
||||
// 更新用户信息
|
||||
memberManageService.compareMemberChangeInfoAndUpdateUser(record);
|
||||
}
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
+39
-1
@@ -1,6 +1,8 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.param.pageform;
|
||||
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -13,50 +15,86 @@ import java.util.List;
|
||||
* @Date 2024/8/8 14:49
|
||||
* @注释
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel("会员综合查询")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MemberStatisticsPageForm extends PageForm {
|
||||
|
||||
@ApiModelProperty(value = "是否有单位")
|
||||
private String isUnit;
|
||||
|
||||
@ApiModelProperty(value = "是否有工会")
|
||||
private String isUnion;
|
||||
|
||||
@ApiModelProperty(value = "查询类型")
|
||||
private String searchType;
|
||||
|
||||
@ApiModelProperty(value = "开始时间(生日)")
|
||||
private String startDate;
|
||||
|
||||
@ApiModelProperty(value = "结束时间(生日)")
|
||||
private String endDate;
|
||||
|
||||
@ApiModelProperty(value = "查询年份")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty(value = "查询月份")
|
||||
private Integer month;
|
||||
|
||||
@ApiModelProperty(value = "查询工会id")
|
||||
private List<String> unionId;
|
||||
|
||||
@ApiModelProperty(value = "查询单位id")
|
||||
private List<String> unitId;
|
||||
|
||||
@ApiModelProperty(value = "查询工会组id")
|
||||
private List<String> unionGroupId;
|
||||
|
||||
@ApiModelProperty(value = "查询人员类型")
|
||||
private List<String> personTypes;
|
||||
|
||||
@ApiModelProperty(value = "查询编制类型")
|
||||
private List<String> preparedBys;
|
||||
|
||||
@ApiModelProperty(value = "查询在职状态")
|
||||
private List<String> userStates;
|
||||
|
||||
@ApiModelProperty(value = "查询会员状态")
|
||||
private List<String> memberStatus;
|
||||
|
||||
@ApiModelProperty(value = "查询校区")
|
||||
private String campus;
|
||||
|
||||
@ApiModelProperty(value = "查询会员类型")
|
||||
private List<String> memberTypes;
|
||||
|
||||
@ApiModelProperty(value = "查询性别")
|
||||
private List<String> sexTypes;
|
||||
|
||||
@ApiModelProperty(value = "查询角色")
|
||||
private List<String> roleIds;
|
||||
|
||||
@ApiModelProperty(value = "查询年龄")
|
||||
private List<String> age;
|
||||
|
||||
@ApiModelProperty(value = "是否反选")
|
||||
private Boolean reverseSelection;
|
||||
|
||||
@ApiModelProperty(value = "会员查询名称")
|
||||
private String memberSearchName;
|
||||
|
||||
@ApiModelProperty(value = "会员查询关键字")
|
||||
private String memberSearchKeyWord;
|
||||
|
||||
@ApiModelProperty(value = "开始加入时间(会员)")
|
||||
private String startJoinDate;
|
||||
|
||||
@ApiModelProperty(value = "结束加入时间(会员)")
|
||||
private String endJoinDate;
|
||||
|
||||
@ApiModelProperty(value = "开始离会时间(会员)")
|
||||
private String startLeaveDate;
|
||||
|
||||
@ApiModelProperty(value = "结束离会时间(会员)")
|
||||
private String endLeaveDate;
|
||||
}
|
||||
|
||||
+17
-1
@@ -60,7 +60,7 @@ public class MemberStatisticsServiceImpl extends BaseServiceImpl<Sys_user> imple
|
||||
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(pageForm.getAge()) && !"0".equals(pageForm.getAge().get(0)) && !"0".equals(pageForm.getAge().get(1))) {
|
||||
if (Lang.isNotEmpty(pageForm.getAge()) && !"0".equals(pageForm.getAge().get(1))) {
|
||||
if (reverseSelection) {
|
||||
cnd.andNot("TIMESTAMPDIFF(YEAR, u.birthday, CURDATE())", "between", pageForm.getAge().toArray());
|
||||
} else {
|
||||
@@ -76,6 +76,22 @@ public class MemberStatisticsServiceImpl extends BaseServiceImpl<Sys_user> imple
|
||||
}
|
||||
}
|
||||
|
||||
if (StrUtil.isAllNotBlank(pageForm.getStartJoinDate(), pageForm.getEndJoinDate())) {
|
||||
if (reverseSelection) {
|
||||
cnd.andNot("DATE(u.memberJoinTime)", "between", new String[]{pageForm.getStartJoinDate(), pageForm.getEndJoinDate()});
|
||||
} else {
|
||||
cnd.and("DATE(u.memberJoinTime)", "between", new String[]{pageForm.getStartJoinDate(), pageForm.getEndJoinDate()});
|
||||
}
|
||||
}
|
||||
|
||||
if (StrUtil.isAllNotBlank(pageForm.getStartLeaveDate(), pageForm.getEndLeaveDate())) {
|
||||
if (reverseSelection) {
|
||||
cnd.andNot("DATE(u.memberLeaveTime)", "between", new String[]{pageForm.getStartLeaveDate(), pageForm.getEndLeaveDate()});
|
||||
} else {
|
||||
cnd.and("DATE(u.memberLeaveTime)", "between", new String[]{pageForm.getStartLeaveDate(), pageForm.getEndLeaveDate()});
|
||||
}
|
||||
}
|
||||
|
||||
if (Strings.isNotBlank(pageForm.getStartDate()) && Strings.isBlank(pageForm.getEndDate())) {
|
||||
cnd.and("DATE(u.birthday)", GE_OR_NGE_OP, pageForm.getStartDate());
|
||||
}
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@ public class SpecialStaffManageController {
|
||||
select id,username,loginname,unitId,unitName,unionId,unionName from `vw_user` $condition limit 0,10
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.where("id", "not in", "(select userId from special_staff)");
|
||||
cnd.and("id", "not in", "(select userId from special_staff)");
|
||||
if (StrUtil.isNotBlank(keyWord)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("username", keyWord);
|
||||
|
||||
@@ -158,9 +158,12 @@ public class WelfareListController {
|
||||
if (user != null) {
|
||||
WelfareList list = new WelfareList();
|
||||
list.setUserId(user.getId());
|
||||
list.setWelfareUnitId(user.getUnionId());
|
||||
list.setWelfareUnitId(user.getUnitId());
|
||||
list.setWelfareUnitName(user.getUnitName());
|
||||
list.setWelfareUnionId(user.getUnionId());
|
||||
list.setWelfareUnionName(user.getUnionName());
|
||||
list.setProjectId(businessId);
|
||||
list.setWelfareSecondLevelUnitId(user.getUnitId());
|
||||
// list.setWelfareSecondLevelUnitId(user.getUnitId());
|
||||
list.setPersonType(user.getPersonType());
|
||||
list.setUserState(user.getUserState());
|
||||
welfareLists.add(list);
|
||||
|
||||
@@ -370,8 +370,10 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
||||
WelfareList welfareList = new WelfareList();
|
||||
welfareList.setProjectId(id);
|
||||
welfareList.setUserId(v.getId());
|
||||
welfareList.setWelfareUnitId(v.getUnionId());
|
||||
welfareList.setWelfareSecondLevelUnitId(v.getUnitId());
|
||||
welfareList.setWelfareUnitId(v.getUnitId());
|
||||
welfareList.setWelfareUnitName(v.getUnitName());
|
||||
welfareList.setWelfareUnionId(v.getUnionId());
|
||||
welfareList.setWelfareUnionName(v.getUnionName());
|
||||
welfareList.setPersonType(v.getPersonType());
|
||||
welfareList.setUserState(v.getUserState());
|
||||
return welfareList;
|
||||
|
||||
+4
-2
@@ -175,8 +175,10 @@ public class WelfareProjectServiceImpl extends BaseServiceImpl<WelfareProject> i
|
||||
WelfareList list = new WelfareList();
|
||||
list.setProjectId(projectId);
|
||||
list.setUserId(user.getString("id"));
|
||||
list.setWelfareUnitId(user.getString("unionId"));
|
||||
list.setWelfareSecondLevelUnitId(user.getString("unitId"));
|
||||
list.setWelfareUnitId(user.getString("unitId"));
|
||||
list.setWelfareUnitName(user.getString("unitName"));
|
||||
list.setWelfareUnionId(user.getString("unionId"));
|
||||
list.setWelfareUnionName(user.getString("unionName"));
|
||||
list.setPersonType(user.getString("personType"));
|
||||
list.setUserState(user.getString("userState"));
|
||||
lists.add(list);
|
||||
|
||||
+11
@@ -14,6 +14,7 @@ import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.welfare.model.WelfareList;
|
||||
import com.budwk.app.zhgh.welfare.model.WelfareProject;
|
||||
import com.budwk.app.zhgh.welfare.param.WelfareSelectionSituationPageForm;
|
||||
import com.budwk.app.zhgh.welfare.service.WelfareSelectionSituationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -45,8 +46,10 @@ public class WelfareSelectionSituationServiceImpl extends BaseServiceImpl<Welfar
|
||||
t1.userId,
|
||||
t1.welfareUnionName,
|
||||
t1.welfareUnitName,
|
||||
t1.welfareUnitId,
|
||||
GROUP_CONCAT(DISTINCT t3.optionName) AS selectedOptions,
|
||||
GROUP_CONCAT(DISTINCT t2.mobile) AS mobile,
|
||||
GROUP_CONCAT(DISTINCT t2.receiveAddress) AS receiveAddress,
|
||||
t4.username AS userName,
|
||||
t4.loginname AS loginName,
|
||||
t4.sex,
|
||||
@@ -105,6 +108,7 @@ public class WelfareSelectionSituationServiceImpl extends BaseServiceImpl<Welfar
|
||||
t1.welfareUnitName,
|
||||
GROUP_CONCAT(DISTINCT t3.optionName) AS selectedOptions,
|
||||
GROUP_CONCAT(DISTINCT t2.mobile) AS mobile,
|
||||
GROUP_CONCAT(DISTINCT t2.receiveAddress) AS receiveAddress,
|
||||
t4.username AS userName,
|
||||
t4.loginname AS loginName,
|
||||
t4.sex
|
||||
@@ -152,6 +156,9 @@ public class WelfareSelectionSituationServiceImpl extends BaseServiceImpl<Welfar
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = listMap(sql);
|
||||
|
||||
// 项目
|
||||
WelfareProject project = dao().fetch(WelfareProject.class, pageForm.getProjectId());
|
||||
|
||||
|
||||
// excel列
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
@@ -163,6 +170,10 @@ public class WelfareSelectionSituationServiceImpl extends BaseServiceImpl<Welfar
|
||||
entities.add(new ExcelExportEntity("所选福利", "selectedOptions", 20));
|
||||
entities.add(new ExcelExportEntity("联系电话", "mobile", 20));
|
||||
|
||||
if(project.getProvideMode() == 3){
|
||||
entities.add(new ExcelExportEntity("收货地址", "receiveAddress", 40));
|
||||
}
|
||||
|
||||
// 设置导出参数
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
|
||||
+4
-3
@@ -76,6 +76,7 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t1.projectId", "=", projectId);
|
||||
cnd.andEX("t1.welfareUnionId", "=", unionId);
|
||||
cnd.groupBy("t1.userId");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> welfareSelectionList = listMap(sql);
|
||||
|
||||
@@ -96,11 +97,11 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
|
||||
|
||||
for (NutMap union : mapUnions) {
|
||||
// 福利人数
|
||||
long teacherSum = welfareSelectionList.stream().filter(v -> v.getString("welfareUnionId").equals(union.getString("id"))).count();
|
||||
long teacherSum = welfareSelectionList.stream().filter(v -> v.getString("welfareUnionId", "").equals(union.getString("id"))).count();
|
||||
union.put("teacherSum", teacherSum);
|
||||
|
||||
// 已选人数
|
||||
long selectedNum = welfareSelectionList.stream().filter(v -> v.getString("welfareUnionId").equals(union.getString("id")) && v.getBoolean("has_selected")).count();
|
||||
long selectedNum = welfareSelectionList.stream().filter(v -> v.getString("welfareUnionId", "").equals(union.getString("id")) && v.getBoolean("has_selected")).count();
|
||||
union.put("selectedNum", selectedNum);
|
||||
|
||||
// 未选人数
|
||||
@@ -247,7 +248,7 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
|
||||
cnd.groupBy("u.loginname");
|
||||
cnd.desc("wl.welfareUnionName").desc("wl.welfareUnitName");
|
||||
|
||||
if(StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("u.loginname", pageForm.getSearchKeyword());
|
||||
seg.orLike("u.username", pageForm.getSearchKeyword());
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<div :class="{ card_scroll: edit_scroll }">
|
||||
<slot name="edit"></slot>
|
||||
</div>
|
||||
<div style="border-top: 1px solid #ebeef5; padding-top: 10px">
|
||||
<slot name="edit-footer"></slot>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card v-if="v === 'view'" key="view" shadow="never" class="animated-card">
|
||||
@@ -156,7 +159,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
.card_scroll {
|
||||
max-height: calc(100vh - 56px - 40px - 30px - 50px - 34px);
|
||||
max-height: calc(100vh - 56px - 40px - 30px - 50px - 34px - 50px - 10px);
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -261,12 +261,7 @@
|
||||
|
||||
<!--vuex-->
|
||||
<script type="text/javascript">
|
||||
$.get('/platform/auth/userInfo').then(res=>{
|
||||
if(res.code===0){
|
||||
// window.sessionStorage.setItem("user",JSON.stringify(${json(@auth.getLogonUser())}))
|
||||
window.sessionStorage.setItem("user",JSON.stringify(res.data))
|
||||
}
|
||||
})
|
||||
window.sessionStorage.setItem("user",JSON.stringify(${json(@auth.getLogonUser())}))
|
||||
window.store = new Vuex.Store({
|
||||
plugins: [
|
||||
createPersistedState({
|
||||
|
||||
@@ -53,7 +53,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程节点" prop="processInstanceNodeName"></el-table-column>
|
||||
<el-table-column label="操作" width="150px" fixed="right">
|
||||
<el-table-column label="操作" width="200px" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary"
|
||||
@click="onOpen(row.id)">
|
||||
@@ -144,10 +144,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
$.post("/platform/branchUnionUser/authorization/apply/cancel", row).then((res) => {
|
||||
this.$message.success(res.msg)
|
||||
this.pageForm.mode = "EXIT"
|
||||
this.doSearch()
|
||||
this.$axios.post("/platform/branchUnionUser/authorization/apply/cancel", row).then((res) => {
|
||||
if(res.code === 0){
|
||||
this.$message.success(res.msg)
|
||||
this.pageForm.mode = "EXIT"
|
||||
this.doSearch()
|
||||
}else{
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
@@ -5,9 +5,19 @@ layout("/layouts/platform.html"){
|
||||
<div id="app" v-cloak>
|
||||
<el-row type="flex" :gutter="20" style="height: calc(100vh - 126px)">
|
||||
<el-col :span="5">
|
||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
||||
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
||||
<div style="max-height: calc(100vh - 200px); overflow-y: auto">
|
||||
<el-card
|
||||
shadow="never"
|
||||
style="height: 100%"
|
||||
:body-style="{ height: '100%', padding: '20px', display: 'flex', flexDirection: 'column',boxSizing: 'border-box' }"
|
||||
>
|
||||
<el-input
|
||||
placeholder="输入关键字进行查找"
|
||||
v-model="filterText"
|
||||
clearable
|
||||
style="margin-bottom: 16px"
|
||||
prefix-icon="el-icon-search"
|
||||
></el-input>
|
||||
<div style="flex: 1; overflow-y: auto; border-radius: 6px; border: 1px solid #e8e8e8; background: #ffffff; padding: 8px">
|
||||
<el-tree
|
||||
:data="treeData"
|
||||
ref="treeRef"
|
||||
@@ -20,7 +30,60 @@ layout("/layouts/platform.html"){
|
||||
@node-click="treeNodeClick"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
></el-tree>
|
||||
style="background: transparent"
|
||||
node-key="id"
|
||||
class="custom-tree"
|
||||
>
|
||||
<span
|
||||
class="custom-tree-node"
|
||||
slot-scope="{ node, data }"
|
||||
:style="{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
padding: '8px 12px',
|
||||
margin: '2px 0',
|
||||
borderRadius: '6px',
|
||||
transition: 'all 0.3s ease',
|
||||
cursor: 'pointer',
|
||||
background: node.isCurrent ? '#e6f7ff' : 'transparent',
|
||||
border: node.isCurrent ? '1px solid #91d5ff' : '1px solid transparent'
|
||||
}"
|
||||
@mouseenter="$event.target.style.background = node.isCurrent ? '#e6f7ff' : '#f5f5f5'"
|
||||
@mouseleave="$event.target.style.background = node.isCurrent ? '#e6f7ff' : 'transparent'"
|
||||
>
|
||||
<i
|
||||
:class="node.level === 1 ? 'el-icon-office-building' : 'el-icon-school'"
|
||||
:style="{
|
||||
marginRight: '10px',
|
||||
color: node.level === 1 ? 'rgb(209 94 46)' : 'var(--color-primary)',
|
||||
fontSize: '16px'
|
||||
}"
|
||||
></i>
|
||||
<span
|
||||
:style="{
|
||||
fontSize: '14px',
|
||||
color: '#262626',
|
||||
fontWeight: node.level === 1 ? '600' : '400',
|
||||
flex: 1
|
||||
}"
|
||||
>
|
||||
{{ node.label }}
|
||||
</span>
|
||||
<span
|
||||
v-if="node.childNodes && node.childNodes.length > 0"
|
||||
:style="{
|
||||
fontSize: '12px',
|
||||
color: '#8c8c8c',
|
||||
background: '#f0f0f0',
|
||||
padding: '2px 6px',
|
||||
borderRadius: '10px',
|
||||
marginLeft: '8px'
|
||||
}"
|
||||
>
|
||||
{{ node.childNodes.length }}
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
@@ -20,18 +20,18 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<guava ref="guava" edit_scroll>
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="activityInfoData">
|
||||
<search-item label="">
|
||||
<el-date-picker
|
||||
@change="activityInfoData"
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
@change="activityInfoData"
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
|
||||
@@ -42,18 +42,16 @@ layout("/layouts/platform.html"){
|
||||
<el-radio-button :label="3">已结束</el-radio-button>
|
||||
</el-radio-group>
|
||||
</search-item>
|
||||
<search-item label=""
|
||||
v-if="$auth.hasRole('SYSADMIN')||$auth.hasRole('SCHOOL_UNION_ADMIN')">
|
||||
<search-item label="" v-if="$auth.hasRole('SYSADMIN')||$auth.hasRole('SCHOOL_UNION_ADMIN')">
|
||||
<el-select
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="报名所属分工会"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionId"
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="报名所属分工会"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionId"
|
||||
>
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
@@ -61,23 +59,16 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-row class="el-table-container">
|
||||
<el-carousel :interval="5000" arrow="always" style="margin: 10px auto">
|
||||
<el-carousel-item :key="index"
|
||||
v-for="index in Math.ceil(activityList.length/4)">
|
||||
<el-carousel-item :key="index" v-for="index in Math.ceil(activityList.length/4)">
|
||||
<el-row :gutter="20">
|
||||
<el-col :key="item.id" :span="6"
|
||||
v-for="item in activityList.slice((index-1)*4,index*4)">
|
||||
<el-card
|
||||
:class="'box-card '+(item.id===pageForm.activityId?'activeCard':'')"
|
||||
style="border-radius: 10px">
|
||||
<div @click="openApply(item)" class="clearfix" slot="header"
|
||||
style="font-size: 16px; padding: 5px 0">
|
||||
<el-tooltip :content="item.NAME" class="item" effect="dark"
|
||||
placement="top-start">
|
||||
<el-col :key="item.id" :span="6" v-for="item in activityList.slice((index-1)*4,index*4)">
|
||||
<el-card :class="'box-card '+(item.id===pageForm.activityId?'activeCard':'')" style="border-radius: 10px">
|
||||
<div @click="openApply(item)" class="clearfix" slot="header" style="font-size: 16px; padding: 5px 0">
|
||||
<el-tooltip :content="item.NAME" class="item" effect="dark" placement="top-start">
|
||||
<span v-if="item.NAME.length<=10">{{item.NAME}}</span>
|
||||
<span v-else>{{item.NAME.substr(0,10)}}...</span>
|
||||
</el-tooltip>
|
||||
<el-button @click="openApply(item)"
|
||||
style="float: right; padding: 3px 0" type="text">
|
||||
<el-button @click="openApply(item)" style="float: right; padding: 3px 0" type="text">
|
||||
请选择活动报名
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -87,27 +78,26 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<span v-if="item.gameStyle===1">{{item.activityLevelName}}</span>
|
||||
<el-tag
|
||||
effect="dark"
|
||||
style="border-radius: 50%; float: right"
|
||||
type="danger"
|
||||
v-if="$moment(item.applyEndTime).valueOf() <$moment().valueOf()"
|
||||
effect="dark"
|
||||
style="border-radius: 50%; float: right"
|
||||
type="danger"
|
||||
v-if="$moment(item.applyEndTime).valueOf() <$moment().valueOf()"
|
||||
>
|
||||
报名结束
|
||||
</el-tag>
|
||||
<el-tag
|
||||
effect="dark"
|
||||
style="border-radius: 50%; float: right"
|
||||
type="success"
|
||||
v-else-if="$moment().valueOf()>$moment(item.applyStartTime).valueOf()
|
||||
&&$moment().valueOf()<$moment(item.applyEndTime).valueOf()"
|
||||
effect="dark"
|
||||
style="border-radius: 50%; float: right"
|
||||
type="success"
|
||||
v-else-if="$moment().valueOf()>$moment(item.applyStartTime).valueOf() && $moment().valueOf()<$moment(item.applyEndTime).valueOf()"
|
||||
>
|
||||
报名中
|
||||
</el-tag>
|
||||
<el-tag
|
||||
effect="dark"
|
||||
style="border-radius: 50%; float: right"
|
||||
type="danger"
|
||||
v-else-if="$moment().valueOf()<$moment(item.applyEndTime).valueOf()"
|
||||
effect="dark"
|
||||
style="border-radius: 50%; float: right"
|
||||
type="danger"
|
||||
v-else-if="$moment().valueOf()<$moment(item.applyEndTime).valueOf()"
|
||||
>
|
||||
报名未开始
|
||||
</el-tag>
|
||||
@@ -118,13 +108,12 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<div class="text e-item">
|
||||
<span style="color: gray">报名时间:</span>
|
||||
{{$moment(item.applyStartTime).format('YYYY/MM/DD HH:mm')}}
|
||||
至 {{$moment(item.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
{{$moment(item.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{$moment(item.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div class="text item">
|
||||
<span style="color: gray">活动时间:</span>
|
||||
{{$moment(item.startTime).format('YYYY/MM/DD HH:mm')}}
|
||||
至 {{$moment(item.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
{{$moment(item.startTime).format('YYYY/MM/DD HH:mm')}} 至 {{$moment(item.endTime).format('YYYY/MM/DD')}}
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -138,73 +127,68 @@ layout("/layouts/platform.html"){
|
||||
<table-tool label="活动项目信息">
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择组别"
|
||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||
v-if="unionLeaderCoach"
|
||||
v-model="pageForm.groupName"
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择组别"
|
||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||
v-if="unionLeaderCoach"
|
||||
v-model="pageForm.groupName"
|
||||
>
|
||||
<el-option :key="item.id" :label="item.name" :value="item.name"
|
||||
v-for="item in groupList"></el-option>
|
||||
<el-option :key="item.id" :label="item.name" :value="item.name" v-for="item in groupList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择活动项目"
|
||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||
v-if="unionLeaderCoach"
|
||||
v-model="pageForm.eventId"
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择活动项目"
|
||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||
v-if="unionLeaderCoach"
|
||||
v-model="pageForm.eventId"
|
||||
>
|
||||
<el-option :key="item.eventId" :label="item.allName"
|
||||
:value="item.eventId" v-for="item in eventList"></el-option>
|
||||
<el-option :key="item.eventId" :label="item.allName" :value="item.eventId" v-for="item in eventList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="mr10 ml20" v-if="unionLeaderCoach">
|
||||
领队:
|
||||
<span style="color: #419bf8">{{leaderData.username?leaderData.username:'暂无'}}</span>
|
||||
  教练:
|
||||
<span
|
||||
style="color: #419bf8">{{coachData.username ?coachData.username:'暂无'}}</span>
|
||||
<span style="color: #419bf8">{{coachData.username ?coachData.username:'暂无'}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="openLeaderCoach" size="medium" type="primary"
|
||||
v-if="unionLeaderCoach">设置领队/教练
|
||||
</el-button>
|
||||
<el-button @click="openLeaderCoach" size="medium" type="primary" v-if="unionLeaderCoach">设置领队/教练</el-button>
|
||||
</div>
|
||||
</table-tool>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
row-key="id"
|
||||
style="width: 100%; margin-bottom: 20px"
|
||||
v-loading="tableLoading"
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
row-key="id"
|
||||
style="width: 100%; margin-bottom: 20px"
|
||||
v-loading="tableLoading"
|
||||
>
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='projectType'">
|
||||
<span v-if="row.eveProjectType==1">单项</span>
|
||||
@@ -213,9 +197,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='applyNum'">
|
||||
<span v-if="row.successUserApply>0&&row.applyType!==3">{{ row.successUserApply }}人</span>
|
||||
<span
|
||||
v-else-if="JSON.parse(row.applyWay).length===2&&row.applyWay.includes(1)">
|
||||
{{row.totalApplyNum}}人</span>
|
||||
<span v-else-if="JSON.parse(row.applyWay).length===2&&row.applyWay.includes(1)">{{row.totalApplyNum}}人</span>
|
||||
<span v-else-if="row.totalApplyNum>0&&row.applyType===3">{{ row.totalApplyNum }}人</span>
|
||||
<span v-else>0人</span>
|
||||
</template>
|
||||
@@ -226,98 +208,84 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="报名操作"
|
||||
width="300px">
|
||||
<el-table-column align="center" header-align="center" label="报名操作" width="300px">
|
||||
<template scope="{row}">
|
||||
<el-button :loading="row.loading" @click="openUniteApply(row)"
|
||||
size="mini" type="primary"
|
||||
v-if="row.applyWay.includes(2)">
|
||||
<el-button :loading="row.loading" @click="openUniteApply(row)" size="mini" type="primary" v-if="row.applyWay.includes(2)">
|
||||
项目报名
|
||||
</el-button>
|
||||
<el-button
|
||||
:loading="row.loading"
|
||||
@click="doDelete(row)"
|
||||
size="mini"
|
||||
type="danger"
|
||||
>
|
||||
删除报名人员
|
||||
</el-button>
|
||||
<el-button :loading="row.loading" @click="doDelete(row)" size="mini" type="danger">删除报名人员</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button @click="doApplied(false)" type="primary">保 存</el-button>
|
||||
<el-button @click="doApplied(true)" type="primary">提 交</el-button>
|
||||
<!-- <el-button @click="doApplied(false)" type="primary">保 存</el-button>-->
|
||||
<!-- <el-button @click="doApplied(true)" type="primary">提 交</el-button>-->
|
||||
</template>
|
||||
<template #edit>
|
||||
<activity-sports-apply-user @flip="flip"
|
||||
ref="activityApplyUser"></activity-sports-apply-user>
|
||||
<activity-sports-apply-user @flip="flip" ref="activityApplyUser"></activity-sports-apply-user>
|
||||
</template>
|
||||
<template #edit-footer>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="doApplied(false)" type="primary">保 存</el-button>
|
||||
<el-button @click="doApplied(true)" type="primary">提 交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<activity-sports-delete-user @flush="doSearch"
|
||||
ref="activityDeleteUser"></activity-sports-delete-user>
|
||||
<activity-sports-delete-user @flip="flip" ref="activityDeleteUser"></activity-sports-delete-user>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :visible.sync="dialogLeaderCoach" title="添加领队/教练" width="60%">
|
||||
<el-form :model="headData" :rules="formRules" label-width="100px" ref="form"
|
||||
v-loading="formLoading">
|
||||
<el-form :model="headData" :rules="formRules" label-width="100px" ref="form" v-loading="formLoading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<table-tool label="填写领队信息"></table-tool>
|
||||
<el-form-item label="姓  名" prop="userId">
|
||||
<user-select
|
||||
:option_label_func="(item)=>{return item.username + item.loginname}"
|
||||
@change="changeLeader"
|
||||
api="/platform/activity/apply/getUserUnion"
|
||||
api_input_key_name="query"
|
||||
ref="userData"
|
||||
style="width: 100%"
|
||||
v-model="leaderData.userId"
|
||||
:option_label_func="(item)=>{return item.username + item.loginname}"
|
||||
@change="changeLeader"
|
||||
api="/platform/activity/apply/getUserUnion"
|
||||
api_input_key_name="query"
|
||||
ref="userData"
|
||||
style="width: 100%"
|
||||
v-model="leaderData.userId"
|
||||
></user-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在单位" prop="unitId">
|
||||
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%"
|
||||
v-model="leaderData.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unitOptions"></el-option>
|
||||
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%" v-model="leaderData.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电  话" prop="mobile">
|
||||
<el-input maxlength="50" placeholder="请填写电话" type="text"
|
||||
v-model="leaderData.mobile"></el-input>
|
||||
<el-input maxlength="50" placeholder="请填写电话" type="text" v-model="leaderData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<table-tool label="填写教练信息"></table-tool>
|
||||
<el-form-item label="姓  名" prop="userId">
|
||||
<user-select
|
||||
:option_label_func="(item)=>{return item.username + item.loginname}"
|
||||
@change="changeCoach"
|
||||
api="/platform/activity/apply/getUserUnion"
|
||||
api_input_key_name="query"
|
||||
style="width: 100%"
|
||||
ref="userData2"
|
||||
v-model="coachData.userId"
|
||||
:option_label_func="(item)=>{return item.username + item.loginname}"
|
||||
@change="changeCoach"
|
||||
api="/platform/activity/apply/getUserUnion"
|
||||
api_input_key_name="query"
|
||||
style="width: 100%"
|
||||
ref="userData2"
|
||||
v-model="coachData.userId"
|
||||
></user-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在单位" prop="unitId">
|
||||
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%"
|
||||
v-model="coachData.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unitOptions"></el-option>
|
||||
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%" v-model="coachData.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电  话" prop="mobile">
|
||||
<el-input maxlength="50" placeholder="请填写电话" type="text"
|
||||
v-model="coachData.mobile"></el-input>
|
||||
<el-input maxlength="50" placeholder="请填写电话" type="text" v-model="coachData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -328,18 +296,13 @@ layout("/layouts/platform.html"){
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="活动通知"
|
||||
:visible.sync="activityNoticeDialog"
|
||||
width="50%"
|
||||
>
|
||||
<div style="margin: 10px; ">
|
||||
<div style="height: 500px; overflow: auto;"
|
||||
v-html="activityData.eventNotification"></div>
|
||||
<el-dialog title="活动通知" :visible.sync="activityNoticeDialog" width="50%">
|
||||
<div style="margin: 10px">
|
||||
<div style="height: 500px; overflow: auto" v-html="activityData.eventNotification"></div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="activityNoticeDialog = false">关 闭</el-button>
|
||||
</span>
|
||||
<el-button type="primary" @click="activityNoticeDialog = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -367,10 +330,10 @@ layout("/layouts/platform.html"){
|
||||
groupList: [],
|
||||
eventList: [],
|
||||
tableColumns: [
|
||||
{prop: "allName", label: "项目名称"},
|
||||
{prop: "projectType", label: "项目类型"},
|
||||
{prop: "applyNum", label: "已报名人数"},
|
||||
{prop: "apply_num_bc", label: "暂保存人数"}
|
||||
{ prop: "allName", label: "项目名称" },
|
||||
{ prop: "projectType", label: "项目类型" },
|
||||
{ prop: "applyNum", label: "已报名人数" },
|
||||
{ prop: "apply_num_bc", label: "暂保存人数" }
|
||||
],
|
||||
unionOptions: [],
|
||||
|
||||
@@ -450,7 +413,6 @@ layout("/layouts/platform.html"){
|
||||
this.coachData = {}
|
||||
if (this.leaderData || this.coachData) {
|
||||
await this.getUnionCoachLeaderHead()
|
||||
|
||||
}
|
||||
this.dialogLeaderCoach = true
|
||||
setTimeout(async () => {
|
||||
@@ -500,8 +462,8 @@ layout("/layouts/platform.html"){
|
||||
this.coachData = {}
|
||||
this.headData = {}
|
||||
this.staffData = {}
|
||||
const resp = await this.$axios.post(loc() + "/getUnionCoachLeaderHead", {activityId: this.pageForm.activityId})
|
||||
const {unionCoach, unionLeader, unionHead, unionStaff, userOptions} = resp.data
|
||||
const resp = await this.$axios.post(loc() + "/getUnionCoachLeaderHead", { activityId: this.pageForm.activityId })
|
||||
const { unionCoach, unionLeader, unionHead, unionStaff, userOptions } = resp.data
|
||||
if (unionCoach) {
|
||||
this.coachData = unionCoach
|
||||
}
|
||||
@@ -518,14 +480,14 @@ layout("/layouts/platform.html"){
|
||||
this.userOptions = userOptions
|
||||
},
|
||||
async changeActivity() {
|
||||
const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
const resp = await this.$axios.post("/platform/activity/apply/getEvents", { activityId: this.pageForm.activityId })
|
||||
this.eventList = resp.data
|
||||
},
|
||||
pageData() {
|
||||
this.tabLoading = true
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
|
||||
this.$axios.post("/platform/activity/apply/pageData", {data: JSON.stringify(pageForm)}).then((res) => {
|
||||
this.$axios.post("/platform/activity/apply/pageData", { data: JSON.stringify(pageForm) }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
|
||||
@@ -117,15 +117,14 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="授权身份" :visible.sync="authDialogVisible" width="50%">
|
||||
<el-form :model="authFormData" ref="authForm" label-width="80px">
|
||||
<el-form :model="authFormData" ref="authForm" label-width="60px">
|
||||
<el-form-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" v-model="authFormData.userName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号">
|
||||
<el-input placeholder="请输入工号" v-model="authFormData.loginName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份" prop="roleCode"
|
||||
:rules="[{required: true, message: '请选择身份', trigger: 'blur'}]">
|
||||
<el-form-item label="身份" prop="roleCode">
|
||||
<el-checkbox-group v-model="authFormData.roleCode">
|
||||
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox>
|
||||
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
|
||||
|
||||
@@ -15,15 +15,18 @@ layout("/layouts/platform.html"){
|
||||
<table-tool label="数据列表">
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" @click="onOpen">新增</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
||||
style="width: 100%">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column label="名称" prop="name" sortable></el-table-column>
|
||||
<el-table-column label="年份" prop="year" sortable width="150px"></el-table-column>
|
||||
<el-table-column label="开始时间" prop="startTime" sortable width="300px"></el-table-column>
|
||||
<el-table-column label="结束时间" prop="endTime" sortable width="300px"></el-table-column>
|
||||
<el-table-column label="是否启用" prop="enabled" sortable width="150px">
|
||||
<template scope="{row}">
|
||||
<el-tag :type="row.enabled ? 'success' : 'danger'" size="mini">{{row.enabled ? '是' : '否'}}</el-tag>
|
||||
<el-tag :type="row.enabled ? 'success' : 'danger'" size="mini">{{row.enabled ? '是' : '否'}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
@@ -37,10 +40,12 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogVisible" :close-on-click-modal="false" width="60%">
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogVisible" :close-on-click-modal="false"
|
||||
width="60%">
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px">
|
||||
<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-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 v-model="formData.name" placeholder="名称"></el-input>
|
||||
@@ -49,22 +54,22 @@ layout("/layouts/platform.html"){
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="formData.startTime"
|
||||
style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="开始时间"
|
||||
v-model="formData.startTime"
|
||||
style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="开始时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker
|
||||
v-model="formData.endTime"
|
||||
style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="结束时间"
|
||||
v-model="formData.endTime"
|
||||
style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="结束时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -72,6 +77,17 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item label="通知内容" prop="content">
|
||||
<text-editor v-model="formData.content"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="自定义表单">
|
||||
<div style="display: flex;align-items: center;height: 40px">
|
||||
<el-switch v-model="formData.isCustomForm" style="margin-right: 10px"></el-switch>
|
||||
<custom-form-field v-model="formData.formConfig" v-if="formData.isCustomForm"></custom-form-field>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="报名表单" prop="formConfig" v-if="formData.isCustomForm">-->
|
||||
<!-- <custom-form-field v-model="formData.formConfig"></custom-form-field>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="是否启用" prop="enabled">
|
||||
<el-switch v-model="formData.enabled"></el-switch>
|
||||
</el-form-item>
|
||||
@@ -91,12 +107,12 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formRules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: ["blur", "change"] }],
|
||||
content: [{ required: true, message: "通知内容不能为空", trigger: ["blur", "change"] }],
|
||||
year: [{ required: true, message: "考核年份不能为空", trigger: ["blur", "change"] }],
|
||||
startTime: [{ required: true, message: "开始时间不能为空", trigger: ["blur", "change"] }],
|
||||
endTime: [{ required: true, message: "结束时间不能为空", trigger: ["blur", "change"] }],
|
||||
enabled: [{ required: true, message: "是否启用不能为空", trigger: ["blur", "change"] }]
|
||||
name: [{required: true, message: "名称不能为空", trigger: ["blur", "change"]}],
|
||||
content: [{required: true, message: "通知内容不能为空", trigger: ["blur", "change"]}],
|
||||
year: [{required: true, message: "考核年份不能为空", trigger: ["blur", "change"]}],
|
||||
startTime: [{required: true, message: "开始时间不能为空", trigger: ["blur", "change"]}],
|
||||
endTime: [{required: true, message: "结束时间不能为空", trigger: ["blur", "change"]}],
|
||||
enabled: [{required: true, message: "是否启用不能为空", trigger: ["blur", "change"]}]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -111,13 +127,15 @@ layout("/layouts/platform.html"){
|
||||
onEdit(row) {
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.formData = { ...row }
|
||||
this.formData = {...row}
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios.post("/platform/buildHome/act/save", this.formData).then((res) => {
|
||||
this.$axios.post("/platform/buildHome/act/save", {
|
||||
act: JSON.stringify(this.formData)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.dialogVisible = false
|
||||
|
||||
+59
-32
@@ -7,22 +7,33 @@ const kpiForm = {
|
||||
<el-form-item label="考核名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入考核名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-form-item label="考核年度" prop="year">
|
||||
<el-date-picker v-model="formData.year" type="year" placeholder="选择年"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker v-model="formData.endTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="考核年度" prop="year">
|
||||
<el-date-picker v-model="formData.year" type="year" placeholder="选择年"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker v-model="formData.endTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="是否开启" prop="enable">
|
||||
<el-switch v-model="formData.enable" :active-value="1" :inactive-value="0"></el-switch>
|
||||
<el-form-item label="关联事项" prop="actId">
|
||||
<el-select v-model="formData.actId">
|
||||
<el-option v-for="item in actOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否开启" prop="enabled">
|
||||
<el-switch v-model="formData.enabled"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<div class="process-title">考核内容</div>
|
||||
@@ -48,7 +59,8 @@ const kpiForm = {
|
||||
<template v-for="(category,categoryIndex) in formData.categoryList">
|
||||
<tr v-for="(item,itemIndex) in category.items"
|
||||
:class="{'category-split':itemIndex+1===category.items.length}">
|
||||
<td v-if="itemIndex===0" :rowspan="category.items.length" class="text-center" style="width: 10%">
|
||||
<td v-if="itemIndex===0" :rowspan="category.items.length" class="text-center"
|
||||
style="width: 10%">
|
||||
<div>{{categoryIndex+1}}</div>
|
||||
</td>
|
||||
<td v-if="itemIndex===0" :rowspan="category.items.length" style="width: 10%">
|
||||
@@ -194,28 +206,31 @@ const kpiForm = {
|
||||
dialogVisible: false,
|
||||
formData: {
|
||||
categoryList: [],
|
||||
scoreLevels:[]
|
||||
scoreLevels: []
|
||||
},
|
||||
formRules: {
|
||||
name: [{ required: true, message: "请输入考核名称", trigger: ["change", "blur"] }],
|
||||
code: [{ required: true, message: "请输入考核代码", trigger: ["change", "blur"] }],
|
||||
year: [{ required: true, message: "请输入考核年份", trigger: ["change", "blur"] }],
|
||||
startTime: [{ required: true, message: "请输入考核时间", trigger: ["change", "blur"] }],
|
||||
endTime: [{ required: true, message: "请输入考核时间", trigger: ["change", "blur"] }]
|
||||
name: [{required: true, message: "请输入考核名称", trigger: ["change", "blur"]}],
|
||||
code: [{required: true, message: "请输入考核代码", trigger: ["change", "blur"]}],
|
||||
year: [{required: true, message: "请输入考核年份", trigger: ["change", "blur"]}],
|
||||
startTime: [{required: true, message: "请输入考核时间", trigger: ["change", "blur"]}],
|
||||
endTime: [{required: true, message: "请输入考核时间", trigger: ["change", "blur"]}],
|
||||
actId: [{required: true, message: "请选择活动事项", trigger: ["change", "blur"]}]
|
||||
},
|
||||
newCategory: {
|
||||
name: "",
|
||||
code: "",
|
||||
sortOrder: 1,
|
||||
items: []
|
||||
}
|
||||
},
|
||||
actOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id = null) {
|
||||
this.visible = true
|
||||
this.listAct()
|
||||
if (id) {
|
||||
$.post("/platform/buildHome/kpi/plan/get", { id }).then((res) => {
|
||||
$.post("/platform/buildHome/kpi/plan/get", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
res.data.year = res.data.year.toString()
|
||||
|
||||
@@ -228,11 +243,19 @@ const kpiForm = {
|
||||
} else {
|
||||
this.formData = {
|
||||
categoryList: [],
|
||||
scoreLevels:[]
|
||||
scoreLevels: []
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
listAct() {
|
||||
this.$axios.get("/platform/buildHome/material/query/listAct").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.actOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
@@ -323,6 +346,7 @@ const kpiForm = {
|
||||
}
|
||||
},
|
||||
|
||||
// 添加考核分类
|
||||
addCategory() {
|
||||
if (!this.newCategory.name || !this.newCategory.code) {
|
||||
this.$message.warning("请填写完整信息")
|
||||
@@ -348,7 +372,7 @@ const kpiForm = {
|
||||
}
|
||||
}
|
||||
],
|
||||
$edit_status: { name: false }
|
||||
$edit_status: {name: false}
|
||||
}
|
||||
|
||||
this.formData.categoryList.push(category)
|
||||
@@ -356,6 +380,7 @@ const kpiForm = {
|
||||
this.$message.success("添加成功")
|
||||
},
|
||||
|
||||
// 添加考核项目
|
||||
addNewItem(categoryIndex) {
|
||||
const category = this.formData.categoryList[categoryIndex]
|
||||
const newItem = {
|
||||
@@ -383,7 +408,8 @@ const kpiForm = {
|
||||
this.formData.categoryList.splice(cateGoryIndex, 1)
|
||||
this.$message.success("删除成功")
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
// 删除考核内容
|
||||
@@ -397,7 +423,8 @@ const kpiForm = {
|
||||
this.formData.categoryList[cateGoryIndex].items.splice(itemIndex, 1)
|
||||
this.$message.success("删除成功")
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
@@ -442,7 +469,7 @@ const kpiForm = {
|
||||
bottom: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
.kpi-plus table tbody tr td {
|
||||
padding: 14px 20px;
|
||||
color: rgb(17 24 39);
|
||||
@@ -473,10 +500,10 @@ const kpiForm = {
|
||||
border-bottom: 1px solid rgb(33 40 53);
|
||||
}
|
||||
|
||||
.kpi-plus .score-levels-table .el-input-number{
|
||||
width: unset!important;
|
||||
.kpi-plus .score-levels-table .el-input-number {
|
||||
width: unset !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.td-extra {
|
||||
/*display: none;*/
|
||||
|
||||
@@ -9,7 +9,7 @@ layout("/layouts/platform.html"){
|
||||
.alert {
|
||||
padding: 15px;
|
||||
background-color: #e8f4ff;
|
||||
border-left: 4px solid var(--color-primary);
|
||||
border-left: 4px solid #1890ff;
|
||||
margin-bottom: 25px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||
@@ -29,7 +29,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
|
||||
.alert i {
|
||||
color: var(--color-primary);
|
||||
color: #1890ff;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
|
||||
.book-header {
|
||||
background: linear-gradient(120deg, var(--color-primary), var(--color-primary-8));
|
||||
background: linear-gradient(120deg, #1e3c72, #2a5298);
|
||||
color: white;
|
||||
padding: 30px;
|
||||
text-align: center;
|
||||
@@ -107,7 +107,7 @@ layout("/layouts/platform.html"){
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
color: var(--color-primary);
|
||||
color: #1867b0;
|
||||
position: relative;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<material-write ref="materialWriteRef"></material-write>
|
||||
<material-write ref="materialWriteRef" @refresh="doSearch"></material-write>
|
||||
<material-info ref="materialInfoRef"></material-info>
|
||||
</div>
|
||||
|
||||
|
||||
+23
-9
@@ -7,22 +7,29 @@ layout("/layouts/platform.html"){
|
||||
<search @search="doSearch">
|
||||
<search-item label="评比事项">
|
||||
<el-select v-model="pageForm.actId" placeholder="考核活动" clearable>
|
||||
<el-option v-for="item in actOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-option v-for="item in actOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="数据列表">
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportZip">导出汇总表</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportZip">导出材料汇总表</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportScore">导出自评分汇总表
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
||||
style="width: 100%">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column label="分工会名称" prop="unionName" sortable></el-table-column>
|
||||
<el-table-column label="分工会编码" prop="unionCode" sortable></el-table-column>
|
||||
<el-table-column label="填写状态" prop="isWrite">
|
||||
<template scope="{row}">
|
||||
<el-tag :type="row.isWrite ? 'success' : 'danger'" size="mini">{{row.isWrite ? '已填写' : '未填写'}}</el-tag>
|
||||
<el-tag :type="row.isWrite ? 'success' : 'danger'" size="mini">{{row.isWrite ? '已填写' :
|
||||
'未填写'}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="建家记录册" prop="logBookFiles">-->
|
||||
@@ -33,7 +40,8 @@ layout("/layouts/platform.html"){
|
||||
<!-- <el-table-column label="年度工作总结和工作大事记录" prop="annualWorkSummaryFiles"></el-table-column>-->
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="$refs.infoRef.onOpen(pageForm.actId,row.id)">查看</el-button>
|
||||
<el-button size="mini" type="primary" @click="$refs.infoRef.onOpen(pageForm.actId,row.id)">查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -49,7 +57,7 @@ layout("/layouts/platform.html"){
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: { info },
|
||||
components: {info},
|
||||
data() {
|
||||
return {
|
||||
actOptions: [],
|
||||
@@ -57,6 +65,9 @@ layout("/layouts/platform.html"){
|
||||
actId: null
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
listAct() {
|
||||
@@ -70,8 +81,11 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
exportZip(){
|
||||
this.$downLoad('/platform/buildHome/material/query/exportZip', this.pageForm)
|
||||
exportZip() {
|
||||
this.$downLoad('/platform/buildHome/material/query/exportZip', this.pageForm)
|
||||
},
|
||||
exportScore() {
|
||||
this.$downLoad('/platform/buildHome/material/query/exportScore', this.pageForm)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
+35
-4
@@ -1,7 +1,7 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog title="查看详情" :visible.sync="visible" width="50%">
|
||||
<div class="upload-list">
|
||||
<div class="upload-list" v-if="!isCustomForm">
|
||||
<div class="upload-item">
|
||||
<div class="upload-item-title">
|
||||
<i class="fa fa-book"></i>
|
||||
@@ -34,17 +34,48 @@ const info = {
|
||||
<file-preview :files="viewData.annualWorkSummaryFiles" complete_result></file-preview>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<form-create
|
||||
v-if="visible"
|
||||
:key="actId+unionId"
|
||||
:value.sync="viewData.dynamicFormData"
|
||||
:rule="formCreateRule"
|
||||
:option="formCreateOption"
|
||||
disabled
|
||||
></form-create>
|
||||
</div>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
activity: {},
|
||||
viewData: {},
|
||||
visible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isCustomForm() {
|
||||
if(this.activity){
|
||||
return this.activity.isCustomForm
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(actId, unionId) {
|
||||
async onOpen(actId, unionId) {
|
||||
this.viewData = {}
|
||||
|
||||
this.visible = true
|
||||
|
||||
const {code,data,msg} = await this.$axios.post("/platform/buildHome/material/act", {actId})
|
||||
if (code === 0) {
|
||||
this.activity = data
|
||||
if (this.activity.isCustomForm) {
|
||||
this.formCreateRule = formCreate.parseJson(this.activity.formConfig.rule)
|
||||
this.formCreateOption = formCreate.parseJson(this.activity.formConfig.options)
|
||||
}
|
||||
}
|
||||
|
||||
this.$axios
|
||||
.post("/platform/buildHome/material/query/infoByUnionId", {
|
||||
actId,
|
||||
@@ -52,9 +83,9 @@ const info = {
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
if(res.data){
|
||||
if (res.data) {
|
||||
this.viewData = res.data
|
||||
}else{
|
||||
} else {
|
||||
this.viewData = {}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -6,8 +6,9 @@ const write = {
|
||||
当前时间不在提交时间范围内,无法提交材料。提交时间:
|
||||
{{ activity.startTime }} 至 {{ activity.endTime }}
|
||||
</div>
|
||||
|
||||
<div class="upload-list">
|
||||
|
||||
<!--非自定义表单-->
|
||||
<div class="upload-list" v-if="!isCustomForm">
|
||||
<div class="upload-item">
|
||||
<div class="upload-item-title">
|
||||
<i class="fa fa-book"></i>
|
||||
@@ -19,13 +20,13 @@ const write = {
|
||||
,导出签字盖章后上传扫描件
|
||||
</div>
|
||||
<file-upload
|
||||
:value.sync="formData.logBookFiles"
|
||||
:upload_number="1"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_text="选择文件"
|
||||
upload_button_size="medium"
|
||||
:disabled="!isWithinTimeRange"
|
||||
:value.sync="formData.logBookFiles"
|
||||
:upload_number="1"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_text="选择文件"
|
||||
upload_button_size="medium"
|
||||
:disabled="!isWithinTimeRange"
|
||||
></file-upload>
|
||||
</div>
|
||||
|
||||
@@ -40,13 +41,13 @@ const write = {
|
||||
,填写完导出后签字盖章后上传扫描件
|
||||
</div>
|
||||
<file-upload
|
||||
:value.sync="formData.selfEvaluationFiles"
|
||||
:upload_number="1"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_text="选择文件"
|
||||
upload_button_size="medium"
|
||||
:disabled="!isWithinTimeRange"
|
||||
:value.sync="formData.selfEvaluationFiles"
|
||||
:upload_number="1"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_text="选择文件"
|
||||
upload_button_size="medium"
|
||||
:disabled="!isWithinTimeRange"
|
||||
></file-upload>
|
||||
</div>
|
||||
|
||||
@@ -61,13 +62,13 @@ const write = {
|
||||
,填写完导出后签字盖章后上传扫描件
|
||||
</div>
|
||||
<file-upload
|
||||
:value.sync="formData.summaryFiles"
|
||||
:upload_number="1"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_text="选择文件"
|
||||
upload_button_size="medium"
|
||||
:disabled="!isWithinTimeRange"
|
||||
:value.sync="formData.summaryFiles"
|
||||
:upload_number="1"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_text="选择文件"
|
||||
upload_button_size="medium"
|
||||
:disabled="!isWithinTimeRange"
|
||||
></file-upload>
|
||||
</div>
|
||||
|
||||
@@ -78,23 +79,34 @@ const write = {
|
||||
</div>
|
||||
<div class="upload-hint">请上传年度工作总结和工作大事记电子版</div>
|
||||
<file-upload
|
||||
:value.sync="formData.annualWorkSummaryFiles"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_text="选择文件"
|
||||
upload_button_size="medium"
|
||||
:disabled="!isWithinTimeRange"
|
||||
:value.sync="formData.annualWorkSummaryFiles"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_text="选择文件"
|
||||
upload_button_size="medium"
|
||||
:disabled="!isWithinTimeRange"
|
||||
></file-upload>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="notice-box">
|
||||
<!--自定义表单-->
|
||||
<div v-if="isCustomForm">
|
||||
<!-- <div class="process-title">填写报名信息</div>-->
|
||||
<form-create
|
||||
:value.sync="formData.dynamicFormData"
|
||||
v-model="fapi"
|
||||
:rule="formCreateRule"
|
||||
:option="formCreateOption"
|
||||
></form-create>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="notice-box" v-if="!isCustomForm">
|
||||
<i class="fa fa-exclamation-triangle"></i>
|
||||
<strong>重要提示:</strong>
|
||||
建家记录册、教职工之家建设考核评议自评表需由党委主要负责人签字盖章后扫描件上传
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
@@ -113,7 +125,12 @@ const write = {
|
||||
selfEvaluationFiles: [],
|
||||
summaryFiles: [],
|
||||
annualWorkSummaryFiles: []
|
||||
}
|
||||
},
|
||||
|
||||
formCreateRule: [],
|
||||
formCreateOption: {},
|
||||
fapi: null,
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -126,20 +143,27 @@ const write = {
|
||||
const endTime = new Date(this.activity.endTime).getTime()
|
||||
|
||||
return now >= startTime && now <= endTime
|
||||
}
|
||||
},
|
||||
isCustomForm() {
|
||||
return this.activity && this.activity.isCustomForm
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.visible = true
|
||||
this.actId = id
|
||||
this.$axios.post("/platform/buildHome/material/act", { actId: id }).then((res) => {
|
||||
this.$axios.post("/platform/buildHome/material/act", {actId: id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.activity = res.data
|
||||
if (this.activity.formConfig) {
|
||||
this.formCreateRule = formCreate.parseJson(this.activity.formConfig.rule)
|
||||
this.formCreateOption = formCreate.parseJson(this.activity.formConfig.options)
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
this.$axios.post("/platform/buildHome/material/info", { actId: id }).then((res) => {
|
||||
this.$axios.post("/platform/buildHome/material/info", {actId: id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
} else {
|
||||
@@ -148,29 +172,42 @@ const write = {
|
||||
})
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
async onSubmit() {
|
||||
if (!this.isWithinTimeRange) {
|
||||
this.$message.error("当前时间不在活动时间范围内,无法提交材料")
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.logBookFiles.length === 0) {
|
||||
this.$message.warning("请上传建家记录册")
|
||||
return false
|
||||
if(!this.isCustomForm){
|
||||
if (this.formData.logBookFiles.length === 0) {
|
||||
this.$message.warning("请上传建家记录册")
|
||||
return false
|
||||
}
|
||||
|
||||
if (this.formData.selfEvaluationFiles.length === 0) {
|
||||
this.$message.warning("请上传自评表")
|
||||
return false
|
||||
}
|
||||
|
||||
if (this.formData.summaryFiles.length === 0) {
|
||||
this.$message.warning("请上传职工小家建设情况汇总")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if (this.formData.selfEvaluationFiles.length === 0) {
|
||||
this.$message.warning("请上传自评表")
|
||||
return false
|
||||
}
|
||||
|
||||
if (this.formData.summaryFiles.length === 0) {
|
||||
this.$message.warning("请上传职工小家建设情况汇总")
|
||||
return false
|
||||
if (this.isCustomForm && this.fapi) {
|
||||
let formValid = false
|
||||
try {
|
||||
await this.fapi.validate()
|
||||
formValid = true
|
||||
} catch (e) {
|
||||
formValid = false
|
||||
}
|
||||
if (!formValid) return
|
||||
}
|
||||
|
||||
this.$axios
|
||||
.post("/platform/buildHome/material/submit", { material: JSON.stringify(this.formData) })
|
||||
.post("/platform/buildHome/material/submit", {material: JSON.stringify(this.formData)})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
|
||||
@@ -2,7 +2,7 @@ const apply_component = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog title="填写申请" :visible.sync="dialogVisible" width="70%" top="50px" class="ele-dialog-form">
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="120px">
|
||||
<template v-if="this.formData.honorType == '个人荣誉'">
|
||||
<template v-if="this.formData.honorTypeName == '个人荣誉'">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="userName" label="姓名">
|
||||
@@ -175,9 +175,10 @@ const apply_component = {
|
||||
this.$set(this.formData, "evaluateId", activity.id)
|
||||
this.$set(this.formData, "honorTypeId", activity.honorTypeId)
|
||||
this.$set(this.formData, "honorType", activity.honorType)
|
||||
this.$set(this.formData, "honorTypeName", activity.honorTypeName)
|
||||
this.$set(this.formData, "honorId", activity.honorId)
|
||||
|
||||
if (activity.honorType.includes('集体')) {
|
||||
if (activity.honorTypeName.includes('集体')) {
|
||||
this.getCollectiveInfo()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -24,7 +24,7 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column prop="honorTypeName" label="荣誉类型"></el-table-column>
|
||||
<el-table-column label="操作" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<!-- <el-button size="mini" type="primary" @click="openView(row)">查看</el-button>-->
|
||||
<el-button size="mini" type="primary" @click="openApply(row)">申请</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
+6
-2
@@ -17,12 +17,16 @@ const MEMBER_AUDIT_CHANGE_INFO = {
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<template v-if="viewData.retireDate">
|
||||
<el-descriptions-item label="退休时间">{{ $moment(viewData.retireDate).format('YYYY-MM-DD') }}</el-descriptions-item>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
</template>
|
||||
<template>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
|
||||
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
|
||||
<el-descriptions-item label="婚姻状况">{{ viewData.marriage || '' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码" span="2">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否会员">{{ viewData.member ? '是' : '否' }}</el-descriptions-item>
|
||||
|
||||
+7
-6
@@ -48,28 +48,29 @@ const MEMBER_AUDIT_TABLE = {
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column :label="column.label" :prop="column.prop"
|
||||
<el-table-column v-for="column in tableColumns" :label="column.label"
|
||||
:prop="column.prop" :key="column.prop"
|
||||
:sortable="column.sortable" :width="column.width"
|
||||
align="center" header-align="center" min-width="100px"
|
||||
show-overflow-tooltip v-for="column in tableColumns">
|
||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="{row}" v-if="column.prop=='loginname'">
|
||||
<el-link @click="openView(row.userId)" type="primary">{{row.loginname}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" label="变更类型" prop="changeType" show-overflow-tooltip sortable>
|
||||
<template scope="{row}">
|
||||
<template slot-scope="{row}">
|
||||
<span style="color: #0e78c5;cursor: pointer" @click="openChangeView(row)">
|
||||
{{getChangeTypes(row.changeTypes)}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" label="变更时间" prop="applyDateTime" show-overflow-tooltip sortable>
|
||||
<template scope="{row}">
|
||||
<template slot-scope="{row}">
|
||||
<span>{{ row.applyDateTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openChangeView(row)">查看</el-button>
|
||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'
|
||||
&& !(row.processInstanceNodeCode == 10 && row.changeOrigin == 'BRANCH_UNION')"
|
||||
|
||||
+8
-4
@@ -10,10 +10,14 @@ const MEMBER_CHANGE_INFO = {
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<template v-if="viewData.retireDate">
|
||||
<el-descriptions-item label="退休时间">{{ $moment(viewData.retireDate).format('YYYY-MM-DD') }}</el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
<template v-if="viewData.retireDate">
|
||||
<el-descriptions-item label="退休时间">{{ $moment(viewData.retireDate).format('YYYY-MM-DD') }}</el-descriptions-item>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
</template>
|
||||
<template>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
|
||||
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
|
||||
<el-descriptions-item label="婚姻状况">{{ viewData.marriage || '' }}</el-descriptions-item>
|
||||
|
||||
+37
-8
@@ -1,11 +1,10 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<query-form @query="assignmentTableData" ref="queryFormRef"></query-form>
|
||||
<query-form @search="search" ref="queryFormRef"></query-form>
|
||||
<el-card shadow="never">
|
||||
<table-tool label="会员列表">
|
||||
<el-select
|
||||
@@ -151,14 +150,44 @@ layout("/layouts/platform.html"){
|
||||
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
|
||||
this.$downLoad("/platform/member/statistics/comprehensive/doExport", pageForm)
|
||||
},
|
||||
assignmentTableData(data) {
|
||||
this.tableData = data.list
|
||||
this.pageForm = this.$refs.queryFormRef.pageForm
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
search(pageForm) {
|
||||
this.pageForm = {
|
||||
...this.pageForm,
|
||||
...pageForm,
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.$refs.queryFormRef.pageForm = this.pageForm
|
||||
this.$refs.queryFormRef.pageData()
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.age = JSON.stringify(this.pageForm.age)
|
||||
pageForm.unionId = JSON.stringify(this.pageForm.unionId)
|
||||
pageForm.unitId = JSON.stringify(this.pageForm.unitId)
|
||||
pageForm.sexTypes = JSON.stringify(this.pageForm.sexTypes)
|
||||
pageForm.memberTypes = JSON.stringify(this.pageForm.memberTypes)
|
||||
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
|
||||
pageForm.memberStatus = JSON.stringify(this.pageForm.memberStatus)
|
||||
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
|
||||
if (pageForm.birthdayRange && pageForm.birthdayRange.length > 0) {
|
||||
pageForm.startDate = pageForm.birthdayRange[0]
|
||||
pageForm.endDate = pageForm.birthdayRange[1]
|
||||
}
|
||||
if (pageForm.joinMemberRange && pageForm.joinMemberRange.length > 0) {
|
||||
pageForm.startJoinDate = pageForm.joinMemberRange[0]
|
||||
pageForm.endJoinDate = pageForm.joinMemberRange[1]
|
||||
}
|
||||
if (pageForm.leaveMemberRange && pageForm.leaveMemberRange.length > 0) {
|
||||
pageForm.startLeaveDate = pageForm.leaveMemberRange[0]
|
||||
pageForm.endLeaveDate = pageForm.leaveMemberRange[1]
|
||||
}
|
||||
this.$axios.post("/platform/member/statistics/comprehensive/pageData", pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
+59
-48
@@ -12,6 +12,16 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
placeholder="选择年" :clearable="false">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="入校月份">
|
||||
<el-date-picker
|
||||
type="month"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.month"
|
||||
placeholder="请选择入校月份搜索">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="姓名工号">
|
||||
<el-input placeholder="请输入姓名或者工号" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
@@ -77,22 +87,37 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
</search-item>
|
||||
<search-item label="出生日期">
|
||||
<el-date-picker
|
||||
v-model="pageForm.startDate"
|
||||
type="date"
|
||||
@change="determineStartDate"
|
||||
v-model="pageForm.birthdayRange"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
placeholder="选择开始出生日期">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="出生日期">
|
||||
<el-date-picker
|
||||
v-model="pageForm.endDate"
|
||||
type="date"
|
||||
@change="determineEndDate"
|
||||
style="width: 100%"
|
||||
placeholder="选择结束出生日期">
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="入会日期">
|
||||
<el-date-picker
|
||||
v-model="pageForm.joinMemberRange"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="离会日期">
|
||||
<el-date-picker
|
||||
v-model="pageForm.leaveMemberRange"
|
||||
type="daterange"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="年龄区间">
|
||||
<div style="display: flex;align-items: center">
|
||||
<el-slider
|
||||
@@ -145,6 +170,7 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
year: moment().format("YYYY"),
|
||||
month: "",
|
||||
roleIds: [],
|
||||
age: [0, 0],
|
||||
minAge: 0,
|
||||
@@ -153,8 +179,10 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
sexTypes: [],
|
||||
reverseSelection: false,
|
||||
activityUserCnd: "",
|
||||
startDate: "",
|
||||
endDate: ""
|
||||
// 出生年月日期范围
|
||||
birthdayRange: [],
|
||||
joinMemberRange: [],
|
||||
leaveMemberRange: [],
|
||||
},
|
||||
personTypeOptions: [],
|
||||
preparedByOptions: [],
|
||||
@@ -176,6 +204,16 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
components: {
|
||||
"member-cnd": httpVueLoader("/components/module/member/MemberCnd.vue?v=" + new Date().getTime())
|
||||
},
|
||||
computed: {
|
||||
monthPickerOptions() {
|
||||
return {
|
||||
disabledDate(time) {
|
||||
// 只能选择与 `year` 相同的年份
|
||||
return time.getFullYear() !== parseInt(this.pageForm.year);
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
determineEndDate() {
|
||||
if (this.pageForm.startDate) {
|
||||
@@ -186,15 +224,6 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
}
|
||||
this.pageForm.endDate = this.pageForm.endDate.toLocaleDateString().replaceAll("/", "-")
|
||||
},
|
||||
determineStartDate() {
|
||||
if (this.pageForm.endDate) {
|
||||
if (Date.parse(this.pageForm.startDate) > Date.parse(this.pageForm.endDate)) {
|
||||
this.pageForm.startDate = ""
|
||||
this.$notify.warning("开始时间不能大于结束时间")
|
||||
}
|
||||
}
|
||||
this.pageForm.startDate = this.pageForm.startDate.toLocaleDateString().replaceAll("/", "-")
|
||||
},
|
||||
tagClick(key, val) {
|
||||
let idx = this.pageForm[key].indexOf(val)
|
||||
if (idx !== -1) {
|
||||
@@ -259,8 +288,9 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
this.pageForm.activityUserCnd = ""
|
||||
this.pageForm.age = [0, 0]
|
||||
this.pageForm.reverseSelection = false
|
||||
this.pageForm.startDate = ""
|
||||
this.pageForm.endDate = ""
|
||||
this.pageForm.birthdayRange = []
|
||||
this.pageForm.joinMemberRange = []
|
||||
this.pageForm.leaveMemberRange = []
|
||||
this.doSearch()
|
||||
},
|
||||
getMenuOptions() {
|
||||
@@ -270,9 +300,6 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
}
|
||||
})
|
||||
},
|
||||
setNowYear() {
|
||||
this.$set(this.pageForm, "year", moment().format("YYYY"))
|
||||
},
|
||||
async initData() {
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
this.unions = await this.$businessTool.listUnion(this.pageForm.unionId)
|
||||
@@ -308,28 +335,12 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
|
||||
this.pageForm.isUnion = params.isUnion
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.age = JSON.stringify(this.pageForm.age)
|
||||
pageForm.unionId = JSON.stringify(this.pageForm.unionId)
|
||||
pageForm.unitId = JSON.stringify(this.pageForm.unitId)
|
||||
pageForm.sexTypes = JSON.stringify(this.pageForm.sexTypes)
|
||||
pageForm.memberTypes = JSON.stringify(this.pageForm.memberTypes)
|
||||
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
|
||||
pageForm.memberStatus = JSON.stringify(this.pageForm.memberStatus)
|
||||
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
|
||||
this.$axios.post("/platform/member/statistics/comprehensive/pageData", pageForm).then((data) => {
|
||||
if (data.code === 0) {
|
||||
this.$emit("query", data.data)
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
doSearch() {
|
||||
this.$emit('search', this.pageForm)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
this.pageData()
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,16 +138,24 @@ const optionSelect = {
|
||||
<!-- 联系电话输入 -->
|
||||
<div class="confirm-mobile-section">
|
||||
<div class="confirm-section-title">联系信息</div>
|
||||
<el-form :model="contactForm" ref="contactForm" :rules="contactRules">
|
||||
<el-form-item prop="mobile">
|
||||
<el-form :model="contactForm" ref="contactForm" :rules="contactRules" label-width="80px">
|
||||
<el-form-item prop="mobile" label="联系电话">
|
||||
<el-input
|
||||
v-model="contactForm.mobile"
|
||||
placeholder="请输入手机号码"
|
||||
maxlength="11"
|
||||
clearable>
|
||||
<template slot="prepend">联系电话</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="projectInfo.provideMode == 3" prop="receiveAddress" label="收货地址" :rules="[{ required: true, message: '请选择收货地址', trigger: 'change' }]">
|
||||
<el-select v-model="contactForm.receiveAddress" placeholder="请选择收货地址" style="width: 100%">
|
||||
<el-option v-for="item in addressOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName + ' ' + item.tel + ' ' + item.province + ' ' + item.city + ' ' + item.county + ' ' + item.addressDetail"
|
||||
:value="item.userName + ' ' + item.tel + ' ' + item.province + ' ' + item.city + ' ' + item.county + ' ' + item.addressDetail">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -222,7 +230,8 @@ const optionSelect = {
|
||||
showOptionDetailDialog: false, // 选项详情弹窗
|
||||
selectedOption: null, // 当前选中的选项
|
||||
contactForm: {
|
||||
mobile: "" // 联系电话
|
||||
mobile: "", // 联系电话,
|
||||
receiveAddress: ""
|
||||
},
|
||||
contactRules: {
|
||||
mobile: [
|
||||
@@ -316,7 +325,8 @@ const optionSelect = {
|
||||
|
||||
this.selectedRadioId = null
|
||||
this.contactForm = {
|
||||
mobile: ""
|
||||
mobile: "",
|
||||
receiveAddress: ""
|
||||
}
|
||||
|
||||
this.getProjectInfo()
|
||||
@@ -329,6 +339,11 @@ const optionSelect = {
|
||||
this.projectInfo = res.data
|
||||
this.deadlineTime = this.projectInfo.choiceTimeEnd
|
||||
|
||||
// 获取收货地址
|
||||
if (this.projectInfo.provideMode === 3) {
|
||||
this.getAddress()
|
||||
}
|
||||
|
||||
// 初始化选项的selectNum为0
|
||||
if (this.projectInfo.options) {
|
||||
this.projectInfo.options.forEach((option) => {
|
||||
@@ -365,6 +380,13 @@ const optionSelect = {
|
||||
this.contactForm.mobile = this.userSelection[0]?.mobile
|
||||
}
|
||||
|
||||
// 地址回显
|
||||
if (this.projectInfo.provideMode === 3) {
|
||||
if (this.userSelection && this.userSelection[0].receiveAddress) {
|
||||
this.contactForm.receiveAddress = this.userSelection[0].receiveAddress
|
||||
}
|
||||
}
|
||||
|
||||
// 设置已选择的选项
|
||||
if (this.projectInfo.options && this.userSelection.length > 0) {
|
||||
// 单选模式
|
||||
@@ -411,7 +433,8 @@ const optionSelect = {
|
||||
{
|
||||
selectOptionId: this.selectedRadioId,
|
||||
selectNum: 1,
|
||||
mobile: this.contactForm.mobile
|
||||
mobile: this.contactForm.mobile,
|
||||
receiveAddress: this.contactForm.receiveAddress
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -421,7 +444,8 @@ const optionSelect = {
|
||||
selections = this.selectedOptions.map((option) => ({
|
||||
selectOptionId: option.id,
|
||||
selectNum: option.selectNum,
|
||||
mobile: this.contactForm.mobile
|
||||
mobile: this.contactForm.mobile,
|
||||
receiveAddress: this.contactForm.receiveAddress
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -501,6 +525,14 @@ const optionSelect = {
|
||||
event.stopPropagation()
|
||||
this.selectedOption = option
|
||||
this.showOptionDetailDialog = true
|
||||
},
|
||||
|
||||
// 获取收货地址
|
||||
async getAddress() {
|
||||
const resp = await this.$axios.post("/platform/welfare/addressManage/selectUserAddress")
|
||||
if (resp.code === 0) {
|
||||
this.addressOptions = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -99,6 +99,9 @@ layout("/layouts/platform.html"){
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column label="收货地址" prop="receiveAddress" v-if="provideMode===3"></el-table-column>
|
||||
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="100px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="proxySelect(row)">代选</el-button>
|
||||
@@ -152,6 +155,9 @@ layout("/layouts/platform.html"){
|
||||
return this.projectOptions.find((item) => item.id === this.pageForm.projectId).options
|
||||
}
|
||||
return []
|
||||
},
|
||||
provideMode() {
|
||||
return this.projectOptions.find((item) => item.id === this.pageForm.projectId).provideMode
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
+1
-6
@@ -47,12 +47,7 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="活动详情"
|
||||
left-text="返回"
|
||||
left-arrow
|
||||
@click-left="$pjaxReplace('/platform/mobile/trainSignUpActivity/trainList')"
|
||||
></van-nav-bar>
|
||||
<van-nav-bar title="活动详情" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
||||
|
||||
<van-image height="186" src="/assets/mobile/img/trainSignUp/3quhtakfd4heeqsk6irqhft60p.png"></van-image>
|
||||
<div class="title">{{activity.activityName}}</div>
|
||||
|
||||
@@ -147,12 +147,7 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
:title="trainType + '列表'"
|
||||
left-text="返回"
|
||||
left-arrow
|
||||
@click-left="$pjaxReplace('/platform/mobile/trainSignUpActivity/trainList?isMySign=' + isMySign)"
|
||||
></van-nav-bar>
|
||||
<van-nav-bar :title="trainType + '列表'" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
||||
|
||||
<van-sticky>
|
||||
<van-dropdown-menu>
|
||||
@@ -727,7 +722,8 @@ layout("/layouts/platform_h5.html"){
|
||||
async pageData() {
|
||||
const resp = await this.$axios.post("/platform/mobile/trainSignUpActivity/findOne", {
|
||||
id: this.activityId,
|
||||
tabIndex: this.activityStatus
|
||||
tabIndex: this.activityStatus,
|
||||
fromMode: 'mobile',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
|
||||
@@ -147,7 +147,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<van-tabbar v-model="pageForm.activityType" @change="doSearch">
|
||||
<van-tabbar-item icon="wap-home-o">活动列表</van-tabbar-item>
|
||||
<van-tabbar-item icon="user-o">我报名的</van-tabbar-item>
|
||||
<van-tabbar-item icon="user-o">我的报名</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -74,11 +74,7 @@ layout("/layouts/platform_h5.html"){
|
||||
}, 500)
|
||||
},
|
||||
back() {
|
||||
if (this.projectId) {
|
||||
this.$pjaxReplace("/platform/h5/welfare/userChoose/index?id=" + this.projectId)
|
||||
} else {
|
||||
this.$pjaxReplace("/platform/h5/home")
|
||||
}
|
||||
this.historyBack()
|
||||
},
|
||||
onEdit(row) {
|
||||
this.title = "编辑地址"
|
||||
|
||||
@@ -56,6 +56,10 @@ const selectView = {
|
||||
<div class="info-row__label">联系电话</div>
|
||||
<div class="info-row__value">{{ mergedSelections[0]?.mobile || '暂无' }}</div>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<div class="info-row__label">收货地址</div>
|
||||
<div class="info-row__value">{{ mergedSelections[0]?.receiveAddress || '暂无' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -73,7 +77,7 @@ const selectView = {
|
||||
:key="item.id"
|
||||
@click="showOptionDetail(item)">
|
||||
<div class="selection-item__image">
|
||||
<img :src="item.imgUrl || '/static/images/default-welfare.png'"
|
||||
<img :src="item.imgUrl"
|
||||
alt="福利图片"
|
||||
@error="handleImageError">
|
||||
</div>
|
||||
|
||||
@@ -678,18 +678,17 @@ layout("/layouts/platform_h5.html"){
|
||||
maxlength="11"
|
||||
required
|
||||
></van-field>
|
||||
<!--
|
||||
收货地址字段预留位置
|
||||
<!--收货地址-->
|
||||
<van-field
|
||||
v-if="projectInfo.needAddress"
|
||||
v-model="formData.address"
|
||||
v-if="projectInfo.provideMode == 3"
|
||||
v-model="formData.receiveAddress"
|
||||
label="收货地址"
|
||||
placeholder="请输入收货地址"
|
||||
type="textarea"
|
||||
rows="2"
|
||||
placeholder="请选择收货地址"
|
||||
readonly
|
||||
is-link
|
||||
@click="showAddressSheet = true"
|
||||
required
|
||||
></van-field>
|
||||
-->
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
<!-- 选择内容 -->
|
||||
@@ -733,6 +732,35 @@ layout("/layouts/platform_h5.html"){
|
||||
<div class="welfare-detail-content" v-html="selectedOption.description"></div>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<!-- 收货地址选择弹窗 -->
|
||||
<van-action-sheet v-model="showAddressSheet" title="选择收货地址" :round="true">
|
||||
<div style="padding: 16px 0 0">
|
||||
<div
|
||||
v-for="address in addressOptions"
|
||||
:key="address.id"
|
||||
class="address-item"
|
||||
@click="selectAddress(address)"
|
||||
style="padding: 12px 16px; border-bottom: 1px solid #f0f0f0; cursor: pointer"
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start">
|
||||
<div style="flex: 1">
|
||||
<div style="font-size: 16px; font-weight: 500; color: #323233; margin-bottom: 4px">
|
||||
{{ address.userName }} {{ address.tel }}
|
||||
</div>
|
||||
<div style="font-size: 14px; color: #646566; line-height: 1.4">
|
||||
{{ address.province }}{{ address.city }}{{ address.county }}{{ address.addressDetail }}
|
||||
</div>
|
||||
</div>
|
||||
<van-tag v-if="address.isDefault" type="primary" size="mini" style="margin-left: 8px">默认</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="addressOptions.length === 0" style="text-align: center; padding: 40px 16px; color: #969799">暂无收货地址</div>
|
||||
</div>
|
||||
<div style="padding: 16px; border-top: 1px solid #f0f0f0; background: #fafafa">
|
||||
<van-button type="info" block round @click="goToAddressManage">收货地址管理</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -757,8 +785,12 @@ layout("/layouts/platform_h5.html"){
|
||||
formData: {
|
||||
userSign: "", // 用户签名
|
||||
mobile: "", // 手机号码
|
||||
address: "" // 收货地址(预留)
|
||||
}
|
||||
address: "" // 收货地址
|
||||
},
|
||||
|
||||
addressOptions: [],
|
||||
showAddressSheet: false, // 收货地址选择弹窗
|
||||
selectedAddressText: "" // 选中的收货地址显示文本
|
||||
}
|
||||
},
|
||||
|
||||
@@ -815,6 +847,11 @@ layout("/layouts/platform_h5.html"){
|
||||
if (res.code === 0) {
|
||||
this.projectInfo = res.data
|
||||
|
||||
// 获取收货地址
|
||||
if (this.projectInfo.provideMode === 3) {
|
||||
this.getAddress()
|
||||
}
|
||||
|
||||
// 初始化选项的selectNum为0
|
||||
if (this.projectInfo.options) {
|
||||
this.projectInfo.options.forEach((option) => {
|
||||
@@ -846,10 +883,16 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
} else if (this.$store.user && this.$store.user.mobile) {
|
||||
// 如果没有选择过,使用store中的默认手机号
|
||||
debugger
|
||||
this.formData.mobile = this.$store.user.mobile
|
||||
}
|
||||
|
||||
// 地址回显
|
||||
if (this.projectInfo.provideMode === 3) {
|
||||
if (this.userSelection && this.userSelection[0].receiveAddress) {
|
||||
this.formData.receiveAddress = this.userSelection[0].receiveAddress
|
||||
}
|
||||
}
|
||||
|
||||
// 设置已选择的选项
|
||||
if (this.projectInfo.options && this.userSelection.length > 0) {
|
||||
// 单选模式
|
||||
@@ -898,6 +941,12 @@ layout("/layouts/platform_h5.html"){
|
||||
return
|
||||
}
|
||||
|
||||
// 如果需要邮寄
|
||||
if (this.projectInfo.provideMode === 3 && !this.formData.receiveAddress) {
|
||||
this.$toast.fail("请填写邮寄地址")
|
||||
return
|
||||
}
|
||||
|
||||
if (this.isSubmitting) return
|
||||
this.isSubmitting = true
|
||||
|
||||
@@ -937,10 +986,10 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}
|
||||
|
||||
// 未来可扩展添加收货地址
|
||||
if (this.formData.address) {
|
||||
// 收货地址
|
||||
if (this.projectInfo.provideMode === 3 && this.formData.receiveAddress) {
|
||||
selections.forEach((selection) => {
|
||||
selection.address = this.formData.address
|
||||
selection.receiveAddress = this.formData.receiveAddress
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1082,6 +1131,18 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
|
||||
// 选择收货地址
|
||||
selectAddress(address) {
|
||||
this.formData.receiveAddress =
|
||||
address.userName + " " + address.tel + " " + address.province + address.city + address.county + address.addressDetail
|
||||
this.showAddressSheet = false
|
||||
},
|
||||
|
||||
// 跳转到地址管理页面
|
||||
goToAddressManage() {
|
||||
this.$pjaxReplace("/platform/h5/welfare/address/list")
|
||||
},
|
||||
|
||||
// 切换选项选中状态
|
||||
toggleOption(option) {
|
||||
if (this.projectInfo.isCheckBox === "radio") {
|
||||
@@ -1120,6 +1181,14 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 获取收货地址
|
||||
async getAddress() {
|
||||
const resp = await this.$axios.post("/platform/welfare/addressManage/selectUserAddress")
|
||||
if (resp.code === 0) {
|
||||
this.addressOptions = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user