Compare commits
6
Commits
9c17925b60
...
fix_经费提案
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
637fe6f838 | ||
|
|
4f85bb08e2 | ||
|
|
29260423d5 | ||
|
|
d8e7adfe9a | ||
|
|
bc1b3bf7fe | ||
|
|
59fd83ba24 |
@@ -19,6 +19,7 @@ RoleConstant {
|
||||
SCHOOL_UNION_ADMIN("校工会管理员"),
|
||||
SCHOOL_UNION_CHAIRMAN("校工会主席"),
|
||||
SCHOOL_UNION_VICE_CHAIRMAN("校工会副主席"),
|
||||
SCHOOL_UNION_FINANCE("校工会财务"),
|
||||
SCHOOL_OFFICE_DIRECTOR("校工会办公室主任"),
|
||||
SCHOOL_UNION_WELFARE_ADMIN("校工会福利管理员"),
|
||||
SCHOOL_UNION_MEMBER_ADMIN("校工会会员管理员"),
|
||||
|
||||
@@ -6,6 +6,8 @@ import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.sys.models.Sys_file;
|
||||
import com.budwk.app.sys.models.Sys_office_template;
|
||||
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.ByteArrayPictureRenderData;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.data.PictureType;
|
||||
@@ -18,6 +20,12 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -66,6 +74,88 @@ public class SysOfficeTemplateUtil {
|
||||
return new ByteArrayInputStream(fileBytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统一渲染 DOC/DOCX 模板,保留调用方的循环表格等策略;模板输入流由调用方关闭。
|
||||
*/
|
||||
public byte[] renderTemplate(InputStream input, Object data, Configure config, boolean pdf, String context) throws Exception {
|
||||
if (input == null) throw new BaseException("模板文件不存在");
|
||||
byte[] templateBytes = input.readAllBytes();
|
||||
try (ByteArrayInputStream formatInput = new ByteArrayInputStream(templateBytes)) {
|
||||
if (com.aspose.words.FileFormatUtil.detectFileFormat(formatInput).getLoadFormat() != com.aspose.words.LoadFormat.DOCX) {
|
||||
try (ByteArrayInputStream source = new ByteArrayInputStream(templateBytes);
|
||||
ByteArrayOutputStream converted = new ByteArrayOutputStream()) {
|
||||
new com.aspose.words.Document(source).save(converted, com.aspose.words.SaveFormat.DOCX);
|
||||
templateBytes = converted.toByteArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
byte[] wordBytes;
|
||||
try (ByteArrayInputStream templateInput = new ByteArrayInputStream(templateBytes);
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
XWPFTemplate template = XWPFTemplate.compile(templateInput, config == null ? Configure.builder().build() : config)) {
|
||||
template.render(data).write(output);
|
||||
wordBytes = output.toByteArray();
|
||||
} catch (Exception e) {
|
||||
log.error("[Office模板渲染] Word模板渲染失败,context={}", context, e);
|
||||
throw e;
|
||||
}
|
||||
log.info("[Office模板渲染] Word渲染完成,context={}, templateBytes={}, outputBytes={}", context, templateBytes.length, wordBytes.length);
|
||||
if (!pdf) return wordBytes;
|
||||
try (ByteArrayInputStream wordInput = new ByteArrayInputStream(wordBytes);
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream()) {
|
||||
com.aspose.words.Document document = new com.aspose.words.Document(wordInput);
|
||||
configureDocumentFonts(document, context);
|
||||
com.aspose.words.PdfSaveOptions options = new com.aspose.words.PdfSaveOptions();
|
||||
options.setFontEmbeddingMode(com.aspose.words.PdfFontEmbeddingMode.EMBED_ALL);
|
||||
document.save(output, options);
|
||||
log.info("[Office模板渲染] PDF转换完成,context={}, outputBytes={}", context, output.size());
|
||||
return output.toByteArray();
|
||||
} catch (Exception e) {
|
||||
log.error("[Office模板渲染] PDF转换失败,context={}", context, e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private void configureDocumentFonts(com.aspose.words.Document document, String context) throws Exception {
|
||||
com.aspose.words.FontSettings settings = new com.aspose.words.FontSettings();
|
||||
List<com.aspose.words.FontSourceBase> sources = new ArrayList<>(List.of(settings.getFontsSources()));
|
||||
Set<String> folders = new LinkedHashSet<>();
|
||||
String windowsDir = System.getenv("WINDIR");
|
||||
if (StrUtil.isNotBlank(windowsDir)) folders.add(new File(windowsDir, "Fonts").getPath());
|
||||
String localAppData = System.getenv("LOCALAPPDATA");
|
||||
if (StrUtil.isNotBlank(localAppData)) folders.add(new File(localAppData, "Microsoft/Windows/Fonts").getPath());
|
||||
folders.add(new File(System.getProperty("user.dir"), "fonts").getPath());
|
||||
for (String folder : folders) {
|
||||
File directory = new File(folder);
|
||||
log.info("[Office模板渲染] 字体目录,context={}, path={}, readable={}", context, folder, directory.isDirectory() && directory.canRead());
|
||||
if (directory.isDirectory() && directory.canRead()) sources.add(new com.aspose.words.FolderFontSource(folder, true));
|
||||
}
|
||||
settings.setFontsSources(sources.toArray(new com.aspose.words.FontSourceBase[0]));
|
||||
Set<String> availableFonts = new LinkedHashSet<>();
|
||||
for (com.aspose.words.FontSourceBase source : sources) {
|
||||
for (com.aspose.words.PhysicalFontInfo font : source.getAvailableFonts()) availableFonts.add(font.getFontFamilyName());
|
||||
}
|
||||
String chineseFont = null;
|
||||
for (String candidate : List.of("SimSun", "宋体", "Microsoft YaHei", "微软雅黑", "DengXian", "等线", "SimHei", "黑体", "FangSong", "仿宋", "Noto Serif CJK SC", "Noto Sans CJK SC")) {
|
||||
if (availableFonts.contains(candidate)) {
|
||||
chineseFont = candidate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
log.info("[Office模板渲染] 中文字体选择,context={}, fontCount={}, chineseFont={}", context, availableFonts.size(), chineseFont);
|
||||
if (chineseFont != null) {
|
||||
settings.getSubstitutionSettings().getDefaultFontSubstitution().setDefaultFontName(chineseFont);
|
||||
for (String name : List.of("宋体", "SimSun", "新宋体", "NSimSun", "黑体", "SimHei", "仿宋", "FangSong", "楷体", "KaiTi", "微软雅黑", "Microsoft YaHei")) {
|
||||
if (!availableFonts.contains(name)) settings.getSubstitutionSettings().getTableSubstitution().setSubstitutes(name, chineseFont);
|
||||
}
|
||||
} else {
|
||||
log.warn("[Office模板渲染] 未发现常用中文字体,context={}, availableFonts={}", context, availableFonts);
|
||||
}
|
||||
settings.getFallbackSettings().loadMsOfficeFallbackSettings();
|
||||
document.setFontSettings(settings);
|
||||
document.setWarningCallback(warning -> log.warn("[Office模板渲染] 字体或排版警告,context={}, type={}, detail={}", context, warning.getWarningType(), warning.getDescription()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 签字url转换为poi的图片对象
|
||||
*
|
||||
@@ -77,13 +167,7 @@ public class SysOfficeTemplateUtil {
|
||||
public PictureRenderData createPictureRenderData(int width, int height, String url) {
|
||||
try {
|
||||
byte[] bytes = getFileBytesByUrl(url);
|
||||
// if (StrUtil.isBlank(url)) {
|
||||
// return null;
|
||||
// }
|
||||
// int startIndex = url.indexOf("id=") + "id=".length();
|
||||
// String id = url.substring(startIndex);
|
||||
// Sys_file sysFile = dao.fetch(Sys_file.class, id);
|
||||
// byte[] bytes = SysFileMinIoUtil.getFileBytes(sysFile.getBucket(), sysFile.getStoragePath());
|
||||
log.info("[Office图片读取] 创建图片渲染数据,referenceLength={}, byteCount={}, width={}, height={}", StrUtil.nullToEmpty(url).length(), bytes == null ? null : bytes.length, width, height);
|
||||
ByteArrayPictureRenderData pictureRenderData = new ByteArrayPictureRenderData(bytes, PictureType.PNG);
|
||||
PictureStyle pictureStyle = new PictureStyle();
|
||||
pictureStyle.setWidth(width);
|
||||
@@ -91,7 +175,7 @@ public class SysOfficeTemplateUtil {
|
||||
pictureRenderData.setPictureStyle(pictureStyle);
|
||||
return pictureRenderData;
|
||||
} catch (Exception e) {
|
||||
log.error("文件转换PictureRenderData错误,文件路径:{},{}", url, e.getMessage());
|
||||
log.error("[Office图片读取] 创建图片渲染数据失败,referenceLength={}", StrUtil.nullToEmpty(url).length(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -140,13 +224,20 @@ public class SysOfficeTemplateUtil {
|
||||
public byte[] getFileBytesByUrl(String url) {
|
||||
try {
|
||||
if (StrUtil.isBlank(url)) {
|
||||
log.warn("[Office图片读取] 图片引用为空");
|
||||
return null;
|
||||
}
|
||||
int startIndex = url.indexOf("id=") + "id=".length();
|
||||
String id = url.substring(startIndex);
|
||||
String logFileId = url.contains("id=") ? id : "未识别id参数";
|
||||
log.info("[Office图片读取] 解析文件引用,fileId={}, hasIdParameter={}", logFileId, url.contains("id="));
|
||||
Sys_file sysFile = dao.fetch(Sys_file.class, id);
|
||||
return SysFileMinIoUtil.getFileBytes(sysFile.getBucket(), sysFile.getStoragePath());
|
||||
log.info("[Office图片读取] 查询文件记录,fileId={}, found={}, bucket={}, storagePathPresent={}", logFileId, sysFile != null, sysFile == null ? null : sysFile.getBucket(), sysFile != null && StrUtil.isNotBlank(sysFile.getStoragePath()));
|
||||
byte[] bytes = SysFileMinIoUtil.getFileBytes(sysFile.getBucket(), sysFile.getStoragePath());
|
||||
log.info("[Office图片读取] 读取存储文件完成,fileId={}, byteCount={}", logFileId, bytes == null ? null : bytes.length);
|
||||
return bytes;
|
||||
} catch (Exception e) {
|
||||
log.error("[Office图片读取] 读取图片失败,referenceLength={}", StrUtil.nullToEmpty(url).length(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.budwk.app.flow.handler;
|
||||
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 为流程任务分配拥有校工会财务角色的用户。
|
||||
*/
|
||||
public class FlowSchoolUnionFinanceHandler implements AssignmentHandler {
|
||||
|
||||
/**
|
||||
* 按校工会财务角色查询参与者,并去除重复的用户 ID。
|
||||
*
|
||||
* @param model 当前流程任务模型,无需额外传入人员参数
|
||||
* @param execution 当前流程执行上下文,无需额外传入业务参数
|
||||
* @return 用户 ID 列表;未配置角色或角色用户时返回空列表
|
||||
*/
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
userRole.userId
|
||||
FROM
|
||||
`sys_user_role` userRole
|
||||
LEFT JOIN sys_role role ON role.id = userRole.roleId
|
||||
WHERE
|
||||
role.`code` = @roleCode
|
||||
GROUP BY
|
||||
userRole.userId
|
||||
""").setParam("roleCode", RoleConstant.SCHOOL_UNION_FINANCE.name());
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(sql);
|
||||
return sql.getList(String.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回流程设计器中展示的参与者处理类名称。
|
||||
*
|
||||
* @return 流程设计器下拉选项名称
|
||||
*/
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "获取校工会财务";
|
||||
}
|
||||
}
|
||||
+7
-3
@@ -229,14 +229,18 @@ public class ProposalMineController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除当前用户可删除的提案。
|
||||
*
|
||||
* @param id 提案 ID;仅允许删除本人未发起流程或退回发起节点的提案
|
||||
* @return Result,成功时返回成功结果,不满足删除条件时返回原因
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("proposal.mine")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "提案管理系统-我的提案", msg = "删除提案")
|
||||
public Result delete(@Valid String id) {
|
||||
dao.delete(ProposalInfo.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
return proposalCommonService.deleteMine(id, SecurityUtil.getUserId());
|
||||
}
|
||||
|
||||
@At
|
||||
|
||||
+10
@@ -3,6 +3,7 @@ package com.budwk.app.zhgh.democratic.proposal.service.common;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.param.ExportTableColumns;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
|
||||
@@ -19,6 +20,15 @@ import java.util.Set;
|
||||
|
||||
public interface ProposalCommonService extends BaseService<ProposalInfo> {
|
||||
|
||||
/**
|
||||
* 删除当前用户尚未发起流程或已退回发起节点的提案。
|
||||
*
|
||||
* @param id 待删除的提案 ID
|
||||
* @param userId 当前登录用户 ID,用于核对提案创建人
|
||||
* @return Result,删除成功返回 success;提案不存在、非本人或流程不允许删除时返回错误信息
|
||||
*/
|
||||
Result deleteMine(String id, String userId);
|
||||
|
||||
/**
|
||||
* 按页面允许的字段白名单添加排序条件,避免前端字段直接进入SQL。
|
||||
*
|
||||
|
||||
+42
@@ -17,6 +17,7 @@ import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.base.param.ExportTableColumns;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
@@ -52,6 +53,7 @@ import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.FieldFilter;
|
||||
@@ -62,6 +64,7 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
@@ -184,6 +187,45 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
|
||||
super(dao);
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅允许创建人删除草稿或退回发起节点的提案,并清理其 WF 流程。
|
||||
*
|
||||
* @param id 待删除的提案 ID
|
||||
* @param userId 当前登录用户 ID,用于核对提案创建人
|
||||
* @return Result,删除成功返回 success;提案不存在、非本人或流程不允许删除时返回错误信息
|
||||
*/
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result deleteMine(String id, String userId) {
|
||||
if (StrUtil.isBlank(id) || StrUtil.isBlank(userId)) {
|
||||
return Result.error("提案不存在或无权删除");
|
||||
}
|
||||
ProposalInfo proposal = dao().fetch(ProposalInfo.class, id);
|
||||
if (proposal == null || !Objects.equals(proposal.getCreatedBy(), userId)) {
|
||||
return Result.error("提案不存在或无权删除");
|
||||
}
|
||||
|
||||
List<ProcessInstance> instances = dao().query(ProcessInstance.class,
|
||||
Cnd.where(ProcessInstance::getBusinessNo, "=", id));
|
||||
// 一个提案出现多个流程实例时无法安全判断当前节点,拒绝删除并保留数据。
|
||||
if (instances.size() > 1) {
|
||||
return Result.error("提案流程数据异常,无法删除");
|
||||
}
|
||||
if (!instances.isEmpty()) {
|
||||
ProcessInstance instance = instances.get(0);
|
||||
List<ProcessTask> tasks = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
// 存在并行任务时,只有所有活动任务均位于发起节点才允许删除。
|
||||
if (!Objects.equals(instance.getState(), ProcessInstanceStateEnum.DOING.getCode())
|
||||
|| tasks.isEmpty() || tasks.stream().anyMatch(task -> !Objects.equals(task.getTaskName(), "startTask"))) {
|
||||
return Result.error("仅未提交或退回发起节点的提案可以删除");
|
||||
}
|
||||
}
|
||||
|
||||
dao().delete(ProposalInfo.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询提案综合列表。
|
||||
* 普通查询不关联历史任务表;仅在 origins 包含 answer 且 commonKeyword 非空时,
|
||||
|
||||
+2
-2
@@ -101,7 +101,7 @@ public class TeacherCongressInstitutionUserServiceImpl extends BaseServiceImpl<T
|
||||
if (identity.equals("主任")) {
|
||||
sysRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_PREPARATION_LEADERSHIP_GROUP_DIRECTOR);
|
||||
|
||||
} else if (identity.equals("成员")) {
|
||||
} else if (identity.equals("委员")) {
|
||||
sysRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_PREPARATION_LEADERSHIP_GROUP_MEMBER);
|
||||
}
|
||||
if (sysRole == null) {
|
||||
@@ -148,7 +148,7 @@ public class TeacherCongressInstitutionUserServiceImpl extends BaseServiceImpl<T
|
||||
if (institutionUser.getIdentity().equals("主任")) {
|
||||
sysRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_PREPARATION_LEADERSHIP_GROUP_DIRECTOR);
|
||||
|
||||
} else if (institutionUser.getIdentity().equals("成员")) {
|
||||
} else if (institutionUser.getIdentity().equals("委员")) {
|
||||
sysRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_PREPARATION_LEADERSHIP_GROUP_MEMBER);
|
||||
}
|
||||
if (sysRole == null) {
|
||||
|
||||
+32
-26
@@ -28,10 +28,10 @@ import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -47,8 +47,6 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
@@ -59,6 +57,7 @@ import java.util.List;
|
||||
* @Version 1.0
|
||||
* @Description TODO
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@At("/platform/condolence/mine")
|
||||
@Api("职工慰问我的")
|
||||
@@ -157,6 +156,7 @@ public class CondolenceMineController {
|
||||
@ApiOperation("导出职工慰问申请表")
|
||||
@SaCheckPermission("condolence.mine")
|
||||
public void doExportApply(String id, HttpServletResponse response, Boolean print) throws Exception {
|
||||
log.info("[职工慰问导出] 开始,applyId={}, userId={}, format={}", id, SecurityUtil.getUserId(), Boolean.TRUE.equals(print) ? "PDF" : "Word");
|
||||
Condolence condolence = condolenceService.fetch(id);
|
||||
if (condolence == null) throw new BaseException("该条记录不存在");
|
||||
if (!SecurityUtil.getUserId().equals(condolence.getCreatedBy())) {
|
||||
@@ -167,36 +167,32 @@ public class CondolenceMineController {
|
||||
if (instance == null || !ProcessInstanceStateEnum.FINISHED.getCode().equals(instance.getState())) {
|
||||
throw new BaseException("只能导出已完成的申请");
|
||||
}
|
||||
log.info("[职工慰问导出] 流程已完成,applyId={}, instanceId={}, state={}, applicantSignPresent={}", id, instance.getId(), instance.getState(), StrUtil.isNotBlank(condolence.getSignature()));
|
||||
NutMap docData = Lang.obj2nutmap(condolence);
|
||||
docData.put("payUserName", StrUtil.nullToEmpty(condolence.getBankUserName()));
|
||||
CondolenceType type = condolenceService.dao().fetch(CondolenceType.class, condolence.getType());
|
||||
docData.put("typeName", type == null ? "" : type.getName());
|
||||
docData.put("signature", "");
|
||||
docData.put("signature", null);
|
||||
if (StrUtil.isNotBlank(condolence.getSignature())) {
|
||||
PictureRenderData signature = sysOfficeTemplateUtil.createPictureRenderData(90, 40, condolence.getSignature());
|
||||
if (signature == null) throw new BaseException("申请人签字图片读取失败");
|
||||
docData.put("signature", signature);
|
||||
}
|
||||
fillApplyApprovals(docData, instance);
|
||||
for (String field : List.of("signature", "firstApprovalSign", "secondApprovalSign", "thirdApprovalSign", "fourthApprovalSign")) {
|
||||
Object value = docData.get(field);
|
||||
log.info("[职工慰问导出] 渲染前图片字段,applyId={}, instanceId={}, field={}, valueType={}", id, instance.getId(), field, value == null ? "null" : value.getClass().getName());
|
||||
}
|
||||
String fileName = "重庆工贸职业技术学院职工慰问申请表_" + StrUtil.nullToEmpty(condolence.getHelpUserName());
|
||||
try (InputStream input = getClass().getResourceAsStream("/templates/condolence/重庆工贸职业技术学院职工慰问申请表.doc");
|
||||
ByteArrayOutputStream templateOutput = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream()) {
|
||||
try (InputStream input = getClass().getResourceAsStream("/templates/condolence/重庆工贸职业技术学院职工慰问申请表.doc")) {
|
||||
if (input == null) throw new BaseException("职工慰问申请表模板不存在");
|
||||
com.aspose.words.Document document = new com.aspose.words.Document(input);
|
||||
document.save(templateOutput, com.aspose.words.SaveFormat.DOCX);
|
||||
try (ByteArrayInputStream templateInput = new ByteArrayInputStream(templateOutput.toByteArray())) {
|
||||
XWPFTemplate.compile(templateInput).render(docData).writeAndClose(output);
|
||||
}
|
||||
if (Boolean.TRUE.equals(print)) {
|
||||
try (ByteArrayInputStream wordInput = new ByteArrayInputStream(output.toByteArray());
|
||||
ByteArrayOutputStream pdfOutput = new ByteArrayOutputStream()) {
|
||||
new com.aspose.words.Document(wordInput).save(pdfOutput, com.aspose.words.SaveFormat.PDF);
|
||||
CommonDownloadUtil.download(fileName + ".pdf", pdfOutput.toByteArray(), response);
|
||||
}
|
||||
} else {
|
||||
CommonDownloadUtil.download(fileName + ".docx", output.toByteArray(), response);
|
||||
}
|
||||
boolean pdf = Boolean.TRUE.equals(print);
|
||||
byte[] bytes = sysOfficeTemplateUtil.renderTemplate(input, docData, null, pdf, "condolence:" + id);
|
||||
log.info("[职工慰问导出] 渲染完成,applyId={}, format={}, outputBytes={}", id, pdf ? "PDF" : "Word", bytes.length);
|
||||
CommonDownloadUtil.download(fileName + (pdf ? ".pdf" : ".docx"), bytes, response);
|
||||
} catch (Exception e) {
|
||||
log.error("[职工慰问导出] 模板渲染或文件输出失败,applyId={}, instanceId={}, format={}", id, instance.getId(), Boolean.TRUE.equals(print) ? "PDF" : "Word", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,29 +202,39 @@ public class CondolenceMineController {
|
||||
String[] fields = {"firstApproval", "secondApproval", "thirdApproval", "fourthApproval"};
|
||||
List<String> suffixes = List.of("Opinion", "Sign", "Year", "Month", "Day");
|
||||
for (String field : fields) {
|
||||
for (String suffix : suffixes) docData.put(field + suffix, "");
|
||||
for (String suffix : suffixes) docData.put(field + suffix, "Sign".equals(suffix) ? null : "");
|
||||
}
|
||||
List<ProcessTask> tasks = condolenceService.dao().query(ProcessTask.class,
|
||||
Cnd.where("processInstanceId", "=", instance.getId()).asc("id"));
|
||||
log.info("[职工慰问导出] 查询审批记录,applyId={}, instanceId={}, taskCount={}, expectedTaskKeys={}", instance.getBusinessNo(), instance.getId(), tasks.size(), List.of(taskKeys));
|
||||
for (ProcessTask task : tasks) {
|
||||
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(task.getId());
|
||||
if ("startTask".equals(task.getTaskName()) || (taskVO.getExt() != null && Boolean.TRUE.equals(taskVO.getExt().getBool("isFirstTaskNode")))) {
|
||||
log.info("[职工慰问导出] 审批记录,instanceId={}, taskId={}, taskKey={}, displayName={}, state={}, finishTime={}, isFirstTaskNode={}, matchedApproval={}", instance.getId(), task.getId(), task.getTaskName(), task.getDisplayName(), task.getTaskState(), task.getFinishTime(), taskVO.getExt() == null ? null : taskVO.getExt().get("isFirstTaskNode"), List.of(taskKeys).contains(task.getTaskName()));
|
||||
if ("startTask".equals(task.getTaskName()) || (!List.of(taskKeys).contains(task.getTaskName())
|
||||
&& taskVO.getExt() != null && Boolean.TRUE.equals(taskVO.getExt().getBool("isFirstTaskNode")))) {
|
||||
log.info("[职工慰问导出] 申请节点重置本轮审批字段,instanceId={}, taskId={}, taskKey={}", instance.getId(), task.getId(), task.getTaskName());
|
||||
// 重新申请后,仅导出本轮审批记录。
|
||||
for (String field : fields) {
|
||||
for (String suffix : suffixes) docData.put(field + suffix, "");
|
||||
for (String suffix : suffixes) docData.put(field + suffix, "Sign".equals(suffix) ? null : "");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
for (int i = 0; i < taskKeys.length; i++) {
|
||||
if (!taskKeys[i].equals(task.getTaskName())) continue;
|
||||
for (String suffix : suffixes) docData.put(fields[i] + suffix, "");
|
||||
if (!ProcessTaskStateEnum.FINISHED.getCode().equals(task.getTaskState())) continue;
|
||||
for (String suffix : suffixes) docData.put(fields[i] + suffix, "Sign".equals(suffix) ? null : "");
|
||||
if (!ProcessTaskStateEnum.FINISHED.getCode().equals(task.getTaskState())) {
|
||||
log.info("[职工慰问导出] 跳过未完成审批,instanceId={}, taskId={}, field={}, state={}", instance.getId(), task.getId(), fields[i], task.getTaskState());
|
||||
continue;
|
||||
}
|
||||
Dict data = taskVO.getExt() == null ? Dict.create() : taskVO.getTaskFormData();
|
||||
log.info("[职工慰问导出] 读取审批表单,instanceId={}, taskId={}, field={}, formKeys={}, signPresent={}, signReferenceLength={}", instance.getId(), task.getId(), fields[i], data.keySet(), StrUtil.isNotBlank(data.getStr("sign")), StrUtil.nullToEmpty(data.getStr("sign")).length());
|
||||
if (StrUtil.isBlank(data.getStr("sign"))) log.warn("[职工慰问导出] 已完成审批缺少签名字段,instanceId={}, taskId={}, field={}", instance.getId(), task.getId(), fields[i]);
|
||||
docData.put(fields[i] + "Opinion", StrUtil.nullToEmpty(data.getStr("opinion")));
|
||||
if (StrUtil.isNotBlank(data.getStr("sign"))) {
|
||||
PictureRenderData signature = sysOfficeTemplateUtil.createPictureRenderData(90, 40, data.getStr("sign"));
|
||||
if (signature == null) throw new BaseException("审批签字图片读取失败");
|
||||
docData.put(fields[i] + "Sign", signature);
|
||||
log.info("[职工慰问导出] 审批签名填充完成,instanceId={}, taskId={}, field={}", instance.getId(), task.getId(), fields[i] + "Sign");
|
||||
}
|
||||
docData.put(fields[i] + "Year", task.getFinishTime() == null ? "" : DateUtil.format(task.getFinishTime(), "yyyy"));
|
||||
docData.put(fields[i] + "Month", task.getFinishTime() == null ? "" : DateUtil.format(task.getFinishTime(), "M"));
|
||||
|
||||
+16
-39
@@ -9,7 +9,6 @@ import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
@@ -18,7 +17,6 @@ import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.MoneyUtil;
|
||||
import com.budwk.app.base.utils.OfficePlusUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
@@ -39,7 +37,6 @@ import com.budwk.app.zhgh.staffbenefit.difficulthelp.service.DifficultHelpCommon
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.moneyImportVo;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
@@ -74,8 +71,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -319,9 +314,9 @@ public class DifficultHelpReadingController {
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
Configure config = Configure.builder().bind("familyList", policy).build();
|
||||
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("difficulty_apply"), config)
|
||||
.render(docData)
|
||||
.write(zipOutputStream);
|
||||
try (InputStream input = sysOfficeTemplateUtil.getTemplate("difficulty_apply")) {
|
||||
zipOutputStream.write(sysOfficeTemplateUtil.renderTemplate(input, docData, config, false, "difficulthelp:batch:" + record.getString("id")));
|
||||
}
|
||||
zipOutputStream.closeEntry();
|
||||
}
|
||||
zipOutputStream.flush();
|
||||
@@ -379,17 +374,18 @@ public class DifficultHelpReadingController {
|
||||
String[] taskKeys = {"36ebafda-44c2-4bd3-bd7f-10839a575a0d", "715ece82-4ae3-433c-ad18-ed875f45d1e3", "e405f96c-5fc0-4f63-b323-e69dfe853253"};
|
||||
String[] fields = {"firstApproval", "secondApproval", "thirdApproval"};
|
||||
for (String field : fields) {
|
||||
for (String suffix : List.of("", "Opinion", "User", "Date", "Year", "Month", "Day", "Sign")) docData.put(field + suffix, "");
|
||||
for (String suffix : List.of("", "Opinion", "User", "Date", "Year", "Month", "Day", "Sign")) docData.put(field + suffix, "Sign".equals(suffix) ? null : "");
|
||||
}
|
||||
ProcessInstance instance = dao.fetch(ProcessInstance.class, Cnd.where("businessNo", "=", businessId).desc("id"));
|
||||
if (instance == null) return;
|
||||
List<ProcessTask> tasks = dao.query(ProcessTask.class, Cnd.where("processInstanceId", "=", instance.getId()).asc("id"));
|
||||
for (ProcessTask task : tasks) {
|
||||
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(task.getId());
|
||||
if ("startTask".equals(task.getTaskName()) || (taskVO.getExt() != null && Boolean.TRUE.equals(taskVO.getExt().getBool("isFirstTaskNode")))) {
|
||||
if ("startTask".equals(task.getTaskName()) || (!List.of(taskKeys).contains(task.getTaskName())
|
||||
&& taskVO.getExt() != null && Boolean.TRUE.equals(taskVO.getExt().getBool("isFirstTaskNode")))) {
|
||||
// 重新申请后,仅导出本轮审批,避免混入上一次退回或撤销前的意见。
|
||||
for (String field : fields) {
|
||||
for (String suffix : List.of("", "Opinion", "User", "Date", "Year", "Month", "Day", "Sign")) docData.put(field + suffix, "");
|
||||
for (String suffix : List.of("", "Opinion", "User", "Date", "Year", "Month", "Day", "Sign")) docData.put(field + suffix, "Sign".equals(suffix) ? null : "");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -453,22 +449,9 @@ public class DifficultHelpReadingController {
|
||||
String fileName = FileUtil.mainName(sysOfficeTemplateUtil.getTemplateFileName(templateName)) + "_" + difficultHelp.getUserName() + "_" +
|
||||
DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + ".pdf";
|
||||
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
XWPFTemplate.compile(getApplyTemplate(templateName),config)
|
||||
.render(docData)
|
||||
.writeAndClose(byteArrayOutputStream);
|
||||
byte[] bytes = byteArrayOutputStream.toByteArray();
|
||||
File sourceFile = File.createTempFile("file_convert_origin", ".docx");
|
||||
Files.write(sourceFile.toPath(), bytes, StandardOpenOption.WRITE);
|
||||
|
||||
File pdfFile = File.createTempFile("file_convert", ".pdf");
|
||||
OfficePlusUtil.convert(sourceFile.getPath(), pdfFile.getPath());
|
||||
CommonDownloadUtil.download(fileName, IoUtil.readBytes(FileUtil.getInputStream(pdfFile)), response);
|
||||
// 删除临时文件
|
||||
FileUtil.del(sourceFile);
|
||||
FileUtil.del(pdfFile.toPath());
|
||||
} catch (IOException e) {
|
||||
log.error("困难慰问申请表导出PDF失败,id:{},错误信息:{}", difficultHelp.getId(), e.getMessage());
|
||||
try (InputStream input = getApplyTemplate(templateName)) {
|
||||
byte[] bytes = sysOfficeTemplateUtil.renderTemplate(input, docData, config, true, "difficulthelp:" + difficultHelp.getId());
|
||||
CommonDownloadUtil.download(fileName, bytes, response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,13 +461,9 @@ public class DifficultHelpReadingController {
|
||||
String fileName = FileUtil.mainName(sysOfficeTemplateUtil.getTemplateFileName(templateName)) + "_" + difficultHelp.getUserName() + "_" +
|
||||
DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + ".docx";
|
||||
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
XWPFTemplate.compile(getApplyTemplate(templateName),config)
|
||||
.render(docData)
|
||||
.writeAndClose(byteArrayOutputStream);
|
||||
CommonDownloadUtil.download(fileName, byteArrayOutputStream.toByteArray(), response);
|
||||
} catch (IOException e) {
|
||||
log.error("困难慰问申请表导出Word失败,id:{},错误信息:{}", difficultHelp.getId(), e.getMessage());
|
||||
try (InputStream input = getApplyTemplate(templateName)) {
|
||||
byte[] bytes = sysOfficeTemplateUtil.renderTemplate(input, docData, config, false, "difficulthelp:" + difficultHelp.getId());
|
||||
CommonDownloadUtil.download(fileName, bytes, response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -562,15 +541,13 @@ public class DifficultHelpReadingController {
|
||||
throw new RuntimeException("导出Excel汇总表失败:" + e.getMessage());
|
||||
}
|
||||
} else if ("docx".equals(flag)) {
|
||||
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
|
||||
try (InputStream input = sysOfficeTemplateUtil.getTemplate(resource)) {
|
||||
Configure config = Configure.builder()
|
||||
.bind("da", new LoopRowTableRenderPolicy())
|
||||
.build();
|
||||
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(resource), config)
|
||||
.render(result)
|
||||
.writeAndClose(out);
|
||||
CommonDownloadUtil.download(fileName + ".docx", out.toByteArray(), response);
|
||||
byte[] bytes = sysOfficeTemplateUtil.renderTemplate(input, result, config, false, "difficulthelp:summary:" + resource);
|
||||
CommonDownloadUtil.download(fileName + ".docx", bytes, response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ nutz:
|
||||
ignore: ^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4|ico|svg|vue)$
|
||||
exclusions: /favicon/*,/assets/*,/druid/*,/upload/*,/components/*
|
||||
server:
|
||||
port: 8081
|
||||
port: 80
|
||||
host: 0.0.0.0
|
||||
|
||||
jetty:
|
||||
@@ -21,7 +21,7 @@ jetty:
|
||||
#结合ftp使用,或用nginx代理ftp路径
|
||||
#staticPath: /Users/wizzer/temp/files
|
||||
#开发模式静态资源
|
||||
staticPathLocal: D:/myProject/zhgh_cqgmy/src/main/resources/static
|
||||
staticPathLocal: E:/projects/zhgh_cqgmy/src/main/resources/static
|
||||
|
||||
security:
|
||||
tokenName: saToken
|
||||
@@ -87,7 +87,7 @@ xsssql:
|
||||
beetl:
|
||||
RESOURCE:
|
||||
#本地路径,开发时设置本地路径,便于调试
|
||||
rootLocal: D:/myProject/zhgh_cqgmy/src/main/resources/views/
|
||||
rootLocal: E:/projects/zhgh_cqgmy/src/main/resources/views/
|
||||
root: views/
|
||||
DELIMITER_STATEMENT_START: "<!--#"
|
||||
DELIMITER_STATEMENT_END: "#-->"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:finished="tableFinished"
|
||||
finished-text="没有更多了"
|
||||
@load="onLoad">
|
||||
<div class="table-list-container">
|
||||
<div class="table-list-container" @click="showOverflowText">
|
||||
<div v-for="(row, index) in tableData" :key="index" class="table-list-item"
|
||||
:data-row-id="row && row.id ? row.id : ''">
|
||||
<slot name="header" :index="index" :row="row">
|
||||
@@ -36,6 +36,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-popover ref="overflowPopover" :value="overflowVisible" :style="overflowAnchorStyle"
|
||||
:placement="overflowPlacement" get-container="body" @input="onOverflowInput"
|
||||
@opened="positionOverflow">
|
||||
<div class="table-list-overflow-content">{{ overflowText }}</div>
|
||||
<template #reference><span></span></template>
|
||||
</van-popover>
|
||||
</van-pull-refresh>
|
||||
</template>
|
||||
<script>
|
||||
@@ -90,10 +96,138 @@ module.exports = {
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
tableRefreshing: false,
|
||||
localPageForm: {...this.page_form}
|
||||
localPageForm: {...this.page_form},
|
||||
overflowVisible: false,
|
||||
overflowText: "",
|
||||
overflowTarget: null,
|
||||
overflowPlacement: "top",
|
||||
overflowAnchorStyle: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 只响应真正被截断的纯文字,保留卡片内按钮和业务插槽原有的点击行为。
|
||||
showOverflowText(event) {
|
||||
const target = event.target
|
||||
if (!target || !target.closest) return
|
||||
const card = target.closest(".table-list-item")
|
||||
if (!card || target.closest(".item-actions, a, button, input, textarea, select, [role=button], [tabindex], [onclick]")) return
|
||||
if (target.children.length || !target.textContent.trim() || this.hasOverflowClickHandler(target, card)) return
|
||||
const style = window.getComputedStyle(target)
|
||||
if (style.textOverflow !== "ellipsis" || (target.scrollWidth <= target.clientWidth && target.scrollHeight <= target.clientHeight)) return
|
||||
|
||||
const rect = target.getBoundingClientRect()
|
||||
this.overflowTarget = target
|
||||
this.overflowText = target.textContent.trim()
|
||||
this.overflowPlacement = rect.top < 180 ? "bottom" : "top"
|
||||
this.overflowAnchorStyle = {
|
||||
position: "fixed",
|
||||
display: "block",
|
||||
pointerEvents: "none",
|
||||
left: rect.left + "px",
|
||||
top: rect.top + "px",
|
||||
width: rect.width + "px",
|
||||
height: rect.height + "px"
|
||||
}
|
||||
if (!this.overflowVisible) this.bindOverflowListeners()
|
||||
this.overflowVisible = true
|
||||
this.$nextTick(() => {
|
||||
const instance = this.$refs.overflowPopover
|
||||
if (instance) instance.updateLocation()
|
||||
setTimeout(() => this.positionOverflow(), 50)
|
||||
setTimeout(() => this.positionOverflow(), 350)
|
||||
})
|
||||
},
|
||||
|
||||
// 检查文字及其卡片内的祖先节点,避免干扰已有 Vue 点击事件。
|
||||
hasOverflowClickHandler(target, card) {
|
||||
const ancestors = []
|
||||
let element = target
|
||||
while (element && element !== card.parentElement) {
|
||||
ancestors.push(element)
|
||||
element = element.parentElement
|
||||
}
|
||||
const visit = (node) => {
|
||||
if (!node) return false
|
||||
const events = node.data ? [node.data.on, node.data.nativeOn] : []
|
||||
if (ancestors.includes(node.elm) && events.some((handlers) => handlers &&
|
||||
Object.keys(handlers).some((key) => /^[~!&]*(click|touchstart|pointerdown|mousedown)$/.test(key)))) return true
|
||||
if (node.componentInstance && visit(node.componentInstance._vnode)) return true
|
||||
return Array.isArray(node.children) && node.children.some((child) => visit(child))
|
||||
}
|
||||
return visit(this._vnode)
|
||||
},
|
||||
|
||||
// Vant 的弹层挂在 body;校正窗口边缘的位置,避免完整文字被屏幕裁掉。
|
||||
positionOverflow() {
|
||||
const instance = this.$refs.overflowPopover
|
||||
const popup = instance && instance.$refs.popover && instance.$refs.popover.$el
|
||||
if (!this.overflowVisible || !this.overflowTarget || !popup) return
|
||||
const rect = popup.getBoundingClientRect()
|
||||
const anchor = this.overflowTarget.getBoundingClientRect()
|
||||
if (!rect.width || !rect.height) return
|
||||
const margin = 8
|
||||
const left = Math.max(margin, Math.min(rect.left, window.innerWidth - rect.width - margin))
|
||||
let top = rect.top
|
||||
if (top < margin) top = anchor.bottom + 8
|
||||
if (top + rect.height > window.innerHeight - margin) top = anchor.top - rect.height - 8
|
||||
top = Math.max(margin, Math.min(top, window.innerHeight - rect.height - margin))
|
||||
popup.style.left = (parseFloat(popup.style.left) || 0) + left - rect.left + "px"
|
||||
popup.style.top = (parseFloat(popup.style.top) || 0) + top - rect.top + "px"
|
||||
const arrow = popup.querySelector(".van-popover__arrow")
|
||||
if (arrow) {
|
||||
arrow.style.left = Math.max(12, Math.min(anchor.left + anchor.width / 2 - left, rect.width - 12)) + "px"
|
||||
}
|
||||
},
|
||||
|
||||
onOverflowInput(visible) {
|
||||
this.overflowVisible = visible
|
||||
if (!visible) {
|
||||
this.overflowTarget = null
|
||||
this.unbindOverflowListeners()
|
||||
}
|
||||
},
|
||||
|
||||
// 监听只在气泡打开时存在,PJAX 替换页面前也会关闭气泡并注销。
|
||||
bindOverflowListeners() {
|
||||
document.addEventListener("click", this.closeOverflowOnClick)
|
||||
window.addEventListener("scroll", this.closeOverflowOnMove, true)
|
||||
window.addEventListener("resize", this.closeOverflowOnMove)
|
||||
window.addEventListener("transitionend", this.onOverflowAnimationEnd)
|
||||
window.addEventListener("animationend", this.onOverflowAnimationEnd)
|
||||
$(document).on("pjax:send", this.closeOverflowForNavigation)
|
||||
},
|
||||
|
||||
unbindOverflowListeners() {
|
||||
document.removeEventListener("click", this.closeOverflowOnClick)
|
||||
window.removeEventListener("scroll", this.closeOverflowOnMove, true)
|
||||
window.removeEventListener("resize", this.closeOverflowOnMove)
|
||||
window.removeEventListener("transitionend", this.onOverflowAnimationEnd)
|
||||
window.removeEventListener("animationend", this.onOverflowAnimationEnd)
|
||||
$(document).off("pjax:send", this.closeOverflowForNavigation)
|
||||
},
|
||||
|
||||
closeOverflowForNavigation() {
|
||||
this.onOverflowInput(false)
|
||||
},
|
||||
|
||||
// Vant 会在动画结束时重新计算定位,随后再次限制气泡的屏幕边界。
|
||||
onOverflowAnimationEnd() {
|
||||
if (this.overflowVisible) setTimeout(() => this.positionOverflow(), 0)
|
||||
},
|
||||
|
||||
// 滚动或改变屏幕尺寸时关闭气泡,避免气泡脱离原文字位置。
|
||||
closeOverflowOnMove(event) {
|
||||
if (event && event.target && event.target.closest && event.target.closest(".table-list-overflow-content")) return
|
||||
this.onOverflowInput(false)
|
||||
},
|
||||
|
||||
closeOverflowOnClick(event) {
|
||||
if (!this.overflowVisible) return
|
||||
if (this.overflowTarget && this.overflowTarget.contains(event.target)) return
|
||||
if (event.target.closest && event.target.closest(".table-list-overflow-content")) return
|
||||
this.onOverflowInput(false)
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取当前列表快照。
|
||||
* 返回值包含已加载记录、分页参数和加载完成状态,供业务页面在进入详情前暂存列表现场。
|
||||
@@ -186,10 +320,28 @@ module.exports = {
|
||||
},
|
||||
mounted() {
|
||||
this.$emit("ready")
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.unbindOverflowListeners()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* Vant 将气泡挂到 body,控制宽高并允许长文本在气泡内滚动。 */
|
||||
.table-list-overflow-content {
|
||||
max-width: min(240px, calc(100vw - 48px));
|
||||
max-height: 160px;
|
||||
padding: 10px 12px;
|
||||
overflow-y: auto;
|
||||
color: #253247;
|
||||
font-size: 13px;
|
||||
line-height: 1.55;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.table-list-container {
|
||||
padding: 0;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
progress
|
||||
:accept="accept"
|
||||
:max-count="upload_number"
|
||||
:upload-text="upload_text"
|
||||
title=""
|
||||
description=""
|
||||
tip=""
|
||||
@@ -50,6 +51,11 @@ module.exports = {
|
||||
default: 1,
|
||||
required: false
|
||||
},
|
||||
upload_text: {
|
||||
type: String,
|
||||
default: "",
|
||||
required: false
|
||||
},
|
||||
// 上传返回id或url
|
||||
upload_result_type: {
|
||||
type: String,
|
||||
@@ -101,6 +107,7 @@ module.exports = {
|
||||
this.fileList = val.map((v) => {
|
||||
return {
|
||||
...v,
|
||||
file: v.file || { name: v.name },
|
||||
status: null,
|
||||
isImage: ["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(v.name.split(".").pop().toLowerCase())
|
||||
}
|
||||
@@ -118,6 +125,7 @@ module.exports = {
|
||||
this.fileList = val.map((v) => {
|
||||
return {
|
||||
...v,
|
||||
file: v.file || { name: v.name },
|
||||
url: v.url ? v.url : v.response?.data,
|
||||
isImage: ["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(v.name.split(".").pop().toLowerCase()),
|
||||
status: null
|
||||
@@ -171,8 +179,8 @@ module.exports = {
|
||||
f.url = resp.data
|
||||
f.response = resp
|
||||
f.percentage = 100
|
||||
f.isImage = true
|
||||
delete f.file
|
||||
f.isImage = ["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(f.name.split(".").pop().toLowerCase())
|
||||
f.file = { name: f.name }
|
||||
delete f.content
|
||||
} else {
|
||||
f.status = "fail"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -706,7 +706,7 @@
|
||||
Vue.component("year-van-dropdown-item", httpVueLoader("/components/plugins/vantMore/yearVanDropDownItem.vue?v=" + h5ComponentVersion))
|
||||
Vue.component("van-text-dialog", httpVueLoader("/components/plugins/vantMore/vantTextDialog.vue?v=" + h5ComponentVersion))
|
||||
Vue.component("enum-tag", httpVueLoader("/components/plugins/sysEnum/EnumTag.vue?v=" + h5ComponentVersion))
|
||||
Vue.component("table-list", httpVueLoader("/components/plugins/h5/TableList.vue?v=" + h5ComponentVersion))
|
||||
Vue.component("table-list", httpVueLoader("/components/plugins/h5/TableList.vue?v=" + h5ComponentVersion + "_overflow1"))
|
||||
Vue.component("table-column", httpVueLoader("/components/plugins/h5/TableColumn.vue?v=" + h5ComponentVersion))
|
||||
Vue.component("file-preview", httpVueLoader("/components/plugins/sysFilePreview/H5Index.vue?v=" + h5ComponentVersion))
|
||||
</script>
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ layout("/layouts/platform.html"){
|
||||
size="mini" type="danger">删除
|
||||
</el-button>
|
||||
|
||||
<el-button @click="doExportDeclare(row)" size="mini" type="primary">申请表导出</el-button>
|
||||
<el-button v-if="row.instanceState === 20" @click="doExportDeclare(row)" size="mini" type="primary">申请表导出</el-button>
|
||||
<el-button v-if="row.instanceState === 20" @click="doExportReimbursement(row)" size="mini"
|
||||
type="primary">报销凭证导出
|
||||
</el-button>
|
||||
|
||||
@@ -21,14 +21,29 @@ const PROPOSAL_INFO = {
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="提案类别">
|
||||
{{viewData.typeName}}
|
||||
</el-descriptions-item><!--
|
||||
</el-descriptions-item>
|
||||
<!-- 提案方式和联系电话来自提案详情,未填写时显示占位符。 -->
|
||||
<el-descriptions-item label="提案方式">
|
||||
<dict-tag v-if="viewData.source" :options="dict.type.PROPOSAL_SOURCE"
|
||||
:value="viewData.source"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.mobile || '--' }}</el-descriptions-item><!--
|
||||
<el-descriptions-item label="建议承办单位">
|
||||
{{viewData.suggestUnits}}
|
||||
</el-descriptions-item>-->
|
||||
<el-descriptions-item label="立案结果" :span="2">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
<!-- 立案结果和类型尚未填写时仍显示字段,并以双横线表示空值。 -->
|
||||
<el-descriptions-item label="立案结果">
|
||||
<dict-tag v-if="viewData.caseFilingResult" :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="viewData.caseFilingResult"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="立案类型">
|
||||
<dict-tag v-if="viewData.caseFilingType" :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="viewData.caseFilingType"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<!--<el-descriptions-item label="调研情况" :span="3">
|
||||
<div class="text-left">{{viewData.researchFindings}}</div>
|
||||
</el-descriptions-item>-->
|
||||
@@ -82,18 +97,22 @@ const PROPOSAL_INFO = {
|
||||
{{row.commissionerName}}({{row.commissionerLoginName}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="立案结果" prop="caseFilingType">
|
||||
<!-- 委员意见分别展示立案结果和类型,未填写时显示双横线。 -->
|
||||
<el-table-column label="立案结果" prop="caseFilingResult">
|
||||
<template slot-scope="{row}">
|
||||
<div style="display: flex;justify-content: center">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
<dict-tag v-if="row.caseFilingResult" :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="row.caseFilingResult"></dict-tag>
|
||||
<!-- 普通提案/重点提案暂不展示,历史数据仍保留。 -->
|
||||
<template v-if="false">
|
||||
(
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="row.caseFilingType"></dict-tag>
|
||||
)
|
||||
</template>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="立案类型" prop="caseFilingType">
|
||||
<template slot-scope="{row}">
|
||||
<div style="display: flex;justify-content: center">
|
||||
<dict-tag v-if="row.caseFilingType" :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="row.caseFilingType"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -124,117 +143,125 @@ const PROPOSAL_INFO = {
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<!--同一提案可能存在多个承办单位答复任务,查看时合并为一个流程节点,节点内保留每条答复。-->
|
||||
<template v-if="task.replyTasks">
|
||||
<el-descriptions v-for="replyTask in task.replyTasks" border class="flow-task-form"
|
||||
:column="3" :key="replyTask.id">
|
||||
<el-descriptions-item label="承办单位" :span="3">
|
||||
{{replyTask.ext.underTakeName}}
|
||||
<!--同一提案可能存在多个承办单位答复任务,查看时合并为一个流程节点,节点内保留每条答复。-->
|
||||
<template v-if="task.replyTasks">
|
||||
<el-descriptions v-for="replyTask in task.replyTasks" border class="flow-task-form"
|
||||
:column="3" :key="replyTask.id">
|
||||
<el-descriptions-item label="承办单位" :span="3">
|
||||
{{replyTask.ext.underTakeName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理用户">
|
||||
{{replyTask.taskFormData.userName}}({{replyTask.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{replyTask.finishTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="replyTask.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="3">
|
||||
<div v-html="replyTask.taskFormData.tf_opinion"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-else-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理用户">
|
||||
{{replyTask.taskFormData.userName}}({{replyTask.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{replyTask.finishTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="replyTask.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="3">
|
||||
<div v-html="replyTask.taskFormData.tf_opinion"></div>
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-else-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!--邀请附议人-->
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-else-if="task.taskName === 'invite'">
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间" :span="2">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="附议人" :span="3" v-if="task.taskName === 'invite'">
|
||||
<el-table v-loading="tableLoading" :data="task?.taskFormData?.seconder">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="联系方式" prop="mobile"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!--提案委员会立案-->
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-else-if="task.taskName === 'committee'||task.taskName === 'committeeFilingUnit'">
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="立案结果">
|
||||
<div style="display: flex;justify-content: center">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="task.ext.tf_caseFilingResult"></dict-tag>
|
||||
|
||||
<!-- 普通提案/重点提案暂不展示,历史流程变量仍保留。 -->
|
||||
<template v-if="false">
|
||||
(
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="task.ext.tf_caseFilingType"></dict-tag>
|
||||
)
|
||||
</template>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<template v-if="['CONFIRM_FILING','SUGGESTION'].includes(task.ext.tf_caseFilingResult)">
|
||||
<el-descriptions-item v-if="task.ext.tf_caseFilingResult === 'SUGGESTION'" label="承办单位" :span="3">{{task?.ext?.tf_masterUnitNameStr || task?.ext?.tf_slaveUnitNameStr}}
|
||||
<!--邀请附议人-->
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-else-if="task.taskName === 'invite'">
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="主办单位" :span="3">{{task?.ext?.tf_masterUnitNameStr}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="协办单位" :span="3">{{task?.ext?.tf_slaveUnitNameStr}}
|
||||
<el-descriptions-item label="办理时间" :span="2">{{ task.finishTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附议人" :span="3" v-if="task.taskName === 'invite'">
|
||||
<el-table v-loading="tableLoading" :data="task?.taskFormData?.seconder">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="联系方式" prop="mobile"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<!--提案委员会立案-->
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-else-if="task.taskName === 'committee'||task.taskName === 'committeeFilingUnit'">
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<!-- 立案节点分别展示流程记录中的结果与类型,空值显示双横线。 -->
|
||||
<el-descriptions-item label="立案结果">
|
||||
<div style="display: flex;justify-content: center">
|
||||
<dict-tag v-if="task.ext.tf_caseFilingResult"
|
||||
:options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="task.ext.tf_caseFilingResult"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="立案类型">
|
||||
<div style="display: flex;justify-content: center">
|
||||
<dict-tag v-if="task.ext.tf_caseFilingType"
|
||||
:options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="task.ext.tf_caseFilingType"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<template v-if="['CONFIRM_FILING','SUGGESTION'].includes(task.ext.tf_caseFilingResult)">
|
||||
<el-descriptions-item v-if="task.ext.tf_caseFilingResult === 'SUGGESTION'"
|
||||
label="承办单位" :span="3">{{task?.ext?.tf_masterUnitNameStr ||
|
||||
task?.ext?.tf_slaveUnitNameStr}}
|
||||
</el-descriptions-item>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="主办单位" :span="3">{{task?.ext?.tf_masterUnitNameStr}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="协办单位" :span="3">{{task?.ext?.tf_slaveUnitNameStr}}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
<el-descriptions-item label="办理意见" :span="3">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions-item label="办理意见" :span="3">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="承办单位"
|
||||
v-if="['opinion_unit_reply','unit_reply','two_unit_reply','opinion_master_reply','master_reply','slave_reply'].includes(task.taskName)" :span="3">
|
||||
{{task.ext.underTakeName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="承办单位"
|
||||
v-if="['opinion_unit_reply','unit_reply','two_unit_reply','opinion_master_reply','master_reply','slave_reply'].includes(task.taskName)"
|
||||
:span="3">
|
||||
{{task.ext.underTakeName}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="办理评价" v-if="['feedback'].includes(task.taskName)" :span="3">
|
||||
<dict-tag :options="dict.type.PROPOSAL_FEEDBACK"
|
||||
:value="task.ext.tf_feedback"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果" v-else>
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions-item label="办理评价" v-if="['feedback'].includes(task.taskName)"
|
||||
:span="3">
|
||||
<dict-tag :options="dict.type.PROPOSAL_FEEDBACK"
|
||||
:value="task.ext.tf_feedback"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果" v-else>
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</template>
|
||||
@@ -243,7 +270,7 @@ const PROPOSAL_INFO = {
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE", "PROCESS_TASK_SUBMIT_TYPE", "PROPOSAL_FEEDBACK"],
|
||||
dicts: ["PROPOSAL_TYPE", "PROPOSAL_SOURCE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE", "PROCESS_TASK_SUBMIT_TYPE", "PROPOSAL_FEEDBACK"],
|
||||
props: {
|
||||
hide_slave: false
|
||||
},
|
||||
|
||||
@@ -60,7 +60,10 @@ const USER_COMPONENT = {
|
||||
},
|
||||
|
||||
filterUnit(query, item) {
|
||||
return item.username.indexOf(query) > -1
|
||||
// 按姓名或工号筛选人员,字段为空时按空字符串处理。
|
||||
const username = item.username || ""
|
||||
const loginname = item.loginname || ""
|
||||
return username.indexOf(query) > -1 || loginname.indexOf(query) > -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool :columns.sync="tableColumns">
|
||||
<el-button class="ml5" icon="el-icon-upload2" type="primary" size="small"
|
||||
<!-- <el-button class="ml5" icon="el-icon-upload2" type="primary" size="small"
|
||||
@click="openImport">导入提案
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</table-tool>
|
||||
<el-table v-loading="tableLoading" :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
|
||||
@@ -76,8 +76,7 @@ layout("/layouts/platform.html"){
|
||||
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="openRevoke(row)">
|
||||
撤回
|
||||
</el-button>
|
||||
<!-- v-if="row.taskKey === 'startTask' || !row.instanceId"-->
|
||||
<el-button size="mini" type="danger" @click="del(row.id)">
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" size="mini" type="danger" @click="del(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ layout("/layouts/platform.html"){
|
||||
<custom-card>
|
||||
<snaker-start slot="header" label="撰写提案" define_key="JDHTA_NC">
|
||||
<template slot="header-right-label">
|
||||
<el-link type="primary" @click="openImport" v-if="!formData.id" style="margin-right: 15px">导入提案</el-link>
|
||||
<!-- <el-link type="primary" @click="openImport" v-if="!formData.id" style="margin-right: 15px">导入提案</el-link>-->
|
||||
</template>
|
||||
</snaker-start>
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm">
|
||||
|
||||
@@ -55,7 +55,7 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>-->
|
||||
<el-descriptions-item label="证明人">
|
||||
<!-- <el-descriptions-item label="证明人">
|
||||
<el-form-item prop="certifierUserId" label="证明人">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
@@ -75,7 +75,7 @@ layout("/layouts/platform.html"){
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="慰问类型">
|
||||
<el-form-item prop="type" label="慰问类型">
|
||||
<el-select v-model="formData.type" @change="typeChange" style="width: 100%"
|
||||
@@ -112,14 +112,14 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="收款账户">
|
||||
<el-descriptions-item label="收款账户" v-if="!['A', 'D'].includes(formData.typeCode)">
|
||||
<el-form-item prop="bankCardNumber" label="收款账户">
|
||||
<el-input maxlength="20" v-model="formData.bankCardNumber" placeholder="请填写收款账户"
|
||||
<el-input maxlength="30" v-model="formData.bankCardNumber" placeholder="请填写银行卡号或对公账户号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="户名">
|
||||
<el-descriptions-item label="户名" v-if="!['A', 'D'].includes(formData.typeCode)">
|
||||
<el-form-item prop="bankUserName" label="户名">
|
||||
<el-input maxlength="20" v-model="formData.bankUserName"
|
||||
placeholder="请填写户名"
|
||||
@@ -127,7 +127,7 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="开户行" >
|
||||
<el-descriptions-item label="开户行" v-if="!['A', 'D'].includes(formData.typeCode)">
|
||||
<el-form-item prop="bankOfDeposit" label="开户行">
|
||||
<el-input maxlength="20" v-model="formData.bankOfDeposit"
|
||||
placeholder="请填写开户行"
|
||||
@@ -173,10 +173,12 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="申请事由" :span="3">
|
||||
<el-form-item prop="remark" label="申请事由">
|
||||
<el-input maxlength="500" v-model="formData.remark" placeholder="请填写申请事由"
|
||||
type="textarea" :autosize="{ minRows: 4, maxRows: 8}"></el-input>
|
||||
type="textarea" :rows="3" resize="none"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
@@ -238,7 +240,10 @@ layout("/layouts/platform.html"){
|
||||
payUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
type: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
way: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
money: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
money: [
|
||||
{ required: true, message: "请填写慰问金额", trigger: ["change", "blur"] },
|
||||
{ validator: (rule, value, callback) => callback(this.validateMoney(value) ? undefined : new Error("慰问金额须大于0且不超过10000元,最多两位小数")), trigger: ["change", "blur"] }
|
||||
],
|
||||
occurTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
child: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
hospital: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
@@ -247,14 +252,20 @@ layout("/layouts/platform.html"){
|
||||
hospitalBy: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
deadImmediateFamily: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
remark: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
files: [{ required: true, type: "array", min: 1, max: 5, message: "请上传1至5个附件", trigger: ["change", "blur"] }],
|
||||
signature: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
handlerUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
certifierUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
bankCardNumber: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
// certifierUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
bankCardNumber: [
|
||||
{ required: true, message: "请填写银行卡号或对公账户号", trigger: ["change", "blur"] },
|
||||
{ pattern: /^[0-9]{6,30}$/, message: "收款账户须为6至30位数字(银行卡号或对公账户号)", trigger: ["change", "blur"] }
|
||||
],
|
||||
bankUserName: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
bankOfDeposit: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
thisYearHospitalizationNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
thisYearHospitalizationNum: [
|
||||
{ required: true, message: "必填", trigger: ["change", "blur"] },
|
||||
{ type: "integer", min: 0, max: 10000, message: "住院次数须为0至10000的整数", trigger: ["change", "blur"] }
|
||||
],
|
||||
leaveHospitalTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
hospitalizationTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
},
|
||||
@@ -268,6 +279,9 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validateMoney(value) {
|
||||
return /^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$/.test(String(value)) && Number(value) > 0 && Number(value) <= 10000
|
||||
},
|
||||
createRemoteMethod(options) {
|
||||
return (keyword) => {
|
||||
this.selectQueryUser(keyword, options)
|
||||
|
||||
@@ -37,12 +37,12 @@ const basicForm = {
|
||||
<el-radio-button :label="false">不上传</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="是否上传附件" prop="isUploadFile">-->
|
||||
<!-- <el-radio-group v-model="formData.isUploadFile">-->
|
||||
<!-- <el-radio-button :label="true">是</el-radio-button>-->
|
||||
<!-- <el-radio-button :label="false">否</el-radio-button>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="是否上传附件" prop="isUploadFile">
|
||||
<el-radio-group v-model="formData.isUploadFile">
|
||||
<el-radio-button :label="true">是</el-radio-button>
|
||||
<el-radio-button :label="false">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传附件说明" prop="uploadFileDesc" v-if="formData.isUploadFile">
|
||||
<el-input v-model="formData.uploadFileDesc" maxlength="50" clearable placeholder="请填写上传附件说明"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
+64
-57
@@ -26,7 +26,7 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="受补助人">
|
||||
<el-form-item prop="userName">
|
||||
<el-form-item prop="userId">
|
||||
<template v-if="formData.mode == 2">
|
||||
<el-select :remote-method="queryRecipients"
|
||||
@change="userChange" clearable filterable
|
||||
@@ -51,7 +51,7 @@ layout("/layouts/platform.html"){
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号" :span="2">
|
||||
<el-form-item prop="idCard">
|
||||
<el-input maxlength="20" clearable placeholder="请填写身份证号"
|
||||
<el-input clearable placeholder="请填写身份证号"
|
||||
v-model="formData.idCard" maxlength="18"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
@@ -84,7 +84,7 @@ layout("/layouts/platform.html"){
|
||||
<el-descriptions-item label="手机号码">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input maxlength="11" clearable placeholder="请填写手机号码"
|
||||
v-model="formData.mobile" maxlength="11"></el-input>
|
||||
v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭年总收入(万元)">
|
||||
@@ -103,6 +103,7 @@ layout("/layouts/platform.html"){
|
||||
<el-input-number
|
||||
v-model="formData.homeNumber"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:step="1"
|
||||
style="width: 100%"
|
||||
placeholder="请填写家庭人数">
|
||||
@@ -113,7 +114,7 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item prop="homeAddress">
|
||||
<el-input clearable
|
||||
style="width: 100%"
|
||||
v-model="formData.homeAddress"
|
||||
v-model="formData.homeAddress" maxlength="200"
|
||||
placeholder="请填写家庭住址">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -132,7 +133,7 @@ layout("/layouts/platform.html"){
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="银行卡号" >
|
||||
<el-form-item prop="bankCardNum">
|
||||
<el-input maxlength="20" clearable placeholder="请填写银行卡号"
|
||||
<el-input maxlength="19" clearable placeholder="请填写银行卡号"
|
||||
v-model="formData.bankCardNum"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
@@ -152,7 +153,7 @@ layout("/layouts/platform.html"){
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申请金额(元)">
|
||||
<el-form-item prop="applyMoney" :rules="[{required:true,type:'number',min:0.01,message:'请填写大于零的申请金额',trigger:['change','blur']}]">
|
||||
<el-form-item prop="applyMoney">
|
||||
<el-input-number v-model="formData.applyMoney" :precision="2" :min="0.01" placeholder="请输入申请金额"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
@@ -198,8 +199,8 @@ layout("/layouts/platform.html"){
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.relation'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.relation" placeholder="请填写与本人关系" clearable></el-input>
|
||||
:rules="textRules('与本人关系', 50)">
|
||||
<el-input v-model="row.relation" maxlength="50" placeholder="请填写与本人关系" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -207,8 +208,8 @@ layout("/layouts/platform.html"){
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.name'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.name" placeholder="请填写姓名" clearable></el-input>
|
||||
:rules="textRules('姓名', 100)">
|
||||
<el-input v-model="row.name" maxlength="100" placeholder="请填写姓名" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -216,9 +217,9 @@ layout("/layouts/platform.html"){
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.age'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
:rules="[{required:true,type:'integer',min:1,max:100,message:'年龄须为1至100的整数',trigger:['change','blur']}]">
|
||||
<el-input-number v-model="row.age" placeholder="年龄" :min="1"
|
||||
:max="100" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
:max="100" :precision="0" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -226,8 +227,8 @@ layout("/layouts/platform.html"){
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.homeUnit'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.homeUnit" placeholder="请填写工作单位" clearable></el-input>
|
||||
:rules="textRules('工作单位', 200)">
|
||||
<el-input v-model="row.homeUnit" maxlength="200" placeholder="请填写工作单位" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -235,9 +236,9 @@ layout("/layouts/platform.html"){
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.yearIncome'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
:rules="[{validator:validateIncome,required:true,trigger:['change','blur']}]">
|
||||
<el-input-number v-model="row.yearIncome" placeholder="年收入"
|
||||
:min="0" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
:min="0" :precision="2" :step="1" style="width: 100%" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -245,8 +246,8 @@ layout("/layouts/platform.html"){
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-form-item label-width="0"
|
||||
:prop="'familyList.'+$index+'.remarks'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input v-model="row.remarks" placeholder="请填写备注" clearable></el-input>
|
||||
:rules="textRules('备注', 500)">
|
||||
<el-input v-model="row.remarks" maxlength="500" placeholder="请填写备注" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -326,22 +327,37 @@ layout("/layouts/platform.html"){
|
||||
applyCount: '1',
|
||||
},
|
||||
formRules: {
|
||||
proxyUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
proxyLoginName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sex: [{required: true, message: '请填写性别', trigger: ['blur', 'change']}],
|
||||
userName: [{required: true, message: '请填写受补助人', trigger: ['blur', 'change']}],
|
||||
unitName: [{required: true, message: '请填写所属单位', trigger: ['blur', 'change']}],
|
||||
proxyUserName: this.textRules('填写人姓名', 100),
|
||||
proxyLoginName: this.textRules('填写人工号', 100),
|
||||
mode: [{required: true, type: 'enum', enum: ['1', '2'], message: '请选择申请模式', trigger: ['blur', 'change']}],
|
||||
sex: [{required: true, type: 'enum', enum: ['男', '女'], message: '请选择性别', trigger: ['blur', 'change']}],
|
||||
userId: [{required: true, message: '请选择受补助人', trigger: ['blur', 'change']}],
|
||||
unitName: this.textRules('所属单位', 500),
|
||||
unionName: [{required: true, message: '请填写所属工会', trigger: ['blur', 'change']}],
|
||||
homeAddress: [{required: true, message: '请填写家庭住址', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '请填写手机号码', trigger: ['blur', 'change']}],
|
||||
idCard: [{required: true, message: '请填写身份证号', trigger: ['blur', 'change']}],
|
||||
bankCardNum: [{required: true, message: '请填写收款账户卡号', trigger: ['blur', 'change']}],
|
||||
homeAddress: this.textRules('家庭住址', 200),
|
||||
mobile: [
|
||||
{required: true, message: '请填写手机号码', trigger: ['blur', 'change']},
|
||||
{pattern: /^1[3-9]\d{9}$/, message: '请输入正确的11位手机号码', trigger: ['blur', 'change']}
|
||||
],
|
||||
idCard: [{validator: (rule, value, callback) => {
|
||||
const result = this.isValidIdCard(value || '')
|
||||
callback(result.status === 0 ? new Error(result.msg) : undefined)
|
||||
}, required: true, trigger: ['blur', 'change']}],
|
||||
bankCardNum: [{validator: (rule, value, callback) => {
|
||||
const result = this.validateCard(value || '')
|
||||
callback(result.status === 0 ? new Error(result.msg) : undefined)
|
||||
}, required: true, trigger: ['blur', 'change']}],
|
||||
bankUserName: [{required: true, message: '请填写户名', trigger: ['blur', 'change']}],
|
||||
bankOfDeposit: [{required: true, message: '请填写开户行', trigger: ['blur', 'change']}],
|
||||
position: [{required: true, message: '请填写职务', trigger: ['blur', 'change']}],
|
||||
officialCapacity: [{required: true, message: '请填写职称', trigger: ['blur', 'change']}],
|
||||
subsidyStandards: [{required: true, message: '请选择困难类型', trigger: ['blur', 'change']}],
|
||||
reason: [{required: true, message: '请填写申请原因', trigger: ['blur', 'change']}],
|
||||
bankOfDeposit: this.textRules('开户行', 30),
|
||||
position: this.textRules('职务', 20),
|
||||
officialCapacity: this.textRules('职称', 20),
|
||||
homeIncome: [{validator: this.validateIncome, required: true, trigger: ['blur', 'change']}],
|
||||
homeNumber: [{required: true, type: 'integer', min: 1, message: '家庭人数须为大于零的整数', trigger: ['blur', 'change']}],
|
||||
subsidy: this.textRules('补助类型', 500),
|
||||
subsidyStandards: this.textRules('困难类型', 500),
|
||||
applyMoney: [{validator: this.validateMoney, required: true, trigger: ['blur', 'change']}],
|
||||
reason: this.textRules('生活致困原因', 500),
|
||||
sign: [{required: true, whitespace: true, message: '请完成签字', trigger: ['blur', 'change']}],
|
||||
},
|
||||
|
||||
// 替他人申请相关
|
||||
@@ -349,8 +365,21 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
textRules(label, max) {
|
||||
return [{required: true, whitespace: true, max, message: '请填写' + label + ',且不超过' + max + '个字符', trigger: ['blur', 'change']}]
|
||||
},
|
||||
validateIncome(rule, value, callback) {
|
||||
const valid = typeof value === 'number' && Number.isFinite(value) && value >= 0 && /^\d+(\.\d{1,2})?$/.test(String(value))
|
||||
callback(valid ? undefined : new Error('收入须为不小于零的数字,最多保留两位小数'))
|
||||
},
|
||||
validateMoney(rule, value, callback) {
|
||||
const valid = typeof value === 'number' && Number.isFinite(value) && value > 0 && /^\d+(\.\d{1,2})?$/.test(String(value))
|
||||
callback(valid ? undefined : new Error('申请金额须大于零,最多保留两位小数'))
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
async onSave() {
|
||||
const valid = await this.$refs.formRef.validate().catch(() => false)
|
||||
if (!valid) return
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
@@ -367,24 +396,13 @@ layout("/layouts/platform.html"){
|
||||
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
this.$refs.formRef.validate().then((valid) => {
|
||||
this.$refs.formRef.validate().catch(() => false).then((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const result = this.isValidIdCard(this.formData.idCard)
|
||||
if (result.status === 0) {
|
||||
this.$message.warning(result.msg)
|
||||
return
|
||||
}
|
||||
const bankRes = this.validateCard(this.formData.bankCardNum)
|
||||
if (bankRes.status === 0) {
|
||||
this.$message.warning(bankRes.msg)
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/difficultHelp/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
@@ -399,7 +417,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
async onFinishTask() {
|
||||
this.$refs.formRef.validate().then((valid) => {
|
||||
this.$refs.formRef.validate().catch(() => false).then((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
@@ -407,17 +425,6 @@ layout("/layouts/platform.html"){
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
|
||||
const result = this.isValidIdCard(this.formData.idCard)
|
||||
if (result.status === 0) {
|
||||
this.$message.warning(result.msg)
|
||||
return
|
||||
}
|
||||
const bankRes = this.validateCard(this.formData.bankCardNum)
|
||||
if (bankRes.status === 0) {
|
||||
this.$message.warning(bankRes.msg)
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/difficultHelp/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
|
||||
@@ -9,26 +9,30 @@ const PROPOSAL_INFO = {
|
||||
<van-cell-group :border="false">
|
||||
<van-cell title="提案编号">{{ viewData.code || '--' }}</van-cell>
|
||||
<van-cell title="提案名称">{{ viewData.name || '--' }}</van-cell>
|
||||
<van-cell title="立案结果" v-if="viewData.caseFilingResult">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="viewData.caseFilingResult"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="立案类型" v-if="viewData.caseFilingType">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="viewData.caseFilingType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="提案类型">{{ viewData.typeName || '--' }}</van-cell>
|
||||
|
||||
<van-cell title="提案类别">{{ viewData.typeName || '--' }}</van-cell>
|
||||
<van-cell title="提案方式">{{ getDictText(dict.type.PROPOSAL_SOURCE, viewData.source) }}
|
||||
</van-cell>
|
||||
<van-cell title="代表姓名">{{ viewData.createUserName || '--' }}</van-cell>
|
||||
<van-cell title="所属教代会">{{ viewData.sessionName || viewData.fullName || '--' }}</van-cell>
|
||||
<van-cell :title="viewData.committeeName ? '所属委员会' : '所属代表团'">
|
||||
<van-cell title="提案人">{{ viewData.createUserName || '--' }}</van-cell>
|
||||
<van-cell title="教代会届次">{{ viewData.sessionName || viewData.fullName || '--' }}</van-cell>
|
||||
<van-cell :title="viewData.committeeName ? '委员会名称' : '代表团名称'">
|
||||
{{ viewData.committeeName || viewData.delegationName || '--' }}
|
||||
</van-cell>
|
||||
<van-cell title="单位">{{ viewData.unitName || '--' }}</van-cell>
|
||||
<van-cell title="提案人单位">{{ viewData.unitName || '--' }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.mobile || '--' }}</van-cell>
|
||||
<van-cell title="提案时间">{{ viewData.createTime || '--' }}</van-cell>
|
||||
<van-cell title="案由" class="proposal-view-long-cell">
|
||||
<!-- 立案结果和类型尚未填写时仍显示字段,并以双横线表示空值。 -->
|
||||
<van-cell title="立案结果">
|
||||
<dict-tag v-if="viewData.caseFilingResult" :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="viewData.caseFilingResult"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</van-cell>
|
||||
<van-cell title="立案类型">
|
||||
<dict-tag v-if="viewData.caseFilingType" :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="viewData.caseFilingType"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</van-cell>
|
||||
<van-cell title="提案案由" class="proposal-view-long-cell">
|
||||
<div class="proposal-view-rich-value" v-html="viewData.brief || '--'"></div>
|
||||
</van-cell>
|
||||
<van-cell title="建议措施" class="proposal-view-long-cell">
|
||||
@@ -48,7 +52,7 @@ const PROPOSAL_INFO = {
|
||||
:key="merge.id"
|
||||
class="proposal-view-merge-cell"
|
||||
:title="(index + 1) + '. ' + merge.name"
|
||||
:label="'提案编号:' + merge.code + '|提案人:' + merge.createUserName + '|类别:' + merge.typeName + '|代表团:' + merge.delegationName"
|
||||
:label="'提案编号:' + merge.code + '|提案人:' + merge.createUserName + '|提案类别:' + merge.typeName + '|代表团:' + merge.delegationName"
|
||||
is-link
|
||||
@click="openView(merge)">
|
||||
</van-cell>
|
||||
@@ -66,13 +70,16 @@ const PROPOSAL_INFO = {
|
||||
<template v-if="opinion.commissionerLoginName">({{ opinion.commissionerLoginName }})
|
||||
</template>
|
||||
</van-cell>
|
||||
<!-- 委员意见分别展示立案结果和类型,未填写时显示双横线。 -->
|
||||
<van-cell title="立案结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
<dict-tag v-if="opinion.caseFilingResult" :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="opinion.caseFilingResult"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</van-cell>
|
||||
<van-cell title="立案类型" v-if="opinion.caseFilingType">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
<van-cell title="立案类型">
|
||||
<dict-tag v-if="opinion.caseFilingType" :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="opinion.caseFilingType"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</van-cell>
|
||||
<van-cell title="意见" v-if="opinion.opinionText" class="proposal-view-long-cell">
|
||||
<div class="proposal-view-rich-value">{{ opinion.opinionText }}</div>
|
||||
@@ -158,13 +165,18 @@ const PROPOSAL_INFO = {
|
||||
|| '--' }})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ selectedTask.finishTime || '--' }}</van-cell>
|
||||
<!-- 立案节点分别展示流程记录中的结果与类型,空值显示双横线。 -->
|
||||
<van-cell title="立案结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
<dict-tag v-if="selectedTask.ext.tf_caseFilingResult"
|
||||
:options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="selectedTask.ext.tf_caseFilingResult"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</van-cell>
|
||||
<van-cell title="立案类型" v-if="selectedTask.ext.tf_caseFilingType">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
<van-cell title="立案类型">
|
||||
<dict-tag v-if="selectedTask.ext.tf_caseFilingType"
|
||||
:options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="selectedTask.ext.tf_caseFilingType"></dict-tag>
|
||||
<span v-else>--</span>
|
||||
</van-cell>
|
||||
<template
|
||||
v-if="['CONFIRM_FILING', 'SUGGESTION'].includes(selectedTask.ext.tf_caseFilingResult)">
|
||||
@@ -187,7 +199,7 @@ const PROPOSAL_INFO = {
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<van-cell title="办理单位"
|
||||
<van-cell title="承办单位"
|
||||
v-if="['opinion_unit_reply', 'unit_reply', 'two_unit_reply', 'opinion_master_reply', 'master_reply', 'slave_reply'].includes(selectedTask.taskName)">
|
||||
{{ selectedTask.ext.underTakeName || '--' }}
|
||||
</van-cell>
|
||||
|
||||
@@ -255,7 +255,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-empty description="暂无数据" v-else></van-empty>
|
||||
</van-action-sheet>-->
|
||||
|
||||
<van-field
|
||||
<!-- <van-field
|
||||
v-model="formData.certifierUserName"
|
||||
name="certifierUserName"
|
||||
label="证明人"
|
||||
@@ -288,7 +288,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</template>
|
||||
</div>
|
||||
<van-empty description="暂无数据" v-else></van-empty>
|
||||
</van-action-sheet>
|
||||
</van-action-sheet> -->
|
||||
|
||||
<van-field
|
||||
v-model="formData.typeName"
|
||||
@@ -322,7 +322,7 @@ layout("/layouts/platform_h5.html"){
|
||||
name="money"
|
||||
label="慰问金额"
|
||||
required
|
||||
:rules="[{ required: true }]"
|
||||
:rules="[{ required: true, message: '请填写慰问金额' }, { validator: validateMoney, message: '慰问金额须大于0且不超过10000元,最多两位小数' }]"
|
||||
placeholder="选择慰问类型自动匹配金额"
|
||||
clickable
|
||||
type="number"
|
||||
@@ -353,17 +353,19 @@ layout("/layouts/platform_h5.html"){
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-if="!['A', 'D'].includes(formData.typeCode)"
|
||||
v-model="formData.bankCardNumber"
|
||||
label="收款账户"
|
||||
maxlength="20"
|
||||
maxlength="30"
|
||||
clearable
|
||||
name="bankCardNumber"
|
||||
placeholder="请填写收款账户"
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请填写银行卡号或对公账户号"
|
||||
:rules="[{ required: true, message: '请填写银行卡号或对公账户号' }, { pattern: /^[0-9]{6,30}$/, message: '收款账户须为6至30位数字(银行卡号或对公账户号)' }]"
|
||||
required
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-if="!['A', 'D'].includes(formData.typeCode)"
|
||||
v-model="formData.bankUserName"
|
||||
label="户名"
|
||||
placeholder="请填写户名"
|
||||
@@ -373,9 +375,10 @@ layout("/layouts/platform_h5.html"){
|
||||
name="bankUserName"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-if="!['A', 'D'].includes(formData.typeCode)"
|
||||
v-model="formData.bankOfDeposit"
|
||||
label="开户行"
|
||||
maxlength="30"
|
||||
maxlength="20"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
@@ -433,8 +436,8 @@ layout("/layouts/platform_h5.html"){
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field type="digit" label="当年第几次住院"
|
||||
:rules="[{ required: true }]"
|
||||
<van-field type="digit" label="当年第几次住院" name="thisYearHospitalizationNum"
|
||||
:rules="[{ required: true }, { validator: value => /^[0-9]+$/.test(String(value)) && Number(value) <= 10000, message: '住院次数须为0至10000的整数' }]"
|
||||
required
|
||||
placeholder="请输入当年第几次住院"
|
||||
v-model="formData.thisYearHospitalizationNum"></van-field>
|
||||
@@ -443,6 +446,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-field
|
||||
v-model="formData.remark"
|
||||
name="remark"
|
||||
maxlength="500"
|
||||
label="申请事由"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
@@ -460,15 +464,18 @@ layout("/layouts/platform_h5.html"){
|
||||
{{ '附件说明:' + chooseType.uploadFileDesc }}
|
||||
</div>
|
||||
<van-cell-group :border="false">
|
||||
<van-field class="direction-column-field" name="avatar" label="">
|
||||
<van-field class="direction-column-field" name="files" label="附件" required
|
||||
:rules="[{ validator: () => Array.isArray(formData.files) && formData.files.length > 0 && formData.files.length <= 5, message: '请上传1至5个附件' }]">
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_text="上传附件"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
<div class="condolence-card__desc">最多上传 5 个文件</div>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
@@ -477,7 +484,8 @@ layout("/layouts/platform_h5.html"){
|
||||
<section class="form-section">
|
||||
<h2 class="condolence-card__title">签字确认</h2>
|
||||
<van-cell-group :border="false">
|
||||
<van-field class="direction-column-field" name="signature" label="">
|
||||
<van-field class="direction-column-field" name="signature" label="" :value="formData.signature"
|
||||
:rules="[{ required: true, message: '请填写签字' }]">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.signature" slot="input"></h5-signature>
|
||||
</template>
|
||||
@@ -532,6 +540,9 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validateMoney(value) {
|
||||
return /^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$/.test(String(value)) && Number(value) > 0 && Number(value) <= 10000
|
||||
},
|
||||
// 选择出院时间
|
||||
showLeaveHospitalTimePickerClick() {
|
||||
if (this.formData.leaveHospitalTime) {
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<h2 class="condolence-info-card__title">
|
||||
审批签字<span class="condolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
|
||||
@@ -158,19 +158,44 @@
|
||||
}
|
||||
|
||||
.condolence-info-long-cell {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.condolence-info-card .condolence-attachments .empty-container {
|
||||
height: auto;
|
||||
justify-content: flex-start;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.condolence-info-card .condolence-attachments .empty-text {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.condolence-info-opinion > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.condolence-info-opinion > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.condolence-signature-image,
|
||||
.condolence-approval-signature-image {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.condolence-info-long-cell .van-cell__title {
|
||||
width: auto;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.condolence-info-long-cell .van-cell__value {
|
||||
margin-top: 7px;
|
||||
.condolence-signature-image .van-image__img,
|
||||
.condolence-approval-signature-image {
|
||||
object-fit: contain;
|
||||
object-position: left center;
|
||||
}
|
||||
|
||||
.condolence-signature-image {
|
||||
display: block;
|
||||
.condolence-info-opinion img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@@ -25,13 +25,13 @@ const condolenceInfo = {
|
||||
<van-cell title="申请人单位">{{ viewData.applyUnitName || '--' }}</van-cell>
|
||||
<van-cell title="申请人工会">{{ viewData.applyUnionName || '--' }}</van-cell>
|
||||
<van-cell title="慰问对象">{{ viewData.helpUserName || '--' }}</van-cell>
|
||||
<van-cell title="证明人">{{ viewData.certifierUserName || '--' }}</van-cell>
|
||||
<!-- <van-cell title="证明人">{{ viewData.certifierUserName || '--' }}</van-cell> -->
|
||||
<van-cell title="慰问类型">{{ viewData.typeName || '--' }}</van-cell>
|
||||
<van-cell title="慰问金额">{{ viewData.money || '--' }}</van-cell>
|
||||
<van-cell title="慰问时间">{{ viewData.occurTime || '--' }}</van-cell>
|
||||
<van-cell title="收款账户">{{ viewData.bankCardNumber || '--' }}</van-cell>
|
||||
<van-cell title="户名">{{ viewData.bankUserName || '--' }}</van-cell>
|
||||
<van-cell class="condolence-info-long-cell" title="开户行">
|
||||
<van-cell title="开户行">
|
||||
{{ viewData.bankOfDeposit || '暂无' }}
|
||||
</van-cell>
|
||||
<template v-if="['2'].includes(viewData.typeCode)">
|
||||
@@ -39,17 +39,18 @@ const condolenceInfo = {
|
||||
<van-cell title="出院时间">{{ viewData.leaveHospitalTime || '--' }}</van-cell>
|
||||
<van-cell title="当年第几次住院(次)">{{ viewData.thisYearHospitalizationNum || '--' }}</van-cell>
|
||||
</template>
|
||||
<van-cell class="condolence-info-long-cell" title="申请事由">
|
||||
<van-cell title="申请事由">
|
||||
{{ viewData.remark || '暂无' }}
|
||||
</van-cell>
|
||||
<van-cell class="condolence-info-long-cell" title="附件">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
<file-preview class="condolence-attachments" :files="viewData.files" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell class="condolence-info-long-cell" title="签字">
|
||||
<van-image
|
||||
v-if="viewData.signature"
|
||||
:src="viewData.signature"
|
||||
class="condolence-signature-image"
|
||||
fit="contain"
|
||||
></van-image>
|
||||
<span v-else>暂无签字</span>
|
||||
</van-cell>
|
||||
@@ -86,10 +87,10 @@ const condolenceInfo = {
|
||||
></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell v-if="task.taskFormData && task.taskFormData.sign" title="审批签字">
|
||||
<img :src="task.taskFormData.sign" style="max-width: 100%; height: 80px; object-fit: contain">
|
||||
<img :src="task.taskFormData.sign" class="condolence-approval-signature-image">
|
||||
</van-cell>
|
||||
<van-cell class="condolence-info-long-cell" title="办理意见">
|
||||
<div v-html="task.taskFormData && task.taskFormData.tf_opinion || '暂无'"></div>
|
||||
<van-cell title="办理意见">
|
||||
<div class="condolence-info-opinion" v-html="task.taskFormData && task.taskFormData.tf_opinion || '暂无'"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
+18
-1
@@ -151,7 +151,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<h2 class="condolence-info-card__title">
|
||||
审批签字<span class="condolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
@@ -223,6 +223,23 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
onReady() {
|
||||
this.queryCondolenceType()
|
||||
this.openTodoTask()
|
||||
},
|
||||
openTodoTask() {
|
||||
const taskId = GetQueryString("taskId")
|
||||
const bizId = GetQueryString("bizId")
|
||||
if (!taskId || !bizId) return
|
||||
this.$axios.post("/flow/common/taskInfo", {taskId}).then((res) => {
|
||||
if (res.code !== 0 || !res.data) return
|
||||
const task = res.data
|
||||
if (task.taskName !== "cbd41337-3c87-4959-9027-809df5c7ef5e") return
|
||||
const row = {id: bizId, taskId: task.id, curTaskName: task.displayName}
|
||||
if (task.taskState === 10 && task.executable && GetQueryString("tab") === "todo") {
|
||||
this.onApproval(row)
|
||||
} else {
|
||||
this.onView(row)
|
||||
}
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<h2 class="condolence-info-card__title">
|
||||
审批签字<span class="condolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<h2 class="condolence-info-card__title">
|
||||
审批签字<span class="condolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" required :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
|
||||
@@ -281,11 +281,13 @@ const todo = {
|
||||
// 处理任务
|
||||
onView(task) {
|
||||
const {taskId, taskKey, instanceId, businessNo, formKey, h5FormKey} = task;
|
||||
if (!h5FormKey) {
|
||||
const mobileFormKey = h5FormKey || (taskKey === "cbd41337-3c87-4959-9027-809df5c7ef5e"
|
||||
? "/platform/condolence/fourthApproval/h5" : "");
|
||||
if (!mobileFormKey) {
|
||||
this.$toast("当前流程暂不支持手机端审核,请前往PC端页面审核!");
|
||||
return;
|
||||
}
|
||||
this.$pjaxReplace(h5FormKey + "?taskId=" + taskId + "&bizId=" + businessNo + "&taskKey=" + taskKey + "&tab=" + this.activeTab)
|
||||
this.$pjaxReplace(mobileFormKey + "?taskId=" + taskId + "&bizId=" + businessNo + "&taskKey=" + taskKey + "&tab=" + this.activeTab)
|
||||
},
|
||||
|
||||
// 根据当前列表类型统一展示流程状态,发起列表保留流程实例的实际状态。
|
||||
|
||||
Reference in New Issue
Block a user