疗休养
This commit is contained in:
@@ -53,7 +53,7 @@ public interface SourceData {
|
||||
put("XBM", new String[]{"sex"});// 性别码
|
||||
put("MZMC", new String[]{"nation"});// 民族码
|
||||
put("SJ", new String[]{"mobile"}); // 手机号
|
||||
put("SFZJH", new String[]{"idcard"}); // 身份证件号
|
||||
// put("SFZJH", new String[]{"idcard"}); // 身份证件号
|
||||
put("ZZMMM", new String[]{"political"}); // 政治面貌码
|
||||
put("DQZTM", new String[]{"userState", "personalStatus"}); // 在职状态码
|
||||
put("RYFLMC", new String[]{"personType"}); // 人员类型码
|
||||
|
||||
@@ -529,7 +529,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
||||
// 变更记录
|
||||
List<NutMap> changeList = new ArrayList<>();
|
||||
for (String fieldName : allowChangeFieldNames) {
|
||||
if (List.of("retireDate", "welfareStopDate").contains(fieldName)) {
|
||||
if (List.of("retireDate", "welfareStopDate", "idcard").contains(fieldName)) {
|
||||
continue;
|
||||
}
|
||||
memberCommonService.extractChange(newMap, sourceMap, fieldName, dictMap, changeList);
|
||||
@@ -577,7 +577,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
||||
NutMap sourceMap = Lang.obj2nutmap(user);
|
||||
List<NutMap> changeList = new ArrayList<>();
|
||||
for (String fieldName : allowChangeFieldNames) {
|
||||
if (List.of("retireDate", "welfareStopDate").contains(fieldName)) {
|
||||
if (List.of("retireDate", "welfareStopDate", "idcard").contains(fieldName)) {
|
||||
continue;
|
||||
}
|
||||
memberCommonService.extractChange(newMap, sourceMap, fieldName, dictMap, changeList);
|
||||
|
||||
+68
-17
@@ -1,29 +1,47 @@
|
||||
package io.v.nutz.zhgh.therapyRecuperation.controller.mobile;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.therapyRecuperation.model.TheRapyRecuperationConfig;
|
||||
import io.v.nutz.zhgh.therapyRecuperation.service.TheRapyRecuperationEnrollService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author JyuHsin
|
||||
* @Date 2022/6/2
|
||||
* @Description 疗休养页面跳转controller
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/mobile/theRapyRecuperation")
|
||||
@Ok("json:full")
|
||||
@At("/platform/mobile/theRapyRecuperation")
|
||||
public class MobileTheRapyRecuperationEnrollController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private TheRapyRecuperationEnrollService theRapyRecuperationEnrollService;
|
||||
|
||||
/**
|
||||
* 手机端 首页
|
||||
*/
|
||||
@At("/index")
|
||||
@Ok("beetl:/mobile/therapyRecuperation/index.html")
|
||||
@RequiresAuthentication
|
||||
public void index() {
|
||||
|
||||
}
|
||||
public void index() {}
|
||||
|
||||
/**
|
||||
* 手机端 线路列表页面
|
||||
@@ -31,9 +49,7 @@ public class MobileTheRapyRecuperationEnrollController {
|
||||
@At("/mobileLineListPage")
|
||||
@Ok("beetl:/mobile/therapyRecuperation/lineList.html")
|
||||
@RequiresAuthentication
|
||||
public void mobileLinePage() {
|
||||
|
||||
}
|
||||
public void mobileLinePage() {}
|
||||
|
||||
/**
|
||||
* 手机端 线路详情页面
|
||||
@@ -41,9 +57,7 @@ public class MobileTheRapyRecuperationEnrollController {
|
||||
@At("/lineInfo")
|
||||
@Ok("beetl:/mobile/therapyRecuperation/lineInfo.html")
|
||||
@RequiresAuthentication
|
||||
public void lineInfo() {
|
||||
|
||||
}
|
||||
public void lineInfo() {}
|
||||
|
||||
/**
|
||||
* 手机端 基地详情页面
|
||||
@@ -51,9 +65,7 @@ public class MobileTheRapyRecuperationEnrollController {
|
||||
@At("/baseInfo")
|
||||
@Ok("beetl:/mobile/therapyRecuperation/baseManagement.html")
|
||||
@RequiresAuthentication
|
||||
public void baseInfo() {
|
||||
|
||||
}
|
||||
public void baseInfo() {}
|
||||
|
||||
/**
|
||||
* 手机端 我的疗休养页面
|
||||
@@ -61,15 +73,54 @@ public class MobileTheRapyRecuperationEnrollController {
|
||||
@At("/myRecuperation")
|
||||
@Ok("beetl:/mobile/therapyRecuperation/myRecuperation.html")
|
||||
@RequiresAuthentication
|
||||
public void myRecuperation() {
|
||||
|
||||
}
|
||||
public void myRecuperation() {}
|
||||
|
||||
|
||||
@At("/userSignInfo")
|
||||
@Ok("beetl:/mobile/therapyRecuperation/userSignInfo.html")
|
||||
@RequiresAuthentication
|
||||
public void userSignInfo() {
|
||||
public void userSignInfo() {}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object getOpenLineList(String id){
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
TheRapyRecuperationConfig config = theRapyRecuperationEnrollService.getConfig();
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
us.id AS `value`,
|
||||
CONCAT(
|
||||
line.lineName,
|
||||
'(',
|
||||
DATE_FORMAT(us.playStartTime, '%m-%d'),
|
||||
'至',
|
||||
DATE_FORMAT(us.playEndTime, '%m-%d'),
|
||||
')'
|
||||
) AS `label`
|
||||
FROM
|
||||
the_rapy_recuperation_line_union_select us
|
||||
LEFT JOIN the_rapy_recuperation_line line ON line.id = us.lineId
|
||||
$condition
|
||||
""").setParam("id", id);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("us.`enable`", "=", true);
|
||||
cnd.and("us.id", "!=", id);
|
||||
|
||||
if ("fixedUser".equals(config.getOutsideQuotaMode())) {
|
||||
if (!config.getFixedUserList().contains(ShiroUtil.getUserId())) {
|
||||
cnd.and("line.regionalNature", "=", "省内");
|
||||
}
|
||||
}
|
||||
|
||||
cnd.asc("line.serialNumber");
|
||||
sql.setCondition(cnd);
|
||||
|
||||
sql.setCallback(Sqls.callback.maps());
|
||||
dao.execute(sql);
|
||||
return sql.getResult();
|
||||
}
|
||||
}
|
||||
|
||||
+49
-24
@@ -18,12 +18,14 @@ import io.v.nutz.zhgh.therapyRecuperation.service.TheRapyRecuperationTravelAgenc
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
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.Daos;
|
||||
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;
|
||||
@@ -87,8 +89,9 @@ public class TheRapyRecuperationEnrollController {
|
||||
@POST
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object pageData(PageForm pageForm, Integer year, String unionId, int theRapyRecuperationType, Integer lineUnionType) {
|
||||
return enrollService.enrollPageData(pageForm, year, unionId, theRapyRecuperationType, lineUnionType);
|
||||
public Object pageData(PageForm pageForm, Integer year, String unionId,
|
||||
int theRapyRecuperationType, Integer lineUnionType, String editOther) {
|
||||
return enrollService.enrollPageData(pageForm, year, unionId, theRapyRecuperationType, lineUnionType, editOther);
|
||||
}
|
||||
|
||||
@At
|
||||
@@ -149,7 +152,8 @@ public class TheRapyRecuperationEnrollController {
|
||||
@POST
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object doSignUpForLine(@Param("enroll") TheRapyRecuperationEnroll enrollInfo) {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public synchronized Object doSignUpForLine(@Param("enroll") TheRapyRecuperationEnroll enrollInfo) {
|
||||
//省外的线路报名需要判断
|
||||
// if (lineInfo.getRegionalNature().equals(TheRapyRecuperationProvinceType.provinceOut.getValue())) {
|
||||
Sys_config config = dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "recuperationVersion"));
|
||||
@@ -176,17 +180,28 @@ public class TheRapyRecuperationEnrollController {
|
||||
} else if (!IdcardUtil.isValidCard(companion.getIdCard())) {
|
||||
return Result.error("随行人身份证信息有误");
|
||||
}
|
||||
if (companion.getAge() < 3 || companion.getAge() > 70) {
|
||||
if (companion.getAge() < 1 || companion.getAge() > 70) {
|
||||
return Result.error("随行人年龄超过限制,请上传其他随行人");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (StrUtil.isBlank(enrollInfo.getId())) {
|
||||
enrollService.doSignUpForLine(enrollInfo);
|
||||
} else {
|
||||
enrollService.updateSignUpLine(enrollInfo);
|
||||
if (StrUtil.isNotBlank(enrollInfo.getEditOther())) {
|
||||
dao.clear(TheRapyRecuperationEnroll.class, Cnd.where("id", "=", enrollInfo.getEditOther()));
|
||||
dao.clear(TheRapyRecuperationEnrollCompanion.class, Cnd.where("trreId", "=", enrollInfo.getEditOther()));
|
||||
if (StrUtil.isNotBlank(enrollInfo.getBedInfoId())) {
|
||||
dao.delete(TheRapyRecuperationEnrollBed.class, enrollInfo.getBedInfoId());
|
||||
}
|
||||
enrollInfo.setSpecificTime(null);
|
||||
enrollInfo.setTakePartInTravelAgencyId(null);
|
||||
enrollInfo.setTakePartInBaseManagementId(null);
|
||||
enrollService.doSignUpForLine(enrollInfo);
|
||||
} else {
|
||||
enrollService.updateSignUpLine(enrollInfo);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -201,6 +216,7 @@ public class TheRapyRecuperationEnrollController {
|
||||
@POST
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doSignUpForTravelAgency(@Param("enroll") TheRapyRecuperationEnroll enrollInfo) {
|
||||
Sys_config config = dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "recuperationVersion"));
|
||||
Map<Boolean, String> resultMap = new HashMap<>();
|
||||
@@ -230,6 +246,7 @@ public class TheRapyRecuperationEnrollController {
|
||||
@POST
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doSignUpForBaseManagement(@Param("enroll") TheRapyRecuperationEnroll enrollInfo) {
|
||||
Sys_config config = dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "recuperationVersion"));
|
||||
Map<Boolean, String> resultMap = new HashMap<>();
|
||||
@@ -242,34 +259,42 @@ public class TheRapyRecuperationEnrollController {
|
||||
return Result.error(resultMap.get(false));
|
||||
}
|
||||
|
||||
// 校验随行人的身份证信息
|
||||
if (Lang.isNotEmpty(enrollInfo.getCompanionList())) {
|
||||
for (TheRapyRecuperationEnrollCompanion companion : enrollInfo.getCompanionList()) {
|
||||
if (StrUtil.isBlank(companion.getIdCard())) {
|
||||
return Result.error("随行人身份证信息不能为空");
|
||||
} else if (!IdcardUtil.isValidCard(companion.getIdCard())) {
|
||||
return Result.error("随行人身份证信息有误");
|
||||
}
|
||||
if (companion.getAge() < 3 || companion.getAge() > 70) {
|
||||
return Result.error("随行人年龄超过限制,请上传其他随行人");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(enrollInfo.getId())) {
|
||||
enrollService.doSignUpForHotel(enrollInfo);
|
||||
} else {
|
||||
enrollService.updateSignUpHotel(enrollInfo);
|
||||
if (StrUtil.isNotBlank(enrollInfo.getEditOther())) {
|
||||
dao.clear(TheRapyRecuperationEnroll.class, Cnd.where("id", "=", enrollInfo.getEditOther()));
|
||||
dao.clear(TheRapyRecuperationEnrollCompanion.class, Cnd.where("trreId", "=", enrollInfo.getEditOther()));
|
||||
if (StrUtil.isNotBlank(enrollInfo.getBedInfoId())) {
|
||||
dao.delete(TheRapyRecuperationEnrollBed.class, enrollInfo.getBedInfoId());
|
||||
}
|
||||
enrollInfo.setRoomCount(null);
|
||||
enrollInfo.setRoomRemark(null);
|
||||
enrollInfo.setRoomRemarkName(null);
|
||||
enrollInfo.setRoommate(null);
|
||||
enrollInfo.setRoomCountName(null);
|
||||
enrollInfo.setOtherRemark(null);
|
||||
enrollInfo.setTakePartInLineId(null);
|
||||
enrollInfo.setTakePartInUnionId(null);
|
||||
enrollInfo.setTakePartInTravelAgencyId(null);
|
||||
enrollInfo.setIntentionLineId(null);
|
||||
enrollInfo.setIntentionLineName(null);
|
||||
enrollInfo.setCarryFamilyNum(null);
|
||||
enrollService.doSignUpForHotel(enrollInfo);
|
||||
} else {
|
||||
enrollService.updateSignUpHotel(enrollInfo);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@At("/findSignUpInfoById/?")
|
||||
@At
|
||||
@POST
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object findSignUpInfoById(String id) {
|
||||
return enrollService.findSignUpInfoById(id);
|
||||
public Object findSignUpInfoById(@Param(value = "id", required = false) String id,
|
||||
@Param(value = "editOther", required = false) String editOther) {
|
||||
return enrollService.findSignUpInfoById(id, editOther);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-3
@@ -119,7 +119,7 @@ public class TheRapyRecuperationUserQueryController {
|
||||
enroll.*,
|
||||
lineu.lineId,
|
||||
lineu.playStartTime,
|
||||
lineu.playEndTime,
|
||||
lineu.playEndTime,
|
||||
( SELECT COUNT( 1 ) FROM the_rapy_recuperation_enroll_companion WHERE trreId = enroll.id ) isFamily
|
||||
FROM
|
||||
`the_rapy_recuperation_enroll` enroll
|
||||
@@ -128,7 +128,7 @@ public class TheRapyRecuperationUserQueryController {
|
||||
LEFT JOIN the_rapy_recuperation_lot lot ON lot.id = line.lotId
|
||||
LEFT JOIN the_rapy_recuperation_base_management ma on ma.id = enroll.takePartInBaseManagementId
|
||||
LEFT JOIN the_rapy_recuperation_travel_agency lxs ON lxs.id = line.travelAgencyId
|
||||
$condition
|
||||
$condition
|
||||
""");
|
||||
cnd.andEX("YEAR(enroll.signingUptime)", ">=", startYear);
|
||||
cnd.andEX("YEAR(enroll.signingUptime)", "<=", endYear);
|
||||
@@ -504,7 +504,9 @@ public class TheRapyRecuperationUserQueryController {
|
||||
lineEntities.add(new ExcelExportEntity("行程", "playTime", 20));
|
||||
lineEntities.add(new ExcelExportEntity("房间需求数", "roomCount", 20));
|
||||
lineEntities.add(new ExcelExportEntity("用房备注", "roomRemarkName", 30));
|
||||
lineEntities.add(new ExcelExportEntity("其他", "other", 20));
|
||||
lineEntities.add(new ExcelExportEntity("其他备注", "otherRemark", 20));
|
||||
lineEntities.add(new ExcelExportEntity("第二意向线路", "intentionLineName", 30));
|
||||
lineEntities.add(new ExcelExportEntity("意向线路携带家属数", "carryFamilyNum", 20));
|
||||
|
||||
//自由组团表头
|
||||
ArrayList<ExcelExportEntity> travelEntities = new ArrayList<>(commonEntities);
|
||||
|
||||
+9
@@ -94,6 +94,15 @@ public class TheRapyRecuperationConfigController {
|
||||
dao.insertWith(config, "lots");
|
||||
}
|
||||
|
||||
// 如果是特定人员报名,将这些人存在redis里边,方便查询
|
||||
if ("fixedUser".equals(config.getOutsideQuotaMode())) {
|
||||
Sql sql = Sqls.create("select userId from the_rapy_recuperation_can_apply_out_user");
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(sql);
|
||||
List<String> stringList = sql.getList(String.class);
|
||||
config.setFixedUserList(stringList);
|
||||
}
|
||||
|
||||
// 将配置存储到redis里边,可以避免每次都去查一次数据库
|
||||
String configCache = RedisConstant.REDIS_KEY_THE_RAPY_RECU_CONFIG_CACHE;
|
||||
redisService.del(configCache);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.v.nutz.zhgh.therapyRecuperation.model;
|
||||
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
@@ -116,4 +117,12 @@ public class TheRapyRecuperationConfig {
|
||||
@Comment("分工会人数限制")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<NutMap> unionLimit;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
@Comment("承诺书")
|
||||
private List<Sys_file> files;
|
||||
|
||||
// 可以参加报名的人员
|
||||
private List<String> fixedUserList;
|
||||
}
|
||||
|
||||
@@ -237,5 +237,27 @@ public class TheRapyRecuperationEnroll extends BaseModel {
|
||||
@Comment("拼房人")
|
||||
private String roommate;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
@Comment("其他备注")
|
||||
private String otherRemark;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("第二意向线路Id")
|
||||
private String intentionLineId;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Comment("第二意向线路名称")
|
||||
private String intentionLineName;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.INT)
|
||||
@Comment("携带家属人数")
|
||||
private Integer carryFamilyNum;
|
||||
|
||||
private String firstLetter;
|
||||
|
||||
private String editOther;
|
||||
}
|
||||
|
||||
+7
-2
@@ -4,6 +4,7 @@ import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.service.ViService;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
import io.v.nutz.zhgh.therapyRecuperation.model.TheRapyRecuperationConfig;
|
||||
import io.v.nutz.zhgh.therapyRecuperation.model.TheRapyRecuperationEnroll;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
@@ -27,7 +28,8 @@ public interface TheRapyRecuperationEnrollService extends ViService<TheRapyRecup
|
||||
* @param trrt trrt
|
||||
* @return {@link Pagination}
|
||||
*/
|
||||
Pagination enrollPageData(PageForm pageForm, Integer year, String unionId, int trrt, Integer lineUnionType);
|
||||
Pagination enrollPageData(PageForm pageForm, Integer year, String unionId,
|
||||
int trrt, Integer lineUnionType, String editOther);
|
||||
|
||||
List<NutMap> getSelectLineById(String lineId, String unionId, int trrt, Integer lineUnionType);
|
||||
|
||||
@@ -101,7 +103,7 @@ public interface TheRapyRecuperationEnrollService extends ViService<TheRapyRecup
|
||||
* @param id id
|
||||
* @return {@link TheRapyRecuperationEnroll}
|
||||
*/
|
||||
TheRapyRecuperationEnroll findSignUpInfoById(String id);
|
||||
TheRapyRecuperationEnroll findSignUpInfoById(String id, String editOther);
|
||||
|
||||
|
||||
/**
|
||||
@@ -122,4 +124,7 @@ public interface TheRapyRecuperationEnrollService extends ViService<TheRapyRecup
|
||||
NutMap selectLineAllInfo(String usId, String usUnionId);
|
||||
|
||||
List<Sys_union> getTheRapyUnions(Integer year);
|
||||
|
||||
|
||||
TheRapyRecuperationConfig getConfig();
|
||||
}
|
||||
|
||||
+3
-3
@@ -113,9 +113,9 @@ public class TheRapyRecuperationAuditServiceImpl extends ViServiceImpl<Audit> im
|
||||
fetch.setv("bedInfo", bedInfo);
|
||||
}
|
||||
List<TheRapyRecuperationEnrollCompanion> companionList = dao().query(TheRapyRecuperationEnrollCompanion.class, Cnd.where("trreId", "=", id));
|
||||
companionList.forEach(v -> {
|
||||
v.setBedInfo(dao().fetch(TheRapyRecuperationEnrollBed.class, v.getBedInfoId()));
|
||||
});
|
||||
// companionList.forEach(v -> {
|
||||
// v.setBedInfo(dao().fetch(TheRapyRecuperationEnrollBed.class, v.getBedInfoId()));
|
||||
// });
|
||||
map.addv("viewData", fetch.setv("companionList", companionList));
|
||||
|
||||
|
||||
|
||||
+145
-97
@@ -69,7 +69,12 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
private TheRapyRecuperationLineService lineService;
|
||||
|
||||
@Override
|
||||
public Pagination enrollPageData(PageForm pageForm, Integer year, String unionId, int trrt, Integer lineUnionType) {
|
||||
public Pagination enrollPageData(PageForm pageForm, Integer year, String unionId,
|
||||
int trrt, Integer lineUnionType, String editOther) {
|
||||
TheRapyRecuperationEnroll enroll = null;
|
||||
if (StrUtil.isNotBlank(editOther)) {
|
||||
enroll = dao().fetch(TheRapyRecuperationEnroll.class, editOther);
|
||||
}
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (List.of(TheRapyRecuperationType.provinceInLine.getValue(), TheRapyRecuperationType.provinceOutLine.getValue()).contains(trrt)) {
|
||||
Sql lineSql = Sqls.create("""
|
||||
@@ -133,6 +138,11 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
//校工会
|
||||
lineCnd.and("us.signUpMode", "=", TheRapyRecuperationSignUpMode.FREE.getValue());
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(enroll) && StrUtil.isNotBlank(enroll.getTakePartInLineId())) {
|
||||
lineCnd.and("us.id", "!=", enroll.getTakePartInLineId());
|
||||
}
|
||||
|
||||
lineSql.setVar("lineCnd", lineCnd);
|
||||
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), lineSql);
|
||||
} else if (TheRapyRecuperationType.provinceInTravelAgency.getValue() == trrt) {
|
||||
@@ -145,6 +155,9 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
from
|
||||
the_rapy_recuperation_travel_agency $condition
|
||||
""");
|
||||
if (Lang.isNotEmpty(enroll) && StrUtil.isNotBlank(enroll.getTakePartInTravelAgencyId())) {
|
||||
cnd.and("id", "!=", enroll.getTakePartInTravelAgencyId());
|
||||
}
|
||||
taSql.setCondition(cnd);
|
||||
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), taSql);
|
||||
} else if (TheRapyRecuperationType.provinceInHotel.getValue() == trrt) {
|
||||
@@ -163,6 +176,9 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
$condition
|
||||
""").setParam("year", queryYear);
|
||||
cnd.asc("sortNumber");
|
||||
if (Lang.isNotEmpty(enroll) && StrUtil.isNotBlank(enroll.getTakePartInBaseManagementId())) {
|
||||
cnd.and("b.id", "!=", enroll.getTakePartInBaseManagementId());
|
||||
}
|
||||
taSql.setCondition(cnd);
|
||||
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), taSql);
|
||||
}
|
||||
@@ -320,10 +336,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
}
|
||||
|
||||
if (recuperationConfig.getBedInfo() || recuperationConfig.getFamilyInfo() == 2) {
|
||||
for (TheRapyRecuperationEnrollCompanion theRapyRecuperationEnrollCompanion : enrollInfo.getCompanionList()) {
|
||||
insertLinks(theRapyRecuperationEnrollCompanion, "bedInfo");
|
||||
}
|
||||
insertWith(enrollInfo, "companionList|bedInfo");
|
||||
insertWith(enrollInfo, "companionList");
|
||||
} else {
|
||||
insert(enrollInfo);
|
||||
}
|
||||
@@ -353,9 +366,11 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
|
||||
if (recuperationConfig.getBedInfo() || recuperationConfig.getFamilyInfo() == 2) {
|
||||
dao().clearLinks(enrollInfo, "companionList");
|
||||
dao().delete(TheRapyRecuperationEnrollBed.class, enrollInfo.getBedInfoId());
|
||||
if (StrUtil.isNotBlank(enrollInfo.getBedInfoId())) {
|
||||
dao().delete(TheRapyRecuperationEnrollBed.class, enrollInfo.getBedInfoId());
|
||||
}
|
||||
|
||||
dao().insertLinks(enrollInfo, "companionList|bedInfo");
|
||||
dao().insertLinks(enrollInfo, "companionList");
|
||||
}
|
||||
|
||||
update(enrollInfo);
|
||||
@@ -416,7 +431,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
for (TheRapyRecuperationEnrollCompanion theRapyRecuperationEnrollCompanion : enrollInfo.getCompanionList()) {
|
||||
insertLinks(theRapyRecuperationEnrollCompanion, "bedInfo");
|
||||
}
|
||||
insertWith(enrollInfo, "companionList|bedInfo");
|
||||
insertWith(enrollInfo, "companionList");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -429,9 +444,10 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
public void updateSignUpHotel(TheRapyRecuperationEnroll enrollInfo) {
|
||||
|
||||
dao().clearLinks(enrollInfo, "companionList");
|
||||
dao().delete(TheRapyRecuperationEnrollBed.class, enrollInfo.getBedInfoId());
|
||||
|
||||
dao().insertLinks(enrollInfo, "companionList|bedInfo");
|
||||
if (StrUtil.isNotBlank(enrollInfo.getBedInfoId())) {
|
||||
dao().delete(TheRapyRecuperationEnrollBed.class, enrollInfo.getBedInfoId());
|
||||
}
|
||||
dao().insertLinks(enrollInfo, "companionList");
|
||||
|
||||
update(enrollInfo);
|
||||
//插入变更记录
|
||||
@@ -485,19 +501,18 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
|
||||
//每年旅行频率
|
||||
Integer travelFrequency = config.getTravelFrequency();
|
||||
|
||||
//省外几年去一次
|
||||
Integer outsideNumber = config.getOutsideNumber();
|
||||
|
||||
//可以修改几次
|
||||
Integer modifyNumber = config.getModifyNumber();
|
||||
|
||||
//省外最多报名人数
|
||||
Integer allLineSignUpNumber = config.getAllLineSignUpNumber();
|
||||
// 判断是不是修改报名其他线路
|
||||
String editOther = enrollInfo.getEditOther();
|
||||
|
||||
//如果报旅行社
|
||||
if (StrUtil.isNotBlank(enrollInfo.getTakePartInTravelAgencyId())) {
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency);
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency, editOther);
|
||||
if (oneYear != null) {
|
||||
return oneYear;
|
||||
}
|
||||
@@ -505,7 +520,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
|
||||
//如果报酒店
|
||||
if (StrUtil.isNotBlank(enrollInfo.getTakePartInBaseManagementId()) && StrUtil.isBlank(enrollInfo.getId())) {
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency);
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency, editOther);
|
||||
if (oneYear != null) {
|
||||
return oneYear;
|
||||
}
|
||||
@@ -571,7 +586,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(enrollInfo.getId())) {
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency);
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency, editOther);
|
||||
if (oneYear != null) {
|
||||
return oneYear;
|
||||
}
|
||||
@@ -967,22 +982,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
|
||||
@Override
|
||||
public Map<Boolean, String> validSignUpInfoForHMC(String loginName, TheRapyRecuperationEnroll enrollInfo) {
|
||||
//配置信息
|
||||
TheRapyRecuperationConfig config;
|
||||
|
||||
// 丛redis里面去配置信息
|
||||
String configRedis = redisService.get(RedisConstant.REDIS_KEY_THE_RAPY_RECU_CONFIG_CACHE);
|
||||
if (StrUtil.isNotBlank(configRedis)) {
|
||||
try {
|
||||
config = JSONUtil.toBean(configRedis, TheRapyRecuperationConfig.class);
|
||||
} catch (Exception e) {
|
||||
config = dao().fetch(TheRapyRecuperationConfig.class);
|
||||
redisService.set(RedisConstant.REDIS_KEY_THE_RAPY_RECU_CONFIG_CACHE, JSONUtil.toJsonStr(config));
|
||||
}
|
||||
} else {
|
||||
config = dao().fetch(TheRapyRecuperationConfig.class);
|
||||
redisService.set(RedisConstant.REDIS_KEY_THE_RAPY_RECU_CONFIG_CACHE, JSONUtil.toJsonStr(config));
|
||||
}
|
||||
TheRapyRecuperationConfig config = getConfig();
|
||||
|
||||
Sys_user user = dao().fetch(Sys_user.class, Cnd.where("loginname", "=", loginName));
|
||||
//判断是否在报名范围内
|
||||
@@ -1002,13 +1002,15 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
Integer activityGroupId = config.getActivityGroupId();
|
||||
// 省外限制模式
|
||||
String outsideQuotaMode = config.getOutsideQuotaMode();
|
||||
// 判断是不是修改其他线路
|
||||
String editOther = enrollInfo.getEditOther();
|
||||
|
||||
//如果报旅行社
|
||||
if (StrUtil.isNotBlank(enrollInfo.getTakePartInTravelAgencyId())) {
|
||||
if(StrUtil.isNotBlank(enrollInfo.getId())) {
|
||||
return Map.of(true, "成功");
|
||||
}
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency);
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency, editOther);
|
||||
if (oneYear != null) {
|
||||
return oneYear;
|
||||
}
|
||||
@@ -1016,7 +1018,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
|
||||
//如果报酒店
|
||||
if (StrUtil.isNotBlank(enrollInfo.getTakePartInBaseManagementId()) && StrUtil.isBlank(enrollInfo.getId())) {
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency);
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency, editOther);
|
||||
if (oneYear != null) {
|
||||
return oneYear;
|
||||
}
|
||||
@@ -1076,7 +1078,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
TheRapyRecuperationType trrt = regionTypeLineMap.get(lineInfo.getRegionalNature());
|
||||
if (StrUtil.isBlank(enrollInfo.getId()) && StrUtil.isNotBlank(enrollInfo.getTakePartInLineId())) {
|
||||
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency);
|
||||
Map<Boolean, String> oneYear = this.validCountOneYear(loginName, travelFrequency, editOther);
|
||||
if (oneYear != null && oneYear.containsKey(false)) {
|
||||
return oneYear;
|
||||
}
|
||||
@@ -1111,7 +1113,9 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
commonCnd.and("r.isNormal", "=", true);
|
||||
commonCnd.and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL));
|
||||
commonCnd.and("signingUptime", "<=", DateUtil.now());
|
||||
|
||||
if (StrUtil.isNotBlank(editOther)) {
|
||||
commonCnd.and("r.id", "!=", editOther);
|
||||
}
|
||||
|
||||
//今年是否报名,不管省内省外
|
||||
Cnd nowYearCnd = commonCnd.clone();
|
||||
@@ -1127,13 +1131,11 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
twoYearOutSql.setCondition(twoYearOutCnd);
|
||||
List<NutMap> twoYearOutMapList = listMap(twoYearOutSql);
|
||||
|
||||
|
||||
//今年是否报名,不管报省内还是省外,还是旅行社
|
||||
if (nowYearMapList.size() >= travelFrequency) {
|
||||
return Map.of(false, "您已报名其他线路");
|
||||
}
|
||||
|
||||
|
||||
//省外线路判断
|
||||
if (trrt.getValue() == TheRapyRecuperationType.provinceOutLine.getValue()) {
|
||||
//三年内有没有参加过省外
|
||||
@@ -1168,6 +1170,10 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
if (enrollList.size() >= result) {
|
||||
return Map.of(false, "已报人数超过" + (proportion * 100) + "%,不能报名");
|
||||
}
|
||||
} else if ("fixedUser".equals(outsideQuotaMode)) {
|
||||
if (!config.getFixedUserList().contains(ShiroUtil.getUserId())) {
|
||||
return Map.of(false, "您不在省外报名人员范围内,如有疑问请及时联系校工会");
|
||||
}
|
||||
} else if ("unionRatio".equals(outsideQuotaMode)) {
|
||||
// 分工会名额限制
|
||||
String unionId = Vi.getUnionId();
|
||||
@@ -1263,66 +1269,65 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
}
|
||||
|
||||
//判断一年报几次
|
||||
public Map<Boolean, String> validCountOneYear(String loginName, int travelFrequency) {
|
||||
public Map<Boolean, String> validCountOneYear(String loginName, int travelFrequency, String editOther) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("loginName", "=", loginName);
|
||||
cnd.and("isNormal", "=", true);
|
||||
cnd.and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear());
|
||||
int joinCount = dao().count(TheRapyRecuperationEnroll.class, cnd);
|
||||
|
||||
if (joinCount >= travelFrequency) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
us.id,
|
||||
line.regionalNature
|
||||
FROM
|
||||
the_rapy_recuperation_line_union_select us
|
||||
LEFT JOIN the_rapy_recuperation_line line ON line.id = us.lineId
|
||||
WHERE
|
||||
YEAR(us.signUpStartTime) = YEAR(NOW())
|
||||
""");
|
||||
List<NutMap> usList = listMap(sql);
|
||||
|
||||
List<String> unionInSelectIds = usList.stream().filter(v -> "省内".equals(v.getString("regionalNature"))).map(v -> v.getString("id")).toList();
|
||||
List<String> unionOutSelectIds = usList.stream().filter(v -> "省外".equals(v.getString("regionalNature"))).map(v -> v.getString("id")).toList();
|
||||
|
||||
|
||||
// List<TheRapyRecuperationLine> inList = dao().query(TheRapyRecuperationLine.class, Cnd.where("regionalNature", "=", "省内"));
|
||||
// List<TheRapyRecuperationLineUnionSelect> unionInSelects = dao().query(TheRapyRecuperationLineUnionSelect.class, Cnd.where("lineId", "in", inList.stream().map(TheRapyRecuperationLine::getId).collect(Collectors.toList())));
|
||||
// List<TheRapyRecuperationLine> outList = dao().query(TheRapyRecuperationLine.class, Cnd.where("regionalNature", "=", "省外"));
|
||||
// List<TheRapyRecuperationLineUnionSelect> unionOutSelects = dao().query(TheRapyRecuperationLineUnionSelect.class, Cnd.where("lineId", "in", outList.stream().map(TheRapyRecuperationLine::getId).collect(Collectors.toList())));
|
||||
//是否选择省外
|
||||
int inCount = dao().count("the_rapy_recuperation_enroll", Cnd.where("loginName", "=", ShiroUtil.getPrincipalProperty("loginname"))
|
||||
.and("takePartInLineId", "in", unionInSelectIds)
|
||||
.and("isNormal", "=", true)
|
||||
.and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear()));
|
||||
//是否报省外
|
||||
int outCount = dao().count("the_rapy_recuperation_enroll", Cnd.where("loginName", "=", ShiroUtil.getPrincipalProperty("loginname"))
|
||||
.and("takePartInLineId", "in", unionOutSelectIds)
|
||||
.and("isNormal", "=", true)
|
||||
.and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear()));
|
||||
//是否报旅行社
|
||||
int travelCount = dao().count("the_rapy_recuperation_enroll", Cnd.where("loginName", "=", ShiroUtil.getPrincipalProperty("loginname"))
|
||||
.and(Cnd.exps("takePartInLineId", "is", null).or("takePartInLineId", "=", ""))
|
||||
.and("isNormal", "=", true)
|
||||
.and("takePartInTravelAgencyId", "is not", null)
|
||||
.and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear()));
|
||||
//是否报酒店
|
||||
int hotelCount = dao().count("the_rapy_recuperation_enroll", Cnd.where("loginName", "=", ShiroUtil.getPrincipalProperty("loginname"))
|
||||
.and("takePartInLineId", "is", null).and("isNormal", "=", true)
|
||||
.and("takePartInBaseManagementId", "is not", null)
|
||||
.and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear()));
|
||||
String str = "";
|
||||
if (inCount > 0) {
|
||||
str = "省内线路";
|
||||
} else if (outCount > 0) {
|
||||
str = "省外线路";
|
||||
} else if (travelCount > 0) {
|
||||
str = "旅行社";
|
||||
} else if (hotelCount > 0) {
|
||||
str = "酒店";
|
||||
}
|
||||
if (joinCount >= travelFrequency && StrUtil.isBlank(editOther)) {
|
||||
// Sql sql = Sqls.create("""
|
||||
// SELECT
|
||||
// us.id,
|
||||
// line.regionalNature
|
||||
// FROM
|
||||
// the_rapy_recuperation_line_union_select us
|
||||
// LEFT JOIN the_rapy_recuperation_line line ON line.id = us.lineId
|
||||
// WHERE
|
||||
// YEAR(us.signUpStartTime) = YEAR(NOW())
|
||||
// """);
|
||||
// List<NutMap> usList = listMap(sql);
|
||||
//
|
||||
// List<String> unionInSelectIds = usList.stream().filter(v -> "省内".equals(v.getString("regionalNature"))).map(v -> v.getString("id")).toList();
|
||||
// List<String> unionOutSelectIds = usList.stream().filter(v -> "省外".equals(v.getString("regionalNature"))).map(v -> v.getString("id")).toList();
|
||||
//
|
||||
//
|
||||
//// List<TheRapyRecuperationLine> inList = dao().query(TheRapyRecuperationLine.class, Cnd.where("regionalNature", "=", "省内"));
|
||||
//// List<TheRapyRecuperationLineUnionSelect> unionInSelects = dao().query(TheRapyRecuperationLineUnionSelect.class, Cnd.where("lineId", "in", inList.stream().map(TheRapyRecuperationLine::getId).collect(Collectors.toList())));
|
||||
//// List<TheRapyRecuperationLine> outList = dao().query(TheRapyRecuperationLine.class, Cnd.where("regionalNature", "=", "省外"));
|
||||
//// List<TheRapyRecuperationLineUnionSelect> unionOutSelects = dao().query(TheRapyRecuperationLineUnionSelect.class, Cnd.where("lineId", "in", outList.stream().map(TheRapyRecuperationLine::getId).collect(Collectors.toList())));
|
||||
// //是否选择省外
|
||||
// int inCount = dao().count("the_rapy_recuperation_enroll", Cnd.where("loginName", "=", ShiroUtil.getPrincipalProperty("loginname"))
|
||||
// .and("takePartInLineId", "in", unionInSelectIds)
|
||||
// .and("isNormal", "=", true)
|
||||
// .and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear()));
|
||||
// //是否报省外
|
||||
// int outCount = dao().count("the_rapy_recuperation_enroll", Cnd.where("loginName", "=", ShiroUtil.getPrincipalProperty("loginname"))
|
||||
// .and("takePartInLineId", "in", unionOutSelectIds)
|
||||
// .and("isNormal", "=", true)
|
||||
// .and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear()));
|
||||
// //是否报旅行社
|
||||
// int travelCount = dao().count("the_rapy_recuperation_enroll", Cnd.where("loginName", "=", ShiroUtil.getPrincipalProperty("loginname"))
|
||||
// .and(Cnd.exps("takePartInLineId", "is", null).or("takePartInLineId", "=", ""))
|
||||
// .and("isNormal", "=", true)
|
||||
// .and("takePartInTravelAgencyId", "is not", null)
|
||||
// .and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear()));
|
||||
// //是否报酒店
|
||||
// int hotelCount = dao().count("the_rapy_recuperation_enroll", Cnd.where("loginName", "=", ShiroUtil.getPrincipalProperty("loginname"))
|
||||
// .and("takePartInLineId", "is", null).and("isNormal", "=", true)
|
||||
// .and("takePartInBaseManagementId", "is not", null)
|
||||
// .and("YEAR(signingUptime)", "=", io.v.nutz.base.utils.DateUtil.getYear()));
|
||||
// String str = "";
|
||||
// if (inCount > 0) {
|
||||
// str = "省内线路";
|
||||
// } else if (outCount > 0) {
|
||||
// str = "省外线路";
|
||||
// } else if (travelCount > 0) {
|
||||
// str = "旅行社";
|
||||
// } else if (hotelCount > 0) {
|
||||
// str = "酒店";
|
||||
// }
|
||||
return Map.of(false, "您已报过其他线路,如有疑问请联系分工会主席!");
|
||||
}
|
||||
return Map.of(true, "成功");
|
||||
@@ -1401,7 +1406,8 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
GROUP_CONCAT(ec.userName) as companionUserNames,
|
||||
l.lotName,
|
||||
au.stateName,
|
||||
au.stateColor
|
||||
au.stateColor,
|
||||
COUNT(ec.id) AS companionCount
|
||||
FROM
|
||||
the_rapy_recuperation_enroll e
|
||||
LEFT JOIN sys_union gh ON gh.id = e.takePartInUnionId
|
||||
@@ -1477,9 +1483,14 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
* @return {@link TheRapyRecuperationEnroll}
|
||||
*/
|
||||
@Override
|
||||
public TheRapyRecuperationEnroll findSignUpInfoById(String id) {
|
||||
TheRapyRecuperationEnroll enroll = fetch(id);
|
||||
return fetchLinks(enroll, "companionList|bedInfo");
|
||||
public TheRapyRecuperationEnroll findSignUpInfoById(String id, String editOther) {
|
||||
if (StrUtil.isNotBlank(editOther)) {
|
||||
TheRapyRecuperationEnroll enroll = fetch(editOther);
|
||||
return fetchLinks(enroll, "companionList|bedInfo");
|
||||
} else {
|
||||
TheRapyRecuperationEnroll enroll = fetch(id);
|
||||
return fetchLinks(enroll, "companionList|bedInfo");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1571,4 +1582,41 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TheRapyRecuperationConfig getConfig() {
|
||||
//配置信息
|
||||
TheRapyRecuperationConfig config;
|
||||
// 丛redis里面去配置信息
|
||||
String configRedis = redisService.get(RedisConstant.REDIS_KEY_THE_RAPY_RECU_CONFIG_CACHE);
|
||||
if (StrUtil.isNotBlank(configRedis)) {
|
||||
try {
|
||||
config = JSONUtil.toBean(configRedis, TheRapyRecuperationConfig.class);
|
||||
} catch (Exception e) {
|
||||
config = dao().fetch(TheRapyRecuperationConfig.class);
|
||||
// 如果是特定人员报名,将这些人存在redis里边,方便查询
|
||||
if ("fixedUser".equals(config.getOutsideQuotaMode())) {
|
||||
Sql sql = Sqls.create("select userId from the_rapy_recuperation_can_apply_out_user");
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao().execute(sql);
|
||||
List<String> stringList = sql.getList(String.class);
|
||||
config.setFixedUserList(stringList);
|
||||
}
|
||||
redisService.set(RedisConstant.REDIS_KEY_THE_RAPY_RECU_CONFIG_CACHE, JSONUtil.toJsonStr(config));
|
||||
}
|
||||
} else {
|
||||
config = dao().fetch(TheRapyRecuperationConfig.class);
|
||||
// 如果是特定人员报名,将这些人存在redis里边,方便查询
|
||||
if ("fixedUser".equals(config.getOutsideQuotaMode())) {
|
||||
Sql sql = Sqls.create("select userId from the_rapy_recuperation_can_apply_out_user");
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao().execute(sql);
|
||||
List<String> stringList = sql.getList(String.class);
|
||||
config.setFixedUserList(stringList);
|
||||
}
|
||||
redisService.set(RedisConstant.REDIS_KEY_THE_RAPY_RECU_CONFIG_CACHE, JSONUtil.toJsonStr(config));
|
||||
}
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,193 +1,179 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="报名信息" name="1">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
本人信息
|
||||
</h3>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="工号">{{ viewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ viewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="是否转入转出">
|
||||
<span class="label label-primary">
|
||||
<sapn v-if="viewData.takePartInUnionId!=union_id">转出报名</sapn>
|
||||
<sapn v-else-if="viewData.selfUnionId!=union_id">转入报名</sapn>
|
||||
<sapn v-else>本公会报名</sapn>
|
||||
</span>
|
||||
</el-descriptions-item>-->
|
||||
<div>
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="报名信息" name="1">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
本人信息
|
||||
</h3>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="工号">{{ viewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ viewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="是否转入转出">
|
||||
<span class="label label-primary">
|
||||
<sapn v-if="viewData.takePartInUnionId!=union_id">转出报名</sapn>
|
||||
<sapn v-else-if="viewData.selfUnionId!=union_id">转入报名</sapn>
|
||||
<sapn v-else>本公会报名</sapn>
|
||||
</span>
|
||||
</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signingUptime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="参加活动时间">{{
|
||||
viewData.specificTime ? viewData.specificTime : '暂未更新'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实际出行时间">{{
|
||||
viewData.takePartInTime ? viewData.takePartInTime : '暂未更新'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signingUptime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="参加活动时间">{{
|
||||
viewData.specificTime ? viewData.specificTime : "暂未更新"
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实际出行时间">{{
|
||||
viewData.takePartInTime ? viewData.takePartInTime : "暂未更新"
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{ viewData.travelAgencyName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否含随行人">
|
||||
<span class="label label-primary">
|
||||
{{ (viewData.companionList && viewData.companionList.length > 0) ? '携带' : '未携带' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<template v-if="modifyConfig.bedInfo && viewData.bedInfo">
|
||||
<el-descriptions-item label="房间信息">
|
||||
<span class="label label-primary">
|
||||
{{ viewData.bedInfo.bedType }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="床位">{{
|
||||
viewData.bedInfo.bedNum ? viewData.bedInfo.bedNum : '暂无'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{ viewData.travelAgencyName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否含随行人">
|
||||
<span class="label label-primary">
|
||||
{{ (viewData.companionList && viewData.companionList.length > 0) ? "携带" : "未携带" }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="意向拼床人">
|
||||
{{ viewData.bedInfo.otherSleepUser ? viewData.bedInfo.otherSleepUser : '暂无' }}
|
||||
</el-descriptions-item>-->
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div v-if="modifyConfig.familyInfo == 2" class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
随行人信息
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body" style="border: 1px solid rgb(235, 238, 245)">
|
||||
<el-table :data="viewData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="手机号" prop="mobile"></el-table-column>
|
||||
<!-- <el-table-column label="床型" prop="bedType">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo.bedType }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="床位" prop="bedNum">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo.bedNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="意向拼床人" prop="otherSleepUser">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo.otherSleepUser ? row.bedInfo.otherSleepUser : '暂无' }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="所属分工会审核信息" name="2" v-if="viewData.selfUnionAuditId && viewData.selfUnionAudit">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
审核信息
|
||||
</h3>
|
||||
</div>
|
||||
<template v-if="viewData.takePartInLineId">
|
||||
<el-descriptions-item label="房间数量">{{ viewData.roomCountName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用房备注">{{ viewData.roomRemarkName + (viewData.roommate ? viewData.roommate : "") }}</el-descriptions-item>
|
||||
<el-descriptions-item label="其他备注" span="2">{{ viewData.otherRemark }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="审核人">
|
||||
{{ viewData.selfUnionAudit.username }}({{ viewData.selfUnionAudit.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.selfUnionAudit.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">{{ viewData.selfUnionAudit.auditOpinion }}</el-descriptions-item>
|
||||
<el-descriptions-item label="第二意向线路">{{ viewData.intentionLineName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="携带家属人数">{{ viewData.carryFamilyNum }}</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="意向线路分工会审核信息" name="3" v-if="viewData.joinLineUnionAuditId && viewData.joinLineUnionAudit">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
审核信息
|
||||
</h3>
|
||||
</div>
|
||||
<div v-if="modifyConfig.familyInfo == 2" class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
随行人信息
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body" style="border: 1px solid rgb(235, 238, 245)">
|
||||
<el-table :data="viewData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="手机号" prop="mobile"></el-table-column>
|
||||
<el-table-column label="身高" prop="height"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="所属分工会审核信息" name="2"
|
||||
v-if="viewData.selfUnionAuditId && viewData.selfUnionAudit">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
审核信息
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="审核人">
|
||||
{{ viewData.joinLineUnionAudit.username }}({{ viewData.joinLineUnionAudit.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.joinLineUnionAudit.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">{{ viewData.joinLineUnionAudit.auditOpinion }}</el-descriptions-item>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="审核人">
|
||||
{{ viewData.selfUnionAudit.username }}({{ viewData.selfUnionAudit.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.selfUnionAudit.auditTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">{{ viewData.selfUnionAudit.auditOpinion }}
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<slot name="handle"></slot>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="意向线路分工会审核信息" name="3"
|
||||
v-if="viewData.joinLineUnionAuditId && viewData.joinLineUnionAudit">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
审核信息
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="审核人">
|
||||
{{ viewData.joinLineUnionAudit.username }}({{ viewData.joinLineUnionAudit.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.joinLineUnionAudit.auditTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">{{ viewData.joinLineUnionAudit.auditOpinion }}
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<slot name="handle"></slot>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
union_id: {
|
||||
type: String,
|
||||
default: "",
|
||||
props: {
|
||||
union_id: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: "1",
|
||||
viewData: {
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
},
|
||||
loading: false,
|
||||
modifyConfig:{}
|
||||
components: {
|
||||
"line-info": httpVueLoader("/components/theRapyRecuperation/LineInfo.vue")
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: "1",
|
||||
viewData: {
|
||||
companionList: [],
|
||||
bedInfo: {}
|
||||
},
|
||||
loading: false,
|
||||
modifyConfig: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne(id) {
|
||||
this.loading = true
|
||||
const resp = await $.get("/platform/theRapyRecuperation/TheRapyAudit/findOne", { id })
|
||||
this.loading = false
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data.viewData
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$notify.warning({ title: "警告", message: resp.data })
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
openView(id) {
|
||||
this.findOne(id)
|
||||
},
|
||||
openAudit(id, activeName) {
|
||||
this.findOne(id)
|
||||
this.activeName = activeName
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post("/platform/theRapyRecuperation/TheRapyConfig/findOne")
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getModifyConfig()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne(id) {
|
||||
this.loading = true
|
||||
const resp = await $.get("/platform/theRapyRecuperation/TheRapyAudit/findOne", {id})
|
||||
this.loading = false
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data.viewData
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$notify.warning({title: '警告', message: resp.data})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
openView(id) {
|
||||
this.findOne(id)
|
||||
},
|
||||
openAudit(id, activeName) {
|
||||
this.findOne(id)
|
||||
this.activeName = activeName
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getModifyConfig();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -116,6 +116,28 @@
|
||||
<script>
|
||||
const APP_DOMAIN = "${AppDomain!}"
|
||||
const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
const MOBILE_APP = new Vue({
|
||||
el: '#container',
|
||||
data() {
|
||||
return{}
|
||||
},
|
||||
methods: {
|
||||
async flushCache() {
|
||||
const day = moment().format('YYYY-MM-DD')
|
||||
if (window.localStorage.getItem('flushCache') !== day) {
|
||||
debugger
|
||||
const { code, msg } = await $.post('/platform/home/clearCache')
|
||||
if (code === 0) {
|
||||
location.reload()
|
||||
}
|
||||
window.localStorage.setItem('flushCache', day)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.flushCache()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<div id="container">
|
||||
|
||||
@@ -197,6 +197,14 @@ layout("/mobile/platform.html"){
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.sign_div {
|
||||
background-color: white;
|
||||
margin-bottom: 16px;
|
||||
padding: 18px;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.pdf_div {
|
||||
padding-bottom: 70px;
|
||||
height: calc(100vh - 46px - 170px - 60px - 24px);
|
||||
@@ -265,12 +273,12 @@ layout("/mobile/platform.html"){
|
||||
<template v-if="baseData.isNormal==0&&baseData.isNormalFalse>0">
|
||||
<van-button @click="join"
|
||||
class="join">
|
||||
{{ (fromUrlByMy == 'editDo') ? '修改报名' : '我要报名' }}
|
||||
{{ (fromUrlByMy == 'editDo' || editOther) ? '修改报名' : '我要报名' }}
|
||||
</van-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-button v-if="moment().unix() <= moment(baseData.signUpEndTime).unix()" @click="join" class="join">
|
||||
{{ (fromUrlByMy == 'editDo') ? '修改报名' : '我要报名' }}
|
||||
{{ (fromUrlByMy == 'editDo' || editOther) ? '修改报名' : '我要报名' }}
|
||||
</van-button>
|
||||
<van-button v-if="moment().unix() > moment(baseData.signUpEndTime).unix()" class="join">报名结束</van-button>
|
||||
</template>
|
||||
@@ -279,10 +287,10 @@ layout("/mobile/platform.html"){
|
||||
<!--报名弹出框-->
|
||||
<van-popup v-model:show="joinPopup" position="right" class="joinPopup">
|
||||
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar>
|
||||
<van-notice-bar
|
||||
background="#ecf9ff" color="red" left-icon="volume-o"
|
||||
text="温馨提示:报名定点疗休养需签署【定点自由行申请表】,填写基础信息和签字后会同步在申请表中,点击查看按钮可展示申请表"
|
||||
></van-notice-bar>
|
||||
<van-notice-bar color="#1989fa" background="#ecf9ff" left-icon="info-o">
|
||||
温馨提示:报名定点疗休养需签署【定点自由行申请表】,填写基础信息和签字后会同步在申请表中,点击查看按钮可展示申请表
|
||||
</van-notice-bar>
|
||||
|
||||
<div class="join_content">
|
||||
|
||||
<van-form @submit="joinSubmit">
|
||||
@@ -319,137 +327,31 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--床位信息-->
|
||||
<!--<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
房间信息
|
||||
<div class="sign_div">
|
||||
<div style="display: flex">
|
||||
<van-checkbox v-model="hasReadSafe" shape="square" @change="readChangeSafe" class="mr10"></van-checkbox>
|
||||
我已查看
|
||||
<span @click="openReadSafe" style="color: #0e5996; text-decoration: underline">
|
||||
《安全告知书》
|
||||
</span>
|
||||
<van-tag @click="openReadSafe" size="large" type="primary" color="#1867b0">查看</van-tag>
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field :rules="[{ required: true, message: '请选择是否包房' }]" label="是否包房" name="bedType">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.bedInfo.bedType">
|
||||
<van-radio name="包房" shape="square">包房</van-radio>
|
||||
<van-radio name="不包房" shape="square">不包房</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<div>
|
||||
<span style="color: red;margin-left: 14px;font-size: 14px">包房需自费;不包房两位老师一间且随机分配</span>
|
||||
</div>
|
||||
<!–<van-field @click="self = true; roomVisible = true" readonly is-link label="房间" name="bedType"
|
||||
placeholder="请选择房间" v-model="formData.bedInfo.bedType"
|
||||
:rules="[{ required: true }]"></van-field>–>
|
||||
<!–<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true"
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]"
|
||||
label="是否拼房" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
|
||||
v-model="formData.bedInfo.otherSleepUser"
|
||||
:rules="[{ required: true }]"></van-field>–>
|
||||
<div style="display: flex; margin-top: 10px" v-if="formData.specificTime && formData.sign">
|
||||
<van-checkbox v-model="hasRead" shape="square" @change="readChange" class="mr10"></van-checkbox>
|
||||
我已查看
|
||||
<span @click="openRead" style="color: #0e5996; text-decoration: underline">
|
||||
《定点自由行申请表》
|
||||
</span>
|
||||
<van-tag @click="openRead" size="large" type="primary" color="#1867b0">查看</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!–随行人信息–>
|
||||
<div v-if="index != 2" class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header"
|
||||
style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">随行人信息</span>
|
||||
<div>
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="configData.familyInfo === 2">
|
||||
<div>
|
||||
<span style="color: red;margin-left: 20px;font-size: 14px">限填写3岁以上70岁以下随行人</span>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
|
||||
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<!–<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>–>
|
||||
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
|
||||
type="digit" :rules="[{ required: true }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
<van-radio name="男" shape="square">男</van-radio>
|
||||
<van-radio name="女" shape="square">女</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="身份证件" name="idCard" placeholder="请填写身份证号"
|
||||
:rules="[{ required: true }]" maxlength="18"
|
||||
@input="getAgeAndSex(item)" v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号"
|
||||
:rules="[{ required: true }]" type="digit"
|
||||
v-model="item.mobile"></van-field>
|
||||
<van-field @click="companionVisible = true" readonly is-link label="与本人关系"
|
||||
name="relation"
|
||||
placeholder="随行人与本人关系" v-model="item.relation"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
|
||||
<!–<van-field @click="self = false; roomVisible = true" readonly is-link label="房间"
|
||||
name="bedType" placeholder="请选择房间"
|
||||
v-model="item.bedInfo.bedType"></van-field>
|
||||
<div style="font-size: 8px; color:orangered; padding-left: 16px; padding-bottom: 4px">
|
||||
提醒:如果跟报名人员同一房间,无须选择!
|
||||
</div>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'" @click="self = false; bedVisible = true"
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="item.bedInfo.bedNum"></van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'"
|
||||
:rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
|
||||
v-model="item.bedInfo.otherSleepUser"></van-field>–>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
|
||||
<span>
|
||||
如有随行人出行,请添加随行人
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<van-field label="家属数量" name="familyNumber" placeholder="请填写家属数量" v-model="formData.familyNumber"
|
||||
type="digit" :rules="[{ required: true }]"></van-field>
|
||||
</template>
|
||||
</div>-->
|
||||
<div class="submitButton">
|
||||
<div class="submitButton" v-if="showButton">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
<div class="submitButton" style="margin-top: -10px">
|
||||
<van-button class="join join_submit" @click="showApplyForm">查看定点自由行申请表</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<!--房间类型弹出框-->
|
||||
@@ -482,21 +384,25 @@ layout("/mobile/platform.html"){
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-calendar title="出行日期选择" v-model="timeVisible" :show-confirm="false"
|
||||
:min-date="minDate" :max-date="maxDate"
|
||||
ref="cal" @confirm="calConfirm" :style="{ height: '660px' }"></van-calendar>
|
||||
|
||||
<van-action-sheet v-model="readVisibleSafe" title="安全告知书">
|
||||
<van-divider :style="{ color: 'orange', fontSize: '12px' }">上下滑动翻页,单击查看,再单击返回</van-divider>
|
||||
<div id="readFile" style="height: 530px; overflow-y: auto"></div>
|
||||
<div class="submitButton">
|
||||
<van-button @click="onReadSafe" class="join join_submit" style="margin: 10px 0">我已阅读确认</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-popup v-model="applyFormShow" closeable position="right"
|
||||
:style="{ height: '100%',width: '100%' }" get-container="body">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="applyFormShow = false" fixed left-arrow placeholder title="定点自由行申请表"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div id="basePdf" style="height: 80vh"></div>
|
||||
|
||||
</van-popup>
|
||||
<van-action-sheet v-model="readVisible" title="定点自由行申请表">
|
||||
<van-divider :style="{ color: 'orange', fontSize: '12px' }">上下滑动翻页,单击查看,再单击返回</van-divider>
|
||||
<div id="basePdf" style="height: 530px; overflow-y: auto"></div>
|
||||
<div class="submitButton">
|
||||
<van-button @click="onRead" class="join join_submit" style="margin: 10px 0">我已阅读确认</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
@@ -512,6 +418,7 @@ layout("/mobile/platform.html"){
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
showButton: true,
|
||||
isPdf: false,
|
||||
active: 0,
|
||||
minDate: new Date(2010, 0, 1),
|
||||
@@ -552,23 +459,66 @@ layout("/mobile/platform.html"){
|
||||
timeVisible: false,
|
||||
|
||||
// 定点疗休养申请表相关
|
||||
applyFormShow: false,
|
||||
readVisible: false,
|
||||
hasRead: false,
|
||||
clickRead: false,
|
||||
|
||||
// 修改其他线路相关
|
||||
editOther: '',
|
||||
|
||||
// 安全告知书相关
|
||||
readVisibleSafe: false,
|
||||
clickReadSafe: false,
|
||||
hasReadSafe: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 展示安全告知书
|
||||
async openReadSafe(){
|
||||
this.readVisibleSafe = true
|
||||
this.$nextTick(() => {
|
||||
if (this.configData.files && this.configData.files.length > 0) {
|
||||
pdfh5 = new Pdfh5('#readFile', {
|
||||
pdfurl: CREATE_PREVIEW_URL(this.configData.files[0].id),
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onReadSafe() {
|
||||
this.clickReadSafe = true
|
||||
this.hasReadSafe = true
|
||||
this.readVisibleSafe = false
|
||||
},
|
||||
readChangeSafe() {
|
||||
if (this.clickReadSafe === false) {
|
||||
this.$toast('请先阅读安全告知书')
|
||||
this.hasReadSafe = false
|
||||
}
|
||||
},
|
||||
// 展示申请表
|
||||
async showApplyForm(){
|
||||
async openRead(){
|
||||
const url = '/platform/theRapyRecuperation/baseManagement/showBaseApplyPdf?baseName='
|
||||
+ (this.formData.baseName ? this.formData.baseName : '') + '&specificTime=' + (this.formData.specificTime ? this.formData.specificTime : '')
|
||||
+ '&sign=' + (this.formData.sign ? this.configData.sign : '') + '&idCard=' + (this.formData.idCard ? this.formData.idCard : '')
|
||||
|
||||
this.applyFormShow = true
|
||||
this.readVisible = true
|
||||
this.$nextTick(() => {
|
||||
pdfh5 = new Pdfh5('#basePdf', {
|
||||
pdfurl: url,
|
||||
});
|
||||
})
|
||||
},
|
||||
onRead() {
|
||||
this.clickRead = true
|
||||
this.hasRead = true
|
||||
this.readVisible = false
|
||||
},
|
||||
readChange() {
|
||||
if (this.clickRead === false) {
|
||||
this.$toast('请先阅读定点自由行申请表')
|
||||
this.hasRead = false
|
||||
}
|
||||
},
|
||||
// 出行日期相关
|
||||
calConfirm(date) {
|
||||
console.log(date)
|
||||
@@ -613,26 +563,29 @@ layout("/mobile/platform.html"){
|
||||
return value != null
|
||||
},
|
||||
async joinSubmit() {
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
|
||||
if (this.hasReadSafe === false) {
|
||||
this.$toast('请先阅读安全告知书')
|
||||
return
|
||||
}
|
||||
if (this.hasRead === false) {
|
||||
this.$toast('请先阅读定点自由行申请表')
|
||||
return
|
||||
}
|
||||
if (!this.formData.sign) {
|
||||
this.$toast.fail('请签字')
|
||||
return
|
||||
}
|
||||
|
||||
this.formData.editOther = this.editOther ? this.editOther : ''
|
||||
const cloneData = clone(this.formData)
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '请确认您已阅览【定点自由行申请表】,是否确认提交报名?',
|
||||
confirmButtonText: '确认',
|
||||
message: '请确保信息填写无误,是否确认提交?',
|
||||
confirmButtonText: '提交',
|
||||
cancelButtonText: '取消',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
this.showButton = false
|
||||
const loading = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
@@ -641,21 +594,21 @@ layout("/mobile/platform.html"){
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForBaseManagement', {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
if (resp.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
|
||||
}
|
||||
}, 500)
|
||||
loading.clear()
|
||||
if (resp.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '报名成功',
|
||||
}).then(() => {
|
||||
location.replace('/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index)
|
||||
})
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: resp.msg,
|
||||
})
|
||||
this.showButton = true
|
||||
}
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
})
|
||||
@@ -671,7 +624,8 @@ layout("/mobile/platform.html"){
|
||||
enroll: JSON.stringify({
|
||||
takePartInBaseManagementId: this.baseData.id,
|
||||
isNormal: this.baseData.isNormal,
|
||||
id: this.enrollId
|
||||
id: this.enrollId,
|
||||
editOther: this.editOther
|
||||
}),
|
||||
})
|
||||
if (re.code !== 0) {
|
||||
@@ -682,18 +636,24 @@ layout("/mobile/platform.html"){
|
||||
return
|
||||
}
|
||||
if (this.fromUrlByMy !== 'editDo') {
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@shiro.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
baseName: this.baseData.baseName,
|
||||
takePartInBaseManagementId: this.baseData.id,
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
if (this.editOther) {
|
||||
this.$set(this.formData, 'baseName', this.baseData.baseName)
|
||||
this.$set(this.formData, 'takePartInLineId', null)
|
||||
this.$set(this.formData, 'takePartInUnionId', null)
|
||||
this.$set(this.formData, 'takePartInTravelAgencyId', null)
|
||||
this.$set(this.formData, 'takePartInBaseManagementId', this.baseData.id)
|
||||
} else {
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@shiro.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
baseName: this.baseData.baseName,
|
||||
takePartInBaseManagementId: this.baseData.id,
|
||||
companionList: [],
|
||||
}
|
||||
}
|
||||
// this.$set(this.formData.bedInfo, 'bedType', '大床房')
|
||||
}
|
||||
if(this.index == 3) {
|
||||
await this.getTimeArray()
|
||||
@@ -704,7 +664,6 @@ layout("/mobile/platform.html"){
|
||||
const res = await $.get('/platform/theRapyRecuperation/baseManagement/selectBaseAllInfo', {
|
||||
id: this.id
|
||||
})
|
||||
debugger
|
||||
if (res.code === 0) {
|
||||
this.baseData = res.data
|
||||
this.formData.baseName = this.baseData.baseName
|
||||
@@ -730,19 +689,14 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
//修改时查询报名信息,进行回显
|
||||
async findSignUpInfoById() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById', {
|
||||
id: this.enrollId,
|
||||
editOther: this.editOther
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (this.formData.bedInfo === null) {
|
||||
this.formData.bedInfo = {}
|
||||
}
|
||||
if (this.formData.companionList) {
|
||||
this.formData.companionList.forEach(item => {
|
||||
if (item.bedInfo === null) {
|
||||
item.bedInfo = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.formData.bedInfo = {}
|
||||
this.formData.companionList = []
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
@@ -858,13 +812,16 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
// 修改其他线路标识
|
||||
this.editOther = getQueryString('editOther') ? getQueryString('editOther') : ''
|
||||
|
||||
this.id = getQueryString('id') ? getQueryString('id') : ''
|
||||
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : ''
|
||||
this.index = getQueryString('index') ? getQueryString('index') : ''
|
||||
await this.getConfigData()
|
||||
//编辑传出来的参数
|
||||
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : ''
|
||||
if (this.enrollId) {
|
||||
if (this.enrollId || this.editOther) {
|
||||
await this.findSignUpInfoById()
|
||||
}
|
||||
await this.getData()
|
||||
@@ -881,50 +838,30 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
}catch (e) {
|
||||
this.isPdf = true
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
vant.ImagePreview({
|
||||
images: [event.target.src],
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
pdfh5.on("complete", function () {
|
||||
const imgDoc = document.querySelectorAll('img')
|
||||
let array = []
|
||||
let classArray = []
|
||||
imgDoc.forEach(o => {
|
||||
if(o.getAttribute('class') !== 'top_icon') {
|
||||
classArray.push(o.getAttribute('class'))
|
||||
array.push(o.getAttribute('src'))
|
||||
}
|
||||
})
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
const index = classArray.indexOf(event.target.className)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
images: array,
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.scrollToTop)
|
||||
document.addEventListener('click', function (event) {
|
||||
const imgDoc = document.querySelectorAll('img')
|
||||
let array = []
|
||||
let classArray = []
|
||||
imgDoc.forEach(o => {
|
||||
if(o.getAttribute('class') !== 'top_icon') {
|
||||
classArray.push(o.getAttribute('class'))
|
||||
array.push(o.getAttribute('src'))
|
||||
}
|
||||
})
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG') {
|
||||
vant.ImagePreview([event.target.src])
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
const index = array.indexOf(event.target.currentSrc)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
images: array,
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -15,10 +15,6 @@ layout("/mobile/platform.html"){
|
||||
display: block;
|
||||
}
|
||||
|
||||
.backTop {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 10px 10px 10px 10px;
|
||||
}
|
||||
@@ -219,6 +215,14 @@ layout("/mobile/platform.html"){
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.sign_div {
|
||||
background-color: white;
|
||||
margin-bottom: 16px;
|
||||
padding: 18px;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%
|
||||
}
|
||||
@@ -343,7 +347,7 @@ layout("/mobile/platform.html"){
|
||||
<!--底部报名按钮-->
|
||||
<div class="footer" v-if="fromUrlByMy != 'edit'">
|
||||
<van-button v-if="moment().unix() <= moment(lineData.signUpEndTime).unix()" @click="join"
|
||||
class="join">{{ enrollId ? '修改报名' : '我要报名' }}
|
||||
class="join">{{ (enrollId || editOther) ? '修改报名' : '我要报名' }}
|
||||
</van-button>
|
||||
<van-button v-if="moment().unix() > moment(lineData.signUpEndTime).unix()" class="join">报名结束
|
||||
</van-button>
|
||||
@@ -382,16 +386,15 @@ layout("/mobile/platform.html"){
|
||||
style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">随行人信息</span>
|
||||
<div>
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary"
|
||||
color="#1867b0">添加随行人</van-tag>
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="#1867b0">删除随行人</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="configData.familyInfo === 2">
|
||||
<div>
|
||||
<van-notice-bar color="#1989fa" background="#ecf9ff" left-icon="info-o">
|
||||
温馨提醒:限填写3岁以上70岁以下随行人。
|
||||
温馨提醒:限填写1岁以上70岁以下随行人。
|
||||
</van-notice-bar>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
@@ -403,8 +406,10 @@ layout("/mobile/platform.html"){
|
||||
<van-field label="身份证件" name="idCard" placeholder="输入身份证自动填充年龄与性别"
|
||||
:rules="[{ required: true }]" maxlength="18"
|
||||
@input="getAgeAndSex(item)" v-model="item.idCard"></van-field>
|
||||
<!--<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
|
||||
type="digit" :rules="[{ required: true }]" @input="(val) => {clearContent()}"></van-field>-->
|
||||
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
|
||||
type="digit" :rules="[{ required: true }]" @input="(val) => {clearContent()}"></van-field>
|
||||
type="digit" :rules="[{ required: true }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
@@ -423,14 +428,14 @@ layout("/mobile/platform.html"){
|
||||
<span>厘米</span>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="item.age !== '' && item.age <= 12" :rules="[{ required: true, message: '请选择床位信息' }]" label="床位信息" name="needBed">
|
||||
<template #input>
|
||||
<van-radio-group @change="(val) => {needBedChange(item)}" direction="horizontal" v-model="item.needBed">
|
||||
<van-radio :name="true" shape="square">需要床位</van-radio>
|
||||
<van-radio :name="false" shape="square">无需床位</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<!-- <van-field v-if="item.age !== '' && item.age <= 12" :rules="[{ required: true, message: '请选择床位信息' }]" label="床位信息" name="needBed">-->
|
||||
<!-- <template #input>-->
|
||||
<!-- <van-radio-group @change="(val) => {needBedChange(item)}" direction="horizontal" v-model="item.needBed">-->
|
||||
<!-- <van-radio :name="true" shape="square">需要床位</van-radio>-->
|
||||
<!-- <van-radio :name="false" shape="square">无需床位</van-radio>-->
|
||||
<!-- </van-radio-group>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-field>-->
|
||||
<!--<van-field @click="companionVisible = true" readonly is-link label="与本人关系"
|
||||
name="relation"
|
||||
placeholder="随行人与本人关系" v-model="item.relation"
|
||||
@@ -475,13 +480,41 @@ layout("/mobile/platform.html"){
|
||||
<van-field label="拼房人" name="roommate" :rules="[{ required: true }]"
|
||||
required v-if="formData.roomRemark === 2"
|
||||
placeholder="请填写拼房人" v-model="formData.roommate"></van-field>
|
||||
<van-field label="其他备注" name="otherRemark" placeholder="如有需要请填写"
|
||||
v-model="formData.otherRemark"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitButton">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
若此线路未达到成团要求,您的第二意向线路是
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field @click="intentionLineVisible = true" readonly is-link label="意向线路" name="intentionLineName"
|
||||
placeholder="请选择意向线路" v-model="formData.intentionLineName"
|
||||
required :rules="[{ required: true }]"></van-field>
|
||||
|
||||
<van-field @click="carryFamilyVisible = true" readonly is-link label="家属人数" name="carryFamilyNum"
|
||||
placeholder="请选择携带家属人数" v-model="formData.carryFamilyNum"
|
||||
required :rules="[{ required: true }]"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sign_div">
|
||||
<div style="display: flex">
|
||||
<van-checkbox v-model="hasRead" shape="square" @change="readChange" class="mr10"></van-checkbox>
|
||||
我已查看
|
||||
<span @click="openRead" style="color: #0e5996; text-decoration: underline">
|
||||
《安全告知书》
|
||||
</span>
|
||||
<van-tag @click="openRead" size="large" type="primary" color="#1867b0">查看</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitButton" v-if="showButton">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
@@ -528,6 +561,34 @@ layout("/mobile/platform.html"){
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-popup position="bottom" round v-model="intentionLineVisible">
|
||||
<van-picker
|
||||
title="第二意向线路" show-toolbar
|
||||
value-key="label"
|
||||
:columns="intentionLineColumns"
|
||||
@confirm="(val) => {formData.intentionLineName = val.label; formData.intentionLineId = val.value; intentionLineVisible = false}"
|
||||
@cancel="intentionLineVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-popup position="bottom" round v-model="carryFamilyVisible">
|
||||
<van-picker
|
||||
title="携带家属数量" show-toolbar
|
||||
:columns="carryFamilyColumns"
|
||||
@confirm="(value, index) => {formData.carryFamilyNum = value; carryFamilyVisible = false}"
|
||||
@cancel="carryFamilyVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-action-sheet v-model="readVisible" title="安全告知书">
|
||||
<van-divider :style="{ color: 'orange', fontSize: '12px' }">上下滑动翻页,单击查看,再单击返回</van-divider>
|
||||
<div id="readFile" style="height: 530px; overflow-y: auto"></div>
|
||||
<div class="submitButton">
|
||||
<van-button @click="onRead" class="join join_submit" style="margin: 10px 0">我已阅读确认</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -544,6 +605,7 @@ layout("/mobile/platform.html"){
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
showButton: true,
|
||||
roomRemarkVisible: false,
|
||||
isPdf: false,
|
||||
isLoad: false,
|
||||
@@ -556,11 +618,12 @@ layout("/mobile/platform.html"){
|
||||
],
|
||||
roomColumns: [],
|
||||
basicRoomRemarkColumns: [
|
||||
{label: '携带家属,包1间房', value: 1},
|
||||
{label: '携带家属,1间房', value: 1},
|
||||
{label: '已与其他老师自由组合共住1间房', value: 2},
|
||||
{label: '1人包房1间,额外支付单房差', value: 3},
|
||||
{label: '1间房,额外支付单房差', value: 3},
|
||||
{label: '正常报名', value: 4},
|
||||
{label: '随机拼房', value: 5},
|
||||
{label: '2间房,额外支付单房差', value: 6},
|
||||
],
|
||||
roomRemarkColumns: [],
|
||||
bedColumns: ['1', '2'],
|
||||
@@ -595,9 +658,45 @@ layout("/mobile/platform.html"){
|
||||
signType: '',
|
||||
takePartInTravelAgencyId: '',
|
||||
queryYear: '',
|
||||
|
||||
// 修改其他线路相关
|
||||
editOther: '',
|
||||
|
||||
// 第二意向线路相关
|
||||
intentionLineVisible: false,
|
||||
intentionLineColumns: [],
|
||||
carryFamilyVisible: false,
|
||||
carryFamilyColumns: [0, 1, 2, 3],
|
||||
|
||||
// 阅读安全告知书相关
|
||||
readVisible: false,
|
||||
hasRead: false,
|
||||
clickRead: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openRead() {
|
||||
this.readVisible = true
|
||||
this.$nextTick(() => {
|
||||
if (this.configData.files && this.configData.files.length > 0) {
|
||||
const pdf = new Pdfh5('#readFile', {
|
||||
pdfurl: CREATE_PREVIEW_URL(this.configData.files[0].id),
|
||||
})
|
||||
this.readPDFPicture(pdf)
|
||||
}
|
||||
})
|
||||
},
|
||||
onRead() {
|
||||
this.clickRead = true
|
||||
this.hasRead = true
|
||||
this.readVisible = false
|
||||
},
|
||||
readChange() {
|
||||
if (this.clickRead === false) {
|
||||
this.$toast('请先阅读安全告知书')
|
||||
this.hasRead = false
|
||||
}
|
||||
},
|
||||
roomRemarkClick() {
|
||||
if(!this.formData.roomCount) {
|
||||
this.$toast('请先选择房间数量')
|
||||
@@ -624,7 +723,6 @@ layout("/mobile/platform.html"){
|
||||
const sex = this.getGenderFromIdCard(value)
|
||||
this.$set(item, "sex", sex)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
roomCancel() {
|
||||
@@ -653,13 +751,19 @@ layout("/mobile/platform.html"){
|
||||
return value != null
|
||||
},
|
||||
async joinSubmit() {
|
||||
if (this.hasRead === false) {
|
||||
this.$toast('请先阅读安全告知书')
|
||||
return
|
||||
}
|
||||
|
||||
this.formData.editOther = this.editOther ? this.editOther : ''
|
||||
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
|
||||
if (cloneData.companionList) {
|
||||
for (let i = 0; i < cloneData.companionList.length; i++) {
|
||||
const companion = cloneData.companionList[i];
|
||||
@@ -675,8 +779,8 @@ layout("/mobile/platform.html"){
|
||||
this.$toast('随行人'+ (i+1) +'的身份证不正确')
|
||||
return
|
||||
} else {
|
||||
// 判断companion.age,是不是在3到70岁之间,不是就提示
|
||||
if (companion.age < 3 || companion.age > 70) {
|
||||
// 判断companion.age,是不是在1到70岁之间,不是就提示
|
||||
if (companion.age < 1 || companion.age > 70) {
|
||||
this.$toast('随行人'+ (i+1) +'的年龄超出限制,请添加其他联系人')
|
||||
return
|
||||
}
|
||||
@@ -693,46 +797,40 @@ layout("/mobile/platform.html"){
|
||||
url = '/platform/theRapyRecuperation/line/enroll/doSignUpForLine'
|
||||
}
|
||||
|
||||
const loading = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const resp = await $.post(url, {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
loading.clear()
|
||||
if (resp.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '报名成功',
|
||||
}).then(() => {
|
||||
location.replace('/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index)
|
||||
const msg = this.editOther ? ('此操作会取消之前报名线路,并修改为【'+ this.formData.lineName +'】是否确认?') : '请确保信息填写无误,是否确认?'
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: msg,
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
}).then(async () => {
|
||||
this.showButton = false
|
||||
const loading = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: resp.msg,
|
||||
}).then(() => {
|
||||
})
|
||||
}
|
||||
|
||||
// setTimeout(() => {
|
||||
// if (resp.code === 0) {
|
||||
// toast.message = '提交成功'
|
||||
// toast.type = 'success'
|
||||
// } else {
|
||||
// toast.message = resp.msg
|
||||
// toast.type = 'fail'
|
||||
// }
|
||||
// setTimeout(() => {
|
||||
// toast.clear()
|
||||
// }, 500)
|
||||
// if (resp.code === 0) {
|
||||
// location.replace('/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index)
|
||||
// }
|
||||
// }, 1000)
|
||||
const resp = await $.post(url, {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
loading.clear()
|
||||
if (resp.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '报名成功',
|
||||
}).then(() => {
|
||||
location.replace('/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index)
|
||||
})
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: resp.msg,
|
||||
})
|
||||
this.showButton = true
|
||||
}
|
||||
})
|
||||
},
|
||||
addCompanion() {
|
||||
if(this.formData.companionList.length === 3) {
|
||||
@@ -752,7 +850,8 @@ layout("/mobile/platform.html"){
|
||||
id: this.enrollId,
|
||||
isNormal: this.lineData.isNormal,
|
||||
takePartInLineId: this.lineData.usId,
|
||||
takePartInUnionId: this.takePartInUnionId
|
||||
takePartInUnionId: this.takePartInUnionId,
|
||||
editOther: this.editOther
|
||||
}),
|
||||
})
|
||||
if (re.code !== 0) {
|
||||
@@ -775,20 +874,26 @@ layout("/mobile/platform.html"){
|
||||
return
|
||||
}
|
||||
if (this.fromUrlByMy !== 'editDo') {
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@shiro.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
lineName: this.lineData.lineName,
|
||||
takePartInLineId: this.lineData.usId,
|
||||
takePartInUnionId: this.takePartInUnionId,
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
roomCount: null,
|
||||
if (this.editOther) {
|
||||
this.$set(this.formData, 'lineName', this.lineData.lineName)
|
||||
this.$set(this.formData, 'takePartInLineId', this.lineData.usId)
|
||||
this.$set(this.formData, 'takePartInUnionId', this.takePartInUnionId)
|
||||
this.$set(this.formData, 'takePartInTravelAgencyId', null)
|
||||
this.$set(this.formData, 'takePartInBaseManagementId', null)
|
||||
} else {
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@shiro.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
lineName: this.lineData.lineName,
|
||||
takePartInLineId: this.lineData.usId,
|
||||
takePartInUnionId: this.takePartInUnionId,
|
||||
companionList: [],
|
||||
roomCount: null,
|
||||
}
|
||||
}
|
||||
this.$set(this.formData.bedInfo, 'bedType', '大床房')
|
||||
}
|
||||
this.joinPopup = true
|
||||
},
|
||||
@@ -824,8 +929,12 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
//修改时查询报名信息,进行回显
|
||||
async findSignUpInfoById() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/findSignUpInfoById', {
|
||||
id: this.enrollId,
|
||||
editOther: this.editOther
|
||||
})
|
||||
if (res.code === 0) {
|
||||
console.log(res.data)
|
||||
this.formData = res.data
|
||||
if (this.formData.bedInfo === null) {
|
||||
this.formData.bedInfo = {}
|
||||
@@ -838,6 +947,7 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
}
|
||||
this.$forceUpdate()
|
||||
console.log(this.formData)
|
||||
}
|
||||
},
|
||||
async getConfigData() {
|
||||
@@ -944,7 +1054,32 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
updateRoomRemarkColumns() {
|
||||
const roomCount = this.formData.roomCount;
|
||||
const { roomCount, companionList = [] } = this.formData;
|
||||
const companionCount = companionList.length;
|
||||
|
||||
const roomCountStrategies = {
|
||||
0.5: () => [2, 5],
|
||||
1: () => {
|
||||
if (companionCount === 0) return [3];
|
||||
if (companionCount === 1) return [4];
|
||||
return [1];
|
||||
},
|
||||
1.5: () => [1, 3],
|
||||
2: () => companionCount < 3 ? [6] : [4]
|
||||
};
|
||||
|
||||
const matchedValues = roomCountStrategies[roomCount]?.();
|
||||
this.roomRemarkColumns = matchedValues !== undefined
|
||||
? this.basicRoomRemarkColumns.filter(o => matchedValues.includes(o.value))
|
||||
: [...this.basicRoomRemarkColumns]; // 默认处理:恢复基础列
|
||||
|
||||
// 如果最后的roomRemarkColumns的length只有1,直接默认第一个元素显示
|
||||
if (this.roomRemarkColumns.length === 1) {
|
||||
this.$set(this.formData, 'roomRemark', this.roomRemarkColumns[0].value)
|
||||
this.$set(this.formData, 'roomRemarkName', this.roomRemarkColumns[0].label)
|
||||
}
|
||||
|
||||
/*const roomCount = this.formData.roomCount;
|
||||
const companions = this.formData.companionList || [];
|
||||
const needBedCount = companions.filter(o => o.age > 12 || o.needBed).length;
|
||||
const strategies = {
|
||||
@@ -973,8 +1108,18 @@ layout("/mobile/platform.html"){
|
||||
} else {
|
||||
// 默认处理:恢复基础列
|
||||
this.roomRemarkColumns = [...this.basicRoomRemarkColumns];
|
||||
}*/
|
||||
},
|
||||
async selectOpenLineList(){
|
||||
if (this.id === this.formData.intentionLineId) {
|
||||
this.$set(this.formData, 'intentionLineId', '')
|
||||
this.$set(this.formData, 'intentionLineName', '')
|
||||
}
|
||||
}
|
||||
const resp = await $.post('/platform/mobile/theRapyRecuperation/getOpenLineList', {id: this.id})
|
||||
if (resp.code === 0) {
|
||||
this.intentionLineColumns = resp.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const loading = this.$toast({
|
||||
@@ -985,6 +1130,9 @@ layout("/mobile/platform.html"){
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
// 获取是不是修改其他线路的参数
|
||||
this.editOther = getQueryString('editOther') ? getQueryString('editOther') : ''
|
||||
|
||||
this.id = getQueryString('id') ? getQueryString('id') : ''
|
||||
this.queryYear = getQueryString('queryYear') ? getQueryString('queryYear') : ''
|
||||
this.index = getQueryString('index') ? getQueryString('index') : ''
|
||||
@@ -995,7 +1143,7 @@ layout("/mobile/platform.html"){
|
||||
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : ''
|
||||
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : ''
|
||||
this.takePartInUnionId = getQueryString('takePartInUnionId') ? getQueryString('takePartInUnionId') : ''
|
||||
if (this.enrollId) {
|
||||
if (this.enrollId || this.editOther) {
|
||||
await this.findSignUpInfoById()
|
||||
}
|
||||
if(!this.signType) {
|
||||
@@ -1005,6 +1153,8 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
this.isLoad = true
|
||||
|
||||
await this.selectOpenLineList()
|
||||
|
||||
try {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(this.lineData.content, 'text/html');
|
||||
@@ -1017,49 +1167,27 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
}catch (e) {
|
||||
this.isPdf = true
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
vant.ImagePreview({
|
||||
images: [event.target.src],
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
pdfh5.on("complete", function () {
|
||||
const imgDoc = document.querySelectorAll('img')
|
||||
let array = []
|
||||
let classArray = []
|
||||
imgDoc.forEach(o => {
|
||||
if(o.getAttribute('class') !== 'top_icon') {
|
||||
classArray.push(o.getAttribute('class'))
|
||||
array.push(o.getAttribute('src'))
|
||||
}
|
||||
})
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
const index = classArray.indexOf(event.target.className)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
images: array,
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
loading.close()
|
||||
},
|
||||
watch: {
|
||||
'formData.companionList': {
|
||||
handler(newVal) {
|
||||
//过滤需要床位的,找大人或者小孩需要床位的
|
||||
const { companionList = [] } = this.formData;
|
||||
const companionCount = companionList.length;
|
||||
const bedCount = 0.5 + (companionCount * 0.5);
|
||||
const bedCountStrategies = {
|
||||
0.5: () => this.basicRoomColumns.filter(o => o.value <= 1),
|
||||
1: () => this.basicRoomColumns.filter(o => o.value === 1),
|
||||
1.5: () => this.basicRoomColumns.filter(o => [1, 2].includes(o.value)),
|
||||
2: () => this.basicRoomColumns.filter(o => o.value === 2)
|
||||
};
|
||||
|
||||
this.roomColumns = bedCountStrategies[bedCount]?.() || [];
|
||||
|
||||
this.formData.carryFamilyNum = companionCount
|
||||
|
||||
/*//过滤需要床位的,找大人或者小孩需要床位的
|
||||
const needBed = newVal.filter(o => o.age > 12 || o.needBed === true)
|
||||
const bedCount = 0.5 + (needBed.length - needBed.length * 0.5)
|
||||
console.log(bedCount)
|
||||
@@ -1067,12 +1195,12 @@ layout("/mobile/platform.html"){
|
||||
this.roomColumns = this.basicRoomColumns.filter(o => o.value <= 1)
|
||||
} else {
|
||||
this.roomColumns = this.basicRoomColumns.filter(o => Number.isInteger(bedCount) ? o.value === bedCount : o.value >= bedCount)
|
||||
}
|
||||
}*/
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'formData.roomCount'(oldVal, newVal) {
|
||||
if(oldVal !== newVal) {
|
||||
if(newVal && oldVal !== newVal) {
|
||||
this.$set(this.formData, 'roomRemark', '')
|
||||
this.$set(this.formData, 'roomRemarkName', '')
|
||||
}
|
||||
@@ -1081,6 +1209,28 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.scrollToTop)
|
||||
document.addEventListener('click', function (event) {
|
||||
const imgDoc = document.querySelectorAll('img')
|
||||
let array = []
|
||||
let classArray = []
|
||||
imgDoc.forEach(o => {
|
||||
if(o.getAttribute('class') !== 'top_icon') {
|
||||
classArray.push(o.getAttribute('class'))
|
||||
array.push(o.getAttribute('src'))
|
||||
}
|
||||
})
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
const index = array.indexOf(event.target.currentSrc)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
images: array,
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
|
||||
@@ -319,14 +319,13 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
<div v-if="pageForm.theRapyRecuperationType == '3'">
|
||||
<van-row gutter="20" class="sign_button">
|
||||
<van-col @click="" span="12" style="border-right: 1px lightgrey solid"></van-col>
|
||||
<van-col span="12" style="text-align: right">
|
||||
<van-col span="24" style="text-align: right">
|
||||
<van-button @click.stop="openSignUser(o, 'base')" round size="mini" type="info">
|
||||
查看人员
|
||||
</van-button>
|
||||
<van-button @click.stop="findOne(o)" round size="mini" type="info"
|
||||
style="margin-right: 8px">
|
||||
我要报名
|
||||
{{ editOther ? '修改报名' : '我要报名' }}
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
@@ -360,7 +359,7 @@ layout("/mobile/platform.html"){
|
||||
<div>
|
||||
<van-button @click.stop="onSelect(item)" size="mini" type="info"
|
||||
style="margin-right: 8px">
|
||||
点击报名
|
||||
{{ editOther ? '修改报名' : '点击报名' }}
|
||||
</van-button>
|
||||
</div>
|
||||
<div style="margin-top: 4px">
|
||||
@@ -419,7 +418,8 @@ layout("/mobile/platform.html"){
|
||||
selectLineList: [],
|
||||
selectLinePopup: false,
|
||||
|
||||
// schoolTime: '',
|
||||
// 修改报名相关
|
||||
editOther: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -528,13 +528,14 @@ layout("/mobile/platform.html"){
|
||||
localStorage.setItem("clickIndex", JSON.stringify({clickIndex: type}))
|
||||
if (type !== 2 && type !== 3) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId + '&editOther=' + this.editOther
|
||||
} else if (type === 3) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/baseInfo?id=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
location.href = '/platform/mobile/theRapyRecuperation/baseInfo?id=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType + '&editOther=' + this.editOther
|
||||
} else if(type === 2) {
|
||||
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInTravelAgencyId: o.id,
|
||||
editOther: this.editOther
|
||||
}),
|
||||
})
|
||||
if (re.code !== 0) {
|
||||
@@ -545,7 +546,7 @@ layout("/mobile/platform.html"){
|
||||
return
|
||||
}
|
||||
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId + '&signType=2' + '&takePartInTravelAgencyId=' + o.id
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId + '&signType=2' + '&takePartInTravelAgencyId=' + o.id + '&editOther=' + this.editOther
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
@@ -561,6 +562,7 @@ layout("/mobile/platform.html"){
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.pageForm.editOther = this.editOther ? this.editOther : ''
|
||||
const res = await $.post('/platform/theRapyRecuperation/line/enroll/pageData', this.pageForm)
|
||||
|
||||
if (res.code === 0 && res.data) {
|
||||
@@ -607,6 +609,7 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.editOther = getQueryString('editOther') ? getQueryString('editOther') : ''
|
||||
this.createYear()
|
||||
await this.getModifyConfig()
|
||||
// await this.getSchoolTime()
|
||||
|
||||
@@ -305,7 +305,8 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
<div class="mobile" v-if="![2715,2725,2735].includes(o.stateId)">
|
||||
<span v-if="configData.familyInfo === 1">随行家属:</span>{{o.companionUserNames ? o.companionUserNames : '无'}}
|
||||
<span v-else>随行家属:</span>{{o.familyNumber}}人
|
||||
<!-- <span v-else>随行家属:</span>{{o.familyNumber}}人-->
|
||||
<span v-else>随行家属:</span>{{o.companionCount}}人
|
||||
</div>
|
||||
<div class="mobile" v-else>
|
||||
<span>审核状态:</span><span :style="'color: ' + o.stateColor">{{o.stateName}}</span>
|
||||
@@ -365,7 +366,12 @@ layout("/mobile/platform.html"){
|
||||
<van-button v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() < moment(o.changeEndTime).unix()
|
||||
&& ![2715,2725,2735].includes(o.stateId)" @click="edit(o)"
|
||||
type="info" size="small" color="#1867b0" :disabled="o.isTakePartIn == true || getDisabled(o)">
|
||||
修 改
|
||||
修改报名信息
|
||||
</van-button>
|
||||
<van-button v-if="pageForm.theRapyRecuperationType != '2' && moment().unix() < moment(o.changeEndTime).unix()
|
||||
&& ![2715,2725,2735].includes(o.stateId)" @click="editOther(o)"
|
||||
type="info" size="small" color="#1867b0" :disabled="o.isTakePartIn == true || getDisabled(o)">
|
||||
修改成其他线路
|
||||
</van-button>
|
||||
<van-button type="info" size="small" color="#1867b0" @click="cancel(o)"
|
||||
:disabled="getDisabled(o)">
|
||||
@@ -613,6 +619,9 @@ layout("/mobile/platform.html"){
|
||||
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo'
|
||||
}
|
||||
},
|
||||
async editOther(o) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/mobileLineListPage?editOther=' + o.id
|
||||
},
|
||||
async cancel(o) {
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
const re = await $.post('/platform/theRapyRecuperation/line/enroll/canDelete/' + o.id)
|
||||
|
||||
@@ -217,8 +217,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<table-tool label="人员列表" :app="this">
|
||||
<template #func>
|
||||
<el-button size="medium" type="primary" @click="doExport" class="mr10" v-if="pageForm.state">导出
|
||||
</el-button>
|
||||
<el-button size="medium" type="primary" @click="doExport" class="mr10" v-if="pageForm.state">导出</el-button>
|
||||
|
||||
<el-button v-if="pageForm.state == 3" @click="doExportBaseApply(null)"
|
||||
class="mr10" size="medium" type="primary">申请表导出</el-button>
|
||||
|
||||
+10
@@ -170,6 +170,13 @@ layout("/layouts/platform.html"){
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="承诺书" prop="files">
|
||||
<file-upload :files.sync="formData.files"
|
||||
:max="1"
|
||||
:type="['pdf']"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
|
||||
<vi-title title="标段管理"></vi-title>
|
||||
<el-form-item label="标段">
|
||||
<el-button type="primary" @click="formData.lots.push({})"
|
||||
@@ -613,6 +620,9 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
|
||||
if (this.formData.files && this.formData.files.length > 0) {
|
||||
cloneData.files = JSON.stringify(this.formData.files)
|
||||
}
|
||||
if (this.lotDeleteList && this.lotDeleteList.length > 0) {
|
||||
cloneData.lotDeleteList = JSON.stringify(this.lotDeleteList)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user