Merge remote-tracking branch 'origin/main'
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)
|
||||
|
||||
@@ -228,6 +228,14 @@ 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(),
|
||||
@@ -236,10 +244,6 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
user
|
||||
);
|
||||
|
||||
if(user.getLoginname().equals("45066")){
|
||||
System.out.println("..");
|
||||
}
|
||||
|
||||
// 更新会员状态
|
||||
boolean currentIsMember = user.getMember() != null && user.getMember();
|
||||
|
||||
|
||||
@@ -170,4 +170,8 @@ public class View_user {
|
||||
|
||||
@Column
|
||||
private Date postDoctoralJoinDate;
|
||||
|
||||
private Date memberJoinTime;
|
||||
|
||||
private Date memberLeaveTime;
|
||||
}
|
||||
|
||||
+3
-3
@@ -90,6 +90,7 @@ public class ActivityBasicScopeController {
|
||||
FROM
|
||||
`vw_user` u
|
||||
LEFT JOIN sys_user_role sur on sur.userid = u.id
|
||||
LEFT JOIN club_user clubuser ON clubuser.userid=u.id
|
||||
$condition
|
||||
""");
|
||||
try {
|
||||
@@ -201,8 +202,8 @@ public class ActivityBasicScopeController {
|
||||
}
|
||||
|
||||
@At
|
||||
public Object getRoleListByMenuId(String menuId) {
|
||||
return Result.success(dao.query(Sys_role.class, Cnd.where("system_name", "=", menuId).desc("code")));
|
||||
public Object getRoleListByMenuId() {
|
||||
return Result.success(dao.query(Sys_role.class, Cnd.NEW().desc("code")));
|
||||
|
||||
}
|
||||
|
||||
@@ -350,7 +351,6 @@ public class ActivityBasicScopeController {
|
||||
cnd.andEX("u.personType", IN_OR_NIN_OP, activityUserScopePageParam.getPersonTypes());
|
||||
cnd.andEX("u.userState", IN_OR_NIN_OP, activityUserScopePageParam.getUserStates());
|
||||
cnd.andEX("u.sex", IN_OR_NIN_OP, activityUserScopePageParam.getSexTypes());
|
||||
cnd.andEX("sur.jdhid", EQ_OR_NEQ_OP, activityUserScopePageParam.getTeacherMeetingId());
|
||||
cnd.andEX("sur.roleid", IN_OR_NIN_OP, activityUserScopePageParam.getRoleIds());
|
||||
cnd.andEX("clubuser.clubid", EQ_OR_NEQ_OP, activityUserScopePageParam.getClubId());
|
||||
|
||||
|
||||
+14
-1
@@ -115,11 +115,14 @@ public class ActivityCultureApplyUserController {
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation(value = "队友搜索")
|
||||
public Result queryTeammate(@Valid String keyword) {
|
||||
public Result queryTeammate(@Valid String keyword,Integer signUpMethod) {
|
||||
Sql sql = Sqls.create("select id userId,username userName,loginname loginName,sex,mobile,unitName from vw_user $condition limit 0,10");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.or(Cnd.likeEX("username", keyword));
|
||||
cnd.or(Cnd.likeEX("loginname", keyword));
|
||||
if (signUpMethod == 3){
|
||||
cnd.and("unionid", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = activityCultureApplyUserService.listMap(sql);
|
||||
return Result.success(list);
|
||||
@@ -142,6 +145,16 @@ public class ActivityCultureApplyUserController {
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation(value = "查询分工会报名人员")
|
||||
public Result listTeamUserUnion(@Valid String activityId) {
|
||||
List<ActivityTissuePerson> list = dao.query(ActivityTissuePerson.class, Cnd.where(ActivityTissuePerson::getTissueId, "=", activityId)
|
||||
.and(ActivityTissuePerson::getApplyUserId, "=", SecurityUtil.getUserId())
|
||||
);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation(value = "是否报名")
|
||||
|
||||
+35
-24
@@ -129,8 +129,9 @@ public class ActivityCultureApplyUserServiceImpl extends BaseServiceImpl<Activit
|
||||
//总人数限制
|
||||
if (tissue.getUserNumberLimit() == 1) {
|
||||
Integer totalUserNumberLimit = tissue.getTotalUserNumberLimit();
|
||||
int hasRegisterCount = count(Cnd.where(ActivityTissuePerson::getTissueId, "=", activityId));
|
||||
if (!(totalUserNumberLimit - hasRegisterCount > 0)) {
|
||||
int hasRegisterCount = count(Cnd.where(ActivityTissuePerson::getTissueId, "=", activityId)
|
||||
.and(ActivityTissuePerson::getUserId, "not in", personIds));
|
||||
if (personIds.size() + hasRegisterCount > totalUserNumberLimit) {
|
||||
throw new BaseException("报名名额已满!");
|
||||
}
|
||||
}
|
||||
@@ -139,19 +140,18 @@ public class ActivityCultureApplyUserServiceImpl extends BaseServiceImpl<Activit
|
||||
if (tissue.getUserNumberLimit() == 2) {
|
||||
int limitNumByUnion = getLimitNumByUnion(tissue.getUnionUserNumberLimit(), SecurityUtil.getUnionId());
|
||||
//获取当前该分工会已报多少人
|
||||
Sql sql = Sqls.create("""
|
||||
/*Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
activity_tissue_person atp
|
||||
LEFT JOIN `vw_user` u ON u.id = atp.userId
|
||||
WHERE
|
||||
atp.tissueId = @activityId
|
||||
AND u.unionid = @unionId
|
||||
AND atp.unionId = @unionId
|
||||
""");
|
||||
sql.setParam("activityId", activityId).setParam("unionId", SecurityUtil.getUnionId());
|
||||
int hasRegisterCount = count(sql);
|
||||
if (!(limitNumByUnion - hasRegisterCount > 0)) {
|
||||
int hasRegisterCount = count(sql);*/
|
||||
if (personIds.size() > limitNumByUnion) {
|
||||
throw new BaseException("该分工会报名名额已满!");
|
||||
}
|
||||
}
|
||||
@@ -202,6 +202,8 @@ public class ActivityCultureApplyUserServiceImpl extends BaseServiceImpl<Activit
|
||||
mobile,
|
||||
unitName,
|
||||
unionName,
|
||||
unionId,
|
||||
unitId,
|
||||
'$activityId' AS tissueId,
|
||||
'$applyUserId' AS applyUserId,
|
||||
'$applyUserUserName' AS applyUserUserName,
|
||||
@@ -221,23 +223,32 @@ public class ActivityCultureApplyUserServiceImpl extends BaseServiceImpl<Activit
|
||||
//分工会报名独有判断
|
||||
//判断总人数限制
|
||||
//判断分工会人数限制
|
||||
View_user user = dao().fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId()));
|
||||
ActivityTissuePerson activityTissuePerson = new ActivityTissuePerson();
|
||||
activityTissuePerson.setTissueId(activityId);
|
||||
activityTissuePerson.setUserId(user.getId());
|
||||
activityTissuePerson.setUserName(user.getUsername());
|
||||
activityTissuePerson.setLoginName(user.getLoginname());
|
||||
activityTissuePerson.setSex(user.getSex());
|
||||
activityTissuePerson.setMobile(user.getMobile());
|
||||
activityTissuePerson.setUnitId(user.getUnitId());
|
||||
activityTissuePerson.setUnitName(user.getUnitName());
|
||||
activityTissuePerson.setUnionId(user.getUnionId());
|
||||
activityTissuePerson.setUnionName(user.getUnionName());
|
||||
activityTissuePerson.setApplyDateTime(DateUtil.now());
|
||||
activityTissuePerson.setApplyUserId(user.getId());
|
||||
activityTissuePerson.setApplyUserUserName(user.getUsername());
|
||||
activityTissuePerson.setDynamicFormData(dynamicFormParam);
|
||||
insert(activityTissuePerson);
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id AS userId,
|
||||
username AS userName,
|
||||
loginname AS loginName,
|
||||
sex,
|
||||
mobile,
|
||||
unitName,
|
||||
unionName,
|
||||
unionId,
|
||||
unitId,
|
||||
'$activityId' AS tissueId,
|
||||
'$applyUserId' AS applyUserId,
|
||||
'$applyUserUserName' AS applyUserUserName,
|
||||
'$applyDateTime' AS applyDateTime
|
||||
FROM
|
||||
`vw_user`
|
||||
$condition
|
||||
""");
|
||||
sql.setVar("activityId", activityId);
|
||||
sql.setVar("applyUserId", SecurityUtil.getUserId());
|
||||
sql.setVar("applyDateTime", DateUtil.now());
|
||||
sql.setVar("applyUserUserName", SecurityUtil.getUserUsername());
|
||||
sql.setCondition(Cnd.where("id", "in", personIds));
|
||||
List<ActivityTissuePerson> fullPersonList = listEntity(sql);
|
||||
insert(fullPersonList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolApply;
|
||||
import com.budwk.app.zhgh.activity.sports.param.ActivitySportsApplyUserPageParam;
|
||||
import com.budwk.app.zhgh.activity.sports.service.ActivitySportsApplyUserService;
|
||||
@@ -13,6 +14,7 @@ import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -222,4 +224,24 @@ public class ActivitySportsApplyUserController {
|
||||
return Result.success(applyList);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("activity.apply")
|
||||
public Result getSysUser(String queryString,String[] loginnames){
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("loginname", "not in", loginnames);
|
||||
if (StrUtil.isNotBlank(queryString)) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.andLike("username", queryString).orLike("loginname", queryString);
|
||||
cnd.and(group);
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("select id,loginname,username,sex,mobile,unitId,birthday,idcard from `vw_user` $condition LIMIT 30");
|
||||
sql.setCondition(cnd);
|
||||
sql.setCallback(Sqls.callback.entities());
|
||||
sql.setEntity(activitySportsApplyUserService.getEntity());
|
||||
List<Sys_user> list = dao.execute(sql).getList(Sys_user.class);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+158
@@ -1,17 +1,35 @@
|
||||
package com.budwk.app.zhgh.activity.sports.h5Controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.activity.basic.models.ActivityBasicUnion;
|
||||
import com.budwk.app.zhgh.activity.basic.models.ActivityBasicUnit;
|
||||
import com.budwk.app.zhgh.activity.basic.models.ActivityEvent;
|
||||
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchool;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolApply;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolEvent;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolTeam;
|
||||
import com.budwk.app.zhgh.activity.sports.param.ActivitySportsApplyUserPageParam;
|
||||
import com.budwk.app.zhgh.activity.sports.service.ActivitySportsApplyUserService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName H5ActivitySportsApplyUserController
|
||||
@@ -26,6 +44,9 @@ public class H5ActivitySportsApplyUserController {
|
||||
@Inject
|
||||
private ActivitySportsApplyUserService activitySportsApplyUserService;
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@At("/applyUser")
|
||||
@Ok("beetl:platform/zhghh5/activity/sports/applyUser.html")
|
||||
@SaCheckPermission("h5.activity.sports.applyUser")
|
||||
@@ -60,5 +81,142 @@ public class H5ActivitySportsApplyUserController {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("h5.activity.sports.applyUser")
|
||||
public Result signUpUser(@Valid String activityId, @Valid String eventId, @Valid String schoolEventId, @Valid String teamId) {
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where(View_user::getId, "=", SecurityUtil.getUserId()));
|
||||
ActivitySchoolEvent schoolEvent = dao.fetch(ActivitySchoolEvent.class, schoolEventId);
|
||||
ActivityEvent activityEvent = dao.fetch(ActivityEvent.class, eventId);
|
||||
ActivitySchool activitySchool = dao.fetch(ActivitySchool.class, activityId);
|
||||
ActivitySchoolTeam schoolTeam = dao.fetch(ActivitySchoolTeam.class, teamId);
|
||||
|
||||
ActivityBasicUnit basicUnit = dao.fetch(ActivityBasicUnit.class, Cnd.where("id", "=", SecurityUtil.getUnitId()));
|
||||
ActivityBasicUnion basicUnion = dao.fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionId()));
|
||||
if (Lang.isEmpty(basicUnion)) {
|
||||
return Result.error("请先设置活动工会");
|
||||
}
|
||||
|
||||
|
||||
//判断是否在活动组别内
|
||||
int count = dao.count(ActivityUserScope.class,
|
||||
Cnd.where(ActivityUserScope::getGroupId, "=", activitySchool.getActivityGroupId())
|
||||
.and(ActivityUserScope::getUserId, "=", SecurityUtil.getUserId()));
|
||||
if (count == 0) {
|
||||
return Result.error("您没有权限参与该活动");
|
||||
}
|
||||
//如果不等于空代表是个人项目
|
||||
if (ObjectUtil.isNotEmpty(activityEvent.getIsMenWomen())) {
|
||||
if (activityEvent.getIsMenWomen() == 1 && !user.getSex().equals("男")) {
|
||||
return Result.error("当前项目只能男性能报名!");
|
||||
}
|
||||
if (activityEvent.getIsMenWomen() == 2 && !user.getSex().equals("女")) {
|
||||
return Result.error("当前项目只能女性能报名!");
|
||||
}
|
||||
}
|
||||
List<ActivitySchoolApply> schoolApplyList = dao.query(ActivitySchoolApply.class,
|
||||
Cnd.where(ActivitySchoolApply::getActivityId, "=", activityId)
|
||||
.and(ActivitySchoolApply::getEventId, "=", eventId)
|
||||
.and(ActivitySchoolApply::getActivityUnionId, "=", basicUnit.getId())
|
||||
.and(ActivitySchoolApply::getApplyUser, "!=", SecurityUtil.getUserId()));
|
||||
|
||||
|
||||
if (ObjectUtil.isNotEmpty(schoolEvent.getRestrictGirlNum()) && user.getSex().equals("女")) {
|
||||
if (schoolEvent.getRestrictGirlNum() == 0) {
|
||||
return Result.error("当前项目女性没有报名名额!");
|
||||
}
|
||||
//找出当前工会女性报名的数量
|
||||
int size = schoolApplyList.stream().filter(girl -> girl.getSex().equals("女")).toList().size();
|
||||
//数量加上自己如果大于配置的
|
||||
if (size + 1 > schoolEvent.getRestrictGirlNum()) {
|
||||
return Result.error("当前项目女性只能报名" + schoolEvent.getRestrictGirlNum() + "人!");
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(schoolEvent.getRestrictBoyNum()) && user.getSex().equals("男")) {
|
||||
if (schoolEvent.getRestrictBoyNum() == 0) {
|
||||
return Result.error("当前项目男性没有报名名额!");
|
||||
}
|
||||
//找出当前工会男性报名的数量
|
||||
int size = schoolApplyList.stream().filter(girl -> girl.getSex().equals("男")).toList().size();
|
||||
//数量加上自己如果大于配置的
|
||||
if (size + 1 > schoolEvent.getRestrictBoyNum()) {
|
||||
return Result.error("当前项目男性只能报名" + schoolEvent.getRestrictGirlNum() + "人!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ObjectUtil.isNotEmpty(schoolEvent.getStartAgeDate()) && ObjectUtil.isNotEmpty(schoolEvent.getEndAgeDate())) {
|
||||
//如果年龄做了判断
|
||||
try {
|
||||
if (ObjectUtil.isEmpty(user.getBirthday())) {
|
||||
return Result.error("请先完善您的出生日期");
|
||||
}
|
||||
// 需要先将字符串转换为日期进行比较
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date startAgeDate = sdf.parse(schoolEvent.getStartAgeDate());
|
||||
Date endAgeDate = sdf.parse(schoolEvent.getEndAgeDate());
|
||||
if (user.getBirthday().getTime() < startAgeDate.getTime() || user.getBirthday().getTime() > endAgeDate.getTime()) {
|
||||
return Result.error("您年龄不在报名时间段内");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return Result.error("年龄格式解析错误");
|
||||
}
|
||||
}
|
||||
|
||||
ActivitySchoolApply schoolApply = new ActivitySchoolApply();
|
||||
schoolApply.setActivityId(activityId);
|
||||
schoolApply.setEventId(eventId);
|
||||
schoolApply.setUnionname(user.getUnionName());
|
||||
schoolApply.setAwardsMode(activityEvent.getProjectType());
|
||||
schoolApply.setUnitId(user.getUnitId());
|
||||
schoolApply.setUnionId(user.getUnionId());
|
||||
schoolApply.setActivityUnionId(basicUnion.getId());
|
||||
schoolApply.setActivityUnionName(basicUnion.getName());
|
||||
schoolApply.setUserId(SecurityUtil.getUserId());
|
||||
schoolApply.setApplyUser(SecurityUtil.getUserId());
|
||||
schoolApply.setBirthday(ObjectUtil.isNotEmpty(user.getBirthday()) ? String.valueOf(user.getBirthday()) : null);
|
||||
schoolApply.setApplyDate(DateUtil.now());
|
||||
schoolApply.setIdentity(List.of("1"));
|
||||
if (activitySchool.getApplyWay().size() == 2 && activitySchool.getApplyWay().contains(1)) {
|
||||
schoolApply.setStatus(0);
|
||||
} else if (activitySchool.getApplyWay().size() == 1 && activitySchool.getApplyWay().contains(1)) {
|
||||
schoolApply.setStatus(2);
|
||||
}
|
||||
schoolApply.setUnitname(user.getUnitName());
|
||||
schoolApply.setTeamId(schoolTeam.getId());
|
||||
schoolApply.setTeam(schoolTeam.getName());
|
||||
schoolApply.setLoginname(user.getLoginname());
|
||||
schoolApply.setUsername(user.getUsername());
|
||||
schoolApply.setMobile(user.getMobile());
|
||||
schoolApply.setSex(user.getSex());
|
||||
dao.insert(schoolApply);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("h5.activity.sports.applyUser")
|
||||
public Result cancelApply(@Valid String activityId, @Valid String eventId, @Valid String schoolEventId) {
|
||||
int count = dao.count(ActivitySchoolApply.class,
|
||||
Cnd.where(ActivitySchoolApply::getUserId, "=", SecurityUtil.getUserId())
|
||||
.and(ActivitySchoolApply::getActivityId, "=", activityId)
|
||||
.and(ActivitySchoolApply::getEventId, "=", eventId).and(ActivitySchoolApply::getStatus, "=", 2));
|
||||
if (count > 0) {
|
||||
return Result.error("您已报名成功无法取消,请联系管理员取消!");
|
||||
}
|
||||
|
||||
dao.clear(ActivitySchoolApply.class, Cnd.where(ActivitySchoolApply::getUserId, "=", SecurityUtil.getUserId())
|
||||
.and(ActivitySchoolApply::getActivityId, "=", activityId).and(ActivitySchoolApply::getEventId, "=", eventId));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("h5.activity.sports.applyUser")
|
||||
public Result listTeamList(@Valid String activityId, @Valid String eventId) {
|
||||
return Result.success(dao.query(ActivitySchoolTeam.class, Cnd.where(ActivitySchoolTeam::getActivityId, "=", activityId)
|
||||
.and(ActivitySchoolTeam::getEventId, "=", eventId).asc(ActivitySchoolTeam::getLocation)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
@Data
|
||||
@Comment("体育活动")
|
||||
@Table("activity_school")
|
||||
public class ActivitySchool extends BaseModel implements Serializable , SysHomeConvert {
|
||||
public class ActivitySchool extends BaseModel implements Serializable, SysHomeConvert {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@@ -171,7 +171,7 @@ public class ActivitySchool extends BaseModel implements Serializable , SysHomeC
|
||||
|
||||
@Column
|
||||
@Comment("小程序活动封面")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String image;
|
||||
|
||||
@Many(field = "activityId")
|
||||
@@ -205,7 +205,11 @@ public class ActivitySchool extends BaseModel implements Serializable , SysHomeC
|
||||
sysHomeActivity.setName(this.getName());
|
||||
sysHomeActivity.setCover(this.getImage());
|
||||
sysHomeActivity.setUrl("/platform/activity/apply");
|
||||
sysHomeActivity.setH5Url(null);
|
||||
if (this.applyWay.contains(2)) {
|
||||
sysHomeActivity.setH5Url("/platform/h5/activity/apply/applyUser?activityId=" + this.getId());
|
||||
} else {
|
||||
sysHomeActivity.setH5Url(null);
|
||||
}
|
||||
sysHomeActivity.setStartDate(DateUtil.parseDate(this.getApplyStartTime()));
|
||||
sysHomeActivity.setEndDate(DateUtil.parseDate(this.getApplyEndTime()));
|
||||
sysHomeActivity.setAllowUserGroupId(this.getActivityGroupId());
|
||||
|
||||
+11
-2
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.activity.sports.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
@@ -53,6 +54,9 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
public String getUnionId() {
|
||||
ActivityBasicUnit basicUnit = dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", SecurityUtil.getUnitId()));
|
||||
ActivityBasicUnion basicUnion = dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionId()));
|
||||
if (Lang.isEmpty(basicUnion)) {
|
||||
throw new RuntimeException("请先设置活动工会");
|
||||
}
|
||||
|
||||
return StrUtil.isBlank(SecurityUtil.getUnitId()) ? "" : basicUnion.getId();
|
||||
}
|
||||
@@ -77,8 +81,10 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
eve.projectType eveProjectType,
|
||||
eve.isMenWomen,
|
||||
apply.`status`,
|
||||
apply2.`status` status2,
|
||||
IF (sum(apply.`status`=2) IS NULL, 0, sum(apply.`status`=2)) AS successUserApply,
|
||||
count(apply.id) userApply,
|
||||
count(apply2.id) userApply2,
|
||||
apply.applyUser,
|
||||
(SELECT ast.`name` FROM activity_school_apply app LEFT JOIN activity_school_team ast ON ast.id = app.teamId WHERE app.eventId = ase.eventId AND app.activityId = ase.activityId AND app.userId = @userId) activityTeamName,
|
||||
(select GROUP_CONCAT(username) FROM activity_school_apply WHERE status=2 and eventId = ase.eventId
|
||||
@@ -92,6 +98,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
LEFT JOIN activity_event eve ON ase.eventId=eve.id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.id=eve.competitionCategory
|
||||
LEFT JOIN activity_school_apply apply ON apply.activityId=ase.activityId AND apply.eventId=ase.eventId AND (applyUser=@userId or userId=@userId)
|
||||
LEFT JOIN activity_school_apply apply2 ON apply2.activityId=ase.activityId AND apply2.eventId=ase.eventId AND apply2.userId=@userId
|
||||
$condition
|
||||
""").setParam("unionId", pageParam.getUnionId()).setParam("userId", SecurityUtil.getUserId());
|
||||
|
||||
@@ -179,7 +186,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
// cnd.and(new Static("JSON_CONTAINS(school.applyWay,JSON_ARRAY( 1))>0"));
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(SecurityUtil.getUserId())));
|
||||
}
|
||||
cnd.and("YEAR(school.applyStartTime)", "=", year);
|
||||
cnd.andEX("YEAR(school.applyStartTime)", "=", year);
|
||||
cnd.desc("school.applyStartTime");
|
||||
|
||||
sql.setCondition(cnd);
|
||||
@@ -339,7 +346,8 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
List<ActivitySchoolApply> awardsModeG = list.stream().filter(v -> v.getAwardsMode().equals("1")).collect(Collectors.toList());
|
||||
|
||||
list.forEach(v -> {
|
||||
if (Strings.isNotBlank(v.getBirthday())) {
|
||||
if (ObjectUtil.isNotEmpty(v.getBirthday())) {
|
||||
String birthday = v.getBirthday();
|
||||
v.setAge(cn.hutool.core.date.DateUtil.ageOfNow(v.getBirthday()));
|
||||
}
|
||||
});
|
||||
@@ -372,6 +380,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
apply.setApplyUser(SecurityUtil.getUserId());
|
||||
apply.setStatus(pass ? 2 : 0);
|
||||
apply.setApplyDate(DateUtil.now());
|
||||
apply.setUnitId(basicUnit.getId());
|
||||
apply.setActivityUnionId(basicUnion.getId());
|
||||
apply.setActivityUnionName(basicUnion.getName());
|
||||
}
|
||||
|
||||
+2
-1
@@ -49,10 +49,11 @@ public class RestActController {
|
||||
@ApiOperation("活动列表")
|
||||
public Result pageData(@Valid PageForm pageForm, Integer year) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("year", "=", year);
|
||||
cnd.andEX("YEAR(startTime)", "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.where().andLike(RestAct::getName, pageForm.getSearchKeyword());
|
||||
}
|
||||
cnd.desc("signUpStartTime");
|
||||
Pagination pagination = restActService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
+10
-1
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.dayofficework.rest.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
@@ -50,13 +51,21 @@ public class RestBranchSignUpController {
|
||||
@At
|
||||
@SaCheckPermission("rest.branchUnionSignUp")
|
||||
@ApiOperation("分页查询")
|
||||
public Result pageData(@Valid PageForm pageForm) {
|
||||
public Result pageData(@Valid PageForm pageForm, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
r.*
|
||||
FROM
|
||||
rest r
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("YEAR(r.startTime)", "=", year);
|
||||
cnd.desc("r.signUpStartTime");
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.where().andLike("r.name", pageForm.getSearchKeyword());
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = restActService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
+30
-7
@@ -10,6 +10,7 @@ import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.dayofficework.warmthCondolence.models.WarmthCondolence;
|
||||
import com.budwk.app.zhgh.dayofficework.warmthCondolence.models.WarmthCondolenceNotice;
|
||||
import com.budwk.app.zhgh.dayofficework.warmthCondolence.service.WarmthCondolenceService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -18,6 +19,7 @@ import org.nutz.dao.Cnd;
|
||||
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.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
@@ -41,17 +43,28 @@ public class WarmthCondolenceApplyController {
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/warmthCondolence/apply/index.html")
|
||||
@SaCheckPermission("warmthCondolence.apply")
|
||||
public void index(){}
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("warmthCondolence.apply")
|
||||
@ApiOperation("保存")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(type = "warmthCondolenceApply", tag = "保存慰问申请", msg = "保存慰问申请")
|
||||
public Result save(@Param("warmthCondolence")WarmthCondolence warmthCondolence){
|
||||
public Result save(@Param("warmthCondolence") WarmthCondolence warmthCondolence) {
|
||||
WarmthCondolenceNotice notice = warmthCondolenceService.dao().fetch(WarmthCondolenceNotice.class, warmthCondolence.getNoticeId());
|
||||
if (Lang.isEmpty(notice)) {
|
||||
return Result.error("未找到申请事项");
|
||||
}
|
||||
if(notice.getStartTime().getTime() > System.currentTimeMillis()){
|
||||
return Result.error("申请事项未开始");
|
||||
}
|
||||
if(notice.getEndTime().getTime() < System.currentTimeMillis()){
|
||||
return Result.error("申请事项已结束");
|
||||
}
|
||||
warmthCondolence.setNo(warmthCondolenceService.createNo(warmthCondolence));
|
||||
warmthCondolenceService.insertOrUpdate(warmthCondolence);
|
||||
bpmService.startSaveProcessInstance(BpmProcessConstant.WARMTH_CONDOLENCE.name(), warmthCondolence.getUserName()+"的申请", warmthCondolence.getId(), null);
|
||||
bpmService.startSaveProcessInstance(BpmProcessConstant.WARMTH_CONDOLENCE.name(), warmthCondolence.getUserName() + "的申请", warmthCondolence.getId(), null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@@ -60,22 +73,32 @@ public class WarmthCondolenceApplyController {
|
||||
@ApiOperation("提交")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "送温暖慰问申请", msg = "送温暖慰问申请")
|
||||
public Result submit(@Param("warmthCondolence")@Valid WarmthCondolence warmthCondolence){
|
||||
public Result submit(@Param("warmthCondolence") @Valid WarmthCondolence warmthCondolence) {
|
||||
WarmthCondolenceNotice notice = warmthCondolenceService.dao().fetch(WarmthCondolenceNotice.class, warmthCondolence.getNoticeId());
|
||||
if (Lang.isEmpty(notice)) {
|
||||
return Result.error("未找到申请事项");
|
||||
}
|
||||
if(notice.getStartTime().getTime() > System.currentTimeMillis()){
|
||||
return Result.error("申请事项未开始");
|
||||
}
|
||||
if(notice.getEndTime().getTime() < System.currentTimeMillis()){
|
||||
return Result.error("申请事项已结束");
|
||||
}
|
||||
warmthCondolence.setNo(warmthCondolenceService.createNo(warmthCondolence));
|
||||
warmthCondolenceService.insertOrUpdate(warmthCondolence);
|
||||
//查询分工会审批人工号
|
||||
String branchUnionApprovalLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.BRANCH_UNION_CHAIRMAN, Cnd.where(Sys_user_role::getUnionId, "=", warmthCondolence.getUnionId()));
|
||||
if(StrUtil.isBlank(branchUnionApprovalLoginName)){
|
||||
if (StrUtil.isBlank(branchUnionApprovalLoginName)) {
|
||||
return Result.error("分工会未配置审批人,请联系校工会!");
|
||||
}
|
||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.WARMTH_CONDOLENCE.name(), warmthCondolence.getUserName()+"的申请", warmthCondolence.getId(), List.of(branchUnionApprovalLoginName),null);
|
||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.WARMTH_CONDOLENCE.name(), warmthCondolence.getUserName() + "的申请", warmthCondolence.getId(), List.of(branchUnionApprovalLoginName), null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("warmthCondolence.apply")
|
||||
@ApiOperation("详情")
|
||||
public Result info(@Valid String id){
|
||||
public Result info(@Valid String id) {
|
||||
WarmthCondolence condolence = warmthCondolenceService.fetch(id);
|
||||
return Result.success(condolence);
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class WarmthCondolenceCommonController {
|
||||
@SaCheckPermission("warmthCondolence")
|
||||
public Result listNotice(){
|
||||
List<WarmthCondolenceNotice> list = warmthCondolenceNoticeService.query(Cnd.where(WarmthCondolenceNotice::getEnable, "=", 1)
|
||||
.asc(WarmthCondolenceNotice::getStartTime));
|
||||
.desc(WarmthCondolenceNotice::getStartTime));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
+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());
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,8 +34,8 @@ const ACTIVITY_CULTURE_APPLY_USER = {
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="活动列表">
|
||||
<el-radio-group v-model="pageForm.isEnrolled" @change="doSearch" size="mini" class="ml10">
|
||||
<el-radio-button :label="false">未报名</el-radio-button>
|
||||
<el-radio-button :label="true">已报名</el-radio-button>
|
||||
<el-radio-button :label="false">未报名</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
|
||||
|
||||
@@ -210,8 +210,9 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
}
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.editInfo.findOne(row.id)
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.$refs.editInfo.findOne(row.id)
|
||||
})
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
username: this.$store.state.user.username,
|
||||
@@ -220,8 +221,9 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
},
|
||||
openView(row) {
|
||||
const { id } = row
|
||||
this.$refs.guava.view()
|
||||
this.$refs.infoActivity.findOne(id)
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.infoActivity.findOne(id)
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
|
||||
@@ -42,8 +42,8 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名方式">
|
||||
<span v-if="viewData.signUpMethod===1">个人报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">分工会报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
|
||||
<span v-else-if="!viewData.signUpMethod">无需报名</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否用于报名">
|
||||
|
||||
@@ -42,8 +42,8 @@ const singleSignUp = {
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名方式">
|
||||
<span v-if="viewData.signUpMethod===1">个人报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">分工会报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
|
||||
<span v-else-if="!viewData.signUpMethod">无需报名</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否用于报名">
|
||||
@@ -153,7 +153,47 @@ const singleSignUp = {
|
||||
</div>
|
||||
<!-- 分工会报名-->
|
||||
<div v-else-if="viewData.signUpMethod===3">
|
||||
<div class="process-title">选择报名人员
|
||||
<span v-if="viewData.userNumberLimit===2">
|
||||
,报名人数 <span style="color: red">
|
||||
{{viewData.unionTeamNum}}</span>人
|
||||
</span>
|
||||
</div>
|
||||
<el-select
|
||||
v-if="inApplyTime"
|
||||
v-model="searchTeammateUserId"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入关键词"
|
||||
:remote-method="queryTeammate">
|
||||
<el-option
|
||||
v-for="item in teammateOptions"
|
||||
:key="item.userId"
|
||||
:label="item.userName + '(' + item.loginName + ')'"
|
||||
:value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button v-if="inApplyTime" class="ml5" type="primary" icon="el-icon-plus"
|
||||
@click="addTeamUser">添加
|
||||
</el-button>
|
||||
|
||||
<el-table :data="teamUsers" class="mt10">
|
||||
<el-table-column label="序号" type="index" width="60px"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
||||
<el-table-column prop="mobile" label="手机号"></el-table-column>
|
||||
<el-table-column label="操作" width="100px"
|
||||
v-if="inApplyTime">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" @click="removeTeamUser(scope.$index)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<!-- 表单填写-->
|
||||
@@ -242,6 +282,17 @@ const singleSignUp = {
|
||||
}
|
||||
})
|
||||
},
|
||||
//查询报名人员
|
||||
listTeamUserUnion() {
|
||||
this.$axios.post("/platform/activity/culture/applyUser/listTeamUserUnion", {activityId: this.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.isSignUp = res.data.length > 0
|
||||
this.teamUsers = res.data
|
||||
this.defaultAddSelf()
|
||||
this.customFormInit()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//表单回显
|
||||
customFormInit() {
|
||||
@@ -300,14 +351,14 @@ const singleSignUp = {
|
||||
|
||||
//分工会
|
||||
if (this.viewData.signUpMethod === 3) {
|
||||
// if (this.teamUsers.length === 0) {
|
||||
// this.$message.warning("请添加报名人员后再提交!")
|
||||
// return
|
||||
// }
|
||||
// if (this.teamUsers.length > this.viewData.teamNum) {
|
||||
// this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!")
|
||||
// return
|
||||
// }
|
||||
if (this.teamUsers.length === 0) {
|
||||
this.$message.warning("请添加报名人员后再提交!")
|
||||
return
|
||||
}
|
||||
if (this.viewData.teamNum && this.teamUsers.length > this.viewData.teamNum) {
|
||||
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let formData = {
|
||||
@@ -368,7 +419,7 @@ const singleSignUp = {
|
||||
this.$message.warning("请添加报名人员后再提交!")
|
||||
return
|
||||
}
|
||||
if (this.teamUsers.length > this.viewData.teamNum) {
|
||||
if (this.viewData.teamNum && this.teamUsers.length > this.viewData.teamNum) {
|
||||
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!")
|
||||
return
|
||||
}
|
||||
@@ -420,7 +471,10 @@ const singleSignUp = {
|
||||
//查询队友信息
|
||||
queryTeammate(val) {
|
||||
if (val) {
|
||||
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {keyword: val}).then((res) => {
|
||||
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {
|
||||
keyword: val,
|
||||
signUpMethod: this.viewData.signUpMethod
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
res.data.map(v => v.applyUserId = this.$store.state.user.id)
|
||||
this.teammateOptions = res.data
|
||||
@@ -439,7 +493,7 @@ const singleSignUp = {
|
||||
this.$message.error("请勿重复添加")
|
||||
return
|
||||
}
|
||||
if (this.teamUsers.length >= this.viewData.teamNum) {
|
||||
if (this.viewData.teamNum && this.teamUsers.length >= this.viewData.teamNum) {
|
||||
this.$message.error("已满员")
|
||||
return
|
||||
}
|
||||
@@ -457,11 +511,22 @@ const singleSignUp = {
|
||||
this.$axios.post("/platform/activity/culture/infoManage/activityInfo", {id: this.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
//总人数限制
|
||||
if (this.viewData.userNumberLimit === 1) {
|
||||
} else if (this.viewData.userNumberLimit === 2) {
|
||||
//分工会人数限制
|
||||
const union = this.viewData.unionUserNumberLimit.find(v => v.id === this.$store.state.user.union.id)
|
||||
this.viewData.unionTeamNum = union.limitNum
|
||||
}
|
||||
if (this.viewData.signUpMethod === 3) {
|
||||
this.listTeamUserUnion()
|
||||
} else {
|
||||
this.listTeamUser()
|
||||
}
|
||||
if (this.viewData.formConfig) {
|
||||
this.formCreateRule = formCreate.parseJson(this.viewData.formConfig.rule)
|
||||
this.formCreateOption = formCreate.parseJson(this.viewData.formConfig.options)
|
||||
}
|
||||
this.listTeamUser()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -12,225 +12,319 @@ const groupBy = (list, fn) => {
|
||||
})
|
||||
}
|
||||
var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-tabs tab-position="top" v-model="activeName">
|
||||
<el-tab-pane :label="activityTableData.allName" name="1">
|
||||
<el-card>
|
||||
<el-transfer
|
||||
:data="leftApplyUserList"
|
||||
:filter-method="filterMethod"
|
||||
:props="{key: 'id',label: 'name'}"
|
||||
:titles="['可报人员名单', '当前选择']"
|
||||
filterable
|
||||
ref="transfer"
|
||||
v-model="rightApplyUserList">
|
||||
<template #right-footer>
|
||||
<div class="transfer">
|
||||
<el-select :clearable="false"
|
||||
@change="flushApplyUser(applyUserList)"
|
||||
placeholder="队伍"
|
||||
size="small"
|
||||
v-if="activityTableData.eveProjectType=='2'"
|
||||
v-model="applyFromData.teamId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in teamList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button @click="applyUser" icon="el-icon-plus"
|
||||
size="small"
|
||||
type="primary">
|
||||
参加比赛
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-transfer>
|
||||
template: `
|
||||
<div style="margin: 20px">
|
||||
<el-tabs tab-position="top" v-model="activeName">
|
||||
<el-tab-pane :label="activityTableData.allName" name="1">
|
||||
<el-card>
|
||||
<el-transfer
|
||||
:data="leftApplyUserList"
|
||||
:filter-method="filterMethod"
|
||||
:props="{key: 'id',label: 'name'}"
|
||||
:titles="['可报人员名单', '当前选择']"
|
||||
filterable
|
||||
ref="transfer"
|
||||
v-model="rightApplyUserList">
|
||||
<template #right-footer>
|
||||
<div class="transfer">
|
||||
<el-select :clearable="false"
|
||||
@change="flushApplyUser(applyUserList)"
|
||||
placeholder="队伍"
|
||||
size="small"
|
||||
v-if="activityTableData.eveProjectType=='2'"
|
||||
v-model="applyFromData.teamId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in teamList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button @click="applyUser" icon="el-icon-plus"
|
||||
size="small"
|
||||
type="primary">
|
||||
参加比赛
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-transfer>
|
||||
|
||||
<!-- 个人项目-->
|
||||
<template v-if="activityTableData.eveProjectType==='1'">
|
||||
<div style="display: flex;margin: 20px 0">
|
||||
<el-divider content-position="left">
|
||||
单项报名人数最多{{activityTableData.athleteMaxNum}}
|
||||
人,该队已有{{applyUserTableData.length}}
|
||||
名成员,还可报名{{activityTableData.athleteMaxNum-applyUserTableData.length}}
|
||||
人
|
||||
。
|
||||
</el-divider>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 团体项目-->
|
||||
<template v-if="activityTableData.eveProjectType==='2'">
|
||||
<!-- 如果是只需要报领队 -->
|
||||
<div style="display: flex;margin: 20px 0;align-items: center;"
|
||||
v-if="activityTableData.isLeader">
|
||||
<el-divider content-position="left">每支队伍最少运动员人数
|
||||
{{activityTableData.restrictMaxNum}} 人,最多
|
||||
{{activityTableData.restrictMaxNum}} 人,该队运动员已有
|
||||
{{activityTableData.athleteMaxNum}} 名成员,还可报名
|
||||
{{activityTableData.restrictMaxNum-applyUserTableData.filter(v=>v.identity.includes('1')).length}}
|
||||
人。
|
||||
</el-divider>
|
||||
</div>
|
||||
<!--如果是正常报名-->
|
||||
<template v-if="!activityTableData.isLeader">
|
||||
<div style="display: flex;margin: 20px 0;align-items: center;">
|
||||
<el-divider content-position="left">每支队伍最多
|
||||
{{activityTableData.restrictMaxNum}}
|
||||
人,其中领队{{activityTableData.leanderNum}}人,
|
||||
教练{{activityTableData.coachNum}}人,
|
||||
运动员必须设置{{activityTableData.athleteMaxNum}}人,
|
||||
替补{{activityTableData.substituteNum}}人。
|
||||
男运动员最少{{activityTableData.restrictBoyNum?activityTableData.restrictBoyNum:'0'}}人,
|
||||
女运动员最少{{activityTableData.restrictGirlNum?activityTableData.restrictGirlNum:'0'}}人【该队运动员已有
|
||||
{{applyUserTableData.filter(v=>v.identity.includes('1')).length}}
|
||||
人,还可报名
|
||||
{{activityTableData.athleteMaxNum-applyUserTableData.filter(v=>v.identity.includes('1')).length}}人;
|
||||
替补还可以报{{activityTableData.substituteNum-applyUserTableData.filter(v=>v.identity.includes('5')).length}}人(非必需)】
|
||||
</el-divider>
|
||||
</div>
|
||||
<el-button @click="setUserRole('4')"
|
||||
icon="el-icon-check"
|
||||
plain
|
||||
size="small" type="primary"
|
||||
v-if="activityTableData.deputyDirectorNum>0">
|
||||
设置处级领导
|
||||
</el-button>
|
||||
<el-button @click="setUserRole('3')" icon="el-icon-check" plain
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="activityTableData.leanderNum>0">设置领队
|
||||
</el-button>
|
||||
<el-button @click="setUserRole('2')" icon="el-icon-check" plain
|
||||
size="small" type="primary"
|
||||
v-if="activityTableData.coachNum>0">
|
||||
设置教练
|
||||
</el-button>
|
||||
<!-- 个人项目-->
|
||||
<template v-if="activityTableData.eveProjectType==='1'">
|
||||
<div style="display: flex;margin: 20px 0">
|
||||
<el-divider content-position="left">
|
||||
单项报名人数最多{{activityTableData.athleteMaxNum}}
|
||||
人,该队已有{{applyUserTableData.length}}
|
||||
名成员,还可报名{{activityTableData.athleteMaxNum-applyUserTableData.length}}
|
||||
人
|
||||
。
|
||||
</el-divider>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 团体项目-->
|
||||
<template v-if="activityTableData.eveProjectType==='2'">
|
||||
<!-- 如果是只需要报领队 -->
|
||||
<div style="display: flex;margin: 20px 0;align-items: center;"
|
||||
v-if="activityTableData.isLeader">
|
||||
<el-divider content-position="left">每支队伍最少运动员人数
|
||||
{{activityTableData.restrictMaxNum}} 人,最多
|
||||
{{activityTableData.restrictMaxNum}} 人,该队运动员已有
|
||||
{{activityTableData.athleteMaxNum}} 名成员,还可报名
|
||||
{{activityTableData.restrictMaxNum-applyUserTableData.filter(v=>v.identity.includes('1')).length}}
|
||||
人。
|
||||
</el-divider>
|
||||
</div>
|
||||
<!--如果是正常报名-->
|
||||
<template v-if="!activityTableData.isLeader">
|
||||
<div style="display: flex;margin: 20px 0;align-items: center;">
|
||||
<el-divider content-position="left">每支队伍最多
|
||||
{{activityTableData.restrictMaxNum}}
|
||||
人,其中领队{{activityTableData.leanderNum}}人,
|
||||
教练{{activityTableData.coachNum}}人,
|
||||
运动员必须设置{{activityTableData.athleteMaxNum}}人,
|
||||
替补{{activityTableData.substituteNum}}人。
|
||||
男运动员最少{{activityTableData.restrictBoyNum?activityTableData.restrictBoyNum:'0'}}人,
|
||||
女运动员最少{{activityTableData.restrictGirlNum?activityTableData.restrictGirlNum:'0'}}人【该队运动员已有
|
||||
{{applyUserTableData.filter(v=>v.identity.includes('1')).length}}
|
||||
人,还可报名
|
||||
{{activityTableData.athleteMaxNum-applyUserTableData.filter(v=>v.identity.includes('1')).length}}人;
|
||||
替补还可以报{{activityTableData.substituteNum-applyUserTableData.filter(v=>v.identity.includes('5')).length}}人(非必需)】
|
||||
</el-divider>
|
||||
<div style="padding-left: 10px">
|
||||
<el-tooltip class="item"
|
||||
content="系统中查询不到的人可以点击添加"
|
||||
effect="dark"
|
||||
placement="top">
|
||||
<el-button
|
||||
:disabled="(activityTableData.restrictMaxNum-applyUserTableData.length)<=0"
|
||||
@click="openAddUser" circle icon="el-icon-plus"
|
||||
type="danger"></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<el-button @click="setUserRole('4')"
|
||||
icon="el-icon-check"
|
||||
plain
|
||||
size="small" type="primary"
|
||||
v-if="activityTableData.deputyDirectorNum>0">
|
||||
设置处级领导
|
||||
</el-button>
|
||||
<el-button @click="setUserRole('3')" icon="el-icon-check" plain
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="activityTableData.leanderNum>0">设置领队
|
||||
</el-button>
|
||||
<el-button @click="setUserRole('2')" icon="el-icon-check" plain
|
||||
size="small" type="primary"
|
||||
v-if="activityTableData.coachNum>0">
|
||||
设置教练
|
||||
</el-button>
|
||||
|
||||
<el-button @click="setUserRole('5')" icon="el-icon-check"
|
||||
plain
|
||||
size="small" type="primary"
|
||||
v-if="activityTableData.substituteNum>0">
|
||||
设置替补
|
||||
</el-button>
|
||||
<el-button @click="setUserRole('5')" icon="el-icon-check"
|
||||
plain
|
||||
size="small" type="primary"
|
||||
v-if="activityTableData.substituteNum>0">
|
||||
设置替补
|
||||
</el-button>
|
||||
|
||||
<el-dropdown @command="changeTeam"
|
||||
v-if="activityTableData.eveProjectType==2&&teamList.length>1">
|
||||
<el-button size="small" type="primary">
|
||||
修改小队<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{item}"
|
||||
:key="item.id" v-for="item in teamList">
|
||||
{{item.name}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
|
||||
<el-table :data="applyUserTableData"
|
||||
@selection-change="handleSelectionChange" border
|
||||
class="mt10" ref="multipleTable"
|
||||
row-key="id" size="small"
|
||||
stripe
|
||||
v-loading="applyUserTabLoading">
|
||||
|
||||
<el-table-column :reserve-selection="true"
|
||||
align="center" header-align="center"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="所属队"
|
||||
prop="team" width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="姓名"
|
||||
prop="username" width="130">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="教工号"
|
||||
prop="loginname" width="130">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="单位"
|
||||
prop="unitname"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="性别"
|
||||
prop="sex" width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="年龄"
|
||||
prop="age" width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="身份"
|
||||
prop="identity" width="300px">
|
||||
<template scope="{$index,row}">
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'4')"
|
||||
closable
|
||||
effect="light"
|
||||
type="info"
|
||||
v-if="row.identity.includes('4')">处级领导
|
||||
</el-tag>
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'3')"
|
||||
closable
|
||||
effect="light"
|
||||
type="warning"
|
||||
v-if="row.identity.includes('3')">领队
|
||||
</el-tag>
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'2')"
|
||||
closable
|
||||
effect="light"
|
||||
type="success"
|
||||
v-if="row.identity.includes('2')">教练
|
||||
</el-tag>
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'1')"
|
||||
closable
|
||||
effect="light"
|
||||
v-if="row.identity.includes('1')">运动员
|
||||
</el-tag>
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'5')"
|
||||
closable
|
||||
effect="light"
|
||||
type="danger"
|
||||
v-if="row.identity.includes('5')">替补
|
||||
</el-tag>
|
||||
|
||||
<el-dropdown @command="changeTeam"
|
||||
v-if="activityTableData.eveProjectType==2&&teamList.length>1">
|
||||
<el-button size="small" type="primary">
|
||||
修改小队<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{item}"
|
||||
:key="item.id" v-for="item in teamList">
|
||||
{{item.name}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-table :data="applyUserTableData"
|
||||
@selection-change="handleSelectionChange" border
|
||||
class="mt10" ref="multipleTable"
|
||||
row-key="id" size="small"
|
||||
stripe
|
||||
v-loading="applyUserTabLoading">
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-dialog
|
||||
:append-to-body="true"
|
||||
:visible.sync="addUserDialogVisible"
|
||||
title="添加人员"
|
||||
width="40%"
|
||||
>
|
||||
<el-form :model="formData" label-width="100px" ref="lsryform">
|
||||
<el-form-item label="所在队伍" prop="teamId"
|
||||
:rules="{required: true, message: '请选择所在队伍', trigger: 'blur'}">
|
||||
<el-select clearable disabled placeholder="请选择所在队伍" style="width: 100%"
|
||||
v-model="formData.teamId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in teamList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="userId" :rules="{required: true, message: '请输入工号或者姓名查询', trigger: 'blur'}">
|
||||
<el-select
|
||||
:remote-method="querySearchAsync"
|
||||
@change="addUserChange"
|
||||
filterable
|
||||
placeholder="请输入工号或者下姓名查询"
|
||||
remote
|
||||
reserve-keyword
|
||||
style="width: 100%"
|
||||
v-model="formData.userId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.username+'-'+item.loginname"
|
||||
:value="item.id"
|
||||
v-for="item in lsUserList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号" prop="loginname" :rules="{required: true, message: '请填写工号', trigger: 'blur'}">
|
||||
<el-input disabled maxlength="50" placeholder="请填写工号"
|
||||
type="text" v-model="formData.loginname"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex" :rules="{required: true, message: '性别', trigger: 'blur'}">
|
||||
<el-radio-group v-model="formData.sex">
|
||||
<el-radio :label="'男'" border>男</el-radio>
|
||||
<el-radio :label="'女'" border>女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="出生年月" prop="birthday" :rules="{required: true, message: '选择出生年月', trigger: 'blur'}">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.birthday"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择出生年月">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="mobile">
|
||||
<el-input maxlength="50" placeholder="请填写电话" type="text"
|
||||
v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idcard">
|
||||
<el-input maxlength="30" placeholder="请填写身份证号" type="text"
|
||||
v-model="formData.idcard"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在单位" prop="unitId" :rules="{required: true, message: '请选择所在单位', trigger: 'blur'}">
|
||||
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%"
|
||||
v-model="formData.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>
|
||||
|
||||
<el-table-column :reserve-selection="true"
|
||||
align="center" header-align="center"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="所属队"
|
||||
prop="team" width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="姓名"
|
||||
prop="username" width="130">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="教工号"
|
||||
prop="loginname" width="130">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="单位"
|
||||
prop="unitname"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="性别"
|
||||
prop="sex" width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="年龄"
|
||||
prop="age" width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="身份"
|
||||
prop="identity" width="300px">
|
||||
<template scope="{$index,row}">
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'4')"
|
||||
closable
|
||||
effect="light"
|
||||
type="info"
|
||||
v-if="row.identity.includes('4')">处级领导
|
||||
</el-tag>
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'3')"
|
||||
closable
|
||||
effect="light"
|
||||
type="warning"
|
||||
v-if="row.identity.includes('3')">领队
|
||||
</el-tag>
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'2')"
|
||||
closable
|
||||
effect="light"
|
||||
type="success"
|
||||
v-if="row.identity.includes('2')">教练
|
||||
</el-tag>
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'1')"
|
||||
closable
|
||||
effect="light"
|
||||
v-if="row.identity.includes('1')">运动员
|
||||
</el-tag>
|
||||
<el-tag :disable-transitions="false"
|
||||
@close="delApplyUser($index,row,'5')"
|
||||
closable
|
||||
effect="light"
|
||||
type="danger"
|
||||
v-if="row.identity.includes('5')">替补
|
||||
</el-tag>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
`,
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="addUserDialogVisible = false">取 消</el-button>
|
||||
<el-button @click="doAddUser" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
@@ -253,10 +347,85 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
applyUserTabLoading: false,
|
||||
selection: [],
|
||||
//全部可报名的人员
|
||||
userList: []
|
||||
userList: [],
|
||||
|
||||
addUserDialogVisible: false,
|
||||
lsUserList: [],
|
||||
unitOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doAddUser() {
|
||||
this.$refs["lsryform"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const birthDate = this.$moment(this.formData.birthday);
|
||||
const age = this.$moment().diff(birthDate, 'years');
|
||||
const data = {
|
||||
isAddUser: true,
|
||||
age: age,
|
||||
unitname: this.unitOptions.find(x => x.id === this.formData.unitId).name,
|
||||
...this.formData
|
||||
}
|
||||
const newUser = this.userList.find(a => a.id === this.formData.userId)
|
||||
if (newUser) {
|
||||
this.notifyWarning('该用户已存在左侧选择框内,请从左侧选择框内选择!')
|
||||
return
|
||||
}
|
||||
this.applyUserList.push(data)
|
||||
this.flushApplyUser(this.applyUserList)
|
||||
this.sortApplyUserTableData()
|
||||
|
||||
this.$notify.success({title: '成功', message: '已添加'});
|
||||
this.addUserDialogVisible = false
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
})
|
||||
},
|
||||
async addUserChange(val) {
|
||||
const user = this.lsUserList.find(l => l.id === val)
|
||||
this.$set(this.formData, 'eventId', this.eventData.eventId)
|
||||
this.$set(this.formData, 'activityId', this.activityTableData.activityId)
|
||||
this.$set(this.formData, 'team', this.applyFromData.teamName)
|
||||
this.$set(this.formData, 'teamId', this.applyFromData.teamId)
|
||||
this.$set(this.formData, 'userId', user ? user.id : null)
|
||||
this.$set(this.formData, 'loginname', user ? user.loginname : null)
|
||||
this.$set(this.formData, 'username', user ? user.username : null)
|
||||
this.$set(this.formData, 'unitId', user ? user.unitId : null)
|
||||
this.$set(this.formData, 'sex', user ? user.sex : null)
|
||||
this.$set(this.formData, 'idcard', user ? user.idCard : null)
|
||||
this.$set(this.formData, 'mobile', user ? user.mobile : null)
|
||||
this.$set(this.formData, 'birthday', user ? user.birthday : null)
|
||||
this.$set(this.formData, 'awardsMode', this.activityTableData.eveProjectType)
|
||||
this.$set(this.formData, 'status', 2)
|
||||
},
|
||||
async querySearchAsync(queryString) {
|
||||
/* const leftApplyUserList = this.leftApplyUserList.map(m => m.loginname)
|
||||
const rightApplyUserList = this.rightApplyUserList.map(m => m.loginname)
|
||||
const loginnames = leftApplyUserList.concat(rightApplyUserList)*/
|
||||
|
||||
const loginnames = this.applyUserTableData.map(m => m.loginname)
|
||||
const {code, data} = await $.get("/platform/activity/apply/getSysUser", {
|
||||
loginnames: JSON.stringify(loginnames),
|
||||
queryString: queryString
|
||||
})
|
||||
if (code === 0) {
|
||||
this.lsUserList = data
|
||||
} else {
|
||||
this.lsUserList = []
|
||||
}
|
||||
},
|
||||
openAddUser() {
|
||||
this.formData = {
|
||||
teamName: this.applyFromData.teamName,
|
||||
teamId: this.applyFromData.teamId,
|
||||
identity: ['1']
|
||||
}
|
||||
this.addUserDialogVisible = true
|
||||
if (this.$refs['lsryform']) {
|
||||
this.$refs['lsryform'].resetFields()
|
||||
}
|
||||
},
|
||||
async openUniteApply(data) {
|
||||
this.activityTableData = data
|
||||
//固定模式
|
||||
@@ -299,7 +468,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
isMenWomenTwo: data.isMenWomen
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
const { users, awardsModeT, awardsModeG, team, activity, getEvent } = resp.data
|
||||
const {users, awardsModeT, awardsModeG, team, activity, getEvent} = resp.data
|
||||
this.activityData = activity
|
||||
this.eventData = getEvent
|
||||
this.teamList = team
|
||||
@@ -332,7 +501,16 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
let message = null
|
||||
|
||||
if (flag) {
|
||||
const { athletesMaxNum, restrictGirlNum, restrictBoyNum, leanderNum, coachNum, deputyDirectorNum, substituteNum, projectType } =
|
||||
const {
|
||||
athletesMaxNum,
|
||||
restrictGirlNum,
|
||||
restrictBoyNum,
|
||||
leanderNum,
|
||||
coachNum,
|
||||
deputyDirectorNum,
|
||||
substituteNum,
|
||||
projectType
|
||||
} =
|
||||
this.eventData
|
||||
|
||||
const applyUserList = clone(this.applyUserList)
|
||||
@@ -388,7 +566,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
message = teamName + "女运动员至少设置" + restrictGirlNum + "人"
|
||||
break
|
||||
}
|
||||
const manYdyNum = teamApplyData[i].filter((v) => v.sex === "女" && v.identity.includes("1")).length
|
||||
const manYdyNum = teamApplyData[i].filter((v) => v.sex === "男" && v.identity.includes("1")).length
|
||||
if (restrictBoyNum > 0 && manYdyNum < restrictBoyNum) {
|
||||
msgFlag = false
|
||||
message = teamName + "男运动员至少设置" + restrictBoyNum + "人"
|
||||
@@ -397,7 +575,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
}
|
||||
}
|
||||
if (!msgFlag && !this.activityTableData.isLeader) {
|
||||
this.$notify.warning({ title: "警告", message: message })
|
||||
this.$notify.warning({title: "警告", message: message})
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -406,7 +584,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
if (!flag) {
|
||||
msg = "确定要保存吗?"
|
||||
}
|
||||
const confirm = await this.$confirm(msg, "提示", { type: "warning" })
|
||||
const confirm = await this.$confirm(msg, "提示", {type: "warning"})
|
||||
if (confirm === "confirm") {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
@@ -432,15 +610,15 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
},
|
||||
//点击添加运动员操作
|
||||
async applyUser() {
|
||||
const { isManGirlNum, restrictGirlNum, restrictBoyNum } = this.eventData
|
||||
const {isManGirlNum, restrictGirlNum, restrictBoyNum} = this.eventData
|
||||
|
||||
if (!this.rightApplyUserList.length) {
|
||||
this.$notify.warning({ title: "警告", message: "请在右侧列表中选择人员" })
|
||||
this.$notify.warning({title: "警告", message: "请在右侧列表中选择人员"})
|
||||
return
|
||||
}
|
||||
|
||||
//如果是单项
|
||||
if (this.activityTableData.eveProjectType === "1") {
|
||||
if (this.activityTableData.eveProjectType === '1') {
|
||||
if (this.applyUserTableData.length + this.rightApplyUserList.length > this.activityTableData.athleteMaxNum) {
|
||||
this.$notify({
|
||||
title: "警告",
|
||||
@@ -492,7 +670,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
}
|
||||
}
|
||||
|
||||
const resp = await this.$axios.post(loc() + "/getActivityData", { activityId: this.activityData.id })
|
||||
const resp = await this.$axios.post(loc() + "/getActivityData", {activityId: this.activityData.id})
|
||||
const aa = resp.data.filter((v) => {
|
||||
return this.rightApplyUserList.includes(v.userId)
|
||||
})
|
||||
@@ -532,7 +710,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
this.applyUserList.push(data)
|
||||
|
||||
//如果是单项判断每个人可以报几项
|
||||
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === "1") {
|
||||
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === '1') {
|
||||
cc.forEach((z) => {
|
||||
if (z[0]) {
|
||||
const index = this.applyUserList.findIndex((x) => x.userId === z[0].userId && x.id === null)
|
||||
@@ -545,7 +723,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
})
|
||||
|
||||
//如果是单项判断每个人可以报几项
|
||||
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === "1") {
|
||||
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === '1') {
|
||||
const usernames = cc.map((v) => v[0].username).join(",")
|
||||
if (usernames) {
|
||||
this.$notify({
|
||||
@@ -586,7 +764,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
},
|
||||
changeTeam(command) {
|
||||
const { item } = command
|
||||
const {item} = command
|
||||
if (!this.selection.length) {
|
||||
this.$notify({
|
||||
title: "警告",
|
||||
@@ -616,7 +794,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
},
|
||||
async findUserOne(id) {
|
||||
const { data } = await this.$axios.post(loc() + "/findUserOne", { id })
|
||||
const {data} = await this.$axios.post(loc() + "/findUserOne", {id})
|
||||
return data
|
||||
},
|
||||
async delApplyUser(index, row, num) {
|
||||
@@ -666,6 +844,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
getTransProp(user) {
|
||||
return {
|
||||
id: user.id,
|
||||
loginname: user.loginname,
|
||||
name: user.username + "(" + (user.sex ? user.sex : "") + "-" + user.loginname + ")"
|
||||
}
|
||||
},
|
||||
@@ -681,5 +860,8 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
||||
this.userList = []
|
||||
}
|
||||
},
|
||||
async created() {}
|
||||
async created() {
|
||||
this.unitOptions = await this.$businessTool.listUnit()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<activity-sports-delete-user @flip="flip" ref="activityDeleteUser"></activity-sports-delete-user>
|
||||
<activity-sports-delete-user @flip="doSearch" ref="activityDeleteUser"></activity-sports-delete-user>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ let ACTIVITY_SPORTS_ADD_ACTIVITY = {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="files" label="封面图" v-if="formData.applyWay.includes(1)">
|
||||
<el-form-item prop="files" label="封面图" >
|
||||
<file-upload
|
||||
:value.sync="formData.image"
|
||||
:upload_number="1"
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -146,6 +146,7 @@ layout("/layouts/platform.html"){
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.$store.dispatch("pjaxRoute", "/platform/warmthCondolence/mine")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+2
-2
@@ -129,13 +129,13 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
doDelete(row) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/warmthCondolenceNotice/delete", { id: id }).then((res) => {
|
||||
this.$axios.post("/platform/warmthCondolenceNotice/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
|
||||
+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: {
|
||||
|
||||
@@ -191,8 +191,8 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-icon name="location-o"></van-icon>
|
||||
报名方式:
|
||||
<span v-if="viewData.signUpMethod===1" style="color: var(--color-primary)">个人报名</span>
|
||||
<span v-if="viewData.signUpMethod===2" style="color: var(--color-primary)">分工会报名</span>
|
||||
<span v-if="viewData.signUpMethod===3" style="color: var(--color-primary)">组队报名</span>
|
||||
<span v-if="viewData.signUpMethod===2" style="color: var(--color-primary)">组队报名</span>
|
||||
<span v-if="viewData.signUpMethod===3" style="color: var(--color-primary)">分工会报名</span>
|
||||
</div>
|
||||
<div class="info-item" v-if="viewData.signUpMethod==3">
|
||||
<van-icon name="location-o"></van-icon>
|
||||
@@ -277,6 +277,51 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 分工会报名-->
|
||||
<div v-else-if="viewData.signUpMethod===3" class="block">
|
||||
<div class="notice-title left-tag-title">选择报名人员
|
||||
<span v-if="viewData.userNumberLimit===2">
|
||||
,报名人数 <span style="color: red">
|
||||
{{viewData.unionTeamNum}}</span>人
|
||||
</span>
|
||||
</div>
|
||||
<el-select
|
||||
v-if="inApplyTime"
|
||||
v-model="searchTeammateUserId"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入关键词"
|
||||
:remote-method="queryTeammate">
|
||||
<el-option
|
||||
v-for="item in teammateOptions"
|
||||
:key="item.userId"
|
||||
:label="item.userName + '(' + item.loginName + ')'"
|
||||
:value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button v-if="inApplyTime" class="ml5" type="primary" icon="el-icon-plus"
|
||||
@click="addTeamUser">添加
|
||||
</el-button>
|
||||
|
||||
<el-table :data="teamUsers" class="mt10">
|
||||
<el-table-column label="序号" type="index" width="60px"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<!-- <el-table-column prop="sex" label="性别"></el-table-column>-->
|
||||
<!-- <el-table-column prop="unitName" label="单位"></el-table-column>-->
|
||||
<!-- <el-table-column prop="mobile" label="手机号"></el-table-column>-->
|
||||
<el-table-column label="操作" width="100px"
|
||||
v-if="inApplyTime">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" @click="removeTeamUser(scope.$index)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="form-create-h5" v-if="isCustomForm">
|
||||
<div class="notice-title left-tag-title">填写报名信息</div>
|
||||
<form-create :value.sync="dynamicFormData" v-model="fapi" :rule="formCreateRule"
|
||||
@@ -362,11 +407,22 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$axios.post("/platform/activity/culture/infoManage/activityInfo", {id: this.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
//总人数限制
|
||||
if (this.viewData.userNumberLimit === 1) {
|
||||
} else if (this.viewData.userNumberLimit === 2) {
|
||||
//分工会人数限制
|
||||
const union = this.viewData.unionUserNumberLimit.find(v => v.id === this.$store.state.user.union.id)
|
||||
this.viewData.unionTeamNum = union.limitNum
|
||||
}
|
||||
if (this.viewData.signUpMethod === 3) {
|
||||
this.listTeamUserUnion()
|
||||
} else {
|
||||
this.listTeamUser()
|
||||
}
|
||||
if (this.viewData.formConfig) {
|
||||
this.formCreateRule = formCreate.parseJson(this.viewData.formConfig.rule)
|
||||
this.formCreateOption = formCreate.parseJson(this.viewData.formConfig.options)
|
||||
}
|
||||
this.listTeamUser()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -382,6 +438,17 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
//查询报名人员
|
||||
listTeamUserUnion() {
|
||||
this.$axios.post("/platform/activity/culture/applyUser/listTeamUserUnion", {activityId: this.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.isSignUp = res.data.length > 0
|
||||
this.teamUsers = res.data
|
||||
this.defaultAddSelf()
|
||||
this.customFormInit()
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单回显
|
||||
customFormInit() {
|
||||
if (this.teamUsers && this.teamUsers.length > 0) {
|
||||
@@ -467,7 +534,7 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.teamUsers.length > this.viewData.teamNum) {
|
||||
if (this.viewData.teamNum && this.teamUsers.length > this.viewData.teamNum) {
|
||||
this.$dialog
|
||||
.alert({
|
||||
title: "提示",
|
||||
@@ -499,7 +566,11 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$axios.post("/platform/activity/culture/applyUser/signUp", formData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.listTeamUser()
|
||||
if (this.viewData.signUpMethod === 3) {
|
||||
this.listTeamUserUnion()
|
||||
} else {
|
||||
this.listTeamUser()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -568,7 +639,7 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.teamUsers.length > this.viewData.teamNum) {
|
||||
if (this.viewData.teamNum && this.teamUsers.length > this.viewData.teamNum) {
|
||||
this.$dialog
|
||||
.alert({
|
||||
title: "提示",
|
||||
@@ -601,7 +672,11 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$axios.post("/platform/activity/culture/applyUser/signUp", formData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.listTeamUser()
|
||||
if (this.viewData.signUpMethod === 3) {
|
||||
this.listTeamUserUnion()
|
||||
} else {
|
||||
this.listTeamUser()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -618,7 +693,11 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$axios.post("/platform/activity/culture/applyUser/cancelSignUp", {activityId: this.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.listTeamUser()
|
||||
if (this.viewData.signUpMethod === 3) {
|
||||
this.listTeamUserUnion()
|
||||
} else {
|
||||
this.listTeamUser()
|
||||
}
|
||||
this.fapi.resetFields()
|
||||
}
|
||||
})
|
||||
@@ -628,7 +707,10 @@ layout("/layouts/platform_h5.html"){
|
||||
//查询队友信息
|
||||
queryTeammate(val) {
|
||||
if (val) {
|
||||
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {keyword: val}).then((res) => {
|
||||
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {
|
||||
keyword: val,
|
||||
signUpMethod: this.viewData.signUpMethod
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
res.data.map(v => {
|
||||
v.applyUserId = this.$store.state.user.id
|
||||
@@ -663,7 +745,7 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.teamUsers.length >= this.viewData.teamNum) {
|
||||
if (this.viewData.teamNum && this.teamUsers.length >= this.viewData.teamNum) {
|
||||
this.$dialog
|
||||
.alert({
|
||||
title: "提示",
|
||||
|
||||
@@ -8,7 +8,8 @@ layout("/layouts/platform_h5.html"){
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动列表" @click-left="()=>this.$pjaxReplace('/platform/home')" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar title="活动列表" @click-left="()=>this.$pjaxReplace('/platform/home')" left-arrow left-text="返回"
|
||||
placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu>
|
||||
<year-van-dropdown-item :num="5" @change="pageData" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
@@ -81,16 +82,17 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<script>
|
||||
<!--#include("eventNotification.js"){}#-->
|
||||
new Vue({
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
data() {
|
||||
return {
|
||||
activityId: GetQueryString("activityId"),
|
||||
tableData: [],
|
||||
finished: false,
|
||||
loading: false,
|
||||
pageForm: {
|
||||
isActivity: 2,
|
||||
applyStatus: 2,
|
||||
applyStatus: 1,
|
||||
year: new Date().getFullYear(),
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
@@ -119,18 +121,20 @@ layout("/layouts/platform_h5.html"){
|
||||
this.viewData = row
|
||||
this.$refs.eventNotification.viewShow = true
|
||||
},
|
||||
pageData() {
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
this.$axios.post("/platform/h5/activity/apply/activityData", this.pageForm).then((res) => {
|
||||
this.tableData = res.data
|
||||
|
||||
this.finished = true
|
||||
this.loading = false
|
||||
})
|
||||
const res = await this.$axios.post("/platform/h5/activity/apply/activityData", this.pageForm)
|
||||
this.tableData = res.data
|
||||
this.finished = true
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
async created() {
|
||||
await this.pageData()
|
||||
if (this.activityId) {
|
||||
const activity = this.tableData.find(v => v.id === this.activityId)
|
||||
this.openView(activity)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -5,16 +5,17 @@ layout("/layouts/platform_h5.html"){
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar
|
||||
@click-left="()=>this.$pjaxReplace('/platform/h5/activity/apply/applyUser')"
|
||||
left-arrow
|
||||
left-text="返回"
|
||||
placeholder
|
||||
title="项目列表"
|
||||
@click-left="()=>this.$pjaxReplace('/platform/h5/activity/apply/applyUser')"
|
||||
left-arrow
|
||||
left-text="返回"
|
||||
placeholder
|
||||
title="项目列表"
|
||||
></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list :finished="finished" @load="pageData" finished-text="没有更多了" v-if="tableData.length>0" v-model="loading">
|
||||
<van-list :finished="finished" @load="pageData" finished-text="没有更多了" v-if="tableData.length>0"
|
||||
v-model="loading">
|
||||
<div class="table-list">
|
||||
<div :key="row.id" class="table-card" v-for="row in tableData">
|
||||
<van-image :src="row.image" fit="cover" height="200" v-if="row.image" width="100%"></van-image>
|
||||
@@ -25,11 +26,16 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<div style="display: flex; justify-content: flex-end" v-if="row.status">
|
||||
<div style="display: flex; justify-content: flex-end" v-if="row.status&&row.applyWay.length===1&&row.applyWay.includes(1)">
|
||||
<van-tag type="primary" v-if="row.status===1">待审核</van-tag>
|
||||
<van-tag type="success" v-if="row.status===2">已成功报名</van-tag>
|
||||
<van-tag type="danger" v-if="row.status===3">审核不通过</van-tag>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: flex-end" v-else>
|
||||
<van-tag type="primary" v-if="row.status2===0">待审核</van-tag>
|
||||
<van-tag type="success" v-if="row.status2===2">已成功报名</van-tag>
|
||||
<van-tag type="danger" v-if="row.status2===3">审核不通过</van-tag>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="可报队数" v-if="row.eveProjectType==='2'">
|
||||
@@ -54,31 +60,54 @@ layout("/layouts/platform_h5.html"){
|
||||
<span v-else>0人</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="已报名人员" v-if="JSON.parse(row.applyWay).length===1">
|
||||
<van-cell title="已报名人员"
|
||||
v-if="row.userApplyNames&&row.applyWay.length===1&&row.applyWay.includes(1)">
|
||||
<template #right-icon>
|
||||
<span @click="openApplyUser(row)" v-if="row.userApplyNames">{{ row.userApplyNames}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<!--<van-cell class="table-card-footer">
|
||||
<template>
|
||||
<van-button :loading="subLoading" @click="openView(row)" round
|
||||
<van-cell class="table-card-footer">
|
||||
<div v-if="row.applyWay.length===1&&row.applyWay.includes(1)">
|
||||
<van-button :loading="subLoading" @click="signUpUser(row)" round
|
||||
size="small"
|
||||
type="primary">
|
||||
报名
|
||||
type="primary" v-if="activityData.applyWay.includes(1)&&row.userApply===0">
|
||||
报 名
|
||||
</van-button>
|
||||
</template>
|
||||
</van-cell>-->
|
||||
<van-button :loading="subLoading" @click="cancelApply(row)" round
|
||||
size="small"
|
||||
color="#dd6363"
|
||||
type="primary" v-if="activityData.applyWay.includes(1)&&row.userApply>0">
|
||||
取消报名
|
||||
</van-button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<van-button :loading="subLoading" @click="signUpUser(row)" round
|
||||
size="small"
|
||||
type="primary" v-if="activityData.applyWay.includes(1)&&row.userApply2===0">
|
||||
报 名
|
||||
</van-button>
|
||||
<van-button :loading="subLoading" @click="cancelApply(row)" round
|
||||
size="small"
|
||||
color="#dd6363"
|
||||
type="primary" v-if="activityData.applyWay.includes(1)&&row.userApply2>0">
|
||||
取消报名
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty>
|
||||
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据"
|
||||
v-else></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
@@ -90,16 +119,75 @@ layout("/layouts/platform_h5.html"){
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
subLoading: false
|
||||
subLoading: false,
|
||||
activityData: {}
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
openApplyUser() {},
|
||||
openView(row) {},
|
||||
openApplyUser() {
|
||||
},
|
||||
cancelApply(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "确认要取消报名吗?"
|
||||
}).then(() => {
|
||||
/* if (row.applyUser !== this.$store.state.user.id) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: "报名人不是您,请联系报名人取消!",
|
||||
}).then(() => {
|
||||
})
|
||||
return;
|
||||
}*/
|
||||
this.$axios.post("/platform/h5/activity/apply/cancelApply", {
|
||||
activityId: row.activityId,
|
||||
eventId: row.eventId,
|
||||
schoolEventId: row.id
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
}).then(() => {
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
signUpUser(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "确认要报名吗?"
|
||||
}).then(async () => {
|
||||
const teamList = await this.listTeamList(row)
|
||||
if (teamList.length > 0 ) {
|
||||
row.teamId = teamList[0].id
|
||||
}
|
||||
this.$axios.post("/platform/h5/activity/apply/signUpUser", {
|
||||
activityId: row.activityId,
|
||||
teamId: row.teamId,
|
||||
eventId: row.eventId,
|
||||
schoolEventId: row.id
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
},
|
||||
pageData() {
|
||||
this.loading = true
|
||||
this.$axios.post("/platform/h5/activity/apply/pageData", { data: JSON.stringify(this.pageForm) }).then((res) => {
|
||||
this.$axios.post("/platform/h5/activity/apply/pageData", {data: JSON.stringify(this.pageForm)}).then((res) => {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
@@ -110,9 +198,25 @@ layout("/layouts/platform_h5.html"){
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async listTeamList(row) {
|
||||
const resp = await this.$axios.post("/platform/h5/activity/apply/listTeamList", {
|
||||
activityId: row.activityId,
|
||||
eventId: row.eventId,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
findOneActivity() {
|
||||
this.$axios.post("/platform/h5/activity/apply/findOneActivity", { activityId: this.pageForm.activityId }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$axios.post("/platform/h5/activity/apply/findOneActivity", {activityId: this.pageForm.activityId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.activityData = res.data
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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