commit
This commit is contained in:
+6
-2
@@ -161,8 +161,10 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
|||||||
|
|
||||||
addTakePartInCondition(cnd, isTakePartIn);
|
addTakePartInCondition(cnd, isTakePartIn);
|
||||||
|
|
||||||
// 校工会可查询指定分工会
|
// 分工会为空时查询全部分工会,避免空字符串条件把历史年度数据过滤掉。
|
||||||
|
if (StrUtil.isNotBlank(unionId)) {
|
||||||
cnd.andEX("enroll.selfUnionId", "=", unionId);
|
cnd.andEX("enroll.selfUnionId", "=", unionId);
|
||||||
|
}
|
||||||
|
|
||||||
// // 报名模式
|
// // 报名模式
|
||||||
// if (StrUtil.isNotBlank(signUpMode)) {
|
// if (StrUtil.isNotBlank(signUpMode)) {
|
||||||
@@ -428,8 +430,10 @@ public class TheRapyRecuperationSchoolUnionUserQueryController {
|
|||||||
|
|
||||||
addTakePartInCondition(cnd, isTakePartIn);
|
addTakePartInCondition(cnd, isTakePartIn);
|
||||||
|
|
||||||
// 校工会可查询指定分工会
|
// 分工会为空时导出全部分工会,保持和列表查询一致。
|
||||||
|
if (StrUtil.isNotBlank(unionId)) {
|
||||||
cnd.andEX("enroll.selfUnionId", "=", unionId);
|
cnd.andEX("enroll.selfUnionId", "=", unionId);
|
||||||
|
}
|
||||||
|
|
||||||
// // 报名模式
|
// // 报名模式
|
||||||
// if (StrUtil.isNotBlank(signUpMode)) {
|
// if (StrUtil.isNotBlank(signUpMode)) {
|
||||||
|
|||||||
+9
-1
@@ -93,6 +93,12 @@ public class TheRapyRecuperationLineFragmentController {
|
|||||||
@Param(value = "playStart") String playStart,
|
@Param(value = "playStart") String playStart,
|
||||||
@Param(value = "playEnd") String playEnd,
|
@Param(value = "playEnd") String playEnd,
|
||||||
@Param(value = "regionalNature", required = false) String regionalNature) {
|
@Param(value = "regionalNature", required = false) String regionalNature) {
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
// 输入姓名或工号时直接定位人员所在酒店和团期,便于快速打开对应团删除人员。
|
||||||
|
boolean selfOnly = !ShiroUtil.hasAnyRoles("sysadmin, SchoolUnionAdmin");
|
||||||
|
return enrollService.fragmentUserLocatePageData(pageForm, startYear, endYear, baseManagementId, travelAgencyId,
|
||||||
|
playStart, playEnd, regionalNature, selfOnly);
|
||||||
|
}
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
bm.*,
|
bm.*,
|
||||||
@@ -162,6 +168,8 @@ public class TheRapyRecuperationLineFragmentController {
|
|||||||
@Param(value = "playStart", required = false) String playStart,
|
@Param(value = "playStart", required = false) String playStart,
|
||||||
@Param(value = "playEnd", required = false) String playEnd,
|
@Param(value = "playEnd", required = false) String playEnd,
|
||||||
@Param(value = "playCount", required = false) Integer playCount) {
|
@Param(value = "playCount", required = false) Integer playCount) {
|
||||||
|
return enrollService.fragmentSignUserPageData(pageForm, takePartInBaseManagementId, specificTime, playStart, playEnd, playCount);
|
||||||
|
/*
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
en.id,
|
en.id,
|
||||||
@@ -183,13 +191,13 @@ public class TheRapyRecuperationLineFragmentController {
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("en.takePartInBaseManagementId", "is not", null);
|
cnd.and("en.takePartInBaseManagementId", "is not", null);
|
||||||
cnd.andEX("en.specificTime", "=", specificTime);
|
cnd.andEX("en.specificTime", "=", specificTime);
|
||||||
cnd.andEX("en.playCount", "=", playCount);
|
|
||||||
cnd.andEX("REPLACE(REPLACE(SUBSTRING_INDEX(specificTime, '-', 1), '月', '-'), '日', '')", ">=", playStart);
|
cnd.andEX("REPLACE(REPLACE(SUBSTRING_INDEX(specificTime, '-', 1), '月', '-'), '日', '')", ">=", playStart);
|
||||||
cnd.andEX("REPLACE(REPLACE(SUBSTRING_INDEX(specificTime, '-', 1), '月', '-'), '日', '')", "<=", playEnd);
|
cnd.andEX("REPLACE(REPLACE(SUBSTRING_INDEX(specificTime, '-', 1), '月', '-'), '日', '')", "<=", playEnd);
|
||||||
cnd.andEX("en.takePartInBaseManagementId", "=", takePartInBaseManagementId);
|
cnd.andEX("en.takePartInBaseManagementId", "=", takePartInBaseManagementId);
|
||||||
cnd.desc("en.specificTime");
|
cnd.desc("en.specificTime");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return enrollService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
return enrollService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
|||||||
+10
@@ -61,6 +61,16 @@ public class TheRapyRecuperationConfigController {
|
|||||||
return configService.copyLastYear(year);
|
return configService.copyLastYear(year);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 沿用指定来源年度配置到目标年度。
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresAuthentication
|
||||||
|
public Object copyByYear(Integer sourceYear, Integer targetYear) {
|
||||||
|
return configService.copyByYear(sourceYear, targetYear);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查使用该标段的线路和目的地
|
* 查使用该标段的线路和目的地
|
||||||
|
|||||||
+9
@@ -61,6 +61,15 @@ public interface TheRapyRecuperationConfigService extends ViService<TheRapyRecup
|
|||||||
*/
|
*/
|
||||||
TheRapyRecuperationConfig copyLastYear(Integer configYear);
|
TheRapyRecuperationConfig copyLastYear(Integer configYear);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将指定来源年度配置复制为目标年度配置。
|
||||||
|
*
|
||||||
|
* @param sourceYear 来源配置年度
|
||||||
|
* @param targetYear 目标配置年度
|
||||||
|
* @return 复制后的目标年度配置
|
||||||
|
*/
|
||||||
|
TheRapyRecuperationConfig copyByYear(Integer sourceYear, Integer targetYear);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询使用该标段的线路和目的地。
|
* 查询使用该标段的线路和目的地。
|
||||||
*
|
*
|
||||||
|
|||||||
+32
@@ -37,6 +37,38 @@ public interface TheRapyRecuperationEnrollService extends ViService<TheRapyRecup
|
|||||||
|
|
||||||
Object openSignUser(String id, String type, String searchKeyWord);
|
Object openSignUser(String id, String type, String searchKeyWord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分段式成团确认页面按姓名或工号定位报名人员所在酒店和团期。
|
||||||
|
*
|
||||||
|
* @param pageForm 分页和姓名/工号查询参数
|
||||||
|
* @param startYear 开始年度
|
||||||
|
* @param endYear 结束年度
|
||||||
|
* @param baseManagementId 酒店ID
|
||||||
|
* @param travelAgencyId 旅行社ID
|
||||||
|
* @param playStart 出行开始日期
|
||||||
|
* @param playEnd 出行结束日期
|
||||||
|
* @param regionalNature 出行类型
|
||||||
|
* @param selfOnly 是否只查询当前登录人报名记录
|
||||||
|
* @return 分页后的人员定位结果
|
||||||
|
*/
|
||||||
|
Pagination fragmentUserLocatePageData(PageForm pageForm, Integer startYear, Integer endYear, String baseManagementId,
|
||||||
|
String travelAgencyId, String playStart, String playEnd, String regionalNature,
|
||||||
|
boolean selfOnly);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分段式成团确认报名人员弹窗分页数据。
|
||||||
|
*
|
||||||
|
* @param pageForm 分页和姓名/工号查询参数
|
||||||
|
* @param takePartInBaseManagementId 酒店ID
|
||||||
|
* @param specificTime 团期
|
||||||
|
* @param playStart 出行开始日期
|
||||||
|
* @param playEnd 出行结束日期
|
||||||
|
* @param playCount 出行批次
|
||||||
|
* @return 分页后的报名人员
|
||||||
|
*/
|
||||||
|
Pagination fragmentSignUserPageData(PageForm pageForm, String takePartInBaseManagementId, String specificTime,
|
||||||
|
String playStart, String playEnd, Integer playCount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线路报名
|
* 线路报名
|
||||||
*
|
*
|
||||||
|
|||||||
+40
-17
@@ -153,33 +153,56 @@ public class TheRapyRecuperationConfigServiceImpl extends ViServiceImpl<TheRapyR
|
|||||||
@Override
|
@Override
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public TheRapyRecuperationConfig copyLastYear(Integer configYear) {
|
public TheRapyRecuperationConfig copyLastYear(Integer configYear) {
|
||||||
Integer year = getConfigYear(configYear);
|
Integer targetYear = getConfigYear(configYear);
|
||||||
TheRapyRecuperationConfig currentConfig = findByYear(year);
|
return copyConfigByYear(targetYear - 1, targetYear);
|
||||||
TheRapyRecuperationConfig lastConfig = findByYear(year - 1);
|
}
|
||||||
if (lastConfig == null) {
|
|
||||||
|
@Override
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public TheRapyRecuperationConfig copyByYear(Integer sourceYear, Integer targetYear) {
|
||||||
|
if (sourceYear == null || targetYear == null) {
|
||||||
|
throw new IllegalArgumentException("请选择来源年度和目标年度");
|
||||||
|
}
|
||||||
|
if (sourceYear.equals(targetYear)) {
|
||||||
|
throw new IllegalArgumentException("来源年度和目标年度不能相同");
|
||||||
|
}
|
||||||
|
return copyConfigByYear(sourceYear, targetYear);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按指定来源年度复制配置到目标年度,目标年度已有配置时会覆盖并重建标段。
|
||||||
|
*
|
||||||
|
* @param sourceYear 来源配置年度
|
||||||
|
* @param targetYear 目标配置年度
|
||||||
|
* @return 复制后的目标年度配置
|
||||||
|
*/
|
||||||
|
private TheRapyRecuperationConfig copyConfigByYear(Integer sourceYear, Integer targetYear) {
|
||||||
|
TheRapyRecuperationConfig currentConfig = findByYear(targetYear);
|
||||||
|
TheRapyRecuperationConfig sourceConfig = findByYear(sourceYear);
|
||||||
|
if (sourceConfig == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
lastConfig.setId(currentConfig == null ? null : currentConfig.getId());
|
sourceConfig.setId(currentConfig == null ? null : currentConfig.getId());
|
||||||
lastConfig.setConfigYear(year);
|
sourceConfig.setConfigYear(targetYear);
|
||||||
lastConfig.setLatestConfig(true);
|
sourceConfig.setLatestConfig(true);
|
||||||
resetConfigTimeYear(lastConfig, year);
|
resetConfigTimeYear(sourceConfig, targetYear);
|
||||||
resetUnlimitedGroupTravelAgencyIds(lastConfig);
|
resetUnlimitedGroupTravelAgencyIds(sourceConfig);
|
||||||
resetLatestConfig(null);
|
resetLatestConfig(null);
|
||||||
if (currentConfig == null) {
|
if (currentConfig == null) {
|
||||||
copyLotsToNewConfig(lastConfig);
|
copyLotsToNewConfig(sourceConfig);
|
||||||
dao().insertWith(lastConfig, "lots");
|
dao().insertWith(sourceConfig, "lots");
|
||||||
} else {
|
} else {
|
||||||
dao().clear(TheRapyRecuperationLot.class, Cnd.where("configId", "=", currentConfig.getId()));
|
dao().clear(TheRapyRecuperationLot.class, Cnd.where("configId", "=", currentConfig.getId()));
|
||||||
copyLotsToNewConfig(lastConfig);
|
copyLotsToNewConfig(sourceConfig);
|
||||||
dao().update(lastConfig);
|
dao().update(sourceConfig);
|
||||||
for (TheRapyRecuperationLot lot : lastConfig.getLots()) {
|
for (TheRapyRecuperationLot lot : sourceConfig.getLots()) {
|
||||||
lot.setConfigId(currentConfig.getId());
|
lot.setConfigId(currentConfig.getId());
|
||||||
}
|
}
|
||||||
if (Lang.isNotEmpty(lastConfig.getLots())) {
|
if (Lang.isNotEmpty(sourceConfig.getLots())) {
|
||||||
dao().insert(lastConfig.getLots());
|
dao().insert(sourceConfig.getLots());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return findByYear(year);
|
return findByYear(targetYear);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+115
@@ -367,6 +367,121 @@ public class TheRapyRecuperationEnrollServiceImpl extends ViServiceImpl<TheRapyR
|
|||||||
(oldValue, newValue) -> oldValue, LinkedHashMap::new));*/
|
(oldValue, newValue) -> oldValue, LinkedHashMap::new));*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination fragmentUserLocatePageData(PageForm pageForm, Integer startYear, Integer endYear, String baseManagementId,
|
||||||
|
String travelAgencyId, String playStart, String playEnd, String regionalNature,
|
||||||
|
boolean selfOnly) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
bm.*,
|
||||||
|
ta.travelAgencyName,
|
||||||
|
en.specificTime,
|
||||||
|
en.playDay,
|
||||||
|
su.loginname AS signLoginName,
|
||||||
|
su.username AS signUserName,
|
||||||
|
(SELECT COUNT(DISTINCT specificTime, playDay) FROM the_rapy_recuperation_enroll WHERE isNormal = TRUE AND takePartInBaseManagementId = bm.id $signCnd) AS groupCount,
|
||||||
|
(SELECT COUNT(*) FROM the_rapy_recuperation_enroll WHERE isNormal = TRUE AND takePartInBaseManagementId = bm.id $signCnd) AS signCount,
|
||||||
|
u.username
|
||||||
|
FROM
|
||||||
|
the_rapy_recuperation_enroll en
|
||||||
|
LEFT JOIN the_rapy_recuperation_base_management bm ON bm.id = en.takePartInBaseManagementId
|
||||||
|
LEFT JOIN the_rapy_recuperation_travel_agency ta ON ta.id = bm.travelAgencyId
|
||||||
|
LEFT JOIN user u ON u.id = bm.opBy
|
||||||
|
LEFT JOIN user su ON su.loginname = en.loginName
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setVar("signCnd", buildFragmentPlayDateSql(playStart, playEnd));
|
||||||
|
sql.setParam("fragmentPlayStart", playStart);
|
||||||
|
sql.setParam("fragmentPlayEnd", playEnd);
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("en.takePartInBaseManagementId", "is not", null);
|
||||||
|
cnd.and("en.isNormal", "=", true);
|
||||||
|
cnd.andEX("bm.year", ">=", startYear);
|
||||||
|
cnd.andEX("bm.year", "<=", endYear);
|
||||||
|
cnd.andEX("bm.id", "=", baseManagementId);
|
||||||
|
cnd.andEX("bm.regionalNature", "=", regionalNature);
|
||||||
|
cnd.andEX("bm.travelAgencyId", "=", travelAgencyId);
|
||||||
|
addFragmentPlayDateCnd(cnd, "en.specificTime", playStart, playEnd);
|
||||||
|
if (selfOnly) {
|
||||||
|
cnd.and("en.loginName", "=", ShiroUtil.getPlatformLoginname());
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
String keyword = pageForm.getSearchKeyword().trim();
|
||||||
|
// 人员定位同时匹配报名记录和用户表,兼容历史报名记录姓名与用户表姓名不同步的情况。
|
||||||
|
cnd.and(Cnd.exps(Cnd.likeEX("en.userName", keyword))
|
||||||
|
.or(Cnd.likeEX("en.loginName", keyword))
|
||||||
|
.or(Cnd.likeEX("su.username", keyword))
|
||||||
|
.or(Cnd.likeEX("su.loginname", keyword)));
|
||||||
|
}
|
||||||
|
cnd.asc("bm.sortNumber * 1").desc("en.specificTime").asc("en.loginName");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination fragmentSignUserPageData(PageForm pageForm, String takePartInBaseManagementId, String specificTime,
|
||||||
|
String playStart, String playEnd, Integer playCount) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
en.id,
|
||||||
|
en.takePartInBaseManagementId,
|
||||||
|
en.specificTime,
|
||||||
|
en.playDay,
|
||||||
|
(en.playDay * 600) AS money,
|
||||||
|
u.loginname,
|
||||||
|
u.username,
|
||||||
|
u.sex,
|
||||||
|
u.mobile,
|
||||||
|
u.unionname,
|
||||||
|
u.unitname
|
||||||
|
FROM
|
||||||
|
the_rapy_recuperation_enroll en
|
||||||
|
LEFT JOIN user u ON en.loginName = u.loginname
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("en.takePartInBaseManagementId", "is not", null);
|
||||||
|
cnd.and("en.isNormal", "=", true);
|
||||||
|
cnd.andEX("en.specificTime", "=", specificTime);
|
||||||
|
addFragmentPlayDateCnd(cnd, "en.specificTime", playStart, playEnd);
|
||||||
|
cnd.andEX("en.takePartInBaseManagementId", "=", takePartInBaseManagementId);
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
String keyword = pageForm.getSearchKeyword().trim();
|
||||||
|
// 弹窗按姓名或工号过滤,用于从人员定位结果直接锁定待删除人员。
|
||||||
|
cnd.and(Cnd.exps(Cnd.likeEX("en.userName", keyword))
|
||||||
|
.or(Cnd.likeEX("en.loginName", keyword))
|
||||||
|
.or(Cnd.likeEX("u.username", keyword))
|
||||||
|
.or(Cnd.likeEX("u.loginname", keyword)));
|
||||||
|
}
|
||||||
|
cnd.desc("en.specificTime");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分段式出行日期按 specificTime 起始日期过滤,页面传入格式为 MM-dd。
|
||||||
|
*/
|
||||||
|
private void addFragmentPlayDateCnd(Cnd cnd, String specificTimeColumn, String playStart, String playEnd) {
|
||||||
|
String playDateExpr = "REPLACE(REPLACE(SUBSTRING_INDEX(" + specificTimeColumn + ", '-', 1), '月', '-'), '日', '')";
|
||||||
|
cnd.andEX(playDateExpr, ">=", playStart);
|
||||||
|
cnd.andEX(playDateExpr, "<=", playEnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分段式酒店列表统计人数时复用出行日期过滤,避免人员定位结果和列表统计口径不一致。
|
||||||
|
*/
|
||||||
|
private String buildFragmentPlayDateSql(String playStart, String playEnd) {
|
||||||
|
String playDateExpr = "REPLACE(REPLACE(SUBSTRING_INDEX(specificTime, '-', 1), '月', '-'), '日', '')";
|
||||||
|
if (StrUtil.isNotBlank(playStart) && StrUtil.isNotBlank(playEnd)) {
|
||||||
|
return " AND " + playDateExpr + " >= @fragmentPlayStart AND " + playDateExpr + " <= @fragmentPlayEnd";
|
||||||
|
} else if (StrUtil.isNotBlank(playStart)) {
|
||||||
|
return " AND " + playDateExpr + " >= @fragmentPlayStart";
|
||||||
|
} else if (StrUtil.isNotBlank(playEnd)) {
|
||||||
|
return " AND " + playDateExpr + " <= @fragmentPlayEnd";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线路报名
|
* 线路报名
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'stateName', label: '审核状态'},
|
{prop: 'stateName', label: '审核状态'},
|
||||||
],
|
],
|
||||||
|
|
||||||
modifyConfig: {},
|
modifyConfig: {lots: []},
|
||||||
lineList: [],
|
lineList: [],
|
||||||
unions: [],
|
unions: [],
|
||||||
signUpModeOptions: [
|
signUpModeOptions: [
|
||||||
@@ -309,8 +309,10 @@ layout("/layouts/platform.html"){
|
|||||||
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne', {
|
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne', {
|
||||||
year: year || this.pageForm.startYear
|
year: year || this.pageForm.startYear
|
||||||
})
|
})
|
||||||
if (res.code === 0) {
|
if (res.code === 0 && res.data) {
|
||||||
this.$set(this, 'modifyConfig', res.data)
|
this.$set(this, 'modifyConfig', res.data)
|
||||||
|
} else {
|
||||||
|
this.$set(this, 'modifyConfig', {lots: []})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async selectTravelAgencyList() {
|
async selectTravelAgencyList() {
|
||||||
|
|||||||
+13
-3
@@ -85,7 +85,7 @@ layout("/layouts/platform.html"){
|
|||||||
type="year"
|
type="year"
|
||||||
placeholder="选择年度"
|
placeholder="选择年度"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
@change="getConfig(pageForm.year);getLines()"
|
@change="yearChange"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -766,12 +766,21 @@ layout("/layouts/platform.html"){
|
|||||||
$.post('/platform/theRapyRecuperation/TheRapyConfig/findOne', {
|
$.post('/platform/theRapyRecuperation/TheRapyConfig/findOne', {
|
||||||
year: year || this.pageForm.year
|
year: year || this.pageForm.year
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0 && res.data) {
|
||||||
this.$set(this, 'config', res.data)
|
this.$set(this, 'config', res.data)
|
||||||
|
} else {
|
||||||
|
this.$set(this, 'config', {lots: []})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
yearChange() {
|
||||||
|
// 年度变化后线路和标段都依赖旧年度配置,需要清空后重新查询。
|
||||||
|
this.$set(this.pageForm, 'takePartInLineId', '')
|
||||||
|
this.$set(this.pageForm, 'lotId', '')
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
|
||||||
signUpModeChange(val) {
|
signUpModeChange(val) {
|
||||||
this.pageForm.takePartInLineId = ''
|
this.pageForm.takePartInLineId = ''
|
||||||
this.getLines()
|
this.getLines()
|
||||||
@@ -786,8 +795,9 @@ layout("/layouts/platform.html"){
|
|||||||
regionalNature: this.pageForm.regionalNature
|
regionalNature: this.pageForm.regionalNature
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.takePartInLines = res.data
|
this.$set(this, 'takePartInLines', res.data || [])
|
||||||
} else {
|
} else {
|
||||||
|
this.$set(this, 'takePartInLines', [])
|
||||||
this.$message.error(res.msg)
|
this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -112,6 +112,28 @@ layout("/layouts/platform.html"){
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row align="middle" class="query-row" type="flex">
|
||||||
|
<el-col class="query-row-title"></el-col>
|
||||||
|
<el-col class="query-row-content">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<span>姓名/工号:</span>
|
||||||
|
<el-input
|
||||||
|
:value="pageForm.searchKeyword"
|
||||||
|
@input="personKeywordChange"
|
||||||
|
@clear="clearPersonKeyword"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入姓名或工号"
|
||||||
|
style="width: 80%">
|
||||||
|
</el-input>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-button icon="el-icon-search" size="small" type="primary" @click="doSearch()">查询</el-button>
|
||||||
|
<el-button icon="el-icon-refresh-left" size="small" @click="clearPersonKeyword">重置</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@@ -154,6 +176,7 @@ layout("/layouts/platform.html"){
|
|||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
|
v-if="!column.personOnly || pageForm.searchKeyword"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
@@ -168,9 +191,12 @@ layout("/layouts/platform.html"){
|
|||||||
{{row.stateName?row.stateName:'待成团'}}
|
{{row.stateName?row.stateName:'待成团'}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="200px">
|
<el-table-column label="操作" width="300px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<template>
|
<template>
|
||||||
|
<el-button v-if="row.signLoginName" @click="openMatchedUser(row)" size="mini" type="primary">
|
||||||
|
查看该团人员
|
||||||
|
</el-button>
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">
|
<el-button @click="openView(row)" size="mini" type="primary">
|
||||||
查看团
|
查看团
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -250,6 +276,7 @@ layout("/layouts/platform.html"){
|
|||||||
regionalNature: '',
|
regionalNature: '',
|
||||||
baseManagementId: '',
|
baseManagementId: '',
|
||||||
travelAgencyId: '',
|
travelAgencyId: '',
|
||||||
|
searchKeyword: '',
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'year', label: '年度', width: 60},
|
{prop: 'year', label: '年度', width: 60},
|
||||||
@@ -261,6 +288,10 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'baseContactNumber', label: '联系电话', sortable: true, checked: 0},
|
{prop: 'baseContactNumber', label: '联系电话', sortable: true, checked: 0},
|
||||||
{prop: 'groupCount', label: '团数量'},
|
{prop: 'groupCount', label: '团数量'},
|
||||||
{prop: 'signCount', label: '报名人数'},
|
{prop: 'signCount', label: '报名人数'},
|
||||||
|
{prop: 'signUserName', label: '报名人员', personOnly: true},
|
||||||
|
{prop: 'signLoginName', label: '工号', personOnly: true},
|
||||||
|
{prop: 'specificTime', label: '报名团期', sortable: true, personOnly: true},
|
||||||
|
{prop: 'playDay', label: '出行天数', sortable: true, personOnly: true},
|
||||||
],
|
],
|
||||||
modifyConfig: {},
|
modifyConfig: {},
|
||||||
travelAgencyList: [],
|
travelAgencyList: [],
|
||||||
@@ -275,6 +306,13 @@ layout("/layouts/platform.html"){
|
|||||||
'sign-user': signUser
|
'sign-user': signUser
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
personKeywordChange(value) {
|
||||||
|
this.$set(this.pageForm, 'searchKeyword', value)
|
||||||
|
},
|
||||||
|
clearPersonKeyword() {
|
||||||
|
this.$set(this.pageForm, 'searchKeyword', '')
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
oneKeyGroupSuccess(type) {
|
oneKeyGroupSuccess(type) {
|
||||||
if (this.pageForm.startYear !== this.pageForm.endYear) {
|
if (this.pageForm.startYear !== this.pageForm.endYear) {
|
||||||
this.$message.warning('请只选择一个年度操作')
|
this.$message.warning('请只选择一个年度操作')
|
||||||
@@ -305,7 +343,9 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
refreshChild() {
|
refreshChild() {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
|
if (this.groupVisible && this.baseRow && this.baseRow.id) {
|
||||||
this.openView(this.baseRow)
|
this.openView(this.baseRow)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async sendSuccess(row, type) {
|
async sendSuccess(row, type) {
|
||||||
let message = '确定要成团吗?'
|
let message = '确定要成团吗?'
|
||||||
@@ -370,6 +410,12 @@ layout("/layouts/platform.html"){
|
|||||||
this.$refs.signUser.initData(row.id, null, playStart, playEnd, null)
|
this.$refs.signUser.initData(row.id, null, playStart, playEnd, null)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
openMatchedUser(row) {
|
||||||
|
this.userVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.signUser.initData(row.id, row.specificTime, this.pageForm.playStart, this.pageForm.playEnd, null, this.pageForm.searchKeyword)
|
||||||
|
})
|
||||||
|
},
|
||||||
openViewUser2(row) {
|
openViewUser2(row) {
|
||||||
this.userVisible = true
|
this.userVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
@@ -57,23 +57,30 @@ const signUser = {
|
|||||||
const resp = await $.post('/platform/theRapyRecuperation/statistics/deleteJoinUser', {id: row.id})
|
const resp = await $.post('/platform/theRapyRecuperation/statistics/deleteJoinUser', {id: row.id})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$message.success(resp.msg)
|
this.$message.success(resp.msg)
|
||||||
await this.initData(this.pageForm.takePartInBaseManagementId)
|
await this.pageData()
|
||||||
this.$emit("refresh", null)
|
this.$emit("refresh", null)
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(resp.msg)
|
this.$message.warning(resp.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async initData(baseId, specificTime = null, playStart = null, playEnd = null, playCount = null) {
|
async initData(baseId, specificTime = null, playStart = null, playEnd = null, playCount = null, searchKeyword = '') {
|
||||||
|
this.$set(this.pageForm, 'pageNumber', 1)
|
||||||
this.$set(this.pageForm, 'takePartInBaseManagementId', baseId)
|
this.$set(this.pageForm, 'takePartInBaseManagementId', baseId)
|
||||||
this.$set(this.pageForm, 'specificTime', specificTime)
|
this.$set(this.pageForm, 'specificTime', specificTime)
|
||||||
this.$set(this.pageForm, 'playStart', playStart)
|
this.$set(this.pageForm, 'playStart', playStart)
|
||||||
this.$set(this.pageForm, 'playEnd', playEnd)
|
this.$set(this.pageForm, 'playEnd', playEnd)
|
||||||
this.$set(this.pageForm, 'playCount', playCount)
|
this.$set(this.pageForm, 'playCount', playCount)
|
||||||
|
this.$set(this.pageForm, 'searchKeyword', searchKeyword)
|
||||||
|
await this.pageData()
|
||||||
|
},
|
||||||
|
async pageData() {
|
||||||
const res = await $.post('/platform/theRapyRecuperation/fragment/getSignUser', this.pageForm)
|
const res = await $.post('/platform/theRapyRecuperation/fragment/getSignUser', this.pageForm)
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.tableData = res.data.list
|
this.tableData = res.data.list
|
||||||
this.pageForm.totalCount = res.data.totalCount
|
this.$set(this.pageForm, 'totalCount', res.data.totalCount)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.msg)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
+80
-3
@@ -34,7 +34,7 @@ layout("/layouts/platform.html"){
|
|||||||
:label="item + '年度'"
|
:label="item + '年度'"
|
||||||
:value="item"></el-option>
|
:value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary" plain @click="copyLastYear" :loading="copyLoading">沿用去年配置</el-button>
|
<el-button type="primary" plain @click="openCopyConfig" :loading="copyLoading">沿用配置</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form ref="addForm" :model="formData" :rules="formRules" label-width="170px">
|
<el-form ref="addForm" :model="formData" :rules="formRules" label-width="170px">
|
||||||
@@ -340,6 +340,35 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button type="primary" @click="deleteLotById">确 定</el-button>
|
<el-button type="primary" @click="deleteLotById">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="沿用年度配置"
|
||||||
|
:visible.sync="copyDialogVisible"
|
||||||
|
width="420px"
|
||||||
|
:close-on-click-modal="false">
|
||||||
|
<el-form label-width="100px">
|
||||||
|
<el-form-item label="来源年度">
|
||||||
|
<el-select v-model="copySourceYear" style="width: 100%">
|
||||||
|
<el-option v-for="item in yearOptions"
|
||||||
|
:key="'source-' + item"
|
||||||
|
:label="item + '年度'"
|
||||||
|
:value="item"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="目标年度">
|
||||||
|
<el-select v-model="copyTargetYear" style="width: 100%">
|
||||||
|
<el-option v-for="item in yearOptions"
|
||||||
|
:key="'target-' + item"
|
||||||
|
:label="item + '年度'"
|
||||||
|
:value="item"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="closeCopyDialog">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="doCopyConfig" :loading="copyLoading">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
<drawer-user-scope
|
<drawer-user-scope
|
||||||
@@ -353,9 +382,12 @@ layout("/layouts/platform.html"){
|
|||||||
const vue = new Vue({
|
const vue = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
data() {
|
data() {
|
||||||
const startYear = 2025
|
const startYear = 2023
|
||||||
const yearOptions = [startYear, startYear + 1, startYear + 2, startYear + 3, startYear + 4]
|
|
||||||
const nowYear = new Date().getFullYear()
|
const nowYear = new Date().getFullYear()
|
||||||
|
const yearOptions = []
|
||||||
|
for (let year = startYear; year <= nowYear + 4; year++) {
|
||||||
|
yearOptions.push(year)
|
||||||
|
}
|
||||||
const currentYear = yearOptions.includes(nowYear) ? nowYear : startYear
|
const currentYear = yearOptions.includes(nowYear) ? nowYear : startYear
|
||||||
return {
|
return {
|
||||||
currentYear: currentYear,
|
currentYear: currentYear,
|
||||||
@@ -364,6 +396,9 @@ layout("/layouts/platform.html"){
|
|||||||
travelAgencyList: [],
|
travelAgencyList: [],
|
||||||
subLoading: false,
|
subLoading: false,
|
||||||
copyLoading: false,
|
copyLoading: false,
|
||||||
|
copyDialogVisible: false,
|
||||||
|
copySourceYear: 2025,
|
||||||
|
copyTargetYear: currentYear,
|
||||||
formData: {
|
formData: {
|
||||||
configYear: currentYear,
|
configYear: currentYear,
|
||||||
isSnLine: 0,
|
isSnLine: 0,
|
||||||
@@ -448,6 +483,48 @@ layout("/layouts/platform.html"){
|
|||||||
async changeYear() {
|
async changeYear() {
|
||||||
await this.findOne()
|
await this.findOne()
|
||||||
},
|
},
|
||||||
|
openCopyConfig() {
|
||||||
|
const sourceYear = this.yearOptions.includes(2025) ? 2025 : this.currentYear - 1
|
||||||
|
this.$set(this, 'copySourceYear', sourceYear)
|
||||||
|
this.$set(this, 'copyTargetYear', this.currentYear)
|
||||||
|
this.$set(this, 'copyDialogVisible', true)
|
||||||
|
},
|
||||||
|
closeCopyDialog() {
|
||||||
|
this.$set(this, 'copyDialogVisible', false)
|
||||||
|
},
|
||||||
|
async doCopyConfig() {
|
||||||
|
if (!this.copySourceYear || !this.copyTargetYear) {
|
||||||
|
this.$notify.warning({title: '提示', message: '请选择来源年度和目标年度'})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.copySourceYear === this.copyTargetYear) {
|
||||||
|
this.$notify.warning({title: '提示', message: '来源年度和目标年度不能相同'})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const confirm = await this.$confirm('确定要将' + this.copySourceYear + '年度配置沿用到' + this.copyTargetYear + '年度吗?目标年度已有配置会被覆盖。', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
|
this.$set(this, 'copyLoading', true)
|
||||||
|
try {
|
||||||
|
const resp = await $.post(loc() + '/copyByYear', {
|
||||||
|
sourceYear: this.copySourceYear,
|
||||||
|
targetYear: this.copyTargetYear
|
||||||
|
})
|
||||||
|
if (resp.code === 0 && resp.data) {
|
||||||
|
this.$notify.success({title: '成功', message: '已沿用年度配置'})
|
||||||
|
this.$set(this, 'copyDialogVisible', false)
|
||||||
|
this.$set(this, 'currentYear', this.copyTargetYear)
|
||||||
|
await this.findOne()
|
||||||
|
} else {
|
||||||
|
this.$notify.warning({title: '提示', message: resp.msg || '来源年度暂无可沿用配置'})
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
this.$set(this, 'copyLoading', false)
|
||||||
|
}
|
||||||
|
},
|
||||||
async copyLastYear() {
|
async copyLastYear() {
|
||||||
if (this.formData.id) {
|
if (this.formData.id) {
|
||||||
const confirm = await this.$confirm('当前年度已有配置,沿用去年配置会覆盖当前年度配置,是否继续?', '提示', {
|
const confirm = await this.$confirm('当前年度已有配置,沿用去年配置会覆盖当前年度配置,是否继续?', '提示', {
|
||||||
|
|||||||
Reference in New Issue
Block a user