diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/process/TheRapyRecuperationUserQueryController.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/process/TheRapyRecuperationUserQueryController.java index 743314f..11aa402 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/process/TheRapyRecuperationUserQueryController.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/process/TheRapyRecuperationUserQueryController.java @@ -474,16 +474,16 @@ public class TheRapyRecuperationUserQueryController { exportEntities.add(new ExcelExportEntity("工会", "unionName", 20)); exportEntities.add(new ExcelExportEntity("身份证号", "idCard", 30)); exportEntities.add(new ExcelExportEntity("手机号", "mobile", 15)); - if (config.getFamilyInfo() == 2) { - exportEntities.add(new ExcelExportEntity("与本人关系", "relation", 10)); - exportEntities.add(new ExcelExportEntity("床型", "bedType", 20)); - exportEntities.add(new ExcelExportEntity("床位数", "bedNum", 20)); - exportEntities.add(new ExcelExportEntity("意向拼房人", "otherSleepUser", 20)); - } else { - exportEntities.add(new ExcelExportEntity("携带家属数", "familyNumber", 20)); - } +// if (config.getFamilyInfo() == 2) { +// exportEntities.add(new ExcelExportEntity("与本人关系", "relation", 10)); +// exportEntities.add(new ExcelExportEntity("床型", "bedType", 20)); +// exportEntities.add(new ExcelExportEntity("床位数", "bedNum", 20)); +// exportEntities.add(new ExcelExportEntity("意向拼房人", "otherSleepUser", 20)); +// } else { +// exportEntities.add(new ExcelExportEntity("携带家属数", "familyNumber", 20)); +// } exportEntities.add(new ExcelExportEntity("疗休养时长", "lotName", 20)); - exportEntities.add(new ExcelExportEntity("集中/目的地", "baseName", 20)); + exportEntities.add(new ExcelExportEntity("线路名称", "baseName", 20)); exportEntities.add(new ExcelExportEntity("旅行社", "agencyName", 20)); exportEntities.add(new ExcelExportEntity("报名时间", "signingUptime", 20)); exportEntities.add(new ExcelExportEntity("备注", "bz", 20)); diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/statistics/TheRapyRecuperationLineFragmentController.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/statistics/TheRapyRecuperationLineFragmentController.java new file mode 100644 index 0000000..d778416 --- /dev/null +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/statistics/TheRapyRecuperationLineFragmentController.java @@ -0,0 +1,315 @@ +package io.v.nutz.zhgh.therapyRecuperation.controller.statistics; + +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; +import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; +import cn.wizzer.framework.base.Result; +import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.base.utils.MsgApi; +import io.v.nutz.zhgh.therapyRecuperation.constant.TheRapyRecuperationState; +import io.v.nutz.zhgh.therapyRecuperation.model.*; +import io.v.nutz.zhgh.therapyRecuperation.service.TheRapyRecuperationEnrollService; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.shiro.authz.annotation.RequiresAuthentication; +import org.apache.shiro.authz.annotation.RequiresPermissions; +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.At; +import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; + +import javax.servlet.http.HttpServletResponse; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @ClassName TheRapyRecuperationLineFragmentController + * @Author JyuHsin + * @Date 2025/5/30 16:28 + * @Version 1.0 + * @Description 分段式疗休养成团确认 + */ +@IocBean +@At("/platform/theRapyRecuperation/fragment") +@Ok("json:full") +@Slf4j +public class TheRapyRecuperationLineFragmentController { + + @Inject + private TheRapyRecuperationEnrollService enrollService; + @Inject + private MsgApi msgApi; + @Inject + private Dao dao; + + @At("") + @Ok("beetl:/platform/theRapyRecuperation/statistics/fragment.html") + @RequiresPermissions("theRapyRecuperation.fragment") + public void index() { + } + + @At + @ViReturn + @RequiresPermissions("theRapyRecuperation.fragment") + public Object pageData(PageForm pageForm, + @Param(value = "startYear", required = false) Integer startYear, + @Param(value = "endYear", required = false) Integer endYear, + @Param(value = "baseManagementId") String baseManagementId, + @Param(value = "travelAgencyId") String travelAgencyId, + @Param(value = "regionalNature", required = false) String regionalNature) { + Sql sql = Sqls.create(""" + SELECT + bm.*, + ta.travelAgencyName, + (select COUNT(DISTINCT specificTime) from the_rapy_recuperation_enroll where isNormal = true and takePartInBaseManagementId = bm.id) as groupCount, + (select COUNT(*) from the_rapy_recuperation_enroll where isNormal = true and takePartInBaseManagementId = bm.id) as signCount, + u.username + FROM + `the_rapy_recuperation_base_management` bm + left join the_rapy_recuperation_travel_agency ta on ta.id = bm.travelAgencyId + left join user u on u.id = bm.opBy + $condition + """); + Cnd cnd = Cnd.NEW(); + cnd.andEX("bm.year", ">=", startYear); + cnd.andEX("bm.year", "<=", endYear); + cnd.andEX("bm.id", "=", baseManagementId); + cnd.andEX("bm.regionalNature", "=", regionalNature); + cnd.andEX("bm.travelAgencyId", "=", travelAgencyId); + cnd.desc("groupCount").asc("bm.sortNumber"); + sql.setCondition(cnd); + return enrollService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + } + + @At + @ViReturn + @RequiresPermissions("theRapyRecuperation.fragment") + public Object getTravelAgency(@Param(value = "startYear", required = false) Integer startYear, + @Param(value = "endYear", required = false) Integer endYear) { + return dao.query(TheRapyRecuperationTravelAgency.class, Cnd.where("year", ">=", startYear).and("year", "<=", endYear).and("isDisabled", "=", false)); + } + + @At + @ViReturn + @RequiresPermissions("theRapyRecuperation.fragment") + public Object getBaseManagement(@Param(value = "startYear", required = false) Integer startYear, + @Param(value = "endYear", required = false) Integer endYear) { + return dao.query(TheRapyRecuperationBaseManagement.class, Cnd.where("year", ">=", startYear).and("year", "<=", endYear).and("isDisabled", "=", false).asc("sortNumber")); + } + + @At + @ViReturn + @RequiresPermissions("theRapyRecuperation.fragment") + public Object getSignUser(PageForm pageForm, + @Param(value = "takePartInBaseManagementId", required = false) String takePartInBaseManagementId, + @Param(value = "specificTime", required = false) String specificTime) { + Sql sql = Sqls.create(""" + SELECT + en.id, + en.takePartInBaseManagementId, + en.specificTime, + u.loginname, + u.username, + u.sex, + u.mobile, + u.unionname, + u.unitname + FROM + the_rapy_recuperation_enroll en + LEFT JOIN USER u ON en.loginName = u.loginname + $condition + """); + Cnd cnd = Cnd.NEW(); + cnd.and("en.takePartInBaseManagementId", "is not", null); + cnd.andEX("en.specificTime", "=", specificTime); + cnd.andEX("en.takePartInBaseManagementId", "=", takePartInBaseManagementId); + cnd.desc("en.specificTime"); + sql.setCondition(cnd); + return enrollService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + } + + @At + @ViReturn + @RequiresPermissions("theRapyRecuperation.fragment") + public Object getGroupInfo(PageForm pageForm, + @Param(value = "baseId", required = false) String baseId) { + + Sql sql = Sqls.create(""" + SELECT + en.takePartInBaseManagementId as id, + specificTime, + count( specificTime ) as userCount, + en.hasLocked + FROM + the_rapy_recuperation_enroll en + $condition + """); + Cnd cnd = Cnd.NEW(); + cnd.and("en.takePartInBaseManagementId", "=", baseId); + cnd.and("en.takePartInBaseManagementId", "is not", null); + cnd.groupBy("en.specificTime"); + cnd.desc("en.specificTime"); + sql.setCondition(cnd); + return enrollService.listMap(sql); + } + + @At + @ViReturn + @Aop(TransAop.READ_COMMITTED) + @RequiresPermissions("theRapyRecuperation.fragment") + public Object sendSuccess(String baseId, Boolean type) { + TheRapyRecuperationConfig config = dao.fetch(TheRapyRecuperationConfig.class, Cnd.NEW()); + + if (DateUtil.compare(new Date(), config.getFragmentEndTime()) < 0) { + return Result.error("报名还未结束"); + } + + TheRapyRecuperationBaseManagement management = dao.fetch(TheRapyRecuperationBaseManagement.class, baseId); + + //找出报名人员 + List enrolls = dao.query( + TheRapyRecuperationEnroll.class, + Cnd.where("takePartInBaseManagementId", "=", baseId) + .and("isNormal", "=", true).and("year(signingUptime)", "=", DateUtil.thisYear()) + .and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))); + + if(enrolls.size() < config.getFragmentCount()) { + return Result.error("报名人数为%s人,未达到%s人的成团条件".formatted(enrolls.size(), config.getFragmentCount())); + } + + enrolls.forEach(item -> { + item.setHasLocked(true); + }); + dao.update(enrolls); + //发短信 + if(type) { + enrolls.forEach(item -> { + String content = "%s老师,您好!您报名的%s酒店,出行时间为%s,达到成团条件,请准时参加疗休养活动。".formatted( + item.getUserName(), + management.getBaseName(), + item.getSpecificTime() + ); + //msgApi.sendTextMsg(content, item.getLoginName()); + }); + } + return null; + } + + @At + @ViReturn + @Aop(TransAop.READ_COMMITTED) + @RequiresPermissions("theRapyRecuperation.fragment") + public Object sendFail(String baseId, Boolean type) { + + TheRapyRecuperationConfig config = dao.fetch(TheRapyRecuperationConfig.class, Cnd.NEW()); + + if (DateUtil.compare(new Date(), config.getFragmentEndTime()) < 0) { + return Result.error("报名还未结束"); + } + + TheRapyRecuperationBaseManagement management = dao.fetch(TheRapyRecuperationBaseManagement.class, baseId); + + //找出报名人员 + List enrolls = dao.query( + TheRapyRecuperationEnroll.class, + Cnd.where("takePartInBaseManagementId", "=", baseId) + .and("isNormal", "=", true).and("year(signingUptime)", "=", DateUtil.thisYear()) + .and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))); + + //发短信 + enrolls.forEach(item -> { + String content = "%s老师,您好!您报名的%s酒店,出行时间为%s,因报名人数不足未达到成团条件,请尽快进入疗休养管理系统重新选择线路。".formatted( + item.getUserName(), + management.getBaseName(), + item.getSpecificTime() + ); + //msgApi.sendTextMsg(content, item.getLoginName()); + }); + + if(!type) { + List enrollIds = enrolls.stream().map(TheRapyRecuperationEnroll::getId).collect(Collectors.toList()); + List bedIds = enrolls.stream().map(TheRapyRecuperationEnroll::getBedInfoId).collect(Collectors.toList()); + dao.clear(TheRapyRecuperationEnroll.class, Cnd.where("takePartInBaseManagementId", "=", baseId)); + dao.clear(TheRapyRecuperationEnrollCompanion.class, Cnd.where("trreId", "in", enrollIds)); + dao.clear(TheRapyRecuperationEnrollBed.class, Cnd.where("id", "in", bedIds)); + } else { + List idList = enrolls.stream().map(TheRapyRecuperationEnroll::getId).collect(Collectors.toList()); + dao.update(TheRapyRecuperationEnroll.class, Chain.make("isNormal", false), Cnd.where("id", "in", idList)); + } + return null; + } + + @At + @Ok("void") + @RequiresPermissions("theRapyRecuperation.fragment") + public void doExport(@Param(value = "startYear", required = false) Integer startYear, + @Param(value = "endYear", required = false) Integer endYear, + @Param(value = "baseManagementId") String baseManagementId, + @Param(value = "travelAgencyId") String travelAgencyId, + @Param(value = "regionalNature", required = false) String regionalNature, + HttpServletResponse response) { + Sql sql = Sqls.create(""" + SELECT + en.*, + bm.baseName, + ta.travelAgencyName, + u.remark + FROM + the_rapy_recuperation_enroll en + LEFT JOIN the_rapy_recuperation_base_management bm ON bm.id = en.takePartInBaseManagementId + LEFT JOIN the_rapy_recuperation_travel_agency ta ON ta.id = bm.travelAgencyId + LEFT JOIN sys_user u ON u.loginName = en.loginName + """); + Cnd cnd = Cnd.NEW(); + cnd.andEX("bm.year", ">=", startYear); + cnd.andEX("bm.year", "<=", endYear); + cnd.andEX("bm.id", "=", baseManagementId); + cnd.andEX("bm.regionalNature", "=", regionalNature); + cnd.andEX("bm.travelAgencyId", "=", travelAgencyId); + cnd.and("en.isNormal", "=", true); + cnd.and("en.stateId", "=", TheRapyRecuperationState.PASS); + cnd.and("en.takePartInBaseManagementId", "is not", null); + sql.setCondition(cnd); + List list = enrollService.listMap(sql); + + ArrayList exportEntities = new ArrayList<>(); + exportEntities.add(new ExcelExportEntity("姓名", "userName", 20)); + exportEntities.add(new ExcelExportEntity("工号", "loginName", 20)); + exportEntities.add(new ExcelExportEntity("性别", "sex", 10)); + exportEntities.add(new ExcelExportEntity("单位", "unitName", 20)); + exportEntities.add(new ExcelExportEntity("工会", "unionName", 20)); + exportEntities.add(new ExcelExportEntity("身份证号", "idCard", 30)); + exportEntities.add(new ExcelExportEntity("手机号", "mobile", 15)); + exportEntities.add(new ExcelExportEntity("酒店名称", "baseName", 20)); + exportEntities.add(new ExcelExportEntity("旅行社", "agencyName", 20)); + exportEntities.add(new ExcelExportEntity("报名时间", "signingUptime", 20)); + exportEntities.add(new ExcelExportEntity("出行时间", "specificTime", 50)); + exportEntities.add(new ExcelExportEntity("备注", "remark", 20)); + + try { + response.setContentType("application/octet-stream"); + response.setHeader("Content-Disposition", "attachment;filename=" + new String(("报名人员.xls").getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1)); + Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), exportEntities, list); + workbook.write(response.getOutputStream()); + workbook.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/statistics/TheRapyRecuperationLineStatisticsController.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/statistics/TheRapyRecuperationLineStatisticsController.java index 5b55433..4300eef 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/statistics/TheRapyRecuperationLineStatisticsController.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/statistics/TheRapyRecuperationLineStatisticsController.java @@ -1,5 +1,6 @@ package io.v.nutz.zhgh.therapyRecuperation.controller.statistics; +import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import cn.wizzer.framework.base.Result; @@ -192,30 +193,45 @@ public class TheRapyRecuperationLineStatisticsController { @At @ViReturn @RequiresAuthentication + @Aop(TransAop.READ_COMMITTED) public Object sendSuccess(String id, Boolean type) { - TheRapyRecuperationLineUnionSelect unionSelect = dao.fetch(TheRapyRecuperationLineUnionSelect.class, id); - TheRapyRecuperationLine line = dao.fetch(TheRapyRecuperationLine.class, unionSelect.getLineId()); - if (DateUtil.compare(new Date(), unionSelect.getSignUpEndTime()) < 0) { + TheRapyRecuperationConfig config = dao.fetch(TheRapyRecuperationConfig.class, Cnd.NEW()); + + if (DateUtil.compare(new Date(), config.getImplodeEndTime()) < 0) { return Result.error("报名还未结束"); } + TheRapyRecuperationLineUnionSelect unionSelect = dao.fetch(TheRapyRecuperationLineUnionSelect.class, id); + TheRapyRecuperationLine line = dao.fetch(TheRapyRecuperationLine.class, unionSelect.getLineId()); + unionSelect.setGroupSuccess(true); unionSelect.setGroupTime(DateUtil.now()); - switch (unionSelect.getSignUpMode()) { + /*switch (unionSelect.getSignUpMode()) { case 1 -> unionSelect.setAuditState(7707); case 2 -> unionSelect.setAuditState(7712); case 3 -> unionSelect.setAuditState(7700); - } + }*/ + unionSelect.setAuditState(7720); dao.update(unionSelect); + //找出报名人员 + List enrolls = dao.query( + TheRapyRecuperationEnroll.class, + Cnd.where("takePartInLineId", "=", id) + .and("isNormal", "=", true).and("year(signingUptime)", "=", DateUtil.thisYear()) + .and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))); + + Integer count = line.getGroupType() == 1 ? config.getConventionalCount() : config.getBoutiqueCount(); + if(enrolls.size() < count) { + return Result.error("报名人数为%s人,未达到%s人的成团条件".formatted(enrolls.size(), config.getFragmentCount())); + } + + enrolls.forEach(item -> { + item.setHasLocked(true); + }); + dao.update(enrolls); //发短信 if(type) { - //找出报名人员 - List enrolls = dao.query( - TheRapyRecuperationEnroll.class, - Cnd.where("takePartInLineId", "=", id) - .and("isNormal", "=", true).and("year(signingUptime)", "=", DateUtil.thisYear()) - .and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))); enrolls.forEach(item -> { String content = "%s老师,您好!您报名的%s线路,出行时间为%s,达到成团条件,请准时参加疗休养活动。".formatted( item.getUserName(), @@ -239,7 +255,9 @@ public class TheRapyRecuperationLineStatisticsController { TheRapyRecuperationEnroll enroll = dao.fetch(TheRapyRecuperationEnroll.class, id); dao.clear(TheRapyRecuperationEnroll.class, Cnd.where("id", "=", id)); dao.clear(TheRapyRecuperationEnrollCompanion.class, Cnd.where("trreId", "=", id)); - dao.clear(TheRapyRecuperationEnrollBed.class, Cnd.where("id", "=", enroll.getBedInfo().getId())); + if(enroll.getBedInfo() != null) { + dao.clear(TheRapyRecuperationEnrollBed.class, Cnd.where("id", "=", enroll.getBedInfo().getId())); + } return null; } @@ -248,12 +266,15 @@ public class TheRapyRecuperationLineStatisticsController { @RequiresAuthentication @Aop(TransAop.READ_COMMITTED) public Object sendFail(String id, Boolean type) { - TheRapyRecuperationLineUnionSelect unionSelect = dao.fetch(TheRapyRecuperationLineUnionSelect.class, id); - TheRapyRecuperationLine line = dao.fetch(TheRapyRecuperationLine.class, unionSelect.getLineId()); - if (DateUtil.compare(new Date(), unionSelect.getSignUpEndTime()) < 0) { + TheRapyRecuperationConfig config = dao.fetch(TheRapyRecuperationConfig.class, Cnd.NEW()); + + if (DateUtil.compare(new Date(), config.getImplodeEndTime()) < 0) { return Result.error("报名还未结束"); } + TheRapyRecuperationLineUnionSelect unionSelect = dao.fetch(TheRapyRecuperationLineUnionSelect.class, id); + TheRapyRecuperationLine line = dao.fetch(TheRapyRecuperationLine.class, unionSelect.getLineId()); + unionSelect.setGroupSuccess(false); unionSelect.setGroupTime(null); dao.update(unionSelect); diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java index f321454..8dd5910 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java @@ -163,4 +163,9 @@ public class TheRapyRecuperationLine extends BaseModel { @Default("0") private boolean openChoose; + @Column + @ColDefine(type = ColType.INT) + @Comment("成团类型(1.常规团 2.精品团)") + private Integer groupType; + } diff --git a/src/main/resources/views/platform/theRapyRecuperation/statistics/fragment.html b/src/main/resources/views/platform/theRapyRecuperation/statistics/fragment.html new file mode 100644 index 0000000..e3420f8 --- /dev/null +++ b/src/main/resources/views/platform/theRapyRecuperation/statistics/fragment.html @@ -0,0 +1,374 @@ + + +
+ + + + + + + + + + 取 消 + + + + + + + + + + + + + + + + + 取 消 + + + +
+ + + diff --git a/src/main/resources/views/platform/theRapyRecuperation/statistics/lineStatistics.html b/src/main/resources/views/platform/theRapyRecuperation/statistics/lineStatistics.html index ad60e54..539e08c 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/statistics/lineStatistics.html +++ b/src/main/resources/views/platform/theRapyRecuperation/statistics/lineStatistics.html @@ -142,7 +142,7 @@ layout("/layouts/platform.html"){ - @@ -355,7 +359,7 @@ layout("/layouts/platform.html"){ {prop: 'regionalNature', label: '线路类型', sortable: true}, {prop: 'username', label: '发起人', sortable: true}, {prop: 'unionname', label: '所属工会', sortable: true}, - {prop: 'estimatedFamilyNumbers', label: '最少成团人数', width: 80}, + {prop: 'minimumGroupSize', label: '最少成团人数', width: 80}, {prop: 'lineNum', label: '报名人数(家属)'}, {prop: 'stateName', label: '审核状态'}, ], @@ -493,6 +497,7 @@ layout("/layouts/platform.html"){ type: type }) if (resp.code === 0) { + this.doSearch() this.$message.success(resp.msg) } else { this.$message.warning(resp.msg) diff --git a/src/main/resources/views/platform/theRapyRecuperation/statistics/signUser.js b/src/main/resources/views/platform/theRapyRecuperation/statistics/signUser.js new file mode 100644 index 0000000..f031297 --- /dev/null +++ b/src/main/resources/views/platform/theRapyRecuperation/statistics/signUser.js @@ -0,0 +1,76 @@ +const signUser = { + template: /*language=HTML*/ ` +
+ + + + + + + + + +
+ `, + mixins: [initTableMixins], + data() { + return { + tableData: [], + tableColumns: [ + {prop: 'loginname', label: '工号'}, + {prop: 'username', label: '姓名'}, + {prop: 'sex', label: '性别'}, + {prop: 'mobile', label: '联系方式'}, + {prop: 'unionname', label: '所属工会'}, + {prop: 'unitname', label: '所属单位', sortable: true}, + {prop: 'specificTime', label: '出行时间', sortable: true}, + ], + } + }, + methods: { + deleteJoinUser(row) { + this.$confirm('您确定要删除' + row.username + '的报名信息吗', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + dangerouslyUseHTMLString: true + }).then(async () => { + const resp = await $.post('/platform/theRapyRecuperation/statistics/deleteJoinUser', {id: row.id}) + if (resp.code === 0) { + this.$message.success(resp.msg) + this.doSearch() + } else { + this.$message.warning(resp.msg) + } + }) + }, + async initData(baseId) { + this.pageForm.takePartInBaseManagementId = baseId + const res = await $.post('/platform/theRapyRecuperation/fragment/getSignUser', this.pageForm) + if (res.code === 0) { + this.tableData = res.data.list + this.pageForm.totalCount = res.data.totalCount + } + }, + }, + created() { + + } +}