Compare commits
10
Commits
9590ad5f8c
...
fix_职工慰问
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cd4f52b30 | ||
|
|
365c812c6c | ||
|
|
12448bee0d | ||
|
|
81a1432702 | ||
|
|
a1fa323420 | ||
|
|
7b7f1f61f9 | ||
|
|
f30dbcaa21 | ||
|
|
42c5f4acd7 | ||
|
|
e70e07bf47 | ||
|
|
790e8e9f50 |
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.budwk.app.base.exception.BaseException;
|
import com.budwk.app.base.exception.BaseException;
|
||||||
import com.budwk.app.sys.models.Sys_file;
|
import com.budwk.app.sys.models.Sys_file;
|
||||||
import com.budwk.app.sys.models.Sys_office_template;
|
import com.budwk.app.sys.models.Sys_office_template;
|
||||||
|
import com.budwk.app.sys.services.SysFileService;
|
||||||
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
@@ -22,6 +23,7 @@ import java.io.ByteArrayInputStream;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
@@ -39,6 +41,9 @@ public class SysOfficeTemplateUtil {
|
|||||||
@Inject
|
@Inject
|
||||||
private Dao dao;
|
private Dao dao;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SysFileService sysFileService;
|
||||||
|
|
||||||
public String getTemplateFileName(String templateCode) {
|
public String getTemplateFileName(String templateCode) {
|
||||||
Sys_office_template officeTemplate = dao.fetch(Sys_office_template.class, Cnd.where(Sys_office_template::getTemplateCode, "=", templateCode));
|
Sys_office_template officeTemplate = dao.fetch(Sys_office_template.class, Cnd.where(Sys_office_template::getTemplateCode, "=", templateCode));
|
||||||
if (ObjectUtil.isNull(officeTemplate)) {
|
if (ObjectUtil.isNull(officeTemplate)) {
|
||||||
@@ -70,7 +75,16 @@ public class SysOfficeTemplateUtil {
|
|||||||
if (ObjectUtil.isEmpty(sysFile)) {
|
if (ObjectUtil.isEmpty(sysFile)) {
|
||||||
throw new BaseException("模板文件不存在");
|
throw new BaseException("模板文件不存在");
|
||||||
}
|
}
|
||||||
byte[] fileBytes = SysFileMinIoUtil.getFileBytes(sysFile.getBucket(), sysFile.getStoragePath());
|
byte[] fileBytes;
|
||||||
|
try {
|
||||||
|
fileBytes = sysFileService.download(id);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("模板文件读取失败,templateCode={},fileId={}", templateCode, id, e);
|
||||||
|
throw new BaseException("模板 {} 的文件读取失败:{}", templateCode, e.getMessage());
|
||||||
|
}
|
||||||
|
if (fileBytes == null || fileBytes.length == 0) {
|
||||||
|
throw new BaseException("模板 {} 的文件为空或读取失败,文件名:{}", templateCode, sysFile.getName());
|
||||||
|
}
|
||||||
return new ByteArrayInputStream(fileBytes);
|
return new ByteArrayInputStream(fileBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
@@ -14,6 +14,8 @@ import com.budwk.app.base.utils.PageUtil;
|
|||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||||
import com.budwk.app.sys.param.SysMsgSummaryPageForm;
|
import com.budwk.app.sys.param.SysMsgSummaryPageForm;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||||
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
|
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -96,6 +98,7 @@ public class CondolenceReadController {
|
|||||||
cnd.andEX("YEAR(info.createTime)", "=", year);
|
cnd.andEX("YEAR(info.createTime)", "=", year);
|
||||||
cnd.andEX("info.applyUnionId", "=", unionId);
|
cnd.andEX("info.applyUnionId", "=", unionId);
|
||||||
cnd.andEX("info.applyUnitId", "=", unitId);
|
cnd.andEX("info.applyUnitId", "=", unitId);
|
||||||
|
applyReadScope(cnd, "info");
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
@@ -142,6 +145,7 @@ public class CondolenceReadController {
|
|||||||
cnd.andEX("YEAR(con.createTime)", "=", year);
|
cnd.andEX("YEAR(con.createTime)", "=", year);
|
||||||
cnd.andEX("con.applyUnionId", "=", unionId);
|
cnd.andEX("con.applyUnionId", "=", unionId);
|
||||||
cnd.andEX("con.applyUnitId", "=", unitId);
|
cnd.andEX("con.applyUnitId", "=", unitId);
|
||||||
|
applyReadScope(cnd, "con");
|
||||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("con.helpUserName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
seg.or("con.helpUserName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
@@ -166,4 +170,21 @@ public class CondolenceReadController {
|
|||||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||||
CommonDownloadUtil.download("申报人汇总.xlsx", workbook, response);
|
CommonDownloadUtil.download("申报人汇总.xlsx", workbook, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void applyReadScope(Cnd cnd, String alias) {
|
||||||
|
if (AuthUtil.hasPermission("condolence_all_school")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (AuthUtil.hasPermission("condolence_branch_union")) {
|
||||||
|
String unionId = SecurityUtil.getUnionId();
|
||||||
|
if (StrUtil.isNotBlank(unionId)) {
|
||||||
|
cnd.and(alias + ".applyUnionId", "=", unionId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (AuthUtil.hasPermission("condolence_self")) {
|
||||||
|
cnd.and(alias + ".createdBy", "=", SecurityUtil.getUserId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cnd.and("1", "=", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-6
@@ -1,10 +1,10 @@
|
|||||||
package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller;
|
package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
import cn.hutool.core.lang.Dict;
|
import cn.hutool.core.lang.Dict;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.flow.constant.FlowConst;
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
@@ -112,7 +112,7 @@ public class DifficultHelpApplyController {
|
|||||||
@SaCheckPermission("member.apply.submit")
|
@SaCheckPermission("member.apply.submit")
|
||||||
@SLog(tag = "困难补助申请", msg = "保存申请,填写人: ${args[0].proxyUserName}")
|
@SLog(tag = "困难补助申请", msg = "保存申请,填写人: ${args[0].proxyUserName}")
|
||||||
public Result save(@Param("data") DifficultHelpInfo difficultHelpInfo) {
|
public Result save(@Param("data") DifficultHelpInfo difficultHelpInfo) {
|
||||||
difficultHelpCommonService.validateApplyUser(difficultHelpInfo);
|
difficultHelpCommonService.validateApplyUser(difficultHelpInfo, false);
|
||||||
difficultHelpInfo.setApplyTime(ObjectUtil.defaultIfNull(difficultHelpInfo.getApplyTime(), new Date()));
|
difficultHelpInfo.setApplyTime(ObjectUtil.defaultIfNull(difficultHelpInfo.getApplyTime(), new Date()));
|
||||||
difficultHelpCommonService.refreshApplyCount(difficultHelpInfo);
|
difficultHelpCommonService.refreshApplyCount(difficultHelpInfo);
|
||||||
if (difficultHelpCommonService.hasAppliedInYear(difficultHelpInfo.getUserId(), difficultHelpInfo.getApplyTime(), difficultHelpInfo.getId())) {
|
if (difficultHelpCommonService.hasAppliedInYear(difficultHelpInfo.getUserId(), difficultHelpInfo.getApplyTime(), difficultHelpInfo.getId())) {
|
||||||
@@ -177,12 +177,13 @@ public class DifficultHelpApplyController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("获取受助人")
|
@ApiOperation("获取受助人")
|
||||||
@SaCheckPermission("difficultHelp.apply")
|
@SaCheckPermission(value = {"difficultHelp.apply", "h5.difficultHelp.apply"}, mode = SaMode.OR)
|
||||||
public Result queryRecipients(String key){
|
public Result queryRecipients(String key){
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
boolean schoolScope = AuthUtil.hasPermission("difficult_assistance_school");
|
||||||
return Result.error("只有分工会主席可以替他人申请");
|
if (!schoolScope && !AuthUtil.hasPermission("difficult_assistance_union")) {
|
||||||
|
return Result.error("没有代申请权限");
|
||||||
}
|
}
|
||||||
if (Strings.isBlank(SecurityUtil.getUnionId())) {
|
if (!schoolScope && Strings.isBlank(SecurityUtil.getUnionId())) {
|
||||||
return Result.error("当前用户未设置所属分工会");
|
return Result.error("当前用户未设置所属分工会");
|
||||||
}
|
}
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
@@ -193,6 +194,10 @@ public class DifficultHelpApplyController {
|
|||||||
birthday,
|
birthday,
|
||||||
mobile,
|
mobile,
|
||||||
sex,
|
sex,
|
||||||
|
idCard,
|
||||||
|
position,
|
||||||
|
professionalTitle AS officialCapacity,
|
||||||
|
(SELECT u.homeAddress FROM sys_user u WHERE u.id = vw_user.id) AS homeAddress,
|
||||||
unitName,
|
unitName,
|
||||||
unionName,
|
unionName,
|
||||||
unionId,
|
unionId,
|
||||||
@@ -203,7 +208,9 @@ public class DifficultHelpApplyController {
|
|||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("id", "<>", SecurityUtil.getUserId());
|
cnd.and("id", "<>", SecurityUtil.getUserId());
|
||||||
|
if (!schoolScope) {
|
||||||
cnd.and("unionid", "=", SecurityUtil.getUnionId());
|
cnd.and("unionid", "=", SecurityUtil.getUnionId());
|
||||||
|
}
|
||||||
|
|
||||||
if (Strings.isNotBlank(key)) {
|
if (Strings.isNotBlank(key)) {
|
||||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
|||||||
+6
@@ -43,6 +43,7 @@ public class DifficultHelpApprovalController {
|
|||||||
}
|
}
|
||||||
ProcessTask task = dao.fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY));
|
ProcessTask task = dao.fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY));
|
||||||
if (task == null) throw new BaseException("审批任务不存在");
|
if (task == null) throw new BaseException("审批任务不存在");
|
||||||
|
boolean actualAmountApproval = "e405f96c-5fc0-4f63-b323-e69dfe853253".equals(task.getTaskName());
|
||||||
boolean amountApproval = "715ece82-4ae3-433c-ad18-ed875f45d1e3".equals(task.getTaskName());
|
boolean amountApproval = "715ece82-4ae3-433c-ad18-ed875f45d1e3".equals(task.getTaskName());
|
||||||
if (!amountApproval && !"36ebafda-44c2-4bd3-bd7f-10839a575a0d".equals(task.getTaskName())
|
if (!amountApproval && !"36ebafda-44c2-4bd3-bd7f-10839a575a0d".equals(task.getTaskName())
|
||||||
&& !"e405f96c-5fc0-4f63-b323-e69dfe853253".equals(task.getTaskName())) {
|
&& !"e405f96c-5fc0-4f63-b323-e69dfe853253".equals(task.getTaskName())) {
|
||||||
@@ -56,6 +57,7 @@ public class DifficultHelpApprovalController {
|
|||||||
|
|
||||||
args.remove("level");
|
args.remove("level");
|
||||||
args.remove("tf_level");
|
args.remove("tf_level");
|
||||||
|
args.remove("tf_actualMoney");
|
||||||
Double money = amountApproval ? args.getDouble("money") : null;
|
Double money = amountApproval ? args.getDouble("money") : null;
|
||||||
if (amountApproval) {
|
if (amountApproval) {
|
||||||
if (money == null || !Double.isFinite(money) || money < 0) {
|
if (money == null || !Double.isFinite(money) || money < 0) {
|
||||||
@@ -65,6 +67,10 @@ public class DifficultHelpApprovalController {
|
|||||||
} else {
|
} else {
|
||||||
args.remove("money");
|
args.remove("money");
|
||||||
args.remove("tf_money");
|
args.remove("tf_money");
|
||||||
|
if (actualAmountApproval && info.getMoney() != null) {
|
||||||
|
args.put("tf_money", info.getMoney());
|
||||||
|
args.put("tf_actualMoney", info.getMoney());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 参与者权限由流程引擎校验,业务入口不接受客户端指定管理员代办。
|
// 参与者权限由流程引擎校验,业务入口不接受客户端指定管理员代办。
|
||||||
args.remove(FlowConst.EXT_ENABLE_OPERATOR);
|
args.remove(FlowConst.EXT_ENABLE_OPERATOR);
|
||||||
|
|||||||
+1
@@ -78,6 +78,7 @@ public class DifficultHelpFirstApprovalController {
|
|||||||
info.subsidyStandards,
|
info.subsidyStandards,
|
||||||
LEFT(info.applyTime, 10) AS applyTime,
|
LEFT(info.applyTime, 10) AS applyTime,
|
||||||
info.applyCount,
|
info.applyCount,
|
||||||
|
info.applyMoney,
|
||||||
info.mobile,
|
info.mobile,
|
||||||
ins.id AS instanceId,
|
ins.id AS instanceId,
|
||||||
ins.businessNo,
|
ins.businessNo,
|
||||||
|
|||||||
+73
-90
@@ -2,7 +2,6 @@ package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller;
|
|||||||
|
|
||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
|
||||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
@@ -10,7 +9,6 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
@@ -154,7 +152,7 @@ public class DifficultHelpReadingController {
|
|||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("ins.state", "=", 20);
|
cnd.and("ins.state", "=", 20);
|
||||||
pageParam.buildSearch(cnd, "info.", false);
|
pageParam.buildReadingSearch(cnd, "info.");
|
||||||
cnd.groupBy("info.id");
|
cnd.groupBy("info.id");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination<NutMap> pagination = difficultHelpCommonService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
Pagination<NutMap> pagination = difficultHelpCommonService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||||
@@ -269,7 +267,7 @@ public class DifficultHelpReadingController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
pageParam.buildSearch(cnd, "info.", false);
|
pageParam.buildReadingSearch(cnd, "info.");
|
||||||
cnd.groupBy("info.id");
|
cnd.groupBy("info.id");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = difficultHelpCommonService.listMap(sql);
|
List<NutMap> list = difficultHelpCommonService.listMap(sql);
|
||||||
@@ -282,42 +280,14 @@ public class DifficultHelpReadingController {
|
|||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
NutMap record = list.get(i);
|
NutMap record = list.get(i);
|
||||||
|
|
||||||
HashMap<String, Object> docData = new HashMap<>();
|
DifficultHelpInfo difficultHelp = difficultHelpCommonService.fetch(record.getString("id"));
|
||||||
docData.put("unionName", record.getString("unitName"));
|
if (difficultHelp == null) {
|
||||||
docData.put("proxyUserName", record.getString("proxyUserName"));
|
throw new IllegalStateException("待导出的申请记录不存在:" + record.getString("id"));
|
||||||
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<>());
|
|
||||||
}
|
}
|
||||||
|
byte[] bytes = renderApplyDocument(difficultHelp, false);
|
||||||
String fileName = (i + 1) + record.getString("userName") + "申请表.docx";
|
String fileName = (i + 1) + difficultHelp.getUserName() + "申请表.docx";
|
||||||
zipOutputStream.putNextEntry(new ZipEntry(fileName));
|
zipOutputStream.putNextEntry(new ZipEntry(fileName));
|
||||||
|
zipOutputStream.write(bytes);
|
||||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
|
||||||
Configure config = Configure.builder().bind("familyList", policy).build();
|
|
||||||
|
|
||||||
try (InputStream input = sysOfficeTemplateUtil.getTemplate("difficulty_apply")) {
|
|
||||||
zipOutputStream.write(sysOfficeTemplateUtil.renderTemplate(input, docData, config, false, "difficulthelp:batch:" + record.getString("id")));
|
|
||||||
}
|
|
||||||
zipOutputStream.closeEntry();
|
zipOutputStream.closeEntry();
|
||||||
}
|
}
|
||||||
zipOutputStream.flush();
|
zipOutputStream.flush();
|
||||||
@@ -327,11 +297,41 @@ public class DifficultHelpReadingController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("void")
|
@Ok("void")
|
||||||
|
@SaCheckPermission("difficultHelp.reading")
|
||||||
|
public void exportReadingApply(String id, DifficultHelpPageParam pageParam, HttpServletResponse response, Boolean print) throws Exception {
|
||||||
|
Cnd cnd = Cnd.where("id", "=", id);
|
||||||
|
pageParam.buildReadingSearch(cnd, "");
|
||||||
|
if (difficultHelpCommonService.count(cnd) == 0) {
|
||||||
|
throw new RuntimeException("该记录不在当前可查看的范围内,无法导出");
|
||||||
|
}
|
||||||
|
doExportApply(id, response, print);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckLogin
|
||||||
public void doExportApply(String id, HttpServletResponse response, Boolean print) throws Exception {
|
public void doExportApply(String id, HttpServletResponse response, Boolean print) throws Exception {
|
||||||
DifficultHelpInfo difficultHelp = difficultHelpCommonService.fetch(id);
|
DifficultHelpInfo difficultHelp = difficultHelpCommonService.fetch(id);
|
||||||
if (difficultHelp == null) {
|
if (difficultHelp == null) {
|
||||||
throw new RuntimeException("该条记录不存在");
|
throw new RuntimeException("该条记录不存在");
|
||||||
}
|
}
|
||||||
|
boolean ownApply = AuthUtil.hasPermission("difficultHelp.mine")
|
||||||
|
&& SecurityUtil.getUserId().equals(difficultHelp.getCreatedBy());
|
||||||
|
if (!ownApply) {
|
||||||
|
Cnd cnd = Cnd.where("id", "=", id);
|
||||||
|
new DifficultHelpPageParam().buildReadingSearch(cnd, "");
|
||||||
|
if (!AuthUtil.hasPermission("difficultHelp.reading") || difficultHelpCommonService.count(cnd) == 0) {
|
||||||
|
throw new RuntimeException("该记录不在当前可查看的范围内,无法导出");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean pdf = Boolean.TRUE.equals(print);
|
||||||
|
String fileName = FileUtil.mainName(sysOfficeTemplateUtil.getTemplateFileName("difficulty_apply")) + "_" + difficultHelp.getUserName() + "_" +
|
||||||
|
DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + (pdf ? ".pdf" : ".docx");
|
||||||
|
byte[] bytes = renderApplyDocument(difficultHelp, pdf);
|
||||||
|
CommonDownloadUtil.download(fileName, bytes, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] renderApplyDocument(DifficultHelpInfo difficultHelp, boolean pdf) throws Exception {
|
||||||
HashMap<String, Object> docData = new HashMap<>();
|
HashMap<String, Object> docData = new HashMap<>();
|
||||||
|
|
||||||
docData.put("unionName", difficultHelp.getUnitName());
|
docData.put("unionName", difficultHelp.getUnitName());
|
||||||
@@ -364,10 +364,8 @@ public class DifficultHelpReadingController {
|
|||||||
docData.put("applyMoney", difficultHelp.getApplyMoney());
|
docData.put("applyMoney", difficultHelp.getApplyMoney());
|
||||||
docData.put("money", difficultHelp.getMoney());
|
docData.put("money", difficultHelp.getMoney());
|
||||||
fillApplyApprovals(docData, difficultHelp.getId());
|
fillApplyApprovals(docData, difficultHelp.getId());
|
||||||
if (print) {
|
try (InputStream input = getApplyTemplate(templateName)) {
|
||||||
exportAsPDF(templateName, docData, config, difficultHelp, response);
|
return sysOfficeTemplateUtil.renderTemplate(input, docData, config, pdf, "difficulthelp:" + difficultHelp.getId());
|
||||||
} else {
|
|
||||||
exportAsWord(templateName, docData, config, difficultHelp,response);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,30 +442,6 @@ public class DifficultHelpReadingController {
|
|||||||
return new ByteArrayInputStream(templateBytes);
|
return new ByteArrayInputStream(templateBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
private void exportAsPDF(String templateName, HashMap<String, Object> docData,Configure config,
|
|
||||||
DifficultHelpInfo difficultHelp, HttpServletResponse response) throws Exception {
|
|
||||||
String fileName = FileUtil.mainName(sysOfficeTemplateUtil.getTemplateFileName(templateName)) + "_" + difficultHelp.getUserName() + "_" +
|
|
||||||
DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + ".pdf";
|
|
||||||
|
|
||||||
try (InputStream input = getApplyTemplate(templateName)) {
|
|
||||||
byte[] bytes = sysOfficeTemplateUtil.renderTemplate(input, docData, config, true, "difficulthelp:" + difficultHelp.getId());
|
|
||||||
CommonDownloadUtil.download(fileName, bytes, response);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
private void exportAsWord(String templateName, HashMap<String, Object> docData,Configure config,
|
|
||||||
DifficultHelpInfo difficultHelp, HttpServletResponse response) throws Exception {
|
|
||||||
String fileName = FileUtil.mainName(sysOfficeTemplateUtil.getTemplateFileName(templateName)) + "_" + difficultHelp.getUserName() + "_" +
|
|
||||||
DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + ".docx";
|
|
||||||
|
|
||||||
try (InputStream input = getApplyTemplate(templateName)) {
|
|
||||||
byte[] bytes = sysOfficeTemplateUtil.renderTemplate(input, docData, config, false, "difficulthelp:" + difficultHelp.getId());
|
|
||||||
CommonDownloadUtil.download(fileName, bytes, response);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("void")
|
@Ok("void")
|
||||||
@SaCheckPermission("difficultHelp.reading")
|
@SaCheckPermission("difficultHelp.reading")
|
||||||
@@ -493,6 +467,7 @@ public class DifficultHelpReadingController {
|
|||||||
info.subsidyStandards,
|
info.subsidyStandards,
|
||||||
info.bankOfDeposit,
|
info.bankOfDeposit,
|
||||||
info.bankCardNum,
|
info.bankCardNum,
|
||||||
|
info.money,
|
||||||
info.applyCount
|
info.applyCount
|
||||||
FROM
|
FROM
|
||||||
difficult_help_info info
|
difficult_help_info info
|
||||||
@@ -500,16 +475,44 @@ public class DifficultHelpReadingController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
pageParam.buildSearch(cnd, "info.", false);
|
pageParam.buildReadingSearch(cnd, "info.");
|
||||||
cnd.groupBy("info.id");
|
cnd.groupBy("info.id");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = difficultHelpCommonService.listMap(sql);
|
List<NutMap> list = difficultHelpCommonService.listMap(sql);
|
||||||
Sys_user user = sysUserService.fetch(SecurityUtil.getUserId());
|
|
||||||
|
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
list.get(i).put("index", (i + 1));
|
list.get(i).put("index", (i + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String fileName = "困难慰问汇总表_" + DateUtil.format(new Date(), "yyyyMMdd");
|
||||||
|
if ("xlsx".equals(flag)) {
|
||||||
|
String[][] columns = {
|
||||||
|
{"序号", "index"}, {"姓名", "userName"}, {"工号", "loginName"},
|
||||||
|
{"性别", "sex"}, {"身份证号", "idCard"}, {"年龄", "age"},
|
||||||
|
{"职务", "position"}, {"职称", "officialCapacity"}, {"所属单位", "unitName"},
|
||||||
|
{"手机号码", "mobile"}, {"生活致困原因", "reason"}, {"级别", "level"},
|
||||||
|
{"家庭年总收入", "homeIncome"}, {"家庭人数", "homeNumber"},
|
||||||
|
{"困难类型", "subsidyStandards"}, {"开户行", "bankOfDeposit"},
|
||||||
|
{"银行卡号", "bankCardNum"}, {"实际金额(元)", "money"}, {"申请次数", "applyCount"}
|
||||||
|
};
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
for (String[] column : columns) {
|
||||||
|
entities.add(new ExcelExportEntity(column[0], column[1], 20));
|
||||||
|
}
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
exportParams.setTitle("困难帮扶汇总表");
|
||||||
|
exportParams.setSheetName("汇总数据");
|
||||||
|
try (Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list)) {
|
||||||
|
CommonDownloadUtil.download(fileName + ".xlsx", workbook, response);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("导出Excel汇总表失败", e);
|
||||||
|
throw new RuntimeException("导出Excel汇总表失败:" + e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Sys_user user = sysUserService.fetch(SecurityUtil.getUserId());
|
||||||
result.put("schoolName", "中国地址大学(武汉)");
|
result.put("schoolName", "中国地址大学(武汉)");
|
||||||
result.put("year", DateUtil.format(new Date(), "yyyy"));
|
result.put("year", DateUtil.format(new Date(), "yyyy"));
|
||||||
result.put("applyTime", DateUtil.format(new Date(), "yyyy年MM月dd日"));
|
result.put("applyTime", DateUtil.format(new Date(), "yyyy年MM月dd日"));
|
||||||
@@ -517,32 +520,12 @@ public class DifficultHelpReadingController {
|
|||||||
result.put("mobile", user.getMobile());
|
result.put("mobile", user.getMobile());
|
||||||
result.put("da", list);
|
result.put("da", list);
|
||||||
|
|
||||||
String resource;
|
String resource = "difficulty_summary";
|
||||||
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())) {
|
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
resource = "difficulty_summary_school";
|
resource = "difficulty_summary_school";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
String fileName = "困难慰问汇总表_" + DateUtil.format(new Date(), "yyyyMMdd");
|
if ("docx".equals(flag)) {
|
||||||
|
|
||||||
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 (InputStream input = sysOfficeTemplateUtil.getTemplate(resource)) {
|
try (InputStream input = sysOfficeTemplateUtil.getTemplate(resource)) {
|
||||||
Configure config = Configure.builder()
|
Configure config = Configure.builder()
|
||||||
.bind("da", new LoopRowTableRenderPolicy())
|
.bind("da", new LoopRowTableRenderPolicy())
|
||||||
|
|||||||
+1
@@ -79,6 +79,7 @@ public class DifficultHelpSecondApprovalController {
|
|||||||
info.subsidyStandards,
|
info.subsidyStandards,
|
||||||
LEFT(info.applyTime, 10) AS applyTime,
|
LEFT(info.applyTime, 10) AS applyTime,
|
||||||
info.applyCount,
|
info.applyCount,
|
||||||
|
info.applyMoney,
|
||||||
info.mobile,
|
info.mobile,
|
||||||
ins.id AS instanceId,
|
ins.id AS instanceId,
|
||||||
ins.businessNo,
|
ins.businessNo,
|
||||||
|
|||||||
+2
@@ -82,6 +82,8 @@ public class DifficultHelpThirdApprovalController {
|
|||||||
info.subsidyStandards,
|
info.subsidyStandards,
|
||||||
LEFT(info.applyTime, 10) AS applyTime,
|
LEFT(info.applyTime, 10) AS applyTime,
|
||||||
info.applyCount,
|
info.applyCount,
|
||||||
|
info.applyMoney,
|
||||||
|
info.money,
|
||||||
info.mobile,
|
info.mobile,
|
||||||
ins.id AS instanceId,
|
ins.id AS instanceId,
|
||||||
ins.businessNo,
|
ins.businessNo,
|
||||||
|
|||||||
+2
@@ -21,6 +21,8 @@ public interface DifficultHelpCommonService extends BaseService<DifficultHelpInf
|
|||||||
|
|
||||||
void validateApplyUser(DifficultHelpInfo difficultHelpInfo);
|
void validateApplyUser(DifficultHelpInfo difficultHelpInfo);
|
||||||
|
|
||||||
|
void validateApplyUser(DifficultHelpInfo difficultHelpInfo, boolean requireApplyMoney);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入实际金额数据处理
|
* 导入实际金额数据处理
|
||||||
* @param file 文件
|
* @param file 文件
|
||||||
|
|||||||
+22
-11
@@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.exception.BaseException;
|
import com.budwk.app.base.exception.BaseException;
|
||||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
@@ -56,6 +55,11 @@ public class DifficultHelpCommonServiceImpl extends BaseServiceImpl<DifficultHel
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void validateApplyUser(DifficultHelpInfo difficultHelpInfo) {
|
public void validateApplyUser(DifficultHelpInfo difficultHelpInfo) {
|
||||||
|
validateApplyUser(difficultHelpInfo, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void validateApplyUser(DifficultHelpInfo difficultHelpInfo, boolean requireApplyMoney) {
|
||||||
if (difficultHelpInfo == null || StrUtil.isBlank(difficultHelpInfo.getUserId())) {
|
if (difficultHelpInfo == null || StrUtil.isBlank(difficultHelpInfo.getUserId())) {
|
||||||
throw new BaseException("请选择受助人");
|
throw new BaseException("请选择受助人");
|
||||||
}
|
}
|
||||||
@@ -65,19 +69,29 @@ public class DifficultHelpCommonServiceImpl extends BaseServiceImpl<DifficultHel
|
|||||||
throw new BaseException("只能查看他人代为申请的记录,不能修改或提交");
|
throw new BaseException("只能查看他人代为申请的记录,不能修改或提交");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (difficultHelpInfo.getApplyMoney() == null || !Double.isFinite(difficultHelpInfo.getApplyMoney())
|
if ((requireApplyMoney || difficultHelpInfo.getApplyMoney() != null)
|
||||||
|| difficultHelpInfo.getApplyMoney() <= 0) {
|
&& (difficultHelpInfo.getApplyMoney() == null || !Double.isFinite(difficultHelpInfo.getApplyMoney())
|
||||||
|
|| difficultHelpInfo.getApplyMoney() <= 0)) {
|
||||||
throw new BaseException("请填写大于零的申请金额");
|
throw new BaseException("请填写大于零的申请金额");
|
||||||
}
|
}
|
||||||
if (difficultHelpInfo.getUserId().equals(SecurityUtil.getUserId())) {
|
if (difficultHelpInfo.getUserId().equals(SecurityUtil.getUserId())) {
|
||||||
|
if (!AuthUtil.hasPermission("difficult_assistance_self")
|
||||||
|
&& !AuthUtil.hasPermission("difficult_assistance_school")
|
||||||
|
&& !AuthUtil.hasPermission("difficult_assistance_union")) {
|
||||||
|
throw new BaseException("没有帮扶申请权限");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
boolean schoolScope = AuthUtil.hasPermission("difficult_assistance_school");
|
||||||
throw new BaseException("只有分工会主席可以替他人申请");
|
if (!schoolScope && !AuthUtil.hasPermission("difficult_assistance_union")) {
|
||||||
|
throw new BaseException("没有代申请权限");
|
||||||
}
|
}
|
||||||
View_user recipient = dao().fetch(View_user.class, Cnd.where("id", "=", difficultHelpInfo.getUserId()));
|
View_user recipient = dao().fetch(View_user.class, Cnd.where("id", "=", difficultHelpInfo.getUserId()));
|
||||||
if (recipient == null || StrUtil.isBlank(SecurityUtil.getUnionId())
|
if (recipient == null) {
|
||||||
|| !SecurityUtil.getUnionId().equals(recipient.getUnionId())) {
|
throw new BaseException("受助人不存在");
|
||||||
|
}
|
||||||
|
if (!schoolScope && (StrUtil.isBlank(SecurityUtil.getUnionId())
|
||||||
|
|| !SecurityUtil.getUnionId().equals(recipient.getUnionId()))) {
|
||||||
throw new BaseException("只能替本分工会人员申请");
|
throw new BaseException("只能替本分工会人员申请");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -123,10 +137,7 @@ public class DifficultHelpCommonServiceImpl extends BaseServiceImpl<DifficultHel
|
|||||||
|
|
||||||
// 2. 查询符合条件的 DifficultHelpInfo 记录
|
// 2. 查询符合条件的 DifficultHelpInfo 记录
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
pageForm.buildReadingSearch(cnd, "");
|
||||||
cnd.and(Cnd.exps("loginName", "LIKE", "%" + pageForm.getSearchKeyword() + "%")
|
|
||||||
.or("userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"));
|
|
||||||
}
|
|
||||||
List<DifficultHelpInfo> infoList = dao().query(DifficultHelpInfo.class, cnd);
|
List<DifficultHelpInfo> infoList = dao().query(DifficultHelpInfo.class, cnd);
|
||||||
|
|
||||||
// 3. 构建用户缴费索引 (userId -> year -> money)
|
// 3. 构建用户缴费索引 (userId -> year -> money)
|
||||||
|
|||||||
+24
@@ -9,6 +9,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.dao.util.cri.Static;
|
||||||
import org.nutz.lang.Lang;
|
import org.nutz.lang.Lang;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -32,6 +33,29 @@ public class DifficultHelpPageParam extends PageForm {
|
|||||||
|
|
||||||
private List<String> dateRange;
|
private List<String> dateRange;
|
||||||
|
|
||||||
|
public void buildReadingSearch(Cnd cnd, String prefix) {
|
||||||
|
buildSearch(cnd, prefix, false);
|
||||||
|
applyReadingScope(cnd, prefix);
|
||||||
|
String recordPrefix = StrUtil.isBlank(prefix) ? "difficult_help_info." : prefix;
|
||||||
|
cnd.and(new Static("EXISTS (SELECT 1 FROM wf_process_instance reading_instance WHERE reading_instance.businessNo = "
|
||||||
|
+ recordPrefix + "id AND reading_instance.state = 20)"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void applyReadingScope(Cnd cnd, String prefix) {
|
||||||
|
if (AuthUtil.hasPermission("difficult_all_school")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (AuthUtil.hasPermission("difficult_branch_union") && StrUtil.isNotBlank(SecurityUtil.getUnionId())) {
|
||||||
|
cnd.and(prefix + "unionId", "=", SecurityUtil.getUnionId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (AuthUtil.hasPermission("difficult_self") && StrUtil.isNotBlank(SecurityUtil.getUserId())) {
|
||||||
|
cnd.and(prefix + "userId", "=", SecurityUtil.getUserId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cnd.and("1", "=", 0);
|
||||||
|
}
|
||||||
|
|
||||||
public void buildSearch(Cnd cnd, String prefix){
|
public void buildSearch(Cnd cnd, String prefix){
|
||||||
buildSearch(cnd, prefix, true);
|
buildSearch(cnd, prefix, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-9
@@ -83,7 +83,7 @@ public class SpecialCondolenceApplyController {
|
|||||||
public Result save(@Param("data") SpecialCondolence specialcondolence) {
|
public Result save(@Param("data") SpecialCondolence specialcondolence) {
|
||||||
if(StrUtil.isBlank(specialcondolence.getId())) specialcondolence.setCreateTime(DateUtil.now());
|
if(StrUtil.isBlank(specialcondolence.getId())) specialcondolence.setCreateTime(DateUtil.now());
|
||||||
prepareApplication(specialcondolence);
|
prepareApplication(specialcondolence);
|
||||||
specialcondolenceService.saveApplication(specialcondolence);
|
specialcondolenceService.saveDraftApplication(specialcondolence);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,23 +213,20 @@ public class SpecialCondolenceApplyController {
|
|||||||
for (int r = 1; r <= sheet.getLastRowNum(); r++) {
|
for (int r = 1; r <= sheet.getLastRowNum(); r++) {
|
||||||
org.apache.poi.ss.usermodel.Row excelRow = sheet.getRow(r);
|
org.apache.poi.ss.usermodel.Row excelRow = sheet.getRow(r);
|
||||||
if (excelRow == null) continue;
|
if (excelRow == null) continue;
|
||||||
|
String prefix = "慰问对象" + (result.size() + 1) + " ";
|
||||||
cn.hutool.json.JSONObject row = new cn.hutool.json.JSONObject();
|
cn.hutool.json.JSONObject row = new cn.hutool.json.JSONObject();
|
||||||
boolean empty = true;
|
boolean empty = true;
|
||||||
for (int c = 0; c < fields.length; c++) {
|
for (int c = 0; c < fields.length; c++) {
|
||||||
org.apache.poi.ss.usermodel.Cell cell = excelRow.getCell(c);
|
org.apache.poi.ss.usermodel.Cell cell = excelRow.getCell(c);
|
||||||
String value = formatter.formatCellValue(cell).trim();
|
String value = formatter.formatCellValue(cell).trim();
|
||||||
if (c != 1 && cell != null && cell.getCellType() == org.apache.poi.ss.usermodel.CellType.FORMULA) throw new com.budwk.app.base.exception.BaseException("第" + (r + 1) + "行不支持公式,请填写实际值");
|
if (c != 1 && cell != null && cell.getCellType() == org.apache.poi.ss.usermodel.CellType.FORMULA) throw new com.budwk.app.base.exception.BaseException(prefix + "不支持公式,请填写实际值");
|
||||||
if ((c == 2 || c == 5) && cell != null && cell.getCellType() == org.apache.poi.ss.usermodel.CellType.NUMERIC) throw new com.budwk.app.base.exception.BaseException("第" + (r + 1) + "行工号、身份证和收款账户请使用文本格式,避免数字失真");
|
if ((c == 2 || c == 5) && cell != null && cell.getCellType() == org.apache.poi.ss.usermodel.CellType.NUMERIC) throw new com.budwk.app.base.exception.BaseException(prefix + "工号、身份证和收款账户请使用文本格式,避免数字失真");
|
||||||
row.set(fields[c], value);
|
row.set(fields[c], value);
|
||||||
empty = empty && value.isEmpty();
|
empty = empty && value.isEmpty();
|
||||||
}
|
}
|
||||||
if (empty) continue;
|
if (empty) continue;
|
||||||
for (int c = 0; c < fields.length; c++) {
|
if (!com.budwk.app.zhgh.staffbenefit.specialcondolence.service.SpecialCondolenceRecipients.validIdCard(row.getStr("idCard"))) throw new com.budwk.app.base.exception.BaseException(prefix + "身份证号码格式不正确");
|
||||||
if (c != 1 && row.getStr(fields[c]).isEmpty()) throw new com.budwk.app.base.exception.BaseException("第" + (r + 1) + "行:请填写" + headers[c]);
|
if (!row.getStr("bankCardNumber").matches("[0-9]{6,30}")) throw new com.budwk.app.base.exception.BaseException(prefix + "收款账户格式不正确");
|
||||||
}
|
|
||||||
if (!com.budwk.app.zhgh.staffbenefit.specialcondolence.service.SpecialCondolenceRecipients.validIdCard(row.getStr("idCard"))) throw new com.budwk.app.base.exception.BaseException("第" + (r + 1) + "行身份证号码格式不正确");
|
|
||||||
if (!row.getStr("bankCardNumber").matches("[0-9]{6,30}")) throw new com.budwk.app.base.exception.BaseException("第" + (r + 1) + "行收款账户格式不正确");
|
|
||||||
com.budwk.app.zhgh.staffbenefit.specialcondolence.service.SpecialCondolenceRecipients.resolveUser(row, dao, "第" + (r + 1) + "行:");
|
|
||||||
result.add(row);
|
result.add(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -71,6 +71,7 @@ public class SpecialCondolenceReadController {
|
|||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
info.*,
|
info.*,
|
||||||
|
(SELECT COUNT(*) FROM special_condolence_recipient recipient WHERE recipient.applyId = info.id AND recipient.delFlag = false) AS recipientCount,
|
||||||
ins.id AS instanceId,
|
ins.id AS instanceId,
|
||||||
type.name as typeName,
|
type.name as typeName,
|
||||||
ins.state instanceState,
|
ins.state instanceState,
|
||||||
|
|||||||
+17
-14
@@ -32,7 +32,7 @@ public final class SpecialCondolenceRecipients {
|
|||||||
row.set("type", info.getType());
|
row.set("type", info.getType());
|
||||||
row.set("money", info.getPerMoney().toPlainString());
|
row.set("money", info.getPerMoney().toPlainString());
|
||||||
row.set("occurTime", info.getOccurTime());
|
row.set("occurTime", info.getOccurTime());
|
||||||
resolveUser(row, dao, prefix);
|
if (cn.hutool.core.util.StrUtil.isNotBlank(row.getStr("helpUserId"))) resolveUser(row, dao, prefix);
|
||||||
String[] fields = {"helpUserName", "type", "idCard", "bankOfDeposit", "bankUserName", "bankCardNumber", "money", "occurTime"};
|
String[] fields = {"helpUserName", "type", "idCard", "bankOfDeposit", "bankUserName", "bankCardNumber", "money", "occurTime"};
|
||||||
for (String field : fields) {
|
for (String field : fields) {
|
||||||
String value = row.getStr(field);
|
String value = row.getStr(field);
|
||||||
@@ -80,24 +80,27 @@ public final class SpecialCondolenceRecipients {
|
|||||||
if (cn.hutool.core.util.StrUtil.isNotBlank(userId)) {
|
if (cn.hutool.core.util.StrUtil.isNotBlank(userId)) {
|
||||||
user = dao.fetch(com.budwk.app.sys.views.View_user.class, org.nutz.dao.Cnd.where("id", "=", userId));
|
user = dao.fetch(com.budwk.app.sys.views.View_user.class, org.nutz.dao.Cnd.where("id", "=", userId));
|
||||||
} else {
|
} else {
|
||||||
org.nutz.dao.Cnd identity = org.nutz.dao.Cnd.where("unionId", "=", unionId)
|
|
||||||
.and("idCard", "=", row.getStr("idCard")).and("username", "=", row.getStr("helpUserName"));
|
|
||||||
java.util.List<com.budwk.app.sys.views.View_user> dispatched = dao.query(com.budwk.app.sys.views.View_user.class,
|
|
||||||
identity.and("personType", "=", "劳务派遣人员"));
|
|
||||||
if (dispatched.size() > 1) throw new BaseException(prefix + "劳务派遣人员身份重复,请核对档案");
|
|
||||||
if (dispatched.size() == 1) {
|
|
||||||
user = dispatched.get(0);
|
|
||||||
} else {
|
|
||||||
if (cn.hutool.core.util.StrUtil.isBlank(row.getStr("helpLoginName"))) throw new BaseException(prefix + "普通人员必须填写工号");
|
|
||||||
java.util.List<com.budwk.app.sys.views.View_user> users = dao.query(com.budwk.app.sys.views.View_user.class,
|
java.util.List<com.budwk.app.sys.views.View_user> users = dao.query(com.budwk.app.sys.views.View_user.class,
|
||||||
org.nutz.dao.Cnd.where("unionId", "=", unionId).and("loginname", "=", row.getStr("helpLoginName"))
|
org.nutz.dao.Cnd.where("idCard", "=", row.getStr("idCard"))
|
||||||
.and("username", "=", row.getStr("helpUserName")).and("idCard", "=", row.getStr("idCard")));
|
.and("username", "=", row.getStr("helpUserName")));
|
||||||
if (users.size() != 1) throw new BaseException(prefix + "工号、姓名、身份证不匹配或不属于申请人本工会");
|
if (users.isEmpty()) throw new BaseException(prefix + "姓名、身份证与人员档案不匹配");
|
||||||
user = users.get(0);
|
java.util.List<com.budwk.app.sys.views.View_user> members = users.stream()
|
||||||
|
.filter(member -> java.util.Objects.equals(member.getUnionId(), unionId))
|
||||||
|
.collect(java.util.stream.Collectors.toList());
|
||||||
|
if (members.isEmpty()) throw new BaseException(prefix + "只能选择申请人本工会人员");
|
||||||
|
String loginName = row.getStr("helpLoginName");
|
||||||
|
if (cn.hutool.core.util.StrUtil.isNotBlank(loginName)) {
|
||||||
|
members = members.stream().filter(member -> "劳务派遣人员".equals(member.getPersonType())
|
||||||
|
|| java.util.Objects.equals(member.getLoginname(), loginName))
|
||||||
|
.collect(java.util.stream.Collectors.toList());
|
||||||
}
|
}
|
||||||
|
if (members.isEmpty()) throw new BaseException(prefix + "工号与慰问对象不一致");
|
||||||
|
if (members.size() > 1) throw new BaseException(prefix + "人员身份重复,请核对档案");
|
||||||
|
user = members.get(0);
|
||||||
}
|
}
|
||||||
if (user == null) throw new BaseException(prefix + "慰问对象不存在");
|
if (user == null) throw new BaseException(prefix + "慰问对象不存在");
|
||||||
if (!java.util.Objects.equals(user.getUnionId(), unionId)) throw new BaseException(prefix + "只能选择申请人本工会人员");
|
if (!java.util.Objects.equals(user.getUnionId(), unionId)) throw new BaseException(prefix + "只能选择申请人本工会人员");
|
||||||
|
if (!"劳务派遣人员".equals(user.getPersonType()) && cn.hutool.core.util.StrUtil.isBlank(row.getStr("helpLoginName"))) throw new BaseException(prefix + "普通人员必须填写工号");
|
||||||
if (!"劳务派遣人员".equals(user.getPersonType()) && (cn.hutool.core.util.StrUtil.isBlank(row.getStr("helpLoginName")) || !java.util.Objects.equals(user.getLoginname(), row.getStr("helpLoginName")))) throw new BaseException(prefix + "工号与慰问对象不一致");
|
if (!"劳务派遣人员".equals(user.getPersonType()) && (cn.hutool.core.util.StrUtil.isBlank(row.getStr("helpLoginName")) || !java.util.Objects.equals(user.getLoginname(), row.getStr("helpLoginName")))) throw new BaseException(prefix + "工号与慰问对象不一致");
|
||||||
if (cn.hutool.core.util.StrUtil.isNotBlank(user.getIdCard()) && !user.getIdCard().equalsIgnoreCase(row.getStr("idCard"))) throw new BaseException(prefix + "身份证号码与所选人员不一致");
|
if (cn.hutool.core.util.StrUtil.isNotBlank(user.getIdCard()) && !user.getIdCard().equalsIgnoreCase(row.getStr("idCard"))) throw new BaseException(prefix + "身份证号码与所选人员不一致");
|
||||||
row.set("helpUserId", user.getId());
|
row.set("helpUserId", user.getId());
|
||||||
|
|||||||
+1
@@ -12,6 +12,7 @@ import com.budwk.app.zhgh.staffbenefit.specialcondolence.model.SpecialCondolence
|
|||||||
*/
|
*/
|
||||||
public interface SpecialCondolenceService extends BaseService<SpecialCondolence> {
|
public interface SpecialCondolenceService extends BaseService<SpecialCondolence> {
|
||||||
void saveApplication(SpecialCondolence info);
|
void saveApplication(SpecialCondolence info);
|
||||||
|
void saveDraftApplication(SpecialCondolence info);
|
||||||
SpecialCondolence loadApplication(String id);
|
SpecialCondolence loadApplication(String id);
|
||||||
void deleteApplication(String id);
|
void deleteApplication(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
+32
-9
@@ -3,6 +3,7 @@ package com.budwk.app.zhgh.staffbenefit.specialcondolence.service.impl;
|
|||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
import com.budwk.app.zhgh.staffbenefit.specialcondolence.model.SpecialCondolenceRecipient;
|
import com.budwk.app.zhgh.staffbenefit.specialcondolence.model.SpecialCondolenceRecipient;
|
||||||
import com.budwk.app.zhgh.staffbenefit.specialcondolence.service.SpecialCondolenceRecipients;
|
import com.budwk.app.zhgh.staffbenefit.specialcondolence.service.SpecialCondolenceRecipients;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
@@ -35,6 +36,28 @@ public class SpecialCondolenceServiceImpl extends BaseServiceImpl<SpecialCondole
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public void saveApplication(SpecialCondolence info) {
|
public void saveApplication(SpecialCondolence info) {
|
||||||
SpecialCondolenceRecipients.prepare(info, dao());
|
SpecialCondolenceRecipients.prepare(info, dao());
|
||||||
|
persistApplication(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public void saveDraftApplication(SpecialCondolence info) {
|
||||||
|
if (info.getRecipients() == null) info.setRecipients(new ArrayList<>());
|
||||||
|
info.getRecipients().removeIf(row -> row == null || java.util.stream.Stream.of(
|
||||||
|
"helpUserId", "helpUserName", "helpLoginName", "idCard", "bankOfDeposit", "bankUserName", "bankCardNumber")
|
||||||
|
.allMatch(field -> StrUtil.isBlank(row.getStr(field))));
|
||||||
|
for (JSONObject row : info.getRecipients()) {
|
||||||
|
row.set("type", info.getType());
|
||||||
|
row.set("typeCode", info.getTypeCode());
|
||||||
|
row.set("way", info.getWay());
|
||||||
|
row.set("money", info.getPerMoney());
|
||||||
|
row.set("occurTime", info.getOccurTime());
|
||||||
|
}
|
||||||
|
info.setMoney(info.getPerMoney() == null ? null : info.getPerMoney().multiply(BigDecimal.valueOf(info.getRecipients().size())).doubleValue());
|
||||||
|
persistApplication(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void persistApplication(SpecialCondolence info) {
|
||||||
dao().insertOrUpdate(info);
|
dao().insertOrUpdate(info);
|
||||||
dao().clear(SpecialCondolenceRecipient.class,
|
dao().clear(SpecialCondolenceRecipient.class,
|
||||||
Cnd.where("applyId", "=", info.getId()));
|
Cnd.where("applyId", "=", info.getId()));
|
||||||
@@ -42,20 +65,20 @@ public class SpecialCondolenceServiceImpl extends BaseServiceImpl<SpecialCondole
|
|||||||
for (JSONObject row : info.getRecipients()) {
|
for (JSONObject row : info.getRecipients()) {
|
||||||
SpecialCondolenceRecipient person = new SpecialCondolenceRecipient();
|
SpecialCondolenceRecipient person = new SpecialCondolenceRecipient();
|
||||||
person.setApplyId(info.getId());
|
person.setApplyId(info.getId());
|
||||||
person.setHelpUserName(row.getStr("helpUserName"));
|
person.setHelpUserName(row.getStr("helpUserName", ""));
|
||||||
person.setHelpUserId(row.getStr("helpUserId"));
|
person.setHelpUserId(row.getStr("helpUserId", ""));
|
||||||
person.setHelpLoginName(row.getStr("helpLoginName"));
|
person.setHelpLoginName(row.getStr("helpLoginName"));
|
||||||
person.setPersonType(row.getStr("personType"));
|
person.setPersonType(row.getStr("personType"));
|
||||||
person.setType(row.getStr("type"));
|
person.setType(row.getStr("type", ""));
|
||||||
person.setTypeName(row.getStr("typeName"));
|
person.setTypeName(row.getStr("typeName"));
|
||||||
person.setTypeCode(row.getStr("typeCode"));
|
person.setTypeCode(row.getStr("typeCode"));
|
||||||
person.setWay(row.getStr("way"));
|
person.setWay(row.getStr("way"));
|
||||||
person.setIdCard(row.getStr("idCard"));
|
person.setIdCard(row.getStr("idCard", ""));
|
||||||
person.setBankOfDeposit(row.getStr("bankOfDeposit"));
|
person.setBankOfDeposit(row.getStr("bankOfDeposit", ""));
|
||||||
person.setBankUserName(row.getStr("bankUserName"));
|
person.setBankUserName(row.getStr("bankUserName", ""));
|
||||||
person.setBankCardNumber(row.getStr("bankCardNumber"));
|
person.setBankCardNumber(row.getStr("bankCardNumber", ""));
|
||||||
person.setMoney(new BigDecimal(row.getStr("money")));
|
person.setMoney(row.getBigDecimal("money", BigDecimal.ZERO));
|
||||||
person.setOccurTime(row.getStr("occurTime"));
|
person.setOccurTime(row.getStr("occurTime", ""));
|
||||||
person.setSortNum(sort++);
|
person.setSortNum(sort++);
|
||||||
dao().insert(person);
|
dao().insert(person);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
INSERT INTO sys_menu (id, parentId, path, name, aliasName, type, href, target, icon, showit, disabled, permission, note, location, hasChildren, createdBy, createdAt, updatedBy, updatedAt, delFlag, processKey, platform, moduleId, isQuickEntry, picIcon, initialPinyinName, isRecommendApp, isRecommendService) VALUES ('184d56fd537041caa2bde800d0d32436', '90bf20d9065e4e11864952ea18544c25', '009000040003', '个人范围', null, 'data', null, null, null, false, false, 'self', null, 1027, false, '17a7f8ad3ee947b4a26175049a9c253d', 1793418331288, '17a7f8ad3ee947b4a26175049a9c253d', 1793418331288, false, null, 'PC', null, false, null, null, false, false);
|
||||||
|
INSERT INTO sys_menu (id, parentId, path, name, aliasName, type, href, target, icon, showit, disabled, permission, note, location, hasChildren, createdBy, createdAt, updatedBy, updatedAt, delFlag, processKey, platform, moduleId, isQuickEntry, picIcon, initialPinyinName, isRecommendApp, isRecommendService) VALUES ('df87d83ed3184019b3872139c15b53ec', '90bf20d9065e4e11864952ea18544c25', '009000040002', '分工会范围', null, 'data', null, null, null, false, false, 'branch_union', null, 1026, false, '17a7f8ad3ee947b4a26175049a9c253d', 1793418331286, '17a7f8ad3ee947b4a26175049a9c253d', 1793418331286, false, null, 'PC', null, false, null, null, false, false);
|
||||||
|
INSERT INTO sys_menu (id, parentId, path, name, aliasName, type, href, target, icon, showit, disabled, permission, note, location, hasChildren, createdBy, createdAt, updatedBy, updatedAt, delFlag, processKey, platform, moduleId, isQuickEntry, picIcon, initialPinyinName, isRecommendApp, isRecommendService) VALUES ('f2a75d2494724978b5325075815808c9', '90bf20d9065e4e11864952ea18544c25', '009000040001', '全校范围', null, 'data', null, null, null, false, false, 'all_school', null, 1025, false, '17a7f8ad3ee947b4a26175049a9c253d', 1793418331280, '17a7f8ad3ee947b4a26175049a9c253d', 1793418331280, false, null, 'PC', null, false, null, null, false, false);
|
||||||
|
INSERT INTO sys_role_menu (roleId, menuId) VALUES ('fd753e8a8c5a404e8e00ef8e0b0c69da', 'df87d83ed3184019b3872139c15b53ec');
|
||||||
|
INSERT INTO sys_role_menu (roleId, menuId) VALUES ('494ac71eb8b44d0e99e19b7fde6bd469', 'f2a75d2494724978b5325075815808c9');
|
||||||
|
INSERT INTO sys_role_menu (roleId, menuId) VALUES ('6aece46b946e4fb9ac4cb15c0cd8c3e6', 'f2a75d2494724978b5325075815808c9');
|
||||||
|
INSERT INTO sys_role_menu (roleId, menuId) VALUES ('b3854469e6f44901b22bb791cb538431', 'f2a75d2494724978b5325075815808c9');
|
||||||
@@ -11,25 +11,25 @@
|
|||||||
$.ajaxSetup({
|
$.ajaxSetup({
|
||||||
contentType: "application/x-www-form-urlencoded;charset=utf-8",
|
contentType: "application/x-www-form-urlencoded;charset=utf-8",
|
||||||
success: function (response, textStatus, jqXHR) {
|
success: function (response, textStatus, jqXHR) {
|
||||||
if (response.code !== 0) {
|
if (response && typeof response === "object" && response.code !== undefined && response.code !== 0) {
|
||||||
this.$message.error(response.msg)
|
Vue.prototype.$message.error(response.msg)
|
||||||
} else {
|
} else {
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (v1) {
|
error: function (v1) {
|
||||||
this.$message.error(v1.status + " " + v1.statusText)
|
Vue.prototype.$message.error(v1.status + " " + v1.statusText)
|
||||||
},
|
},
|
||||||
complete: function (XMLHttpRequest, textStatus) {
|
complete: function (XMLHttpRequest, textStatus) {
|
||||||
var sessionstatus = XMLHttpRequest.getResponseHeader("loginStatus") //通过XMLHttpRequest取得响应头,sessionstatus,
|
var sessionstatus = XMLHttpRequest.getResponseHeader("loginStatus") //通过XMLHttpRequest取得响应头,sessionstatus,
|
||||||
if (sessionstatus == "accessDenied") {
|
if (sessionstatus == "accessDenied") {
|
||||||
this.$message({
|
Vue.prototype.$message({
|
||||||
message: "\u767b\u5f55\u5931\u6548\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u91cd\u65b0\u767b\u5f55",
|
message: "\u767b\u5f55\u5931\u6548\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u91cd\u65b0\u767b\u5f55",
|
||||||
type: "error"
|
type: "error"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (sessionstatus == "unauthorized") {
|
if (sessionstatus == "unauthorized") {
|
||||||
this.$message({
|
Vue.prototype.$message({
|
||||||
message: "\u6ca1\u6709\u6743\u9650",
|
message: "\u6ca1\u6709\u6743\u9650",
|
||||||
type: "error"
|
type: "error"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div style="padding: 0px 16px" class="clearfix">
|
<div style="padding: 0px 16px" class="clearfix">
|
||||||
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="userScopeDialog = false">返回</el-button>
|
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="userScopeDialog = false">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs tab-position="top" v-model="activeName" @tab-click="handleClick" style="margin: 20px">
|
<el-tabs tab-position="top" v-model="activeName" @tab-click="handleClick" :before-leave="beforeTabLeave" style="margin: 20px">
|
||||||
<el-tab-pane label="人员设置" name="1">
|
<el-tab-pane label="人员设置" name="1">
|
||||||
<template>
|
<template>
|
||||||
<user-scope ref="userScope" @group_change="group_change" :group_id.sync="groupId"></user-scope>
|
<user-scope ref="userScope" @group_change="group_change" :group_id.sync="groupId"></user-scope>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="人员调整" name="2">
|
<el-tab-pane label="人员调整" name="2">
|
||||||
<user-data-scope @group_change="group_change" ref="userDataScope"></user-data-scope>
|
<user-data-scope v-if="activeName === '2'" @group_change="group_change" ref="userDataScope"></user-data-scope>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
@@ -32,9 +32,19 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
beforeTabLeave(name) {
|
||||||
|
const permission = name === "2" ? "activity.basic.user" : "activity.basic.scope"
|
||||||
|
if (!this.$auth.hasRole("SYSADMIN") && !this.$auth.hasPermission(permission)) {
|
||||||
|
this.$message.error("无此权限:" + permission)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
handleClick() {
|
handleClick() {
|
||||||
if (this.activeName === "2") {
|
if (this.activeName === "2") {
|
||||||
|
if (this.$refs.userDataScope) {
|
||||||
this.$refs.userDataScope.getActivityGroup()
|
this.$refs.userDataScope.getActivityGroup()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$refs.userScope.getActivityGroup()
|
this.$refs.userScope.getActivityGroup()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -680,6 +680,10 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
doSetActivityUser() {
|
doSetActivityUser() {
|
||||||
|
if (!this.$auth.hasRole("SYSADMIN") && !this.$auth.hasPermission("activity.basic.scope")) {
|
||||||
|
this.$message.error("无此权限:activity.basic.scope")
|
||||||
|
return
|
||||||
|
}
|
||||||
// 方法级状态保护与整页遮罩共同阻止慢请求期间的重复确认。
|
// 方法级状态保护与整页遮罩共同阻止慢请求期间的重复确认。
|
||||||
if (this.settingLoading) {
|
if (this.settingLoading) {
|
||||||
return
|
return
|
||||||
@@ -711,11 +715,15 @@ module.exports = {
|
|||||||
spinner: "el-icon-loading",
|
spinner: "el-icon-loading",
|
||||||
background: "rgba(255, 255, 255, 0.65)"
|
background: "rgba(255, 255, 255, 0.65)"
|
||||||
})
|
})
|
||||||
|
Promise.resolve().then(() => {
|
||||||
const pageForm = this.normalizePageForm(this.pageForm)
|
const pageForm = this.normalizePageForm(this.pageForm)
|
||||||
Object.assign(pageForm, this.formData)
|
Object.assign(pageForm, this.formData)
|
||||||
|
return $.ajax({
|
||||||
$.post("/platform/activity/basic/scope/doSetActivityUser", {
|
url: "/platform/activity/basic/scope/doSetActivityUser",
|
||||||
data: JSON.stringify(pageForm)
|
type: "POST",
|
||||||
|
data: { data: JSON.stringify(pageForm) },
|
||||||
|
success: () => {}
|
||||||
|
})
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
if (resp.code !== 0) {
|
if (resp.code !== 0) {
|
||||||
// 将后端业务错误转入统一失败分支,直接展示接口返回的真实原因。
|
// 将后端业务错误转入统一失败分支,直接展示接口返回的真实原因。
|
||||||
@@ -741,7 +749,7 @@ module.exports = {
|
|||||||
? error.message
|
? error.message
|
||||||
: "设置活动人员失败"
|
: "设置活动人员失败"
|
||||||
this.$message.error(errorMessage)
|
this.$message.error(errorMessage)
|
||||||
}).always(() => {
|
}).finally(() => {
|
||||||
this.settingLoading = false
|
this.settingLoading = false
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -25,10 +25,7 @@ module.exports = {
|
|||||||
watch: {
|
watch: {
|
||||||
value: {
|
value: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val) {
|
this.signatureContent = val || null
|
||||||
this.signatureContent = val
|
|
||||||
this.$emit("input", this.signatureContent)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
@@ -62,8 +59,11 @@ module.exports = {
|
|||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
throw new Error("签字信息加载失败")
|
throw new Error("签字信息加载失败")
|
||||||
}
|
}
|
||||||
this.signatureContent = res.data && res.data.signature
|
// 已保存的业务签字或刚收到的扫码签字优先,默认签名仅补充空值。
|
||||||
|
if (!this.value && !this.signatureContent && res.data && res.data.signature) {
|
||||||
|
this.signatureContent = res.data.signature
|
||||||
this.$emit("input", this.signatureContent)
|
this.$emit("input", this.signatureContent)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 返回等待完成的 Promise;连接成功、等待30秒或组件销毁时结束等待。
|
// 返回等待完成的 Promise;连接成功、等待30秒或组件销毁时结束等待。
|
||||||
|
|||||||
@@ -3,8 +3,12 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
|||||||
<div>
|
<div>
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<snaker-start slot="header" label="文化活动申报" define_key="WHHD"
|
<div slot="header" v-if="activity_type===40002||activity_type===40003"
|
||||||
v-if="activity_type===40002||activity_type===40003"></snaker-start>
|
style="display: flex; align-items: center; justify-content: space-between; width: 100%">
|
||||||
|
<h3 style="color: var(--color-primary); margin: 0">文化活动申报</h3>
|
||||||
|
<el-link type="primary" @click="$refs.activityChartRef.onOpen('WHHD')">流程图</el-link>
|
||||||
|
</div>
|
||||||
|
<snaker-chart v-if="activity_type===40002||activity_type===40003" ref="activityChartRef"></snaker-chart>
|
||||||
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="170px"
|
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="170px"
|
||||||
ref="addForm" v-loading="formLoading">
|
ref="addForm" v-loading="formLoading">
|
||||||
<el-tabs tab-position="top" v-model="activeName">
|
<el-tabs tab-position="top" v-model="activeName">
|
||||||
@@ -171,7 +175,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
@click="$refs.drawerUserScope.userScopeDialog = true"
|
@click="openUserScope"
|
||||||
type="primary">设置
|
type="primary">设置
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -370,12 +374,14 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
<!--
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="报名表单" prop="formConfig"
|
<el-form-item label="报名表单" prop="formConfig"
|
||||||
v-if="formData.isEnrollSystem&&formData.signUpMethod===1">
|
v-if="formData.isEnrollSystem&&formData.signUpMethod===1">
|
||||||
<custom-form-field v-model="formData.formConfig"></custom-form-field>
|
<custom-form-field v-model="formData.formConfig"></custom-form-field>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
-->
|
||||||
|
|
||||||
<el-col :span="24" v-if="formData.signUpMethod!=null&&formData.isEnrollSystem">
|
<el-col :span="24" v-if="formData.signUpMethod!=null&&formData.isEnrollSystem">
|
||||||
<el-form-item label="封面图" prop="cover">
|
<el-form-item label="封面图" prop="cover">
|
||||||
@@ -977,13 +983,20 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
|||||||
this.$set(this.formData, "time", val)
|
this.$set(this.formData, "time", val)
|
||||||
},
|
},
|
||||||
userChang(id) {
|
userChang(id) {
|
||||||
const userList = this.$refs.userData.options
|
const user = (this.userList || []).find((v) => v.userId === id)
|
||||||
this.$set(this.formData, "mobile", id ? userList.find((v) => v.id === id).mobile : null)
|
this.$set(this.formData, "mobile", id && user ? user.mobile : null)
|
||||||
},
|
},
|
||||||
async getActivityTwoLevelType(code) {
|
async getActivityTwoLevelType(code) {
|
||||||
const {data} = await this.$axios.post("/platform/activity/basic/settings/getActivityTwoLevelType", {code: code})
|
const {data} = await this.$axios.post("/platform/activity/basic/settings/getActivityTwoLevelType", {code: code})
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
|
openUserScope() {
|
||||||
|
if (!this.$auth.hasRole("SYSADMIN") && !this.$auth.hasPermission("activity.basic.scope")) {
|
||||||
|
this.$message.error("无此权限:activity.basic.scope")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$refs.drawerUserScope.userScopeDialog = true
|
||||||
|
},
|
||||||
async getActivityGroup() {
|
async getActivityGroup() {
|
||||||
const {data} = await this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
const {data} = await this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||||
this.activityGroupList = data
|
this.activityGroupList = data
|
||||||
@@ -1048,9 +1061,16 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
|||||||
async findOne(id) {
|
async findOne(id) {
|
||||||
const {data, code, msg} = await this.$axios.post("/platform/activity/culture/infoManage/findOne", {id})
|
const {data, code, msg} = await this.$axios.post("/platform/activity/culture/infoManage/findOne", {id})
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
|
this.userList = []
|
||||||
if (data.userId) {
|
if (data.userId) {
|
||||||
const user = await this.queryUserByIds([data.userId])
|
let loginName = data.loginname
|
||||||
await this.remoteMethod(user[0].loginname)
|
if (!loginName) {
|
||||||
|
const users = await this.queryUserByIds([data.userId])
|
||||||
|
loginName = users && users.length > 0 ? users[0].loginname : null
|
||||||
|
}
|
||||||
|
if (loginName) {
|
||||||
|
await this.remoteMethod(loginName)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data.goods) data.goods = JSON.parse(data.goods)
|
if (data.goods) data.goods = JSON.parse(data.goods)
|
||||||
if (data.billFiles && data.billFiles.length > 0) data.billFiles = JSON.parse(data.billFiles)
|
if (data.billFiles && data.billFiles.length > 0) data.billFiles = JSON.parse(data.billFiles)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
const ACTIVITY_CULTURE_INFO_MANAGE = {
|
const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||||
template: /*language=HTML*/`
|
template: /*language=HTML*/`
|
||||||
<guava ref="guava">
|
<guava ref="guava" @hook:mounted="initTableResize">
|
||||||
<template>
|
<template>
|
||||||
<div class="culture-info-manage-layout">
|
<div class="culture-info-manage-layout">
|
||||||
<el-card class="culture-info-query-card" shadow="never">
|
<el-card class="culture-info-query-card" shadow="never">
|
||||||
@@ -55,21 +55,22 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-for="column in tableColumns">
|
v-for="column in tableColumns">
|
||||||
|
|
||||||
<template scope="{row}" v-if="column.prop=='time2'">
|
<template slot-scope="{row}">
|
||||||
|
<template v-if="column.prop=='time2'">
|
||||||
{{row.applyStartTime}}-{{row.applyEndTime}}
|
{{row.applyStartTime}}-{{row.applyEndTime}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='projectTypeName'">
|
<template v-else-if="column.prop=='projectTypeName'">
|
||||||
{{row.projectTypeName}}({{row.projectTypeCode}})
|
{{row.projectTypeName}}({{row.projectTypeCode}})
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='tussueName'">
|
<template v-else-if="column.prop=='tussueName'">
|
||||||
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||||
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||||
<span v-if="row.activity_type==40001">校工会</span>
|
<span v-if="row.activity_type==40001">校工会</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='isUnseal'">
|
<template v-else-if="column.prop=='isUnseal'">
|
||||||
<el-switch
|
<el-switch
|
||||||
@change="(val)=>{activityStatusChange(row.id,row.isUnseal)}"
|
@change="(val)=>{activityStatusChange(row.id,row.isUnseal)}"
|
||||||
active-color="#13ce66"
|
active-color="#13ce66"
|
||||||
@@ -79,14 +80,14 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
|||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='taskName'">
|
<template v-else-if="column.prop=='taskName'">
|
||||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||||
{{row.taskName}}
|
{{row.taskName}}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
<template v-else-if="column.prop=='instanceState'">
|
||||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||||
size="small"></enum-tag>
|
size="small"></enum-tag>
|
||||||
@@ -94,6 +95,9 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
|||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-else>{{ row[column.prop] }}</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="操作"
|
<el-table-column align="center" header-align="center" label="操作"
|
||||||
@@ -110,7 +114,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
|||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item :command="{type:'edit',row}"
|
<el-dropdown-item :command="{type:'edit',row}"
|
||||||
>
|
v-if="activity_type !== 40003 || !row.instanceId || row.taskKey === 'startTask'">
|
||||||
编辑
|
编辑
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item u
|
<el-dropdown-item u
|
||||||
@@ -214,6 +218,19 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
|||||||
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY
|
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initTableResize() {
|
||||||
|
if (!this.isTemplateManagedActivity) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const listCardBody = this.$refs.guava.$el.querySelector(".culture-info-list-card > .el-card__body")
|
||||||
|
if (listCardBody && window.ResizeObserver) {
|
||||||
|
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
|
||||||
|
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
||||||
|
this.tableResizeObserver.observe(listCardBody)
|
||||||
|
}
|
||||||
|
this.updateTableHeight()
|
||||||
|
window.addEventListener("resize", this.updateTableHeight)
|
||||||
|
},
|
||||||
activityStatusChange(id, isUnseal) {
|
activityStatusChange(id, isUnseal) {
|
||||||
this.$axios.post("/platform/activity/culture/infoManage/activityStatusChange", {
|
this.$axios.post("/platform/activity/culture/infoManage/activityStatusChange", {
|
||||||
id: id,
|
id: id,
|
||||||
@@ -264,7 +281,11 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const cardBody = this.$el.querySelector(".culture-info-list-card > .el-card__body")
|
const root = this.$refs.guava && this.$refs.guava.$el
|
||||||
|
if (!root || typeof root.querySelector !== "function") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const cardBody = root.querySelector(".culture-info-list-card > .el-card__body")
|
||||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -408,19 +429,6 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
|||||||
}
|
}
|
||||||
this.pageData()
|
this.pageData()
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.isTemplateManagedActivity) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const listCardBody = this.$el.querySelector(".culture-info-list-card > .el-card__body")
|
|
||||||
if (listCardBody && window.ResizeObserver) {
|
|
||||||
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
|
|
||||||
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
|
||||||
this.tableResizeObserver.observe(listCardBody)
|
|
||||||
}
|
|
||||||
this.updateTableHeight()
|
|
||||||
window.addEventListener("resize", this.updateTableHeight)
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (this.tableResizeObserver) {
|
if (this.tableResizeObserver) {
|
||||||
this.tableResizeObserver.disconnect()
|
this.tableResizeObserver.disconnect()
|
||||||
|
|||||||
@@ -113,6 +113,9 @@
|
|||||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||||
:value="task.ext.submitType"></dict-tag>
|
:value="task.ext.submitType"></dict-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="审批签字" :span="3" v-if="task.taskFormData && (task.taskFormData.userSign || task.taskFormData.tf_userSign)">
|
||||||
|
<el-image :src="task.taskFormData.userSign || task.taskFormData.tf_userSign" style="height: 80px" fit="contain"></el-image>
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||||
getTaskFormValue(task, "opinion", "tf_opinion") }}
|
getTaskFormValue(task, "opinion", "tf_opinion") }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -126,6 +129,9 @@
|
|||||||
<el-descriptions-item label="办理用户">{{ record.userName }}({{ record.loginName }})</el-descriptions-item>
|
<el-descriptions-item label="办理用户">{{ record.userName }}({{ record.loginName }})</el-descriptions-item>
|
||||||
<el-descriptions-item label="办理时间">{{ record.auditTime }}</el-descriptions-item>
|
<el-descriptions-item label="办理时间">{{ record.auditTime }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="办理结果">{{ getLegacyAuditResult(record) }}</el-descriptions-item>
|
<el-descriptions-item label="办理结果">{{ getLegacyAuditResult(record) }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="审批签字" :span="3" v-if="record.auditSign">
|
||||||
|
<el-image :src="record.auditSign" style="height: 80px" fit="contain"></el-image>
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="办理意见" span="3">{{ record.auditOpinion }}</el-descriptions-item>
|
<el-descriptions-item label="办理意见" span="3">{{ record.auditOpinion }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form-item prop="mode">
|
<el-form-item prop="mode">
|
||||||
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange" style="width: 100%">
|
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange" style="width: 100%">
|
||||||
<el-option label="本人申请" value="1"></el-option>
|
<el-option label="本人申请" value="1"></el-option>
|
||||||
<el-option v-if="$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')"
|
<el-option v-if="canApplyForOthers"
|
||||||
label="替他人申请" value="2"></el-option>
|
label="替他人申请" value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -366,6 +366,11 @@ layout("/layouts/platform.html"){
|
|||||||
subsidizedList: []
|
subsidizedList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
canApplyForOthers() {
|
||||||
|
return this.$auth.hasPermissionOr(['difficult_assistance_school', 'difficult_assistance_union'])
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
textRules(label, max) {
|
textRules(label, max) {
|
||||||
return [{required: true, whitespace: true, max, message: '请填写' + label + ',且不超过' + max + '个字符', trigger: ['blur', 'change']}]
|
return [{required: true, whitespace: true, max, message: '请填写' + label + ',且不超过' + max + '个字符', trigger: ['blur', 'change']}]
|
||||||
@@ -379,9 +384,7 @@ layout("/layouts/platform.html"){
|
|||||||
callback(valid ? undefined : new Error('申请金额须大于零,最多保留两位小数'))
|
callback(valid ? undefined : new Error('申请金额须大于零,最多保留两位小数'))
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
async onSave() {
|
onSave() {
|
||||||
const valid = await this.$refs.formRef.validate().catch(() => false)
|
|
||||||
if (!valid) return
|
|
||||||
this.$confirm("您确定保存吗?", "提示", {
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@@ -443,7 +446,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
// 查询受助人
|
// 查询受助人
|
||||||
queryRecipients(key) {
|
queryRecipients(key) {
|
||||||
if (String(this.formData.mode) !== "2" || !this.$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')) {
|
if (String(this.formData.mode) !== "2" || !this.canApplyForOthers) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$axios.post("/platform/difficultHelp/apply/queryRecipients", {
|
this.$axios.post("/platform/difficultHelp/apply/queryRecipients", {
|
||||||
@@ -478,6 +481,9 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.formData, 'birthday', user.birthday)
|
this.$set(this.formData, 'birthday', user.birthday)
|
||||||
this.$set(this.formData, 'mobile', user.mobile)
|
this.$set(this.formData, 'mobile', user.mobile)
|
||||||
this.$set(this.formData, 'idCard', user.idCard)
|
this.$set(this.formData, 'idCard', user.idCard)
|
||||||
|
this.$set(this.formData, 'position', user.position || '')
|
||||||
|
this.$set(this.formData, 'officialCapacity', user.officialCapacity || '')
|
||||||
|
this.$set(this.formData, 'homeAddress', user.homeAddress || '')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.formData, 'userId', null)
|
this.$set(this.formData, 'userId', null)
|
||||||
@@ -490,6 +496,10 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.formData, 'unionName', null)
|
this.$set(this.formData, 'unionName', null)
|
||||||
this.$set(this.formData, 'birthday', null)
|
this.$set(this.formData, 'birthday', null)
|
||||||
this.$set(this.formData, 'mobile', null)
|
this.$set(this.formData, 'mobile', null)
|
||||||
|
this.$set(this.formData, 'idCard', null)
|
||||||
|
this.$set(this.formData, 'position', '')
|
||||||
|
this.$set(this.formData, 'officialCapacity', '')
|
||||||
|
this.$set(this.formData, 'homeAddress', '')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 申请模式
|
// 申请模式
|
||||||
@@ -514,6 +524,8 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.formData, 'idCard', user.idCard)
|
this.$set(this.formData, 'idCard', user.idCard)
|
||||||
this.$set(this.formData, 'mobile', user.mobile)
|
this.$set(this.formData, 'mobile', user.mobile)
|
||||||
this.$set(this.formData, 'homeAddress', user.homeAddress)
|
this.$set(this.formData, 'homeAddress', user.homeAddress)
|
||||||
|
this.$set(this.formData, 'position', user.position || '')
|
||||||
|
this.$set(this.formData, 'officialCapacity', user.professionalTitle || '')
|
||||||
this.$set(this.formData, 'subsidyStandards', null)
|
this.$set(this.formData, 'subsidyStandards', null)
|
||||||
this.$set(this.formData, 'reason', null)
|
this.$set(this.formData, 'reason', null)
|
||||||
this.$set(this.formData, 'remarks', null)
|
this.$set(this.formData, 'remarks', null)
|
||||||
@@ -624,7 +636,7 @@ layout("/layouts/platform.html"){
|
|||||||
return this.$axios.post('/platform/difficultHelp/apply/getIsCanPlay').then(res => {
|
return this.$axios.post('/platform/difficultHelp/apply/getIsCanPlay').then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
// 新增申请进入页面时,优先校验当前登录人本年度是否已经申请过,已申请则直接拦截新增。
|
// 新增申请进入页面时,优先校验当前登录人本年度是否已经申请过,已申请则直接拦截新增。
|
||||||
if (!this.bizId && res.data.hasCurrentYearApply && !this.$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')) {
|
if (!this.bizId && res.data.hasCurrentYearApply && !this.canApplyForOthers) {
|
||||||
this.isShow = false
|
this.isShow = false
|
||||||
this.$set(this, 'blockMessage', '抱歉,您本年度已申请困难帮扶,不能重复申请。')
|
this.$set(this, 'blockMessage', '抱歉,您本年度已申请困难帮扶,不能重复申请。')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -42,7 +42,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool :app="this" label="审批列表">
|
<table-tool :app="this" label="审批列表">
|
||||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
<!-- <el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button> -->
|
||||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
<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="true">已审核</el-radio-button>
|
||||||
<el-radio-button label="false">未审核</el-radio-button>
|
<el-radio-button label="false">未审核</el-radio-button>
|
||||||
@@ -145,7 +145,7 @@ layout("/layouts/platform.html"){
|
|||||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
{ prop: "applyMoney", label: "申请金额(元)", sortable: true },
|
||||||
{ prop: "curTaskName", label: "当前节点" },
|
{ prop: "curTaskName", label: "当前节点" },
|
||||||
{ prop: "instanceState", label: "流程状态" }
|
{ prop: "instanceState", label: "流程状态" }
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ const INFO = {
|
|||||||
<el-descriptions-item label="填写人姓名">{{ viewData.proxyUserName }}</el-descriptions-item>
|
<el-descriptions-item label="填写人姓名">{{ viewData.proxyUserName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请金额(元)">{{ viewData.applyMoney }}</el-descriptions-item>
|
<el-descriptions-item label="申请金额(元)">{{ viewData.applyMoney }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="身份证号">{{ viewData.idCard }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
|
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
|
||||||
<!--\t\t<el-descriptions-item label="申请模式">{{ viewData.mode == 1 ? '本人申请' : '替他人申请' }}</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.unitName }}</el-descriptions-item>
|
||||||
@@ -25,6 +26,12 @@ const INFO = {
|
|||||||
|
|
||||||
<el-descriptions-item label="申请次数" >{{ 1 }}</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="2">{{ viewData.homeAddress }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="补助类型">
|
||||||
|
<dict-tag :options="dict.type.DIFFICULT_SUBSIDY_TYPE" :value="viewData.subsidy"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="困难类型">
|
||||||
|
<dict-tag :options="dict.type.DIFFICULT_TYPE" :value="viewData.subsidyStandards"></dict-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="家庭主要成员(在一起生活的直系亲属)经济收入情况" :span="3">
|
<el-descriptions-item label="家庭主要成员(在一起生活的直系亲属)经济收入情况" :span="3">
|
||||||
@@ -90,8 +97,9 @@ const INFO = {
|
|||||||
|
|
||||||
<template v-if="task.taskFormData.level != null">
|
<template v-if="task.taskFormData.level != null">
|
||||||
<el-descriptions-item label="审批级别">{{ task.taskFormData.level }}</el-descriptions-item>
|
<el-descriptions-item label="审批级别">{{ task.taskFormData.level }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="帮扶金额(元)">{{ task.taskFormData.money }}</el-descriptions-item>
|
|
||||||
</template>
|
</template>
|
||||||
|
<el-descriptions-item v-if="task.taskFormData.money != null"
|
||||||
|
:label="task.taskFormData.actualMoney != null ? '实际审批金额(元)' : '帮扶金额(元)'">{{ task.taskFormData.money }}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="审批签字" :span="3" v-if="task.taskFormData && task.taskFormData.sign">
|
<el-descriptions-item label="审批签字" :span="3" v-if="task.taskFormData && task.taskFormData.sign">
|
||||||
@@ -110,7 +118,7 @@ const INFO = {
|
|||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
store,
|
store,
|
||||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE", "DIFFICULT_SUBSIDY_TYPE", "DIFFICULT_TYPE"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
viewData: {},
|
viewData: {},
|
||||||
|
|||||||
+3
-3
@@ -45,8 +45,8 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button type="primary" size="small" @click="importMoney">导入实际金额</el-button>
|
<el-button type="primary" size="small" @click="importMoney">导入实际金额</el-button>
|
||||||
<el-button @click="exportYearPayRecord" size="small" icon="el-icon-download" type="primary">导出补助金额</el-button>
|
<el-button @click="exportYearPayRecord" size="small" icon="el-icon-download" type="primary">导出补助金额</el-button>
|
||||||
<el-button @click="exportAllApply" size="small" type="primary">导出申请表(压缩包)</el-button>
|
<el-button @click="exportAllApply" size="small" type="primary">导出申请表(压缩包)</el-button>
|
||||||
<el-button @click="exportSummaryXlsx" size="small" type="primary">导出汇总表(excel)</el-button>
|
<el-button @click="exportSummaryXlsx" size="small" type="primary">导出汇总表(Excel)</el-button>
|
||||||
<el-button @click="exportSummaryDocx" size="small" type="primary">导出汇总表(word)</el-button>
|
<!-- <el-button @click="exportSummaryDocx" size="small" type="primary">导出汇总表(Word)</el-button> -->
|
||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||||
@@ -195,7 +195,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.$downLoad('/platform/difficultHelp/reading/exportSummary', params)
|
this.$downLoad('/platform/difficultHelp/reading/exportSummary', params)
|
||||||
},
|
},
|
||||||
doExportApply(row) {
|
doExportApply(row) {
|
||||||
this.$downLoad('/platform/difficultHelp/reading/doExportApply?id=' + row.id + '&print=false')
|
this.$downLoad('/platform/difficultHelp/reading/exportReadingApply', {...this.pageForm, id: row.id, print: false})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
|||||||
+12
-1
@@ -1,5 +1,8 @@
|
|||||||
<div id="difficult_help_school_union_approval_form">
|
<div id="difficult_help_school_union_approval_form">
|
||||||
<el-form :model="formData" ref="formRef" label-width="100px" label-suffix=":">
|
<el-form :model="formData" ref="formRef" label-width="100px" label-suffix=":">
|
||||||
|
<el-form-item label="实际审批金额(元)">
|
||||||
|
<span>{{ formData.money != null ? formData.money : '--' }}</span>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
|
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -15,12 +18,20 @@
|
|||||||
el: "#difficult_help_school_union_approval_form",
|
el: "#difficult_help_school_union_approval_form",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
businessId: GetQueryString("businessId"),
|
businessId: GetQueryString("businessId") || GetQueryString("bizId"),
|
||||||
formData: {
|
formData: {
|
||||||
|
money: undefined,
|
||||||
tf_sign: "", tf_opinion: "",
|
tf_sign: "", tf_opinion: "",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
if (this.businessId) {
|
||||||
|
this.$axios.post("/platform/difficultHelp/mine/findOne", {id: this.businessId}).then(res => {
|
||||||
|
if (res.code === 0 && res.data) this.formData.money = res.data.money
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async handleTaskAction(val) {
|
async handleTaskAction(val) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
+11
-2
@@ -42,7 +42,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool :app="this" label="审批列表">
|
<table-tool :app="this" label="审批列表">
|
||||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
<!-- <el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button> -->
|
||||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
<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="true">已审核</el-radio-button>
|
||||||
<el-radio-button label="false">未审核</el-radio-button>
|
<el-radio-button label="false">未审核</el-radio-button>
|
||||||
@@ -83,6 +83,9 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-dialog title="设置审核信息" :visible.sync="dialogVisible" width="30%" center>
|
<el-dialog title="设置审核信息" :visible.sync="dialogVisible" width="30%" center>
|
||||||
<el-form :model="formData" ref="formData" label-width="100px">
|
<el-form :model="formData" ref="formData" label-width="100px">
|
||||||
|
<el-form-item label="实际审批金额(元)">
|
||||||
|
<span>{{ formData.money != null ? formData.money : '--' }}</span>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
|
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -103,6 +106,9 @@ layout("/layouts/platform.html"){
|
|||||||
{{formData.taskName}}
|
{{formData.taskName}}
|
||||||
</div>
|
</div>
|
||||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="100px" label-suffix=":">
|
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="100px" label-suffix=":">
|
||||||
|
<el-form-item label="实际审批金额(元)">
|
||||||
|
<span>{{ formData.money != null ? formData.money : '--' }}</span>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="审批意见" prop="tf_opinion"
|
<el-form-item label="审批意见" prop="tf_opinion"
|
||||||
:rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
|
:rules="[{required:true,whitespace:true,message:'请填写审批意见',trigger:['change','blur']}]">
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
@@ -146,7 +152,7 @@ layout("/layouts/platform.html"){
|
|||||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
{ prop: "applyMoney", label: "申请金额(元)", sortable: true },
|
||||||
{ prop: "curTaskName", label: "当前节点" },
|
{ prop: "curTaskName", label: "当前节点" },
|
||||||
{ prop: "instanceState", label: "流程状态" }
|
{ prop: "instanceState", label: "流程状态" }
|
||||||
],
|
],
|
||||||
@@ -154,6 +160,7 @@ layout("/layouts/platform.html"){
|
|||||||
units: [],
|
units: [],
|
||||||
|
|
||||||
formData: {
|
formData: {
|
||||||
|
money: undefined,
|
||||||
tf_sign: "", tf_opinion: "",
|
tf_sign: "", tf_opinion: "",
|
||||||
},
|
},
|
||||||
showApprovalForm: false,
|
showApprovalForm: false,
|
||||||
@@ -178,6 +185,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.$message.warning('请至少选择一条记录进行审核!');
|
this.$message.warning('请至少选择一条记录进行审核!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.$set(this.formData, 'money', undefined)
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
submitAudit() {
|
submitAudit() {
|
||||||
@@ -248,6 +256,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.$refs.guava.edit(()=>{
|
this.$refs.guava.edit(()=>{
|
||||||
this.showApprovalForm = true
|
this.showApprovalForm = true
|
||||||
this.formData = {
|
this.formData = {
|
||||||
|
money: row.money,
|
||||||
tf_sign: "",
|
tf_sign: "",
|
||||||
processTaskId: row.taskId,
|
processTaskId: row.taskId,
|
||||||
taskName: row.curTaskName,
|
taskName: row.curTaskName,
|
||||||
|
|||||||
+2
-2
@@ -42,7 +42,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool :app="this" label="审批列表">
|
<table-tool :app="this" label="审批列表">
|
||||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
<!-- <el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button> -->
|
||||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
<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="true">已审核</el-radio-button>
|
||||||
<el-radio-button label="false">未审核</el-radio-button>
|
<el-radio-button label="false">未审核</el-radio-button>
|
||||||
@@ -158,7 +158,7 @@ layout("/layouts/platform.html"){
|
|||||||
{ prop: "mobile", label: "联系方式", sortable: true },
|
{ prop: "mobile", label: "联系方式", sortable: true },
|
||||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
{ prop: "applyMoney", label: "申请金额(元)", sortable: true },
|
||||||
{ prop: "curTaskName", label: "当前节点" },
|
{ prop: "curTaskName", label: "当前节点" },
|
||||||
{ prop: "instanceState", label: "流程状态" }
|
{ prop: "instanceState", label: "流程状态" }
|
||||||
],
|
],
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="慰问金额" :span="2">
|
<el-descriptions-item label="慰问金额" :span="2">
|
||||||
<el-form-item label="慰问金额" prop="perMoney" :rules="recipientRules.money">
|
<el-form-item label="慰问金额" prop="perMoney" :rules="recipientRules.money">
|
||||||
<el-input-number v-model="formData.perMoney" :precision="2" :min="0" :max="10000" :controls="false" style="width:100%" placeholder="每人慰问金额(元)"></el-input-number>
|
<el-input v-model="formData.perMoney" readonly style="width:100%" placeholder="根据慰问类型自动带出"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="慰问时间" :span="2">
|
<el-descriptions-item label="慰问时间" :span="2">
|
||||||
|
|||||||
+18
-9
@@ -51,7 +51,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="签字" :span="6">
|
<el-descriptions-item label="签字" :span="6">
|
||||||
<el-form-item prop="signature" label="签字">
|
<el-form-item prop="signature" label="签字" class="special-condolence-signature-item">
|
||||||
<pc-signature v-model="formData.signature"></pc-signature>
|
<pc-signature v-model="formData.signature"></pc-signature>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -205,8 +205,6 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSave() {
|
onSave() {
|
||||||
this.$refs.formRef.validate((valid, invalidFields) => {
|
|
||||||
if (!valid) { this.showInvalidApplicationTab(invalidFields); return }
|
|
||||||
this.$confirm("您确定保存吗?", "提示", {
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@@ -219,11 +217,23 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
},
|
||||||
|
async validateApplication(callback) {
|
||||||
|
const form = this.$refs.formRef
|
||||||
|
const fields = form.fields.filter(field => field.prop && !field.prop.startsWith('recipients'))
|
||||||
|
const results = await Promise.all(fields.map(field => new Promise(resolve => {
|
||||||
|
field.validate('', message => resolve(!message))
|
||||||
|
})))
|
||||||
|
if (results.some(valid => !valid)) {
|
||||||
|
this.activeApplicationTab = 'form'
|
||||||
|
this.$message.error('请完善基础信息的必填信息')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.ensureApplicationRecipients()) return
|
||||||
|
form.validate(callback)
|
||||||
},
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
if (!this.ensureApplicationRecipients()) return
|
this.validateApplication((valid, invalidFields) => {
|
||||||
this.$refs.formRef.validate((valid, invalidFields) => {
|
|
||||||
if (!valid) { this.showInvalidApplicationTab(invalidFields); return }
|
if (!valid) { this.showInvalidApplicationTab(invalidFields); return }
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
@@ -244,8 +254,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onFinishTask() {
|
onFinishTask() {
|
||||||
if (!this.ensureApplicationRecipients()) return
|
this.validateApplication((valid, invalidFields) => {
|
||||||
this.$refs.formRef.validate((valid, invalidFields) => {
|
|
||||||
if (!valid) { this.showInvalidApplicationTab(invalidFields); return }
|
if (!valid) { this.showInvalidApplicationTab(invalidFields); return }
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
@@ -275,7 +284,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
||||||
this.selectQueryUser(this.formData.certifierLoginName, this.certifierUserOptions)
|
this.selectQueryUser(this.formData.certifierLoginName, this.certifierUserOptions)
|
||||||
this.selectQueryUser(this.formData.handlerLoginName, this.handlerUserOptions)
|
this.selectQueryUser(this.formData.handlerLoginName, this.handlerUserOptions)
|
||||||
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type)
|
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type) || {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
@@ -65,3 +65,5 @@
|
|||||||
.special-condolence-apply .flow-task-form .el-form-item__error { color: #f56c6c !important; }
|
.special-condolence-apply .flow-task-form .el-form-item__error { color: #f56c6c !important; }
|
||||||
.special-condolence-apply .el-form-item.is-error .el-input__inner,
|
.special-condolence-apply .el-form-item.is-error .el-input__inner,
|
||||||
.special-condolence-apply .el-form-item.is-error .el-textarea__inner { border-color: #f56c6c; }
|
.special-condolence-apply .el-form-item.is-error .el-textarea__inner { border-color: #f56c6c; }
|
||||||
|
|
||||||
|
.special-condolence-apply .flow-task-form .special-condolence-signature-item .el-form-item__error { position: static; padding-top: 6px; line-height: 20px; white-space: normal; }
|
||||||
|
|||||||
+2
-2
@@ -8,8 +8,8 @@
|
|||||||
<el-form-item prop="recipients" label-width="0" class="special-condolence-table-item">
|
<el-form-item prop="recipients" label-width="0" class="special-condolence-table-item">
|
||||||
<el-table ref="recipientTableRef" :data="formData.recipients" border stripe size="small" max-height="520" empty-text="暂无慰问对象,点击新增或从 Excel 导入">
|
<el-table ref="recipientTableRef" :data="formData.recipients" border stripe size="small" max-height="520" empty-text="暂无慰问对象,点击新增或从 Excel 导入">
|
||||||
<el-table-column type="index" label="序号" width="55" align="center" fixed="left"></el-table-column>
|
<el-table-column type="index" label="序号" width="55" align="center" fixed="left"></el-table-column>
|
||||||
<el-table-column label="慰问对象" width="200" fixed="left"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.helpUserId'" :rules="recipientRules.helpUserId"><user-select size="small" v-model="s.row.helpUserId" api="/platform/special_condolence/apply/listUser" api_input_key_name="keyword" :option_list="recipientOptions(s.row)" :option_label_func="item => item.userName + '(' + (item.loginName || '') + ')'" @selected="(user, id) => recipientUserChange(s.row, s.$index, id, user)"></user-select></el-form-item></template></el-table-column>
|
<el-table-column label="慰问对象" width="200" fixed="left"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + (s.row.helpUserId ? '.helpUserId' : '.helpUserName')" :rules="recipientRules.helpUserId"><el-input v-if="!s.row.helpUserId && s.row.helpUserName" size="small" :value="s.row.helpUserName" readonly></el-input><user-select v-else size="small" v-model="s.row.helpUserId" api="/platform/special_condolence/apply/listUser" api_input_key_name="keyword" :option_list="recipientOptions(s.row)" :option_label_func="item => item.userName + '(' + (item.loginName || '') + ')'" @selected="(user, id) => recipientUserChange(s.row, s.$index, id, user)"></user-select></el-form-item></template></el-table-column>
|
||||||
<el-table-column label="工号" min-width="150"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.helpLoginName'" :rules="[{ validator: (rule, value, cb) => cb(s.row.personType === '劳务派遣人员' || value ? undefined : new Error('普通人员工号不能为空')), trigger: 'change' }]"><el-input size="small" v-model="s.row.helpLoginName" readonly placeholder="选人后带出,劳务派遣可空"></el-input></el-form-item></template></el-table-column>
|
<el-table-column label="工号" min-width="150"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.helpLoginName'" :rules="[{ validator: (rule, value, cb) => cb(!s.row.helpUserId || s.row.personType === '劳务派遣人员' || value ? undefined : new Error('普通人员工号不能为空')), trigger: 'change' }]"><el-input size="small" v-model="s.row.helpLoginName" readonly placeholder="选人后带出,劳务派遣可空"></el-input></el-form-item></template></el-table-column>
|
||||||
<el-table-column label="身份证号码" min-width="205"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.idCard'" :rules="recipientRules.idCard"><el-input size="small" v-model="s.row.idCard" maxlength="18" placeholder="请输入18位身份证号"></el-input></el-form-item></template></el-table-column>
|
<el-table-column label="身份证号码" min-width="205"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.idCard'" :rules="recipientRules.idCard"><el-input size="small" v-model="s.row.idCard" maxlength="18" placeholder="请输入18位身份证号"></el-input></el-form-item></template></el-table-column>
|
||||||
<el-table-column label="开户行" min-width="190"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.bankOfDeposit'" :rules="recipientRules.bankOfDeposit"><el-input size="small" v-model="s.row.bankOfDeposit" maxlength="100" placeholder="请输入开户银行及支行"></el-input></el-form-item></template></el-table-column>
|
<el-table-column label="开户行" min-width="190"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.bankOfDeposit'" :rules="recipientRules.bankOfDeposit"><el-input size="small" v-model="s.row.bankOfDeposit" maxlength="100" placeholder="请输入开户银行及支行"></el-input></el-form-item></template></el-table-column>
|
||||||
<el-table-column label="户名" min-width="140"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.bankUserName'" :rules="recipientRules.bankUserName"><el-input size="small" v-model="s.row.bankUserName" maxlength="100" placeholder="请输入账户户名"></el-input></el-form-item></template></el-table-column>
|
<el-table-column label="户名" min-width="140"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.bankUserName'" :rules="recipientRules.bankUserName"><el-input size="small" v-model="s.row.bankUserName" maxlength="100" placeholder="请输入账户户名"></el-input></el-form-item></template></el-table-column>
|
||||||
|
|||||||
+7
-4
@@ -34,7 +34,7 @@ const specialCondolenceRecipients = {
|
|||||||
},
|
},
|
||||||
ensureApplicationRecipients() {
|
ensureApplicationRecipients() {
|
||||||
const rows = this.formData.recipients
|
const rows = this.formData.recipients
|
||||||
if (!Array.isArray(rows) || rows.length === 0 || rows.some(row => !row || !String(row.helpUserId || '').trim())) {
|
if (!Array.isArray(rows) || rows.length === 0 || rows.some(row => !row || !String(row.helpUserId || row.helpUserName || '').trim())) {
|
||||||
this.activeApplicationTab = 'recipients'
|
this.activeApplicationTab = 'recipients'
|
||||||
this.notifyRecipientError('请先选择慰问对象,并填写完整信息')
|
this.notifyRecipientError('请先选择慰问对象,并填写完整信息')
|
||||||
return false
|
return false
|
||||||
@@ -95,15 +95,18 @@ const specialCondolenceRecipients = {
|
|||||||
try {
|
try {
|
||||||
const data = new FormData()
|
const data = new FormData()
|
||||||
data.append('file', request.file)
|
data.append('file', request.file)
|
||||||
const result = await this.$axios.post('/platform/special_condolence/apply/importRecipients', data)
|
const response = await axios.post('/platform/special_condolence/apply/importRecipients', data, {
|
||||||
|
headers: { 'x-requested-with': 'XMLHttpRequest' }
|
||||||
|
})
|
||||||
|
const result = response.data
|
||||||
if (result.code === 0) {
|
if (result.code === 0) {
|
||||||
const rows = this.formData.recipients.filter(r => r.helpUserName || r.type || r.idCard || r.bankCardNumber || r.bankUserName || r.bankOfDeposit || r.money)
|
const rows = this.formData.recipients.filter(r => r.helpUserName || r.type || r.idCard || r.bankCardNumber || r.bankUserName || r.bankOfDeposit || r.money)
|
||||||
this.$set(this.formData, 'recipients', rows.concat(result.data))
|
this.$set(this.formData, 'recipients', rows.concat(result.data))
|
||||||
this.importVisible = false
|
this.importVisible = false
|
||||||
this.$message.success('导入成功,共' + result.data.length + '人')
|
this.$message.success('导入成功,共' + result.data.length + '人')
|
||||||
} else this.$message.error(result.msg || '导入失败')
|
} else this.$message.error('导入失败:' + (result.msg || '请检查文件内容后重试'))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error('导入失败,请检查文件内容后重试')
|
this.$message.error('导入失败:' + (error.response?.data?.msg || error.msg || '请检查文件内容后重试'))
|
||||||
} finally {
|
} finally {
|
||||||
this.importLoading = false
|
this.importLoading = false
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -110,7 +110,7 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'applyUnionName', label: '所属工会'},
|
{prop: 'applyUnionName', label: '所属工会'},
|
||||||
{prop: 'applyUnitName', label: '所属单位'},
|
{prop: 'applyUnitName', label: '所属单位'},
|
||||||
{prop: 'typeName', label: '慰问类型'},
|
{prop: 'typeName', label: '慰问类型'},
|
||||||
{prop: 'taskName', label: '当前节点'},
|
{prop: 'recipientCount', label: '慰问人数'},
|
||||||
{prop: 'instanceState', label: '流程状态'},
|
{prop: 'instanceState', label: '流程状态'},
|
||||||
],
|
],
|
||||||
unionList: [],
|
unionList: [],
|
||||||
|
|||||||
@@ -379,9 +379,6 @@ layout("/layouts/platform_h5.html"){
|
|||||||
v-model="formData.bankOfDeposit"
|
v-model="formData.bankOfDeposit"
|
||||||
label="开户行"
|
label="开户行"
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
type="textarea"
|
|
||||||
rows="4"
|
|
||||||
autosize
|
|
||||||
placeholder="请填写开户行"
|
placeholder="请填写开户行"
|
||||||
:rules="[{ required: true }]"
|
:rules="[{ required: true }]"
|
||||||
required
|
required
|
||||||
|
|||||||
+7
-1
@@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
||||||
this.$set(this, "confirmVisible", true)
|
this.$set(this, "confirmVisible", true)
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(errors => {
|
||||||
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
|
this.$toast(errors[0].message || '请完善审批信息')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.scrollToField(errors[0].name)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||||
confirmPendingAction() {
|
confirmPendingAction() {
|
||||||
|
|||||||
+7
-1
@@ -264,7 +264,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
||||||
this.$set(this, "confirmVisible", true)
|
this.$set(this, "confirmVisible", true)
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(errors => {
|
||||||
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
|
this.$toast(errors[0].message || '请完善审批信息')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.scrollToField(errors[0].name)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||||
confirmPendingAction() {
|
confirmPendingAction() {
|
||||||
|
|||||||
+7
-1
@@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
||||||
this.$set(this, "confirmVisible", true)
|
this.$set(this, "confirmVisible", true)
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(errors => {
|
||||||
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
|
this.$toast(errors[0].message || '请完善审批信息')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.scrollToField(errors[0].name)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||||
confirmPendingAction() {
|
confirmPendingAction() {
|
||||||
|
|||||||
+7
-1
@@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
||||||
this.$set(this, "confirmVisible", true)
|
this.$set(this, "confirmVisible", true)
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(errors => {
|
||||||
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
|
this.$toast(errors[0].message || '请完善审批信息')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.scrollToField(errors[0].name)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||||
confirmPendingAction() {
|
confirmPendingAction() {
|
||||||
|
|||||||
+9
-3
@@ -327,7 +327,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<van-radio-group class="difficult-help-apply-mode" :value="formData.mode" @input="formData.mode !== $event && modeChange($event)" direction="horizontal" icon-size="14px">
|
<van-radio-group class="difficult-help-apply-mode" :value="formData.mode" @input="formData.mode !== $event && modeChange($event)" direction="horizontal" icon-size="14px">
|
||||||
<van-radio name="1" shape="square">本人申请</van-radio>
|
<van-radio name="1" shape="square">本人申请</van-radio>
|
||||||
<van-radio
|
<van-radio
|
||||||
v-if="$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')"
|
v-if="canApplyForOthers"
|
||||||
name="2" shape="square">替他人申请
|
name="2" shape="square">替他人申请
|
||||||
</van-radio>
|
</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
@@ -723,6 +723,9 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
canApplyForOthers() {
|
||||||
|
return this.$auth.hasPermissionOr(['difficult_assistance_school', 'difficult_assistance_union'])
|
||||||
|
},
|
||||||
canImportFamilyInfo() {
|
canImportFamilyInfo() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -731,7 +734,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
historyBack,
|
historyBack,
|
||||||
// 替他人申请时由只读字段主动打开受助人选择,已有业务数据时保持原禁止更换规则。
|
// 替他人申请时由只读字段主动打开受助人选择,已有业务数据时保持原禁止更换规则。
|
||||||
openRecipientPopup() {
|
openRecipientPopup() {
|
||||||
if (this.formData.mode !== "2" || this.formData.id) return
|
if (this.formData.mode !== "2" || this.formData.id || !this.canApplyForOthers) return
|
||||||
this.$set(this, "recipientSearchKey", "")
|
this.$set(this, "recipientSearchKey", "")
|
||||||
this.$set(this, "recipientHasSearched", false)
|
this.$set(this, "recipientHasSearched", false)
|
||||||
this.$set(this, "subsidizedList", [])
|
this.$set(this, "subsidizedList", [])
|
||||||
@@ -995,7 +998,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
* recipientSearchKey 传搜索关键词;接口返回用户数组,列表仅展示姓名和单位。
|
* recipientSearchKey 传搜索关键词;接口返回用户数组,列表仅展示姓名和单位。
|
||||||
*/
|
*/
|
||||||
queryRecipients() {
|
queryRecipients() {
|
||||||
if (this.formData.mode !== "2") {
|
if (this.formData.mode !== "2" || !this.canApplyForOthers) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const key = (this.recipientSearchKey || "").trim()
|
const key = (this.recipientSearchKey || "").trim()
|
||||||
@@ -1044,6 +1047,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$set(this.formData, "userName", null)
|
this.$set(this.formData, "userName", null)
|
||||||
this.$set(this.formData, "loginName", null)
|
this.$set(this.formData, "loginName", null)
|
||||||
this.$set(this.formData, "sex", null)
|
this.$set(this.formData, "sex", null)
|
||||||
|
this.$set(this.formData, "birthday", null)
|
||||||
this.$set(this.formData, "unitId", null)
|
this.$set(this.formData, "unitId", null)
|
||||||
this.$set(this.formData, "unitName", null)
|
this.$set(this.formData, "unitName", null)
|
||||||
this.$set(this.formData, "unionId", null)
|
this.$set(this.formData, "unionId", null)
|
||||||
@@ -1108,6 +1112,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$set(this.formData, 'idCard', user.idCard)
|
this.$set(this.formData, 'idCard', user.idCard)
|
||||||
this.$set(this.formData, 'mobile', user.mobile)
|
this.$set(this.formData, 'mobile', user.mobile)
|
||||||
this.$set(this.formData, 'homeAddress', user.homeAddress)
|
this.$set(this.formData, 'homeAddress', user.homeAddress)
|
||||||
|
this.$set(this.formData, 'position', user.position || '')
|
||||||
|
this.$set(this.formData, 'officialCapacity', user.professionalTitle || '')
|
||||||
this.$set(this.formData, 'subsidyStandards', null)
|
this.$set(this.formData, 'subsidyStandards', null)
|
||||||
this.$set(this.formData, 'reason', null)
|
this.$set(this.formData, 'reason', null)
|
||||||
this.$set(this.formData, 'remarks', null)
|
this.$set(this.formData, 'remarks', null)
|
||||||
|
|||||||
+10
-3
@@ -80,6 +80,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||||
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
||||||
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
||||||
|
<table-column label="申请金额(元)">{{row.applyMoney}}</table-column>
|
||||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{index,row}">
|
<template #actions="{index,row}">
|
||||||
@@ -126,8 +127,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
show-word-limit
|
show-word-limit
|
||||||
></van-field>
|
></van-field>
|
||||||
<section class="difficult-help-info-card">
|
<section class="difficult-help-info-card">
|
||||||
<h2 class="difficult-help-info-card__title">审批签字</h2>
|
<h2 class="difficult-help-info-card__title">审批签字<span class="difficult-help-audit-card__required">*</span></h2>
|
||||||
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
|
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||||
</van-field>
|
</van-field>
|
||||||
</section>
|
</section>
|
||||||
@@ -257,7 +258,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
||||||
this.$set(this, "confirmVisible", true)
|
this.$set(this, "confirmVisible", true)
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(errors => {
|
||||||
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
|
this.$toast(errors[0].message || '请完善审批信息')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.scrollToField(errors[0].name)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||||
|
|||||||
+4
-12
@@ -167,11 +167,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.difficult-help-info-card .van-cell__title {
|
.difficult-help-info-card .van-cell__title {
|
||||||
width: 112px;
|
width: 102px;
|
||||||
color: #596779;
|
color: #596779;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
flex: 0 0 112px;
|
flex: 0 0 102px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.difficult-help-info-card .van-cell__value {
|
.difficult-help-info-card .van-cell__value {
|
||||||
@@ -184,16 +184,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.difficult-help-info-long-cell {
|
.difficult-help-info-long-cell {
|
||||||
display: block;
|
display: flex;
|
||||||
}
|
align-items: flex-start;
|
||||||
|
|
||||||
.difficult-help-info-long-cell .van-cell__title {
|
|
||||||
width: auto;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.difficult-help-info-long-cell .van-cell__value {
|
|
||||||
margin-top: 7px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.difficult-help-info-pre-line {
|
.difficult-help-info-pre-line {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ const INFO = {
|
|||||||
<van-cell title="填写人工号">{{ viewData.proxyLoginName || '--' }}</van-cell>
|
<van-cell title="填写人工号">{{ viewData.proxyLoginName || '--' }}</van-cell>
|
||||||
<van-cell title="申请金额(元)">{{ viewData.applyMoney }}</van-cell>
|
<van-cell title="申请金额(元)">{{ viewData.applyMoney }}</van-cell>
|
||||||
<van-cell title="性别">{{ viewData.sex || '--' }}</van-cell>
|
<van-cell title="性别">{{ viewData.sex || '--' }}</van-cell>
|
||||||
|
<van-cell title="身份证号">{{ viewData.idCard || '--' }}</van-cell>
|
||||||
<van-cell title="受助人">
|
<van-cell title="受助人">
|
||||||
{{ viewData.userName || '--' }}{{ viewData.loginName ? '(' + viewData.loginName + ')' : '' }}
|
{{ viewData.userName || '--' }}{{ viewData.loginName ? '(' + viewData.loginName + ')' : '' }}
|
||||||
</van-cell>
|
</van-cell>
|
||||||
@@ -195,7 +196,7 @@ const INFO = {
|
|||||||
<van-cell v-if="task.taskFormData && task.taskFormData.level != null" title="审批级别">
|
<van-cell v-if="task.taskFormData && task.taskFormData.level != null" title="审批级别">
|
||||||
{{ task.taskFormData.level }}
|
{{ task.taskFormData.level }}
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell v-if="task.taskFormData && task.taskFormData.money != null" title="帮扶金额(元)">
|
<van-cell v-if="task.taskFormData && task.taskFormData.money != null" :title="task.taskFormData.actualMoney != null ? '实际审批金额(元)' : '帮扶金额(元)'">
|
||||||
{{ task.taskFormData.money }}
|
{{ task.taskFormData.money }}
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell title="办理结果">
|
<van-cell title="办理结果">
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</style>
|
</style>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div class="difficult-help-list-page">
|
<div class="difficult-help-list-page">
|
||||||
<van-nav-bar title="帮扶申请记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||||
<van-sticky offset-top="46px">
|
<van-sticky offset-top="46px">
|
||||||
<div class="difficult-help-list-sticky">
|
<div class="difficult-help-list-sticky">
|
||||||
<van-search
|
<van-search
|
||||||
|
|||||||
+12
-3
@@ -80,6 +80,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||||
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
||||||
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
||||||
|
<table-column label="申请金额(元)">{{row.applyMoney}}</table-column>
|
||||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{index,row}">
|
<template #actions="{index,row}">
|
||||||
@@ -110,6 +111,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<info ref="infoRef" page-key="difficult-help-school-union-detail" full-screen>
|
<info ref="infoRef" page-key="difficult-help-school-union-detail" full-screen>
|
||||||
<div v-if="showApprovalForm">
|
<div v-if="showApprovalForm">
|
||||||
<van-form ref="formRef">
|
<van-form ref="formRef">
|
||||||
|
<van-cell title="实际审批金额(元)">{{ formData.money != null ? formData.money : '--' }}</van-cell>
|
||||||
|
|
||||||
<section class="difficult-help-info-card">
|
<section class="difficult-help-info-card">
|
||||||
<h2 class="difficult-help-info-card__title">
|
<h2 class="difficult-help-info-card__title">
|
||||||
@@ -128,8 +130,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
></van-field>
|
></van-field>
|
||||||
</section>
|
</section>
|
||||||
<section class="difficult-help-info-card">
|
<section class="difficult-help-info-card">
|
||||||
<h2 class="difficult-help-info-card__title">审批签字</h2>
|
<h2 class="difficult-help-info-card__title">审批签字<span class="difficult-help-audit-card__required">*</span></h2>
|
||||||
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
|
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||||
</van-field>
|
</van-field>
|
||||||
</section>
|
</section>
|
||||||
@@ -234,6 +236,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
onApproval(row) {
|
onApproval(row) {
|
||||||
this.$set(this, "showApprovalForm", true)
|
this.$set(this, "showApprovalForm", true)
|
||||||
this.$set(this, "formData", {
|
this.$set(this, "formData", {
|
||||||
|
money: row.money,
|
||||||
processTaskId: row.taskId,
|
processTaskId: row.taskId,
|
||||||
taskName: row.curTaskName,
|
taskName: row.curTaskName,
|
||||||
id: row.id,
|
id: row.id,
|
||||||
@@ -251,7 +254,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
||||||
this.$set(this, "confirmVisible", true)
|
this.$set(this, "confirmVisible", true)
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(errors => {
|
||||||
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
|
this.$toast(errors[0].message || '请完善审批信息')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.scrollToField(errors[0].name)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||||
|
|||||||
+10
-3
@@ -80,6 +80,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||||
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
||||||
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
||||||
|
<table-column label="申请金额(元)">{{row.applyMoney}}</table-column>
|
||||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{index,row}">
|
<template #actions="{index,row}">
|
||||||
@@ -142,8 +143,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
></van-field>
|
></van-field>
|
||||||
</section>
|
</section>
|
||||||
<section class="difficult-help-info-card">
|
<section class="difficult-help-info-card">
|
||||||
<h2 class="difficult-help-info-card__title">审批签字</h2>
|
<h2 class="difficult-help-info-card__title">审批签字<span class="difficult-help-audit-card__required">*</span></h2>
|
||||||
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
|
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||||
</van-field>
|
</van-field>
|
||||||
</section>
|
</section>
|
||||||
@@ -265,7 +266,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
||||||
this.$set(this, "confirmVisible", true)
|
this.$set(this, "confirmVisible", true)
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(errors => {
|
||||||
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
|
this.$toast(errors[0].message || '请完善审批信息')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.scrollToField(errors[0].name)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||||
|
|||||||
+5
-7
@@ -197,7 +197,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
|
|
||||||
<van-field :value="chooseType.name || formData.typeName" name="type" label="慰问类型" readonly clickable is-link required placeholder="请选择慰问类型" :rules="[{ validator: () => !!formData.type, message: '请选择慰问类型' }]" @click="showTypePickerClick"></van-field>
|
<van-field :value="chooseType.name || formData.typeName" name="type" label="慰问类型" readonly clickable is-link required placeholder="请选择慰问类型" :rules="[{ validator: () => !!formData.type, message: '请选择慰问类型' }]" @click="showTypePickerClick"></van-field>
|
||||||
<van-popup v-model="showTypePicker" position="bottom" round get-container="body"><van-picker :columns="typeColumns" :default-index="typeDefaultIndex" show-toolbar @confirm="onTypeConfirm" @cancel="showTypePicker = false"></van-picker></van-popup>
|
<van-popup v-model="showTypePicker" position="bottom" round get-container="body"><van-picker :columns="typeColumns" :default-index="typeDefaultIndex" show-toolbar @confirm="onTypeConfirm" @cancel="showTypePicker = false"></van-picker></van-popup>
|
||||||
<van-field v-model="formData.perMoney" name="perMoney" label="每人金额" type="number" required :rules="[{ validator: validateMoney, message: '金额须大于0且不超过10000元,最多两位小数' }]"></van-field>
|
<van-field v-model="formData.perMoney" name="perMoney" label="慰问金额" type="number" readonly required :rules="[{ validator: validateMoney, message: '金额须大于0且不超过10000元,最多两位小数' }]"></van-field>
|
||||||
<van-field v-model="formData.occurTime" name="occurTime" label="慰问时间" readonly clickable is-link placeholder="请选择慰问时间" required :rules="[{ validator: value => $moment(value, 'YYYY-MM-DD', true).isValid(), message: '请选择有效慰问时间' }]" @click="showTimePickerClick"></van-field>
|
<van-field v-model="formData.occurTime" name="occurTime" label="慰问时间" readonly clickable is-link placeholder="请选择慰问时间" required :rules="[{ validator: value => $moment(value, 'YYYY-MM-DD', true).isValid(), message: '请选择有效慰问时间' }]" @click="showTimePickerClick"></van-field>
|
||||||
<van-popup v-model="showTimePicker" position="bottom" round get-container="body"><van-datetime-picker v-if="showTimePicker" v-model="formData.occurDate" type="date" :min-date="minDate" :max-date="maxDate" title="请选择慰问时间" @confirm="confirmOccurTime" @cancel="showTimePicker = false"></van-datetime-picker></van-popup>
|
<van-popup v-model="showTimePicker" position="bottom" round get-container="body"><van-datetime-picker v-if="showTimePicker" v-model="formData.occurDate" type="date" :min-date="minDate" :max-date="maxDate" title="请选择慰问时间" @confirm="confirmOccurTime" @cancel="showTimePicker = false"></van-datetime-picker></van-popup>
|
||||||
<van-field
|
<van-field
|
||||||
@@ -258,7 +258,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<div v-for="(person, index) in formData.recipients" :key="index">
|
<div v-for="(person, index) in formData.recipients" :key="index">
|
||||||
<van-cell :title="'慰问对象 ' + (index + 1)" :title-style="{ fontWeight: 'bold' }"><van-button native-type="button" size="mini" @click="formData.recipients.splice(index, 1)">删除</van-button></van-cell>
|
<van-cell :title="'慰问对象 ' + (index + 1)" :title-style="{ fontWeight: 'bold' }"><van-button native-type="button" size="mini" @click="formData.recipients.splice(index, 1)">删除</van-button></van-cell>
|
||||||
<h5-user-select v-model="person.helpUserId" :display-name="person.helpUserName" api="/platform/special_condolence/apply/listUser" label="慰问对象" placeholder="点击选择本工会人员" required :name="'recipients.' + index + '.helpUserId'" :rules="mobileRecipientRules('helpUserId', person)" @selected="(user, id) => recipientUserChange(person, index, id, user)"></h5-user-select>
|
<h5-user-select v-model="person.helpUserId" :display-name="person.helpUserName" api="/platform/special_condolence/apply/listUser" label="慰问对象" placeholder="点击选择本工会人员" required :name="'recipients.' + index + '.helpUserId'" :rules="mobileRecipientRules('helpUserId', person)" @selected="(user, id) => recipientUserChange(person, index, id, user)"></h5-user-select>
|
||||||
<van-field v-model="person.helpLoginName" label="工号" readonly placeholder="选人后带出,劳务派遣可空" :required="person.personType !== '劳务派遣人员'" :name="'recipients.' + index + '.helpLoginName'" :rules="mobileRecipientRules('helpLoginName', person)"></van-field>
|
<van-field v-model="person.helpLoginName" label="工号" readonly placeholder="选人后带出,劳务派遣可空" :required="!!person.helpUserId && person.personType !== '劳务派遣人员'" :name="'recipients.' + index + '.helpLoginName'" :rules="mobileRecipientRules('helpLoginName', person)"></van-field>
|
||||||
<van-field v-model="person.idCard" label="身份证号码" maxlength="18" required :name="'recipients.' + index + '.idCard'" :rules="mobileRecipientRules('idCard', person)"></van-field>
|
<van-field v-model="person.idCard" label="身份证号码" maxlength="18" required :name="'recipients.' + index + '.idCard'" :rules="mobileRecipientRules('idCard', person)"></van-field>
|
||||||
<van-field v-model="person.bankOfDeposit" label="开户行" maxlength="100" required :name="'recipients.' + index + '.bankOfDeposit'" :rules="mobileRecipientRules('bankOfDeposit', person)"></van-field>
|
<van-field v-model="person.bankOfDeposit" label="开户行" maxlength="100" required :name="'recipients.' + index + '.bankOfDeposit'" :rules="mobileRecipientRules('bankOfDeposit', person)"></van-field>
|
||||||
<van-field v-model="person.bankUserName" label="户名" maxlength="100" required :name="'recipients.' + index + '.bankUserName'" :rules="mobileRecipientRules('bankUserName', person)"></van-field>
|
<van-field v-model="person.bankUserName" label="户名" maxlength="100" required :name="'recipients.' + index + '.bankUserName'" :rules="mobileRecipientRules('bankUserName', person)"></van-field>
|
||||||
@@ -328,7 +328,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
methods: {
|
methods: {
|
||||||
showInvalidApplicationTab(errors) {
|
showInvalidApplicationTab(errors) {
|
||||||
if (!Array.isArray(errors) || !errors.length) return
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
const error = errors[0]
|
const error = errors.find(item => !String(item.name || '').startsWith('recipients')) || errors[0]
|
||||||
const name = String(error.name || '')
|
const name = String(error.name || '')
|
||||||
const recipient = name.match(/^recipients\.(\d+)\./)
|
const recipient = name.match(/^recipients\.(\d+)\./)
|
||||||
this.activeApplicationTab = name.startsWith('recipients') ? 'recipients' : 'form'
|
this.activeApplicationTab = name.startsWith('recipients') ? 'recipients' : 'form'
|
||||||
@@ -340,8 +340,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
},
|
},
|
||||||
mobileRecipientRules(field, person) {
|
mobileRecipientRules(field, person) {
|
||||||
const names = { helpUserId: '慰问对象', helpLoginName: '工号', idCard: '身份证号码', bankOfDeposit: '开户行', bankUserName: '户名', bankCardNumber: '收款账户' }
|
const names = { helpUserId: '慰问对象', helpLoginName: '工号', idCard: '身份证号码', bankOfDeposit: '开户行', bankUserName: '户名', bankCardNumber: '收款账户' }
|
||||||
if (field === 'helpLoginName') return [{ validator: value => person.personType === '劳务派遣人员' || !!String(value || '').trim(), message: '普通人员工号不能为空' }]
|
if (field === 'helpLoginName') return [{ validator: value => !person.helpUserId || person.personType === '劳务派遣人员' || !!String(value || '').trim(), message: '请完善慰问对象信息(工号不能为空)' }]
|
||||||
if (field === 'helpUserId') return [{ validator: () => !!person.helpUserId, message: '请选择慰问对象' }]
|
if (field === 'helpUserId') return [{ validator: () => !!(person.helpUserId || person.helpUserName), message: '请选择慰问对象' }]
|
||||||
const rules = [{ validator: value => !!String(value || '').trim(), message: '请填写' + names[field] }]
|
const rules = [{ validator: value => !!String(value || '').trim(), message: '请填写' + names[field] }]
|
||||||
if (field === 'idCard') rules.push({ validator: value => this.validRecipientIdCard(value), message: '身份证号码不正确' })
|
if (field === 'idCard') rules.push({ validator: value => this.validRecipientIdCard(value), message: '身份证号码不正确' })
|
||||||
if (field === 'bankCardNumber') rules.push({ pattern: /^[0-9]{6,30}$/, message: '收款账户须为6至30位数字' })
|
if (field === 'bankCardNumber') rules.push({ pattern: /^[0-9]{6,30}$/, message: '收款账户须为6至30位数字' })
|
||||||
@@ -464,7 +464,6 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.showTypePicker = false
|
this.showTypePicker = false
|
||||||
},
|
},
|
||||||
onSave() {
|
onSave() {
|
||||||
this.$refs.formRef.validate().then(() => {
|
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
message: "您确定保存吗?"
|
message: "您确定保存吗?"
|
||||||
@@ -476,7 +475,6 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}).catch(errors => this.showInvalidApplicationTab(errors))
|
|
||||||
},
|
},
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
this.$refs.formRef.validate().then(() => {
|
this.$refs.formRef.validate().then(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user