困难帮扶移植
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
+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;
|
||||
}
|
||||
|
||||
+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>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user