Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
This commit is contained in:
+16
-6
@@ -9,6 +9,7 @@ import com.budwk.app.base.constant.RoleConstant;
|
|||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
import com.budwk.app.sys.views.View_user;
|
import com.budwk.app.sys.views.View_user;
|
||||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
@@ -19,10 +20,12 @@ import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
|
|||||||
import com.budwk.app.zhgh.staffbenefit.psychology.model.PsychologyDoctor;
|
import com.budwk.app.zhgh.staffbenefit.psychology.model.PsychologyDoctor;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -48,6 +51,8 @@ public class CondolenceApplyController {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CondolenceService condolenceService;
|
private CondolenceService condolenceService;
|
||||||
|
@Inject
|
||||||
|
private FlowEngine flowEngine;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/apply/index.html")
|
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/apply/index.html")
|
||||||
@@ -72,7 +77,7 @@ public class CondolenceApplyController {
|
|||||||
ins.id AS instanceId,
|
ins.id AS instanceId,
|
||||||
ins.businessNo,
|
ins.businessNo,
|
||||||
ins.state instanceState,
|
ins.state instanceState,
|
||||||
ins.variable instanceVariale,
|
ins.variable instanceVariable,
|
||||||
t.id taskId,
|
t.id taskId,
|
||||||
t.taskName AS taskKey,
|
t.taskName AS taskKey,
|
||||||
t.displayName taskName,
|
t.displayName taskName,
|
||||||
@@ -81,7 +86,9 @@ public class CondolenceApplyController {
|
|||||||
t.taskState,
|
t.taskState,
|
||||||
t.finishTime,
|
t.finishTime,
|
||||||
t.taskParentId,
|
t.taskParentId,
|
||||||
t.variable taskVariale
|
t.variable taskVariable,
|
||||||
|
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||||
|
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||||
FROM
|
FROM
|
||||||
condolence info
|
condolence info
|
||||||
LEFT JOIN condolence_type type ON info.type = type.id
|
LEFT JOIN condolence_type type ON info.type = type.id
|
||||||
@@ -148,10 +155,13 @@ public class CondolenceApplyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("condolence.apply")
|
@SaCheckPermission("condolence.apply")
|
||||||
@ApiOperation("职工慰问详情")
|
@SLog(type = "condolence", tag = "删除职工慰问", msg = "删除职工慰问")
|
||||||
public Result fetchOne(@Valid String id) {
|
public Result delete(@Param("id") String id) {
|
||||||
Condolence condolence = condolenceService.fetch(id);
|
condolenceService.delete(id);
|
||||||
return Result.success(condolence);
|
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||||
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
||||||
import com.budwk.app.base.param.PageForm;
|
|
||||||
import com.budwk.app.base.result.Result;
|
|
||||||
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName CondolenceStatisticsController
|
|
||||||
* @Author JyuHsin
|
|
||||||
* @Date 2025/7/30 14:51
|
|
||||||
* @Version 1.0
|
|
||||||
* @Description TODO
|
|
||||||
*/
|
|
||||||
@IocBean
|
|
||||||
@At("/platform/condolence/statistics")
|
|
||||||
@Api("职工慰问统计")
|
|
||||||
@Ok("json:full")
|
|
||||||
public class CondolenceStatisticsController {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private CondolenceService condolenceService;
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/statistics/index.html")
|
|
||||||
@SaCheckLogin
|
|
||||||
public void index() {}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ApiOperation("分页查询")
|
|
||||||
@SaCheckPermission("condolence.statistics")
|
|
||||||
public Result pageData(PageForm pageForm,
|
|
||||||
@Param(value = "year") Integer year,
|
|
||||||
@Param(value = "type") String type) {
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.constant;
|
||||||
|
|
||||||
|
import com.budwk.app.base.annotation.DictEnum;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @FileName io.v.nutz.therapyRecuperation.constant.TheRapyRecuperationSignUpMode
|
||||||
|
* @Description: 线路创建模式
|
||||||
|
* @Author zxc
|
||||||
|
* @Date 2022/6/2:15:22
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@DictEnum(key = "RecuperationLineCreateMode", name = "线路创建模式")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum RecuperationLineCreateMode {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分工会
|
||||||
|
*/
|
||||||
|
UNION(1, "分工会"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校工会
|
||||||
|
*/
|
||||||
|
SCHOOL(2, "校工会");
|
||||||
|
|
||||||
|
|
||||||
|
private final int value;
|
||||||
|
private final String label;
|
||||||
|
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.constant;
|
||||||
|
|
||||||
|
import com.budwk.app.base.annotation.DictEnum;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @FileName io.v.nutz.therapyRecuperation.constant.TheRapyRecuperationProvinceType
|
||||||
|
* @Description: TODO
|
||||||
|
* @Author zxc
|
||||||
|
* @Date 2022/6/2:14:08
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@DictEnum(key = "RecuperationProvinceType", name = "出行模式")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum RecuperationProvinceType {
|
||||||
|
/**
|
||||||
|
* 省内
|
||||||
|
*/
|
||||||
|
provinceIn("省内线路", "省内"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省外
|
||||||
|
*/
|
||||||
|
provinceOut("省外线路", "省外");
|
||||||
|
|
||||||
|
private final String label;
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.constant;
|
||||||
|
|
||||||
|
import com.budwk.app.base.annotation.DictEnum;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @FileName io.v.nutz.therapyRecuperation.constant.TheRapyRecuperationSignUpMode
|
||||||
|
* @Description: 报名模式
|
||||||
|
* @Author zxc
|
||||||
|
* @Date 2022/6/2:15:22
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@DictEnum(key = "RecuperationSignUpMode", name = "报名模式")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum RecuperationSignUpMode {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分工会模式
|
||||||
|
*/
|
||||||
|
UNION(1, "分工会组织", new String[]{"H04", "A06", "sysadmin"}),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自由模式
|
||||||
|
*/
|
||||||
|
FREE(2, "校工会组织", new String[]{"A06", "sysadmin"});
|
||||||
|
|
||||||
|
|
||||||
|
private final int value;
|
||||||
|
private final String label;
|
||||||
|
private final String[] roles;
|
||||||
|
|
||||||
|
}
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
public interface RecuperationState {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待分工会审核
|
||||||
|
*/
|
||||||
|
Integer UNIT = 2710;
|
||||||
|
/**
|
||||||
|
* 分工会审核不通过
|
||||||
|
*/
|
||||||
|
Integer UNITFAIL = 2715;
|
||||||
|
/**
|
||||||
|
* 待选择线路分工会审核
|
||||||
|
*/
|
||||||
|
Integer LINEUNIT = 2720;
|
||||||
|
/**
|
||||||
|
* 选择线路分工会不通过
|
||||||
|
*/
|
||||||
|
Integer LINEUNITFAIL = 2725;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待校工会审核
|
||||||
|
*/
|
||||||
|
Integer SCHOOL = 2730;
|
||||||
|
/**
|
||||||
|
* 校工会审核不通过
|
||||||
|
*/
|
||||||
|
Integer SCHOOLFAIL = 2735;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核通过
|
||||||
|
*/
|
||||||
|
Integer PASS = 2750;
|
||||||
|
|
||||||
|
}
|
||||||
+359
@@ -0,0 +1,359 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.base.model.ExcelImportRes;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.mode.BaseManagerExcelMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.mode.TravelAgencyExcelMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationBaseManagement;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLot;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationTravelAgency;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.service.RecuperationBaseManagerService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.service.RecuperationTravelAgencyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
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.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.AdaptBy;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
import org.nutz.mvc.upload.UploadAdaptor;
|
||||||
|
|
||||||
|
import javax.servlet.ServletOutputStream;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.InvocationHandler;
|
||||||
|
import java.lang.reflect.Proxy;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationBaseManagerController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 10:41
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/recuperation/baseManagement")
|
||||||
|
@Api("疗休养目的地管理")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class RecuperationBaseManagerController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private RecuperationBaseManagerService baseManagerService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/recuperation/baseManagement/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "year") Integer year,
|
||||||
|
@Param(value = "lotId") String lotId,
|
||||||
|
@Param(value = "baseName") String baseName,
|
||||||
|
@Param(value = "unionId") String unionId,
|
||||||
|
@Param(value = "travelAgencyId") String travelAgencyId,
|
||||||
|
@Param(value = "regionalNature") String regionalNature) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
tb.id,
|
||||||
|
tb.sortNumber,
|
||||||
|
tb.baseName,
|
||||||
|
tb.regionalNature,
|
||||||
|
tb.year,
|
||||||
|
tb.isDisabled,
|
||||||
|
tb.lotId,
|
||||||
|
tb.createUnionId,
|
||||||
|
tb.signUpStartTime,
|
||||||
|
tb.signUpEndTime,
|
||||||
|
tb.changeEndTime,
|
||||||
|
tb.createMode,
|
||||||
|
tb.activityStartTime,
|
||||||
|
tb.activityEndTime,
|
||||||
|
tb.file,
|
||||||
|
tb.baseContactPerson,
|
||||||
|
tb.baseContactNumber,
|
||||||
|
tb.file AS fileId,
|
||||||
|
gh.name createUnionName,
|
||||||
|
u.username createUserName,
|
||||||
|
ta.travelAgencyName,
|
||||||
|
ta.contact,
|
||||||
|
ta.contactMobileNumber,
|
||||||
|
ta.officialWebsite
|
||||||
|
FROM
|
||||||
|
`recuperation_base_management` tb
|
||||||
|
LEFT JOIN recuperation_travel_agency ta ON ta.id = tb.travelAgencyId
|
||||||
|
LEFT JOIN sys_union gh ON gh.id = tb.createUnionid
|
||||||
|
LEFT JOIN sys_user u ON u.id = tb.createdBy
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
cnd.where().andEX("tb.`year`", "=", year);
|
||||||
|
cnd.where().andEX("tb.lotId", "=", lotId);
|
||||||
|
cnd.and(Cnd.likeEX("tb.baseName", baseName));
|
||||||
|
cnd.and(Cnd.likeEX("tb.travelAgencyId", travelAgencyId));
|
||||||
|
cnd.and(Cnd.likeEX("tb.regionalNature", regionalNature));
|
||||||
|
cnd.desc("tb.`year`");
|
||||||
|
cnd.asc("tb.sortNumber");
|
||||||
|
cnd.asc("tb.id");
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
|
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||||
|
cnd.and("tb.createUnionId", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cnd.andEX("tb.createUnionId", "=", unionId);
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = baseManagerService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/编辑疗休养基地")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
@SLog(type = "recuperation", tag = "新增/编辑疗休养基地", msg = "新增/编辑疗休养基地")
|
||||||
|
public Result onSubmit(RecuperationBaseManagement baseManagement) {
|
||||||
|
baseManagement.setCreateUnionId(SecurityUtil.getUnionId());
|
||||||
|
dao.insertOrUpdate(baseManagement);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/openClosedBase/?")
|
||||||
|
@ApiOperation("开启或关闭基地")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
@SLog(type = "recuperation", tag = "开启或关闭基地", msg = "开启或关闭基地")
|
||||||
|
public Result openClosedBase(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
dao.update(RecuperationBaseManagement.class, Chain.makeSpecial("isDisabled", "isDisabled ^ 1"), Cnd.where("id", "=", id));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除基地")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
@SLog(type = "recuperation", tag = "删除基地", msg = "删除基地")
|
||||||
|
public Result onDelete(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
dao.delete(RecuperationBaseManagement.class, id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/selectBaseManageById/?")
|
||||||
|
@ApiOperation("查询一条基地线路")
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
public Result selectBaseManageById(String id) {
|
||||||
|
Assert.notBlank(id);
|
||||||
|
RecuperationBaseManagement base = dao.fetchLinks(dao.fetch(RecuperationBaseManagement.class, id), "travelAgency");
|
||||||
|
RecuperationLot lot = dao.fetch(RecuperationLot.class, base.getLotId());
|
||||||
|
NutMap nutMap = Lang.obj2nutmap(base);
|
||||||
|
nutMap.put("lotName", lot.getLotName());
|
||||||
|
return Result.success(nutMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询所有酒店")
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
public Result listAllBase(String startYear, String endYear, String year) {
|
||||||
|
Sql sql = Sqls.create("select * from `the_rapy_recuperation_base_management` tb left join `the_rapy_recuperation_lot` lot on lot.id=tb.lotId $condition");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|
||||||
|
cnd.andEX("tb.`year`", ">=", startYear);
|
||||||
|
cnd.andEX("tb.`year`", "<=", endYear);
|
||||||
|
cnd.andEX("tb.`year`", "=", year);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> listMap = baseManagerService.listMap(sql);
|
||||||
|
return Result.success(listMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("手机端酒店介绍所有信息")
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
public Result selectBaseAllInfo(String id) {
|
||||||
|
Assert.notBlank(id);
|
||||||
|
NutMap nutMap = baseManagerService.selectBaseAllInfo(id);
|
||||||
|
return Result.success(nutMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
public void downloadTemplate(HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
//查旅行社,转数组
|
||||||
|
List<RecuperationTravelAgency> travelAgencys = dao.query(RecuperationTravelAgency.class, Cnd.NEW().desc("serialNumber"));
|
||||||
|
List<String> excelTravelAgencyList = travelAgencys.stream().map(v -> v.getTravelAgencyName() + "_" + v.getId()).toList();
|
||||||
|
String[] excelTravelAgencyArrs = excelTravelAgencyList.toArray(new String[excelTravelAgencyList.size()]);
|
||||||
|
|
||||||
|
//查标段,转数组
|
||||||
|
List<RecuperationLot> lots = dao.query(RecuperationLot.class, Cnd.NEW().asc("id"));
|
||||||
|
List<String> excelLotList = lots.stream().map(v -> v.getLotName() + "_" + v.getId()).toList();
|
||||||
|
String[] excelLotArrs = excelLotList.toArray(new String[excelLotList.size()]);
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
entities.add(new ExcelExportEntity("年度", "year", 20));
|
||||||
|
entities.add(new ExcelExportEntity("排序编号", "sortNumber", 20));
|
||||||
|
entities.add(new ExcelExportEntity("目的地名称", "baseName", 20));
|
||||||
|
|
||||||
|
ExcelExportEntity travelEntity = new ExcelExportEntity("所属旅行社", "travelAgencyId", 20);
|
||||||
|
travelEntity.setReplace(excelTravelAgencyArrs);
|
||||||
|
travelEntity.setAddressList(true);
|
||||||
|
entities.add(travelEntity);
|
||||||
|
|
||||||
|
ExcelExportEntity regionalEntity = new ExcelExportEntity("活动范围(省内/省外)", "regionalNature", 20);
|
||||||
|
regionalEntity.setReplace(new String[]{"省内_省内", "省外_省外"});
|
||||||
|
regionalEntity.setAddressList(true);
|
||||||
|
entities.add(regionalEntity);
|
||||||
|
|
||||||
|
ExcelExportEntity lotEntity = new ExcelExportEntity("时间标段", "lotId", 20);
|
||||||
|
lotEntity.setReplace(excelLotArrs);
|
||||||
|
lotEntity.setAddressList(true);
|
||||||
|
entities.add(lotEntity);
|
||||||
|
|
||||||
|
entities.add(new ExcelExportEntity("详细信息", "content", 20));
|
||||||
|
|
||||||
|
ExcelExportEntity ableEntity = new ExcelExportEntity("是否启用(是/否)", "isDisabled", 20);
|
||||||
|
ableEntity.setReplace(new String[]{"是_1", "否_0"});
|
||||||
|
ableEntity.setAddressList(true);
|
||||||
|
entities.add(ableEntity);
|
||||||
|
|
||||||
|
entities.add(new ExcelExportEntity("报名开始时间", "signUpStartTime", 20));
|
||||||
|
entities.add(new ExcelExportEntity("报名截至时间", "signUpEndTime", 20));
|
||||||
|
entities.add(new ExcelExportEntity("变更截至时间", "changeEndTime", 20));
|
||||||
|
entities.add(new ExcelExportEntity("活动开始时间", "activityStartTime", 20));
|
||||||
|
entities.add(new ExcelExportEntity("活动结束时间", "activityEndTime", 20));
|
||||||
|
entities.add(new ExcelExportEntity("预计费用", "estimatedCost", 20));
|
||||||
|
|
||||||
|
ExcelExportEntity createEntity = new ExcelExportEntity("组织形式(分工会/校工会)", "createMode", 20);
|
||||||
|
createEntity.setReplace(new String[]{"校工会_1", "分工会_2"});
|
||||||
|
createEntity.setAddressList(true);
|
||||||
|
entities.add(createEntity);
|
||||||
|
|
||||||
|
entities.add(new ExcelExportEntity("目的地联系人", "baseContactPerson", 20));
|
||||||
|
entities.add(new ExcelExportEntity("联系电话", "baseContactNumber", 20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, new ArrayList<>());
|
||||||
|
CommonDownloadUtil.download("目的地导入模板.xlsx", workbook, response);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("目的地导入")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.baseManagement")
|
||||||
|
@SLog(type = "recuperation", tag = "目的地导入", msg = "目的地导入")
|
||||||
|
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||||
|
public Result baseManagementImport(@Param("file") TempFile file) {
|
||||||
|
List<BaseManagerExcelMode> excelList = ExcelImportUtil.importExcel(file.getFile(), BaseManagerExcelMode.class, new ImportParams());
|
||||||
|
|
||||||
|
// 创建结果集
|
||||||
|
ExcelImportRes<BaseManagerExcelMode> excelImportRes = new ExcelImportRes<>();
|
||||||
|
excelImportRes.setTotalRecords(excelList.size());
|
||||||
|
|
||||||
|
List<RecuperationTravelAgency> travelList = dao.query(RecuperationTravelAgency.class, Cnd.NEW());
|
||||||
|
Map<String, String> travelMap = travelList.stream().collect(Collectors.toMap(RecuperationTravelAgency::getTravelAgencyName, RecuperationTravelAgency::getId));
|
||||||
|
|
||||||
|
List<RecuperationLot> lotList = dao.query(RecuperationLot.class, Cnd.NEW());
|
||||||
|
Map<String, String> lotMap = lotList.stream().collect(Collectors.toMap(RecuperationLot::getLotName, RecuperationLot::getId));
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < excelList.size(); i++) {
|
||||||
|
BaseManagerExcelMode management = excelList.get(i);
|
||||||
|
if(management.getYear() == null) {
|
||||||
|
management.setErrInfo("年度为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(management.getBaseName())) {
|
||||||
|
management.setErrInfo("目的地名称为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(management.getTravelAgencyId())) {
|
||||||
|
management.setErrInfo("旅行社名称为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(management.getLotId())) {
|
||||||
|
management.setErrInfo("时间标段为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(management.getRegionalNature())) {
|
||||||
|
management.setErrInfo("活动范围为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
RecuperationBaseManagement baseManagement = new RecuperationBaseManagement();
|
||||||
|
if("校工会".equals(management.getCreateMode())) {
|
||||||
|
management.setCreateMode("1");
|
||||||
|
} else if("分工会".equals(management.getCreateMode())) {
|
||||||
|
management.setCreateMode("2");
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(management, baseManagement);
|
||||||
|
if("是".equals(management.getIsDisabled())) {
|
||||||
|
baseManagement.setIsDisabled(true);
|
||||||
|
} else if("否".equals(management.getIsDisabled())) {
|
||||||
|
baseManagement.setIsDisabled(false);
|
||||||
|
}
|
||||||
|
baseManagement.setTravelAgencyId(travelMap.get(management.getTravelAgencyId()));
|
||||||
|
baseManagement.setLotId(lotMap.get(management.getLotId()));
|
||||||
|
try {
|
||||||
|
dao.insertOrUpdate(baseManagement);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("导入目的地失败:{}", e.getMessage());
|
||||||
|
management.setErrInfo("添加失败", i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加错误记录
|
||||||
|
excelImportRes.setErrorDetails(excelList.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||||
|
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||||
|
excelImportRes.setSuccessCount(Math.max(excelList.size() - excelImportRes.getFailedCount(), 0));
|
||||||
|
return Result.success(excelImportRes);
|
||||||
|
}
|
||||||
|
}
|
||||||
+121
@@ -0,0 +1,121 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationBaseManagement;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationConfig;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLine;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLot;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationConfigController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/30 16:04
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/recuperation/config")
|
||||||
|
@Api("疗休养配置管理")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class RecuperationConfigController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/recuperation/config/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/编辑疗休养配置")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.config")
|
||||||
|
@SLog(type = "recuperation", tag = "新增/编辑疗休养配置", msg = "新增/编辑疗休养配置")
|
||||||
|
public Result onSubmit(RecuperationConfig config, String[] lotDeleteList) {
|
||||||
|
if (Strings.isNotBlank(config.getId())) {
|
||||||
|
if (Lang.isNotEmpty(lotDeleteList)) {
|
||||||
|
dao.clear(RecuperationLot.class, Cnd.where("id", "in", lotDeleteList));
|
||||||
|
}
|
||||||
|
dao.updateWith(config, "lots");
|
||||||
|
List<RecuperationLot> collect = config.getLots().stream().filter(v -> v.getConfigId() == null).collect(Collectors.toList());
|
||||||
|
for (RecuperationLot obj : collect) {
|
||||||
|
obj.setConfigId(config.getId());
|
||||||
|
}
|
||||||
|
dao.insert(collect);
|
||||||
|
} else {
|
||||||
|
dao.insertWith(config, "lots");
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询配置")
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result fetchOne() {
|
||||||
|
RecuperationConfig config = dao.fetchLinks(dao.fetch(RecuperationConfig.class), "lots", Cnd.NEW().desc("lotValue"));
|
||||||
|
return Result.success(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查使用该标段的线路和目的地")
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result getLotsById(String lotId) {
|
||||||
|
List<String> lineNames = new ArrayList<>();
|
||||||
|
List<String> baseNames = new ArrayList<>();
|
||||||
|
Map<String, List<String>> map = new HashMap<>();
|
||||||
|
List<RecuperationLine> lineList = dao.query(RecuperationLine.class, Cnd.where("lotId", "=", lotId));
|
||||||
|
if (!CollectionUtils.isEmpty(lineList)){
|
||||||
|
lineList.forEach(v-> lineNames.add(v.getLineName()));
|
||||||
|
map.put("line",lineNames);
|
||||||
|
}
|
||||||
|
List<RecuperationBaseManagement> managementList = dao.query(RecuperationBaseManagement.class, Cnd.where("lotId", "=", lotId));
|
||||||
|
if (!CollectionUtils.isEmpty(managementList)){
|
||||||
|
managementList.forEach(v-> baseNames.add(v.getBaseName()));
|
||||||
|
map.put("base",baseNames);
|
||||||
|
}
|
||||||
|
return Result.success(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("强制删除标段时长,会删除已绑定的线路和目的地")
|
||||||
|
@SaCheckLogin
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SLog(type = "recuperation", tag = "删除标段", msg = "删除标段")
|
||||||
|
public Result deleteLotById(String lotId) {
|
||||||
|
dao.clear(RecuperationLot.class, Cnd.where("id","=",lotId));
|
||||||
|
List<RecuperationLine> lineList = dao.query(RecuperationLine.class, Cnd.where("lotId", "=", lotId));
|
||||||
|
if (!CollectionUtils.isEmpty(lineList)) {
|
||||||
|
lineList.forEach(v -> v.setLotId(null));
|
||||||
|
dao.update(lineList);
|
||||||
|
}
|
||||||
|
List<RecuperationBaseManagement> managementList = dao.query(RecuperationBaseManagement.class, Cnd.where("lotId", "=", lotId));
|
||||||
|
if (!CollectionUtils.isEmpty(managementList)) {
|
||||||
|
managementList.forEach(v -> v.setLotId(null));
|
||||||
|
dao.update(managementList);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
}
|
||||||
+95
@@ -0,0 +1,95 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationEvaluateStatisticsController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 15:55
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/recuperation/statistics")
|
||||||
|
@Api("疗休养评价统计")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class RecuperationEvaluateStatisticsController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/recuperation/statistics/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("recuperation.statistics")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "lineId") String lineId,
|
||||||
|
@Param(value = "unionId") String unionId,
|
||||||
|
@Param(value = "unitId") String unitId,
|
||||||
|
@Param(value = "personType") String personType,
|
||||||
|
@Param(value = "userState") String userState,
|
||||||
|
@Param(value = "evaluateScore") String evaluateScore) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
we.evaluateText,
|
||||||
|
we.evaluateScore,
|
||||||
|
we.userName,
|
||||||
|
we.loginName,
|
||||||
|
u.unionname,
|
||||||
|
u.unitname,
|
||||||
|
u.userState,
|
||||||
|
u.personType,
|
||||||
|
line.lineName,
|
||||||
|
us.playStartTime
|
||||||
|
FROM
|
||||||
|
`recuperation_evaluate` we
|
||||||
|
LEFT JOIN `vw_user` u ON u.id = we.userId
|
||||||
|
LEFT JOIN recuperation_enroll en ON en.takePartInLineId = we.lineId
|
||||||
|
LEFT JOIN recuperation_line_union_select us ON us.id = en.takePartInLineId
|
||||||
|
LEFT JOIN recuperation_line line ON line.id = us.lineId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchName()) && StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), "ascending".equals(pageForm.getPageOrderBy()) ? "asc" : "desc");
|
||||||
|
} else {
|
||||||
|
cnd.desc("we.evaluateScore");
|
||||||
|
}
|
||||||
|
if(StrUtil.isNotBlank(lineId)) {
|
||||||
|
cnd.andEX("we.lineId", "in", lineId.split(","));
|
||||||
|
}
|
||||||
|
cnd.andEX("u.unionid", "=", unionId);
|
||||||
|
cnd.andEX("u.unitid", "=", unitId);
|
||||||
|
cnd.andEX("u.personType", "=", personType);
|
||||||
|
cnd.andEX("u.userState", "=", userState);
|
||||||
|
cnd.andEX("we.evaluateScore", "=", evaluateScore);
|
||||||
|
cnd.groupBy("we.lineId");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
//enrollService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
}
|
||||||
+318
@@ -0,0 +1,318 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.base.model.ExcelImportRes;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.constant.RecuperationLineCreateMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.mode.BaseManagerExcelMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.mode.LineExcelMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLine;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLot;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationTravelAgency;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.service.RecuperationLineService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.AdaptBy;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
import org.nutz.mvc.upload.UploadAdaptor;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationLineController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 15:58
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/recuperation/line")
|
||||||
|
@Api("疗休养线路管理")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class RecuperationLineController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private RecuperationLineService lineService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/recuperation/line/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "startYear") Integer startYear ,
|
||||||
|
@Param(value = "endYear") Integer endYear,
|
||||||
|
@Param(value = "travelAgencyId") String travelAgencyId,
|
||||||
|
@Param(value = "lineName") String lineName,
|
||||||
|
@Param(value = "unionId") String unionId,
|
||||||
|
@Param(value = "lotId") String lotId) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("line.`year`", ">=", startYear);
|
||||||
|
cnd.andEX("line.`year`", "<=", endYear);
|
||||||
|
cnd.andEX("line.travelAgencyId", "=", travelAgencyId);
|
||||||
|
cnd.andEX("line.lotId", "=", lotId);
|
||||||
|
cnd.and(Cnd.likeEX("line.lineName", lineName));
|
||||||
|
|
||||||
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
|
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||||
|
cnd.and("line.createUnionId", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cnd.andEX("line.createUnionId", "=", unionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
cnd.desc("year").desc("regionalNature").asc("serialNumber").asc("line.createdAt");
|
||||||
|
Pagination pagination = lineService.pageData(pageForm, cnd);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("获取编号")
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
public Result getNo() {
|
||||||
|
Object serialNumber = dao.func2(RecuperationLine.class, "max", "serialNumber");
|
||||||
|
serialNumber = Objects.requireNonNullElse(serialNumber, 0);
|
||||||
|
return Result.success(Integer.parseInt(serialNumber.toString()) + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/编辑疗休养线路")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
@SLog(type = "recuperation", tag = "新增/编辑疗休养线路", msg = "新增/编辑疗休养线路")
|
||||||
|
public Result onSubmit(RecuperationLine line) {
|
||||||
|
if (StrUtil.isBlank(line.getId())) {
|
||||||
|
if (lineService.count(Cnd.where("serialNumber", "=", line.getSerialNumber())) > 0) {
|
||||||
|
return Result.error("编号已存在");
|
||||||
|
}
|
||||||
|
lineService.addLine(line);
|
||||||
|
} else {
|
||||||
|
if (lineService.count(Cnd.where("serialNumber", "=", line.getSerialNumber()).and("id", "!=", line.getId())) > 0) {
|
||||||
|
return Result.error("编号已存在");
|
||||||
|
}
|
||||||
|
lineService.editLine(line);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/openClosedLine/?")
|
||||||
|
@ApiOperation("开启或关闭线路")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
@SLog(type = "recuperation", tag = "开启或关闭线路", msg = "开启或关闭线路")
|
||||||
|
public Result openClosedLine(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
lineService.openClosedLine(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除线路")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
@SLog(type = "recuperation", tag = "删除线路", msg = "删除线路")
|
||||||
|
public Result onDelete(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
lineService.deleteLine(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/selectLineInfoById/?")
|
||||||
|
@ApiOperation("查询线路")
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
public Result selectLineInfoById(String id) {
|
||||||
|
Assert.notBlank(id);
|
||||||
|
RecuperationLine line = lineService.selectLineInfoById(id);
|
||||||
|
return Result.success(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("根据分工会选择的线路id查询所该线路报名的人")
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
public Result selectLineUser(PageForm pageForm, String id, String unionId) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
Pagination pagination = lineService.selectLineUser(pageForm, id, unionId);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
public Result getCreateMode() {
|
||||||
|
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
|
return Result.success(RecuperationLineCreateMode.SCHOOL.getValue());
|
||||||
|
}
|
||||||
|
return Result.success(RecuperationLineCreateMode.UNION.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/viewUnionSelectTimeInfo/?")
|
||||||
|
@ApiOperation("查看各个分工会设置的时间信息")
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
public Result viewUnionSelectTimeInfo(String id) {
|
||||||
|
Assert.notBlank(id);
|
||||||
|
List<NutMap> listMap = lineService.viewUnionSelectTimeInfo(id);
|
||||||
|
return Result.success(listMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
public void downloadTemplate(HttpServletResponse response) {
|
||||||
|
//查旅行社,转数组
|
||||||
|
List<RecuperationTravelAgency> travelAgencys = dao.query(RecuperationTravelAgency.class, Cnd.NEW().desc("serialNumber"));
|
||||||
|
List<String> excelTravelAgencyList = travelAgencys.stream().map(v -> v.getTravelAgencyName() + "_" + v.getId()).toList();
|
||||||
|
String[] excelTravelAgencyArrs = excelTravelAgencyList.toArray(new String[excelTravelAgencyList.size()]);
|
||||||
|
|
||||||
|
//查标段,转数组
|
||||||
|
List<RecuperationLot> lots = dao.query(RecuperationLot.class, Cnd.NEW().asc("id"));
|
||||||
|
List<String> excelLotList = lots.stream().map(v -> v.getLotName() + "_" + v.getId()).toList();
|
||||||
|
String[] excelLotArrs = excelLotList.toArray(new String[excelLotList.size()]);
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
entities.add(new ExcelExportEntity("年度", "year", 20));
|
||||||
|
entities.add(new ExcelExportEntity("排序编号", "serialNumber", 20));
|
||||||
|
entities.add(new ExcelExportEntity("线路名称", "lineName", 20));
|
||||||
|
|
||||||
|
ExcelExportEntity travelEntity = new ExcelExportEntity("所属旅行社", "travelAgencyId", 20);
|
||||||
|
travelEntity.setReplace(excelTravelAgencyArrs);
|
||||||
|
travelEntity.setAddressList(true);
|
||||||
|
entities.add(travelEntity);
|
||||||
|
|
||||||
|
ExcelExportEntity regionalEntity = new ExcelExportEntity("活动范围", "regionalNature", 20);
|
||||||
|
regionalEntity.setReplace(new String[]{"省内_省内", "省外_省外"});
|
||||||
|
regionalEntity.setAddressList(true);
|
||||||
|
entities.add(regionalEntity);
|
||||||
|
|
||||||
|
entities.add(new ExcelExportEntity("最少参与教工", "minimumGroupSize", 20));
|
||||||
|
|
||||||
|
ExcelExportEntity lotEntity = new ExcelExportEntity("时间标段", "lotId", 20);
|
||||||
|
lotEntity.setReplace(excelLotArrs);
|
||||||
|
lotEntity.setAddressList(true);
|
||||||
|
entities.add(lotEntity);
|
||||||
|
|
||||||
|
entities.add(new ExcelExportEntity("预计费用", "estimatedCost", 20));
|
||||||
|
entities.add(new ExcelExportEntity("详细信息", "content", 20));
|
||||||
|
|
||||||
|
ExcelExportEntity ableEntity = new ExcelExportEntity("是否启用(是/否)", "isDisabled", 20);
|
||||||
|
ableEntity.setReplace(new String[]{"是_1", "否_0"});
|
||||||
|
ableEntity.setAddressList(true);
|
||||||
|
entities.add(ableEntity);
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, new ArrayList<>());
|
||||||
|
CommonDownloadUtil.download("目的地导入模板.xlsx", workbook, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("线路导入")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.line")
|
||||||
|
@SLog(type = "recuperation", tag = "线路导入", msg = "线路导入")
|
||||||
|
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||||
|
public Result lineImport(@Param("file") TempFile file) {
|
||||||
|
List<LineExcelMode> excelList = ExcelImportUtil.importExcel(file.getFile(), LineExcelMode.class, new ImportParams());
|
||||||
|
|
||||||
|
// 创建结果集
|
||||||
|
ExcelImportRes<LineExcelMode> excelImportRes = new ExcelImportRes<>();
|
||||||
|
excelImportRes.setTotalRecords(excelList.size());
|
||||||
|
|
||||||
|
List<RecuperationTravelAgency> travelList = dao.query(RecuperationTravelAgency.class, Cnd.NEW());
|
||||||
|
Map<String, String> travelMap = travelList.stream().collect(Collectors.toMap(RecuperationTravelAgency::getTravelAgencyName, RecuperationTravelAgency::getId));
|
||||||
|
|
||||||
|
List<RecuperationLot> lotList = dao.query(RecuperationLot.class, Cnd.NEW());
|
||||||
|
Map<String, String> lotMap = lotList.stream().collect(Collectors.toMap(RecuperationLot::getLotName, RecuperationLot::getId));
|
||||||
|
|
||||||
|
for (int i = 0; i < excelList.size(); i++) {
|
||||||
|
LineExcelMode excelMode = excelList.get(i);
|
||||||
|
|
||||||
|
if(excelMode.getYear() == null) {
|
||||||
|
excelMode.setErrInfo("年度为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(excelMode.getLineName())) {
|
||||||
|
excelMode.setErrInfo("线路名称为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(excelMode.getTravelAgencyId())) {
|
||||||
|
excelMode.setErrInfo("旅行社名称为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(excelMode.getLotId())) {
|
||||||
|
excelMode.setErrInfo("时间标段为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(excelMode.getRegionalNature())) {
|
||||||
|
excelMode.setErrInfo("活动范围为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
RecuperationLine line = new RecuperationLine();
|
||||||
|
BeanUtil.copyProperties(excelMode, line);
|
||||||
|
if("是".equals(excelMode.getIsDisabled())) {
|
||||||
|
line.setDisabled(true);
|
||||||
|
} else if("否".equals(excelMode.getIsDisabled())) {
|
||||||
|
line.setDisabled(false);
|
||||||
|
}
|
||||||
|
line.setTravelAgencyId(travelMap.get(excelMode.getTravelAgencyId()));
|
||||||
|
line.setLotId(lotMap.get(excelMode.getLotId()));
|
||||||
|
|
||||||
|
try {
|
||||||
|
dao.insertOrUpdate(line);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("导入目的地失败:{}", e.getMessage());
|
||||||
|
excelMode.setErrInfo("添加失败", i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加错误记录
|
||||||
|
excelImportRes.setErrorDetails(excelList.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||||
|
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||||
|
excelImportRes.setSuccessCount(Math.max(excelList.size() - excelImportRes.getFailedCount(), 0));
|
||||||
|
return Result.success(excelImportRes);
|
||||||
|
}
|
||||||
|
}
|
||||||
+268
@@ -0,0 +1,268 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.model.ExcelImportRes;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.base.utils.PageUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.mode.TravelAgencyExcelMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationTravelAgency;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.service.RecuperationTravelAgencyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.AdaptBy;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
import org.nutz.mvc.upload.TempFile;
|
||||||
|
import org.nutz.mvc.upload.UploadAdaptor;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationTravelAgencyController
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 9:21
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/recuperation/travelAgency")
|
||||||
|
@Api("疗休养旅行社管理")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class RecuperationTravelAgencyController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private RecuperationTravelAgencyService travelAgencyService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zhgh/staffbenefit/recuperation/travelAgency/index.html")
|
||||||
|
@SaCheckLogin
|
||||||
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
public Result pageData(PageForm pageForm,
|
||||||
|
@Param(value = "year") Integer year) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("year", "=", year);
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("contact", pageForm.getSearchKeyword());
|
||||||
|
seg.orLike("travelAgencyName", pageForm.getSearchKeyword());
|
||||||
|
seg.orLike("serialNumber", pageForm.getSearchKeyword());
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
} else {
|
||||||
|
cnd.asc("serialNumber");
|
||||||
|
}
|
||||||
|
Pagination pagination = travelAgencyService.pageData(pageForm, cnd);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("新增/编辑疗休养旅行社")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
@SLog(type = "recuperation", tag = "新增/编辑疗休养旅行社", msg = "新增/编辑疗休养旅行社")
|
||||||
|
public Result onSubmit(RecuperationTravelAgency travelAgency) {
|
||||||
|
if (StrUtil.isBlank(travelAgency.getId())) {
|
||||||
|
if (travelAgencyService.count(Cnd.where("serialNumber", "=", travelAgency.getSerialNumber())) > 0) {
|
||||||
|
return Result.error("编号已存在");
|
||||||
|
}
|
||||||
|
travelAgencyService.addTravelAgency(travelAgency);
|
||||||
|
} else {
|
||||||
|
if (travelAgencyService.count(Cnd.where("serialNumber", "=", travelAgency.getSerialNumber()).and("id", "!=", travelAgency.getId())) > 0) {
|
||||||
|
return Result.error("编号已存在");
|
||||||
|
}
|
||||||
|
travelAgencyService.editTravelAgency(travelAgency);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/openClosedTravelAgency/?")
|
||||||
|
@ApiOperation("开启或关闭旅行社")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
@SLog(type = "recuperation", tag = "开启或关闭旅行社", msg = "开启或关闭旅行社")
|
||||||
|
public Result openClosedTravelAgency(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
travelAgencyService.openTravelAgency(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("删除旅行社")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
@SLog(type = "recuperation", tag = "删除旅行社", msg = "删除旅行社")
|
||||||
|
public Result onDelete(String id) {
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
return Result.error("参数错误");
|
||||||
|
}
|
||||||
|
travelAgencyService.deleteTravelAgency(id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("查询旅行社")
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
public Result selectTravelAgency(Integer year) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("year", "=", year);
|
||||||
|
List<RecuperationTravelAgency> list = travelAgencyService.selectAllTravelAgencyByYear(cnd);
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("年度区间查询旅行社")
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
public Result selectTravelAgencyByYears(Integer startYear, Integer endYear) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("year", ">=", startYear);
|
||||||
|
cnd.andEX("year", "<=", endYear);
|
||||||
|
List<RecuperationTravelAgency> list = travelAgencyService.selectAllTravelAgencyByYear(cnd);
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("根据旅行社id查线路")
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
public Result selectLineByAgencyId(String agencyId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT id,lineName FROM `the_rapy_recuperation_line` WHERE travelAgencyId=@travelAgencyId
|
||||||
|
""").setParam("travelAgencyId", agencyId);
|
||||||
|
List<NutMap> listMap = travelAgencyService.listMap(sql);
|
||||||
|
return Result.success(listMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
public void downloadTemplate(HttpServletResponse response) {
|
||||||
|
|
||||||
|
List<NutMap> list = new ArrayList<>();
|
||||||
|
NutMap map = new NutMap();
|
||||||
|
map.put("year", 2025);
|
||||||
|
map.put("serialNumber", 1);
|
||||||
|
map.put("travelAgencyName", "杭州海外旅游有限公司");
|
||||||
|
map.put("contact", "张三");
|
||||||
|
map.put("contactMobileNumber", "17867895678");
|
||||||
|
map.put("email", "123@qq.com");
|
||||||
|
map.put("isDisabled", "是");
|
||||||
|
list.add(map);
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
entities.add(new ExcelExportEntity("年度", "year", 20));
|
||||||
|
entities.add(new ExcelExportEntity("排序编号", "serialNumber", 20));
|
||||||
|
entities.add(new ExcelExportEntity("旅行社名称", "travelAgencyName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("旅行社联系人", "contact", 20));
|
||||||
|
entities.add(new ExcelExportEntity("联系电话", "contactMobileNumber", 20));
|
||||||
|
entities.add(new ExcelExportEntity("邮箱", "email", 20));
|
||||||
|
entities.add(new ExcelExportEntity("官网", "officialWebsite", 20));
|
||||||
|
entities.add(new ExcelExportEntity("备注", "note", 20));
|
||||||
|
ExcelExportEntity excelExport = new ExcelExportEntity("是否启用(是/否)", "isDisabled", 20);
|
||||||
|
String[] options = {"是_1", "否_0"};
|
||||||
|
excelExport.setReplace(options);
|
||||||
|
excelExport.setAddressList(true);
|
||||||
|
entities.add(excelExport);
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list);
|
||||||
|
CommonDownloadUtil.download("旅行社导入模板.xlsx", workbook, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ApiOperation("旅行社导入")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@SaCheckPermission("recuperation.travelAgency")
|
||||||
|
@SLog(type = "recuperation", tag = "旅行社导入", msg = "旅行社导入")
|
||||||
|
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||||
|
public Result travelAgencyImport(@Param("file") TempFile file) {
|
||||||
|
List<TravelAgencyExcelMode> travelAgency = ExcelImportUtil.importExcel(file.getFile(), TravelAgencyExcelMode.class, new ImportParams());
|
||||||
|
// 创建结果集
|
||||||
|
ExcelImportRes<TravelAgencyExcelMode> excelImportRes = new ExcelImportRes<>();
|
||||||
|
excelImportRes.setTotalRecords(travelAgency.size());
|
||||||
|
|
||||||
|
List<RecuperationTravelAgency> travelAgencyList = dao.query(RecuperationTravelAgency.class, Cnd.NEW().desc("id"));
|
||||||
|
Map<String, String> map = travelAgencyList.stream().collect(Collectors.toMap(RecuperationTravelAgency::getTravelAgencyName, RecuperationTravelAgency::getId));
|
||||||
|
|
||||||
|
for (int i = 0; i < travelAgency.size(); i++) {
|
||||||
|
TravelAgencyExcelMode travel = travelAgency.get(i);
|
||||||
|
if(travel.getYear() == null) {
|
||||||
|
travel.setErrInfo("年度为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(travel.getTravelAgencyName())) {
|
||||||
|
travel.setErrInfo("旅行社名称为空", i + 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
RecuperationTravelAgency agency = new RecuperationTravelAgency();
|
||||||
|
if (Strings.isNotBlank(map.get(travel.getTravelAgencyName()))){
|
||||||
|
agency.setId(map.get(travel.getTravelAgencyName()));
|
||||||
|
}
|
||||||
|
if ("是".equals(travel.getIsDisabled())) {
|
||||||
|
agency.setDisabled(false);
|
||||||
|
} else if ("否".equals(travel.getIsDisabled())) {
|
||||||
|
agency.setDisabled(true);
|
||||||
|
}
|
||||||
|
agency.setContact(travel.getContact());
|
||||||
|
agency.setTravelAgencyName(travel.getTravelAgencyName());
|
||||||
|
agency.setSerialNumber(travel.getSerialNumber());
|
||||||
|
agency.setEmail(travel.getEmail());
|
||||||
|
agency.setContactMobileNumber(travel.getContactMobileNumber());
|
||||||
|
agency.setNote(travel.getNote());
|
||||||
|
agency.setYear(travel.getYear());
|
||||||
|
agency.setOfficialWebsite(travel.getOfficialWebsite());
|
||||||
|
try {
|
||||||
|
dao.insertOrUpdate(agency);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("导入旅行社失败:{}", e.getMessage());
|
||||||
|
travel.setErrInfo("添加失败", i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加错误记录
|
||||||
|
excelImportRes.setErrorDetails(travelAgency.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||||
|
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||||
|
excelImportRes.setSuccessCount(Math.max(travelAgency.size() - excelImportRes.getFailedCount(), 0));
|
||||||
|
return Result.success(excelImportRes);
|
||||||
|
}
|
||||||
|
}
|
||||||
+69
@@ -0,0 +1,69 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.mode;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import com.budwk.app.base.model.ExcelImportError;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName BaseManagerExcelMode
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 15:25
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BaseManagerExcelMode extends ExcelImportError {
|
||||||
|
|
||||||
|
@Excel(name = "年度")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Excel(name = "排序编号")
|
||||||
|
private String sortNumber;
|
||||||
|
|
||||||
|
@Excel(name = "目的地名称")
|
||||||
|
private String baseName;
|
||||||
|
|
||||||
|
@Excel(name = "所属旅行社")
|
||||||
|
private String travelAgencyId;
|
||||||
|
|
||||||
|
@Excel(name = "活动范围(省内/省外)")
|
||||||
|
private String regionalNature;
|
||||||
|
|
||||||
|
@Excel(name = "时间标段")
|
||||||
|
private String lotId;
|
||||||
|
|
||||||
|
@Excel(name = "详细信息")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Excel(name = "是否启用(是/否)")
|
||||||
|
private String isDisabled;
|
||||||
|
|
||||||
|
@Excel(name = "报名开始时间")
|
||||||
|
private Date signUpStartTime;
|
||||||
|
|
||||||
|
@Excel(name = "报名截至时间")
|
||||||
|
private Date signUpEndTime;
|
||||||
|
|
||||||
|
@Excel(name = "变更截至时间")
|
||||||
|
private Date changeEndTime;
|
||||||
|
|
||||||
|
@Excel(name = "活动开始时间")
|
||||||
|
private Date activityStartTime;
|
||||||
|
|
||||||
|
@Excel(name = "活动结束时间")
|
||||||
|
private Date activityEndTime;
|
||||||
|
|
||||||
|
@Excel(name = "预计费用")
|
||||||
|
private String estimatedCost;
|
||||||
|
|
||||||
|
@Excel(name = "组织形式(分工会/校工会)")
|
||||||
|
private String createMode;
|
||||||
|
|
||||||
|
@Excel(name = "目的地联系人")
|
||||||
|
private String baseContactPerson;
|
||||||
|
|
||||||
|
@Excel(name = "联系电话")
|
||||||
|
private String baseContactNumber;
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.mode;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import com.budwk.app.base.model.ExcelImportError;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LineExcelMode extends ExcelImportError {
|
||||||
|
|
||||||
|
@Excel(name = "年度")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Excel(name = "排序编号")
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
@Excel(name = "线路名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@Excel(name = "旅行社名称")
|
||||||
|
private String travelAgencyId;
|
||||||
|
|
||||||
|
@Excel(name = "活动范围")
|
||||||
|
private String regionalNature;
|
||||||
|
|
||||||
|
@Excel(name = "最少参与教工")
|
||||||
|
private Integer minimumGroupSize;
|
||||||
|
|
||||||
|
@Excel(name = "时间标段")
|
||||||
|
private String lotId;
|
||||||
|
|
||||||
|
@Excel(name = "预计费用")
|
||||||
|
private String estimatedCost;
|
||||||
|
|
||||||
|
@Excel(name = "详细信息")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Excel(name = "是否启用(是/否)")
|
||||||
|
private String isDisabled;
|
||||||
|
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.mode;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RecuperationEnrollExcelMode {
|
||||||
|
|
||||||
|
@Excel(name = "工号")
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@Excel(name = "姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Excel(name = "参加时间")
|
||||||
|
private Date takePartInTime;
|
||||||
|
|
||||||
|
@Excel(name = "标段时间")
|
||||||
|
private String lotId;
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.mode;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import com.budwk.app.base.model.ExcelImportError;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TravelAgencyExcelMode extends ExcelImportError {
|
||||||
|
|
||||||
|
@Excel(name = "年度")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Excel(name = "排序编号")
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
@Excel(name = "旅行社名称")
|
||||||
|
private String travelAgencyName;
|
||||||
|
|
||||||
|
@Excel(name = "旅行社联系人")
|
||||||
|
private String contact;
|
||||||
|
|
||||||
|
@Excel(name = "联系电话")
|
||||||
|
private String contactMobileNumber;
|
||||||
|
|
||||||
|
@Excel(name = "邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
@Excel(name = "官网")
|
||||||
|
private String officialWebsite;
|
||||||
|
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
@Excel(name = "是否启用(是/否)")
|
||||||
|
private String isDisabled;
|
||||||
|
}
|
||||||
+140
@@ -0,0 +1,140 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_base_management")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养基地")
|
||||||
|
public class RecuperationBaseManagement extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("年度")
|
||||||
|
@Excel(name = "年度")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("排序编号")
|
||||||
|
@Excel(name = "排序编号")
|
||||||
|
private String sortNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("基地名称")
|
||||||
|
@Excel(name = "目的地名称")
|
||||||
|
private String baseName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("旅行社Id")
|
||||||
|
@Excel(name = "所属旅行社")
|
||||||
|
private String travelAgencyId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
|
@Comment("区域")
|
||||||
|
@Excel(name = "活动范围(省内/省外)")
|
||||||
|
private String regionalNature;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("标段Id")
|
||||||
|
@Excel(name = "时间标段")
|
||||||
|
private String lotId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(customType = "text")
|
||||||
|
@Comment("疗休养详情")
|
||||||
|
@Excel(name = "详细信息")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否禁用")
|
||||||
|
@Excel(name = "是否启用(是/否)")
|
||||||
|
private Boolean isDisabled;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("哪个分工会创建的")
|
||||||
|
private String createUnionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("报名开始时间")
|
||||||
|
@Excel(name = "报名开始时间")
|
||||||
|
private Date signUpStartTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("报名截至时间")
|
||||||
|
@Excel(name = "报名截至时间")
|
||||||
|
private Date signUpEndTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("变更截至时间")
|
||||||
|
@Excel(name = "变更截至时间")
|
||||||
|
private Date changeEndTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("活动开始时间")
|
||||||
|
@Excel(name = "活动开始时间")
|
||||||
|
private Date activityStartTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("活动结束时间")
|
||||||
|
@Excel(name = "活动结束时间")
|
||||||
|
private Date activityEndTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("预计费用")
|
||||||
|
@Excel(name = "预计费用")
|
||||||
|
private String estimatedCost;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("缩略图")
|
||||||
|
private String file;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("创建模式(1.校工会 2.分工会)")
|
||||||
|
@Excel(name = "组织形式(分工会/校工会)")
|
||||||
|
private int createMode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("基地联系人")
|
||||||
|
@Excel(name = "目的地联系人")
|
||||||
|
private String baseContactPerson;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("基地联系人电话")
|
||||||
|
@Excel(name = "联系电话")
|
||||||
|
private String baseContactNumber;
|
||||||
|
|
||||||
|
@One(field = "travelAgencyId")
|
||||||
|
private RecuperationTravelAgency travelAgency;
|
||||||
|
}
|
||||||
+112
@@ -0,0 +1,112 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_config")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养配置")
|
||||||
|
public class RecuperationConfig extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
|
@Comment("配置名称")
|
||||||
|
private String configName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT, width = 32)
|
||||||
|
@Comment("参加人员范围")
|
||||||
|
private Integer activityGroupId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("省外名额分配")
|
||||||
|
private Integer outsideQuota;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.FLOAT, width = 3, precision = 2)
|
||||||
|
@Comment("省外名额分配比例")
|
||||||
|
private Double outsideQuotaProportion;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("省外几年去一次")
|
||||||
|
private Integer outsideNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("每年旅行频率")
|
||||||
|
private Integer travelFrequency;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("组团人数")
|
||||||
|
private Integer groupNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("不可取消修改天数")
|
||||||
|
private Integer modifyDays;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("可以修改几次")
|
||||||
|
private Integer modifyNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("省内线路是否审核")
|
||||||
|
private Boolean isSnLine;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("省外线路是否审核")
|
||||||
|
private Boolean isSwLine;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
@Comment("标段")
|
||||||
|
private List<NutMap> modifyBd;
|
||||||
|
|
||||||
|
@Many(field = "configId")
|
||||||
|
private List<RecuperationLot> lots;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("全批次最多教职工报名人数")
|
||||||
|
private Integer allLineSignUpNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(customType = "longtext")
|
||||||
|
@Comment("疗休养服务须知")
|
||||||
|
private String notice;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("省内起始年份")
|
||||||
|
private Integer provinceStartYear;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("床位信息")
|
||||||
|
private Boolean bedInfo;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("家属信息")
|
||||||
|
private Integer familyInfo;
|
||||||
|
}
|
||||||
+206
@@ -0,0 +1,206 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @FileName io.v.nutz.therapyRecuperation.model.TheRapyRecuperationEnroll
|
||||||
|
* @Description: 疗休养报名登记表
|
||||||
|
* @Author zxc
|
||||||
|
* @Date 2022/5/31:16:58
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_enroll")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养报名登记表")
|
||||||
|
public class RecuperationEnroll extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("工号")
|
||||||
|
@Excel(name = "工号")
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("姓名")
|
||||||
|
@Excel(name = "姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 1)
|
||||||
|
@Comment("性别")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("本人单位")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("本人分工会")
|
||||||
|
private String unionName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("本人单位")
|
||||||
|
private String selfUnitId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("本人分工会Id")
|
||||||
|
private String selfUnionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("参加的分工会")
|
||||||
|
private String takePartInUnionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("参加线路")
|
||||||
|
private String takePartInLineId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("参加旅行社")
|
||||||
|
private String takePartInTravelAgencyId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("参加酒店")
|
||||||
|
private String takePartInBaseManagementId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("报名时间")
|
||||||
|
private Date signingUptime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATE)
|
||||||
|
@Comment("参加时间")
|
||||||
|
@Excel(name = "参加时间", format = "yyyy-MM-dd")
|
||||||
|
private Date takePartInTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否参加")
|
||||||
|
private boolean isTakePartIn;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("审核状态")
|
||||||
|
private Integer stateId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("本人分工会审核Id")
|
||||||
|
private String selfUnionAuditId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("床位信息id")
|
||||||
|
private String bedInfoId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("参加的线路分工会审核Id")
|
||||||
|
private String joinLineUnionAuditId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 18)
|
||||||
|
@Comment("身份证号")
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
@Comment("手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否正常(true正常 false该报名记录已被管理员废弃)")
|
||||||
|
private boolean isNormal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同伴信息
|
||||||
|
*/
|
||||||
|
@Many(field = "trreId")
|
||||||
|
private List<RecuperationEnrollCompanion> companionList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 酒店信息
|
||||||
|
*/
|
||||||
|
@One(field = "takePartInBaseManagementId")
|
||||||
|
private RecuperationBaseManagement managementInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线路信息
|
||||||
|
*/
|
||||||
|
// @One(field = "takePartInLineId")
|
||||||
|
private RecuperationLine lineInfo;
|
||||||
|
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
private Date playStartTime;
|
||||||
|
|
||||||
|
private Date playEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位信息
|
||||||
|
*/
|
||||||
|
@One(field = "bedInfoId")
|
||||||
|
private RecuperationEnrollBed bedInfo;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("对旅行社的评价(几星)")
|
||||||
|
private String evaluationForTravelAgency;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("对线路的评价(几星)")
|
||||||
|
private String evaluationForLine;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("对旅途的评价(几星)")
|
||||||
|
private String evaluationForJourney;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("反馈内容")
|
||||||
|
private String feedbackContent;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("标段时间")
|
||||||
|
private String lotId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("校工会审核Id")
|
||||||
|
private String schoolUnionAuditId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("家属数量")
|
||||||
|
private Integer familyNumber;
|
||||||
|
|
||||||
|
}
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @FileName io.v.nutz.therapyRecuperation.model.TheRapyRecuperationEnrollBed
|
||||||
|
* @Description: 报名拼床信息
|
||||||
|
* @Author zxc
|
||||||
|
* @Date 2022/6/2:14:44
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_enroll_bed")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养报名床位表")
|
||||||
|
public class RecuperationEnrollBed extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
|
@Comment("床型")
|
||||||
|
private String bedType;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("床位数")
|
||||||
|
private Integer bedNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("一起睡吗 搞基")
|
||||||
|
private boolean isSleepTogether;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("意向拼房人")
|
||||||
|
private String otherSleepUser;
|
||||||
|
|
||||||
|
}
|
||||||
+79
@@ -0,0 +1,79 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @FileName io.v.nutz.therapyRecuperation.model.TheRapyRecuperationEnrollFamily
|
||||||
|
* @Description: TODO
|
||||||
|
* @Author zxc
|
||||||
|
* @Date 2022/5/31:17:07
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_enroll_companion")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养报名床位表")
|
||||||
|
public class RecuperationEnrollCompanion extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("报名记录表Id")
|
||||||
|
private String trreId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("工号")
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.CHAR, width = 1)
|
||||||
|
@Comment("性别")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("年龄")
|
||||||
|
private Integer age;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
|
@Comment("关系")
|
||||||
|
private String relation;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 18)
|
||||||
|
@Comment("身份证号")
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 18)
|
||||||
|
@Comment("手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("床位信息id")
|
||||||
|
private String bedInfoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位信息
|
||||||
|
*/
|
||||||
|
@One(field = "bedInfoId")
|
||||||
|
private RecuperationEnrollBed bedInfo;
|
||||||
|
|
||||||
|
}
|
||||||
+118
@@ -0,0 +1,118 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_line")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养线路")
|
||||||
|
public class RecuperationLine extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("编号")
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("线路名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("旅行社Id")
|
||||||
|
private String travelAgencyId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
|
@Comment("区域性质")
|
||||||
|
private String regionalNature;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(customType = "text")
|
||||||
|
@Comment("疗休养内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("最少参与教工")
|
||||||
|
private Integer minimumGroupSize;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("年度")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否禁用")
|
||||||
|
private boolean isDisabled;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("哪个分工会创建的")
|
||||||
|
private String createUnionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("交通工具")
|
||||||
|
private String trafficTools;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("预计费用")
|
||||||
|
private String estimatedCost;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("成团人数包括家属")
|
||||||
|
private Integer estimatedFamilyNumbers;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("缩略图")
|
||||||
|
private String file;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("报名模式(1.分工会 2.自由)")
|
||||||
|
private Integer signUpMode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("创建模式(1.分工会 2.校工会)")
|
||||||
|
private int createMode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("标段")
|
||||||
|
private String lotId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("联系人")
|
||||||
|
private String lineContact;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("联系电话")
|
||||||
|
private String lineContactPhone;
|
||||||
|
|
||||||
|
@One(field = "travelAgencyId")
|
||||||
|
private RecuperationTravelAgency travelAgency;
|
||||||
|
|
||||||
|
}
|
||||||
+126
@@ -0,0 +1,126 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 疗休养线工会选择
|
||||||
|
*
|
||||||
|
* @author jug
|
||||||
|
* @date 2023/06/26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_line_union_select")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养线路")
|
||||||
|
public class RecuperationLineUnionSelect extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("分工会id")
|
||||||
|
private String unionId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("线路id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("选择时间")
|
||||||
|
private Date selectTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("选择用户")
|
||||||
|
private String selectUserId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("报名开始时间")
|
||||||
|
private Date signUpStartTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("报名截至时间")
|
||||||
|
private Date signUpEndTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("变更截至时间")
|
||||||
|
private Date changeEndTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("游玩开始时间")
|
||||||
|
private Date playStartTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@Comment("游玩结束时间")
|
||||||
|
private Date playEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线路信息
|
||||||
|
*/
|
||||||
|
@One(field = "lineId")
|
||||||
|
private RecuperationLine lineInfo;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("联系人")
|
||||||
|
private String contact;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR)
|
||||||
|
@Comment("联系方式")
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否公开")
|
||||||
|
private Boolean isOpen;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("最少参与教工")
|
||||||
|
private Integer minimumGroupSize;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("交通工具")
|
||||||
|
private String trafficTools;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("预计费用")
|
||||||
|
private String estimatedCost;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("成团人数包括家属")
|
||||||
|
private Integer estimatedFamilyNumbers;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("报名模式、组织形式(1.分工会 2.校工会)")
|
||||||
|
private Integer signUpMode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否启用")
|
||||||
|
private Boolean enable;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_lot")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养标段")
|
||||||
|
public class RecuperationLot extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
|
@Comment("标段")
|
||||||
|
private String lotName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
|
@Comment("标段值")
|
||||||
|
private String lotValue;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
|
@Comment("费用")
|
||||||
|
private Integer activityCost;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
@Comment("配置ID")
|
||||||
|
private String configId;
|
||||||
|
|
||||||
|
}
|
||||||
+75
@@ -0,0 +1,75 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.model;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import com.budwk.app.sys.models.Sys_file;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("recuperation_travel_agency")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("疗休养旅行社")
|
||||||
|
public class RecuperationTravelAgency extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@Comment("id")
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("旅行社编号")
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("旅行社名称")
|
||||||
|
private String travelAgencyName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
@Comment("旅行社联系人")
|
||||||
|
private String contact;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 11)
|
||||||
|
@Comment("旅行社联系人手机")
|
||||||
|
private String contactMobileNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
@Comment("旅行社邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("旅行社官网")
|
||||||
|
private String officialWebsite;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Comment("年度")
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Comment("是否禁用")
|
||||||
|
private boolean isDisabled;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
@Comment("缩略图")
|
||||||
|
private String file;
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationBaseManagement;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationBaseManagerService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 10:43
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface RecuperationBaseManagerService extends BaseService<RecuperationBaseManagement> {
|
||||||
|
|
||||||
|
NutMap selectBaseAllInfo(String id);
|
||||||
|
}
|
||||||
+89
@@ -0,0 +1,89 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLine;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationLineService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 15:59
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface RecuperationLineService extends BaseService<RecuperationLine> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线路
|
||||||
|
*
|
||||||
|
* @param lineId 线路id
|
||||||
|
*/
|
||||||
|
void deleteLine(String lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加线路
|
||||||
|
*
|
||||||
|
* @param line 线路
|
||||||
|
*/
|
||||||
|
void addLine(RecuperationLine line);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑线路
|
||||||
|
*
|
||||||
|
* @param line 线路
|
||||||
|
*/
|
||||||
|
void editLine(RecuperationLine line);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启或关闭线路
|
||||||
|
*
|
||||||
|
* @param lineId 线路id
|
||||||
|
*/
|
||||||
|
void openClosedLine(String lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面数据
|
||||||
|
*
|
||||||
|
* @param pageForm 分页参数
|
||||||
|
* @param cnd cnd
|
||||||
|
* @return {@link Pagination}
|
||||||
|
*/
|
||||||
|
Pagination pageData(PageForm pageForm, Cnd cnd);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线路详细信息
|
||||||
|
*
|
||||||
|
* @param lineId 行id
|
||||||
|
* @return {@link RecuperationLine}
|
||||||
|
*/
|
||||||
|
RecuperationLine selectLineInfoById(String lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据分工会选择的线路id查询所该线路报名的人
|
||||||
|
*
|
||||||
|
* @param pageForm 页面形式
|
||||||
|
* @param lineId 行id
|
||||||
|
* @return {@link List}<{@link NutMap}>
|
||||||
|
*/
|
||||||
|
Pagination selectLineUser(PageForm pageForm, String lineId, String unionId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除线路详细信息
|
||||||
|
*
|
||||||
|
* @param lineId 线路id
|
||||||
|
*/
|
||||||
|
void deleteLineInfoCache(String lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看各个分工会设置的时间信息
|
||||||
|
*
|
||||||
|
* @param lineId 线路id
|
||||||
|
* @return {@link List}<{@link NutMap}>
|
||||||
|
*/
|
||||||
|
List<NutMap> viewUnionSelectTimeInfo(String lineId);
|
||||||
|
}
|
||||||
+79
@@ -0,0 +1,79 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationTravelAgency;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationTravelAgencyService
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 9:22
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface RecuperationTravelAgencyService extends BaseService<RecuperationTravelAgency> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除旅行社
|
||||||
|
*
|
||||||
|
* @param travelAgencyId 旅行社 ID
|
||||||
|
*/
|
||||||
|
void deleteTravelAgency(String travelAgencyId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加旅行社
|
||||||
|
*
|
||||||
|
* @param travelAgency 旅行社
|
||||||
|
*/
|
||||||
|
void addTravelAgency(RecuperationTravelAgency travelAgency);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑旅行社
|
||||||
|
*
|
||||||
|
* @param travelAgency 旅行社
|
||||||
|
*/
|
||||||
|
void editTravelAgency(RecuperationTravelAgency travelAgency);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启或关闭旅行社
|
||||||
|
*
|
||||||
|
* @param travelAgencyId 旅行社id
|
||||||
|
*/
|
||||||
|
void openTravelAgency(String travelAgencyId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面数据
|
||||||
|
*
|
||||||
|
* @param pageForm 分页参数
|
||||||
|
* @param cnd cnd
|
||||||
|
* @return {@link Pagination}
|
||||||
|
*/
|
||||||
|
Pagination pageData(PageForm pageForm, Cnd cnd);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询旅行社
|
||||||
|
*
|
||||||
|
* @param cnd cnd
|
||||||
|
* @return {@link List}<{@link RecuperationTravelAgency}>
|
||||||
|
*/
|
||||||
|
List<RecuperationTravelAgency> selectAllTravelAgencyByYear(Cnd cnd);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据旅行社id查询所该旅行社报名的人,只查报旅行社的人跟线路没关系
|
||||||
|
*
|
||||||
|
* @param pageForm 页面形式
|
||||||
|
* @param id 旅行社id
|
||||||
|
* @return {@link List}<{@link NutMap}>
|
||||||
|
*/
|
||||||
|
Pagination selectAgencyUser(PageForm pageForm,String id);
|
||||||
|
}
|
||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationBaseManagement;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.service.RecuperationBaseManagerService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationBaseManagerServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 10:43
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class RecuperationBaseManagerServiceImpl extends BaseServiceImpl<RecuperationBaseManagement> implements RecuperationBaseManagerService {
|
||||||
|
|
||||||
|
public RecuperationBaseManagerServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NutMap selectBaseAllInfo(String id) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
select
|
||||||
|
b.*,
|
||||||
|
l.lotName,
|
||||||
|
(select COUNT(1) FROM recuperation_enroll en WHERE isNormal=true AND en.loginName=@loginname and YEAR(en.signingUptime)=@year ) isNormal,
|
||||||
|
(select COUNT(1) FROM recuperation_enroll en WHERE isNormal=false AND en.loginName=@loginname and YEAR(en.signingUptime)=@year) isNormalFalse
|
||||||
|
from
|
||||||
|
recuperation_base_management b
|
||||||
|
left join recuperation_lot l on l.id = b.lotId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setParam("loginname", SecurityUtil.getUserLoginname());
|
||||||
|
sql.setParam("year", DateUtil.thisYear());
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("b.id", "=", id);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
sql.setCallback(Sqls.callback.map());
|
||||||
|
dao().execute(sql);
|
||||||
|
return (NutMap) sql.getResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
+189
@@ -0,0 +1,189 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.constant.RecuperationLineCreateMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.constant.RecuperationSignUpMode;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.constant.RecuperationState;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationEnroll;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationEnrollCompanion;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLine;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationLineUnionSelect;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.service.RecuperationLineService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
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.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.plugins.wkcache.annotation.CacheRemove;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationLineServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 15:59
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class RecuperationLineServiceImpl extends BaseServiceImpl<RecuperationLine> implements RecuperationLineService {
|
||||||
|
|
||||||
|
public RecuperationLineServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteLine(String lineId) {
|
||||||
|
List<RecuperationLineUnionSelect> unionSelectList = dao().query(RecuperationLineUnionSelect.class, Cnd.where("lineId", "=", lineId));
|
||||||
|
if (Lang.isNotEmpty(unionSelectList)) {
|
||||||
|
List<String> selectIds = unionSelectList.stream().map(RecuperationLineUnionSelect::getId).collect(Collectors.toList());
|
||||||
|
List<RecuperationEnroll> enrollList = dao().query(RecuperationEnroll.class, Cnd.where("takePartInLineId", "in", selectIds));
|
||||||
|
if (Lang.isNotEmpty(enrollList)){
|
||||||
|
List<String> enrollIds = enrollList.stream().map(RecuperationEnroll::getId).collect(Collectors.toList());
|
||||||
|
dao().clear(RecuperationEnrollCompanion.class, Cnd.where("trreId", "in", enrollIds));
|
||||||
|
}
|
||||||
|
dao().clear(RecuperationEnroll.class, Cnd.where("takePartInLineId", "in", selectIds));
|
||||||
|
}
|
||||||
|
delete(lineId);
|
||||||
|
dao().clear(RecuperationLineUnionSelect.class, Cnd.where("lineId", "=", lineId));
|
||||||
|
deleteLineInfoCache(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addLine(RecuperationLine line) {
|
||||||
|
boolean hasSchoolAdminRole = AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name());
|
||||||
|
|
||||||
|
if (hasSchoolAdminRole) {
|
||||||
|
line.setCreateUnionId(null);
|
||||||
|
line.setCreateMode(RecuperationLineCreateMode.SCHOOL.getValue());
|
||||||
|
insert(line);
|
||||||
|
} else if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_ADMIN.name())) {
|
||||||
|
line.setCreateUnionId(SecurityUtil.getUnionId());
|
||||||
|
line.setCreateMode(RecuperationLineCreateMode.UNION.getValue());
|
||||||
|
insert(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editLine(RecuperationLine line) {
|
||||||
|
update(line);
|
||||||
|
deleteLineInfoCache(line.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void openClosedLine(String lineId) {
|
||||||
|
update(Chain.makeSpecial("isDisabled", "isDisabled ^ 1"), Cnd.where("id", "=", lineId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination pageData(PageForm pageForm, Cnd cnd) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
line.id,
|
||||||
|
line.serialNumber,
|
||||||
|
line.lineName,
|
||||||
|
line.regionalNature,
|
||||||
|
line.minimumGroupSize,
|
||||||
|
line.year,
|
||||||
|
line.isDisabled,
|
||||||
|
line.createUnionId,
|
||||||
|
line.signUpMode,
|
||||||
|
line.createMode,
|
||||||
|
line.file AS fileId,
|
||||||
|
gh.name AS createUnionName,
|
||||||
|
u.username AS createUserName,
|
||||||
|
ta.travelAgencyName,
|
||||||
|
ta.contact,
|
||||||
|
ta.contactMobileNumber,
|
||||||
|
ta.officialWebsite,
|
||||||
|
lot.lotName
|
||||||
|
FROM
|
||||||
|
recuperation_line line
|
||||||
|
LEFT JOIN recuperation_travel_agency ta ON ta.id = line.travelAgencyId
|
||||||
|
LEFT JOIN sys_union gh ON gh.id = line.createUnionid
|
||||||
|
LEFT JOIN sys_user u ON u.id = line.createdBy
|
||||||
|
LEFT JOIN recuperation_lot lot on lot.id = line.lotId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RecuperationLine selectLineInfoById(String lineId) {
|
||||||
|
return fetchLinks(fetch(lineId), "travelAgency");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination selectLineUser(PageForm pageForm, String lineId, String unionId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
line.lineName,
|
||||||
|
enroll.id,
|
||||||
|
enroll.loginName,
|
||||||
|
enroll.userName,
|
||||||
|
enroll.unionName,
|
||||||
|
enroll.unitName,
|
||||||
|
enroll.familyNumber,
|
||||||
|
( SELECT COUNT( 1 ) FROM recuperation_enroll_companion WHERE trreId = enroll.id) isFamily
|
||||||
|
FROM
|
||||||
|
`recuperation_enroll` enroll
|
||||||
|
LEFT JOIN recuperation_line_union_select lineu ON lineu.id = enroll.takePartInLineId
|
||||||
|
LEFT JOIN recuperation_line line ON line.id = lineu.lineId
|
||||||
|
WHERE
|
||||||
|
lineu.id = @takePartInLineId
|
||||||
|
and enroll.stateId=@stateId
|
||||||
|
$unionCnd
|
||||||
|
""").setParam("takePartInLineId", lineId).setParam("stateId", RecuperationState.PASS);
|
||||||
|
if (StrUtil.isNotBlank(unionId) && !AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||||
|
sql.setVar("unionCnd", "and enroll.selfUnionId='%s'".formatted(unionId));
|
||||||
|
}
|
||||||
|
Pagination pagination = listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
List<NutMap> list = pagination.getList();
|
||||||
|
list.forEach(v -> {
|
||||||
|
List<RecuperationEnrollCompanion> companionList = dao().query(RecuperationEnrollCompanion.class, Cnd.where("trreId", "=", v.getString("id")));
|
||||||
|
for (RecuperationEnrollCompanion enrollCompanion : companionList) {
|
||||||
|
dao().fetchLinks(enrollCompanion, "bedInfo");
|
||||||
|
}
|
||||||
|
v.setv("companionList", companionList);
|
||||||
|
});
|
||||||
|
return pagination;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@CacheRemove(cacheKey = "${args[0]}_selectLineInfoById")
|
||||||
|
public void deleteLineInfoCache(String lineId) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<NutMap> viewUnionSelectTimeInfo(String lineId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
us.signUpStartTime,
|
||||||
|
us.signUpEndTime,
|
||||||
|
us.changeEndTime,
|
||||||
|
us.playStartTime,
|
||||||
|
us.playEndTime,
|
||||||
|
gh.name AS selectUnionName
|
||||||
|
FROM
|
||||||
|
`recuperation_line_union_select` us
|
||||||
|
LEFT JOIN sys_union gh ON gh.id = us.unionId
|
||||||
|
WHERE us.lineId = @lineId
|
||||||
|
""");
|
||||||
|
return listMap(sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
+91
@@ -0,0 +1,91 @@
|
|||||||
|
package com.budwk.app.zhgh.staffbenefit.recuperation.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.model.RecuperationTravelAgency;
|
||||||
|
import com.budwk.app.zhgh.staffbenefit.recuperation.service.RecuperationTravelAgencyService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
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.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName RecuperationTravelAgencyServiceImpl
|
||||||
|
* @Author JyuHsin
|
||||||
|
* @Date 2025/7/31 9:22
|
||||||
|
* @Version 1.0
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class RecuperationTravelAgencyServiceImpl extends BaseServiceImpl<RecuperationTravelAgency> implements RecuperationTravelAgencyService {
|
||||||
|
|
||||||
|
public RecuperationTravelAgencyServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteTravelAgency(String travelAgencyId) {
|
||||||
|
delete(travelAgencyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addTravelAgency(RecuperationTravelAgency travelAgency) {
|
||||||
|
insert(travelAgency);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editTravelAgency(RecuperationTravelAgency travelAgency) {
|
||||||
|
update(travelAgency);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void openTravelAgency(String travelAgencyId) {
|
||||||
|
update(Chain.makeSpecial("isDisabled", "isDisabled ^ 1"), Cnd.where("id", "=", travelAgencyId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination pageData(PageForm pageForm, Cnd cnd) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
select
|
||||||
|
*,
|
||||||
|
file as fileId
|
||||||
|
from
|
||||||
|
recuperation_travel_agency
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RecuperationTravelAgency> selectAllTravelAgencyByYear(Cnd cnd) {
|
||||||
|
return dao().query(RecuperationTravelAgency.class, cnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination selectAgencyUser(PageForm pageForm, String id) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
agency.travelAgencyName,
|
||||||
|
enroll.id,
|
||||||
|
enroll.loginName,
|
||||||
|
enroll.userName,
|
||||||
|
enroll.unionName,
|
||||||
|
enroll.unitName,
|
||||||
|
( SELECT COUNT( 1 ) FROM recuperation_enroll_companion WHERE trreId = enroll.id AND relation = '亲属' ) isFamily
|
||||||
|
FROM
|
||||||
|
`recuperation_enroll` enroll
|
||||||
|
LEFT JOIN recuperation_travel_agency agency ON agency.id = enroll.takePartInTravelAgencyId
|
||||||
|
WHERE
|
||||||
|
enroll.takePartInTravelAgencyId = @takePartInTravelAgencyId
|
||||||
|
""").setParam("takePartInTravelAgencyId", id);
|
||||||
|
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -653,6 +653,15 @@ td.no-b {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.left-span-label {
|
||||||
|
border-left: 4px solid var(--color-primary);
|
||||||
|
font-size: 15px;
|
||||||
|
color: var(--color-black);
|
||||||
|
font-weight: 600;
|
||||||
|
padding-left: 8px;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**********start****************设置工作流表单el-description嵌套el-form的格式 必须要使用flow-task-form!!!***********************start*****************/
|
/**********start****************设置工作流表单el-description嵌套el-form的格式 必须要使用flow-task-form!!!***********************start*****************/
|
||||||
|
|
||||||
.flow-task-form .el-descriptions__table {
|
.flow-task-form .el-descriptions__table {
|
||||||
|
|||||||
@@ -17,47 +17,48 @@ function autoEnhanceForm(formVm) {
|
|||||||
const originalValidate = formVm.validate
|
const originalValidate = formVm.validate
|
||||||
|
|
||||||
formVm.validate = function(callback) {
|
formVm.validate = function(callback) {
|
||||||
originalValidate(async (valid, fields) => {
|
let capturedFields;
|
||||||
if (valid) {
|
|
||||||
callback?.(valid, fields)
|
|
||||||
} else {
|
|
||||||
const firstField = Object.keys(fields)[0]
|
|
||||||
const fieldErrors = fields[firstField]
|
|
||||||
const errorMessage = fieldErrors[0].message
|
|
||||||
|
|
||||||
let finalMessage = errorMessage
|
const promise = new Promise((resolve) => {
|
||||||
|
originalValidate.call(this, (valid, fields) => {
|
||||||
|
capturedFields = fields;
|
||||||
|
|
||||||
const formItem = formVm.fields?.find(item => item.prop === firstField)
|
if (valid) {
|
||||||
|
resolve(true);
|
||||||
if (errorMessage === '必填' && formItem && formItem.label) {
|
|
||||||
finalMessage = `${formItem.label} 必填`
|
|
||||||
}
|
|
||||||
|
|
||||||
// 提示
|
|
||||||
if (formVm.$message) {
|
|
||||||
formVm.$message({
|
|
||||||
message: finalMessage,
|
|
||||||
type: 'error',
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
alert(finalMessage)
|
const firstField = Object.keys(fields)[0];
|
||||||
}
|
const fieldErrors = fields[firstField];
|
||||||
|
const errorMessage = fieldErrors?.[0]?.message || '校验失败';
|
||||||
|
|
||||||
await formVm.$nextTick()
|
let finalMessage = errorMessage;
|
||||||
|
const formItem = this.fields?.find((item) => item.prop === firstField);
|
||||||
if (formItem && formItem.$el) {
|
if (errorMessage === '必填' && formItem && formItem.label) {
|
||||||
const inputEl =
|
finalMessage = `${formItem.label} 必填`;
|
||||||
formItem.$el.querySelector('input') ||
|
|
||||||
formItem.$el.querySelector('textarea') ||
|
|
||||||
formItem.$el.querySelector('.el-input__inner') ||
|
|
||||||
formItem.$el.querySelector('.el-textarea__inner')
|
|
||||||
if (inputEl) {
|
|
||||||
inputEl.focus()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.$message) {
|
||||||
|
this.$message({ message: finalMessage, type: 'error' });
|
||||||
|
} else {
|
||||||
|
alert(finalMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const inputEl =
|
||||||
|
formItem?.$el?.querySelector('input, textarea, .el-input__inner, .el-textarea__inner');
|
||||||
|
if (inputEl) inputEl.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
resolve(false);
|
||||||
}
|
}
|
||||||
callback?.(valid, fields)
|
});
|
||||||
}
|
});
|
||||||
})
|
|
||||||
|
if (typeof callback === 'function') {
|
||||||
|
promise.then(valid => callback(valid, capturedFields));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return promise;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ layout("/layouts/platform.html"){
|
|||||||
<search-item label="年度">
|
<search-item label="年度">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
ype="year"
|
type="year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
placeholder="年度"
|
placeholder="年度"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -58,12 +58,12 @@ layout("/layouts/platform.html"){
|
|||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="300px">
|
<el-table-column label="操作" fixed="right" width="300">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button @click="onOpen(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="onOpen(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button v-if="row.taskKey === 'apply' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
<el-button v-if="row.taskKey === 'startTask'" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
<el-button v-if="['waiting'].includes(row.flow_status)" size="mini" type="danger" @click="onRevoke(row.id)">撤销</el-button>
|
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
||||||
<el-button v-if="row.taskKey === 'apply' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
<el-button v-if="row.taskKey === 'startTask'" @click="onDelete(row.id)" size="mini" type="danger">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -118,8 +118,34 @@ layout("/layouts/platform.html"){
|
|||||||
"&defineKey=ZGWW"
|
"&defineKey=ZGWW"
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
onRevoke(id) {},
|
onRevoke(row) {
|
||||||
onDelete(id) {},
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(id) {
|
||||||
|
this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post("/platform/condolence/apply/delete", { id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
queryCondolenceType() {
|
queryCondolenceType() {
|
||||||
this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
|
|||||||
+336
@@ -0,0 +1,336 @@
|
|||||||
|
const basicForm = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="160px" label-position="left">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="年度" prop="year">
|
||||||
|
<el-date-picker style="width: 100%"
|
||||||
|
@change="yearChange"
|
||||||
|
type="year"
|
||||||
|
placeholder="请选择年度"
|
||||||
|
v-model="formData.year"
|
||||||
|
value-format="yyyy"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="排序编号" prop="sortNumber">
|
||||||
|
<el-input maxlength="50" v-model="formData.sortNumber" placeholder="请输入排序编号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="目的地名称" prop="baseName">
|
||||||
|
<el-input maxlength="50" v-model="formData.baseName" placeholder="请输入目的地名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="旅行社名称" prop="travelAgencyId">
|
||||||
|
<el-select clearable filterable style="width: 100%" v-model="formData.travelAgencyId" placeholder="请选择旅行社">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.travelAgencyName+'('+ item.year +'年)'"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in localTravelList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="组织形式" prop="createMode">
|
||||||
|
<el-radio-group size="small" v-model="formData.createMode">
|
||||||
|
<el-radio :label="1" border>校工会组织</el-radio>
|
||||||
|
<el-radio :label="2" border>分工会组织</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="活动范围" prop="regionalNature">
|
||||||
|
<el-radio-group size="small" v-model="formData.regionalNature">
|
||||||
|
<el-radio label="省内" border>省内</el-radio>
|
||||||
|
<el-radio label="省外" border>省外</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="标段时间" prop="lotId">
|
||||||
|
<el-select clearable filterable style="width: 100%" v-model="formData.lotId"
|
||||||
|
@change="doBdModify" placeholder="请选择标段时间">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.lotName"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in localLotList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="预计费用(元/人次)" prop="estimatedCost">
|
||||||
|
<el-select clearable filterable style="width: 100%" v-model="formData.estimatedCost"
|
||||||
|
placeholder="请选择预计费用">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.activityCost"
|
||||||
|
:value="item.activityCost"
|
||||||
|
v-for="item in localLotList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="目的地联系人" prop="baseContactPerson">
|
||||||
|
<el-input clearable maxlength="20" v-model="formData.baseContactPerson" placeholder="请输入目的地联系人"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="联系人电话" prop="baseContactNumber">
|
||||||
|
<el-input clearable maxlength="20" v-model="formData.baseContactNumber" placeholder="请输入联系人电话"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="报名开始时间" prop="signUpStartTime">
|
||||||
|
<el-date-picker style="width: 100%"
|
||||||
|
placeholder="请选择报名开始时间"
|
||||||
|
type="datetime"
|
||||||
|
v-model="formData.signUpStartTime"
|
||||||
|
format="yyyy-MM-dd HH:mm"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="报名截至时间" prop="signUpEndTime">
|
||||||
|
<el-date-picker style="width: 100%"
|
||||||
|
placeholder="请选择报名截至时间"
|
||||||
|
type="datetime"
|
||||||
|
v-model="formData.signUpEndTime"
|
||||||
|
format="yyyy-MM-dd HH:mm"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="变更截至时间" prop="changeEndTime">
|
||||||
|
<el-date-picker style="width: 100%"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="请选择变更截至时间"
|
||||||
|
v-model="formData.changeEndTime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item>
|
||||||
|
<template #label>
|
||||||
|
<span class="text-primary">
|
||||||
|
<i class="el-icon-warning"></i>
|
||||||
|
温馨提醒:
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<span class="text-primary">
|
||||||
|
变更时间应该大于报名截至时间,小于活动时间。
|
||||||
|
</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="活动开始时间" prop="activityStartTime">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="请选择活动开始时间"
|
||||||
|
style="width: 100%"
|
||||||
|
type="date"
|
||||||
|
v-model="formData.activityStartTime"
|
||||||
|
value-format="yyyy-MM-dd">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="活动结束时间" prop="activityEndTime">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="请选择活动结束时间"
|
||||||
|
style="width: 100%"
|
||||||
|
type="date"
|
||||||
|
v-model="formData.activityEndTime"
|
||||||
|
value-format="yyyy-MM-dd">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="24" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="详细信息" prop="content">
|
||||||
|
<text-editor v-model="formData.content"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="是否启用" prop="isDisabled">
|
||||||
|
<el-switch
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
v-model="formData.isDisabled">
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="24" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="移动端缩略图" prop="file">
|
||||||
|
<file-upload :value.sync="formData.file" accept=".jpg,.jpeg,.png"
|
||||||
|
:upload_number="1" upload_result_category="interval"
|
||||||
|
complete_result upload_mode="drag"></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-row class="mt10" justify="end" type="flex">
|
||||||
|
<el-button @click="$emit('refresh')">取消</el-button>
|
||||||
|
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
props: {
|
||||||
|
travelList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
lotList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
const validateSignUpEndTime = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('请选择报名截至时间'))
|
||||||
|
}
|
||||||
|
if (this.formData.signUpStartTime) {
|
||||||
|
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||||
|
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
const validateChangeEndTime = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('请选择变更截至时间'))
|
||||||
|
}
|
||||||
|
if (this.formData.activityStartTime) {
|
||||||
|
if (Date.parse(value) >= Date.parse(this.formData.activityStartTime)) {
|
||||||
|
callback(new Error('变更截至时间必须小于活动开始时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.formData.signUpEndTime) {
|
||||||
|
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||||
|
callback(new Error('变更截至时间必须大于活动截至时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
const validateActivityStartTime = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('请选择活动开始时间'))
|
||||||
|
}
|
||||||
|
if (this.formData.changeEndTime) {
|
||||||
|
if (Date.parse(value) <= Date.parse(this.formData.changeEndTime)) {
|
||||||
|
callback(new Error('活动开始时间必须大于变更截至时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
const validateActivityEndTime = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('请选择活动结束时间'))
|
||||||
|
}
|
||||||
|
if (this.formData.activityStartTime) {
|
||||||
|
if (Date.parse(value) <= Date.parse(this.formData.activityStartTime)) {
|
||||||
|
callback(new Error('活动结束时间必须大于活动开始时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
localTravelList: [...this.travelList],
|
||||||
|
localLotList: [...this.lotList],
|
||||||
|
formData: {
|
||||||
|
isDisabled: true
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
sortNumber: [{required: false, message: '请输入排序编号', trigger: ['change', 'blur']}],
|
||||||
|
baseName: [{required: true, message: '请输入目的地名称', trigger: ['change', 'blur']}],
|
||||||
|
travelAgencyId: [{required: true, message: '请选择旅行社', trigger: ['change', 'blur']}],
|
||||||
|
regionalNature: [{required: true, message: '请选择区域性质', trigger: ['change', 'blur']}],
|
||||||
|
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||||
|
lotId: [{required: true, message: '请选择出行天数', trigger: ['change', 'blur']}],
|
||||||
|
content: [{required: false, message: '请输入详细内容', trigger: ['change', 'blur']}],
|
||||||
|
signUpStartTime: [{required: true, message: '请选择报名开始时间', trigger: ['change', 'blur']}],
|
||||||
|
signUpEndTime: [{required: true, validator: validateSignUpEndTime, trigger: ['change', 'blur']}],
|
||||||
|
changeEndTime: [{required: true, validator: validateChangeEndTime, trigger: ['change', 'blur']}],
|
||||||
|
files: [{required: true, message: '请上传图片', trigger: ['change', 'blur']}],
|
||||||
|
createMode: [{required: true, message: '请选择组织方式', trigger: ['change', 'blur']}],
|
||||||
|
activityStartTime: [{ required: true, validator: validateActivityStartTime, trigger: ['change', 'blur'] }],
|
||||||
|
activityEndTime: [{ required: true, validator: validateActivityEndTime, trigger: ['change', 'blur'] }],
|
||||||
|
estimatedCost: [{required: true, message: '请输入预计费用', trigger: ['change', 'blur']}],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doBdModify() {
|
||||||
|
const lot = this.localLotList.find(o => o.id === this.formData.lotId)
|
||||||
|
if (lot) this.$set(this.formData, 'estimatedCost', lot.estimatedCost)
|
||||||
|
},
|
||||||
|
async yearChange() {
|
||||||
|
this.$set(this.formData, 'travelAgencyId', null)
|
||||||
|
await this.selectTravelAgencyList()
|
||||||
|
},
|
||||||
|
async selectTravelAgencyList() {
|
||||||
|
const resp = await this.$axios.post('/platform/recuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||||
|
this.localTravelList = resp.data
|
||||||
|
},
|
||||||
|
onOpen(row) {
|
||||||
|
if(row && row.id) {
|
||||||
|
this.$axios.post(loc() + '/selectBaseManageById/' + row.id)
|
||||||
|
.then((resp) => {
|
||||||
|
const data = resp.data
|
||||||
|
data.year = data.year.toString()
|
||||||
|
this.formData = {...data}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post("/platform/recuperation/baseManagement/onSubmit", this.formData)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
+245
@@ -0,0 +1,245 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度:">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="请选择年度"
|
||||||
|
type="year"
|
||||||
|
@change="doSearch"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="目的地:">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||||
|
placeholder="请输入目的地名称"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.baseName">
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="旅行社:">
|
||||||
|
<el-select clearable filterable style="width: 100%"
|
||||||
|
v-model="pageForm.travelAgencyId"
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="请选择旅行社">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.travelAgencyName"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in travelAgencyList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="活动范围:">
|
||||||
|
<el-select clearable filterable style="width: 100%"
|
||||||
|
v-model="pageForm.regionalNature"
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="请选择活动范围">
|
||||||
|
<el-option key="1" label="省内" value="省内"></el-option>
|
||||||
|
<el-option key="2" label="省外" value="省外"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="标段时间:">
|
||||||
|
<el-select clearable filterable style="width: 100%"
|
||||||
|
v-model="pageForm.lotId"
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="请选择标段时间">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.lotName"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in modifyBdList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt20">
|
||||||
|
<table-tool label="目的地列表">
|
||||||
|
<el-button type="primary" size="small" @click="showImportDialog = true">
|
||||||
|
<i class="el-icon-upload2"></i>
|
||||||
|
导入目的地
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" size="small" @click="onAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
新增目的地
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||||
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{ row }" v-if="column.prop === 'isDisabled'">
|
||||||
|
<el-switch
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
@change="(val)=>{baseStatusChange(row.id)}"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
v-model="row.isDisabled">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }" v-else-if="column.prop === 'lotId'">
|
||||||
|
<div v-for="item in modifyBdList">
|
||||||
|
<span v-if="row.lotId===item.id">{{item.lotName}}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }" v-else-if="column.prop === 'activityTime'">
|
||||||
|
{{ row.activityStartTime + '至' + row.activityEndTime }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="230">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
|
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<basic-form ref="basicFormRef" @refresh="refresh" :travel-list="travelAgencyList" :lot-list="modifyBdList"></basic-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<info ref="infoRef"></info>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<excel-import
|
||||||
|
ref="excelImportRef"
|
||||||
|
url="/platform/recuperation/baseManagement/baseManagementImport"
|
||||||
|
template_url="/platform/recuperation/baseManagement/downloadTemplate"
|
||||||
|
:visible.sync="showImportDialog"
|
||||||
|
title="导入目的地数据"
|
||||||
|
width="700px"
|
||||||
|
@import-success="doSearch"
|
||||||
|
:extra_params="{}"
|
||||||
|
></excel-import>
|
||||||
|
|
||||||
|
</guava>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('basicForm.js'){}#-->
|
||||||
|
<!--#include('info.js'){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"basic-form": basicForm,
|
||||||
|
"info": info,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
travelAgencyList: [],
|
||||||
|
modifyBdList: [],
|
||||||
|
showImportDialog: false,
|
||||||
|
tableColumns: [
|
||||||
|
{label: '年度', prop: 'year', sortable: true},
|
||||||
|
{label: '目的地名称', prop: 'baseName', sortable: true},
|
||||||
|
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||||
|
{label: '标段时间', prop: 'lotId', sortable: true},
|
||||||
|
{label: '活动时间', prop: 'activityTime', sortable: true},
|
||||||
|
{label: '活动范围', prop: 'regionalNature', sortable: true},
|
||||||
|
{label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async selectTravelAgencyList() {
|
||||||
|
const resp = await this.$axios.post('/platform/recuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||||
|
this.travelAgencyList = resp.data
|
||||||
|
},
|
||||||
|
async getModifyBd() {
|
||||||
|
const res = await this.$axios.post('/platform/recuperation/config/fetchOne')
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.modifyBdList = res.data.lots
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async baseStatusChange(id) {
|
||||||
|
const resp = await this.$axios.post(loc() + '/openClosedBase/' + id)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.guava.index()
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onAdd() {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/recuperation/baseManagement/onDelete", { id: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async initData() {
|
||||||
|
await this.getModifyBd()
|
||||||
|
await this.selectTravelAgencyList()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
await this.initData()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
const info = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<div class="process-title">目的地信息</div>
|
||||||
|
<el-descriptions :column="2" border class="table_fixed">
|
||||||
|
<el-descriptions-item label="年度">{{ viewData.year }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="排序编号">{{ viewData.sortNumber }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="酒店名称">{{ viewData.baseName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="区域性质">{{ viewData.regionalNature }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="标段时间">{{ viewData.lotName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="预计费用(元)">{{ viewData.estimatedCost }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="酒店联系人">{{ viewData.baseContactPerson }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系人电话">{{ viewData.baseContactNumber }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="报名开始时间">{{ viewData.signUpStartTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="报名结束时间">{{ viewData.signUpEndTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item :span="2" label="变更截至时间">{{ viewData.changeEndTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="活动开始时间">{{ viewData.activityStartTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="活动结束时间">{{ viewData.activityEndTime }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="详细信息" :span="2">
|
||||||
|
<div v-html="viewData.content"></div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<div class="process-title">旅行社信息</div>
|
||||||
|
<el-descriptions :column="2" border class="table_fixed">
|
||||||
|
<el-descriptions-item :span="2" label="旅行社名称">
|
||||||
|
{{ viewData.travelAgency.travelAgencyName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系人">{{ viewData.travelAgency.contact }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电话">{{ viewData.travelAgency.contactMobileNumber }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="邮箱">{{ viewData.travelAgency.email }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="官网">
|
||||||
|
<a :href="viewData.travelAgency.officialWebsite" class="text-primary" target="_blank">
|
||||||
|
{{ viewData.travelAgency.officialWebsite }}
|
||||||
|
</a>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewData: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
this.$axios.post(loc() + '/selectBaseManageById/' + row.id)
|
||||||
|
.then((resp) => {
|
||||||
|
this.viewData = resp.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
@@ -0,0 +1,400 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.item-button {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-button .el-button {
|
||||||
|
padding: 12px 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__content {
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<h3 style="color: rgb(24, 103, 176); font-family: Microsoft YaHei,serif;">疗休养配置</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form ref="addForm" :model="formData" :rules="formRules" label-width="170px">
|
||||||
|
<div class="process-title">基本配置</div>
|
||||||
|
<el-form-item label="配置名称" prop="configName">
|
||||||
|
<el-input v-model="formData.configName" placeholder="请输入配置名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="activityGroupId" label="参加人员范围">
|
||||||
|
<div style="display: flex; justify-content: space-between">
|
||||||
|
<div style="width: 99%">
|
||||||
|
<el-select v-model="formData.activityGroupId" placeholder="请选择参加人员范围" filterable
|
||||||
|
clearable
|
||||||
|
style="width: 99%">
|
||||||
|
<el-option v-for="item in activityGroupList"
|
||||||
|
:value="item.groupId"
|
||||||
|
:key="item.groupId"
|
||||||
|
:label="item.groupName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button @click="$refs.drawerUserScope.userScopeDialog = true" type="primary">设置
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="省外最多成团人数" prop="outsideQuota">
|
||||||
|
<el-input v-model.number="formData.outsideQuota"
|
||||||
|
placeholder="请输入每条省外线路最多成团人数"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="省外名额分配比例" prop="outsideQuotaProportion">
|
||||||
|
<el-input placeholder="请输入省外名额分配比例" v-model="formData.outsideQuotaProportion">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="省外几年去一次" prop="outsideNumber">
|
||||||
|
<el-input max="100"
|
||||||
|
placeholder="请输入省外几年去一次"
|
||||||
|
v-model.number="formData.outsideNumber"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="每年旅行频率" prop="travelFrequency">
|
||||||
|
<el-input max="100"
|
||||||
|
placeholder="请输入每年旅行频率"
|
||||||
|
v-model.number="formData.travelFrequency"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="最少教工人数" prop="groupNumber">
|
||||||
|
<el-input max="100"
|
||||||
|
placeholder="请输入最少教工人数"
|
||||||
|
v-model.number="formData.groupNumber"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="不可取消修改天数" prop="modifyDays">
|
||||||
|
<el-input max="100"
|
||||||
|
placeholder="请输入不可取消修改天数"
|
||||||
|
v-model.number="formData.modifyDays"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="可以修改几次" prop="modifyNumber">
|
||||||
|
<el-input max="100"
|
||||||
|
placeholder="请输入可以修改几次"
|
||||||
|
v-model.number="formData.modifyNumber"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="省内线路是否需要审核" prop="isSnLine">
|
||||||
|
<el-radio-group v-model="formData.isSnLine">
|
||||||
|
<el-radio-button :label="true">需要</el-radio-button>
|
||||||
|
<el-radio-button :label="false">不需要</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="省外线路是否需要审核" prop="isSwLine">
|
||||||
|
<el-radio-group v-model="formData.isSwLine">
|
||||||
|
<el-radio-button :label="true">需要</el-radio-button>
|
||||||
|
<el-radio-button :label="false">不需要</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="全批次最多报名人数" prop="allLineSignUpNumber">
|
||||||
|
<el-input max="100"
|
||||||
|
placeholder="请输入全批次最多报名人数"
|
||||||
|
v-model.number="formData.allLineSignUpNumber"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="省内起始年份" prop="provinceStartYear">
|
||||||
|
<el-input max="100"
|
||||||
|
placeholder="请输入省内起始年份"
|
||||||
|
v-model.number="formData.provinceStartYear"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="床位信息" prop="bedInfo">
|
||||||
|
<el-radio-group v-model="formData.bedInfo">
|
||||||
|
<el-radio-button :label="true">需要</el-radio-button>
|
||||||
|
<el-radio-button :label="false">不需要</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="家属信息" prop="familyInfo">
|
||||||
|
<el-radio-group v-model="formData.familyInfo">
|
||||||
|
<el-radio-button :label="1">数量</el-radio-button>
|
||||||
|
<el-radio-button :label="2">详细信息</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<div class="process-title">标段管理</div>
|
||||||
|
<el-form-item>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button @click="formData.lots.push({})" size="small" type="primary">
|
||||||
|
<i class="ti-plus"></i>增加一条
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table :data="formData.lots" size="small" class="mt10">
|
||||||
|
<el-table-column prop="index" label="序号" width="180">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{scope.$index+1}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="lotName" label="标段名称">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input v-model="row.lotName" placeholder="请输入标段名称" size="small"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="lotValue" label="标段值">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input v-model="row.lotValue" placeholder="请输入标段值" size="small"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="activityCost" label="标段费用">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input v-model="row.activityCost" placeholder="请输入标段费用" size="small"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="$auth.hasRole('SYSADMIN')" prop="index" label="操作">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button type="danger" size="mini" @click="deleteLotsRow(scope)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<div class="process-title">服务须知</div>
|
||||||
|
<el-form-item label="疗休养服务须知" prop="notice">
|
||||||
|
<text-editor v-model="formData.notice"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item class="item-button">
|
||||||
|
<el-button type="danger" @click="resetForm">重 置</el-button>
|
||||||
|
<el-button type="primary" @click="operation" :loading="subLoading">提 交</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="该标段被以下线路/目的地绑定,是否强制删除"
|
||||||
|
:visible.sync="centerDialogVisible"
|
||||||
|
width="50%"
|
||||||
|
center>
|
||||||
|
<template>
|
||||||
|
<el-card>
|
||||||
|
<div v-if="LineNameList.line!=null">
|
||||||
|
<el-descriptions class="margin-top" title="线路名称" :column="3">
|
||||||
|
<el-descriptions-item v-for="(o,index) in LineNameList.line">
|
||||||
|
<template slot="label">
|
||||||
|
{{o.index}}
|
||||||
|
</template>
|
||||||
|
{{o}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
<div v-if="LineNameList.base!=null">
|
||||||
|
<el-descriptions class="margin-top" title="目的地名称" :column="3">
|
||||||
|
<el-descriptions-item v-for="o in LineNameList.base">
|
||||||
|
<template slot="label">
|
||||||
|
{{o.index}}
|
||||||
|
</template>
|
||||||
|
{{o}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="closeDialog">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="deleteLotById">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</guava>
|
||||||
|
|
||||||
|
<drawer-user-scope
|
||||||
|
@group_change="getActivityGroup"
|
||||||
|
ref="drawerUserScope"
|
||||||
|
:group_id.sync="formData.activityGroupId"
|
||||||
|
></drawer-user-scope>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activityGroupList: [],
|
||||||
|
subLoading: false,
|
||||||
|
formData: {
|
||||||
|
isSnLine: 0,
|
||||||
|
isSwLine: 0,
|
||||||
|
lots: [],
|
||||||
|
configName: '智慧工会疗休养配置',
|
||||||
|
outsideQuota: null,
|
||||||
|
outsideQuotaProportion: 0,
|
||||||
|
outsideNumber: null,
|
||||||
|
travelFrequency: null,
|
||||||
|
groupNumber: null,
|
||||||
|
modifyDays: null,
|
||||||
|
modifyNumber: null,
|
||||||
|
allLineSignUpNumber: null,
|
||||||
|
notice: null,
|
||||||
|
provinceStartYear: null,
|
||||||
|
bedInfo: true,
|
||||||
|
familyInfo: 1,
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
configName: [{required: true, message: '请输入配置名称', trigger: ['blur', 'change']}],
|
||||||
|
isSnLine: [{required: true, message: '请选择省内线路是否需要审核', trigger: ['blur', 'change']}],
|
||||||
|
isSwLine: [{required: true, message: '请选择省外线路是否需要审核', trigger: ['blur', 'change']}],
|
||||||
|
outsideQuota: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入每条省外线路最多成团人数',
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
}],
|
||||||
|
outsideNumber: [{required: true, message: '请输入省外几年去一次', trigger: ['blur', 'change']}],
|
||||||
|
travelFrequency: [{required: true, message: '请输入每年旅行频率', trigger: ['blur', 'change']}],
|
||||||
|
groupNumber: [{required: true, message: '请输入最少教工人数', trigger: ['blur', 'change']}],
|
||||||
|
modifyDays: [{required: true, message: '请输入不可取消修改天数', trigger: ['blur', 'change']}],
|
||||||
|
modifyNumber: [{required: true, message: '请输入可以修改几次', trigger: ['blur', 'change']}],
|
||||||
|
outsideQuotaProportion: [{required: true, message: '请输入比例', trigger: ['blur', 'change']}],
|
||||||
|
allLineSignUpNumber: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入全批次最多报名人数',
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
}],
|
||||||
|
notice: [{required: true, message: '请输入详细内容', trigger: ['change', 'blur']}],
|
||||||
|
provinceStartYear: [{required: true, message: '请输入省内起始年份', trigger: ['change', 'blur']}],
|
||||||
|
bedInfo: [{required: true, message: '请选择床位信息', trigger: ['change', 'blur']}],
|
||||||
|
familyInfo: [{required: true, message: '请选择家属信息', trigger: ['change', 'blur']}],
|
||||||
|
},
|
||||||
|
marks: [],
|
||||||
|
lotDeleteList: [],
|
||||||
|
LineNameList: {},
|
||||||
|
centerDialogVisible: false,
|
||||||
|
tableScopeId: '',
|
||||||
|
tableScopeIndex: '',
|
||||||
|
userScopeDialog: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue"),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async deleteLotsRow(scope) {
|
||||||
|
const res = await this.$axios.get(loc() + '/getLotsById?lotId=' + scope.row.id)
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.LineNameList = res.data
|
||||||
|
}
|
||||||
|
if (!$.isEmptyObject(this.LineNameList)) {
|
||||||
|
this.centerDialogVisible = true;
|
||||||
|
this.tableScopeId = scope.row.id
|
||||||
|
this.tableScopeIndex = scope.$index;
|
||||||
|
} else {
|
||||||
|
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
if (confirm !== 'confirm') return
|
||||||
|
this.tableScopeId = scope.row.id
|
||||||
|
this.tableScopeIndex = scope.$index;
|
||||||
|
await this.deleteLotById();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.formData.lots = []
|
||||||
|
if (this.$refs['addForm']) {
|
||||||
|
this.$refs['addForm'].resetFields()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async operation() {
|
||||||
|
const valid = await this.$refs["addForm"].validate()
|
||||||
|
if (valid) {
|
||||||
|
this.subLoading = true
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在提交...',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
})
|
||||||
|
const cloneData = clone(this.formData)
|
||||||
|
|
||||||
|
if (this.lotDeleteList && this.lotDeleteList.length > 0) {
|
||||||
|
cloneData.lotDeleteList = JSON.stringify(this.lotDeleteList)
|
||||||
|
}
|
||||||
|
if (this.formData.lots && this.formData.lots.length > 0) {
|
||||||
|
cloneData.lots = JSON.stringify(this.formData.lots)
|
||||||
|
}
|
||||||
|
cloneData.outsideQuotaProportion = cloneData.outsideQuotaProportion / 100
|
||||||
|
const resp = await this.$axios.post(loc() + "/onSubmit", cloneData)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
loading.close()
|
||||||
|
this.subLoading = false
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async findOne() {
|
||||||
|
await this.getActivityGroup()
|
||||||
|
const {data} = await this.$axios.get(loc() + "/fetchOne")
|
||||||
|
if (data.outsideQuotaProportion) {
|
||||||
|
data.outsideQuotaProportion = data.outsideQuotaProportion * 1000 / 10
|
||||||
|
}
|
||||||
|
if (!data.lots) {
|
||||||
|
data.lots = []
|
||||||
|
}
|
||||||
|
this.formData = data
|
||||||
|
},
|
||||||
|
async getActivityGroup() {
|
||||||
|
const {data} = await this.$axios.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||||
|
this.activityGroupList = data
|
||||||
|
},
|
||||||
|
async closeDialog() {
|
||||||
|
this.tableScopeIndex = '';
|
||||||
|
this.tableScopeId = '';
|
||||||
|
this.centerDialogVisible = false;
|
||||||
|
this.LineNameList = {};
|
||||||
|
},
|
||||||
|
async deleteLotById() {
|
||||||
|
if (this.tableScopeId == null || this.tableScopeId === '') {
|
||||||
|
this.formData.lots.splice(this.tableScopeIndex, 1);
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const resp = await this.$axios.get(loc() + '/deleteLotById?lotId=' + this.tableScopeId)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.tableScopeId = '';
|
||||||
|
this.centerDialogVisible = false;
|
||||||
|
this.formData.lots.splice(this.tableScopeIndex, 1)
|
||||||
|
await this.findOne();
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.findOne();
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'formData.activityGroupId': {
|
||||||
|
async handler(newVal, oldVal) {
|
||||||
|
this.activityGroupList = await this.getActivityGroup()
|
||||||
|
this.userScopeDialog = false
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,346 @@
|
|||||||
|
const basicForm = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="160px" label-position="left">
|
||||||
|
<el-row :gutter="20" class="">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="线路名称" prop="lineName">
|
||||||
|
<el-input maxlength="50" v-model="formData.lineName" placeholder="请输入线路名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="">
|
||||||
|
<span class="text-primary">
|
||||||
|
<i class="el-icon-warning"></i>
|
||||||
|
温馨提醒:分工会组织的线路,可以自行设置出行时间。
|
||||||
|
</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="年度" prop="year">
|
||||||
|
<el-date-picker style="width: 100%"
|
||||||
|
@change="yearChange"
|
||||||
|
type="year"
|
||||||
|
placeholder="请选择年度"
|
||||||
|
v-model="formData.year"
|
||||||
|
value-format="yyyy"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="排序号" prop="serialNumber">
|
||||||
|
<el-input maxlength="50" v-model="formData.serialNumber" placeholder="请输入排序号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="旅行社名称" prop="travelAgencyId">
|
||||||
|
<el-select clearable filterable style="width: 100%" v-model="formData.travelAgencyId"
|
||||||
|
placeholder="请选择旅行社">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.travelAgencyName+'('+ item.year +'年)'"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in localTravelList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="时间标段" prop="lotId">
|
||||||
|
<el-select clearable filterable style="width: 100%"
|
||||||
|
v-model="formData.lotId" placeholder="请选择时间标段">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.lotName"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in localLotList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="线路类型" prop="regionalNature">
|
||||||
|
<el-radio-group class="mr0-radio" size="small" v-model="formData.regionalNature">
|
||||||
|
<el-radio :label="item.value" :key="item.value"
|
||||||
|
border v-for="item in regionalNatureList">
|
||||||
|
{{item.label}}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item prop="signUpMode">
|
||||||
|
<template #label>
|
||||||
|
组织形式
|
||||||
|
<el-tooltip class="item" effect="dark" content="温馨提醒:校工会可以为基层工会创建线路,分工会自行选择并设置活动相关时间。"
|
||||||
|
placement="top-start">
|
||||||
|
<i class="el-icon-question"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
<el-radio-group class="mr0-radio" size="small" v-model="formData.signUpMode">
|
||||||
|
<el-radio :label="item.value" v-if="isShow(item.roles)"
|
||||||
|
size="small" :key="item.value"
|
||||||
|
border v-for="item in signUpModeList">
|
||||||
|
{{item.label}}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="交通工具" prop="trafficTools">
|
||||||
|
<el-input clearable maxlength="50" v-model="formData.trafficTools" placeholder="请输入交通工具"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="预计费用(元/人次)" prop="estimatedCost">
|
||||||
|
<el-input clearable maxlength="50" v-model="formData.estimatedCost" placeholder="请输入预计费用"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="最少参与教工" prop="minimumGroupSize">
|
||||||
|
<el-input-number :max="1000"
|
||||||
|
:min="config.groupNumber"
|
||||||
|
:precision="0"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请输入最少参与教工"
|
||||||
|
v-model="formData.minimumGroupSize"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="成团人数包括家属" prop="estimatedFamilyNumbers">
|
||||||
|
<el-input-number :max="1000"
|
||||||
|
:min="1"
|
||||||
|
:precision="0"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请输入成团人数包括家属"
|
||||||
|
v-model="formData.estimatedFamilyNumbers"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系人" prop="lineContact">
|
||||||
|
<el-input clearable max="50" v-model="formData.lineContact"
|
||||||
|
placeholder="请输入联系人"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :rules="[
|
||||||
|
{ required: false, message: '手机号码不能为空', trigger: 'blur' },
|
||||||
|
{ pattern: /^1[34578]\\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' }
|
||||||
|
]" label="联系方式" prop="lineContactPhone">
|
||||||
|
<el-input clearable v-model="formData.lineContactPhone"
|
||||||
|
placeholder="请输入联系方式"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="24" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="线路内容" prop="content">
|
||||||
|
<text-editor v-model="formData.content"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="12" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="是否启用" prop="isDisabled">
|
||||||
|
<el-switch
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
v-model="formData.isDisabled">
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :md="24" :sm="24" :xs="24">
|
||||||
|
<el-form-item label="移动端缩略图" prop="file">
|
||||||
|
<file-upload :value.sync="formData.file" accept=".jpg,.jpeg,.png"
|
||||||
|
:upload_number="1" upload_result_category="interval"
|
||||||
|
complete_result upload_mode="drag"></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-row class="mt10" justify="end" type="flex">
|
||||||
|
<el-button @click="$emit('refresh')">取消</el-button>
|
||||||
|
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
props: {
|
||||||
|
travelList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
lotList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
signList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
const validateSignUpEndTime = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('请选择报名截至时间'))
|
||||||
|
}
|
||||||
|
if (this.formData.signUpStartTime) {
|
||||||
|
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||||
|
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
const validateChangeEndTime = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('请选择变更截至时间'))
|
||||||
|
}
|
||||||
|
if (this.formData.playStartTime) {
|
||||||
|
if (Date.parse(value) >= Date.parse(this.formData.playStartTime)) {
|
||||||
|
callback(new Error('变更截至时间必须小于出行开始时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.formData.signUpEndTime) {
|
||||||
|
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||||
|
callback(new Error('变更截至时间必须大于报名截至时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
const validatePlayEndTime = (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('请选择出行结束时间'))
|
||||||
|
}
|
||||||
|
if (this.formData.playStartTime) {
|
||||||
|
if (Date.parse(value) <= Date.parse(this.formData.playStartTime)) {
|
||||||
|
callback(new Error('出行结束时间必须大于出行开始时间'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
config: {},
|
||||||
|
regionalNatureList: [],
|
||||||
|
localTravelList: [...this.travelList],
|
||||||
|
localLotList: [...this.lotList],
|
||||||
|
signUpModeList: [...this.signList],
|
||||||
|
formData: {
|
||||||
|
isDisabled: true
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
serialNumber: [{required: true, message: '请输入排序号', trigger: ['change', 'blur']}],
|
||||||
|
lineName: [{required: true, message: '请输入线路名称', trigger: ['change', 'blur']}],
|
||||||
|
travelAgencyId: [{required: true, message: '请选择旅行社', trigger: ['change', 'blur']}],
|
||||||
|
regionalNature: [{required: true, message: '请选择区域性质', trigger: ['change', 'blur']}],
|
||||||
|
minimumGroupSize: [{required: true, message: '请输入最少参与教工', trigger: ['change', 'blur']}],
|
||||||
|
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||||
|
signUpStartTime: [{required: true, message: '请选择报名开始时间', trigger: ['change', 'blur']}],
|
||||||
|
signUpEndTime: [{required: true, validator: validateSignUpEndTime, trigger: ['change', 'blur']}],
|
||||||
|
changeEndTime: [{required: true, validator: validateChangeEndTime, trigger: ['change', 'blur']}],
|
||||||
|
signUpMode: [{required: true, message: '请选择报名模式', trigger: ['change', 'blur']}],
|
||||||
|
playStartTime: [{required: true, message: '请选择出行开始时间', trigger: ['change', 'blur']}],
|
||||||
|
playEndTime: [{required: true, validator: validatePlayEndTime, trigger: ['change', 'blur']}],
|
||||||
|
trafficTools: [{required: false, message: '请输入交通工具', trigger: ['change', 'blur']}],
|
||||||
|
estimatedCost: [{required: false, message: '请输入预计费用', trigger: ['change', 'blur']}],
|
||||||
|
estimatedFamilyNumbers: [{required: false, message: '请输入成团人数包括家属', trigger: ['change', 'blur']}],
|
||||||
|
lotId: [{required: true, message: '请选择标段时间', trigger: ['change', 'blur']}]
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
isShow(roles) {
|
||||||
|
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (this.$auth.hasRoleOr(["BRANCH_UNION_ADMIN", "BRANCH_UNION_CHAIRMAN"])) {
|
||||||
|
return roles.some(r => r === 'H04')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getConfig() {
|
||||||
|
const resp = await $.get('/platform/recuperation/config/fetchOne')
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.config = resp.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async yearChange() {
|
||||||
|
this.$set(this.formData, 'travelAgencyId', null)
|
||||||
|
await this.selectTravelAgencyList()
|
||||||
|
},
|
||||||
|
async selectTravelAgencyList() {
|
||||||
|
const resp = await this.$axios.post('/platform/recuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||||
|
this.localTravelList = resp.data
|
||||||
|
},
|
||||||
|
async getCreateMode() {
|
||||||
|
const resp = await this.$axios.get(loc() + '/getCreateMode')
|
||||||
|
if (resp.code === 0) {
|
||||||
|
return resp.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onOpen(row) {
|
||||||
|
if (row && row.id) {
|
||||||
|
this.$axios.post(loc() + '/selectLineInfoById/' + row.id)
|
||||||
|
.then((resp) => {
|
||||||
|
const data = resp.data
|
||||||
|
data.year = data.year.toString()
|
||||||
|
this.formData = {...data}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
await this.getNumber()
|
||||||
|
const createMode = await this.getCreateMode()
|
||||||
|
this.$set(this.formData, 'createMode', createMode)
|
||||||
|
if (createMode === 1) {
|
||||||
|
this.$set(this.formData, 'signUpMode', 1)
|
||||||
|
}
|
||||||
|
await this.getConfig()
|
||||||
|
if (this.config) {
|
||||||
|
this.$set(this.formData, 'minimumGroupSize', this.config.groupNumber)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post("/platform/recuperation/line/onSubmit", this.formData)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getEnumOptions(enumName) {
|
||||||
|
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: enumName })
|
||||||
|
return resp.data
|
||||||
|
},
|
||||||
|
async getNumber() {
|
||||||
|
const resp = await this.$axios.post(loc() + '/getNo')
|
||||||
|
this.$set(this.formData, 'serialNumber', resp.data)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.regionalNatureList = await this.getEnumOptions('RecuperationProvinceType')
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
@@ -0,0 +1,284 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="开始年度:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="pageForm.startYear"
|
||||||
|
type="year"
|
||||||
|
class="picker-year"
|
||||||
|
format="yyyy"
|
||||||
|
style="width: 100%"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="请选择开始年度"
|
||||||
|
@change="handleChangeYear"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="结束年度:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="pageForm.endYear"
|
||||||
|
type="year"
|
||||||
|
class="picker-year"
|
||||||
|
format="yyyy"
|
||||||
|
style="width: 100%"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="请选择结束年度"
|
||||||
|
@change="handleChangeYear"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="旅行社:">
|
||||||
|
<el-select clearable filterable style="width: 100%"
|
||||||
|
v-model="pageForm.travelAgencyId"
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="请选择旅行社">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.travelAgencyName"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in travelAgencyList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="线路名称:">
|
||||||
|
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||||
|
placeholder="请输入内容"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.lineName">
|
||||||
|
</el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="标段时间:">
|
||||||
|
<el-select clearable filterable style="width: 100%"
|
||||||
|
v-model="pageForm.lotId"
|
||||||
|
@change="doSearch"
|
||||||
|
placeholder="请选择标段时间">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.lotName"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in lotList"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
<search-item v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('SCHOOL_UNION_ADMIN')" label="分工会:">
|
||||||
|
<el-select @change="doSearch"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.unionId">
|
||||||
|
<el-option :key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
v-for="item in unionOptions"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt20">
|
||||||
|
<table-tool label="线路列表">
|
||||||
|
<el-button type="primary" size="small" @click="showImportDialog = true">
|
||||||
|
<i class="el-icon-upload2"></i>
|
||||||
|
导入线路
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" size="small" @click="onAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
新增线路
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||||
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{ row }" v-if="column.prop === 'isDisabled'">
|
||||||
|
<el-switch
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
@change="(val)=>{lineStatusChange(row.id)}"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
v-model="row.isDisabled">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }" v-else-if="column.prop === 'signUpMode'">
|
||||||
|
{{signUpModeName(row.signUpMode)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="230">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
|
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<basic-form ref="basicFormRef" @refresh="refresh"
|
||||||
|
:travel-list="travelAgencyList"
|
||||||
|
:lot-list="lotList"
|
||||||
|
:sign-list="signUpModeList"
|
||||||
|
></basic-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<info ref="infoRef"></info>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<excel-import
|
||||||
|
ref="excelImportRef"
|
||||||
|
url="/platform/recuperation/line/lineImport"
|
||||||
|
template_url="/platform/recuperation/line/downloadTemplate"
|
||||||
|
:visible.sync="showImportDialog"
|
||||||
|
title="导入旅行社数据"
|
||||||
|
width="700px"
|
||||||
|
@import-success="doSearch"
|
||||||
|
:extra_params="{}"
|
||||||
|
></excel-import>
|
||||||
|
|
||||||
|
</guava>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('basicForm.js'){}#-->
|
||||||
|
<!--#include('info.js'){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"basic-form": basicForm,
|
||||||
|
"info": info,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
signUpModeList: [],
|
||||||
|
travelAgencyList: [],
|
||||||
|
lotList: [],
|
||||||
|
unionOptions: [],
|
||||||
|
showImportDialog: false,
|
||||||
|
tableColumns: [
|
||||||
|
{label: '年度', prop: 'year', sortable: true},
|
||||||
|
{label: '线路名称', prop: 'lineName', sortable: true, width: '200'},
|
||||||
|
{label: '时间标段', prop: 'lotName', sortable: true, sortProp: 'lotValue'},
|
||||||
|
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||||
|
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||||
|
{label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||||
|
{label: '创建人', prop: 'createUserName', sortable: true},
|
||||||
|
{label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getEnumOptions(enumName) {
|
||||||
|
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: enumName })
|
||||||
|
return resp.data
|
||||||
|
},
|
||||||
|
signUpModeName(val) {
|
||||||
|
const d = this.signUpModeList.find(v => v.value === val)
|
||||||
|
return d ? d.label : null
|
||||||
|
},
|
||||||
|
async selectTravelAgencyList() {
|
||||||
|
const resp = await this.$axios.post('/platform/recuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||||
|
this.travelAgencyList = resp.data
|
||||||
|
},
|
||||||
|
async getModifyBd() {
|
||||||
|
const res = await this.$axios.post('/platform/recuperation/config/fetchOne')
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.lotList = res.data?.lots
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChangeYear(){
|
||||||
|
if (this.pageForm.startYear && this.pageForm.endYear){
|
||||||
|
if (this.pageForm.startYear > this.pageForm.endYear){
|
||||||
|
this.pageForm.endYear = '';
|
||||||
|
this.$message.error('起始年份需小于结束年份!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async travelAgencyStatusChange(id) {
|
||||||
|
const resp = await $.post(loc() + '/openClosedLine/' + id)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.guava.index()
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.$refs.infoRef.onOpen(row.id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onAdd() {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/recuperation/line/onDelete", { id: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async initData() {
|
||||||
|
await this.getModifyBd()
|
||||||
|
await this.selectTravelAgencyList()
|
||||||
|
this.signUpModeList = await this.getEnumOptions('RecuperationSignUpMode')
|
||||||
|
this.unionOptions = await this.$businessTool.listUnion()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
await this.initData()
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
const info = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<div class="process-title">线路信息</div>
|
||||||
|
<el-descriptions :column="2" border class="table_fixed">
|
||||||
|
<el-descriptions-item label="年度">{{ viewData.year }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="编号">{{ viewData.serialNumber }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="区域性质">{{ viewData.regionalNature }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="线路内容" :span="2">
|
||||||
|
<div v-html="viewData.content"></div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<template v-if="showTravelTimePeriod">
|
||||||
|
<div class="process-title">出行时间段</div>
|
||||||
|
<el-table :data="times" border>
|
||||||
|
<el-table-column label="报名开始时间" prop="signUpStartTime"></el-table-column>
|
||||||
|
<el-table-column label="报名结束时间" prop="signUpEndTime"></el-table-column>
|
||||||
|
<el-table-column label="变更截至时间" prop="changeEndTime"></el-table-column>
|
||||||
|
<el-table-column label="出行开始时间" prop="playStartTime"></el-table-column>
|
||||||
|
<el-table-column label="出行结束时间" prop="playEndTime"></el-table-column>
|
||||||
|
<el-table-column label="联系人" prop="contact"></el-table-column>
|
||||||
|
<el-table-column label="联系方式" prop="contactPhone"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
<div class="process-title">旅行社信息</div>
|
||||||
|
<el-descriptions :column="2" border class="viewTable">
|
||||||
|
<el-descriptions-item :span="2" label="旅行社名称">
|
||||||
|
{{ viewData.travelAgency.travelAgencyName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系人">{{ viewData.travelAgency.contact }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电话">{{ viewData.travelAgency.contactMobileNumber }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="邮箱">{{ viewData.travelAgency.email }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="官网">
|
||||||
|
<a :href="viewData.travelAgency.officialWebsite" class="text-primary" target="_blank">
|
||||||
|
{{ viewData.travelAgency.officialWebsite }}
|
||||||
|
</a>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewData: {
|
||||||
|
travelAgency:{}
|
||||||
|
},
|
||||||
|
//多个出行的时间段
|
||||||
|
times: [],
|
||||||
|
//分工会选择校工会的线路自己设置的时间信息等等。。。
|
||||||
|
unionSelectLineData: {},
|
||||||
|
//是否只看基本信息 因为出行时间针对每个分工会都不一样
|
||||||
|
showTravelTimePeriod: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async onOpen(lineId, usUnionId) {
|
||||||
|
await this.findOne(lineId, usUnionId)
|
||||||
|
},
|
||||||
|
async findOne(id, unionId) {
|
||||||
|
const resp = await this.$axios.get('/platform/recuperation/line/selectLineInfoById/' + id)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.viewData = resp.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async findUnionSelectLineData(lineId, unionId) {
|
||||||
|
const resp = await this.$axios.post('/platform/recuperation/lineFghSelect/selectLineInfo', {
|
||||||
|
lineId: lineId,
|
||||||
|
unionId: unionId
|
||||||
|
})
|
||||||
|
if (resp.code === 0 && resp.data) {
|
||||||
|
this.times = resp.data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
+117
@@ -0,0 +1,117 @@
|
|||||||
|
const basicForm = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||||
|
<el-form-item label="年度" prop="year">
|
||||||
|
<el-date-picker style="width: 100%"
|
||||||
|
type="year"
|
||||||
|
placeholder="请选择年度"
|
||||||
|
v-model="formData.year"
|
||||||
|
value-format="yyyy"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="编号" prop="serialNumber">
|
||||||
|
<el-input maxlength="50" v-model="formData.serialNumber" placeholder="请输入编号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="旅行社名称" prop="travelAgencyName">
|
||||||
|
<el-input maxlength="50" v-model="formData.travelAgencyName" placeholder="请输入旅行社名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="旅行社联系人" prop="contact">
|
||||||
|
<el-input maxlength="10" v-model="formData.contact" placeholder="请输入旅行社联系人"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系电话" prop="contactMobileNumber">
|
||||||
|
<el-input v-model="formData.contactMobileNumber" placeholder="请输入联系电话"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="邮箱" prop="email">
|
||||||
|
<el-input maxlength="50" v-model="formData.email" placeholder="请输入邮箱"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="官网" prop="officialWebsite">
|
||||||
|
<el-input maxlength="100" v-model="formData.officialWebsite" placeholder="请输入官网"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="note">
|
||||||
|
<el-input maxlength="100"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
v-model="formData.note"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用" prop="isDisabled">
|
||||||
|
<el-switch
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
v-model="formData.isDisabled">
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="移动端缩略图" prop="file">
|
||||||
|
<file-upload :value.sync="formData.file" accept=".jpg,.jpeg,.png"
|
||||||
|
:upload_number="1" upload_result_category="interval"
|
||||||
|
complete_result upload_mode="drag"></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row class="mt10" justify="end" type="flex">
|
||||||
|
<el-button @click="$emit('refresh')">取消</el-button>
|
||||||
|
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {
|
||||||
|
isDisabled: true
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
serialNumber: [{required: true, message: '请输入编号', trigger: ['change', 'blur']}],
|
||||||
|
travelAgencyName: [{required: true, message: '请输入旅行社名称', trigger: ['change', 'blur']}],
|
||||||
|
contact: [{required: true, message: '请输入联系人姓名', trigger: ['change', 'blur']}],
|
||||||
|
contactMobileNumber: [
|
||||||
|
{required: true, message: '请输入联系人电话', trigger: 'blur',},
|
||||||
|
{
|
||||||
|
pattern: /^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/,
|
||||||
|
message: '请输入正确的联系人电话',
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
email: [
|
||||||
|
{required: false, message: '请输入邮箱地址', trigger: 'blur'},
|
||||||
|
{type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change']}
|
||||||
|
],
|
||||||
|
officialWebsite: [
|
||||||
|
{required: false, message: '请输入官网地址', trigger: ['change', 'blur']},
|
||||||
|
{type: 'url', message: '请输入正确的官网地址', trigger: ['blur', 'change']}],
|
||||||
|
note: [{required: false, message: '请输入备注', trigger: ['change', 'blur']}],
|
||||||
|
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
if(row && row.id) {
|
||||||
|
const cloneData = clone(row)
|
||||||
|
cloneData.year = cloneData.year.toString()
|
||||||
|
this.formData = {...cloneData}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(async () => {
|
||||||
|
const resp = await this.$axios.post("/platform/recuperation/travelAgency/onSubmit", this.formData)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.$emit('refresh')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
+189
@@ -0,0 +1,189 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<guava ref="guava">
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="年度:">
|
||||||
|
<el-date-picker
|
||||||
|
placeholder="请选择年度"
|
||||||
|
type="year"
|
||||||
|
@change="doSearch"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.year"
|
||||||
|
value-format="yyyy"
|
||||||
|
></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="关键字:">
|
||||||
|
<el-input placeholder="请输入旅行社名称或联系人查询" clearable v-model="pageForm.searchKeyword"
|
||||||
|
@keyup.enter.native="doSearch"></el-input>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt20">
|
||||||
|
<table-tool label="旅行社列表">
|
||||||
|
<el-button type="primary" size="small" @click="showImportDialog = true">
|
||||||
|
<i class="el-icon-upload2"></i>
|
||||||
|
导入旅行社
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" size="small" @click="onAdd">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
新增旅行社
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||||
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
>
|
||||||
|
<template v-slot="{ row }" v-if="column.prop === 'isDisabled'">
|
||||||
|
<el-switch
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
@change="(val)=>{travelAgencyStatusChange(row.id)}"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
v-model="row.isDisabled">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }" v-else-if="column.prop === 'officialWebsite'">
|
||||||
|
<a :href="row.officialWebsite" class="text-primary" target="_blank">
|
||||||
|
{{ row.officialWebsite }}
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="230">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||||
|
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
|
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #edit>
|
||||||
|
<basic-form ref="basicFormRef" @refresh="refresh"></basic-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #view>
|
||||||
|
<info ref="infoRef"></info>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<excel-import
|
||||||
|
ref="excelImportRef"
|
||||||
|
url="/platform/recuperation/travelAgency/travelAgencyImport"
|
||||||
|
template_url="/platform/recuperation/travelAgency/downloadTemplate"
|
||||||
|
:visible.sync="showImportDialog"
|
||||||
|
title="导入旅行社数据"
|
||||||
|
width="700px"
|
||||||
|
@import-success="doSearch"
|
||||||
|
:extra_params="{}"
|
||||||
|
></excel-import>
|
||||||
|
|
||||||
|
</guava>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<!--#include('basicForm.js'){}#-->
|
||||||
|
<!--#include('info.js'){}#-->
|
||||||
|
const vue = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
"basic-form": basicForm,
|
||||||
|
"info": info,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showImportDialog: false,
|
||||||
|
tableColumns: [
|
||||||
|
{label: '年度', prop: 'year', sortable: true},
|
||||||
|
{label: '旅行社名称', prop: 'travelAgencyName', width: '200'},
|
||||||
|
{label: '旅行社编号', prop: 'serialNumber', sortable: true},
|
||||||
|
{label: '联系人', prop: 'contact'},
|
||||||
|
{label: '联系人手机', prop: 'contactMobileNumber'},
|
||||||
|
{label: '邮箱', prop: 'email'},
|
||||||
|
{label: '是否启用', prop: 'isDisabled'}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async travelAgencyStatusChange(id) {
|
||||||
|
const resp = await $.post(loc() + '/openClosedTravelAgency/' + id)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.doSearch()
|
||||||
|
this.$refs.guava.index()
|
||||||
|
},
|
||||||
|
onView(row) {
|
||||||
|
this.$refs.guava.view(() => {
|
||||||
|
this.$refs.infoRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onAdd() {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.$refs.guava.edit(() => {
|
||||||
|
this.$refs.basicFormRef.onOpen(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$axios.post("/platform/recuperation/travelAgency/onDelete", { id: row.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
pageData() {
|
||||||
|
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.list
|
||||||
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
const info = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<el-descriptions :column="2" border class="table_fixed">
|
||||||
|
<el-descriptions-item label="旅行社编号">{{viewData.serialNumber}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="旅行社名称">{{viewData.travelAgencyName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系人">{{viewData.contact}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注">{{viewData.contactMobileNumber}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="邮箱">{{viewData.email}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="官网">
|
||||||
|
<a :href="viewData.officialWebsite" target="_blank">
|
||||||
|
{{viewData.officialWebsite}}
|
||||||
|
<span class="text-primary">立即访问</span>
|
||||||
|
</a>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item :span="2" label="备注">{{viewData.note}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewData: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
this.viewData = clone(row)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
|
||||||
|
`
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user