Merge branch 'main' of https://dd3skj.picp.vip/JyuHsin/zhgh_cug_v4
This commit is contained in:
@@ -5,15 +5,11 @@ import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.expression.ExpressionUtil;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.handlers.IHandler;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.CountersignTypeEnum;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -85,6 +81,13 @@ public class CountersignHandler implements IHandler {
|
||||
if (!isMerged && CountersignTypeEnum.PARALLEL.toString().equalsIgnoreCase(countersignType)) {
|
||||
// 是否所有会签任务已完成
|
||||
boolean finished = execution.getEngine().processTaskService().getDoingTaskList(execution.getProcessInstanceId(), new String[]{taskModel.getName()}).size() == 0;
|
||||
|
||||
if(StrUtil.isNotBlank(countersignCompletionCondition) && finished) {
|
||||
execution.getEngine().processTaskService().rejectTask(execution.getProcessModel(), execution.getProcessTask());
|
||||
} else {
|
||||
isMerged = finished;
|
||||
}
|
||||
|
||||
if (!isMerged) {
|
||||
// 未通过,更新已完成实例数量
|
||||
Dict addVariable = Dict.create();
|
||||
@@ -92,9 +95,6 @@ public class CountersignHandler implements IHandler {
|
||||
addVariable.put(prefix + FlowConst.NR_OF_COMPLETED_AGREE_INSTANCES, execution.getArgs().get(prefix + FlowConst.NR_OF_COMPLETED_AGREE_INSTANCES));
|
||||
execution.getEngine().processInstanceService().addVariable(execution.getProcessInstanceId(), addVariable);
|
||||
}
|
||||
if(finished) {
|
||||
execution.getEngine().processTaskService().rejectTask(execution.getProcessModel(), execution.getProcessTask());
|
||||
}
|
||||
}
|
||||
if (isMerged) {
|
||||
// 获取所有会签参数键值
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
package com.budwk.app.sys.utils;
|
||||
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Times;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/24.
|
||||
*/
|
||||
@IocBean
|
||||
public class DateUtil {
|
||||
private static final Locale DEFAULT_LOCALE = Locale.CHINA;
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
public static Integer getYear() {
|
||||
return Calendar.getInstance().get(Calendar.YEAR);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时间(HH:mm:ss)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDate() {
|
||||
return DateFormatUtils.format(new Date(), "yyyy-MM-dd", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前时间(HH:mm:ss)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getTime() {
|
||||
return DateFormatUtils.format(new Date(), "HH:mm:ss", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时间(yyyy-MM-dd HH:mm:ss)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDateTime() {
|
||||
return DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时间(yyyy-MM-dd HH:mm)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDateTime2() {
|
||||
return DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换日期格式(yyyy-MM-dd HH:mm:ss)
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static String formatDateTime(Date date) {
|
||||
if (date == null) return "";
|
||||
return DateFormatUtils.format(date, "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换日期格式(yyyy-MM-dd)
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static String formatDate(Date date) {
|
||||
if (date == null) return "";
|
||||
return DateFormatUtils.format(date, "yyyy-MM-dd", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换日期格式(yyyy-MM-dd HH:mm:ss)
|
||||
*
|
||||
* @param date
|
||||
* @param f
|
||||
* @return
|
||||
*/
|
||||
public static String format(Date date, String f) {
|
||||
if (date == null) return "";
|
||||
return DateFormatUtils.format(date, f, DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳日期
|
||||
*
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
public static String getDate(long time) {
|
||||
return DateFormatUtils.format(new Date(time * 1000), "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳日期
|
||||
*
|
||||
* @param time
|
||||
* @param f
|
||||
* @return
|
||||
*/
|
||||
public static String getDate(long time, String f) {
|
||||
return DateFormatUtils.format(new Date(time * 1000), f, DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过字符串时间获取时间戳 nutzwk5.0改为long
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static long getTime(String date) {
|
||||
try {
|
||||
return Times.parse(sdf, date).getTime() / 1000;
|
||||
} catch (ParseException e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过字符串时间获取时间戳 nutzwk5.0改为long
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static long getTime(SimpleDateFormat sdf, String date) {
|
||||
try {
|
||||
return Times.parse(sdf, date).getTime() / 1000;
|
||||
} catch (ParseException e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过字符串时间转时间戳
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public static long formatDate(String data) {
|
||||
try {
|
||||
return new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(data).getTime();
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
+305
@@ -0,0 +1,305 @@
|
||||
package com.budwk.app.zhgh.activity.sports.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.services.SysUnionService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2021/5/27 15:57
|
||||
* @description 奖品名单
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/activity/prize/list")
|
||||
public class ActivityPrizeListController {
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:platform/zhgh/activity/sports/ActivityPrize/index.html")
|
||||
@SaCheckPermission("activity.prize.list")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
private SysUnionService sysUnionService;
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
/**
|
||||
* 各个分工会奖品
|
||||
*
|
||||
* @param activityId
|
||||
* @param unionId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@At
|
||||
@ApiOperation("获取各个分工会每个项目前八名")
|
||||
@SaCheckPermission("activity.prize.list")
|
||||
public Result getPrizes(Integer year, String activityId, String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
acr.activityId,
|
||||
ace.allName,
|
||||
acr.userId,
|
||||
acr.ranking,
|
||||
acr.numberOfPeople,
|
||||
ace.isMenWomen,
|
||||
acs.`name` as activityName,
|
||||
u.username,
|
||||
RIGHT(ace.allName,4) xmlx,
|
||||
LEFT(ace.allName,2) xblx
|
||||
FROM activity_school_event acse
|
||||
left join activity_school acs on acs.id = acse.activityId
|
||||
left join activity_event ace on ace.id = acse.eventId
|
||||
left join activity_results acr on acr.eventId = acse.eventId
|
||||
left join sys_user u on u.id = acr.userId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("acr.activityId", "=", activityId);
|
||||
cnd.and("YEAR(acs.applyStartTime)", "=", year);
|
||||
// cnd.and("ace.isInterest", "=", 0);
|
||||
cnd.and("acr.unionId", "=", unionId);
|
||||
cnd.asc("ace.allName").asc("acr.ranking");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> allList = baseService.listMap(sql);
|
||||
if (Lang.isEmpty(allList)) {
|
||||
return Result.success(Map.of("团体项目", Map.of(), "男子项目", Map.of(), "女子项目", Map.of(), "其他", Map.of()));
|
||||
}
|
||||
|
||||
Map maleMap = NutMap.NEW();
|
||||
Map femaleMap = NutMap.NEW();
|
||||
Map teamMap = NutMap.NEW();
|
||||
Map otherMap = NutMap.NEW();
|
||||
|
||||
Map<String, List<NutMap>> xmlxList = allList.stream().collect(Collectors.groupingBy(v -> v.getString("xmlx")));
|
||||
|
||||
if (Lang.isNotEmpty(xmlxList.get("(团体)"))) {
|
||||
teamMap = xmlxList.get("(团体)").stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(xmlxList.get("(单项)")) && xmlxList.get("(单项)").stream().anyMatch(v -> v.getString("xblx").equals("男子"))) {
|
||||
maleMap = xmlxList.get("(单项)").stream().filter(v -> v.getString("xblx").equals("男子")).collect(Collectors.groupingBy(h -> h.getString("allName")));
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(xmlxList.get("(单项)")) && xmlxList.get("(单项)").stream().anyMatch(v -> v.getString("xblx").equals("女子"))) {
|
||||
femaleMap = xmlxList.get("(单项)").stream().filter(v -> v.getString("xblx").equals("女子")).collect(Collectors.groupingBy(h -> h.getString("allName")));
|
||||
}
|
||||
return Result.success(Map.of("团体项目", teamMap, "男子项目", maleMap, "女子项目", femaleMap, "其他", otherMap));
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("获取每一年每个项目前八都是谁")
|
||||
@SaCheckPermission("activity.prize.list")
|
||||
public Result getSummaryYearPrizes(Integer year, String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
ace.projectCode,
|
||||
acs.id activityId,
|
||||
ace.allName,
|
||||
acr.userId,
|
||||
acr.ranking,
|
||||
acr.numberOfPeople,
|
||||
acr.integral,
|
||||
ace.isMenWomen,
|
||||
acs.`name` AS activityName,
|
||||
CONCAT(u.username,'/',u.unionname) username,
|
||||
un.name unionname,
|
||||
ace.isInterest,
|
||||
bszb.`code` bszbCode,
|
||||
bszb.`name` bszbName,
|
||||
RIGHT ( ace.allName, 4 ) xmlx,
|
||||
LEFT ( ace.allName, 2 ) xblx
|
||||
FROM
|
||||
activity_school_event acse
|
||||
LEFT JOIN activity_school acs ON acs.id = acse.activityId
|
||||
LEFT JOIN activity_event ace ON ace.id = acse.eventId
|
||||
LEFT JOIN activity_basic_settings bszb ON bszb.id=ace.competitionCategory
|
||||
LEFT JOIN activity_results acr ON acr.eventId = acse.eventId
|
||||
AND acr.activityId = acs.id
|
||||
LEFT JOIN sys_union un ON un.id=acr.unionId
|
||||
LEFT JOIN `vw_user` u ON u.id = acr.userId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("YEAR(acs.startTime)", "=", year);
|
||||
if ("男".equals(sex)) {
|
||||
cnd.and(Cnd.exps("ace.isMenWomen", "=", "1").or("ace.isMenWomen", "is", null));
|
||||
} else {
|
||||
cnd.and(Cnd.exps("ace.isMenWomen", "=", "2").or("ace.isMenWomen", "is", null));
|
||||
}
|
||||
cnd.asc("ace.projectCode").asc("acr.ranking");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> allList =baseService.listMap( sql);
|
||||
if (Lang.isEmpty(allList)) {
|
||||
return Result.success(Map.of("甲组", Map.of(), "乙组", Map.of(), "丙组", Map.of(), "丁组", Map.of(), "集体项目", Map.of()));
|
||||
}
|
||||
allList.forEach(a -> {
|
||||
a.setv("allName", a.getString("allName").replaceAll("男子|女子|\\(单项\\)|\\(团体\\)|甲组|乙组|丙组|丁组|团体", ""));
|
||||
});
|
||||
|
||||
Map oneMap = NutMap.NEW();
|
||||
Map twoMap = NutMap.NEW();
|
||||
Map threeMap = NutMap.NEW();
|
||||
Map fourMap = NutMap.NEW();
|
||||
Map fiveMap = NutMap.NEW();
|
||||
|
||||
//甲组
|
||||
List<NutMap> oneList = allList.stream().filter(a -> a.getString("bszbName").equals("甲组")).collect(toList());
|
||||
if (Lang.isNotEmpty(oneList)) {
|
||||
oneMap = oneList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
|
||||
//乙组
|
||||
List<NutMap> twoList = allList.stream().filter(a -> a.getString("bszbName").equals("乙组")).collect(toList());
|
||||
if (Lang.isNotEmpty(twoList)) {
|
||||
twoMap = twoList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
|
||||
|
||||
//丙组
|
||||
List<NutMap> threeList = allList.stream().filter(a -> a.getString("bszbName").equals("丙组")).collect(toList());
|
||||
if (Lang.isNotEmpty(threeList)) {
|
||||
threeMap = threeList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
|
||||
|
||||
//丁组
|
||||
List<NutMap> fourList = allList.stream().filter(a -> a.getString("bszbName").equals("丁组")).collect(toList());
|
||||
if (Lang.isNotEmpty(fourList)) {
|
||||
fourMap = fourList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
|
||||
//团体
|
||||
List<NutMap> fiveList = allList.stream().filter(a -> a.getString("bszbName").equals("团体")).collect(toList());
|
||||
if (Lang.isNotEmpty(fiveList)) {
|
||||
fiveMap = fiveList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
NutMap map = new NutMap();
|
||||
map.put("甲组", oneMap);
|
||||
map.put("乙组", twoMap);
|
||||
map.put("丙组", threeMap);
|
||||
map.put("丁组", fourMap);
|
||||
map.put("集体项目", fiveMap);
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("获取各个分工会年度前八名的个数")
|
||||
@SaCheckPermission("activity.prize.list")
|
||||
public Result summary(String activityId) {
|
||||
|
||||
NutMap map = new NutMap();
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
|
||||
//查询所有的工会
|
||||
List<Sys_union> query = sysUnionService.query();
|
||||
for (Sys_union sys_union : query) {
|
||||
NutMap nutMap = new NutMap();
|
||||
|
||||
//记录总人数
|
||||
int totalPeople = 0;
|
||||
nutMap.setv("unionname", sys_union.getName());
|
||||
for (int i = 1; i <= 8; i++) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
IFNULL((
|
||||
SELECT
|
||||
COUNT( 1 )
|
||||
FROM
|
||||
activity_results ar1
|
||||
WHERE
|
||||
ar1.activityId = ar2.activityId
|
||||
AND ar1.ranking = ar2.ranking
|
||||
AND ar1.isTeamPersonal = 1
|
||||
AND ar1.unionId = ar2.unionId
|
||||
),
|
||||
0
|
||||
) num,
|
||||
IFNULL( SUM( numberOfPeople ), 0 ) numberOfPeople
|
||||
FROM
|
||||
activity_results ar2 $condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ar2.activityId", "=", activityId);
|
||||
cnd.and("ar2.ranking", "=", i);
|
||||
cnd.and("ar2.unionId", "=", sys_union.getId());
|
||||
cnd.and("ar2.isTeamPersonal", "in", "1,2");
|
||||
sql.setCondition(cnd);
|
||||
int number = 0;
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
if (!list.isEmpty()) {
|
||||
number = list.get(0).getInt("num") + list.get(0).getInt("numberOfPeople");
|
||||
}
|
||||
totalPeople += number;
|
||||
if (i == 1) {
|
||||
nutMap.setv("one", number);
|
||||
} else if (i == 2) {
|
||||
nutMap.setv("two", number);
|
||||
} else if (i == 3) {
|
||||
nutMap.setv("three", number);
|
||||
} else if (i == 4) {
|
||||
nutMap.setv("four", number);
|
||||
} else if (i == 5) {
|
||||
nutMap.setv("fives", number);
|
||||
} else if (i == 6) {
|
||||
nutMap.setv("six", number);
|
||||
} else if (i == 7) {
|
||||
nutMap.setv("seven", number);
|
||||
} else if (i == 8) {
|
||||
nutMap.setv("eight", number);
|
||||
}
|
||||
|
||||
}
|
||||
nutMap.setv("totalPeople", totalPeople);
|
||||
result.add(nutMap);
|
||||
|
||||
|
||||
}
|
||||
map.put("score", result);
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
@Data
|
||||
private class Ranking {
|
||||
|
||||
private int one;
|
||||
private int two;
|
||||
private int three;
|
||||
private int four;
|
||||
private int fives;
|
||||
private int six;
|
||||
private int seven;
|
||||
private int eight;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-3
@@ -222,16 +222,15 @@ public class ActivitySportsResultsController {
|
||||
|
||||
SELECT
|
||||
un.id,
|
||||
un.unionname
|
||||
un.name unionname
|
||||
FROM
|
||||
activity_school_apply asa
|
||||
LEFT JOIN sys_union un ON un.id = asa.unionId
|
||||
WHERE
|
||||
asa.activityId = @activityId
|
||||
AND asa.eventId = @eventId
|
||||
|
||||
GROUP BY
|
||||
un.unionname
|
||||
un.name
|
||||
""").setParam("activityId", activityId).setParam("eventId", eventId);
|
||||
return Result.success(activitySchoolApplyViService.list(sql));
|
||||
}
|
||||
|
||||
+23
-135
@@ -13,6 +13,7 @@ import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.services.SysUnionService;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchool;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolEvent;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -64,7 +65,8 @@ public class ActivitySportsScoreStatisticsController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("男子项目分工会积分/女子项目分工会积分")
|
||||
public Result isMaleFemale(String activityId, String sex, Integer awardsMode) {
|
||||
|
||||
NutMap map = new NutMap();
|
||||
@@ -91,13 +93,13 @@ public class ActivitySportsScoreStatisticsController {
|
||||
if (awardsMode < 3) {
|
||||
cndX.and("eve.projectType", "=", awardsMode);
|
||||
cndX.and("eve.isInterest", "=", false);
|
||||
cndX.and("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2);
|
||||
cndX.and("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2);
|
||||
}
|
||||
if (awardsMode == 3) {
|
||||
cndX.and("eve.isInterest", "=", true);
|
||||
}
|
||||
if (awardsMode == 4) {
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
}
|
||||
cndX.and(new Static("1=1 order by case ba.`name` when '甲组' then 1 when '乙组' then 2 when '丙组' then 3 when '丁组' then 4 when '团体' then 5 end"));
|
||||
sqlX.setCondition(cndX);
|
||||
@@ -122,11 +124,11 @@ public class ActivitySportsScoreStatisticsController {
|
||||
Cnd cndC = Cnd.NEW();
|
||||
if ((awardsMode == 1 && event.getString("awardsMode").equals("1")) || (awardsMode == 2 && event.getString("awardsMode").equals("2"))) {
|
||||
cndC.and("ev.isInterest", "=", false);
|
||||
cndC.and("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2);
|
||||
cndC.and("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2);
|
||||
} else if (awardsMode == 3) {
|
||||
cndC.and("ev.isInterest", "=", true);
|
||||
} else if (awardsMode == 4) {
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
}
|
||||
cndC.and("ar.eventId", "=", event.getString("eventid"));
|
||||
cndC.and("ar.unionid", "=", sys_union.getId());
|
||||
@@ -165,7 +167,8 @@ public class ActivitySportsScoreStatisticsController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("单子单项前八/女子单项前八/团体项目前八")
|
||||
public Result isTopEight(String activityId, String sex, Integer awardsMode) {
|
||||
NutMap map = new NutMap();
|
||||
Cnd cndX = Cnd.NEW();
|
||||
@@ -184,7 +187,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
""");
|
||||
cndX.and("ev.activityId", "=", activityId);
|
||||
if (awardsMode == 1) {
|
||||
cndX.and("eve.isMenWomen", "!=", sex.equals("男性") ? 2 : 1);
|
||||
cndX.and("eve.isMenWomen", "!=", sex.equals("男") ? 2 : 1);
|
||||
cndX.and("eve.projectType", "=", 1);
|
||||
|
||||
} else {
|
||||
@@ -249,7 +252,8 @@ public class ActivitySportsScoreStatisticsController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("男子总分前八/女子总分前八")
|
||||
public Result isScoreTopEight(String activityId, String sex) {
|
||||
|
||||
NutMap map = new NutMap();
|
||||
@@ -269,7 +273,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
LEFT JOIN activity_basic_settings ba ON eve.competitionCategory = ba.id $condition
|
||||
""");
|
||||
cndX.and("ev.activityId", "=", activityId);
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(new Static("1=1 order by case ba.`name` when '甲组' then 1 when '乙组' then 2 when '丙组' then 3 when '丁组' then 4 when '团体' then 5 end"));
|
||||
sqlX.setCondition(cndX);
|
||||
List<Record> eventList = baseService.list(sqlX);
|
||||
@@ -293,7 +297,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
LEFT JOIN activity_event ev ON ar.eventId = ev.id $condition
|
||||
""");
|
||||
Cnd cndC = Cnd.NEW();
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and("ar.unionid", "=", sys_union.getId());
|
||||
cndC.and("ar.eventId", "=", event.getString("eventid"));
|
||||
cndC.and("ar.activityId", "=", activityId);
|
||||
@@ -318,7 +322,8 @@ public class ActivitySportsScoreStatisticsController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("年度团体总分")
|
||||
public Result getAnnualResults(Integer year) {
|
||||
|
||||
ArrayList<Map> resultMap = new ArrayList<>();
|
||||
@@ -349,7 +354,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
unionMap.put(x.getName(), score);
|
||||
});
|
||||
unionMap.put("总分", scoreSum.get());
|
||||
unionMap.put("分工会", unionMap.getString("unionname"));
|
||||
unionMap.put("分工会", unionMap.getString("name"));
|
||||
resultMap.add(unionMap);
|
||||
});
|
||||
labelList.add("总分");
|
||||
@@ -359,11 +364,12 @@ public class ActivitySportsScoreStatisticsController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("年度男子团体总分/年度女子团体总分")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
public Result getYear8(Integer isMenWomen, Integer year) {
|
||||
ArrayList<Map> resultMap = new ArrayList<>();
|
||||
|
||||
// int isMenWomen = sex.equals("男性") ? 1 : 2;
|
||||
// int isMenWomen = sex.equals("男") ? 1 : 2;
|
||||
|
||||
Dao dao = sysUnionService.dao();
|
||||
List<Sys_union> unionList = sysUnionService.query();
|
||||
@@ -408,7 +414,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
unionMap.put(a.getName(), sexScore + (qwScore * 0.5));
|
||||
});
|
||||
unionMap.put("总分", scoreSum.get());
|
||||
unionMap.put("分工会", unionMap.getString("unionname"));
|
||||
unionMap.put("分工会", unionMap.getString("name"));
|
||||
resultMap.add(unionMap);
|
||||
|
||||
});
|
||||
@@ -416,139 +422,21 @@ public class ActivitySportsScoreStatisticsController {
|
||||
return Result.success(Map.of("label", activityNameList, "score", resultMap));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@Ok("void")
|
||||
public void doGetYear8(HttpServletResponse response, Integer isMenWomen, Integer year) throws Exception {
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
|
||||
List<Sys_union> unionList = sysUnionService.query();
|
||||
|
||||
unionList.forEach(u -> {
|
||||
NutMap nutMap = new NutMap();
|
||||
nutMap.setv("unionname", u.getName());
|
||||
double score = 0;
|
||||
for (int i = 1; i <= 2; i++) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
SUM( ar.integral ) score
|
||||
FROM
|
||||
activity_results ar
|
||||
LEFT JOIN activity_event eve ON ar.eventId = eve.id
|
||||
LEFT JOIN activity_school `as` ON `as`.id = ar.activityId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("YEAR ( `as`.applyStartTime )", "=", year);
|
||||
cnd.and("ar.unionId", "=", u.getId());
|
||||
if (i == 1) {
|
||||
cnd.and("eve.isMenWomen", "=", isMenWomen);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
score += list.get(0).getDouble("score");
|
||||
} else {
|
||||
cnd.and("eve.isInterest", "=", 1);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
score += list.get(0).getDouble("score") * 0.5;
|
||||
}
|
||||
}
|
||||
nutMap.setv("score", score);
|
||||
result.add(nutMap);
|
||||
});
|
||||
List<NutMap> scoreList = result.stream().sorted(Comparator.comparing(ActivitySportsScoreStatisticsController::getDouble).reversed()).collect(Collectors.toList()).subList(0, 8);
|
||||
|
||||
for (int i = 0; i < scoreList.size(); i++) {
|
||||
scoreList.get(i).put("ranking", i + 1);
|
||||
}
|
||||
|
||||
|
||||
/* HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
Configure config = Configure.newBuilder().bind("scoreList", policy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("year", year);
|
||||
map.put("sex", isMenWomen == 1 ? '男性' : '女');
|
||||
map.put("scoreList", scoreList);
|
||||
String fileName = "%s年运动会%s子积分表".formatted(year, isMenWomen == 1 ? '男性' : '女');
|
||||
|
||||
response.addHeader("Content-Type", "application/octet-stream");
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
XWPFTemplate.compile(officeTemplateUtil.getPath("activity_getYear8"), config).render(map).writeAndClose(response.getOutputStream());*/
|
||||
}
|
||||
|
||||
public static Double getDouble(NutMap o) {
|
||||
return o.getDouble("score");
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckLogin
|
||||
public void doExport8ByActivity(HttpServletResponse response, String activityId, Integer isMenWomen) throws Exception {
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
|
||||
List<Sys_union> unionList = sysUnionService.query();
|
||||
unionList.forEach(u -> {
|
||||
NutMap nutMap = new NutMap();
|
||||
nutMap.setv("unionname", u.getName());
|
||||
double score = 0;
|
||||
for (int i = 1; i <= 2; i++) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
SUM( ar.integral ) score
|
||||
FROM
|
||||
activity_results ar
|
||||
LEFT JOIN activity_event eve ON ar.eventId = eve.id
|
||||
LEFT JOIN activity_school `as` ON `as`.id = ar.activityId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("activityId", "=", activityId);
|
||||
cnd.and("ar.unionId", "=", u.getId());
|
||||
if (i == 1) {
|
||||
cnd.and("eve.isMenWomen", "=", isMenWomen);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
score += list.get(0).getDouble("score");
|
||||
} else {
|
||||
cnd.and("eve.isInterest", "=", 1);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
score += list.get(0).getDouble("score") * 0.5;
|
||||
}
|
||||
}
|
||||
nutMap.setv("score", score);
|
||||
result.add(nutMap);
|
||||
});
|
||||
List<NutMap> scoreList = result.stream().sorted(Comparator.comparing(ActivitySportsScoreStatisticsController::getDouble).reversed()).collect(Collectors.toList()).subList(0, 8);
|
||||
|
||||
for (int i = 0; i < scoreList.size(); i++) {
|
||||
scoreList.get(i).put("ranking", i + 1);
|
||||
}
|
||||
|
||||
/*HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
Configure config = Configure.newBuilder().bind("scoreList", policy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("sex", isMenWomen == 1 ? '男性' : '女');
|
||||
map.put("scoreList", scoreList);
|
||||
String fileName = "%s子积分表".formatted(isMenWomen == 1 ? '男性' : '女');
|
||||
|
||||
response.addHeader("Content-Type", "application/octet-stream");
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
XWPFTemplate.compile(officeTemplateUtil.getPath("activity_getYear8"), config).render(map, response.getOutputStream());*/
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
public void doExcelCj(String activityId, String unionId, HttpServletResponse response) throws IOException {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
un.unioncode,
|
||||
un.unionname,
|
||||
un.name unionname,
|
||||
us.loginname,
|
||||
us.username,
|
||||
us.sex,
|
||||
|
||||
+24
-17
@@ -6,12 +6,14 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.services.SysUnionService;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchool;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolEvent;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -48,7 +50,8 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@Ok("void")
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("年度男子团体总分/年度女子团体总分")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
public void getYear8(Integer isMenWomen, Integer year, HttpServletResponse response) {
|
||||
ArrayList<Map> resultMap = new ArrayList<>();
|
||||
List<Sys_union> unionList = sysUnionService.query();
|
||||
@@ -90,7 +93,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
unionMap.put(a.getName(), sexScore + (qwScore * 0.5));
|
||||
});
|
||||
unionMap.put("总分", scoreSum.get());
|
||||
unionMap.put("分工会", unionMap.getString("unionname"));
|
||||
unionMap.put("分工会", unionMap.getString("name"));
|
||||
resultMap.add(unionMap);
|
||||
|
||||
});
|
||||
@@ -120,7 +123,8 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@Ok("void")
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("年度团体总分")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
public void getAnnualResults(Integer year, HttpServletResponse response) {
|
||||
ArrayList<Map> resultMap = new ArrayList<>();
|
||||
|
||||
@@ -150,7 +154,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
unionMap.put(x.getName(), score);
|
||||
});
|
||||
unionMap.put("总分", scoreSum.get());
|
||||
unionMap.put("分工会", unionMap.getString("unionname"));
|
||||
unionMap.put("分工会", unionMap.getString("name"));
|
||||
resultMap.add(unionMap);
|
||||
});
|
||||
labelList.add("总分");
|
||||
@@ -180,6 +184,8 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("男子项目分工会积分/女子项目分工会积分")
|
||||
public void isMaleFemale(String activityId, String sex, Integer awardsMode, HttpServletResponse response) {
|
||||
NutMap map = new NutMap();
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
@@ -205,13 +211,13 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
if (awardsMode < 3) {
|
||||
cndX.and("eve.projectType", "=", awardsMode);
|
||||
cndX.and("eve.isInterest", "=", false);
|
||||
cndX.and("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2);
|
||||
cndX.and("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2);
|
||||
}
|
||||
if (awardsMode == 3) {
|
||||
cndX.and("eve.isInterest", "=", true);
|
||||
}
|
||||
if (awardsMode == 4) {
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
}
|
||||
cndX.and(new Static("1=1 order by case ba.`name` when '甲组' then 1 when '乙组' then 2 when '丙组' then 3 when '丁组' then 4 when '团体' then 5 end"));
|
||||
sqlX.setCondition(cndX);
|
||||
@@ -236,11 +242,11 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
Cnd cndC = Cnd.NEW();
|
||||
if ((awardsMode == 1 && event.getString("awardsMode").equals("1")) || (awardsMode == 2 && event.getString("awardsMode").equals("2"))) {
|
||||
cndC.and("ev.isInterest", "=", false);
|
||||
cndC.and("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2);
|
||||
cndC.and("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2);
|
||||
} else if (awardsMode == 3) {
|
||||
cndC.and("ev.isInterest", "=", true);
|
||||
} else if (awardsMode == 4) {
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
}
|
||||
cndC.and("ar.eventId", "=", event.getString("eventid"));
|
||||
cndC.and("ar.unionid", "=", sys_union.getId());
|
||||
@@ -296,9 +302,9 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("单子单项前八/女子单项前八/团体项目前八")
|
||||
public void isTopEight(String activityId, String sex, Integer awardsMode, HttpServletResponse response) {
|
||||
NutMap map = new NutMap();
|
||||
List<Record> result = new ArrayList<>();
|
||||
Cnd cndX = Cnd.NEW();
|
||||
//查询所有的项目
|
||||
Sql sqlX = Sqls.create("""
|
||||
@@ -315,7 +321,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
""");
|
||||
cndX.and("ev.activityId", "=", activityId);
|
||||
if (awardsMode == 1) {
|
||||
cndX.and("eve.isMenWomen", "!=", sex.equals("男性") ? 2 : 1);
|
||||
cndX.and("eve.isMenWomen", "!=", sex.equals("男") ? 2 : 1);
|
||||
cndX.and("eve.projectType", "=", 1);
|
||||
|
||||
} else {
|
||||
@@ -330,7 +336,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
NutMap nutMap = new NutMap();
|
||||
Sql sqlC = Sqls.create("");
|
||||
Sql sqlC;
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (awardsMode == 1) {
|
||||
sqlC = Sqls.create("""
|
||||
@@ -386,12 +392,12 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
eventList.forEach(v -> {
|
||||
entityList.add(new ExcelExportEntity(v.getString("label"), v.getString("label"), 40));
|
||||
});
|
||||
String sex2 = awardsMode == 2 ? "团体" : sex.equals("男性") ? "男子" : "女子";
|
||||
String sex2 = awardsMode == 2 ? "团体" : sex.equals("男") ? "男子" : "女子";
|
||||
try {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, nutMaps);
|
||||
CommonDownloadUtil.download("项目前八.xlsx", workbook, response);
|
||||
CommonDownloadUtil.download(sex2 + "项目前八.xlsx", workbook, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -402,9 +408,10 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("男子总分前八/女子总分前八")
|
||||
public void isScoreTopEight(String activityId, String sex, HttpServletResponse response) {
|
||||
|
||||
NutMap map = new NutMap();
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
Cnd cndX = Cnd.NEW();
|
||||
//查询所有的项目
|
||||
@@ -421,7 +428,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
LEFT JOIN activity_basic_settings ba ON eve.competitionCategory = ba.id $condition
|
||||
""");
|
||||
cndX.and("ev.activityId", "=", activityId);
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(new Static("1=1 order by case ba.`name` when '甲组' then 1 when '乙组' then 2 when '丙组' then 3 when '丁组' then 4 when '团体' then 5 end"));
|
||||
sqlX.setCondition(cndX);
|
||||
List<Record> eventList = baseService.list(sqlX);
|
||||
@@ -445,7 +452,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
LEFT JOIN activity_event ev ON ar.eventId = ev.id $condition
|
||||
""");
|
||||
Cnd cndC = Cnd.NEW();
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and("ar.unionid", "=", sys_union.getId());
|
||||
cndC.and("ar.eventId", "=", event.getString("eventid"));
|
||||
cndC.and("ar.activityId", "=", activityId);
|
||||
|
||||
+29
@@ -13,6 +13,8 @@ import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.sys.models.Sys_config;
|
||||
import com.budwk.app.sys.utils.DateUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
@@ -34,6 +36,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -75,6 +78,32 @@ public class DifficultHelpApplyController {
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("获取申请次数和时间")
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
public Result getIsCanPlay() {
|
||||
//获取申请次数,不想再写一个接口, are you ok? .and("zt", "=", 600)
|
||||
int applyCount = dao.count(DifficultHelpInfo.class, Cnd.where("proxyUserId", "=", SecurityUtil.getUserId()));
|
||||
Sys_config startConfig = dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "DifficultyApplyStartTime"));
|
||||
Sys_config endConfig = dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "DifficultyApplyEndTime"));
|
||||
if(startConfig != null && endConfig != null) {
|
||||
// 获取今天的日期
|
||||
String today = cn.hutool.core.date.DateUtil.today();
|
||||
// 开始
|
||||
String start = DateUtil.getYear() + "-" + startConfig.getConfigValue();
|
||||
// 结束
|
||||
String end = DateUtil.getYear() + "-" + endConfig.getConfigValue();
|
||||
// 比较
|
||||
int startResult = cn.hutool.core.date.DateUtil.compare(cn.hutool.core.date.DateUtil.parse(today), cn.hutool.core.date.DateUtil.parse(start));
|
||||
int endResult = cn.hutool.core.date.DateUtil.compare(cn.hutool.core.date.DateUtil.parse(today), cn.hutool.core.date.DateUtil.parse(end));
|
||||
|
||||
String time = startConfig.getConfigValue().replace("-", "月") + "日-" + endConfig.getConfigValue().replace("-", "月") + "日";
|
||||
return Result.success(Map.of("applyCount", applyCount,"time", time, "result", startResult >=0 && endResult <= 0));
|
||||
} else {
|
||||
return Result.success(Map.of("applyCount", applyCount,"time", "", "result", false));
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
|
||||
+3
-1
@@ -73,7 +73,9 @@ public class DifficultHelpBranchUnionApprovalController {
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.subsidyStandards,
|
||||
info.applyTime,
|
||||
LEFT(info.applyTime, 10) AS applyTime,
|
||||
info.applyCount,
|
||||
info.mobile,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
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.staffbenefit.difficulthelp.service.DifficultHelpCommonService;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:DifficultHelpBranchUnionApprovalController
|
||||
* @Date 2025/7/31 11:47
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@ApiOperation("困难补助二级党组织审核")
|
||||
@At("/platform/difficultHelp/unionLeaderApproval")
|
||||
public class DifficultHelpBranchUnionLeaderApprovalController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private DifficultHelpCommonService difficultHelpCommonService;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("difficultHelp.unionLeaderApproval")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/index.html")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("difficultHelp.unionLeaderApproval")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/form.html")
|
||||
public void form() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("h5.difficultHelp.unionLeaderApproval")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/difficulthelp/unionLeaderApproval/index.html")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("困难补助分工会审核列表")
|
||||
@SaCheckPermission("difficultHelp.unionLeaderApproval")
|
||||
public Result pageData(DifficultHelpPageParam pageParam) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.proxyUserName,
|
||||
info.proxyLoginName,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.subsidyStandards,
|
||||
LEFT(info.applyTime, 10) AS applyTime,
|
||||
info.applyCount,
|
||||
info.mobile,
|
||||
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 difficult_help_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.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();
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
|
||||
cnd.and("t.taskName", "=", "36ebafda-44c2-4bd3-bd7f-10839a575a0d");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (pageParam.getAudit()) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
|
||||
cnd.desc("t.createdAt");
|
||||
cnd.desc("info.applyTime");
|
||||
} else {
|
||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
|
||||
Pagination<NutMap> pagination = difficultHelpCommonService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
}
|
||||
+3
-1
@@ -75,7 +75,9 @@ public class DifficultHelpMineController {
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.subsidyStandards,
|
||||
info.applyTime,
|
||||
LEFT(info.applyTime, 10) AS applyTime,
|
||||
info.applyCount,
|
||||
info.mobile,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
|
||||
+317
-1
@@ -1,13 +1,46 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.MoneyUtil;
|
||||
import com.budwk.app.base.utils.OfficePlusUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.ActivityBudgetVO;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.service.DifficultHelpCommonService;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.client.j2se.MatrixToImageWriter;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -16,11 +49,26 @@ 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.random.R;
|
||||
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.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
@@ -32,6 +80,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
@Ok("json")
|
||||
@ApiOperation("困难补助汇总阅览")
|
||||
@At("/platform/difficultHelp/reading")
|
||||
@Slf4j
|
||||
public class DifficultHelpReadingController {
|
||||
|
||||
@Inject
|
||||
@@ -40,6 +89,10 @@ public class DifficultHelpReadingController {
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private DifficultHelpCommonService difficultHelpCommonService;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
@Inject
|
||||
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||
|
||||
@At("")
|
||||
@SaCheckPermission("difficultHelp.reading")
|
||||
@@ -62,7 +115,9 @@ public class DifficultHelpReadingController {
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.subsidyStandards,
|
||||
info.applyTime,
|
||||
LEFT(info.applyTime, 10) AS applyTime,
|
||||
info.applyCount,
|
||||
info.mobile,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
@@ -104,4 +159,265 @@ public class DifficultHelpReadingController {
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
public void doExportAllApply(DifficultHelpPageParam pageParam, HttpServletResponse response) throws Exception {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.proxyUserName,
|
||||
info.proxyLoginName,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.subsidyStandards,
|
||||
LEFT(info.applyTime, 10) AS applyTime,
|
||||
info.applyCount,
|
||||
info.mobile,
|
||||
info.sex,
|
||||
info.homeIncome,
|
||||
info.homeNumber,
|
||||
info.position,
|
||||
info.officialCapacity,
|
||||
info.homeAddress,
|
||||
info.bankOfDeposit,
|
||||
info.bankCardNum,
|
||||
info.reason,
|
||||
info.applyTime as fullApplyTime,
|
||||
info.familyList
|
||||
FROM
|
||||
difficult_help_info info
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = difficultHelpCommonService.listMap(sql);
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode("申请表汇总.zip", "UTF-8"));
|
||||
|
||||
try (ZipOutputStream zipOutputStream = new ZipOutputStream(response.getOutputStream())) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
NutMap record = list.get(i);
|
||||
|
||||
HashMap<String, Object> docData = new HashMap<>();
|
||||
docData.put("unionName", record.getString("unitName"));
|
||||
docData.put("proxyUserName", record.getString("proxyUserName"));
|
||||
docData.put("sex", record.getString("sex"));
|
||||
docData.put("loginName", record.getString("loginName"));
|
||||
docData.put("unitName", record.getString("unitName"));
|
||||
docData.put("homeIncome", record.getDouble("homeIncome"));
|
||||
docData.put("homeNumber", record.getInt("homeNumber"));
|
||||
docData.put("position", record.getString("position"));
|
||||
docData.put("officialCapacity", record.getString("officialCapacity"));
|
||||
docData.put("mobile", record.getString("mobile"));
|
||||
docData.put("userName", record.getString("userName"));
|
||||
docData.put("homeAddress", record.getString("homeAddress"));
|
||||
docData.put("bankOfDeposit", record.getString("bankOfDeposit"));
|
||||
docData.put("bankCardNum", record.getString("bankCardNum"));
|
||||
docData.put("reason", record.getString("reason"));
|
||||
docData.put("applyTime", DateUtil.format(DateUtil.parse(record.getString("applyTime")), "yyyy年MM月dd日"));
|
||||
docData.put("schoolname", "中国地质大学(武汉)");
|
||||
docData.put("year", DateUtil.format(DateUtil.parse(record.getString("applyTime")), "yyyy"));
|
||||
|
||||
String familyListStr = record.getString("familyList");
|
||||
if (StrUtil.isNotBlank(familyListStr)) {
|
||||
docData.put("familyList", JSONUtil.toList(familyListStr, Object.class));
|
||||
} else {
|
||||
docData.put("familyList", new ArrayList<>());
|
||||
}
|
||||
|
||||
String fileName = (i + 1) + record.getString("userName") + "申请表.docx";
|
||||
zipOutputStream.putNextEntry(new ZipEntry(fileName));
|
||||
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
Configure config = Configure.builder().bind("familyList", policy).build();
|
||||
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("difficulty_apply"), config)
|
||||
.render(docData)
|
||||
.write(zipOutputStream);
|
||||
zipOutputStream.closeEntry();
|
||||
}
|
||||
zipOutputStream.flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
public void doExportApply(String id, HttpServletResponse response, Boolean print) throws Exception {
|
||||
DifficultHelpInfo difficultHelp = difficultHelpCommonService.fetch(id);
|
||||
if (difficultHelp == null) {
|
||||
throw new RuntimeException("该条记录不存在");
|
||||
}
|
||||
HashMap<String, Object> docData = new HashMap<>();
|
||||
|
||||
docData.put("unionName", difficultHelp.getUnitName());
|
||||
docData.put("proxyUserName", difficultHelp.getProxyUserName());
|
||||
docData.put("sex", difficultHelp.getSex());
|
||||
docData.put("loginName", difficultHelp.getLoginName());
|
||||
docData.put("unitName", difficultHelp.getUnitName());
|
||||
docData.put("homeIncome", difficultHelp.getHomeIncome());
|
||||
docData.put("homeNumber", difficultHelp.getHomeNumber());
|
||||
docData.put("position", difficultHelp.getPosition());
|
||||
docData.put("officialCapacity", difficultHelp.getOfficialCapacity());
|
||||
docData.put("mobile", difficultHelp.getMobile());
|
||||
docData.put("userName", difficultHelp.getUserName());
|
||||
docData.put("homeAddress", difficultHelp.getHomeAddress());
|
||||
docData.put("bankOfDeposit", difficultHelp.getBankOfDeposit());
|
||||
docData.put("bankCardNum", difficultHelp.getBankCardNum());
|
||||
docData.put("reason", difficultHelp.getReason());
|
||||
docData.put("applyTime", DateUtil.format(difficultHelp.getApplyTime(), "yyyy-MM-dd"));
|
||||
docData.put("schoolname","中国地质大学(武汉)");
|
||||
docData.put("year",DateUtil.format(difficultHelp.getApplyTime(), "yyyy"));
|
||||
|
||||
docData.put("familyList", difficultHelp.getFamilyList() != null ? difficultHelp.getFamilyList() : new ArrayList<>());
|
||||
|
||||
LoopRowTableRenderPolicy familyPolicy = new LoopRowTableRenderPolicy();
|
||||
Configure config = Configure.builder()
|
||||
.bind("familyList", familyPolicy)
|
||||
.build();
|
||||
|
||||
String templateName= "difficulty_apply";
|
||||
if (print) {
|
||||
exportAsPDF(templateName, docData, config, difficultHelp, response);
|
||||
} else {
|
||||
exportAsWord(templateName, docData, config, difficultHelp,response);
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
private void exportAsPDF(String templateName, HashMap<String, Object> docData,Configure config,
|
||||
DifficultHelpInfo difficultHelp, HttpServletResponse response) throws Exception {
|
||||
String fileName = "中国地质大学(武汉)困难慰问申请表_" + difficultHelp.getUserName() + "_" +
|
||||
DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + ".pdf";
|
||||
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(templateName),config)
|
||||
.render(docData)
|
||||
.writeAndClose(byteArrayOutputStream);
|
||||
byte[] bytes = byteArrayOutputStream.toByteArray();
|
||||
File sourceFile = File.createTempFile("file_convert_origin", ".docx");
|
||||
Files.write(sourceFile.toPath(), bytes, StandardOpenOption.WRITE);
|
||||
|
||||
File pdfFile = File.createTempFile("file_convert", ".pdf");
|
||||
OfficePlusUtil.convert(sourceFile.getPath(), pdfFile.getPath());
|
||||
CommonDownloadUtil.download(fileName, IoUtil.readBytes(FileUtil.getInputStream(pdfFile)), response);
|
||||
// 删除临时文件
|
||||
FileUtil.del(sourceFile);
|
||||
FileUtil.del(pdfFile.toPath());
|
||||
} catch (IOException e) {
|
||||
log.error("困难慰问申请表导出PDF失败,id:{},错误信息:{}", difficultHelp.getId(), e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
private void exportAsWord(String templateName, HashMap<String, Object> docData,Configure config,
|
||||
DifficultHelpInfo difficultHelp, HttpServletResponse response) throws Exception {
|
||||
String fileName = "中国地质大学(武汉)困难慰问申请表_" + difficultHelp.getUserName() + "_" +
|
||||
DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + ".docx";
|
||||
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(templateName),config)
|
||||
.render(docData)
|
||||
.writeAndClose(byteArrayOutputStream);
|
||||
CommonDownloadUtil.download(fileName, byteArrayOutputStream.toByteArray(), response);
|
||||
} catch (IOException e) {
|
||||
log.error("困难慰问申请表导出Word失败,id:{},错误信息:{}", difficultHelp.getId(), e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
public void exportSummary(DifficultHelpPageParam pageParam,String flag,
|
||||
HttpServletResponse response) throws Exception {
|
||||
NutMap result = new NutMap();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.sex,
|
||||
info.idCard,
|
||||
us.age,
|
||||
info.position,
|
||||
info.officialCapacity,
|
||||
concat(info.position, '/', info.officialCapacity) as zwzc,
|
||||
info.unitName,
|
||||
info.mobile,
|
||||
info.reason,
|
||||
info.level,
|
||||
concat(info.homeIncome, '万元') as homeIncome,
|
||||
info.homeNumber,
|
||||
info.subsidyStandards,
|
||||
info.bankOfDeposit,
|
||||
info.bankCardNum,
|
||||
info.applyCount
|
||||
FROM
|
||||
difficult_help_info info
|
||||
LEFT JOIN `vw_user` us ON info.userId = us.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = difficultHelpCommonService.listMap(sql);
|
||||
Sys_user user = sysUserService.fetch(SecurityUtil.getUserId());
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).put("index", (i + 1));
|
||||
}
|
||||
|
||||
result.put("schoolName", "中国地址大学(武汉)");
|
||||
result.put("year", DateUtil.format(new Date(), "yyyy"));
|
||||
result.put("applyTime", DateUtil.format(new Date(), "yyyy年MM月dd日"));
|
||||
result.put("proxyUserName",SecurityUtil.getUserUsername() );
|
||||
result.put("mobile", user.getMobile());
|
||||
result.put("da", list);
|
||||
|
||||
String resource;
|
||||
if ("xlsx".equals(flag)) {
|
||||
resource = "difficulty_summary_xlsx";
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
resource = "difficulty_summary_school_xlsx";
|
||||
}
|
||||
} else {
|
||||
resource = "difficulty_summary";
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
resource = "difficulty_summary_school";
|
||||
}
|
||||
}
|
||||
|
||||
String fileName = "困难慰问汇总表_" + DateUtil.format(new Date(), "yyyyMMdd");
|
||||
|
||||
if ("xlsx".equals(flag)) {
|
||||
try {
|
||||
InputStream is = sysOfficeTemplateUtil.getTemplate(resource);
|
||||
TemplateExportParams exportParams = new TemplateExportParams(is, null);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, result);
|
||||
CommonDownloadUtil.download(fileName + ".xlsx", workbook, response);
|
||||
} catch (Exception e) {
|
||||
log.error("导出Excel汇总表失败", e);
|
||||
throw new RuntimeException("导出Excel汇总表失败:" + e.getMessage());
|
||||
}
|
||||
} else if ("docx".equals(flag)) {
|
||||
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
|
||||
Configure config = Configure.builder()
|
||||
.bind("da", new LoopRowTableRenderPolicy())
|
||||
.build();
|
||||
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(resource), config)
|
||||
.render(result)
|
||||
.writeAndClose(out);
|
||||
CommonDownloadUtil.download(fileName + ".docx", out.toByteArray(), response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+17
-1
@@ -1,12 +1,15 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
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.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.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.service.DifficultHelpCommonService;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -19,7 +22,9 @@ 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.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -72,7 +77,9 @@ public class DifficultHelpSchoolUnionApprovalController {
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.subsidyStandards,
|
||||
info.applyTime,
|
||||
LEFT(info.applyTime, 10) AS applyTime,
|
||||
info.applyCount,
|
||||
info.mobile,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
@@ -122,4 +129,13 @@ public class DifficultHelpSchoolUnionApprovalController {
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("保存补助金额、级别")
|
||||
@SaCheckPermission("difficultHelp.schoolUnionApproval")
|
||||
@SLog(tag = "困难补助申请", msg = "保存申请,填写人: ${args[0].proxyUserName}")
|
||||
public Result save(@Param("data") DifficultHelpInfo difficultHelpInfo) {
|
||||
dao.updateIgnoreNull(difficultHelpInfo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+38
-3
@@ -114,7 +114,12 @@ public class DifficultHelpInfo extends BaseModel {
|
||||
private String idCard;
|
||||
|
||||
@Column
|
||||
@Comment("职务职称")
|
||||
@Comment("职务")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String position;
|
||||
|
||||
@Column
|
||||
@Comment("职称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String officialCapacity;
|
||||
|
||||
@@ -140,7 +145,22 @@ public class DifficultHelpInfo extends BaseModel {
|
||||
private String homeAddress;
|
||||
|
||||
@Column
|
||||
@Comment("补助标准")
|
||||
@Comment("家庭年总收入")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private Double homeIncome;
|
||||
|
||||
@Column
|
||||
@Comment("家庭人数")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private Integer homeNumber;
|
||||
|
||||
@Column
|
||||
@Comment("补助类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String subsidy;
|
||||
|
||||
@Column
|
||||
@Comment("困难类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String subsidyStandards;
|
||||
|
||||
@@ -150,7 +170,7 @@ public class DifficultHelpInfo extends BaseModel {
|
||||
private List<JSONObject> familyList;
|
||||
|
||||
@Column
|
||||
@Comment("申请理由")
|
||||
@Comment("生活致困原因")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String reason;
|
||||
|
||||
@@ -168,4 +188,19 @@ public class DifficultHelpInfo extends BaseModel {
|
||||
@Comment("申请人签字")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String sign;
|
||||
|
||||
@Column
|
||||
@Comment("申请次数")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer applyCount;
|
||||
|
||||
@Column
|
||||
@Comment("补助金额")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private Double money;
|
||||
|
||||
@Column
|
||||
@Comment("补助级别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String level;
|
||||
}
|
||||
|
||||
+7
-1
@@ -73,10 +73,16 @@ public class AidFundApplyController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/apply/index.html")
|
||||
@SaCheckPermission("h5.medicalMutualAid.aidFund.apply")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("查询申请状态")
|
||||
@SaCheckPermission("medicalMutualAid.aidFund.apply")
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.apply", "h5.medicalMutualAid.aidFund.apply"}, mode = SaMode.OR)
|
||||
public Result canApply() {
|
||||
String aidFundMemberApplyEndTime = Globals.MyConfig.getString("AidFundMemberApplyEndTime");
|
||||
if (StrUtil.isBlank(aidFundMemberApplyEndTime)) {
|
||||
|
||||
+6
@@ -63,6 +63,12 @@ public class AidFundApplyMineController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/applyMine/index.html")
|
||||
@SaCheckPermission("h5.medicalMutualAid.aidFund.applyMine")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.applyMine", "h5.medicalMutualAid.aidFund.applyMine"}, mode = SaMode.OR)
|
||||
|
||||
+8
-1
@@ -9,6 +9,7 @@ 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.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberChangeRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -51,6 +52,12 @@ public class AidFundFoundationAuditController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html")
|
||||
@SaCheckPermission("h5.medicalMutualAid.aidFund.foundationAudit")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.foundationAudit", "h5.medicalMutualAid.aidFund.foundationAudit"}, mode = SaMode.OR)
|
||||
@@ -112,7 +119,7 @@ public class AidFundFoundationAuditController {
|
||||
cnd.andEX("info.changeType", "=", changeType);
|
||||
|
||||
cnd.and("t.taskName", "=", "85c7d148-44f5-4333-b854-ab225357fd3e");
|
||||
// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
|
||||
+41
-7
@@ -77,7 +77,7 @@ public class AidFundManageController {
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
public Result pageData(AidFundPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -130,7 +130,7 @@ public class AidFundManageController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
@Ok("void")
|
||||
@ApiOperation("导出本年新进会员")
|
||||
public void exportNewMember(HttpServletResponse response) {
|
||||
@@ -166,7 +166,7 @@ public class AidFundManageController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
@ApiOperation("生成缴费名单")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基金会员-基金会员台账", msg = "生成缴费名单")
|
||||
@@ -177,7 +177,7 @@ public class AidFundManageController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
@SLog(tag = "基金会员-基金会员台账", msg = "备份基金会员")
|
||||
@ApiOperation("备份基金会员")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@@ -189,7 +189,7 @@ public class AidFundManageController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
@SLog(tag = "基金会员-基金会员台账", msg = "批量设置退会")
|
||||
@ApiOperation("批量设置退会")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@@ -213,7 +213,7 @@ public class AidFundManageController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
@SLog(tag = "基金会员-基金会员台账", msg = "修改基金会员类型")
|
||||
@ApiOperation("修改基金会员类型")
|
||||
public Result doEditAidFundMemberUserType(String userId, String aidFundMemberUserType) {
|
||||
@@ -222,7 +222,7 @@ public class AidFundManageController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
@SLog(tag = "基金会员-基金会员台账", msg = "更改基金会员状态")
|
||||
@ApiOperation("更改基金会员状态")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@@ -239,4 +239,38 @@ public class AidFundManageController {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
public Result findOne(String userId){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
us.username,
|
||||
us.loginname,
|
||||
us.mobile,
|
||||
us.aidFundMemberUserType,
|
||||
us.aidFundDeductTime,
|
||||
us.arrivalAtSchoolDate,
|
||||
us.sex,
|
||||
us.unitName,
|
||||
us.unionName
|
||||
FROM
|
||||
vw_user us
|
||||
WHERE
|
||||
us.id = '%s'
|
||||
""".formatted(userId));
|
||||
View_user user = userService.fetchVO(sql, View_user.class);
|
||||
return Result.success(user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR)
|
||||
public Result findChangeRecordList(String userId){
|
||||
|
||||
List<NutMap> changeRecordList = aidFundMemberService.findChangeRecordList(userId);
|
||||
return Result.success(changeRecordList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -46,6 +46,11 @@ public class AidFundRetirementAuditController {
|
||||
@SaCheckPermission("medicalMutualAid.aidFund.retirementAudit")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/retirementAudit/index.html")
|
||||
@SaCheckPermission("h5.medicalMutualAid.aidFund.retirementAudit")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
|
||||
+6
@@ -48,6 +48,12 @@ public class AidFundUnionAuditController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/unionAudit/index.html")
|
||||
@SaCheckPermission("h5.medicalMutualAid.aidFund.unionAudit")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
|
||||
+6
@@ -2,6 +2,9 @@ package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AidFundMemberService extends BaseService {
|
||||
|
||||
@@ -26,4 +29,7 @@ public interface AidFundMemberService extends BaseService {
|
||||
* @return
|
||||
*/
|
||||
Double getPayMoney(Sys_user user, Integer year);
|
||||
|
||||
|
||||
List<NutMap> findChangeRecordList(String userId);
|
||||
}
|
||||
|
||||
+51
@@ -11,8 +11,12 @@ import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMem
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberService;
|
||||
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.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
@@ -117,5 +121,52 @@ public class AidFundMemberServiceImpl extends BaseServiceImpl implements AidFund
|
||||
return (year + 1 - beforeYear) * money + (year - beforeYear) * money * 0.1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NutMap> findChangeRecordList(String userId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
us.sex,
|
||||
us.username,
|
||||
us.loginname,
|
||||
us.arrivalAtSchoolDate,
|
||||
us.mobile,
|
||||
us.unitName,
|
||||
us.unionName,
|
||||
us.aidFundMemberUserType,
|
||||
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' AND taskState in (10,20)) AS startTaskId
|
||||
FROM
|
||||
`aid_fund_member_change_record` info
|
||||
LEFT JOIN vw_user us ON us.id = info.userId
|
||||
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();
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.or("ins.state", "=", 20);
|
||||
group.or("ins.state", "is", null);
|
||||
cnd.and(group);
|
||||
cnd.and("info.userId", "=", userId);
|
||||
sql.setCondition(cnd);
|
||||
return listMap(sql);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -99,30 +99,31 @@ module.exports = {
|
||||
},
|
||||
methods: {
|
||||
async isMaleFemale() {
|
||||
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableColumns2 = []
|
||||
this.tableColumns3 = []
|
||||
this.tableColumns4 = []
|
||||
this.tableColumns5 = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/isMaleFemale", this.Form)
|
||||
data.eventList.forEach(v => {
|
||||
if (v.baname == "甲组" || v.baname == "乙组" || v.baname == "丙组" || v.baname == "丁组") {
|
||||
this.tableColumns.push({label: v.isMenWomen ? v.label.substr(4) : v.label.substr(2), prop: v.label})
|
||||
} else {
|
||||
|
||||
this.tableColumns5.push({label: v.label, prop: v.label})
|
||||
|
||||
try {
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/isMaleFemale", this.Form)
|
||||
data.eventList.forEach(v => {
|
||||
if (v.baname == "甲组" || v.baname == "乙组" || v.baname == "丙组" || v.baname == "丁组") {
|
||||
this.tableColumns.push({label: v.isMenWomen ? v.label.substr(4) : v.label.substr(2), prop: v.label})
|
||||
} else {
|
||||
this.tableColumns5.push({label: v.label, prop: v.label})
|
||||
}
|
||||
})
|
||||
this.tableData = data.score.sort(this.compare("totalScore"))
|
||||
if (this.Form.unionname) {
|
||||
this.tableData = this.tableData.filter(v => v.unionname == this.Form.unionname)
|
||||
}
|
||||
})
|
||||
|
||||
this.tableData = data.score.sort(this.compare("totalScore"))
|
||||
if (this.Form.unionname) {
|
||||
this.tableData = this.tableData.filter(v => v.unionname == this.Form.unionname)
|
||||
}catch ( e){
|
||||
this.$message.error(e.msg)
|
||||
}finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
compare(prop) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<el-table :data="tableData" style="width: 100%;height: 100%" stripe border
|
||||
ref="MaleFemaleTab"
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed >
|
||||
<!--:max-height="maxHeight"-->
|
||||
v-loading="tableLoading" size="mini" fixed>
|
||||
<!--:max-height="maxHeight"-->
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionname" header-align="center"
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-table-column label="总分" prop="totalScore" header-align="center"
|
||||
align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="名次"
|
||||
width="80px" ></el-table-column>
|
||||
width="80px"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
@@ -41,12 +41,18 @@ module.exports = {
|
||||
methods: {
|
||||
async isScoreTopEight() {
|
||||
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form)
|
||||
const table = data.score.sort(this.compare("totalScore"))
|
||||
this.tableData = table.slice(0, 8)
|
||||
|
||||
try {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form)
|
||||
const table = data.score.sort(this.compare("totalScore"))
|
||||
this.tableData = table.slice(0, 8)
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-loading="tableLoading">
|
||||
<!-- <el-table :data="tableData" style="width: 100%" stripe border
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini">
|
||||
@@ -62,27 +62,27 @@ module.exports = {
|
||||
}).toString()
|
||||
},
|
||||
async isTopEight() {
|
||||
var loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据正在查询中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isTopEight", this.Form)
|
||||
data.eventList.map(v => {
|
||||
v.sss = []
|
||||
data.userList.map(x => {
|
||||
if (v.label === x.allname) {
|
||||
console.log(x)
|
||||
v.sss.push(x)
|
||||
}
|
||||
try {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isTopEight", this.Form)
|
||||
data.eventList.map(v => {
|
||||
v.sss = []
|
||||
data.userList.map(x => {
|
||||
if (v.label === x.allname) {
|
||||
console.log(x)
|
||||
v.sss.push(x)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
this.tableData = data.eventList
|
||||
loading.close();
|
||||
this.tableData = data.eventList
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<slot></slot>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search', null)">搜索</el-button>
|
||||
</div>
|
||||
<div class="search">
|
||||
<slot></slot>
|
||||
<div class="search-query" v-if="isSearchButton">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search', null)">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "pageFormSearch"
|
||||
name: "pageFormSearch",
|
||||
props: {
|
||||
isSearchButton: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,486 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div class="platform" id="app" v-cloak>
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch" :is-search-button="false">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="getActivitys"
|
||||
placeholder="选择年"
|
||||
style="width: 100%" type="year"
|
||||
v-model="pageForm.year" value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称" v-if="!pageForm.status">
|
||||
<el-select :clearable="false" @change="actChange(pageForm.activityId)"
|
||||
filterable
|
||||
placeholder="请选择活动名称"
|
||||
style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in activityList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称" v-if="!pageForm.status">
|
||||
<el-select :clearable="false" @change="unionChange(pageForm.unionId)"
|
||||
filterable
|
||||
placeholder="请选择工会"
|
||||
style="width: 100%" v-model="pageForm.unionId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in unionList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="性别" v-if="pageForm.status==='1'||!pageForm.status">
|
||||
<el-select filterable
|
||||
placeholder="请选择性别"
|
||||
style="width: 100%" v-model="pageForm.sex">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool
|
||||
:label="pageForm.status==='2'?('中国地质大学(武汉)'+pageForm.year+'年教职工运动会获奖个数汇总表'):'奖品名单'">
|
||||
<el-tag
|
||||
:effect="pageForm.status===item.code?'dark':'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="statusType(item.code)"
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in statusOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
<el-button @click="print" icon="el-icon-printer" type="primary" size="small">打 印</el-button>
|
||||
</table-tool>
|
||||
|
||||
|
||||
<div id=print>
|
||||
<template v-if="pageForm.activityId!=null">
|
||||
<table class="table table-bordered" v-if="isSummary==1" v-loading="tableLoading">
|
||||
<tr>
|
||||
<td class="text-center" colspan="11">
|
||||
<span v-if="activityList.find(v=>v.id === pageForm.activityId)">
|
||||
中国地质大学(武汉){{ activityList.find(v=>v.id === pageForm.activityId).name }}
|
||||
({{unionName}})获奖名单
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>项目</td>
|
||||
<td v-for="i in 8">
|
||||
第{{i}}名
|
||||
</td>
|
||||
<td>备注</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['团体项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['团体项目']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">团体项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span v-if="o.filter(f=>f.ranking==i && f.numberOfPeople!=null) && o.filter(f=>f.ranking==i && f.numberOfPeople!=null).length>0">
|
||||
{{o.filter(f=>f.ranking==i && f.numberOfPeople!=null).map(g=>g.numberOfPeople).reduce((a,b)=>a+b)}}
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['男子项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['男子项目']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">男子项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
{{o.filter(f=>f.ranking==i).map(g=>g.username).join('、')}}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['女子项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['女子项目']).length" dd
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">女子项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
{{o.filter(f=>f.ranking==i).map(g=>g.username).join('、')}}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合计</td>
|
||||
<td></td>
|
||||
<td v-for="i in 9">
|
||||
{{lastSum[i]}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<el-table :data="tableData" :header-cell-style="{background:'#FAFAFA'}"
|
||||
@sort-change="pageOrder"
|
||||
border row-key="id"
|
||||
show-summary
|
||||
size="mini" stripe style="width: 100%"
|
||||
v-if="isSummary==2" v-loading="tableLoading">
|
||||
|
||||
|
||||
<el-table-column :index="indexMethod" align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip
|
||||
v-for="column in summaryColumns"
|
||||
v-if="isSummary==2">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="签字"
|
||||
show-overflow-tooltip
|
||||
v-if="isSummary==2"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
<template v-else>
|
||||
<table class="table table-bordered" v-if="isSummary==3">
|
||||
<tr>
|
||||
<td class="text-center" colspan="11">
|
||||
{{pageForm.year}}田径运动会教工{{pageForm.sex}}子甲、乙、丙、丁、前八名记录表
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<div style="display: flex;justify-content: center;">项目</div>
|
||||
</td>
|
||||
<td v-for="i in 8">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
第{{i}}名
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['甲组']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['甲组']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">甲组
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'甲组')}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['乙组']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['乙组']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">乙组
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'乙组')}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['丙组']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['丙组']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">丙组
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'丙组')}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['丁组']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['丁组']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">丁组
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'丁组')}}
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['集体项目']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['集体项目']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">集体项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'集体项目')}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</div>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
isSummary: 1,
|
||||
activityList: [],
|
||||
unionList: [],
|
||||
unionName: "",
|
||||
pageForm: {
|
||||
activityId: "",
|
||||
unionId: "",
|
||||
status: null,
|
||||
sex: null,
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
summaryColumns: [
|
||||
{prop: 'unionname', label: '分工会'},
|
||||
{prop: 'one', label: '第一名'},
|
||||
{prop: 'two', label: '第二名'},
|
||||
{prop: 'three', label: '第三名'},
|
||||
{prop: 'four', label: '第四名'},
|
||||
{prop: 'fives', label: '第五名'},
|
||||
{prop: 'six', label: '第六名'},
|
||||
{prop: 'seven', label: '第七名'},
|
||||
{prop: 'eight', label: '第八名'},
|
||||
{prop: 'totalPeople', label: '合计'},
|
||||
],
|
||||
tableDataUnionPrize: {},
|
||||
lastSum: {},
|
||||
tableDataPrize: [],
|
||||
|
||||
statusOptions: [{code: "1", name: "分组汇总年度前八"}, {code: "2", name: "奖品个数年度汇总表"}]
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
async statusType(state) {
|
||||
this.tableLoading = true
|
||||
if (state === "1") {
|
||||
const data = await this.summaryYearPrizes()
|
||||
if (!data) {
|
||||
this.tableLoading = false
|
||||
return
|
||||
}
|
||||
} else if (state === "2") {
|
||||
this.pageForm.sex = null
|
||||
await this.summary()
|
||||
}
|
||||
|
||||
if (this.pageForm.status === state) {
|
||||
this.pageForm.status = null
|
||||
this.pageForm.sex = null
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
this.pageForm.unionId = this.unionList[0].id
|
||||
this.unionChange(this.unionList[0].id)
|
||||
} else {
|
||||
this.pageForm.status = state
|
||||
}
|
||||
this.tableLoading = false
|
||||
|
||||
},
|
||||
getSummaryByYear(o, i, type) {
|
||||
if (type === "集体项目") {
|
||||
const datas = o.filter(o => o.ranking === i).map(o => o.unionname)
|
||||
if (datas) {
|
||||
return datas.join(",")
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
} else {
|
||||
//甲组里面有可能有团体项目,所以说如果这个没有username就代表是团体
|
||||
return o.filter(f => f.ranking === i).map(g => g.username ? g.username : g.unionname).join('、')
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async summaryYearPrizes() {
|
||||
try {
|
||||
if (!this.pageForm.sex) {
|
||||
this.$message.warning("请选择性别")
|
||||
return false
|
||||
}
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.isSummary = 3
|
||||
const {data} = await this.$axios.post(loc() + "/getSummaryYearPrizes", this.pageForm)
|
||||
this.tableDataPrize = data
|
||||
return true
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
getTableTdContent(d, i) {
|
||||
return d.filter(v => {
|
||||
if (v.isteampersonal === 1) {
|
||||
if (v.ranking == i) {
|
||||
console.log(v, i)
|
||||
return v.username
|
||||
}
|
||||
} else {
|
||||
if (v.ranking == i) {
|
||||
return v.numberofpeople
|
||||
}
|
||||
}
|
||||
}).map(v => {
|
||||
return v.isteampersonal === 1 ? v.username : v.numberofpeople
|
||||
}).toString()
|
||||
},
|
||||
|
||||
async summary() {
|
||||
try {
|
||||
if (this.activityList.length === 0) {
|
||||
return
|
||||
}
|
||||
if (!this.pageForm.activityId) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
}
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
this.isSummary = 2
|
||||
this.tableData = []
|
||||
|
||||
const {data} = await this.$axios.post(loc() + "/summary", this.pageForm)
|
||||
this.$set(this, "tableData", data.score)
|
||||
this.unionName = "汇总"
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
}
|
||||
|
||||
},
|
||||
print() {
|
||||
let subOutputRankPrint = document.getElementById('print');
|
||||
let newContent = subOutputRankPrint.innerHTML;
|
||||
let oldContent = document.body.innerHTML;
|
||||
document.body.innerHTML = newContent;
|
||||
window.print();
|
||||
window.location.reload();
|
||||
document.body.innerHTML = oldContent;
|
||||
return false;
|
||||
},
|
||||
actChange(activityId) {
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
this.pageForm.activityId = ""
|
||||
const activityData = this.activityList.find(v => v.id == activityId)
|
||||
this.pageForm.activityId = activityData.id
|
||||
this.getPrizes()
|
||||
},
|
||||
unionChange(unionId) {
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
this.pageForm.unionId = ""
|
||||
this.isSummary = 1
|
||||
const unionData = this.unionList.find(v => v.id == unionId)
|
||||
this.pageForm.unionId = unionData.id
|
||||
this.unionName = unionData.name
|
||||
this.getPrizes()
|
||||
},
|
||||
async getActivitys() {
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year})
|
||||
this.pageForm.activityId = ""
|
||||
this.activityList = data
|
||||
if (data && data.length > 0) {
|
||||
this.pageForm.activityId = data[0].id
|
||||
}
|
||||
await this.getPrizes()
|
||||
|
||||
},
|
||||
async getPrizes() {
|
||||
try {
|
||||
this.tableLoading = true
|
||||
const {data} = await this.$axios.post(loc() + "/getPrizes", this.pageForm)
|
||||
this.tableDataUnionPrize = data
|
||||
const lastSum = {}
|
||||
for (let i = 1; i <= 8; i++) {
|
||||
let sum = 0
|
||||
if (!$.isEmptyObject(data['男子项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['男子项目']) {
|
||||
xm = xm.concat(data['男子项目'][key])
|
||||
}
|
||||
sum += xm.filter(v => v.ranking === i).length
|
||||
}
|
||||
if (!$.isEmptyObject(data['女子项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['女子项目']) {
|
||||
xm = xm.concat(data['女子项目'][key])
|
||||
}
|
||||
sum += xm.filter(v => v.ranking === i).length
|
||||
}
|
||||
if (!$.isEmptyObject(data['团体项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['团体项目']) {
|
||||
xm = xm.concat(data['团体项目'][key])
|
||||
}
|
||||
const teams = xm.filter(v => v.ranking === i).map(v => Number(v.numberOfPeople))
|
||||
if (teams && teams.length > 0) {
|
||||
sum += teams.reduce((a, b) => a + b)
|
||||
}
|
||||
}
|
||||
lastSum[i] = sum
|
||||
}
|
||||
|
||||
lastSum[9] = Object.values(lastSum).reduce((a, b) => a + b)
|
||||
this.lastSum = lastSum
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getActivitys()
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
if (this.unionList.length > 0) {
|
||||
this.pageForm.unionId = this.unionList[0].id
|
||||
this.unionName = this.unionList[0].unionname
|
||||
}
|
||||
await this.getPrizes()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -423,7 +423,7 @@ layout("/layouts/platform.html"){
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
|
||||
+244
-197
@@ -39,69 +39,75 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava"
|
||||
style="width: 100%;min-height: 100%;background-color: #f0f2f5;padding: 20px;box-sizing: border-box;">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch" :is-search-button="false">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="getActivitys"
|
||||
placeholder="选择年"
|
||||
type="year"
|
||||
v-model="pageForm.year" value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称" v-if="!pageForm.status">
|
||||
<el-select :clearable="false" @change="activityChange" filterable
|
||||
placeholder="请选择活动名称" style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in activityList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会" v-if="isUnion">
|
||||
<el-select @change="unionChange(pageForm.unionId)" clearable filterable placeholder="请选择工会"
|
||||
style="width: 100%" v-model="pageForm.unionname">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
v-for="item in unionList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item>
|
||||
<el-button @click="doExcelCj" icon="el-icon-printer" type="primary">导出成绩excel
|
||||
</el-button>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<div style="max-height: 250px">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="getActivitys"
|
||||
placeholder="选择年"
|
||||
type="year"
|
||||
v-model="pageForm.year" value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称">
|
||||
<el-select :clearable="false" @change="activityChange" filterable
|
||||
placeholder="请选择活动名称" style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in activityList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="unionChange(pageForm.unionId)" clearable filterable
|
||||
placeholder="请选择工会"
|
||||
style="width: 100%" v-model="pageForm.name">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
v-for="item in unionList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
|
||||
|
||||
<!-- <div class="pull-right offscreen-right">
|
||||
<el-button @click="getYear8(1)" icon="el-icon-search" type="primary">年度男子团体总分
|
||||
</el-button>
|
||||
<el-button @click="getYear8(2)" icon="el-icon-search" type="primary">年度女子团体总分
|
||||
</el-button>
|
||||
<el-button @click="annualResults" icon="el-icon-search" type="primary">年度团体总分</el-button>
|
||||
<el-button @click="doExcelCj" class="mr10" icon="el-icon-printer" type="primary">导出成绩excel
|
||||
</el-button>
|
||||
</div>-->
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" style="margin-top: 10px">
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">按活动统计:</el-col>
|
||||
<el-col class="query-row-title">按年度统计:</el-col>
|
||||
<el-col class="query-row-content" v-if="isSearchOptions">
|
||||
<el-button
|
||||
style="margin-left: 10px"
|
||||
size="medium"
|
||||
v-for="item in searchOptions"
|
||||
<el-tag
|
||||
:effect="pageForm.status===item.code?'dark':'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="statusType(item.code)"
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in statusOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">运动会成绩统计:</el-col>
|
||||
<el-col class="query-row-content" v-if="isSearchOptions">
|
||||
<el-tag
|
||||
:effect="pageForm.status2===item.id?'dark':'plain'"
|
||||
:key="item.id"
|
||||
:type="item.name" @click="searchClick(item.id)">{{item.name}}
|
||||
</el-button>
|
||||
:type="item.name"
|
||||
@click="status2Type(item.id)"
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in searchOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
<el-col class="query-row-content" v-else>
|
||||
<el-button style="margin-left: 10px"
|
||||
@@ -111,77 +117,70 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<div class="pull-right offscreen-right" style="margin-left: auto">
|
||||
<!--
|
||||
<el-button type="primary" icon="el-icon-printer" @click="doExport8ByActivity"
|
||||
v-if="[11,12].includes(isSearchOptions)&&pageForm.activityId">导出
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" @click="doGetYear8" v-else-if="isYear8">导出
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" @click="print" v-else>打 印</el-button>-->
|
||||
<el-button @click="doExportByActivityStatisticsType" icon="el-icon-printer" type="primary">
|
||||
导出
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
<div id=print ref="print">
|
||||
<el-card shadow="never" class="mt10"
|
||||
v-show="[1,2,3,4,5,9,10].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==1" label="男子单项成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==2" label="女子单项成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==3" label="男子团体成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==4" label="女子团体成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==5" label="男女混合类成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==9&&isSearch" label="分工会男子项目积分"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==9&&!isSearch" label="分工会项目成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==10" label="分工会女子项目积分"></table-tool>
|
||||
<is-male-female :form="pageForm" ref="female"></is-male-female>
|
||||
<el-card shadow="never" class="mt10"
|
||||
v-show="[1,2,3,4,5,9,10].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==1" label="男子单项成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==2" label="女子单项成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==3" label="男子团体成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==4" label="女子团体成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==5" label="男女混合类成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==9&&isSearch" label="男子项目分工会积分"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==9&&!isSearch" label="分工会项目成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==10" label="女子项目分工会积分"></table-tool>
|
||||
<is-male-female :form="pageForm" ref="female"></is-male-female>
|
||||
|
||||
</el-card>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[6,7,8].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==6" label="男子项目前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==7" label="女子项目前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==8" label="综合类前八"></table-tool>
|
||||
<el-row>
|
||||
<top-eight :form="pageForm" ref="doeight"></top-eight>
|
||||
</el-row>
|
||||
<el-card shadow="never" class="mt10" v-show="[6,7,8].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==6" label="男子项目前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==7" label="女子项目前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==8" label="综合类前八"></table-tool>
|
||||
<el-row>
|
||||
<top-eight :form="pageForm" ref="doeight"></top-eight>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[11,12].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==11" label="分工会男子总分前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==12" label="分工会女子总分前八"></table-tool>
|
||||
<score-top-eight :form="pageForm" ref="doTopEight"></score-top-eight>
|
||||
<el-card shadow="never" class="mt10" v-show="[11,12].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==11" label="男子总分前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==12" label="女子总分前八"></table-tool>
|
||||
<score-top-eight :form="pageForm" ref="doTopEight"></score-top-eight>
|
||||
|
||||
</el-card>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[99].includes(isSearchOptions)">
|
||||
<table-tool v-if="isSearchOptions==99" label="全年成绩"></table-tool>
|
||||
<el-table :data="annualResultsTableData" style="width: 100%;height: 100%" stripe border
|
||||
show-summary
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed ref="annualResults"
|
||||
>
|
||||
<el-card shadow="never" class="mt10" v-show="[99].includes(isSearchOptions)">
|
||||
<table-tool v-if="isSearchOptions==99" label="全年成绩"></table-tool>
|
||||
<el-table :data="annualResultsTableData" style="width: 100%;height: 100%" stripe border
|
||||
show-summary
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed ref="annualResults"
|
||||
>
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
label="名次"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in annualTableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
label="名次"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in annualTableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
@@ -189,7 +188,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
|
||||
<script>
|
||||
<script nonce="${cspNonce!}">
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
@@ -218,24 +217,31 @@ layout("/layouts/platform.html"){
|
||||
{id: 3, name: "男子团体"},
|
||||
{id: 4, name: "女子团体"},
|
||||
{id: 5, name: "男女混合类"},*/
|
||||
{id: 9, name: "分工会男子项目积分"},
|
||||
{id: 10, name: "分工会女子项目积分"},
|
||||
{id: 6, name: "男子项目前八"},
|
||||
{id: 7, name: "女子项目前八"},
|
||||
{id: 8, name: "团体前八"},
|
||||
{id: 9, name: "男子项目分工会积分"},
|
||||
{id: 10, name: "女子项目分工会积分"},
|
||||
{id: 6, name: "男子单项前八"},
|
||||
{id: 7, name: "女子单项前八"},
|
||||
{id: 8, name: "团体项目前八"},
|
||||
|
||||
{id: 11, name: "分工会男子总分前八"},
|
||||
{id: 12, name: "分工会女子总分前八"},
|
||||
{id: 11, name: "男子总分前八"},
|
||||
{id: 12, name: "女子总分前八"},
|
||||
|
||||
],
|
||||
isSearchOptions: 9,
|
||||
pageForm: {
|
||||
status2: 9,
|
||||
status: '',
|
||||
unionname: '',
|
||||
activityId: "",
|
||||
personTypes: [],
|
||||
year: new Date().getFullYear() + "",
|
||||
},
|
||||
activityStatisticsType: 0//统计类型说明:1 年度男子团体总分2.年度女子团体总分3.年度团体总分4.分工会男子项目积分5.分工会女子项目积分,依次后推
|
||||
activityStatisticsType: 0,//统计类型说明:1 年度男子团体总分2.年度女子团体总分3.年度团体总分4.分工会男子项目积分5.分工会女子项目积分,依次后推
|
||||
statusOptions: [
|
||||
{code: "1", name: "年度男子团体总分"},
|
||||
{code: "2", name: "年度女子团体总分"},
|
||||
{code: "3", name: "年度团体总分"}
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -244,29 +250,55 @@ layout("/layouts/platform.html"){
|
||||
'score-top-eight': httpVueLoader('/components/module/activity/score/scoreTopEight.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async status2Type(id) {
|
||||
if (this.pageForm.status2 === id) {
|
||||
this.$set(this.pageForm, "status2", 9)
|
||||
this.$set(this.pageForm, "sex", "男")
|
||||
this.$set(this.pageForm, "activityId", this.activityList[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "status2", id)
|
||||
}
|
||||
this.searchClick(id)
|
||||
},
|
||||
async statusType(state) {
|
||||
if (state === "1") {
|
||||
await this.getYear8(1)
|
||||
} else if (state === "2") {
|
||||
await this.getYear8(2)
|
||||
} else if (state === "3") {
|
||||
await this.annualResults()
|
||||
}
|
||||
|
||||
if (this.pageForm.status === state) {
|
||||
this.$set(this.pageForm, "status", null)
|
||||
this.$set(this.pageForm, "activityId", this.activityList[0].id)
|
||||
this.activityChange()
|
||||
this.$set(this.pageForm, "status2", 9)
|
||||
} else {
|
||||
this.$set(this.pageForm, "status", state)
|
||||
this.$set(this.pageForm, "status2", '')
|
||||
|
||||
}
|
||||
},
|
||||
async doExportByActivityStatisticsType() {
|
||||
const {activityId, year} = this.pageForm
|
||||
const url = "/platform/activity/statistics/export"
|
||||
if (this.activityStatisticsType === 1 || this.activityStatisticsType === 2) {
|
||||
window.open(url + "/getYear8?year=" + year + "&isMenWomen=" + this.isMenWomen)
|
||||
this.$downLoad(url + "/getYear8", {year: year, isMenWomen: this.isMenWomen})
|
||||
} else if (this.activityStatisticsType === 3) {
|
||||
window.open(url + "/getAnnualResults?year=" + year)
|
||||
this.$downLoad(url + "/getAnnualResults", {year})
|
||||
} else if (this.activityStatisticsType === 4 || this.activityStatisticsType === 5) {
|
||||
let sex = this.activityStatisticsType === 4 ? "男性" : "女性"
|
||||
window.open(url + "/isMaleFemale?activityId=" + activityId + "&sex=" + sex + "&awardsMode=4")
|
||||
let sex = this.activityStatisticsType === 4 ? "男" : "女"
|
||||
this.$downLoad(url + "/isMaleFemale", {activityId: activityId, sex: sex, awardsMode: 4})
|
||||
} else if (this.activityStatisticsType === 6 || this.activityStatisticsType === 7 || this.activityStatisticsType === 8) {
|
||||
let sex = this.activityStatisticsType === 6 ? "男性" : "女性"
|
||||
let sex = this.activityStatisticsType === 6 ? "男" : "女"
|
||||
let awardsMode = this.activityStatisticsType === 8 ? 2 : 1
|
||||
window.open(url + "/isTopEight?activityId=" + activityId + "&sex=" + sex + "&awardsMode=" + awardsMode)
|
||||
this.$downLoad(url + "/isTopEight", {activityId: activityId, sex: sex, awardsMode: awardsMode})
|
||||
} else if (this.activityStatisticsType === 9 || this.activityStatisticsType === 10) {
|
||||
let sex = this.activityStatisticsType === 9 ? "男性" : "女性"
|
||||
window.open(url + "/isScoreTopEight?activityId=" + activityId + "&sex=" + sex)
|
||||
let sex = this.activityStatisticsType === 9 ? "男" : "女"
|
||||
this.$downLoad(url + "/isScoreTopEight", {activityId: activityId, sex: sex})
|
||||
}
|
||||
},
|
||||
doExport8ByActivity() {
|
||||
window.open(loc() + "/doExport8ByActivity?activityId=" + this.pageForm.activityId + "&isMenWomen=" + (this.isSearchOptions === 11 ? 1 : 2))
|
||||
|
||||
},
|
||||
doExcelCj() {
|
||||
const {activityId, unionname} = this.pageForm
|
||||
let unionId = ''
|
||||
@@ -274,21 +306,11 @@ layout("/layouts/platform.html"){
|
||||
const unionlist = clone(this.unionList)
|
||||
unionId = unionlist.find(v => v.unionname === unionname).id
|
||||
}
|
||||
window.open(loc() + "/doExcelCj?activityId=" + activityId + "&unionId=" + unionId)
|
||||
|
||||
},
|
||||
print() {
|
||||
let subOutputRankPrint = document.getElementById('print');
|
||||
let newContent = subOutputRankPrint.innerHTML;
|
||||
let oldContent = document.body.innerHTML;
|
||||
document.body.innerHTML = newContent;
|
||||
window.print();
|
||||
window.location.reload();
|
||||
document.body.innerHTML = oldContent;
|
||||
return false;
|
||||
this.$downLoad(loc() + "/doExcelCj", {activityId: activityId, unionId: unionId})
|
||||
|
||||
},
|
||||
activityChange() {
|
||||
this.$set(this.pageForm, "yearDoSearch", null)
|
||||
const aa = this.activityList.find(v => v.id == this.pageForm.activityId)
|
||||
if (aa.applyType == 1) {
|
||||
this.isSearch = false
|
||||
@@ -302,6 +324,10 @@ layout("/layouts/platform.html"){
|
||||
this.searchClick(9)
|
||||
},
|
||||
searchClick(id) {
|
||||
this.$set(this.pageForm, "status", null)
|
||||
if (!this.pageForm.activityId) {
|
||||
this.$set(this.pageForm, "activityId", this.activityList[0].id)
|
||||
}
|
||||
if (id === 9) {
|
||||
this.activityStatisticsType = 4
|
||||
} else if (id === 10) {
|
||||
@@ -322,16 +348,16 @@ layout("/layouts/platform.html"){
|
||||
if (id == 1 || id == 2) {
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.pageForm.sex = id == 1 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 1 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 1
|
||||
} else if (id == 3 || id == 4) {
|
||||
this.isUnion = false
|
||||
this.isUnionisYear8 = false
|
||||
this.pageForm.sex = id == 3 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 3 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 2
|
||||
} else if (id == 9 || id == 10) {
|
||||
this.isUnion = true
|
||||
this.pageForm.sex = id == 9 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 9 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 4
|
||||
} else {
|
||||
this.pageForm.awardsMode = 3
|
||||
@@ -341,76 +367,97 @@ layout("/layouts/platform.html"){
|
||||
if (id == 6 || id == 7) {
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.pageForm.sex = id == 6 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 6 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 1
|
||||
} else if (id == 8) {
|
||||
this.pageForm.awardsMode = 2
|
||||
}
|
||||
this.$refs.doeight.isTopEight()
|
||||
} else if (id == 11 || id == 12) {
|
||||
this.pageForm.sex = id == 11 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 11 ? "男" : "女"
|
||||
this.$refs.doTopEight.isScoreTopEight()
|
||||
}
|
||||
},
|
||||
async doGetYear8() {
|
||||
location.href = loc() + "/doGetYear8?year=" + this.pageForm.year + "&isMenWomen=" + this.isMenWomen
|
||||
},
|
||||
async getYear8(isMenWomen) {
|
||||
this.activityStatisticsType = isMenWomen
|
||||
this.isMenWomen = isMenWomen
|
||||
this.isUnion = false
|
||||
this.isYear8 = true
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
try {
|
||||
this.activityStatisticsType = isMenWomen
|
||||
this.isMenWomen = isMenWomen
|
||||
this.isUnion = false
|
||||
this.isYear8 = true
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
this.tableLoading = true
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await this.$axios.post(loc() + "/getYear8", {
|
||||
year: this.pageForm.year,
|
||||
isMenWomen: isMenWomen
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await this.$axios.post(loc() + "/getYear8", {
|
||||
year: this.pageForm.year,
|
||||
isMenWomen: isMenWomen
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
this.$message().error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
},
|
||||
|
||||
async annualResults() {
|
||||
this.activityStatisticsType = 3
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
try {
|
||||
this.activityStatisticsType = 3
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
this.tableLoading = true;
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await this.$axios.post(loc() + "/getAnnualResults", {
|
||||
year: this.pageForm.year
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await this.$axios.post(loc() + "/getAnnualResults", {
|
||||
year: this.pageForm.year
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
} catch (e) {
|
||||
this.$message().error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
},
|
||||
async getActivitys() {
|
||||
|
||||
const {data} = await this.$axios.post(loc() + "/getActivitys", {year: this.pageForm.year})
|
||||
this.pageForm = {
|
||||
activityId: "",
|
||||
year: this.pageForm.year
|
||||
try {
|
||||
const {data} = await this.$axios.post(loc() + "/getActivitys", {year: this.pageForm.year})
|
||||
this.pageForm = {
|
||||
activityId: "",
|
||||
status2: 9,
|
||||
year: this.pageForm.year
|
||||
}
|
||||
this.activityList = data
|
||||
} catch (e) {
|
||||
this.$message().error(e.msg)
|
||||
}
|
||||
this.activityList = data
|
||||
|
||||
|
||||
},
|
||||
async changeActivit() {
|
||||
const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp
|
||||
try {
|
||||
const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp
|
||||
} catch (e) {
|
||||
this.$message().error(e.msg)
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
|
||||
+188
-114
@@ -2,7 +2,7 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" v-if="isShow">
|
||||
<snaker-start slot="header" label="困难帮扶申请" define_key="KNBF"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="3" border>
|
||||
@@ -11,21 +11,20 @@ layout("/layouts/platform.html"){
|
||||
<el-input readonly v-model="formData.proxyUserName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">
|
||||
<el-form-item prop="proxyLoginName">
|
||||
<el-input readonly v-model="formData.proxyLoginName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请模式">
|
||||
<el-form-item prop="mode">
|
||||
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange" style="width: 100%">
|
||||
<el-option label="本人申请" value="1"></el-option>
|
||||
<el-option v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
label="替他人申请" value="2"></el-option>
|
||||
label="替他人申请" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="填写人工号">
|
||||
<el-form-item prop="proxyLoginName">
|
||||
<el-input readonly v-model="formData.proxyLoginName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="受补助人">
|
||||
<el-form-item prop="userName">
|
||||
<template v-if="formData.mode == 2">
|
||||
@@ -45,71 +44,72 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item prop="sex">
|
||||
<el-select v-model="formData.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option v-for="item in ['男性','女性']" :key="item" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">
|
||||
<el-form-item prop="birthday">
|
||||
<el-date-picker
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="formData.birthday"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择出生年月">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="所属单位">
|
||||
<el-form-item prop="unitName">
|
||||
<el-input maxlength="50" clearable placeholder="所在单位"
|
||||
readonly v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">
|
||||
<el-form-item prop="unionName">
|
||||
<el-input maxlength="50" clearable placeholder="所属工会"
|
||||
readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="职务职称">
|
||||
<el-form-item prop="officialCapacity">
|
||||
<el-input maxlength="20" clearable placeholder="请填写职务职称"
|
||||
v-model="formData.officialCapacity"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="手机号码">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input maxlength="11" clearable placeholder="请填写手机号码"
|
||||
v-model="formData.mobile" maxlength="11"></el-input>
|
||||
<el-descriptions-item label="受补助人工号">
|
||||
<el-form-item prop="loginName">
|
||||
<el-input readonly v-model="formData.loginName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号" :span="2">
|
||||
<el-form-item prop="idCard">
|
||||
<el-input maxlength="20" clearable placeholder="请填写身份证号"
|
||||
v-model="formData.idCard" maxlength="18"></el-input>
|
||||
v-model="formData.idCard" maxlength="18"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="困难类型" >
|
||||
<el-form-item prop="subsidyStandards">
|
||||
<el-select v-model="formData.subsidyStandards" style="width: 100%" placeholder="请选择困难类型">
|
||||
<el-option v-for="(item,index) in subsidyStandards" :key="index" :label="item"
|
||||
:value="item">
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item prop="sex">
|
||||
<el-select v-model="formData.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option v-for="item in ['男','女']" :key="item" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭住址" :span="2">
|
||||
<el-descriptions-item label="职务">
|
||||
<el-form-item prop="position">
|
||||
<el-input maxlength="20" clearable placeholder="请填写职务"
|
||||
v-model="formData.position"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="职称">
|
||||
<el-form-item prop="officialCapacity">
|
||||
<el-input maxlength="20" clearable placeholder="请填写职称"
|
||||
v-model="formData.officialCapacity"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属单位">
|
||||
<el-form-item prop="unitName">
|
||||
<el-input maxlength="50" clearable placeholder="请填写所在单位"
|
||||
readonly v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号码">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input maxlength="11" clearable placeholder="请填写手机号码"
|
||||
v-model="formData.mobile" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭年总收入(万元)">
|
||||
<el-form-item prop="homeIncome">
|
||||
<el-input-number
|
||||
v-model="formData.homeIncome"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
style="width: 100%"
|
||||
placeholder="请填写总收入(万元)">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭人数">
|
||||
<el-form-item prop="homeNumber">
|
||||
<el-input-number
|
||||
v-model="formData.homeNumber"
|
||||
:min="1"
|
||||
:step="1"
|
||||
style="width: 100%"
|
||||
placeholder="请填写家庭人数">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭住址" >
|
||||
<el-form-item prop="homeAddress">
|
||||
<el-input clearable
|
||||
style="width: 100%"
|
||||
@@ -118,86 +118,133 @@ layout("/layouts/platform.html"){
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="收款账户" >
|
||||
<el-form-item prop="bankCardNum">
|
||||
<el-input maxlength="20" clearable placeholder="请填写收款卡号"
|
||||
v-model="formData.bankCardNum"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="户名" >
|
||||
<el-form-item prop="bankUserName">
|
||||
<el-input maxlength="20" clearable placeholder="请填写户名"
|
||||
v-model="formData.bankUserName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="开户行" >
|
||||
<el-form-item prop="bankOfDeposit">
|
||||
<el-input maxlength="30" clearable placeholder="请填写开户行"
|
||||
v-model="formData.bankOfDeposit"></el-input>
|
||||
v-model="formData.bankOfDeposit"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="申请次数" >-->
|
||||
<!-- <el-form-item prop="applyCount">-->
|
||||
<!-- <el-input maxlength="20" clearable placeholder="请填写"-->
|
||||
<!-- v-model="formData.applyCount"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="银行卡号" >
|
||||
<el-form-item prop="bankCardNum">
|
||||
<el-input maxlength="20" clearable placeholder="请填写银行卡号"
|
||||
v-model="formData.bankCardNum"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="补助类型" >
|
||||
<el-form-item prop="subsidy">
|
||||
<search-item>
|
||||
<dict-select v-model="formData.subsidy" code="DIFFICULT_SUBSIDY_TYPE" style="width: 100%" placeholder="请选择补助类型"></dict-select>
|
||||
</search-item>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="困难类型" >
|
||||
<el-form-item prop="subsidyStandards">
|
||||
<search-item>
|
||||
<dict-select v-model="formData.subsidyStandards" code="DIFFICULT_TYPE" style="width: 100%" placeholder="请选择困难类型"></dict-select>
|
||||
</search-item>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<el-descriptions-item label="申请原因" :span="3">
|
||||
<el-descriptions-item label="生活致困原因" :span="3">
|
||||
<el-form-item prop="reason">
|
||||
<el-input maxlength="500" :autosize="{ minRows: 5, maxRows: 10}"
|
||||
placeholder="请简述申请原因"
|
||||
placeholder="请简述生活致困原因"
|
||||
clearable
|
||||
show-word-limit
|
||||
v-model="formData.reason"
|
||||
type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<!-- <el-descriptions-item label="家庭成员经济收入" :span="3">
|
||||
<!-- <el-descriptions-item label="户名" >-->
|
||||
<!-- <el-form-item prop="bankUserName">-->
|
||||
<!-- <el-input maxlength="20" clearable placeholder="请填写户名"-->
|
||||
<!-- v-model="formData.bankUserName"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="出生年月">-->
|
||||
<!-- <el-form-item prop="birthday">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- v-model="formData.birthday"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- placeholder="选择出生年月">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="所属工会">-->
|
||||
<!-- <el-form-item prop="unionName">-->
|
||||
<!-- <el-input maxlength="50" clearable placeholder="所属工会"-->
|
||||
<!-- readonly v-model="formData.unionName"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="家庭主要成员(在一起生活的直系亲属)经济收入情况" :span="3">
|
||||
<el-form-item prop="familyList">
|
||||
<el-table :data="formData.familyList" border max-height="500" size="mini" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
||||
<el-table-column prop="name" label="姓名">
|
||||
<el-table-column prop="relation" label="与本人关系">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.name'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.name" placeholder="请输入姓名" clearable></el-input>
|
||||
:prop="'familyList.'+$index+'.relation'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.relation" placeholder="请填写与本人关系" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="relation" label="年龄(岁)">
|
||||
<el-table-column prop="name" label="姓名">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.name'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.name" placeholder="请填写姓名" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="age" label="年龄(岁)">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.age'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number v-model="row.age" placeholder="请输入年龄" :min="1"
|
||||
<el-input-number v-model="row.age" placeholder="年龄" :min="1"
|
||||
:max="100" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="relation" label="关系">
|
||||
<el-table-column prop="homeUnit" label="工作单位">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.relation'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.relation" placeholder="请输入关系" clearable></el-input>
|
||||
:prop="'familyList.'+$index+'.homeUnit'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.homeUnit" placeholder="请填写工作单位" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="monthlyIncome" label="月收入(元)">
|
||||
<el-table-column prop="yearIncome" label="年收入(元)">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.monthlyIncome'"
|
||||
:prop="'familyList.'+$index+'.yearIncome'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number v-model="row.monthlyIncome" placeholder="请输入月收入"
|
||||
<el-input-number v-model="row.yearIncome" placeholder="年收入"
|
||||
:min="0" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" label="备注">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.remarks'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.remarks" placeholder="请填写备注" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button @click="formData.familyList.push({})" icon="el-icon-plus" type="primary"
|
||||
@@ -213,8 +260,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>-->
|
||||
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="附件" :span="3">
|
||||
<el-form-item prop="files">
|
||||
@@ -225,11 +271,15 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-form-item prop="sign">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
<el-form-item class="mt10">
|
||||
<div style="color: red;">
|
||||
{{ '本人承诺:本人及家庭成员未有购买价格超过15万元的机动车,也未有两套及以上商品房,特此承诺!' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
@@ -240,6 +290,15 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<div v-else>
|
||||
<el-card class="box-card" style="height: 92vh" shadow="never">
|
||||
<el-result icon="warning" title="温馨提醒" subTitle="">
|
||||
<template slot="extra">
|
||||
抱歉,当前时间不能申请,可申请时间为{{time}}。
|
||||
</template>
|
||||
</el-result>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
@@ -251,17 +310,13 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
isShow: false,
|
||||
time: '',
|
||||
formData: {
|
||||
id: GetQueryString("bizId"),
|
||||
mode: '1'
|
||||
mode: '1',
|
||||
applyCount: '1',
|
||||
},
|
||||
subsidyStandards: [
|
||||
'患重大疾病',
|
||||
'低收入家庭',
|
||||
'因突发变故致困',
|
||||
'长期病休',
|
||||
'其他情况'
|
||||
],
|
||||
formRules: {
|
||||
proxyUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
proxyLoginName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
@@ -275,10 +330,11 @@ layout("/layouts/platform.html"){
|
||||
bankCardNum: [{required: true, message: '请填写收款账户卡号', trigger: ['blur', 'change']}],
|
||||
bankUserName: [{required: true, message: '请填写户名', trigger: ['blur', 'change']}],
|
||||
bankOfDeposit: [{required: true, message: '请填写开户行', trigger: ['blur', 'change']}],
|
||||
officialCapacity: [{required: true, message: '请填写职务职称', trigger: ['blur', 'change']}],
|
||||
position: [{required: true, message: '请填写职务', trigger: ['blur', 'change']}],
|
||||
officialCapacity: [{required: true, message: '请填写职称', trigger: ['blur', 'change']}],
|
||||
subsidyStandards: [{required: true, message: '请选择困难类型', trigger: ['blur', 'change']}],
|
||||
reason: [{required: true, message: '请填写申请原因', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '请签字', trigger: ['blur', 'change']}]
|
||||
// sign: [{required: true, message: '请签字', trigger: ['blur', 'change']}]
|
||||
},
|
||||
|
||||
// 替他人申请相关
|
||||
@@ -400,6 +456,8 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'unionName', user.unionName)
|
||||
this.$set(this.formData, 'birthday', user.birthday)
|
||||
this.$set(this.formData, 'mobile', user.mobile)
|
||||
this.$set(this.formData, 'idCard', user.idCard)
|
||||
|
||||
} else {
|
||||
this.$set(this.formData, 'userId', null)
|
||||
this.$set(this.formData, 'userName', null)
|
||||
@@ -415,6 +473,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
// 申请模式
|
||||
modeChange(val) {
|
||||
const savedApplyCount = this.formData.applyCount;
|
||||
const user = this.$store.state.user
|
||||
if (val === "1") {
|
||||
this.$set(this.formData, 'userId', user.id)
|
||||
@@ -429,8 +488,9 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'unitName', user.unit.name)
|
||||
this.$set(this.formData, 'unionId', user.union.id)
|
||||
this.$set(this.formData, 'unionName', user.union.name)
|
||||
this.$set(this.formData, 'monthlyIncome', null)
|
||||
this.$set(this.formData, 'yearIncome', null)
|
||||
this.$set(this.formData, 'birthday', user.birthday)
|
||||
this.$set(this.formData, 'idCard', user.idCard)
|
||||
this.$set(this.formData, 'mobile', user.mobile)
|
||||
this.$set(this.formData, 'homeAddress', user.homeAddress)
|
||||
this.$set(this.formData, 'subsidyStandards', null)
|
||||
@@ -438,6 +498,7 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'remarks', null)
|
||||
this.$set(this.formData, 'familyList', [])
|
||||
this.$set(this.formData, 'files', [])
|
||||
this.$set(this.formData, 'applyCount', savedApplyCount )
|
||||
this.queryRecipients(user.loginname)
|
||||
} else {
|
||||
this.formData = {}
|
||||
@@ -447,6 +508,7 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'mode', "2")
|
||||
this.$set(this.formData, 'familyList', [])
|
||||
this.$set(this.formData, 'files', [])
|
||||
this.$set(this.formData, 'applyCount',savedApplyCount )
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -536,9 +598,21 @@ layout("/layouts/platform.html"){
|
||||
return { status: 0, msg: "无效的卡号,请检查后再试。" };
|
||||
}
|
||||
return { status: 200, msg: "卡号有效。" };
|
||||
},
|
||||
async getIsCanPlay() {
|
||||
this.$axios.post('/platform/difficultHelp/apply/getIsCanPlay').then(res => {
|
||||
if (res.code === 0) {
|
||||
this.isShow = res.data.result
|
||||
this.$set(this, 'time', res.data.time);
|
||||
if (res.data.applyCount !== null && res.data.applyCount !== undefined && res.data.applyCount !== 0) {
|
||||
this.$set(this.formData, 'applyCount', res.data.applyCount)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getIsCanPlay();
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId)
|
||||
} else {
|
||||
|
||||
+6
-3
@@ -120,14 +120,17 @@ layout("/layouts/platform.html"){
|
||||
audit: false
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
@@ -6,42 +6,47 @@ const INFO = {
|
||||
</div>
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="填写人姓名">{{ viewData.proxyUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请模式">{{ viewData.mode == 1 ? '本人申请' : '替他人申请' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="受助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{ viewData.birthday }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
|
||||
<!--\t\t<el-descriptions-item label="申请模式">{{ viewData.mode == 1 ? '本人申请' : '替他人申请' }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="所属单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职务职称">{{ viewData.officialCapacity }}</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭年总收入(万元)">{{ viewData.homeIncome }}</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭人数">{{ viewData.homeNumber }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="手机号码">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号" :span="2">{{ viewData.idCard }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="困难类型" >{{ viewData.subsidyStandards }}</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭住址" :span="2">{{ viewData.homeAddress }}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="收款账户">{{ viewData.bankCardNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="户名">{{ viewData.bankUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职务">{{ viewData.position }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职称">{{ viewData.officialCapacity }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="受补助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开户行">{{ viewData.bankOfDeposit }}</el-descriptions-item>
|
||||
<el-descriptions-item label="银行卡号">{{ viewData.bankCardNum }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申请次数" >{{ 1 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭住址" :span="2">{{ viewData.homeAddress }}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="申请原因" :span="3">{{ viewData.reason }}</el-descriptions-item>
|
||||
|
||||
<!-- <el-descriptions-item label="家庭成员经济收入" :span="3">
|
||||
<el-descriptions-item label="家庭主要成员(在一起生活的直系亲属)经济收入情况" :span="3">
|
||||
<el-table :data="viewData.familyList" border style="width: 92%">
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column prop="name" label="姓名"></el-table-column>
|
||||
<el-table-column prop="age" label="年龄(岁)"></el-table-column>
|
||||
<el-table-column prop="relation" label="关系"></el-table-column>
|
||||
<el-table-column prop="monthlyIncome" label="月收入(元)"></el-table-column>
|
||||
<el-table-column label="姓名" prop="name"></el-table-column>
|
||||
<el-table-column prop="age" label="年龄"></el-table-column>
|
||||
<el-table-column prop="homeUnit" label="工作或学习单位"></el-table-column>
|
||||
<el-table-column prop="yearIncome" label="年均收入"></el-table-column>
|
||||
<el-table-column prop="remarks" label="备注"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>-->
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="本人承诺" :span="3">
|
||||
<div style="text-align: left; padding-left: 10px">
|
||||
本人及家庭成员未有购买价格超过15万元的机动车,也未有两套及以上商品房,特此承诺!
|
||||
</div>
|
||||
<div style="text-align: right; padding-right: 80px; margin-top: 10px;">
|
||||
<span>承诺人:{{ viewData.userName }}</span>
|
||||
<span style="margin-left: 30px;">{{ $moment(viewData.applyTime).format('YYYY-MM-DD') }}</span>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="生活致困原因" :span="3">{{ viewData.reason }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="附件" :span="3">
|
||||
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files"
|
||||
@@ -82,11 +87,12 @@ const INFO = {
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="task.taskFormData.tf_money">
|
||||
<el-descriptions-item label="审批金额">{{ '¥' + task.taskFormData.tf_money }}
|
||||
</el-descriptions-item>
|
||||
<template v-if="task.displayName == '校工会审核'">
|
||||
<el-descriptions-item label="审批级别">{{ viewData.level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审批金额">{{ '¥' + viewData.money }}</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
|
||||
@@ -64,7 +64,7 @@ layout("/layouts/platform.html"){
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<el-table-column label="操作" fixed="right" width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
|
||||
@@ -72,6 +72,7 @@ layout("/layouts/platform.html"){
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button @click="doExportApply(row)" size="mini" type="primary">打印</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>
|
||||
@@ -99,12 +100,15 @@ layout("/layouts/platform.html"){
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
@@ -163,6 +167,9 @@ layout("/layouts/platform.html"){
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
doExportApply(row) {
|
||||
this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=true')
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
|
||||
+24
-3
@@ -42,6 +42,9 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="数据列表">
|
||||
<el-button @click="exportAllApply" size="mini" type="primary">导出申请表(压缩包)</el-button>
|
||||
<el-button @click="exportSummaryXlsx" size="mini" type="primary">导出汇总表(excel)</el-button>
|
||||
<el-button @click="exportSummaryDocx" size="mini" type="primary">导出汇总表(word)</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
@@ -66,9 +69,10 @@ layout("/layouts/platform.html"){
|
||||
<span>{{ row.instanceState == '20' ? '结束' : row.taskName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<el-table-column label="操作" fixed="right" width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="doExportApply(row)" size="mini" type="primary">导出</el-button>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -93,15 +97,18 @@ layout("/layouts/platform.html"){
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
year: this.$moment().format("YYYY"),
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
@@ -157,6 +164,20 @@ layout("/layouts/platform.html"){
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
exportAllApply() {
|
||||
this.$downLoad('/platform/difficultHelp/reading/doExportAllApply', this.pageForm)
|
||||
},
|
||||
exportSummaryXlsx() {
|
||||
const params = {...this.pageForm, flag: "xlsx"};
|
||||
this.$downLoad('/platform/difficultHelp/reading/exportSummary', params)
|
||||
},
|
||||
exportSummaryDocx() {
|
||||
const params = {...this.pageForm, flag: "docx"};
|
||||
this.$downLoad('/platform/difficultHelp/reading/exportSummary', params)
|
||||
},
|
||||
doExportApply(row) {
|
||||
this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=false')
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
|
||||
+52
-26
@@ -86,9 +86,21 @@ layout("/layouts/platform.html"){
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="100px" label-suffix=":">
|
||||
<el-form-item label="审核金额" prop="tf_money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="请输入金额" v-model="formData.tf_money" style="width: 60%"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<search-item>
|
||||
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
|
||||
</search-item>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核金额" prop="money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="请输入金额" v-model="formData.money" style="width: 100%" :precision="2"
|
||||
:min="0" ></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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>
|
||||
@@ -121,21 +133,24 @@ layout("/layouts/platform.html"){
|
||||
audit: false
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "curTaskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
// 审核相关
|
||||
formData: {
|
||||
tf_money: 0,
|
||||
money: 0,
|
||||
tf_opinion: "",
|
||||
},
|
||||
showApprovalForm: false
|
||||
@@ -156,31 +171,42 @@ layout("/layouts/platform.html"){
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
taskName: row.curTaskName,
|
||||
id: row.id
|
||||
}
|
||||
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()
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
})
|
||||
}).then((saveRes) => {
|
||||
if (saveRes.code === 0) {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((taskRes) => {
|
||||
if (taskRes.code === 0) {
|
||||
this.$message.success('操作成功');
|
||||
this.$refs.guava.index();
|
||||
this.doSearch();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<div id="difficult_help_branch_union_approval_form">
|
||||
<el-form :model="formData" ref="formRef" 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>
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#difficult_help_branch_union_approval_form",
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskAction(val) {
|
||||
console.log(val)
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...val,
|
||||
...this.formData
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete",
|
||||
payload: val
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel(val) {
|
||||
console.log(val)
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="受助人">
|
||||
<el-input placeholder="请输入受助人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable
|
||||
filterable
|
||||
placeholder="请选择所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select clearable filterable placeholder="请选择所属单位"
|
||||
style="width: 100%;" v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审批列表">
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<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" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||
type="index" width="60px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{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="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(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 nonce="${cspNonce!}">
|
||||
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
audit: false
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "proxyUserName", label: "申请人", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(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()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async flushUnits(){
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
} else {
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+102
-2
@@ -1,6 +1,106 @@
|
||||
<!--#include("payRecord.js"){}#-->
|
||||
const AID_FUND_INFO = {
|
||||
template: /*language=HTML*/
|
||||
`
|
||||
|
||||
`
|
||||
<div>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="用户信息" name="one">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="申报人">{{viewData.username}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{viewData.loginname}}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">{{viewData.mobile}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="入校时间">
|
||||
{{$moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD')}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="基金会员类型">
|
||||
{{viewData.aidFundMemberUserType}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="起扣时间">
|
||||
{{viewData.aidFundDeductTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="所在工会">{{viewData.unionName}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="变更记录" name="two">
|
||||
<el-table :data="changeRecordTableData" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column label="序号" type="index" width="60px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop=='changeType'">
|
||||
<dict-tag :options="dict.type.AIDFUND_MEMBER_CHANGE_TYPE"
|
||||
:value="row.changeType"></dict-tag>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='applyTime'">
|
||||
<template v-if="row.applyTime">
|
||||
{{$moment(row.applyTime).format('YYYY-MM-DD')}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="缴费记录" name="three">
|
||||
<pay_record ref="payRecord"></pay_record>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
`,
|
||||
store,
|
||||
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
changeRecordTableData: [],
|
||||
activeName:"one",
|
||||
tableColumns: [
|
||||
{prop: "loginname", label: "工号"},
|
||||
{prop: "username", label: "姓名"},
|
||||
{prop: "sex", label: "性别"},
|
||||
{prop: "arrivalAtSchoolDate", label: "入校时间"},
|
||||
{prop: "unitName", label: "所属单位"},
|
||||
{prop: "unionName", label: "所属工会"},
|
||||
{prop: "aidFundMemberUserType", label: "基金会员类型"},
|
||||
{prop: "changeType", label: "变更类型"},
|
||||
{prop: "applyTime", label: "变更时间"},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'pay_record': PAY_RECORD,
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.info()
|
||||
this.findChangeRecordList()
|
||||
this.$refs.payRecord.getUserPayRecordList(row.id)
|
||||
},
|
||||
// 获取申请信息
|
||||
info() {
|
||||
this.$axios.post("/platform/medicalMutualAid/aidFund/manage/findOne", {userId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取申请信息
|
||||
findChangeRecordList() {
|
||||
this.$axios.post("/platform/medicalMutualAid/aidFund/manage/findChangeRecordList", {userId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.changeRecordTableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
+4
-8
@@ -5,11 +5,12 @@ const APPLY_INFO = {
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="申报人">{{viewData.username}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人">{{viewData.username}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{viewData.loginname}}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">{{viewData.mobile}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="入校时间">{{$moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD')}}</el-descriptions-item>
|
||||
<el-descriptions-item label="入校时间">{{$moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD')}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所在单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="所在工会">{{viewData.unionName}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@@ -40,11 +41,6 @@ const APPLY_INFO = {
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="task.taskFormData.tf_money">
|
||||
<el-descriptions-item label="审批金额">{{ '¥' + task.taskFormData.tf_money }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
@@ -58,7 +54,7 @@ const APPLY_INFO = {
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE", "PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ const PAY_RECORD = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getUserPayRecordList() {
|
||||
this.$axios.post('/platform/medicalMutualAid/aidFund/apply/getUserPayRecordList').then(resp => {
|
||||
getUserPayRecordList(userId) {
|
||||
this.$axios.post('/platform/medicalMutualAid/aidFund/apply/getUserPayRecordList',{userId}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.payRecordList = resp.data
|
||||
}
|
||||
|
||||
+1
-5
@@ -130,11 +130,9 @@ layout("/layouts/platform.html"){
|
||||
<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 :model="formData" ref="formRef" :rules="formRules" label-width="100px" label-suffix=":">
|
||||
<el-form-item label="审核状态" prop="submitType"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
审核状态:
|
||||
<el-radio-group v-model="formData.submitType">
|
||||
<el-radio-button :label="2">拒绝</el-radio-button>
|
||||
<el-radio-button :label="1">通过</el-radio-button>
|
||||
@@ -146,7 +144,6 @@ layout("/layouts/platform.html"){
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入校时间" prop="arrivalAtSchoolDate"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
入校时间:
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
@change="getPayMoney"
|
||||
@@ -159,7 +156,6 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="缴纳费用" prop="money">
|
||||
缴纳费用:
|
||||
<el-input readonly v-model="formData.money"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
+1
-2
@@ -164,8 +164,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
openImport() {
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
this.$refs.guava.edit(()=>{
|
||||
setTimeout(() => {
|
||||
this.$refs.viewImport.resetImportData()
|
||||
this.$refs.viewImport.importData.year = this.pageForm.year
|
||||
|
||||
+269
@@ -0,0 +1,269 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
/* 整个弹窗容器 */
|
||||
.custom-action-sheet {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* 设置弹窗最大高度,避免过高(可根据需要调整) */
|
||||
max-height: 80vh;
|
||||
height: auto; /* 允许内容撑开,但不超过 max-height */
|
||||
}
|
||||
|
||||
/* 可滚动的内容区域 */
|
||||
.scrollable-content {
|
||||
flex: 1;
|
||||
overflow-y: auto; /* 关键:只让内容滚动 */
|
||||
padding: 0 16px;
|
||||
/* 可选:防止滚动时文字贴边 */
|
||||
-webkit-overflow-scrolling: touch; /* iOS 滚动优化 */
|
||||
}
|
||||
|
||||
/* 底部按钮区域 */
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
padding: 12px 16px;
|
||||
background: white;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
/* 注意:这里不用 position: fixed! */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div id="app">
|
||||
<!-- 导航栏 -->
|
||||
<van-nav-bar title="基金会员申请" left-text="返回" left-arrow @click-left="historyBack" fixed
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<van-notice-bar left-icon="info-o" wrapable>
|
||||
温馨提醒:入校时间关联会费缴纳金额,请确认是否正确,若有疑问请联系校工会!另外,务必按您的实际情况选择基金会员类型!
|
||||
</van-notice-bar>
|
||||
<!-- 表单容器 -->
|
||||
<van-form ref="formRef" class="form-container">
|
||||
|
||||
<van-field required v-model="formData.userName" label="姓名" disabled></van-field>
|
||||
|
||||
<van-field required v-model="formData.loginName" label="工号" disabled></van-field>
|
||||
|
||||
<van-field required v-model="formData.applyTime" label="申请时间" disabled></van-field>
|
||||
|
||||
<van-field required v-model="formData.mobile" name="mobile" label="联系方式" placeholder="请输入联系方式"
|
||||
clearable type="tel" maxlength="11"
|
||||
:rules="[{ required: true, message: '请填写入校时间' }]"></van-field>
|
||||
|
||||
<van-field required v-model="formData.idCard" name="idCard" label="身份证号" placeholder="请输入身份证件号"
|
||||
clearable maxlength="18"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.arrivalAtSchoolDate"
|
||||
label="入校时间"
|
||||
placeholder="若没有入校时间,请联系校工会"
|
||||
disabled
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写入校时间' }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.aidFundMemberUserType"
|
||||
name="aidFundMemberUserType"
|
||||
label="基金会员类型"
|
||||
readonly
|
||||
required
|
||||
is-link
|
||||
placeholder="请选择基金会员类型"
|
||||
@click="aidFundMemberUserTypeClick"
|
||||
:rules="[{ required: true, message: '请选择基金会员类型' }]"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showAidFundMemberUserTypePicker">
|
||||
<van-picker show-toolbar
|
||||
:default-index="aidFundMemberUserTypeIndex"
|
||||
:columns="aidFundMemberUserTypeOptions"
|
||||
@cancel="showAidFundMemberUserTypePicker = false"
|
||||
value-key="name"
|
||||
@confirm="(v)=>{formData.aidFundMemberUserType = v.name;showAidFundMemberUserTypePicker = false}"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<div style="padding: 10px;">
|
||||
<van-checkbox v-model="formData.isRead" shape="square" @change="isReadChange">
|
||||
<div style="color:#246FB4;" @click.stop="isReadClick">
|
||||
中国地质大学(武汉)教职工重大疾病互助基金管理办法
|
||||
</div>
|
||||
</van-checkbox>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block type="primary" :disabled="applyInfo.disabled"
|
||||
@click="openSubmit">{{ applyInfo.label }}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<van-action-sheet
|
||||
title="温馨提示"
|
||||
v-model="dialogVisible"
|
||||
:close-on-click-overlay="false"
|
||||
class="custom-action-sheet"
|
||||
>
|
||||
<!-- 内容可滚动区域 -->
|
||||
<div class="scrollable-content">
|
||||
<pay-record ref="payRecord"></pay-record>
|
||||
|
||||
|
||||
</div>
|
||||
<van-notice-bar
|
||||
v-if="!$store.state.user.aidFundMember"
|
||||
class="mt10"
|
||||
color="#faad14"
|
||||
background="#fffbe6"
|
||||
:scrollable="false"
|
||||
>
|
||||
本次入会,您需要缴费会费{{ payMoney }}元,请详知。
|
||||
</van-notice-bar>
|
||||
<!-- 底部按钮:固定在弹窗底部,不滚动 -->
|
||||
<div class="dialog-footer">
|
||||
|
||||
<van-button plain hairline @click="dialogVisible = false">取消</van-button>
|
||||
<van-button type="primary" @click="onSubmit">提交</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/payRecord.js"){}#-->
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["AIDFUND_MEMBER_USER_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
aidFundMemberUserTypeOptions: [],
|
||||
isReadChangeType: true,
|
||||
applyInfo: {
|
||||
disabled: true,
|
||||
label: '申请加入'
|
||||
},
|
||||
dialogVisible: false,
|
||||
payMoney: 0,
|
||||
payRecordsDialogTitle: "",
|
||||
payRecordList: [],
|
||||
|
||||
showAidFundMemberUserTypePicker: false,
|
||||
aidFundMemberUserTypeIndex: 0
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'pay-record': payRecord
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交申请吗?",
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/medicalMutualAid/aidFund/apply/submit", {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.dialogVisible = false
|
||||
this.$pjaxReplace("/platform/medicalMutualAid/aidFund/applyMine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async openSubmit() {
|
||||
await this.$refs.formRef.validate();
|
||||
if (!this.formData.isRead) {
|
||||
this.$dialog.alert({
|
||||
title: '温馨提醒',
|
||||
message: '请阅读《教职工重大疾病互助基金管理办法》的通知文件',
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
this.getPayMoney()
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.payRecord.getPayRecords()
|
||||
})
|
||||
},
|
||||
isReadClick() {
|
||||
this.isReadChangeType = false
|
||||
this.$set(this.formData, 'isRead', true)
|
||||
this.$commonUtil.previewFile({
|
||||
suffix: "pdf",
|
||||
downloadPath: "/platform/sys/file/download?id=orpgde84uggjmpflbob83tadan",
|
||||
name: "中国地质大学(武汉)教职工重大疾病互助基金管理办法.pdf",
|
||||
id: "orpgde84uggjmpflbob83tadan"
|
||||
})
|
||||
},
|
||||
isReadChange() {
|
||||
if (this.isReadChangeType) {
|
||||
this.$set(this.formData, 'isRead', false)
|
||||
this.$dialog.alert({
|
||||
title: '温馨提醒',
|
||||
message: '请阅读《教职工重大疾病互助基金管理办法》的通知文件',
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
aidFundMemberUserTypeClick() {
|
||||
if (this.formData.aidFundMemberUserType) {
|
||||
this.aidFundMemberUserTypeIndex = this.aidFundMemberUserTypeOptions.findIndex(
|
||||
item => item.name === this.formData.aidFundMemberUserType
|
||||
);
|
||||
}
|
||||
this.showAidFundMemberUserTypePicker = true
|
||||
},
|
||||
canApply() {
|
||||
this.$axios.post('/platform/medicalMutualAid/aidFund/apply/canApply').then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.applyInfo = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getPayMoney() {
|
||||
this.$axios.post('/platform/medicalMutualAid/aidFund/apply/getPayMoney', {arrivalAtSchoolDate: this.formData.arrivalAtSchoolDate}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.payMoney = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
this.canApply()
|
||||
this.$set(this.formData, "userName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "loginName", this.$store.state.user.loginname)
|
||||
this.$set(this.formData, "mobile", this.$store.state.user.mobile)
|
||||
this.$set(this.formData, "idCard", this.$store.state.user.idCard)
|
||||
this.$set(this.formData, "aidFundMemberUserType", this.$store.state.user.aidFundMemberUserType)
|
||||
if (this.$store.state.user.arrivalAtSchoolDate) {
|
||||
this.$set(this.formData, "arrivalAtSchoolDate", this.$moment(this.$store.state.user.arrivalAtSchoolDate).format("YYYY-MM-DD"))
|
||||
}
|
||||
this.$set(this.formData, "applyTime", this.$moment(new Date()).format("YYYY-MM-DD"))
|
||||
|
||||
this.$businessTool.getDictOptions("AIDFUND_MEMBER_USER_TYPE").then(data => {
|
||||
this.aidFundMemberUserTypeOptions = data
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<!-- 导航栏 -->
|
||||
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack" fixed
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<table-list api="/platform/medicalMutualAid/aidFund/applyMine/pageData" :page_form.sync="pageForm"
|
||||
ref="tableListRef" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="姓名">{{row.userName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="变更类型">
|
||||
<dict-tag :options="dict.type.AIDFUND_MEMBER_CHANGE_TYPE"
|
||||
:value="row.changeType"></dict-tag>
|
||||
</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onFinishTask(row)">
|
||||
<i class="fa fa-mail-forward"></i>
|
||||
<span>提交</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div>
|
||||
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFinishTask(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "温馨提示",
|
||||
message: "您确定要重新提交吗?",
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/medicalMutualAid/aidFund/applyMine/submitAgain", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "温馨提示",
|
||||
message: "您确定要撤回吗?",
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$dialog.confirm({
|
||||
title: "温馨提示",
|
||||
message: "您确定要取消申请吗?取消后将不能撤?",
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/medicalMutualAid/aidFund/applyMine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
const AID_FUND_INFO = {
|
||||
template: /*language=HTML*/
|
||||
`
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="申请人">{{viewData.username}}</van-cell>
|
||||
<van-cell title="工号">{{viewData.loginname}}</van-cell>
|
||||
<van-cell title="联系方式">{{viewData.mobile}}</van-cell>
|
||||
<van-cell title="性别">{{viewData.sex}}</van-cell>
|
||||
<van-cell title="入校时间">{{$moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="所在单位">{{viewData.unitName}}</van-cell>
|
||||
<van-cell title="所在工会">{{viewData.unionName}}</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group :title="task.displayName" v-else>
|
||||
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
row: {},
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.info()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 关闭
|
||||
onClose() {
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
info() {
|
||||
this.$axios.post("/platform/medicalMutualAid/aidFund/apply/info", {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
const payRecord = {
|
||||
template: /*language=HTML*/ `
|
||||
<div style="max-height: 250px">
|
||||
<!-- 展开面板 -->
|
||||
<van-collapse v-model="activeNames" @change="onExpand">
|
||||
<van-collapse-item
|
||||
v-for="(row, index) in records"
|
||||
:key="row.id"
|
||||
:name="row.id"
|
||||
:title="titleTemplate(row, index)"
|
||||
class="pay-row"
|
||||
>
|
||||
<!-- 展开后详情 -->
|
||||
<van-cell-group>
|
||||
<van-cell title="缴费年份" :value="row.year"></van-cell>
|
||||
<van-cell title="缴费金额">
|
||||
<template #default>
|
||||
<van-tag type="primary">{{ row.money }}</van-tag>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="扣款状态">
|
||||
<template #default>
|
||||
<van-tag :type="row.isPayed ? 'success' : 'default'">
|
||||
{{ row.isPayed ? '已扣款' : '未扣款' }}
|
||||
</van-tag>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
<!-- 空提示 -->
|
||||
<van-empty v-if="!loading && !records.length" description="暂无缴费记录"/>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
activeNames: [] ,
|
||||
records: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
userid: 'getPayRecords'
|
||||
},
|
||||
methods: {
|
||||
onExpand(names) {
|
||||
// 如需异步加载详情可在此处理
|
||||
|
||||
},
|
||||
titleTemplate(row, idx) {
|
||||
return '序号 ' + (idx + 1) + ' · ' + row.year + ' · ¥' + row.money
|
||||
},
|
||||
async getPayRecords(userId) {
|
||||
this.loading = true
|
||||
try {
|
||||
this.$axios.post("/platform/medicalMutualAid/aidFund/apply/getUserPayRecordList",{userId}).then(resp=>{
|
||||
if (resp.code === 0){
|
||||
this.records = resp.data
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
this.$notify({ type: 'danger', message: '获取缴费记录失败' })
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.pay-row {
|
||||
margin-bottom: 8px;
|
||||
background: #fafafa;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
`
|
||||
}
|
||||
+271
@@ -0,0 +1,271 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="互管会审核" left-text="返回" left-arrow @click-left="historyBack" fixed
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu
|
||||
:close-on-click-outside="false"
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange"
|
||||
v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/medicalMutualAid/aidFund/foundationAudit/pageData" :page_form.sync="pageForm"
|
||||
ref="tableListRef" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="姓名">{{row.userName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="变更类型">
|
||||
<dict-tag :options="dict.type.AIDFUND_MEMBER_CHANGE_TYPE"
|
||||
:value="row.changeType"></dict-tag>
|
||||
</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
:rules="[{ required: true, message: '请选择审核状态' }]"
|
||||
label="审核状态"
|
||||
name="submitType">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.submitType">
|
||||
<van-radio :name="2" shape="square">拒绝</van-radio>
|
||||
<van-radio :name="1" shape="square">同意</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<div v-if="formData.submitType===1
|
||||
&&formData.changeType==='AIDFUND_MEMBER_CHANGE_TYPE_ONE'">
|
||||
<van-field
|
||||
v-model="formData.arrivalAtSchoolDate"
|
||||
label="入校时间"
|
||||
placeholder="若没有入校时间,请联系校工会"
|
||||
disabled
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写入校时间' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.money"
|
||||
label="金额"
|
||||
placeholder="金额"
|
||||
disabled
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写入校时间' }]"
|
||||
></van-field>
|
||||
</div>
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block @click="$refs.infoRef.onClose()">关闭</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(formData.submitType)">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/applyInfo.js"){}#-->
|
||||
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKeyword: '',
|
||||
unionId: null,
|
||||
unitId: null,
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear()
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionList: [],
|
||||
unitList: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": AID_FUND_INFO
|
||||
},
|
||||
methods: {
|
||||
getPayMoney() {
|
||||
this.$axios.post('/platform/medicalMutualAid/aidFund/foundationAudit/getPayMoney', {
|
||||
arrivalAtSchoolDate: this.formData.arrivalAtSchoolDate,
|
||||
userId: this.formData.userId
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this.formData, 'money', resp.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
arrivalAtSchoolDate: row.arrivalAtSchoolDate,
|
||||
userId: row.userId,
|
||||
changeType: row.changeType,
|
||||
submitType: 1,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.getPayMoney()
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/medicalMutualAid/aidFund/foundationAudit/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
}), id: this.formData.id
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
debugger
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
unionChange() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async flushUnits() {
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
this.unitList.unshift({text: "全部单位", value: null})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
this.unitList.unshift({text: "全部单位", value: null})
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
this.unionList.unshift({text: "全部工会", value: null})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="离退休审核" left-text="返回" left-arrow @click-left="historyBack" fixed
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu
|
||||
:close-on-click-outside="false"
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/medicalMutualAid/aidFund/retirementAudit/pageData" :page_form.sync="pageForm"
|
||||
ref="tableListRef" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="姓名">{{row.userName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="变更类型">
|
||||
<dict-tag :options="dict.type.AIDFUND_MEMBER_CHANGE_TYPE"
|
||||
:value="row.changeType"></dict-tag>
|
||||
</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block @click="$refs.infoRef.onClose()">关闭</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/applyInfo.js"){}#-->
|
||||
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKeyword: '',
|
||||
unionId: null,
|
||||
unitId: null,
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear()
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionList: [],
|
||||
unitList: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": AID_FUND_INFO
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
debugger
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="分工会审核" left-text="返回" left-arrow @click-left="historyBack" fixed
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/medicalMutualAid/aidFund/unionAudit/pageData" :page_form.sync="pageForm"
|
||||
ref="tableListRef" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="姓名">{{row.userName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="变更类型">
|
||||
<dict-tag :options="dict.type.AIDFUND_MEMBER_CHANGE_TYPE"
|
||||
:value="row.changeType"></dict-tag>
|
||||
</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block @click="$refs.infoRef.onClose()">关闭</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/applyInfo.js"){}#-->
|
||||
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKeyword: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": AID_FUND_INFO
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
debugger
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user