Compare commits
3
Commits
e0004e410f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
790e8e9f50 | ||
|
|
81fd5cb773 | ||
|
|
efad953710 |
+25
-12
@@ -6,14 +6,13 @@ 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.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.base.utils.PageUtil;
|
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.ProcessTaskStateEnum;
|
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.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
@@ -94,10 +93,12 @@ public class CondolenceReadController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
cnd.andEX("info.type", "=", type);
|
cnd.andEX("info.type", "=", type);
|
||||||
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();
|
||||||
@@ -106,9 +107,6 @@ public class CondolenceReadController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) {
|
|
||||||
cnd.and("info.applyUnionId", "=", SecurityUtil.getUnionId());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("info.createTime");
|
cnd.desc("info.createTime");
|
||||||
@@ -142,20 +140,18 @@ public class CondolenceReadController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and(ProcessInstance::getState, "=", ProcessTaskStateEnum.FINISHED.getCode());
|
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
cnd.andEX("con.type", "=", type);
|
cnd.andEX("con.type", "=", type);
|
||||||
cnd.andEX("YEAR(info.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("info.helpUserName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
seg.or("con.helpUserName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
seg.or("info.helpLoginName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
seg.or("con.helpLoginName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) {
|
|
||||||
cnd.and("con.applyUnionId", "=", SecurityUtil.getUnionId());
|
|
||||||
}
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = condolenceService.listMap(sql);
|
List<NutMap> list = condolenceService.listMap(sql);
|
||||||
|
|
||||||
@@ -174,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("all_school")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (AuthUtil.hasPermission("branch_union")) {
|
||||||
|
String unionId = SecurityUtil.getUnionId();
|
||||||
|
if (StrUtil.isNotBlank(unionId)) {
|
||||||
|
cnd.and(alias + ".applyUnionId", "=", unionId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (AuthUtil.hasPermission("self")) {
|
||||||
|
cnd.and(alias + ".createdBy", "=", SecurityUtil.getUserId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cnd.and("1", "=", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-12
@@ -11,6 +11,7 @@ import com.budwk.app.base.annotation.SLog;
|
|||||||
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;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||||
import com.budwk.app.flow.constant.FlowConst;
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
import com.budwk.app.flow.engine.FlowEngine;
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
@@ -62,6 +63,8 @@ public class SpecialCondolenceApplyController {
|
|||||||
private SpecialCondolenceService specialcondolenceService;
|
private SpecialCondolenceService specialcondolenceService;
|
||||||
@Inject
|
@Inject
|
||||||
private FlowCommonService flowCommonService;
|
private FlowCommonService flowCommonService;
|
||||||
|
@Inject
|
||||||
|
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||||
|
|
||||||
@At("/")
|
@At("/")
|
||||||
@Ok("beetl:/platform/zhgh/staffbenefit/specialcondolence/apply/index.html")
|
@Ok("beetl:/platform/zhgh/staffbenefit/specialcondolence/apply/index.html")
|
||||||
@@ -80,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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,9 +184,10 @@ public class SpecialCondolenceApplyController {
|
|||||||
@Ok("void")
|
@Ok("void")
|
||||||
@SaCheckPermission(value = {"special_condolence.apply", "h5.special_condolence.apply"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"special_condolence.apply", "h5.special_condolence.apply"}, mode = SaMode.OR)
|
||||||
public void importTemplate(javax.servlet.http.HttpServletResponse response) throws Exception {
|
public void importTemplate(javax.servlet.http.HttpServletResponse response) throws Exception {
|
||||||
try (java.io.InputStream input = getClass().getResourceAsStream("/templates/special_condolence/special_condolence_import.xlsx")) {
|
String templateCode = "special_condolence_import";
|
||||||
if (input == null) throw new com.budwk.app.base.exception.BaseException("导入模板不存在");
|
try (java.io.InputStream input = sysOfficeTemplateUtil.getTemplate(templateCode)) {
|
||||||
com.budwk.app.base.utils.CommonDownloadUtil.download("特殊慰问导入模板.xlsx", input.readAllBytes(), response);
|
com.budwk.app.base.utils.CommonDownloadUtil.download(
|
||||||
|
sysOfficeTemplateUtil.getTemplateFileName(templateCode), input.readAllBytes(), response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-17
@@ -6,17 +6,14 @@ 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.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.base.utils.PageUtil;
|
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.ProcessTaskStateEnum;
|
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.specialcondolence.model.SpecialCondolence;
|
import com.budwk.app.zhgh.staffbenefit.specialcondolence.model.SpecialCondolence;
|
||||||
import com.budwk.app.zhgh.staffbenefit.specialcondolence.service.SpecialCondolenceService;
|
import com.budwk.app.zhgh.staffbenefit.specialcondolence.service.SpecialCondolenceService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -74,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,
|
||||||
@@ -94,6 +92,7 @@ public class SpecialCondolenceReadController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
cnd.andEX("info.type", "=", type);
|
cnd.andEX("info.type", "=", type);
|
||||||
cnd.andEX("YEAR(info.createTime)", "=", year);
|
cnd.andEX("YEAR(info.createTime)", "=", year);
|
||||||
cnd.andEX("info.applyUnionId", "=", unionId);
|
cnd.andEX("info.applyUnionId", "=", unionId);
|
||||||
@@ -106,9 +105,6 @@ public class SpecialCondolenceReadController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) {
|
|
||||||
cnd.and("info.applyUnionId", "=", SecurityUtil.getUnionId());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
cnd.desc("info.createTime");
|
cnd.desc("info.createTime");
|
||||||
@@ -133,40 +129,47 @@ public class SpecialCondolenceReadController {
|
|||||||
//查询审核通过的数据
|
//查询审核通过的数据
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
select
|
select
|
||||||
con.*,
|
con.subject,
|
||||||
type.name as typeName
|
case when recipient.id is null then con.helpUserName else recipient.helpUserName end as helpUserName,
|
||||||
|
case when recipient.id is null then con.helpLoginName else recipient.helpLoginName end as helpLoginName,
|
||||||
|
con.applyUserName,
|
||||||
|
con.helpUnionName,
|
||||||
|
con.helpUnitName,
|
||||||
|
case when recipient.id is null then type.name else recipient.typeName end as typeName,
|
||||||
|
case when recipient.id is null then con.money else recipient.money end as money,
|
||||||
|
con.remark
|
||||||
from
|
from
|
||||||
special_condolence con
|
special_condolence con
|
||||||
|
left join special_condolence_recipient recipient on recipient.applyId = con.id and recipient.delFlag = false
|
||||||
left join wf_process_instance ins on ins.businessNo = con.id
|
left join wf_process_instance ins on ins.businessNo = con.id
|
||||||
left join special_condolence_type type on type.id = con.type
|
left join special_condolence_type type on type.id = con.type
|
||||||
$condition
|
$condition
|
||||||
|
order by con.createTime desc, con.id, recipient.sortNum, recipient.id
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and(ProcessInstance::getState, "=", ProcessTaskStateEnum.FINISHED.getCode());
|
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||||
cnd.andEX("con.type", "=", type);
|
cnd.andEX("con.type", "=", type);
|
||||||
cnd.andEX("YEAR(info.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);
|
||||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("info.helpUserName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
seg.or("con.helpUserName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
seg.or("info.helpLoginName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
seg.or("con.helpLoginName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) {
|
|
||||||
cnd.and("con.applyUnionId", "=", SecurityUtil.getUnionId());
|
|
||||||
}
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = specialcondolenceService.listMap(sql);
|
List<NutMap> list = specialcondolenceService.listMap(sql);
|
||||||
|
|
||||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||||
|
exportEntities.add(new ExcelExportEntity("事项", "subject", 30));
|
||||||
exportEntities.add(new ExcelExportEntity("慰问对象", "helpUserName", 20));
|
exportEntities.add(new ExcelExportEntity("慰问对象", "helpUserName", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("慰问对象工号", "helpLoginName", 20));
|
exportEntities.add(new ExcelExportEntity("慰问对象工号", "helpLoginName", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("申请人", "applyUserName", 20));
|
exportEntities.add(new ExcelExportEntity("申请人", "applyUserName", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("所在工会", "helpUnionName", 20));
|
exportEntities.add(new ExcelExportEntity("所在工会", "helpUnionName", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("所在单位", "helpUnitName", 20));
|
exportEntities.add(new ExcelExportEntity("所在单位", "helpUnitName", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("慰问类型", "typeName", 20));
|
exportEntities.add(new ExcelExportEntity("慰问类型", "typeName", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("拟补贴金额", "money", 20));
|
exportEntities.add(new ExcelExportEntity("慰问金额", "money", 20));
|
||||||
exportEntities.add(new ExcelExportEntity("申请理由", "remark", 20));
|
exportEntities.add(new ExcelExportEntity("申请理由", "remark", 20));
|
||||||
|
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
|
|||||||
+6
@@ -30,6 +30,12 @@ public class SpecialCondolence extends BaseModel {
|
|||||||
@PrevInsert(uu32 = true)
|
@PrevInsert(uu32 = true)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("事项")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||||
|
private String subject;
|
||||||
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("申请人ID")
|
@Comment("申请人ID")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
|||||||
+20
-15
@@ -14,6 +14,8 @@ public final class SpecialCondolenceRecipients {
|
|||||||
private SpecialCondolenceRecipients() {}
|
private SpecialCondolenceRecipients() {}
|
||||||
|
|
||||||
public static void prepare(SpecialCondolence info, Dao dao) {
|
public static void prepare(SpecialCondolence info, Dao dao) {
|
||||||
|
if (info.getSubject() == null || info.getSubject().trim().isEmpty() || info.getSubject().trim().length() > 200) throw new BaseException("请填写200字以内的事项");
|
||||||
|
info.setSubject(info.getSubject().trim());
|
||||||
List<JSONObject> rows = info.getRecipients();
|
List<JSONObject> rows = info.getRecipients();
|
||||||
if (rows == null || rows.isEmpty()) throw new BaseException("请添加慰问对象");
|
if (rows == null || rows.isEmpty()) throw new BaseException("请添加慰问对象");
|
||||||
if (rows.size() > 1000) throw new BaseException("每次申请最多1000人");
|
if (rows.size() > 1000) throw new BaseException("每次申请最多1000人");
|
||||||
@@ -30,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);
|
||||||
@@ -78,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)
|
java.util.List<com.budwk.app.sys.views.View_user> users = dao.query(com.budwk.app.sys.views.View_user.class,
|
||||||
.and("idCard", "=", row.getStr("idCard")).and("username", "=", row.getStr("helpUserName"));
|
org.nutz.dao.Cnd.where("idCard", "=", row.getStr("idCard"))
|
||||||
java.util.List<com.budwk.app.sys.views.View_user> dispatched = dao.query(com.budwk.app.sys.views.View_user.class,
|
.and("username", "=", row.getStr("helpUserName")));
|
||||||
identity.and("personType", "=", "劳务派遣人员"));
|
if (users.isEmpty()) throw new BaseException(prefix + "姓名、身份证与人员档案不匹配");
|
||||||
if (dispatched.size() > 1) throw new BaseException(prefix + "劳务派遣人员身份重复,请核对档案");
|
java.util.List<com.budwk.app.sys.views.View_user> members = users.stream()
|
||||||
if (dispatched.size() == 1) {
|
.filter(member -> java.util.Objects.equals(member.getUnionId(), unionId))
|
||||||
user = dispatched.get(0);
|
.collect(java.util.stream.Collectors.toList());
|
||||||
} else {
|
if (members.isEmpty()) throw new BaseException(prefix + "只能选择申请人本工会人员");
|
||||||
if (cn.hutool.core.util.StrUtil.isBlank(row.getStr("helpLoginName"))) throw new BaseException(prefix + "普通人员必须填写工号");
|
String loginName = row.getStr("helpLoginName");
|
||||||
java.util.List<com.budwk.app.sys.views.View_user> users = dao.query(com.budwk.app.sys.views.View_user.class,
|
if (cn.hutool.core.util.StrUtil.isNotBlank(loginName)) {
|
||||||
org.nutz.dao.Cnd.where("unionId", "=", unionId).and("loginname", "=", row.getStr("helpLoginName"))
|
members = members.stream().filter(member -> "劳务派遣人员".equals(member.getPersonType())
|
||||||
.and("username", "=", row.getStr("helpUserName")).and("idCard", "=", row.getStr("idCard")));
|
|| java.util.Objects.equals(member.getLoginname(), loginName))
|
||||||
if (users.size() != 1) throw new BaseException(prefix + "工号、姓名、身份证不匹配或不属于申请人本工会");
|
.collect(java.util.stream.Collectors.toList());
|
||||||
user = users.get(0);
|
|
||||||
}
|
}
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
-- 表已存在时不执行本文件中的建表语句;本文件不复制数据、不配置角色授权和工作流。
|
-- 表已存在时不执行本文件中的建表语句;本文件不复制数据、不配置角色授权和工作流。
|
||||||
CREATE TABLE `special_condolence` (
|
CREATE TABLE `special_condolence` (
|
||||||
`id` varchar(32) NOT NULL COMMENT 'ID',
|
`id` varchar(32) NOT NULL COMMENT 'ID',
|
||||||
|
`subject` varchar(255) DEFAULT NULL COMMENT '事项',
|
||||||
`applyUserId` varchar(32) DEFAULT NULL COMMENT '申请人ID',
|
`applyUserId` varchar(32) DEFAULT NULL COMMENT '申请人ID',
|
||||||
`applyUserName` varchar(100) DEFAULT NULL COMMENT '申请人姓名',
|
`applyUserName` varchar(100) DEFAULT NULL COMMENT '申请人姓名',
|
||||||
`applyLoginName` varchar(120) DEFAULT NULL COMMENT '申请人工号',
|
`applyLoginName` varchar(120) DEFAULT NULL COMMENT '申请人工号',
|
||||||
@@ -185,6 +186,7 @@ VALUES ('7f4a820d5a394bb8a0a92d6699afe7c8', '42b4b5f54593cf023961ad1c9ce36f53'),
|
|||||||
INSERT INTO sys_role_menu (roleId, menuId)
|
INSERT INTO sys_role_menu (roleId, menuId)
|
||||||
VALUES
|
VALUES
|
||||||
('494ac71eb8b44d0e99e19b7fde6bd469', '4c46696d75ff0eddf5cb57fac3e5d06d'),
|
('494ac71eb8b44d0e99e19b7fde6bd469', '4c46696d75ff0eddf5cb57fac3e5d06d'),
|
||||||
|
('494ac71eb8b44d0e99e19b7fde6bd469', '8d5ebaa091eee01abb33e89e3dcc92f8'),
|
||||||
('494ac71eb8b44d0e99e19b7fde6bd469', '7f66eb63b6ebd81c5eee9c5c2de2ed98');
|
('494ac71eb8b44d0e99e19b7fde6bd469', '7f66eb63b6ebd81c5eee9c5c2de2ed98');
|
||||||
|
|
||||||
-- 特殊慰问 h5
|
-- 特殊慰问 h5
|
||||||
@@ -198,6 +200,7 @@ VALUES
|
|||||||
INSERT INTO sys_role_menu (roleId, menuId)
|
INSERT INTO sys_role_menu (roleId, menuId)
|
||||||
VALUES
|
VALUES
|
||||||
('6aece46b946e4fb9ac4cb15c0cd8c3e6', '4c46696d75ff0eddf5cb57fac3e5d06d'),
|
('6aece46b946e4fb9ac4cb15c0cd8c3e6', '4c46696d75ff0eddf5cb57fac3e5d06d'),
|
||||||
|
('6aece46b946e4fb9ac4cb15c0cd8c3e6', '8d5ebaa091eee01abb33e89e3dcc92f8'),
|
||||||
('6aece46b946e4fb9ac4cb15c0cd8c3e6', 'b24a5bef9ccbf7241c5bb85e80352f8f');
|
('6aece46b946e4fb9ac4cb15c0cd8c3e6', 'b24a5bef9ccbf7241c5bb85e80352f8f');
|
||||||
|
|
||||||
-- 特殊慰问 h5
|
-- 特殊慰问 h5
|
||||||
@@ -211,6 +214,7 @@ VALUES
|
|||||||
INSERT INTO sys_role_menu (roleId, menuId)
|
INSERT INTO sys_role_menu (roleId, menuId)
|
||||||
VALUES
|
VALUES
|
||||||
('b3854469e6f44901b22bb791cb538431', '4c46696d75ff0eddf5cb57fac3e5d06d'),
|
('b3854469e6f44901b22bb791cb538431', '4c46696d75ff0eddf5cb57fac3e5d06d'),
|
||||||
|
('b3854469e6f44901b22bb791cb538431', '8d5ebaa091eee01abb33e89e3dcc92f8'),
|
||||||
('b3854469e6f44901b22bb791cb538431', '9c37242f50c5fb4a9c1b2b9b9dd0e2fd');
|
('b3854469e6f44901b22bb791cb538431', '9c37242f50c5fb4a9c1b2b9b9dd0e2fd');
|
||||||
|
|
||||||
-- 特殊慰问 h5
|
-- 特殊慰问 h5
|
||||||
|
|||||||
@@ -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');
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
<el-descriptions-item label="慰问类型" :span="2">
|
||||||
|
<el-form-item label="慰问类型" prop="type">
|
||||||
|
<el-select v-model="formData.type" filterable @change="typeChange" style="width:100%" placeholder="请选择慰问类型">
|
||||||
|
<el-option v-for="t in typeOptions" :key="t.id" :value="t.id" :label="t.name"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="慰问金额" :span="2">
|
||||||
|
<el-form-item label="慰问金额" prop="perMoney" :rules="recipientRules.money">
|
||||||
|
<el-input v-model="formData.perMoney" readonly style="width:100%" placeholder="根据慰问类型自动带出"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="慰问时间" :span="2">
|
||||||
|
<el-form-item label="慰问时间" prop="occurTime" :rules="recipientRules.occurTime">
|
||||||
|
<el-date-picker v-model="formData.occurTime" type="date" value-format="yyyy-MM-dd" style="width:100%" placeholder="请选择慰问时间"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
+42
-21
@@ -10,25 +10,27 @@ layout("/layouts/platform.html"){
|
|||||||
<snaker-start slot="header" label="特殊慰问" define_key="TSWW"></snaker-start>
|
<snaker-start slot="header" label="特殊慰问" define_key="TSWW"></snaker-start>
|
||||||
<el-form size="small" :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
<el-form size="small" :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||||
class="flow-task-form">
|
class="flow-task-form">
|
||||||
<div class="special-condolence-section-title">申请人信息</div>
|
<el-tabs v-model="activeApplicationTab">
|
||||||
<el-descriptions :column="2" border size="small">
|
<el-tab-pane label="基础信息" name="form">
|
||||||
<el-descriptions-item label="申请人姓名">{{formData.applyUserName}}</el-descriptions-item>
|
<el-descriptions :column="6" border size="small">
|
||||||
<el-descriptions-item label="申请人工号">{{formData.applyLoginName}}</el-descriptions-item>
|
<el-descriptions-item label="事项" :span="2"><el-form-item prop="subject" label="事项"><el-input v-model="formData.subject" maxlength="200" show-word-limit placeholder="请输入特殊慰问事项"></el-input></el-form-item></el-descriptions-item>
|
||||||
<el-descriptions-item label="申请人单位">{{formData.applyUnitName}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="申请人工会">{{formData.applyUnionName}}</el-descriptions-item>
|
|
||||||
|
|
||||||
</el-descriptions>
|
<el-descriptions-item label="申请人姓名" :span="2">{{formData.applyUserName}}</el-descriptions-item>
|
||||||
<!--#include('recipients.html'){}#-->
|
<el-descriptions-item label="申请人工号" :span="2">{{formData.applyLoginName}}</el-descriptions-item>
|
||||||
<div class="special-condolence-section-title">申请说明与签字</div>
|
|
||||||
<el-descriptions :column="3" border size="small">
|
|
||||||
<el-descriptions-item label="申请事由" :span="3">
|
<!--#include('config.html'){}#-->
|
||||||
|
<el-descriptions-item label="申请人单位" :span="2">{{formData.applyUnitName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请人工会" :span="2">{{formData.applyUnionName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="" :span="2"><span></span></el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请事由" :span="6">
|
||||||
<el-form-item prop="remark" label="申请事由">
|
<el-form-item prop="remark" label="申请事由">
|
||||||
<el-input maxlength="500" v-model="formData.remark" placeholder="请填写申请事由"
|
<el-input maxlength="500" v-model="formData.remark" placeholder="请填写申请事由"
|
||||||
type="textarea" :rows="3" resize="none"></el-input>
|
type="textarea" :rows="3" resize="none"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item :span="3" v-if="chooseType.isUploadFile === true">
|
<el-descriptions-item :span="6" v-if="chooseType.isUploadFile === true">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
附件
|
附件
|
||||||
<el-tooltip class="item" effect="dark" :content="'上传附件说明:' + chooseType.uploadFileDesc"
|
<el-tooltip class="item" effect="dark" :content="'上传附件说明:' + chooseType.uploadFileDesc"
|
||||||
@@ -48,12 +50,17 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="签字" :span="3">
|
<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>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="慰问对象" name="recipients" :lazy="false">
|
||||||
|
<!--#include('recipients.html'){}#-->
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end" class="special-condolence-actions">
|
<el-row type="flex" justify="end" class="special-condolence-actions">
|
||||||
<el-button type="primary" plain @click="onSave">保存申请</el-button>
|
<el-button type="primary" plain @click="onSave">保存申请</el-button>
|
||||||
@@ -84,7 +91,8 @@ layout("/layouts/platform.html"){
|
|||||||
taskId: GetQueryString("taskId"),
|
taskId: GetQueryString("taskId"),
|
||||||
formData: { recipients: [] },
|
formData: { recipients: [] },
|
||||||
formRules: {
|
formRules: {
|
||||||
recipients: [{ validator: (rule, value, callback) => callback(value && value.length ? undefined : new Error("请添加慰问对象")), trigger: "change" }],
|
subject: [{ required: true, whitespace: true, message: "请填写事项", trigger: ["blur", "change"] }, { max: 200, message: "事项最多200字", trigger: "blur" }],
|
||||||
|
recipients: [{ validator: (rule, value, callback) => callback(Array.isArray(value) && value.length > 0 ? undefined : new Error("请至少添加一位慰问对象")), trigger: "change" }],
|
||||||
helpUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
helpUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
payUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
payUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
type: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
type: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||||
@@ -197,8 +205,6 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSave() {
|
onSave() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
|
||||||
if (!valid) return
|
|
||||||
this.$confirm("您确定保存吗?", "提示", {
|
this.$confirm("您确定保存吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@@ -211,10 +217,24 @@ 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() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
this.validateApplication((valid, invalidFields) => {
|
||||||
|
if (!valid) { this.showInvalidApplicationTab(invalidFields); return }
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
@@ -234,7 +254,8 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onFinishTask() {
|
onFinishTask() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
this.validateApplication((valid, invalidFields) => {
|
||||||
|
if (!valid) { this.showInvalidApplicationTab(invalidFields); return }
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
@@ -263,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 {
|
||||||
|
|||||||
+5
-3
@@ -12,8 +12,8 @@
|
|||||||
.special-condolence-apply .el-descriptions .el-textarea__inner { font-size: 14px; line-height: 22px; }
|
.special-condolence-apply .el-descriptions .el-textarea__inner { font-size: 14px; line-height: 22px; }
|
||||||
|
|
||||||
.special-condolence-apply .el-descriptions-item__label { width: 130px; color: #606266; background: #f7f9fc; }
|
.special-condolence-apply .el-descriptions-item__label { width: 130px; color: #606266; background: #f7f9fc; }
|
||||||
.special-condolence-apply .special-condolence-recipients { margin: 28px 0; border: 1px solid #e4e7ed; border-radius: 6px; overflow: hidden; }
|
.special-condolence-apply .special-condolence-recipients { margin: 0; }
|
||||||
.special-condolence-apply .special-condolence-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 20px; }
|
.special-condolence-apply .special-condolence-toolbar { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 14px; padding: 0 0 12px; }
|
||||||
.special-condolence-apply .special-condolence-toolbar .special-condolence-section-title { margin: 0 0 4px; }
|
.special-condolence-apply .special-condolence-toolbar .special-condolence-section-title { margin: 0 0 4px; }
|
||||||
.special-condolence-hint { color: #606266; font-size: 12px; line-height: 20px; }
|
.special-condolence-hint { color: #606266; font-size: 12px; line-height: 20px; }
|
||||||
.special-condolence-apply .special-condolence-toolbar-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
|
.special-condolence-apply .special-condolence-toolbar-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
.special-condolence-apply .special-condolence-table-item .el-date-editor { width: 100%; }
|
.special-condolence-apply .special-condolence-table-item .el-date-editor { width: 100%; }
|
||||||
.special-condolence-apply .special-condolence-table-item .el-input-number .el-input__inner { text-align: right; }
|
.special-condolence-apply .special-condolence-table-item .el-input-number .el-input__inner { text-align: right; }
|
||||||
.special-condolence-apply .special-condolence-delete { color: #d64040; }
|
.special-condolence-apply .special-condolence-delete { color: #d64040; }
|
||||||
.special-condolence-apply .special-condolence-table-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 20px; background: #fafbfd; }
|
.special-condolence-apply .special-condolence-table-footer { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 20px; background: #fafbfd; }
|
||||||
.special-condolence-apply .special-condolence-total { display: flex; align-items: baseline; gap: 6px; color: #606266; font-size: 13px; font-variant-numeric: tabular-nums; }
|
.special-condolence-apply .special-condolence-total { display: flex; align-items: baseline; gap: 6px; color: #606266; font-size: 13px; font-variant-numeric: tabular-nums; }
|
||||||
.special-condolence-apply .special-condolence-total > span { margin-left: 18px; }
|
.special-condolence-apply .special-condolence-total > span { margin-left: 18px; }
|
||||||
.special-condolence-apply .special-condolence-total-amount { color: #303133; font-size: 20px; }
|
.special-condolence-apply .special-condolence-total-amount { color: #303133; font-size: 20px; }
|
||||||
@@ -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; }
|
||||||
|
|||||||
+3
-28
@@ -1,39 +1,15 @@
|
|||||||
<div class="special-condolence-section-title">统一慰问配置</div>
|
|
||||||
<el-descriptions :column="3" border size="small">
|
|
||||||
<el-descriptions-item label="慰问类型">
|
|
||||||
<el-form-item label="慰问类型" prop="type">
|
|
||||||
<el-select v-model="formData.type" filterable @change="typeChange" style="width:100%" placeholder="请选择慰问类型">
|
|
||||||
<el-option v-for="t in typeOptions" :key="t.id" :value="t.id" :label="t.name"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="慰问金额">
|
|
||||||
<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-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="慰问时间">
|
|
||||||
<el-form-item label="慰问时间" prop="occurTime" :rules="recipientRules.occurTime">
|
|
||||||
<el-date-picker v-model="formData.occurTime" type="date" value-format="yyyy-MM-dd" style="width:100%" placeholder="请选择慰问时间"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<section class="special-condolence-recipients">
|
<section class="special-condolence-recipients">
|
||||||
<div class="special-condolence-toolbar">
|
<div class="special-condolence-toolbar">
|
||||||
<div>
|
|
||||||
<div class="special-condolence-section-title">慰问对象明细 <el-tag size="small" effect="plain">{{ recipientCount }} 人</el-tag></div>
|
|
||||||
<div class="special-condolence-hint">一行填写一位慰问对象,所有人员随本申请统一审批。</div>
|
|
||||||
</div>
|
|
||||||
<div class="special-condolence-toolbar-buttons">
|
<div class="special-condolence-toolbar-buttons">
|
||||||
<el-button size="small" icon="el-icon-upload2" @click="importVisible = true">Excel 导入</el-button>
|
<el-button size="small" icon="el-icon-upload2" @click="importVisible = true">Excel 导入</el-button>
|
||||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="formData.recipients.push(newRecipient())">新增慰问对象</el-button>
|
<el-button size="small" type="primary" icon="el-icon-plus" @click="formData.recipients.push(newRecipient())">新增慰问对象</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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 :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>
|
||||||
@@ -42,7 +18,6 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="special-condolence-table-footer">
|
<div class="special-condolence-table-footer">
|
||||||
<el-button type="text" icon="el-icon-plus" @click="formData.recipients.push(newRecipient())">继续添加一行</el-button>
|
|
||||||
<div class="special-condolence-total">共 <strong>{{ recipientCount }}</strong> 人<span>慰问金额合计</span><strong class="special-condolence-total-amount">¥ {{ recipientTotal }}</strong></div>
|
<div class="special-condolence-total">共 <strong>{{ recipientCount }}</strong> 人<span>慰问金额合计</span><strong class="special-condolence-total-amount">¥ {{ recipientTotal }}</strong></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
+31
-4
@@ -1,6 +1,6 @@
|
|||||||
const specialCondolenceRecipients = {
|
const specialCondolenceRecipients = {
|
||||||
data() {
|
data() {
|
||||||
return { recipientRules: this.createRecipientRules(), importVisible: false, importLoading: false }
|
return { activeApplicationTab: 'form', recipientRules: this.createRecipientRules(), importVisible: false, importLoading: false }
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
recipientCount() {
|
recipientCount() {
|
||||||
@@ -13,10 +13,34 @@ const specialCondolenceRecipients = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
activeApplicationTab() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.recipientTableRef) this.$refs.recipientTableRef.doLayout()
|
||||||
|
})
|
||||||
|
},
|
||||||
typeOptions() { this.chooseType = this.typeOptions.find(t => t.id === this.formData.type) || {} },
|
typeOptions() { this.chooseType = this.typeOptions.find(t => t.id === this.formData.type) || {} },
|
||||||
'formData.type'(value) { this.chooseType = this.typeOptions.find(t => t.id === value) || {} }
|
'formData.type'(value) { this.chooseType = this.typeOptions.find(t => t.id === value) || {} }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showInvalidApplicationTab(errors) {
|
||||||
|
const fields = Array.isArray(errors) ? errors.map(error => error.name || '') : Object.keys(errors || {})
|
||||||
|
if (!fields.length) return
|
||||||
|
this.activeApplicationTab = fields.some(field => !field.startsWith('recipients')) ? 'form' : 'recipients'
|
||||||
|
if (this.activeApplicationTab === 'recipients') this.notifyRecipientError('请完善慰问对象的必填信息')
|
||||||
|
},
|
||||||
|
notifyRecipientError(message) {
|
||||||
|
if (this.$toast && this.$toast.fail) this.$toast.fail(message)
|
||||||
|
else this.$message.error(message)
|
||||||
|
},
|
||||||
|
ensureApplicationRecipients() {
|
||||||
|
const rows = this.formData.recipients
|
||||||
|
if (!Array.isArray(rows) || rows.length === 0 || rows.some(row => !row || !String(row.helpUserId || row.helpUserName || '').trim())) {
|
||||||
|
this.activeApplicationTab = 'recipients'
|
||||||
|
this.notifyRecipientError('请先选择慰问对象,并填写完整信息')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
createRecipientRules() {
|
createRecipientRules() {
|
||||||
const required = label => ({ required: true, whitespace: true, message: '请填写' + label, trigger: ['blur', 'change'] })
|
const required = label => ({ required: true, whitespace: true, message: '请填写' + label, trigger: ['blur', 'change'] })
|
||||||
return {
|
return {
|
||||||
@@ -71,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
|
||||||
}
|
}
|
||||||
|
|||||||
+48
-24
@@ -1,20 +1,44 @@
|
|||||||
const specialcondolenceInfo = {
|
const specialcondolenceInfo = {
|
||||||
template: /*language=HTML*/ `
|
template: /*language=HTML*/ `
|
||||||
<div>
|
<div>
|
||||||
|
<el-tabs v-model="activeInfoTab">
|
||||||
|
<el-tab-pane label="基础信息" name="form">
|
||||||
<div class="process-title">
|
<div class="process-title">
|
||||||
申请信息
|
申请信息
|
||||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||||
</div>
|
</div>
|
||||||
<el-descriptions :column="3" border>
|
<el-descriptions :column="6" border size="small" :label-style="{ width: '130px', minWidth: '130px', maxWidth: '130px', fontSize: '14px', fontWeight: 400, lineHeight: '32px', padding: '8px 12px' }" :content-style="{ fontSize: '14px', fontWeight: 400, lineHeight: '32px', padding: '8px 12px' }">
|
||||||
<el-descriptions-item label="申请人姓名">{{ viewData.applyUserName }}</el-descriptions-item>
|
<el-descriptions-item label="事项" :span="2">{{ viewData.subject || '--' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请人工号">{{ viewData.applyLoginName }}</el-descriptions-item>
|
<el-descriptions-item label="申请人姓名" :span="2">{{ viewData.applyUserName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请人单位">{{ viewData.applyUnitName }}</el-descriptions-item>
|
<el-descriptions-item label="申请人工号" :span="2">{{ viewData.applyLoginName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请人工会">{{ viewData.applyUnionName }}</el-descriptions-item>
|
|
||||||
<template v-if="viewData.recipients && viewData.recipients.length">
|
<template v-if="viewData.recipients && viewData.recipients.length">
|
||||||
<el-descriptions-item label="慰问类型">{{ viewData.typeName }}</el-descriptions-item>
|
<el-descriptions-item label="慰问类型" :span="2">{{ viewData.typeName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="每人慰问金额">{{ viewData.perMoney }} 元</el-descriptions-item>
|
<el-descriptions-item label="每人慰问金额" :span="2">{{ viewData.perMoney }} 元</el-descriptions-item>
|
||||||
<el-descriptions-item label="慰问时间">{{ viewData.occurTime }}</el-descriptions-item>
|
<el-descriptions-item label="慰问时间" :span="2">{{ viewData.occurTime }}</el-descriptions-item>
|
||||||
</template>
|
</template>
|
||||||
|
<el-descriptions-item label="申请人单位" :span="2">{{ viewData.applyUnitName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请人工会" :span="2">{{ viewData.applyUnionName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="" :span="2"><span></span></el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请事由" :span="6">
|
||||||
|
<div style="white-space: pre-line">{{ viewData.remark }}</div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="附件" :span="6">
|
||||||
|
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files"
|
||||||
|
complete_result></file-preview>
|
||||||
|
<span v-else>暂无附件</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="签字" :span="6">
|
||||||
|
<el-image :src="viewData.signature"
|
||||||
|
v-if="viewData.signature"
|
||||||
|
class="signature-image"></el-image>
|
||||||
|
<span v-else>暂无签字</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="慰问对象" name="recipients">
|
||||||
|
<el-descriptions v-if="!viewData.recipients || !viewData.recipients.length" :column="3" border>
|
||||||
<template v-if="!viewData.recipients || !viewData.recipients.length">
|
<template v-if="!viewData.recipients || !viewData.recipients.length">
|
||||||
<el-descriptions-item label="慰问对象">{{ viewData.helpUserName }}</el-descriptions-item>
|
<el-descriptions-item label="慰问对象">{{ viewData.helpUserName }}</el-descriptions-item>
|
||||||
<!-- <el-descriptions-item label="经办人">{{ viewData.handlerUserName }}</el-descriptions-item>-->
|
<!-- <el-descriptions-item label="经办人">{{ viewData.handlerUserName }}</el-descriptions-item>-->
|
||||||
@@ -32,27 +56,13 @@ const specialcondolenceInfo = {
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions-item label="申请事由" :span="3">
|
|
||||||
<div style="white-space: pre-line">{{ viewData.remark }}</div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="附件" :span="3">
|
|
||||||
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files"
|
|
||||||
complete_result></file-preview>
|
|
||||||
<span v-else>暂无附件</span>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="签字" :span="3">
|
|
||||||
<el-image :src="viewData.signature"
|
|
||||||
v-if="viewData.signature"
|
|
||||||
class="signature-image"></el-image>
|
|
||||||
<span v-else>暂无签字</span>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<div v-if="viewData.recipients && viewData.recipients.length" class="process-title" style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px">
|
<div v-if="viewData.recipients && viewData.recipients.length" class="process-title" style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px">
|
||||||
<span>慰问对象明细 <el-tag size="small" effect="plain">{{ viewData.recipients.length }} 人</el-tag></span>
|
<span>慰问对象明细</span>
|
||||||
<span style="font-size:14px;font-weight:normal">慰问金额合计:<strong>¥ {{ detailTotal }}</strong></span>
|
<span style="font-size:14px;font-weight:normal">慰问金额合计:<strong>¥ {{ detailTotal }}</strong></span>
|
||||||
</div>
|
</div>
|
||||||
<el-table v-if="viewData.recipients && viewData.recipients.length" :data="viewData.recipients" border stripe size="small" max-height="480" class="mt10" :header-cell-style="{ background: '#f5f7fa', color: '#606266' }">
|
<el-table ref="recipientInfoTableRef" v-if="viewData.recipients && viewData.recipients.length" :data="viewData.recipients" border stripe size="small" max-height="480" class="mt10" :header-cell-style="{ background: '#f5f7fa', color: '#606266' }">
|
||||||
<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 prop="helpUserName" label="慰问对象" width="130" fixed="left"></el-table-column>
|
<el-table-column prop="helpUserName" label="慰问对象" width="130" fixed="left"></el-table-column>
|
||||||
<el-table-column prop="helpLoginName" label="工号" min-width="130"></el-table-column>
|
<el-table-column prop="helpLoginName" label="工号" min-width="130"></el-table-column>
|
||||||
@@ -61,6 +71,9 @@ const specialcondolenceInfo = {
|
|||||||
<el-table-column prop="bankUserName" label="户名" min-width="150"></el-table-column>
|
<el-table-column prop="bankUserName" label="户名" min-width="150"></el-table-column>
|
||||||
<el-table-column prop="bankCardNumber" label="收款账户" min-width="210"></el-table-column>
|
<el-table-column prop="bankCardNumber" label="收款账户" min-width="210"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="审核记录" name="records">
|
||||||
|
<div v-if="!doneTasks.length" style="padding:32px;text-align:center;color:#909399">暂无审核记录</div>
|
||||||
<template v-for="task in doneTasks">
|
<template v-for="task in doneTasks">
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
<div class="process-title">{{ task.displayName }}</div>
|
<div class="process-title">{{ task.displayName }}</div>
|
||||||
@@ -94,6 +107,8 @@ const specialcondolenceInfo = {
|
|||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||||
</div>
|
</div>
|
||||||
@@ -102,12 +117,20 @@ const specialcondolenceInfo = {
|
|||||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeInfoTab: 'form',
|
||||||
visible: false,
|
visible: false,
|
||||||
viewData: {},
|
viewData: {},
|
||||||
doneTasks: [],
|
doneTasks: [],
|
||||||
row: null
|
row: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
activeInfoTab() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.recipientInfoTableRef) this.$refs.recipientInfoTableRef.doLayout()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
detailTotal() {
|
detailTotal() {
|
||||||
const cents = (this.viewData.recipients || []).reduce((sum, row) => {
|
const cents = (this.viewData.recipients || []).reduce((sum, row) => {
|
||||||
@@ -119,6 +142,7 @@ const specialcondolenceInfo = {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onOpen(row) {
|
onOpen(row) {
|
||||||
|
this.activeInfoTab = 'form'
|
||||||
this.row = row
|
this.row = row
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
|
|||||||
+1
-1
@@ -134,7 +134,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'helpUserName', label: '慰问对象'},
|
{prop: 'subject', label: '事项'},
|
||||||
{prop: 'applyUserName', label: '申请人'},
|
{prop: 'applyUserName', label: '申请人'},
|
||||||
{prop: 'applyUnionName', label: '所属工会'},
|
{prop: 'applyUnionName', label: '所属工会'},
|
||||||
{prop: 'applyUnitName', label: '所属单位'},
|
{prop: 'applyUnitName', label: '所属单位'},
|
||||||
|
|||||||
+1
-1
@@ -92,7 +92,7 @@ layout("/layouts/platform.html"){
|
|||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
pageDataUrl: "/platform/special_condolence/mine/pageData",
|
pageDataUrl: "/platform/special_condolence/mine/pageData",
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'helpUserName', label: '慰问对象'},
|
{prop: 'subject', label: '事项'},
|
||||||
{prop: 'applyUserName', label: '申请人'},
|
{prop: 'applyUserName', label: '申请人'},
|
||||||
{prop: 'applyUnionName', label: '所属工会'},
|
{prop: 'applyUnionName', label: '所属工会'},
|
||||||
{prop: 'applyUnitName', label: '所属单位'},
|
{prop: 'applyUnitName', label: '所属单位'},
|
||||||
|
|||||||
+2
-3
@@ -105,13 +105,12 @@ layout("/layouts/platform.html"){
|
|||||||
return {
|
return {
|
||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'helpUserName', label: '慰问对象'},
|
{prop: 'subject', label: '事项'},
|
||||||
{prop: 'helpLoginName', label: '慰问对象工号'},
|
|
||||||
{prop: 'applyUserName', label: '申请人'},
|
{prop: 'applyUserName', label: '申请人'},
|
||||||
{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: [],
|
||||||
|
|||||||
+1
-1
@@ -134,7 +134,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'helpUserName', label: '慰问对象'},
|
{prop: 'subject', label: '事项'},
|
||||||
{prop: 'applyUserName', label: '申请人'},
|
{prop: 'applyUserName', label: '申请人'},
|
||||||
{prop: 'applyUnionName', label: '所属工会'},
|
{prop: 'applyUnionName', label: '所属工会'},
|
||||||
{prop: 'applyUnitName', label: '所属单位'},
|
{prop: 'applyUnitName', label: '所属单位'},
|
||||||
|
|||||||
+1
-1
@@ -134,7 +134,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: 'helpUserName', label: '慰问对象'},
|
{prop: 'subject', label: '事项'},
|
||||||
{prop: 'applyUserName', label: '申请人'},
|
{prop: 'applyUserName', label: '申请人'},
|
||||||
{prop: 'applyUnionName', label: '所属工会'},
|
{prop: 'applyUnionName', label: '所属工会'},
|
||||||
{prop: 'applyUnitName', label: '所属单位'},
|
{prop: 'applyUnitName', label: '所属单位'},
|
||||||
|
|||||||
+59
-29
@@ -30,11 +30,15 @@ layout("/layouts/platform_h5.html"){
|
|||||||
background: #f3f7fc;
|
background: #f3f7fc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.specialcondolence-apply-form > .van-tabs > .van-tabs__content {
|
||||||
|
padding-top: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
.specialcondolence-apply-form .form-section {
|
.specialcondolence-apply-form .form-section {
|
||||||
margin-bottom: 11px;
|
margin-bottom: 11px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid #e9eff7;
|
border: 1px solid #e9eff7;
|
||||||
border-radius: 10px;
|
border-radius: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 3px 11px rgba(51, 87, 126, 0.08);
|
box-shadow: 0 3px 11px rgba(51, 87, 126, 0.08);
|
||||||
}
|
}
|
||||||
@@ -173,12 +177,15 @@ layout("/layouts/platform_h5.html"){
|
|||||||
placeholder></van-nav-bar>
|
placeholder></van-nav-bar>
|
||||||
|
|
||||||
<!-- 表单容器 -->
|
<!-- 表单容器 -->
|
||||||
<van-form ref="formRef" class="form-container specialcondolence-apply-form">
|
<van-form ref="formRef" class="form-container specialcondolence-apply-form" :show-error="true" :show-error-message="true">
|
||||||
|
|
||||||
|
<van-tabs v-model="activeApplicationTab" :lazy-render="false">
|
||||||
|
<van-tab title="基础信息" name="form">
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<section class="form-section">
|
<section class="form-section">
|
||||||
<h2 class="specialcondolence-card__title">基本信息</h2>
|
<h2 class="specialcondolence-card__title">基本信息</h2>
|
||||||
<van-cell-group :border="false">
|
<van-cell-group :border="false">
|
||||||
|
<van-field v-model="formData.subject" name="subject" label="事项" maxlength="200" required placeholder="请输入特殊慰问事项" :rules="[{ validator: value => !!String(value || '').trim() && String(value).length <= 200, message: '请填写200字以内的事项' }]"></van-field>
|
||||||
<van-field label="申请人姓名" :rules="[{ required: true }]" v-model="formData.applyUserName" readonly
|
<van-field label="申请人姓名" :rules="[{ required: true }]" v-model="formData.applyUserName" readonly
|
||||||
required name="applyUserName"></van-field>
|
required name="applyUserName"></van-field>
|
||||||
<van-field label="申请人工号" :rules="[{ required: true }]" v-model="formData.applyLoginName" readonly
|
<van-field label="申请人工号" :rules="[{ required: true }]" v-model="formData.applyLoginName" readonly
|
||||||
@@ -190,20 +197,9 @@ 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-model="formData.occurDate" type="date" :min-date="minDate" :max-date="new Date(2100, 11, 31)" 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>
|
||||||
<div v-for="(person, index) in formData.recipients" :key="index">
|
|
||||||
<van-cell :title="'慰问对象 ' + (index + 1)"><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>
|
|
||||||
<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.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.bankUserName" label="户名" maxlength="100" required :name="'recipients.' + index + '.bankUserName'" :rules="mobileRecipientRules('bankUserName', person)"></van-field>
|
|
||||||
<van-field v-model="person.bankCardNumber" label="收款账户" maxlength="30" required :name="'recipients.' + index + '.bankCardNumber'" :rules="mobileRecipientRules('bankCardNumber', person)"></van-field>
|
|
||||||
</div>
|
|
||||||
<van-field name="recipients" :value="recipientCount" :rules="[{ validator: value => Number(value) > 0, message: '请至少添加一位慰问对象' }]"><template #input><van-button native-type="button" size="small" type="info" plain @click="formData.recipients.push(newRecipient())">增加一行</van-button></template></van-field>
|
|
||||||
<van-cell title="慰问金额合计" :value="'¥ ' + recipientTotal + '(' + recipientCount + '人)'"></van-cell>
|
|
||||||
<van-field
|
<van-field
|
||||||
v-model="formData.remark"
|
v-model="formData.remark"
|
||||||
name="remark"
|
name="remark"
|
||||||
@@ -254,6 +250,26 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
</van-tab>
|
||||||
|
<van-tab title="慰问对象" name="recipients">
|
||||||
|
<section class="form-section">
|
||||||
|
<h2 class="specialcondolence-card__title">慰问对象</h2>
|
||||||
|
<van-cell-group :border="false">
|
||||||
|
<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>
|
||||||
|
<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.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.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.bankCardNumber" label="收款账户" maxlength="30" required :name="'recipients.' + index + '.bankCardNumber'" :rules="mobileRecipientRules('bankCardNumber', person)"></van-field>
|
||||||
|
</div>
|
||||||
|
<van-field name="recipients" :value="recipientCount" :rules="[{ validator: value => Number(value) > 0, message: '请至少添加一位慰问对象' }]"><template #input><van-button native-type="button" size="small" type="info" plain @click="formData.recipients.push(newRecipient())">增加一行</van-button></template></van-field>
|
||||||
|
<van-cell title="慰问金额合计" :value="'¥ ' + recipientTotal + '(' + recipientCount + '人)'"></van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
</section>
|
||||||
|
</van-tab>
|
||||||
|
</van-tabs>
|
||||||
<!-- 提交按钮 -->
|
<!-- 提交按钮 -->
|
||||||
<div class="form-actions specialcondolence-apply-actions">
|
<div class="form-actions specialcondolence-apply-actions">
|
||||||
<van-button native-type="button" @click="onSave" round type="info" plain>保存申请</van-button>
|
<van-button native-type="button" @click="onSave" round type="info" plain>保存申请</van-button>
|
||||||
@@ -276,7 +292,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
return {
|
return {
|
||||||
bizId: GetQueryString("bizId"),
|
bizId: GetQueryString("bizId"),
|
||||||
taskId: GetQueryString("taskId"),
|
taskId: GetQueryString("taskId"),
|
||||||
formData: { recipients: [] },
|
formData: { recipients: [this.newRecipient()], occurTime: this.$moment().format('YYYY-MM-DD') },
|
||||||
|
|
||||||
chooseType: {},
|
chooseType: {},
|
||||||
userOptions: [],
|
userOptions: [],
|
||||||
@@ -298,17 +314,34 @@ layout("/layouts/platform_h5.html"){
|
|||||||
showHospitalizationTimePicker: false,
|
showHospitalizationTimePicker: false,
|
||||||
showLeaveHospitalTimePicker: false,
|
showLeaveHospitalTimePicker: false,
|
||||||
minDate: new Date(2024, 0, 1),
|
minDate: new Date(2024, 0, 1),
|
||||||
maxDate: new Date(),
|
maxDate: new Date(2100, 11, 31),
|
||||||
|
|
||||||
typeDefaultIndex: 0
|
typeDefaultIndex: 0
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.user'(user) {
|
||||||
|
if (user && !this.bizId && !this.formData.applyUserId) this.init()
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showInvalidApplicationTab(errors) {
|
||||||
|
if (!Array.isArray(errors) || !errors.length) return
|
||||||
|
const error = errors[0]
|
||||||
|
const name = String(error.name || '')
|
||||||
|
const recipient = name.match(/^recipients\.(\d+)\./)
|
||||||
|
this.activeApplicationTab = name.startsWith('recipients') ? 'recipients' : 'form'
|
||||||
|
const message = error.message || '请完善必填信息'
|
||||||
|
this.$toast.fail(recipient ? '第' + (Number(recipient[1]) + 1) + '位慰问对象:' + message : message)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.scrollToField(error.name)
|
||||||
|
})
|
||||||
|
},
|
||||||
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位数字' })
|
||||||
@@ -431,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: "您确定保存吗?"
|
||||||
@@ -443,7 +475,6 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
|
||||||
},
|
},
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
this.$refs.formRef.validate().then(() => {
|
this.$refs.formRef.validate().then(() => {
|
||||||
@@ -462,7 +493,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
}).catch(errors => this.showInvalidApplicationTab(errors))
|
||||||
},
|
},
|
||||||
async onFinishTask() {
|
async onFinishTask() {
|
||||||
this.$refs.formRef.validate().then(() => {
|
this.$refs.formRef.validate().then(() => {
|
||||||
@@ -484,7 +515,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
}).catch(errors => this.showInvalidApplicationTab(errors))
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
if (this.bizId) {
|
if (this.bizId) {
|
||||||
@@ -496,11 +527,10 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
|
const user = this.$store.state.user
|
||||||
this.formData = {
|
if (!user) return
|
||||||
recipients: [this.newRecipient()],
|
const { username, loginname, id, unit, union, mobile } = user
|
||||||
perMoney: undefined,
|
this.formData = Object.assign({}, this.formData, {
|
||||||
occurTime: this.$moment().format('YYYY-MM-DD'),
|
|
||||||
applyUserName: username,
|
applyUserName: username,
|
||||||
applyLoginName: loginname,
|
applyLoginName: loginname,
|
||||||
applyUserId: id,
|
applyUserId: id,
|
||||||
@@ -508,7 +538,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
applyUnitName: unit?.name,
|
applyUnitName: unit?.name,
|
||||||
applyUnionId: union?.id,
|
applyUnionId: union?.id,
|
||||||
applyUnionName: union?.name
|
applyUnionName: union?.name
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
querySpecialCondolenceType() {
|
querySpecialCondolenceType() {
|
||||||
|
|||||||
+6
-2
@@ -36,11 +36,15 @@
|
|||||||
padding: 12px 15px calc(18px + env(safe-area-inset-bottom));
|
padding: 12px 15px calc(18px + env(safe-area-inset-bottom));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.specialcondolence-info-main > .van-tabs > .van-tabs__content {
|
||||||
|
padding-top: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
.specialcondolence-info-card {
|
.specialcondolence-info-card {
|
||||||
margin-bottom: 11px;
|
margin-bottom: 11px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid #e9eff7;
|
border: 1px solid #e9eff7;
|
||||||
border-radius: 10px;
|
border-radius: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 3px 11px rgba(51, 87, 126, .08);
|
box-shadow: 0 3px 11px rgba(51, 87, 126, .08);
|
||||||
}
|
}
|
||||||
@@ -79,7 +83,7 @@
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1px solid #c9d5e5;
|
border: 1px solid #c9d5e5;
|
||||||
border-radius: 10px;
|
border-radius: 0;
|
||||||
background: #f7f9fd;
|
background: #f7f9fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+35
-19
@@ -17,9 +17,12 @@ const specialcondolenceInfo = {
|
|||||||
></van-nav-bar>
|
></van-nav-bar>
|
||||||
<div class="specialcondolence-full-popup__scroll">
|
<div class="specialcondolence-full-popup__scroll">
|
||||||
<main class="specialcondolence-info-main">
|
<main class="specialcondolence-info-main">
|
||||||
|
<van-tabs v-model="activeInfoTab" :lazy-render="false">
|
||||||
|
<van-tab title="基础信息" name="form">
|
||||||
<section class="specialcondolence-info-card">
|
<section class="specialcondolence-info-card">
|
||||||
<h2 class="specialcondolence-info-card__title">基本信息</h2>
|
<h2 class="specialcondolence-info-card__title">基本信息</h2>
|
||||||
<van-cell-group :border="false">
|
<van-cell-group :border="false">
|
||||||
|
<van-cell title="事项">{{ viewData.subject || '--' }}</van-cell>
|
||||||
<van-cell title="申请人姓名">{{ viewData.applyUserName || '--' }}</van-cell>
|
<van-cell title="申请人姓名">{{ viewData.applyUserName || '--' }}</van-cell>
|
||||||
<van-cell title="申请人工号">{{ viewData.applyLoginName || '--' }}</van-cell>
|
<van-cell title="申请人工号">{{ viewData.applyLoginName || '--' }}</van-cell>
|
||||||
<van-cell title="申请人单位">{{ viewData.applyUnitName || '--' }}</van-cell>
|
<van-cell title="申请人单位">{{ viewData.applyUnitName || '--' }}</van-cell>
|
||||||
@@ -29,8 +32,30 @@ const specialcondolenceInfo = {
|
|||||||
<van-cell title="每人慰问金额" :value="viewData.perMoney"></van-cell>
|
<van-cell title="每人慰问金额" :value="viewData.perMoney"></van-cell>
|
||||||
<van-cell title="慰问时间" :value="viewData.occurTime"></van-cell>
|
<van-cell title="慰问时间" :value="viewData.occurTime"></van-cell>
|
||||||
</template>
|
</template>
|
||||||
|
<van-cell title="申请事由">{{ viewData.remark || '暂无' }}</van-cell>
|
||||||
|
<van-cell class="specialcondolence-info-long-cell" title="附件">
|
||||||
|
<file-preview class="specialcondolence-attachments" :files="viewData.files" complete_result></file-preview>
|
||||||
|
</van-cell>
|
||||||
|
<van-cell class="specialcondolence-info-long-cell" title="签字">
|
||||||
|
<van-image
|
||||||
|
v-if="viewData.signature"
|
||||||
|
:src="viewData.signature"
|
||||||
|
class="specialcondolence-signature-image"
|
||||||
|
fit="contain"
|
||||||
|
></van-image>
|
||||||
|
<span v-else>暂无签字</span>
|
||||||
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
</van-tab>
|
||||||
|
<van-tab title="慰问对象" name="recipients">
|
||||||
|
<section class="specialcondolence-info-card">
|
||||||
|
<h2 class="specialcondolence-info-card__title">慰问对象</h2>
|
||||||
|
<van-cell-group :border="false">
|
||||||
<template v-for="(person, index) in viewData.recipients">
|
<template v-for="(person, index) in viewData.recipients">
|
||||||
<van-cell :title="'慰问对象 ' + (index + 1)" :value="person.helpUserName"></van-cell>
|
<van-cell :title="'慰问对象 ' + (index + 1)" :title-style="{ fontWeight: 'bold' }" :value="person.helpUserName"></van-cell>
|
||||||
<van-cell title="工号" :value="person.helpLoginName || '--'"></van-cell>
|
<van-cell title="工号" :value="person.helpLoginName || '--'"></van-cell>
|
||||||
<van-cell title="身份证号码" :value="person.idCard"></van-cell>
|
<van-cell title="身份证号码" :value="person.idCard"></van-cell>
|
||||||
<van-cell title="开户行" :value="person.bankOfDeposit"></van-cell>
|
<van-cell title="开户行" :value="person.bankOfDeposit"></van-cell>
|
||||||
@@ -53,25 +78,12 @@ const specialcondolenceInfo = {
|
|||||||
<van-cell title="出院时间">{{ viewData.leaveHospitalTime || '--' }}</van-cell>
|
<van-cell title="出院时间">{{ viewData.leaveHospitalTime || '--' }}</van-cell>
|
||||||
<van-cell title="当年第几次住院(次)">{{ viewData.thisYearHospitalizationNum || '--' }}</van-cell>
|
<van-cell title="当年第几次住院(次)">{{ viewData.thisYearHospitalizationNum || '--' }}</van-cell>
|
||||||
</template>
|
</template>
|
||||||
<van-cell title="申请事由">
|
|
||||||
{{ viewData.remark || '暂无' }}
|
|
||||||
</van-cell>
|
|
||||||
</template>
|
</template>
|
||||||
<van-cell class="specialcondolence-info-long-cell" title="附件">
|
</van-cell-group>
|
||||||
<file-preview class="specialcondolence-attachments" :files="viewData.files" complete_result></file-preview>
|
</section>
|
||||||
</van-cell>
|
</van-tab>
|
||||||
<van-cell class="specialcondolence-info-long-cell" title="签字">
|
<van-tab title="审核记录" name="records">
|
||||||
<van-image
|
<van-empty v-if="!doneTasks.length" description="暂无审核记录"></van-empty>
|
||||||
v-if="viewData.signature"
|
|
||||||
:src="viewData.signature"
|
|
||||||
class="specialcondolence-signature-image"
|
|
||||||
fit="contain"
|
|
||||||
></van-image>
|
|
||||||
<span v-else>暂无签字</span>
|
|
||||||
</van-cell>
|
|
||||||
</van-cell-group>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
v-for="(task, index) in doneTasks"
|
v-for="(task, index) in doneTasks"
|
||||||
:key="task.id || index"
|
:key="task.id || index"
|
||||||
@@ -110,6 +122,8 @@ const specialcondolenceInfo = {
|
|||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
</van-tab>
|
||||||
|
</van-tabs>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,6 +139,7 @@ const specialcondolenceInfo = {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeInfoTab: 'form',
|
||||||
visible: false,
|
visible: false,
|
||||||
popupTitle: "慰问详情",
|
popupTitle: "慰问详情",
|
||||||
viewData: {},
|
viewData: {},
|
||||||
@@ -144,6 +159,7 @@ const specialcondolenceInfo = {
|
|||||||
* row 传列表当前行,title 传顶部导航标题;无返回值。
|
* row 传列表当前行,title 传顶部导航标题;无返回值。
|
||||||
*/
|
*/
|
||||||
onOpen(row, title = "慰问详情") {
|
onOpen(row, title = "慰问详情") {
|
||||||
|
this.activeInfoTab = 'form'
|
||||||
this.$set(this, "row", row)
|
this.$set(this, "row", row)
|
||||||
this.$set(this, "popupTitle", title)
|
this.$set(this, "popupTitle", title)
|
||||||
this.$set(this, "viewData", {})
|
this.$set(this, "viewData", {})
|
||||||
|
|||||||
+10
-5
@@ -90,14 +90,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<template #header="{index,row}">
|
<template #header="{index,row}">
|
||||||
<div class="specialcondolence-card-header">
|
<div class="specialcondolence-card-header">
|
||||||
<div class="specialcondolence-card-heading">
|
<div class="specialcondolence-card-heading">
|
||||||
<div class="specialcondolence-card-title">{{row.helpUserName || '--'}}</div>
|
<div class="specialcondolence-card-title">{{row.subject || '--'}}</div>
|
||||||
</div>
|
</div>
|
||||||
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
||||||
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot="{index,row}">
|
<template v-slot="{index,row}">
|
||||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
|
||||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||||
@@ -135,7 +134,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<h2 class="specialcondolence-info-card__title">
|
<h2 class="specialcondolence-info-card__title">
|
||||||
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
||||||
</h2>
|
</h2>
|
||||||
<van-form ref="formRef">
|
<van-form ref="formRef" :show-error="true" :show-error-message="true">
|
||||||
<van-field
|
<van-field
|
||||||
v-model="formData.tf_opinion"
|
v-model="formData.tf_opinion"
|
||||||
class="specialcondolence-audit-field"
|
class="specialcondolence-audit-field"
|
||||||
@@ -143,7 +142,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
rows="6"
|
rows="6"
|
||||||
placeholder="请输入审批意见"
|
placeholder="请输入审批意见"
|
||||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
:rules="[{ validator: value => !!String(value || '').trim(), message: '请填写审批意见' }]"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></van-field>
|
></van-field>
|
||||||
@@ -263,7 +262,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-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() {
|
||||||
|
|||||||
+1
-2
@@ -327,14 +327,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<template #header="{index,row}">
|
<template #header="{index,row}">
|
||||||
<div class="specialcondolence-card-header">
|
<div class="specialcondolence-card-header">
|
||||||
<div class="specialcondolence-card-heading">
|
<div class="specialcondolence-card-heading">
|
||||||
<div class="specialcondolence-card-title">{{row.helpUserName || '--'}}</div>
|
<div class="specialcondolence-card-title">{{row.subject || '--'}}</div>
|
||||||
</div>
|
</div>
|
||||||
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
||||||
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot="{index,row}">
|
<template v-slot="{index,row}">
|
||||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
|
||||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||||
|
|||||||
+10
-5
@@ -90,14 +90,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<template #header="{index,row}">
|
<template #header="{index,row}">
|
||||||
<div class="specialcondolence-card-header">
|
<div class="specialcondolence-card-header">
|
||||||
<div class="specialcondolence-card-heading">
|
<div class="specialcondolence-card-heading">
|
||||||
<div class="specialcondolence-card-title">{{row.helpUserName || '--'}}</div>
|
<div class="specialcondolence-card-title">{{row.subject || '--'}}</div>
|
||||||
</div>
|
</div>
|
||||||
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
||||||
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot="{index,row}">
|
<template v-slot="{index,row}">
|
||||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
|
||||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||||
@@ -135,7 +134,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<h2 class="specialcondolence-info-card__title">
|
<h2 class="specialcondolence-info-card__title">
|
||||||
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
||||||
</h2>
|
</h2>
|
||||||
<van-form ref="formRef">
|
<van-form ref="formRef" :show-error="true" :show-error-message="true">
|
||||||
<van-field
|
<van-field
|
||||||
v-model="formData.tf_opinion"
|
v-model="formData.tf_opinion"
|
||||||
class="specialcondolence-audit-field"
|
class="specialcondolence-audit-field"
|
||||||
@@ -143,7 +142,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
rows="6"
|
rows="6"
|
||||||
placeholder="请输入审批意见"
|
placeholder="请输入审批意见"
|
||||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
:rules="[{ validator: value => !!String(value || '').trim(), message: '请填写审批意见' }]"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></van-field>
|
></van-field>
|
||||||
@@ -246,7 +245,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-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() {
|
||||||
|
|||||||
+10
-5
@@ -90,14 +90,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<template #header="{index,row}">
|
<template #header="{index,row}">
|
||||||
<div class="specialcondolence-card-header">
|
<div class="specialcondolence-card-header">
|
||||||
<div class="specialcondolence-card-heading">
|
<div class="specialcondolence-card-heading">
|
||||||
<div class="specialcondolence-card-title">{{row.helpUserName || '--'}}</div>
|
<div class="specialcondolence-card-title">{{row.subject || '--'}}</div>
|
||||||
</div>
|
</div>
|
||||||
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
||||||
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot="{index,row}">
|
<template v-slot="{index,row}">
|
||||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
|
||||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||||
@@ -135,7 +134,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<h2 class="specialcondolence-info-card__title">
|
<h2 class="specialcondolence-info-card__title">
|
||||||
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
||||||
</h2>
|
</h2>
|
||||||
<van-form ref="formRef">
|
<van-form ref="formRef" :show-error="true" :show-error-message="true">
|
||||||
<van-field
|
<van-field
|
||||||
v-model="formData.tf_opinion"
|
v-model="formData.tf_opinion"
|
||||||
class="specialcondolence-audit-field"
|
class="specialcondolence-audit-field"
|
||||||
@@ -143,7 +142,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
rows="6"
|
rows="6"
|
||||||
placeholder="请输入审批意见"
|
placeholder="请输入审批意见"
|
||||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
:rules="[{ validator: value => !!String(value || '').trim(), message: '请填写审批意见' }]"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></van-field>
|
></van-field>
|
||||||
@@ -246,7 +245,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user