commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.budwk.app.sys.models;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
/**
|
||||
* @Author: JyuHsin
|
||||
* @Date: 2024/6/6 15:33
|
||||
* @Version: v1.0.0
|
||||
* @Description: TODO
|
||||
**/
|
||||
@Data
|
||||
@Table("sys_holiday")
|
||||
public class SysHoliday {
|
||||
|
||||
@Name
|
||||
@ColDefine
|
||||
@Column
|
||||
@PrevInsert(uu32 = true)
|
||||
@Comment("id")
|
||||
private String id;
|
||||
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
@Comment("名称")
|
||||
@Column
|
||||
private String name;
|
||||
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
@Comment("日期")
|
||||
@Column
|
||||
private String day;
|
||||
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
@Comment("周几")
|
||||
@Column
|
||||
private String week;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.budwk.app.task.job.holiday;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.budwk.app.sys.models.SysHoliday;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JyuHsin
|
||||
* @Date: 2024/6/6 15:16
|
||||
* @Version: v1.0.0
|
||||
* @Description: 获取所有节假日,每年执行一次
|
||||
**/
|
||||
@IocBean
|
||||
public class HolidayJob implements Job {
|
||||
|
||||
private static final String URL = "https://timor.tech/api/holiday/year?type=Y";
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException {
|
||||
NutMap resMap = Json.fromJson(NutMap.class, HttpUtil.get(URL));
|
||||
if(resMap.getInt("code") == 0) {
|
||||
NutMap holidayMap = resMap.getAs("type", NutMap.class);
|
||||
List<SysHoliday> result = new ArrayList<>();
|
||||
holidayMap.keySet().forEach(k -> {
|
||||
NutMap day = (NutMap) holidayMap.get(k);
|
||||
if(day.getInt("type") == 2) {
|
||||
SysHoliday h = new SysHoliday();
|
||||
h.setDay(k);
|
||||
h.setName(day.getString("name"));
|
||||
h.setWeek(day.getString("week"));
|
||||
result.add(h);
|
||||
}
|
||||
});
|
||||
if(Lang.isNotEmpty(result)) {
|
||||
dao.insert(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class ClubAuditManagerController {
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public class ClubSchoolAuditReportController {
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public class ClubSchoolAuditRuleController {
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
|
||||
+250
-2
@@ -1,29 +1,52 @@
|
||||
package com.budwk.app.zhgh.dayofficework.site.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.sys.models.SysHoliday;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteInfo;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteType;
|
||||
import com.budwk.app.zhgh.dayofficework.site.service.SiteApplyService;
|
||||
import com.budwk.app.zhgh.dayofficework.site.service.SiteInfoService;
|
||||
import com.budwk.app.zhgh.dayofficework.site.service.SiteTypeService;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.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.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 java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -48,6 +71,10 @@ public class SiteApplyController {
|
||||
private SiteApplyService applyService;
|
||||
@Inject
|
||||
private SiteInfoService infoService;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("site.apply")
|
||||
@@ -56,7 +83,7 @@ public class SiteApplyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("site.type")
|
||||
@SaCheckPermission("site.apply")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param("year") Integer year,
|
||||
@Param("type") String type) {
|
||||
@@ -86,4 +113,225 @@ public class SiteApplyController {
|
||||
}
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("新增/修改场地预约")
|
||||
@SaCheckPermission("site.apply")
|
||||
@SLog(type = "site", tag = "新增/修改场地预约", msg = "新增/修改场地预约")
|
||||
public Result submit(@Param("data") SiteApply siteApply, @Param("days") String[] days) {
|
||||
Map<Boolean, String> validate = applyService.validateApply(siteApply, days[0]);
|
||||
if(validate.containsKey(false)) {
|
||||
return Result.error(validate.get(false));
|
||||
}
|
||||
siteApply.setApplyDay(days[0]);
|
||||
dao.insertOrUpdate(siteApply);
|
||||
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, siteApply);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("CDYY", siteApply.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("site.apply")
|
||||
public Result submitAgain(@Param("data") SiteApply siteApply,
|
||||
@Param("days") String[] days,
|
||||
@Param("taskId") String taskId) {
|
||||
Map<Boolean, String> validate = applyService.validateApply(siteApply, days[0]);
|
||||
if(validate.containsKey(false)) {
|
||||
return Result.error(validate.get(false));
|
||||
}
|
||||
siteApply.setApplyDay(days[0]);
|
||||
dao.insertOrUpdate(siteApply);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询可以预约的日期")
|
||||
@SaCheckPermission("site.apply")
|
||||
public Result queryAllowTime(String siteId, String startTime, String endTime) {
|
||||
if(StrUtil.isBlank(siteId)) {
|
||||
return Result.success(new ArrayList<>());
|
||||
}
|
||||
// 转化对象
|
||||
DateTime startDate = DateUtil.parseDate(startTime);
|
||||
Date endDate = DateUtil.parseDate(endTime);
|
||||
// 获取区间内的每一天
|
||||
List<DateTime> fullDateList = DateUtil.rangeToList(startDate, endDate, DateField.DAY_OF_MONTH);
|
||||
|
||||
// 查询场地
|
||||
SiteInfo siteInfo = infoService.fetch(siteId);
|
||||
List<NutMap> openHours = siteInfo.getOpenHours();
|
||||
List<Integer> weekNumList = openHours.stream().map(o -> o.getInt("weekNum")).distinct().toList();
|
||||
|
||||
// 查询节假日
|
||||
List<String> holidayList = null;
|
||||
if(siteInfo.getFilterHolidays()) {
|
||||
List<SysHoliday> holidays = dao.query(SysHoliday.class, Cnd.where("year(day)", "=", DateUtil.thisYear()));
|
||||
holidayList = holidays.stream().map(SysHoliday::getDay).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
List<String> result = new ArrayList<>();
|
||||
//循环时间段
|
||||
for (DateTime day : fullDateList) {
|
||||
if(Lang.isNotEmpty(holidayList) && holidayList.contains(DateUtil.formatDate(day))) {
|
||||
continue;
|
||||
}
|
||||
//先判断星期
|
||||
int week = day.dayOfWeek() - 1;
|
||||
if(weekNumList.contains(week)) {
|
||||
result.add(DateUtil.format(day, "yyyy-MM-dd"));
|
||||
}
|
||||
}
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询可以预约的时间")
|
||||
@SaCheckPermission("site.apply")
|
||||
public Result queryTimesByDay(String siteId, String day) {
|
||||
//获取场地
|
||||
SiteInfo siteInfo = infoService.fetch(siteId);
|
||||
List<NutMap> openHours = siteInfo.getOpenHours();
|
||||
Integer maxNum = siteInfo.getMaxNum();
|
||||
|
||||
//获取星期
|
||||
DateTime dateTime = DateUtil.parse(day);
|
||||
int week = dateTime.dayOfWeek() - 1;
|
||||
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
//这个是满足星期的所有时间
|
||||
List<NutMap> mapList = openHours.stream().filter(o -> o.getInt("weekNum") == week).toList();
|
||||
|
||||
for (NutMap nutMap : mapList) {
|
||||
String startTime = nutMap.getString("startTime");
|
||||
String endTime = nutMap.getString("endTime");
|
||||
double timeUnit = nutMap.getDouble("timeUnit");
|
||||
if(timeUnit == 0) {
|
||||
result.add(NutMap.NEW().addv("startTime", startTime).addv("endTime", endTime));
|
||||
} else {
|
||||
// 构造起始时间
|
||||
DateTime start = DateUtil.parse(startTime, "HH:mm");
|
||||
DateTime end = DateUtil.parse(endTime, "HH:mm");
|
||||
DateTime current = start;
|
||||
while (DateUtil.compare(current, end) < 0) {
|
||||
DateTime next = DateUtil.offsetSecond(current, (int) (timeUnit * 3600));
|
||||
// 如果超过结束时间,则使用 endTime
|
||||
if (DateUtil.compare(next, end) > 0) {
|
||||
result.add(NutMap.NEW().addv("startTime", DateUtil.format(current, "HH:mm")).addv("endTime", DateUtil.format(end, "HH:mm")));
|
||||
break;
|
||||
} else {
|
||||
result.add(NutMap.NEW().addv("startTime", DateUtil.format(current, "HH:mm")).addv("endTime", DateUtil.format(next, "HH:mm")));
|
||||
}
|
||||
current = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取当前时间的时分
|
||||
String nowTimeStr = DateUtil.format(DateUtil.date(), "HH:mm");
|
||||
DateTime nowTime = DateUtil.parseTimeToday(nowTimeStr);
|
||||
|
||||
for (NutMap nutMap : result) {
|
||||
String startTimeStr = nutMap.getString("startTime");
|
||||
String endTimeStr = nutMap.getString("endTime");
|
||||
if (day.equals(DateUtil.today())) {
|
||||
DateTime startTime = DateUtil.parseTimeToday(startTimeStr);
|
||||
// 计算时间差(单位:分钟)
|
||||
long diffMinutes = Math.abs(DateUtil.between(nowTime, startTime, DateUnit.MINUTE));
|
||||
// 相差不足4小时
|
||||
if (nowTime.getTime() > startTime.getTime() || diffMinutes <= 240) {
|
||||
nutMap.addv("disabled", true);
|
||||
nutMap.addv("tooltip", "不可预约");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(!this.isTimeInRange(siteInfo, day, startTimeStr, endTimeStr)) {
|
||||
nutMap.addv("disabled", true);
|
||||
nutMap.addv("tooltip", "不可预约");
|
||||
continue;
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
sa.*
|
||||
from
|
||||
site_apply sa
|
||||
left join wf_process_instance ins on ins.businessNo = sa.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(SiteApply::getSiteId, "=", siteId);
|
||||
cnd.and(SiteApply::getApplyDay, "=", day);
|
||||
cnd.and(SiteApply::getStartTime, "=", startTimeStr);
|
||||
cnd.and(SiteApply::getEndTime, "=", endTimeStr);
|
||||
|
||||
List<Integer> stateList = List.of(ProcessInstanceStateEnum.DOING.getCode(), ProcessInstanceStateEnum.FINISHED.getCode(), ProcessInstanceStateEnum.PENDING.getCode());
|
||||
cnd.and(ProcessInstance::getState, "in", stateList);
|
||||
sql.setCondition(cnd);
|
||||
List<SiteApply> applyList = applyService.listEntity(sql);
|
||||
|
||||
int count = Lang.isNotEmpty(applyList) ? applyList.stream().mapToInt(SiteApply::getJoinCount).sum() : 0;
|
||||
if(count >= maxNum) {
|
||||
nutMap.addv("disabled", true);
|
||||
nutMap.addv("tooltip", "已约满");
|
||||
}
|
||||
long hasReserve = applyList.stream().filter(o -> o.getApplyUserId().equals(SecurityUtil.getUserId())).count();
|
||||
if(hasReserve > 0) {
|
||||
nutMap.addv("disabled", true);
|
||||
nutMap.addv("tooltip", "已预约");
|
||||
}
|
||||
}
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
public boolean isTimeInRange(SiteInfo site, String day, String startTime, String endTime) {
|
||||
startTime = day + " " + startTime + ":00";
|
||||
endTime = day + " " + endTime + ":00";
|
||||
List<NutMap> timeRanges = site.getNotApplyTimeList();
|
||||
for (NutMap range : timeRanges) {
|
||||
// 将时间范围转换为完整的日期时间
|
||||
String startRange = range.getString("date") + " " + range.getString("startTime") + ":00";
|
||||
String endRange = range.getString("date") + " " + range.getString("endTime")+ ":00";
|
||||
|
||||
DateTime start = DateUtil.parseDateTime(startRange);
|
||||
DateTime end = DateUtil.parseDateTime(endRange);
|
||||
|
||||
if(StrUtil.isNotBlank(startTime)) {
|
||||
DateTime targetTime = DateUtil.parseDateTime(startTime);
|
||||
if (targetTime.isAfterOrEquals(start) && targetTime.isBeforeOrEquals(end)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(StrUtil.isNotBlank(endTime)) {
|
||||
DateTime targetTime = DateUtil.parseDateTime(endTime);
|
||||
if (targetTime.isAfterOrEquals(start) && targetTime.isBeforeOrEquals(end)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(StrUtil.isNotBlank(startTime) && StrUtil.isNotBlank(endTime)) {
|
||||
DateTime startTargetTime = DateUtil.parseDateTime(startTime);
|
||||
DateTime endTargetTime = DateUtil.parseDateTime(endTime);
|
||||
if(startTargetTime.isBeforeOrEquals(start) && endTargetTime.isAfterOrEquals(end)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-3
@@ -16,8 +16,6 @@ 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.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -42,7 +40,7 @@ import java.util.stream.Collectors;
|
||||
@Ok("json:full")
|
||||
@Api(tags = "场地管理")
|
||||
@At("/platform/site/manage")
|
||||
public class SiteInfoController {
|
||||
public class SiteManageController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@@ -111,4 +109,12 @@ public class SiteInfoController {
|
||||
List<SiteInfo> list = infoService.query(Cnd.where(SiteInfo::getState, "=", true).desc(SiteInfo::getSortNum));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询单个场地")
|
||||
@SaCheckLogin
|
||||
public Result info(String id) {
|
||||
SiteInfo info = infoService.fetch(id);
|
||||
return Result.success(info);
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.budwk.app.zhgh.dayofficework.site.controller;
|
||||
|
||||
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.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||
import com.budwk.app.zhgh.dayofficework.site.service.SiteApplyService;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.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.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @ClassName SiteMineController
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/27 15:49
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "场地我的预约")
|
||||
@At("/platform/site/mine")
|
||||
public class SiteMineController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private SiteApplyService applyService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/site/mine/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("site.mine")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param("year") Integer year,
|
||||
@Param("siteType") String siteType,
|
||||
@Param("siteId") String siteId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
si.name as siteName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
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
|
||||
site_apply info
|
||||
LEFT JOIN site_info si ON info.siteId = si.id
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or(SiteApply::getApplyUserName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or(SiteApply::getApplyLoginName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("year(info.applyDay)", "=", year);
|
||||
cnd.andEX("si.typeId", "=", siteType);
|
||||
cnd.andEX("info.siteId", "=", siteId);
|
||||
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc("info.createdAt");
|
||||
}
|
||||
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = applyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("site.mine")
|
||||
@SLog(type = "site", tag = "删除场地预约", msg = "删除场地预约")
|
||||
public Result delete(@Param("id") String id) {
|
||||
applyService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
package com.budwk.app.zhgh.dayofficework.site.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||
import com.budwk.app.zhgh.dayofficework.site.service.SiteApplyService;
|
||||
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.dao.util.cri.SqlExpressionGroup;
|
||||
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.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @ClassName SiteRecordController
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/27 16:58
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "场地预约查询")
|
||||
@At("/platform/site/record")
|
||||
public class SiteRecordController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private SiteApplyService applyService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/site/record/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("site.mine")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param("year") Integer year,
|
||||
@Param("siteType") String siteType,
|
||||
@Param("siteId") String siteId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
si.name as siteName,
|
||||
ins.id AS instanceId,
|
||||
ins.state instanceState,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.displayName taskName
|
||||
FROM
|
||||
site_apply info
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
processInstanceId,
|
||||
displayName,
|
||||
createdAt,
|
||||
ROW_NUMBER() OVER (PARTITION BY processInstanceId ORDER BY createdAt DESC) AS rn
|
||||
FROM wf_process_task
|
||||
) t ON t.processInstanceId = ins.id AND t.rn = 1
|
||||
LEFT JOIN site_info si ON info.siteId = si.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or(SiteApply::getApplyUserName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or(SiteApply::getApplyLoginName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("year(info.applyDay)", "=", year);
|
||||
cnd.andEX("si.typeId", "=", siteType);
|
||||
cnd.andEX("info.siteId", "=", siteId);
|
||||
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.and("info.applyUnionId", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc("info.createdAt");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pageVO = applyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pageVO);
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.budwk.app.zhgh.dayofficework.site.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||
import com.budwk.app.zhgh.dayofficework.site.service.SiteApplyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
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.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName SiteSchoolUnionAuditController
|
||||
* @Author JyuHsin
|
||||
* @Date 2025/8/27 16:42
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/site/schoolUnionAudit")
|
||||
@Api("场地预约校工会审核")
|
||||
@Ok("json:full")
|
||||
public class SiteSchoolUnionAuditController {
|
||||
|
||||
@Inject
|
||||
private SiteApplyService applyService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/site/schoolUnionAudit/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("site.schoolUnionAudit")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param("year") Integer year,
|
||||
@Param("siteType") String siteType,
|
||||
@Param("siteId") String siteId,
|
||||
@Param("approval") Boolean approval) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
si.name as siteName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN site_apply info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN site_info si ON info.siteId = si.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or(SiteApply::getApplyUserName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or(SiteApply::getApplyLoginName, "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("year(info.applyDay)", "=", year);
|
||||
cnd.andEX("si.typeId", "=", siteType);
|
||||
cnd.andEX("info.siteId", "=", siteId);
|
||||
|
||||
cnd.and("t.taskName", "=", "c8c03407-cf26-4e0b-82f1-b2afc9c79996");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc("info.createdAt");
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pageVO = applyService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pageVO);
|
||||
}
|
||||
}
|
||||
@@ -47,11 +47,22 @@ public class SiteApply extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String applyLoginName;
|
||||
|
||||
@Column
|
||||
@Comment("预约人单位id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String applyUnitId;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("预约人单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 60)
|
||||
private String applyUnitName;
|
||||
|
||||
@Column
|
||||
@Comment("预约人工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String applyUnionId;
|
||||
|
||||
@Column
|
||||
@Comment("预约人工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 60)
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.budwk.app.zhgh.dayofficework.site.service;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName SiteApplyService
|
||||
* @Author JyuHsin
|
||||
@@ -11,4 +13,6 @@ import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||
* @Description TODO
|
||||
*/
|
||||
public interface SiteApplyService extends BaseService<SiteApply> {
|
||||
|
||||
Map<Boolean, String> validateApply(SiteApply apply, String day);
|
||||
}
|
||||
|
||||
+42
@@ -1,12 +1,22 @@
|
||||
package com.budwk.app.zhgh.dayofficework.site.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteApply;
|
||||
import com.budwk.app.zhgh.dayofficework.site.model.SiteInfo;
|
||||
import com.budwk.app.zhgh.dayofficework.site.service.SiteApplyService;
|
||||
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 java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName SiteApplyServiceImpl
|
||||
* @Author JyuHsin
|
||||
@@ -21,4 +31,36 @@ public class SiteApplyServiceImpl extends BaseServiceImpl<SiteApply> implements
|
||||
public SiteApplyServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Boolean, String> validateApply(SiteApply apply, String day) {
|
||||
SiteInfo siteInfo = dao().fetch(SiteInfo.class, apply.getSiteId());
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
sa.*
|
||||
from
|
||||
site_apply sa
|
||||
left join wf_process_instance ins on ins.businessNo = sa.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(SiteApply::getSiteId, "=", apply.getSiteId());
|
||||
cnd.and(SiteApply::getApplyDay, "=", day);
|
||||
cnd.and(SiteApply::getStartTime, "=", apply.getStartTime());
|
||||
cnd.and(SiteApply::getEndTime, "=", apply.getEndTime());
|
||||
|
||||
List<Integer> stateList = List.of(ProcessInstanceStateEnum.DOING.getCode(), ProcessInstanceStateEnum.FINISHED.getCode(), ProcessInstanceStateEnum.PENDING.getCode());
|
||||
cnd.and(ProcessInstance::getState, "in", stateList);
|
||||
sql.setCondition(cnd);
|
||||
List<SiteApply> applyList = listEntity(sql);
|
||||
long hasReserve = applyList.stream().filter(o -> o.getApplyUserId().equals(SecurityUtil.getUserId())).count();
|
||||
if(hasReserve > 0) {
|
||||
return Map.of(false, "您已预约该时间段");
|
||||
}
|
||||
int count = applyList.stream().mapToInt(SiteApply::getJoinCount).sum();
|
||||
if((count + apply.getJoinCount()) > siteInfo.getMaxNum()) {
|
||||
return Map.of(false, "预约人数已满");
|
||||
}
|
||||
return Map.of(true, "");
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class CondolenceBranchUnionApprovalController {
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
|
||||
+8
-1
@@ -8,6 +8,7 @@ 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.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
@@ -98,7 +99,13 @@ public class CondolenceMineController {
|
||||
cnd.andEX("year(info.createTime)", "=", year);
|
||||
cnd.andEX("info.type", "=", type);
|
||||
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
|
||||
cnd.desc("info.createTime");
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc("info.createTime");
|
||||
}
|
||||
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
|
||||
+1
@@ -77,6 +77,7 @@ public class CondolenceReadController {
|
||||
ins.id AS instanceId,
|
||||
type.name as typeName,
|
||||
ins.state instanceState,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.displayName taskName
|
||||
FROM
|
||||
condolence info
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class CondolenceSchoolUnionApprovalController {
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
|
||||
@@ -156,22 +156,25 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
}
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/evaluate/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/club/evaluate/mine'
|
||||
}
|
||||
async onFinishTask() {
|
||||
const valid = await this.$refs["form"].validate()
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/evaluate/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/club/evaluate/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
this.$set(this.formData, "applyStartYear", new Date().getFullYear() - 1 + "")
|
||||
|
||||
@@ -208,21 +208,25 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/infoManage/change/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/infoManage/change/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
|
||||
@@ -180,21 +180,25 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/infoManage/refreshReport/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
this.$refs.guava.index()
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/infoManage/refreshReport/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
|
||||
@@ -180,21 +180,25 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/infoManage/ruleUpdate/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
this.$refs.guava.index()
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/infoManage/ruleUpdate/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
|
||||
@@ -189,24 +189,22 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (!this.isAgree) {
|
||||
this.$message.warning("请先阅读并同意协议")
|
||||
return
|
||||
}
|
||||
this.$axios.post('/platform/club/join/apply/submit/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
location.href = '/platform/club/join/mine'
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.isAgree) {
|
||||
this.$message.warning("请先阅读并同意协议")
|
||||
return
|
||||
}
|
||||
})
|
||||
this.$axios.post('/platform/club/join/apply/submit/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
location.href = '/platform/club/join/mine'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
checkApplyClub(val) {
|
||||
|
||||
@@ -10,7 +10,7 @@ const apply = {
|
||||
</el-row>
|
||||
<el-calendar v-model="applyTime">
|
||||
<template slot="dateCell" slot-scope="{date, data}">
|
||||
<div :class="getDayClass(data)" @click="pushDay(data)">
|
||||
<div :data-day="data.day" :class="getDayClass(data)" @click="pushDay(data)">
|
||||
<p :style="selectDayList.includes(data.day) ? 'color: #246fb4' : ''">
|
||||
{{ data.day.split('-').slice(1).join('-') }} {{ selectDayList.includes(data.day) ? '✔️' : ''}}
|
||||
</p>
|
||||
@@ -20,25 +20,203 @@ const apply = {
|
||||
<div style="text-align: right">
|
||||
<el-button @click="openAdd" type="primary">下一步</el-button>
|
||||
</div>
|
||||
|
||||
<el-dialog title="新增场地预约" append-to-body :close-on-click-modal="false" :visible.sync="dialogVisible" width="50%">
|
||||
<el-alert
|
||||
class="mt10 mb10"
|
||||
:title="'您已选择的预约日期为:'+ selectDayList.toString()"
|
||||
type="warning">
|
||||
</el-alert>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-position="left" label-width="100px">
|
||||
<el-form-item label="预约人" prop="applyUserName">
|
||||
<el-input readonly v-model="formData.applyUserName" maxlength="100" placeholder="请输入预约人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-input readonly v-model="formData.sex" maxlength="100" placeholder="请输入性别"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号" prop="applyLoginName">
|
||||
<el-input readonly v-model="formData.applyLoginName" maxlength="100" placeholder="请输入工号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="applyUnitName">
|
||||
<el-input readonly v-model="formData.applyUnitName" maxlength="100" placeholder="请输入所属单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="applyMobile">
|
||||
<el-input maxlength="11" placeholder="请输入联系电话" v-model="formData.applyMobile"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="预约时间" prop="applyTime">
|
||||
<el-select v-model="formData.applyTime" style="width: 100%" filterable @change="timeChange" placeholder="请选择预约时间">
|
||||
<el-option v-for="item,index in allowTimeList"
|
||||
:disabled="item.disabled === true"
|
||||
:key="index"
|
||||
:value="item.startTime + '-' + item.endTime">
|
||||
<template #default>
|
||||
<span v-if="item.disabled === true">
|
||||
{{ item.startTime + ' - ' + item.endTime + '(' + item.tooltip + ')' }}
|
||||
</span>
|
||||
<span v-else>{{ item.startTime + ' - ' + item.endTime }}</span>
|
||||
</template>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="预约人数" prop="joinCount">
|
||||
<el-input-number
|
||||
:disabled="row.reserveTarget === 1 || row.reserveTarget === 3"
|
||||
v-model="formData.joinCount"
|
||||
:min="1" :max="9999"
|
||||
label="请输入预约人数"
|
||||
style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="预约事由" prop="applyCause">
|
||||
<el-input maxlength="1000" placeholder="请输入预约事由" autosize v-model="formData.applyCause"
|
||||
type="textarea" :autosize="{ minRows: 4, maxRows: 6}"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
applyTime: '',
|
||||
allowDayList: [],
|
||||
allowTimeList: [],
|
||||
selectDayList: [],
|
||||
dialogVisible: false,
|
||||
formData: {},
|
||||
formRules: {
|
||||
applyUserId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
applyUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
applyUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
applyMobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
applyTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
joinCount: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
applyCause: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
taskId: '',
|
||||
bizId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
},
|
||||
openAdd() {},
|
||||
async pushDay(data) {
|
||||
watch: {
|
||||
applyTime() {
|
||||
this.$nextTick(async () => {
|
||||
await this.queryAllowTime(this.$moment(data.day).year(), this.$moment(data.day).month() + 1)
|
||||
await this.queryAllowTime()
|
||||
})
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
timeChange(val) {
|
||||
this.$set(this.formData, "startTime", val.split('-')[0])
|
||||
this.$set(this.formData, "endTime", val.split('-')[1])
|
||||
},
|
||||
onSubmit() {
|
||||
if (!this.formData.applyTime) {
|
||||
this.$message.warning('未选择预约时间')
|
||||
return
|
||||
}
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/site/apply/submit", {
|
||||
data: JSON.stringify(this.formData),
|
||||
days: JSON.stringify(this.selectDayList)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.dialogVisible = false
|
||||
location.href = '/platform/site/mine'
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
if (!this.formData.applyTime) {
|
||||
this.$message.warning('未选择预约时间')
|
||||
return
|
||||
}
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/site/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
days: JSON.stringify(this.selectDayList),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.dialogVisible = false
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async onOpen(row, applyRow = {}) {
|
||||
this.row = row
|
||||
await this.queryAllowTime()
|
||||
if(applyRow) {
|
||||
this.taskId = applyRow.taskId
|
||||
this.bizId = applyRow.bizId
|
||||
this.applyTime = applyRow.applyDay
|
||||
this.selectDayList.push(applyRow.applyDay)
|
||||
this.dialogVisible = true
|
||||
this.formData = clone(applyRow)
|
||||
this.$set(this.formData, 'applyTime', this.formData.startTime + '-' + this.formData.endTime)
|
||||
await this.queryTimesByDay()
|
||||
}
|
||||
},
|
||||
async openAdd() {
|
||||
if (this.selectDayList && this.selectDayList.length === 0) {
|
||||
this.$message.warning('请选择预约日期')
|
||||
return
|
||||
}
|
||||
this.$set(this.formData, "applyUserId", this.$store.state.user.id)
|
||||
this.$set(this.formData, "applyUserName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "applyLoginName", this.$store.state.user.loginname,)
|
||||
this.$set(this.formData, "applyUnitId", this.$store.state.user?.unit?.id)
|
||||
this.$set(this.formData, "applyUnitName", this.$store.state.user?.unit?.name)
|
||||
this.$set(this.formData, "applyUnionId", this.$store.state.user?.union?.id)
|
||||
this.$set(this.formData, "applyUnionName", this.$store.state.user?.union?.name)
|
||||
this.$set(this.formData, "applyMobile", this.$store.state.user.mobile)
|
||||
this.$set(this.formData, "sex", this.$store.state.user.sex)
|
||||
this.$set(this.formData, "siteId", this.row.id)
|
||||
|
||||
if (this.$refs['formRef']) this.$refs['formRef'].resetFields()
|
||||
|
||||
if (this.row.reserveTarget === 1 || this.row.reserveTarget === 3) {
|
||||
this.$set(this.formData, "joinCount", this.row.maxNum)
|
||||
} else {
|
||||
this.$set(this.formData, "joinCount", 1)
|
||||
}
|
||||
|
||||
await this.queryTimesByDay()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async queryTimesByDay() {
|
||||
const {data} = await this.$axios.post("/platform/site/apply/queryTimesByDay", {
|
||||
siteId: this.row.id,
|
||||
day: this.$moment(this.applyTime).format('YYYY-MM-DD'),
|
||||
})
|
||||
this.allowTimeList = data
|
||||
},
|
||||
async pushDay(data) {
|
||||
if (this.allowDayList.length > 0 && !this.allowDayList.includes(data.day)) {
|
||||
this.$message.warning(data.day + "不能预约")
|
||||
return
|
||||
@@ -56,13 +234,14 @@ const apply = {
|
||||
}
|
||||
},
|
||||
// 查询哪些天是开放的
|
||||
async queryAllowTime(year = null, month = null) {
|
||||
const titleText = $('.el-calendar__title').text().trim().replaceAll(' ', '')
|
||||
const m = this.$moment(titleText, "YYYY年M月")
|
||||
async queryAllowTime() {
|
||||
const days = Array.from(document.querySelectorAll('.div-Calendar'))
|
||||
.map(el => el.getAttribute('data-day'))
|
||||
.sort()
|
||||
const {data} = await this.$axios.post("/platform/site/apply/queryAllowTime", {
|
||||
siteId: this.row.id,
|
||||
year: year != null ? year : m.year(),
|
||||
month: month != null ? month : m.month() + 1,
|
||||
startTime: days[0],
|
||||
endTime: days[days.length - 1],
|
||||
})
|
||||
this.allowDayList = data
|
||||
},
|
||||
@@ -88,5 +267,8 @@ const apply = {
|
||||
.el-calendar-day:has(.not-allow-day) {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.el-dialog__body {
|
||||
padding-top: 0;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker placeholder="按年度查询" type="year" v-model="pageForm.year"
|
||||
<el-date-picker placeholder="请选择年度" type="year" v-model="pageForm.year"
|
||||
@change="doSearch" value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
@@ -82,6 +82,8 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
typeOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '场地名称'},
|
||||
@@ -98,6 +100,17 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
onApply(row) {
|
||||
if(row.reserveTarget === 1 && !this.$auth.hasRoleOr('BRANCH_UNION_ADMIN, BRANCH_UNION_CHAIRMAN') && !this.$auth.hasRole('SYSADMIN')) {
|
||||
this.$message.warning('该场地只能分工会预约')
|
||||
return
|
||||
}
|
||||
if (row.sexLimit === 1 || row.sexLimit === 2) {
|
||||
const sex = row.sexLimit === 1 ? '男' : '女'
|
||||
if(!this.$store.state.user.sex.includes(sex)) {
|
||||
this.$message.warning('抱歉,该场地仅限' + sex + '性会员预约')
|
||||
return
|
||||
}
|
||||
}
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.applyRef.onOpen(row)
|
||||
})
|
||||
@@ -119,7 +132,7 @@ layout("/layouts/platform.html"){
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.querySiteType()
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
const applyInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="预约场地">{{ viewData.siteName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约人">{{ viewData.applyUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约人工号">{{ viewData.applyLoginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属单位">{{ viewData.applyUnitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约日期">{{ viewData.applyDay }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间">{{ viewData.startTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="结束时间">{{ viewData.endTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.applyMobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约人数">{{ viewData.joinCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约事由">{{ viewData.applyCause }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.viewData = row
|
||||
this.getDoneTasks()
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.el-descriptions-item__label {
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
}
|
||||
.el-tabs__header {
|
||||
margin: 0;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -12,7 +12,7 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker placeholder="按年度查询" type="year" v-model="pageForm.year"
|
||||
<el-date-picker placeholder="请选择年度" type="year" v-model="pageForm.year"
|
||||
@change="doSearch" value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
></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-item label="活动场地">
|
||||
<el-select v-model="pageForm.siteId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择活动场地" filterable clearable>
|
||||
<el-option v-for="item in siteOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="场地类型">
|
||||
<el-select v-model="pageForm.siteType" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></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 === 'instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<site-apply ref="applyRef" @refresh="refresh"></site-apply>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/applyInfo.js'){}#-->
|
||||
<!--#include('../apply/apply.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"info": applyInfo,
|
||||
"site-apply": apply,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
siteOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'siteName', label: '场地名称'},
|
||||
{prop: 'applyUserName', label: '预约人'},
|
||||
{prop: 'applyUnitName', label: '所属单位'},
|
||||
{prop: 'applyDay', label: '预约日期'},
|
||||
{prop: 'startTime', label: '开始时间'},
|
||||
{prop: 'endTime', label: '结束时间'},
|
||||
{prop: 'applyMobile', label: '联系方式'},
|
||||
{prop: 'taskName', label: '当前节点'},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
async onEdit(row) {
|
||||
const res = await this.$axios.post('/platform/site/manage/info', { id: row.siteId })
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.applyRef.onOpen(res.data, row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
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/site/mine/delete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
querySiteType() {
|
||||
this.$axios.post('/platform/site/type/querySiteType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
querySites() {
|
||||
this.$axios.post('/platform/site/manage/querySites')
|
||||
.then((resp) => {
|
||||
this.siteOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.querySiteType()
|
||||
this.querySites()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,153 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
></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-item label="活动场地">
|
||||
<el-select v-model="pageForm.siteId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择活动场地" filterable clearable>
|
||||
<el-option v-for="item in siteOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="场地类型">
|
||||
<el-select v-model="pageForm.siteType" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></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 === 'instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="180">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/applyInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"info": applyInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
siteOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'siteName', label: '场地名称'},
|
||||
{prop: 'applyUserName', label: '预约人'},
|
||||
{prop: 'applyUnitName', label: '所属单位'},
|
||||
{prop: 'applyDay', label: '预约日期'},
|
||||
{prop: 'startTime', label: '开始时间'},
|
||||
{prop: 'endTime', label: '结束时间'},
|
||||
{prop: 'applyMobile', label: '联系方式'},
|
||||
{prop: 'taskName', label: '当前节点'},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/site/mine/delete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
querySiteType() {
|
||||
this.$axios.post('/platform/site/type/querySiteType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
querySites() {
|
||||
this.$axios.post('/platform/site/manage/querySites')
|
||||
.then((resp) => {
|
||||
this.siteOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.querySiteType()
|
||||
this.querySites()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+214
@@ -0,0 +1,214 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
></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-item label="活动场地">
|
||||
<el-select v-model="pageForm.siteId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择活动场地" filterable clearable>
|
||||
<el-option v-for="item in siteOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="场地类型">
|
||||
<el-select v-model="pageForm.siteType" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></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 === 'instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="onAudit(row)" size="mini" type="primary">审核</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/applyInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"info": applyInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'siteName', label: '场地名称'},
|
||||
{prop: 'applyUserName', label: '预约人'},
|
||||
{prop: 'applyUnitName', label: '所属单位'},
|
||||
{prop: 'applyDay', label: '预约日期'},
|
||||
{prop: 'startTime', label: '开始时间'},
|
||||
{prop: 'endTime', label: '结束时间'},
|
||||
{prop: 'applyMobile', label: '联系方式'},
|
||||
{prop: 'taskName', label: '当前节点'},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
],
|
||||
typeOptions: [],
|
||||
siteOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
querySiteType() {
|
||||
this.$axios.post('/platform/site/type/querySiteType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
querySites() {
|
||||
this.$axios.post('/platform/site/manage/querySites')
|
||||
.then((resp) => {
|
||||
this.siteOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.querySiteType()
|
||||
this.querySites()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -301,21 +301,25 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/condolence/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/condolence/mine'
|
||||
}
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/condolence/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/condolence/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
init() {
|
||||
if (this.id) {
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ layout("/layouts/platform.html"){
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
></el-date-picker>
|
||||
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型">
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
|
||||
@@ -10,7 +10,7 @@ layout("/layouts/platform.html"){
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
></el-date-picker>
|
||||
@@ -22,7 +22,7 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型">
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
|
||||
@@ -11,7 +11,7 @@ layout("/layouts/platform.html"){
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
></el-date-picker>
|
||||
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型">
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ layout("/layouts/platform.html"){
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
></el-date-picker>
|
||||
@@ -24,7 +24,7 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型">
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
|
||||
Reference in New Issue
Block a user