提案审核提交增加转圈圈、如果域名解析失败,不缓存,等待两秒重新读取,共三次,域名解析成功缓存一分钟;手机端审核撤回失败,审核下拉选择参数自动弹出审核页等bug
This commit is contained in:
@@ -63,17 +63,29 @@ public class MainLauncher {
|
||||
private Dao dao;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
configureDnsCache();
|
||||
NbApp nb = new NbApp().setArgs(args).setPrintProcDoc(true);
|
||||
nb.getAppContext().setMainPackage("com.budwk");
|
||||
nb.run();
|
||||
}
|
||||
|
||||
public static NbApp warMain(ServletContext sc) {
|
||||
configureDnsCache();
|
||||
NbApp nb = new NbApp().setPrintProcDoc(true);
|
||||
nb.getAppContext().setMainPackage("com.budwk");
|
||||
return nb;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在启动框架及网络依赖之前设置 JVM 域名缓存:成功缓存 60 秒,失败不缓存。
|
||||
* 此策略作用于整个 JVM;共享 WAR 容器若已初始化解析器,需在容器启动配置中设置。
|
||||
* 无入参、无返回值;不清理操作系统或 DNS 服务器的缓存。
|
||||
*/
|
||||
private static void configureDnsCache() {
|
||||
java.security.Security.setProperty("networkaddress.cache.ttl", "60");
|
||||
java.security.Security.setProperty("networkaddress.cache.negative.ttl", "0");
|
||||
}
|
||||
|
||||
public void init() {
|
||||
Mvcs.DISABLE_X_POWERED_BY = true;
|
||||
Globals.AppBase = Mvcs.getServletContext().getContextPath();
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@@ -17,9 +19,12 @@ public class FlowCommonService {
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
/**
|
||||
* 执行任务
|
||||
* @param args
|
||||
* 执行 WF 任务,任务状态、业务监听器和后续任务写入共用本地事务;OA 异常向外抛出触发回滚。
|
||||
* @param args 包含 processTaskId、submitType 和 tf_ 前缀表单变量;submitType 缺省为同意。
|
||||
* 方法会移除任务 ID 并补充办理人信息,批量办理应为每个任务传入独立副本。
|
||||
* 返回值为 void;失败抛出异常,由调用入口返回失败结果
|
||||
*/
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void executeTask(Dict args){
|
||||
Long processTaskId = args.getLong(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
String operator = SecurityUtil.getUserId();
|
||||
|
||||
@@ -195,10 +195,12 @@ public interface ProcessTaskService extends BaseService<ProcessTask> {
|
||||
ProcessTaskVO latest(Long processInstanceId);
|
||||
|
||||
/**
|
||||
* 转办任务
|
||||
* 转办正在办理的 WF 任务:旧 OA 待办转已办,新任务向目标办理人发送 OA 待办。
|
||||
* 无返回值;任务无效、参与人创建失败或 OA 同步异常时抛出异常,回滚本地事务。
|
||||
* OA 同步遵循系统开关;本地回滚不能撤销已经成功的远程 OA 操作。
|
||||
*
|
||||
* @param taskId 任务ID
|
||||
* @param transferUserId 转办用户ID
|
||||
* @param taskId 当前仍在办理的 WF 任务 ID,不是流程实例 ID
|
||||
* @param transferUserId 新办理人的系统用户 ID,不是工号
|
||||
*/
|
||||
void transfer(Long taskId, String transferUserId);
|
||||
|
||||
|
||||
@@ -463,8 +463,22 @@ public class ProcessTaskServiceImpl extends BaseServiceImpl<ProcessTask> impleme
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void transfer(Long taskId, String transferUserId) {
|
||||
// 设置原任务状态为已转办
|
||||
// taskId 为正在办理的 WF 任务,transferUserId 为目标用户 ID;无返回值,失败抛异常回滚。
|
||||
if (taskId == null || StrUtil.isBlank(transferUserId)) {
|
||||
throw new BaseException("转办失败:任务和新办理人不能为空");
|
||||
}
|
||||
ProcessTask task = fetch(taskId);
|
||||
if (task == null || Boolean.TRUE.equals(task.getDelFlag())
|
||||
|| !ProcessTaskStateEnum.DOING.getCode().equals(task.getTaskState())) {
|
||||
throw new BaseException("当前任务已处理或不存在,请刷新后重试");
|
||||
}
|
||||
// 使用与任务参与人创建相同的用户视图,提前拒绝无法创建参与人的目标用户。
|
||||
Sql transferUserSql = Sqls.create("select id from vw_user where id=@userId");
|
||||
transferUserSql.setParam("userId", transferUserId);
|
||||
if (listMap(transferUserSql).isEmpty()) {
|
||||
throw new BaseException("转办失败:新办理人不存在");
|
||||
}
|
||||
// 本系统保留已转办状态,OA 中旧办理人的待办在下方同步为已办。
|
||||
task.setTaskState(ProcessTaskStateEnum.TRANSFER.getCode());
|
||||
Dict variable = FlowUtil.variableToDict(task.getVariable());
|
||||
variable.put(FlowConst.TASK_FORM_DATA_PREFIX + "transferUserId", transferUserId);
|
||||
@@ -487,11 +501,18 @@ public class ProcessTaskServiceImpl extends BaseServiceImpl<ProcessTask> impleme
|
||||
// 创建转办任务参与者
|
||||
addTaskActor(newTask.getId(), List.of(transferUserId));
|
||||
|
||||
// 发布流程任务开始事件
|
||||
List<ProcessTask> processTaskList = List.of(task);
|
||||
processTaskList.forEach(processTask -> {
|
||||
ProcessPublisher.notify(ProcessEvent.builder().eventType(ProcessEventTypeEnum.PROCESS_TASK_START).sourceId(processTask.getId()).build());
|
||||
});
|
||||
// 参与人创建失败时禁止关闭旧 OA 待办;事务回滚新任务及旧任务状态。
|
||||
if (!getTaskActors(newTask.getId()).contains(transferUserId)) {
|
||||
throw new BaseException("转办失败:未能创建新办理人的任务参与记录");
|
||||
}
|
||||
// 两次 OA 调用均须成功才允许本地事务提交;异常继续向外抛出,不吞掉同步失败。
|
||||
// 本地事务不能撤销已成功的远程 OA 请求,因此仍需保留异常日志用于对账。
|
||||
schoolOaTodoService.completeTodo(task);
|
||||
schoolOaTodoService.createTodo(newTask);
|
||||
|
||||
// OA 同步成功后通知新任务的办理人,避免使用旧任务 ID 通知原办理人。
|
||||
ProcessPublisher.notify(ProcessEvent.builder().eventType(ProcessEventTypeEnum.PROCESS_TASK_START)
|
||||
.sourceId(newTask.getId()).build());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.budwk.app.flow.service.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
@@ -28,8 +29,9 @@ import org.nutz.ioc.impl.PropertiesProxy;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.Date;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -39,6 +41,12 @@ import java.util.List;
|
||||
@IocBean
|
||||
public class SchoolOaTodoServiceImpl implements SchoolOaTodoService {
|
||||
|
||||
// 总次数包含首次请求;只重试尚未连接到 OA 的域名解析失败。
|
||||
private static final int MAX_REQUEST_ATTEMPTS = 3;
|
||||
private static final int CONNECT_TIMEOUT_MS = 2000;
|
||||
private static final int READ_TIMEOUT_MS = 10000;
|
||||
private static final long DNS_RETRY_DELAY_MS = 2000L;
|
||||
|
||||
private static final String DATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
|
||||
private static final String DEFAULT_APP_TODO_URL = "zhgh.ypi.edu.cn";
|
||||
|
||||
@@ -491,31 +499,92 @@ public class SchoolOaTodoServiceImpl implements SchoolOaTodoService {
|
||||
return sendTodoRequest(url, body, failMessage, errorMessage, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送 OA 请求。DNS 失败间隔两秒、最多尝试三次;业务错误和结果不确定的网络异常直接抛出。
|
||||
* @param url 已替换任务标识的 OA 接口地址
|
||||
* @param body 请求 JSON,null 表示无请求体
|
||||
* @param failMessage OA 业务失败提示前缀
|
||||
* @param errorMessage 请求异常提示前缀
|
||||
* @param skipMissingTodo 仅完成待办接口允许 state=1131(记录不存在)继续办理
|
||||
* @return OA 原始 JSON 字符串,state=200 为成功,允许缺失时也可能为 1131
|
||||
*/
|
||||
private String sendTodoRequest(String url, JSONObject body, String failMessage, String errorMessage, boolean skipMissingTodo) {
|
||||
String requestBody = body == null ? "" : JSONUtil.toJsonStr(body);
|
||||
log.info("学校OA请求开始,url={},body={}", url, requestBody);
|
||||
try {
|
||||
HttpRequest request = HttpUtil.createPost(url);
|
||||
setTodoRequestHeaders(request);
|
||||
if (body != null) {
|
||||
request.body(requestBody);
|
||||
}
|
||||
for (int attempt = 1; attempt <= MAX_REQUEST_ATTEMPTS; attempt++) {
|
||||
long attemptStarted = System.nanoTime();
|
||||
log.info("学校OA请求开始,url={},attempt={}/{}", url, attempt, MAX_REQUEST_ATTEMPTS);
|
||||
try {
|
||||
// 每次重建请求并关闭响应;仅 DNS 失败后等待重试,不引入共享锁。
|
||||
HttpRequest request = HttpUtil.createPost(url)
|
||||
.setConnectionTimeout(CONNECT_TIMEOUT_MS)
|
||||
.setReadTimeout(READ_TIMEOUT_MS);
|
||||
setTodoRequestHeaders(request);
|
||||
if (body != null) {
|
||||
request.body(requestBody);
|
||||
}
|
||||
|
||||
String responseBody = request.execute().body();
|
||||
log.info("学校OA请求响应,url={},response={}", url, responseBody);
|
||||
JSONObject response = JSONUtil.parseObj(responseBody);
|
||||
int state = response.getInt("state", 0);
|
||||
// 仅完成待办接口允许 OA 返回“uniqueId 不存在”;创建、删除和其他修改仍按原规则报错。
|
||||
if (state != 200 && !(skipMissingTodo && state == 1131)) {
|
||||
log.warn("学校OA请求失败响应,url={},body={},response={}", url, requestBody, responseBody);
|
||||
throw new BaseException("{}:{}", failMessage, response.getStr("message", responseBody));
|
||||
String responseBody;
|
||||
try (HttpResponse httpResponse = request.execute()) {
|
||||
responseBody = httpResponse.body();
|
||||
}
|
||||
log.info("学校OA请求响应,url={},attempt={},elapsedMs={},response={}", url, attempt,
|
||||
(System.nanoTime() - attemptStarted) / 1_000_000L, responseBody);
|
||||
JSONObject response = JSONUtil.parseObj(responseBody);
|
||||
int state = response.getInt("state", 0);
|
||||
// 保留历史待办缺失的兼容规则;其他业务失败不重试。
|
||||
if (state != 200 && !(skipMissingTodo && state == 1131)) {
|
||||
throw new BaseException("{}:{}", failMessage, response.getStr("message", responseBody));
|
||||
}
|
||||
return responseBody;
|
||||
} catch (BaseException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
if (isUnknownHostFailure(e)) {
|
||||
log.warn("学校OA域名解析失败,url={},attempt={}/{},elapsedMs={}", url, attempt, MAX_REQUEST_ATTEMPTS,
|
||||
(System.nanoTime() - attemptStarted) / 1_000_000L, e);
|
||||
if (attempt < MAX_REQUEST_ATTEMPTS) {
|
||||
// 只暂停当前请求;中断时终止重试并抛出异常,交由外层事务回滚。
|
||||
log.info("学校OA等待域名解析重试,url={},nextAttempt={},delayMs={}",
|
||||
url, attempt + 1, DNS_RETRY_DELAY_MS);
|
||||
try {
|
||||
Thread.sleep(DNS_RETRY_DELAY_MS);
|
||||
} catch (InterruptedException interrupted) {
|
||||
Thread.currentThread().interrupt();
|
||||
BaseException failure = new BaseException("学校OA请求已中断,请稍后重试");
|
||||
failure.initCause(interrupted);
|
||||
failure.addSuppressed(e);
|
||||
throw failure;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
BaseException failure = new BaseException("学校OA暂时无法连接,请稍后重试");
|
||||
failure.initCause(e);
|
||||
throw failure;
|
||||
}
|
||||
// 读取超时等异常可能发生在 OA 已处理之后,自动重试可能导致重复待办。
|
||||
log.error("学校OA请求异常,url={},attempt={},elapsedMs={}", url, attempt,
|
||||
(System.nanoTime() - attemptStarted) / 1_000_000L, e);
|
||||
BaseException failure = new BaseException("{}:{}", errorMessage, e.getMessage());
|
||||
failure.initCause(e);
|
||||
throw failure;
|
||||
}
|
||||
return responseBody;
|
||||
} catch (BaseException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
log.error("学校OA请求异常,url={},body={}", url, requestBody, e);
|
||||
throw new BaseException("{}:{}", errorMessage, e.getMessage());
|
||||
}
|
||||
throw new BaseException("学校OA暂时无法连接,请稍后重试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查 HTTP 库包装的底层 DNS 异常;限制遍历深度,避免异常原因链循环导致无限等待。
|
||||
* @param error 请求抛出的异常
|
||||
* @return true 表示异常链包含 UnknownHostException,可安全重试域名解析失败的请求
|
||||
*/
|
||||
private boolean isUnknownHostFailure(Throwable error) {
|
||||
Throwable cause = error;
|
||||
for (int depth = 0; cause != null && depth < 32; depth++) {
|
||||
if (cause instanceof UnknownHostException) {
|
||||
return true;
|
||||
}
|
||||
cause = cause.getCause();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+15
-1
@@ -190,8 +190,22 @@ public class ProposalPositiveSecondedController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 供附议及七个办理节点的公共详情读取主动附议记录;读取权限不授予实际附议操作权限。
|
||||
* @param bizId 提案 ID,对应 proposal_second.proposalId
|
||||
* @return Result,data 为主动附议记录列表,包含附议人、附议意见、结果及时间;无记录时为空列表
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission(value = {"proposal.seconded", "h5.proposal.seconded", "proposal.commissioner", "h5.proposal.commissioner", "proposal.committeeFiling", "h5.proposal.committeeFiling", "proposal.schoolLeaderApproval", "h5.proposal.schoolLeaderApproval"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {
|
||||
"proposal.seconded", "h5.proposal.seconded",
|
||||
"proposal.delegation", "h5.proposal.delegation",
|
||||
"proposal.commissioner", "h5.proposal.commissioner",
|
||||
"proposal.committeeFiling", "h5.proposal.committeeFiling",
|
||||
"proposal.unitReply", "h5.proposal.unitReply",
|
||||
"proposal.suggestion", "h5.proposal.suggestion",
|
||||
"proposal.schoolLeaderApproval", "h5.proposal.schoolLeaderApproval",
|
||||
"proposal.feedbackEvaluation", "h5.proposal.feedbackEvaluation"
|
||||
}, mode = SaMode.OR)
|
||||
public Result listPositiveSeconded(String bizId) {
|
||||
List<ProposalSecond> list = dao.query(ProposalSecond.class, Cnd.where(ProposalSecond::getProposalId, "=", bizId).and(ProposalSecond::getMode, "=", false));
|
||||
return Result.success(list);
|
||||
|
||||
+10
-23
@@ -6,10 +6,8 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.flow.service.ProcessTaskService;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
@@ -18,6 +16,7 @@ import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.ProposalUnderTakeReplyService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -37,9 +36,9 @@ import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/proposal/unitReply")
|
||||
@@ -53,7 +52,7 @@ public class ProposalUnderTakeReplyController {
|
||||
@Inject
|
||||
private ProposalCommonService proposalCommonService;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
private ProposalUnderTakeReplyService proposalUnderTakeReplyService;
|
||||
@Inject
|
||||
private ProcessTaskService processTaskService;
|
||||
@Inject
|
||||
@@ -154,30 +153,18 @@ public class ProposalUnderTakeReplyController {
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收承办答复参数,委托 Service 完成整批 WF 办理。
|
||||
* @param data JSON 字符串,包含 proposalId、processTaskId、submitType 及 tf_ 表单变量
|
||||
* @return Result 成功结果;业务或 OA 异常由统一异常处理返回失败信息
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("proposal.unitReply")
|
||||
@ApiOperation("执行任务")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result executeTask(@Param("data") String data) {
|
||||
Dict args = Json.fromJson(Dict.class, data);
|
||||
String proposalId = args.getStr("proposalId");
|
||||
|
||||
// 查询是否提案
|
||||
|
||||
// 单条审核
|
||||
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
|
||||
if (ObjectUtil.isEmpty(mergeProposalIds)) {
|
||||
flowCommonService.executeTask(args);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
// 并案审核
|
||||
ProcessTask thisTask = dao.fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY));
|
||||
List<ProcessTask> mergeTasks = processTaskService.getDoingTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
|
||||
for (ProcessTask mergeTask : mergeTasks) {
|
||||
Dict cloneArgs = args.clone();
|
||||
cloneArgs.put(FlowConst.PROCESS_TASK_ID_KEY, mergeTask.getId());
|
||||
flowCommonService.executeTask(cloneArgs);
|
||||
}
|
||||
proposalUnderTakeReplyService.executeTask(args);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
+9
-1
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.service;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
@@ -8,11 +9,18 @@ import com.budwk.app.zhgh.democratic.proposal.param.ProposalUnderTakeReplyApprov
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalUnderTakeReplyTransferParam;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import javax.validation.Valid;
|
||||
|
||||
public interface ProposalUnderTakeReplyService extends BaseService<ProposalInfo> {
|
||||
|
||||
/**
|
||||
* 在同一事务中办理单条或并案提案的 WF 承办答复。
|
||||
* @param args proposalId 为提案 ID,processTaskId 为当前任务 ID,submitType 和 tf_ 变量沿用页面参数
|
||||
* 返回值为 void;办理失败抛出异常,整批本地修改回滚
|
||||
*/
|
||||
void executeTask(Dict args);
|
||||
|
||||
Pagination pageData(ProposalSearchParam param);
|
||||
|
||||
void approval(ProposalUnderTakeReplyApprovalParam param);
|
||||
|
||||
+8
@@ -26,8 +26,10 @@ import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalUnderTakeSchoolLeaderApprovalParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.ProposalSchoolLeaderApprovalService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@@ -65,7 +67,13 @@ public class ProposalSchoolLeaderApprovalServiceImpl extends BaseServiceImpl<Pro
|
||||
super(dao);
|
||||
}
|
||||
|
||||
/**
|
||||
* 办理校领导 WF 审核;并案中任一任务失败时,整批本地修改回滚。
|
||||
* @param args proposalId 为提案 ID,processTaskId 为当前任务 ID,其余为审核操作和表单变量
|
||||
* 返回值为 void;失败异常交由接口统一处理
|
||||
*/
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void executeTask(Dict args) {
|
||||
String proposalId = args.getStr("proposalId");
|
||||
|
||||
|
||||
+37
@@ -1,6 +1,8 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||
@@ -16,6 +18,10 @@ import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||
import com.budwk.app.bpm.models.BpmProcessNodeDefine;
|
||||
import com.budwk.app.bpm.models.BpmProcessTask;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.flow.service.ProcessTaskService;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
@@ -53,6 +59,10 @@ import java.util.stream.Collectors;
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class ProposalUnderTakeReplyServiceImpl extends BaseServiceImpl<ProposalInfo> implements ProposalUnderTakeReplyService {
|
||||
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private ProcessTaskService processTaskService;
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
@Inject
|
||||
@@ -70,6 +80,33 @@ public class ProposalUnderTakeReplyServiceImpl extends BaseServiceImpl<ProposalI
|
||||
super(dao);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保留原 PC 答复的并案联动规则,整批 WF 办理共用外层事务。
|
||||
* @param args proposalId 为提案 ID,processTaskId 为任务 ID,其余操作及表单变量原样交给 WF
|
||||
* 返回值为 void;任一任务或 OA 请求失败均向外抛出异常
|
||||
*/
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void executeTask(Dict args) {
|
||||
String proposalId = args.getStr("proposalId");
|
||||
|
||||
// 未并案时只办理当前任务;并案时统一办理同节点的关联任务。
|
||||
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
|
||||
if (ObjectUtil.isEmpty(mergeProposalIds)) {
|
||||
flowCommonService.executeTask(args);
|
||||
return;
|
||||
}
|
||||
|
||||
// 每个任务使用独立参数副本,避免公共执行方法移除任务 ID 后影响下一条。
|
||||
ProcessTask thisTask = dao().fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY));
|
||||
List<ProcessTask> mergeTasks = processTaskService.getDoingTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
|
||||
for (ProcessTask mergeTask : mergeTasks) {
|
||||
Dict cloneArgs = args.clone();
|
||||
cloneArgs.put(FlowConst.PROCESS_TASK_ID_KEY, mergeTask.getId());
|
||||
flowCommonService.executeTask(cloneArgs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pagination pageData(ProposalSearchParam param) {
|
||||
return null;
|
||||
|
||||
@@ -99,6 +99,8 @@
|
||||
let active = null
|
||||
let serial = 0
|
||||
let pending = null
|
||||
let registered = null
|
||||
let releasing = Promise.resolve()
|
||||
let skippingClosedHistory = false
|
||||
const sync = (closedKeys) => {
|
||||
if (active) active.onChange(active.keys.slice(), closedKeys)
|
||||
@@ -146,37 +148,55 @@
|
||||
return {
|
||||
/** 注册页面同步回调,参数为仍打开的弹框 key 数组;返回页面专用操作句柄。 */
|
||||
register(onChange) {
|
||||
if (active) throw new Error("上一个页面的弹框历史尚未注销")
|
||||
const owner = { id: Date.now() + "-" + (++serial), keys: [], onChange }
|
||||
active = owner
|
||||
if (registered) throw new Error("上一个页面的弹框历史尚未注销")
|
||||
const owner = { id: Date.now() + "-" + (++serial), keys: [], onChange, disposed: false }
|
||||
registered = owner
|
||||
// 旧页面注销时先释放注册资格;新页面的弹框操作等待旧历史回退完成,不能接管其 popstate。
|
||||
const ready = active ? releasing.then(() => {
|
||||
if (!owner.disposed) active = owner
|
||||
}) : Promise.resolve()
|
||||
if (!active) active = owner
|
||||
const runOwned = (work) => {
|
||||
const run = () => active === owner && !owner.disposed ? work() : undefined
|
||||
return active === owner ? run() : ready.then(run)
|
||||
}
|
||||
let destroyed = null
|
||||
return {
|
||||
// key 是页面内唯一弹框名称;相同弹框重复打开不会重复压栈。
|
||||
open(key) {
|
||||
const open = () => {
|
||||
if (active !== owner || owner.keys.includes(key)) return
|
||||
if (active !== owner || owner.disposed || owner.keys.includes(key)) return
|
||||
owner.keys.push(key)
|
||||
window.history.pushState({ h5Popup: { owner: owner.id, depth: owner.keys.length } }, "", window.location.href)
|
||||
}
|
||||
return pending ? pending.promise.then(open) : Promise.resolve(open())
|
||||
return Promise.resolve(runOwned(() => pending ? pending.promise.then(open) : open()))
|
||||
},
|
||||
// 关闭指定弹框及其上层弹框,返回 Promise<void>,保持后进先出。
|
||||
close(key) {
|
||||
if (active !== owner) return Promise.resolve()
|
||||
const index = owner.keys.indexOf(key)
|
||||
return index < 0 ? Promise.resolve() : rewind(index)
|
||||
return Promise.resolve(runOwned(() => {
|
||||
const index = owner.keys.indexOf(key)
|
||||
return index < 0 ? undefined : rewind(index)
|
||||
}))
|
||||
},
|
||||
clear() {
|
||||
return active === owner ? rewind(0) : Promise.resolve()
|
||||
return Promise.resolve(runOwned(() => rewind(0)))
|
||||
},
|
||||
destroy() {
|
||||
if (destroyed) return destroyed
|
||||
owner.disposed = true
|
||||
if (registered === owner) registered = null
|
||||
// 无弹框时同步注销,保证 PJAX 同次替换中下一个页面可以立即注册。
|
||||
if (active === owner && !owner.keys.length && !pending) {
|
||||
active = null
|
||||
return Promise.resolve()
|
||||
destroyed = Promise.resolve()
|
||||
return destroyed
|
||||
}
|
||||
return this.clear().then(() => {
|
||||
// 新页面可能尚在等待更早页面释放历史;连续切换也必须按顺序完成注销。
|
||||
destroyed = ready.then(() => active === owner ? rewind(0) : undefined).then(() => {
|
||||
if (active === owner) active = null
|
||||
})
|
||||
releasing = destroyed
|
||||
return destroyed
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -215,27 +235,17 @@
|
||||
$(document).on("pjax:complete", function () {
|
||||
if (window.customStyleList) {
|
||||
window.customStyleList.forEach((style) => {
|
||||
style.parentNode.removeChild(style)
|
||||
// 页面替换或前一次清理可能已移除节点,仅清理仍挂载的旧样式。
|
||||
if (style.parentNode) style.parentNode.removeChild(style)
|
||||
})
|
||||
window.customStyleList = null
|
||||
}
|
||||
NProgress.done()
|
||||
toggleShowBar()
|
||||
})
|
||||
|
||||
// 监听浏览器的前进和后退操作
|
||||
$(window).on("popstate", function (event) {
|
||||
if (event.originalEvent.state) {
|
||||
// 如果存在历史记录状态,触发 Pjax 加载对应内容
|
||||
$.pjax({
|
||||
url: event.originalEvent.state.url,
|
||||
container: "#container",
|
||||
fragment: "#container",
|
||||
timeout: 8000,
|
||||
push: false,
|
||||
scrollTo: false
|
||||
})
|
||||
}
|
||||
})
|
||||
// 普通页面前进/后退交给 PJAX 自带的 popstate.pjax 处理。
|
||||
// 弹框历史只有 h5Popup 标记,没有页面 url/container,不能再次发起页面请求。
|
||||
}
|
||||
})()
|
||||
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
// 仅供提案办理页面使用:同一页面的表单、并案和转办共用办理锁,查询与分页仍使用原 mixin。
|
||||
const PROPOSAL_SUBMIT_MIXIN = {
|
||||
data() {
|
||||
return {
|
||||
formLoading: false,
|
||||
formAction: '',
|
||||
proposalSubmitting: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// H5 每个页面只注册一个历史栈所有者,子组件共享它,避免多层弹框重复监听 popstate。
|
||||
if (this === this.$root && this.$options.proposalH5) {
|
||||
this.proposalPopupRecords = new Map()
|
||||
this.proposalPopupSerial = 0
|
||||
this.proposalPopupHandle = window.h5PopupHistory.register((keys, closedKeys) => {
|
||||
closedKeys.slice().reverse().forEach((key) => {
|
||||
const record = this.proposalPopupRecords.get(key)
|
||||
if (record) {
|
||||
record.fromHistory = true
|
||||
record.close()
|
||||
record.fromHistory = false
|
||||
}
|
||||
})
|
||||
})
|
||||
// PJAX 只替换 DOM,不会自动销毁 Vue;替换所属容器前释放旧页面的历史栈所有权。
|
||||
this.proposalBeforeReplace = (event) => {
|
||||
if (this.$el && (event.target === this.$el || event.target.contains(this.$el))) {
|
||||
this.$destroy()
|
||||
}
|
||||
}
|
||||
$(document).on('pjax:beforeReplace', this.proposalBeforeReplace)
|
||||
}
|
||||
// options 中只列出本页面已有的弹框状态,不创建新弹框或改变业务字段。
|
||||
;(this.$options.proposalPopupFields || []).forEach((field) => {
|
||||
this.$root.trackProposalPopup(this, field)
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.proposalDisposed = true
|
||||
// 每个 H5 根实例仅监听自己的页面替换;主动销毁或 PJAX 离开后均移除监听,避免残留实例重复响应。
|
||||
if (this.proposalBeforeReplace) {
|
||||
$(document).off('pjax:beforeReplace', this.proposalBeforeReplace)
|
||||
}
|
||||
if (this.proposalPopupUnwatch) this.proposalPopupUnwatch.forEach((stop) => stop())
|
||||
if (this !== this.$root && this.$root.proposalPopupRecords) {
|
||||
this.$root.proposalPopupRecords.forEach((record, key) => {
|
||||
if (record.vm === this) {
|
||||
this.$root.proposalPopupHandle.close(key)
|
||||
this.$root.proposalPopupRecords.delete(key)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this === this.$root && this.proposalPopupHandle) this.proposalPopupHandle.destroy()
|
||||
},
|
||||
methods: {
|
||||
/** action 为按钮标识,work 返回包含校验、确认和所有提交请求的 Promise;结束后统一释放锁。 */
|
||||
runProposalSubmit(action, work) {
|
||||
if (this.proposalDisposed || this.$root.proposalDisposed || this.formLoading || this.$root.proposalSubmitting) return Promise.resolve()
|
||||
this.$set(this, 'formLoading', true)
|
||||
this.$set(this, 'formAction', action)
|
||||
this.$set(this.$root, 'proposalSubmitting', true)
|
||||
return Promise.resolve().then(() => {
|
||||
if (!this.proposalDisposed && !this.$root.proposalDisposed) return work()
|
||||
}).catch(() => {
|
||||
// 表单校验、确认取消以及 axios 拦截器已负责提示;不重复提示或重发流程请求。
|
||||
}).finally(() => {
|
||||
if (this.proposalDisposed || this.$root.proposalDisposed) return
|
||||
this.$set(this, 'formLoading', false)
|
||||
this.$set(this, 'formAction', '')
|
||||
this.$set(this.$root, 'proposalSubmitting', false)
|
||||
})
|
||||
},
|
||||
/** 将已有 v-model 与全局历史栈同步;返回键只关闭最上层,程序关闭也同步回退历史。 */
|
||||
trackProposalPopup(vm, field) {
|
||||
const root = this.$root
|
||||
if (!root.proposalPopupHandle) return
|
||||
const key = 'proposal-popup-' + (++root.proposalPopupSerial)
|
||||
const record = { vm, field, fromHistory: false, close: () => vm.$set(vm, field, false) }
|
||||
root.proposalPopupRecords.set(key, record)
|
||||
const stop = vm.$watch(field, (visible) => {
|
||||
if (record.fromHistory) return
|
||||
if (visible) root.proposalPopupHandle.open(key)
|
||||
else root.proposalPopupHandle.close(key)
|
||||
}, { sync: true })
|
||||
if (!vm.proposalPopupUnwatch) vm.proposalPopupUnwatch = []
|
||||
vm.proposalPopupUnwatch.push(stop)
|
||||
if (vm[field]) root.proposalPopupHandle.open(key)
|
||||
},
|
||||
/** options 沿用 Vant 确认框参数;确认/取消均先回退确认框历史,再向调用方传递结果。 */
|
||||
proposalConfirm(options) {
|
||||
const root = this.$root
|
||||
if (this.proposalDisposed || root.proposalDisposed) return Promise.reject('cancel')
|
||||
const key = 'proposal-confirm-' + (++root.proposalPopupSerial)
|
||||
let settled = false
|
||||
let cancelConfirmation
|
||||
const cancelled = new Promise((resolve, reject) => { cancelConfirmation = reject })
|
||||
root.proposalPopupRecords.set(key, { close: () => {
|
||||
if (!settled) {
|
||||
// Vant Dialog.close() 只隐藏界面,不会拒绝 confirm Promise,必须同时结束等待。
|
||||
cancelConfirmation('cancel')
|
||||
this.$dialog.close()
|
||||
}
|
||||
} })
|
||||
// 等待旧页面历史释放期间也监听取消,避免页面已销毁后才打开确认框。
|
||||
const confirmation = root.proposalPopupHandle.open(key).then(() => {
|
||||
if (this.proposalDisposed || root.proposalDisposed) return Promise.reject('cancel')
|
||||
return this.$dialog.confirm(Object.assign({}, options, { closeOnPopstate: false }))
|
||||
})
|
||||
return Promise.race([confirmation, cancelled]).finally(() => {
|
||||
settled = true
|
||||
return root.proposalPopupHandle.close(key).then(() => {
|
||||
root.proposalPopupRecords.delete(key)
|
||||
})
|
||||
})
|
||||
},
|
||||
/** 关闭本页面所有提案弹框后执行成功回调,防止提交完成后返回到已关闭的审核弹层。 */
|
||||
finishProposalSubmit(work) {
|
||||
const root = this.$root
|
||||
if (this.proposalDisposed || root.proposalDisposed) return Promise.resolve()
|
||||
return (root.proposalPopupHandle ? root.proposalPopupHandle.clear() : Promise.resolve()).then(() => {
|
||||
if (!this.proposalDisposed && !root.proposalDisposed) return work()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
-25
@@ -84,8 +84,8 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核</el-button>
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -98,7 +98,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="process-title">
|
||||
提案委员会成员意见
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="审核意见" prop="opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<div class="commissioner-opinion-box">
|
||||
@@ -122,8 +122,8 @@ layout("/layouts/platform.html"){
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="doSubmit" size="small" type="primary">提交</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="doSubmit" size="small" type="primary" :loading="formLoading && formAction === ('doSubmit')" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -133,13 +133,15 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_SUGGESTION_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
@@ -173,16 +175,18 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
// 审批
|
||||
openAudit(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.$set(this, "formData", {
|
||||
processTaskId: row.taskId,
|
||||
proposalId: row.id,
|
||||
@@ -195,23 +199,27 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
doSubmit() {
|
||||
if (!this.formData.caseFilingResult) {
|
||||
this.$message.warning("请选择立案结果")
|
||||
return
|
||||
}
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/commissioner/doApproval', this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
return this.runProposalSubmit("doSubmit", () => {
|
||||
if (!this.formData.caseFilingResult) {
|
||||
this.$message.warning("请选择立案结果")
|
||||
return
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (!valid) return
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
return this.$axios.post("/platform/proposal/commissioner/doApproval", this.formData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
+68
-50
@@ -47,7 +47,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool :columns.sync="tableColumns">
|
||||
<el-button type="primary" icon="el-icon-plus" size="small" @click="openMerge">并案审核</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" size="small" @click="openMerge" :disabled="$root.proposalSubmitting">并案审核</el-button>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
@@ -82,10 +82,10 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger" :disabled="$root.proposalSubmitting">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -99,7 +99,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item v-if="isCommitteeTask()" label="立案结果" prop="tf_caseFilingResult"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
|
||||
@@ -179,9 +179,9 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">提交</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info" :loading="formLoading && formAction === ('handleTaskAction:' + 6)" :disabled="$root.proposalSubmitting">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -194,6 +194,8 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include('merge.js'){}#-->
|
||||
|
||||
@@ -201,7 +203,7 @@ layout("/layouts/platform.html"){
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO,
|
||||
merge
|
||||
@@ -252,14 +254,16 @@ layout("/layouts/platform.html"){
|
||||
return this.isCommitteeDirectorOpinionTask() || (this.isCommitteeTask() && this.formData.tf_caseFilingResult === "CONFIRM_FILING")
|
||||
},
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.$set(this, "formData", {
|
||||
processTaskId: row.taskId,
|
||||
taskKey: row.taskKey,
|
||||
@@ -275,46 +279,60 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
if (val === 1 && this.isBranchSchoolLeaderRequired() && !this.formData.userId) {
|
||||
this.$message.warning("请选择分管校领导")
|
||||
return
|
||||
}
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
// 是否有协办单位
|
||||
let tf_helpunitreply
|
||||
if (this.isCommitteeTask() && this.formData.tf_slaveUnitIds && this.formData.tf_slaveUnitIds.length > 0) {
|
||||
tf_helpunitreply = "HAS_HELP_UNIT"
|
||||
} else {
|
||||
tf_helpunitreply = "NO_HELP_UNIT"
|
||||
}
|
||||
|
||||
const loading = createLoading("提交中")
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val,
|
||||
tf_masterUnitName: this.formData.tf_masterUnitId ? this.underTakeOptions.find(v => v.id === this.formData.tf_masterUnitId)?.name : null,
|
||||
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name),
|
||||
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name).join(","),
|
||||
tf_helpunitreply: tf_helpunitreply
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, () => {
|
||||
if (val === 1 && this.isBranchSchoolLeaderRequired() && !this.formData.userId) {
|
||||
this.$message.warning("请选择分管校领导")
|
||||
return
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (valid) {
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
// 是否有协办单位
|
||||
let tf_helpunitreply
|
||||
if (
|
||||
this.isCommitteeTask() &&
|
||||
this.formData.tf_slaveUnitIds &&
|
||||
this.formData.tf_slaveUnitIds.length > 0
|
||||
) {
|
||||
tf_helpunitreply = "HAS_HELP_UNIT"
|
||||
} else {
|
||||
tf_helpunitreply = "NO_HELP_UNIT"
|
||||
}
|
||||
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val,
|
||||
tf_masterUnitName: this.formData.tf_masterUnitId
|
||||
? this.underTakeOptions.find((v) => v.id === this.formData.tf_masterUnitId)
|
||||
?.name
|
||||
: null,
|
||||
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(
|
||||
(v) => this.underTakeOptions.find((v2) => v2.id === v)?.name
|
||||
),
|
||||
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds
|
||||
.map((v) => this.underTakeOptions.find((v2) => v2.id === v)?.name)
|
||||
.join(","),
|
||||
tf_helpunitreply: tf_helpunitreply
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
+47
-40
@@ -13,7 +13,7 @@ const merge = {
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100px">
|
||||
<template scope="scope">
|
||||
<el-button @click="onRemove(scope.$index)" size="mini" type="danger">移除</el-button>
|
||||
<el-button @click="onRemove(scope.$index)" size="mini" type="danger" :disabled="$root.proposalSubmitting">移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -22,7 +22,7 @@ const merge = {
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="立案结果" prop="tf_caseFilingResult"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
|
||||
@@ -102,14 +102,15 @@ const merge = {
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$emit('close')" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">提交</el-button>
|
||||
<el-button @click="$emit('close')" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info" :loading="formLoading && formAction === ('handleTaskAction:' + 6)" :disabled="$root.proposalSubmitting">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
selection: [],
|
||||
@@ -167,43 +168,49 @@ const merge = {
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
if (val === 1 && this.isBranchSchoolLeaderRequired() && !this.formData.userId) {
|
||||
this.$message.warning("请选择分管校领导")
|
||||
return
|
||||
}
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
debugger
|
||||
// 是否有协办单位
|
||||
let tf_helpunitreply;
|
||||
if (this.formData.tf_slaveUnitIds && this.formData.tf_slaveUnitIds.length > 0) {
|
||||
tf_helpunitreply = 'HAS_HELP_UNIT'
|
||||
} else {
|
||||
tf_helpunitreply = 'NO_HELP_UNIT'
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, () => {
|
||||
if (val === 1 && this.isBranchSchoolLeaderRequired() && !this.formData.userId) {
|
||||
this.$message.warning("请选择分管校领导")
|
||||
return
|
||||
}
|
||||
|
||||
const loading = createLoading('提交中')
|
||||
this.$axios.post("/platform/proposal/committeeFiling/merge", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
proposalIds: this.selection.map(v => v.id),
|
||||
submitType: val,
|
||||
tf_masterUnitName: this.formData.tf_masterUnitId ? this.underTakeOptions.find(v => v.id === this.formData.tf_masterUnitId)?.name : null,
|
||||
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name),
|
||||
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name).join(','),
|
||||
tf_helpunitreply: tf_helpunitreply
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$emit('close')
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
debugger
|
||||
// 是否有协办单位
|
||||
let tf_helpunitreply
|
||||
if (this.formData.tf_slaveUnitIds && this.formData.tf_slaveUnitIds.length > 0) {
|
||||
tf_helpunitreply = "HAS_HELP_UNIT"
|
||||
} else {
|
||||
tf_helpunitreply = "NO_HELP_UNIT"
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
|
||||
return this.$axios
|
||||
.post("/platform/proposal/committeeFiling/merge", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
proposalIds: this.selection.map((v) => v.id),
|
||||
submitType: val,
|
||||
tf_masterUnitName: this.formData.tf_masterUnitId
|
||||
? this.underTakeOptions.find((v) => v.id === this.formData.tf_masterUnitId)?.name
|
||||
: null,
|
||||
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(
|
||||
(v) => this.underTakeOptions.find((v2) => v2.id === v)?.name
|
||||
),
|
||||
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds
|
||||
.map((v) => this.underTakeOptions.find((v2) => v2.id === v)?.name)
|
||||
.join(","),
|
||||
tf_helpunitreply: tf_helpunitreply
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$emit("close")
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
+39
-29
@@ -56,10 +56,10 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger" :disabled="$root.proposalSubmitting">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -74,17 +74,17 @@ layout("/layouts/platform.html"){
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
class="flow-task-form" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info" :loading="formLoading && formAction === ('handleTaskAction:' + 6)" :disabled="$root.proposalSubmitting">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger" :loading="formLoading && formAction === ('handleTaskAction:' + 2)" :disabled="$root.proposalSubmitting">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" :disabled="$root.proposalSubmitting">同意</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -93,12 +93,14 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
@@ -121,14 +123,16 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
@@ -138,24 +142,30 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, () => {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (!valid) return
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
+43
-38
@@ -62,10 +62,10 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">评价
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">评价
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger" :disabled="$root.proposalSubmitting">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -79,7 +79,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="满意度" prop="tf_feedback"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.tf_feedback" size="small">
|
||||
@@ -94,8 +94,8 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">提交</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -104,13 +104,15 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["PROPOSAL_FEEDBACK"],
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
@@ -135,14 +137,16 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskKey: row.taskKey,
|
||||
@@ -154,28 +158,35 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const formData = {
|
||||
...this.formData,
|
||||
submitType: val
|
||||
}
|
||||
// 不满意
|
||||
if (this.formData.tf_feedback === 'DISSATISFIED') {
|
||||
const caseInfo = await this.getCaseInfo(this.formData.instanceId)
|
||||
formData.tf_masterUnitId = caseInfo.tf_masterUnitId
|
||||
}
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, () => {
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const formData = {
|
||||
...this.formData,
|
||||
submitType: val
|
||||
}
|
||||
const lookup =
|
||||
this.formData.tf_feedback === "DISSATISFIED"
|
||||
? this.getCaseInfo(this.formData.instanceId).then((caseInfo) => {
|
||||
formData.tf_masterUnitId = caseInfo.tf_masterUnitId
|
||||
})
|
||||
: Promise.resolve()
|
||||
return lookup.then(() => {
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -197,14 +208,8 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
// 获取立案信息
|
||||
async getCaseInfo(instId) {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = await this.$axios.post('/platform/proposal/feedbackEvaluation/caseInfo', {instId})
|
||||
if (code === 0) {
|
||||
return data
|
||||
}
|
||||
getCaseInfo(instId) {
|
||||
return this.$axios.post("/platform/proposal/feedbackEvaluation/caseInfo", { instId }).then((res) => res.data)
|
||||
},
|
||||
|
||||
// 教代会
|
||||
|
||||
+39
-33
@@ -43,14 +43,18 @@
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</div>
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction"></snaker-flow-task-form-action>
|
||||
<div v-loading="formLoading" element-loading-text="提交中…">
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction"></snaker-flow-task-form-action>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#proposal-transact-apply-form",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
@@ -104,42 +108,44 @@
|
||||
|
||||
handleTaskAction(val) {
|
||||
console.log(val)
|
||||
this.invite(val)
|
||||
return this.invite(val)
|
||||
},
|
||||
|
||||
// 邀请
|
||||
invite(val) {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.warning("请先选择附议人后再提交")
|
||||
return
|
||||
}
|
||||
const loginNames = selection.map((s) => s.loginName)
|
||||
const userName = selection.map((s) => s.userName)
|
||||
this.$confirm("您确定要邀请" + userName.join("、") + "代表附议吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...val,
|
||||
tf_nextNodeOperator: selection.map((s) => s.userId),
|
||||
tf_proposalId: this.businessId,
|
||||
tf_seconders: JSON.stringify(selection)
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
// 发送完成消息
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete",
|
||||
payload: val
|
||||
return this.runProposalSubmit("invite", () => {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.warning("请先选择附议人后再提交")
|
||||
return
|
||||
}
|
||||
const loginNames = selection.map((s) => s.loginName)
|
||||
const userName = selection.map((s) => s.userName)
|
||||
return this.$confirm("您确定要邀请" + userName.join("、") + "代表附议吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...val,
|
||||
tf_nextNodeOperator: selection.map((s) => s.userId),
|
||||
tf_proposalId: this.businessId,
|
||||
tf_seconders: JSON.stringify(selection)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
// 发送完成消息
|
||||
window.GlobalBroadcastChannel.postMessage({
|
||||
type: "task-complete",
|
||||
payload: val
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -87,13 +87,15 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("inviteSeconder.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO,
|
||||
"invite-seconder": PROPOSAL_INVITE_SECONDER_COMPONENT
|
||||
|
||||
+33
-30
@@ -21,7 +21,7 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
<el-divider class="mt10 mb10"></el-divider>
|
||||
<div>
|
||||
<table-tool label="代表数据">
|
||||
<!-- <el-button size="small" @click="invite" type="primary" icon="el-icon-plus"-->
|
||||
<!-- <el-button size="small" @click="invite" type="primary" icon="el-icon-plus"-- :loading="formLoading && formAction === ('invite')">
|
||||
<!-- :disabled="pageForm.isInvite">邀请-->
|
||||
<!-- </el-button>-->
|
||||
<el-radio-group v-model="pageForm.isInvite" @change="doSearch" size="small"
|
||||
@@ -44,7 +44,7 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<!-- <el-table-column label="操作" width="150px">-->
|
||||
<!-- <template scope="{row}">-->
|
||||
<!-- <el-button size="mini" type="primary" @click="invite(row)">邀请</el-button>-->
|
||||
<!-- <el-button size="mini" type="primary" @click="invite(row)" :loading="formLoading && formAction === ('invite')">邀请</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
@@ -68,15 +68,15 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
</el-table>
|
||||
|
||||
<el-row type="flex" justify="center" class="p10">
|
||||
<el-button @click="">取消</el-button>
|
||||
<el-button @click="invite" type="primary">邀请</el-button>
|
||||
<el-button @click="" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="invite" type="primary" :loading="formLoading && formAction === ('invite')" :disabled="$root.proposalSubmitting">邀请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -123,32 +123,35 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
detail(id) {
|
||||
},
|
||||
invite() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.warning("请先选择附议人后再邀请")
|
||||
return
|
||||
}
|
||||
return this.runProposalSubmit("invite", () => {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.warning("请先选择附议人后再邀请")
|
||||
return
|
||||
}
|
||||
|
||||
const loginNames = selection.map((s) => s.loginName)
|
||||
const userName = selection.map((s) => s.userName)
|
||||
this.$confirm("您确定要邀请" + userName.join("、") + "代表附议吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading('邀请中...')
|
||||
this.$axios.post("/platform/proposal/mine/inviteSeconder", {
|
||||
proposalId: this.record.id,
|
||||
seconders: JSON.stringify(loginNames)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.$refs.tableRef.clearSelection()
|
||||
this.pageData()
|
||||
this.visible = false
|
||||
this.$emit("refresh", null)
|
||||
}
|
||||
}).finally(() => loading.close())
|
||||
const loginNames = selection.map((s) => s.loginName)
|
||||
const userName = selection.map((s) => s.userName)
|
||||
return this.$confirm("您确定要邀请" + userName.join("、") + "代表附议吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/mine/inviteSeconder", {
|
||||
proposalId: this.record.id,
|
||||
seconders: JSON.stringify(loginNames)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.$refs.tableRef.clearSelection()
|
||||
this.pageData()
|
||||
this.$set(this, "visible", false)
|
||||
this.$emit("refresh", null)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
|
||||
+39
-29
@@ -63,8 +63,8 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.count === 0" @click="openAudit(row)" size="mini" type="primary">附议</el-button>
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button v-if="row.count === 0" @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">附议</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -76,16 +76,16 @@ layout("/layouts/platform.html"){
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">主动附议</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
class="flow-task-form" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(20)" size="small" type="danger">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="handleTaskAction(20)" size="small" type="danger" :loading="formLoading && formAction === ('handleTaskAction:' + 20)" :disabled="$root.proposalSubmitting">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" :disabled="$root.proposalSubmitting">同意</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -94,12 +94,14 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
@@ -125,19 +127,21 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
async openAudit(row) {
|
||||
const validatePass = await this.validateTime();
|
||||
if (this.$root.proposalSubmitting) return
|
||||
const validatePass = await this.validateTime()
|
||||
if (!validatePass) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
this.row = row
|
||||
this.$set(this, "row", row)
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
@@ -160,23 +164,29 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/positiveSeconded/handle", {
|
||||
proposalId: this.row.id,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: val,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, () => {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (!valid) return
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/positiveSeconded/handle", {
|
||||
proposalId: this.row.id,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: val
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
+40
-36
@@ -83,10 +83,10 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger" :disabled="$root.proposalSubmitting">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -100,17 +100,17 @@ layout("/layouts/platform.html"){
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button v-if="isSchoolLeaderTask()" @click="handleTaskAction('back')" :loading="submitLoading" size="small" type="danger">退回重新答复
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button v-if="isSchoolLeaderTask()" @click="handleTaskAction('back')" size="small" type="danger" :loading="formLoading && formAction === ('handleTaskAction:' + 'back')" :disabled="$root.proposalSubmitting">退回重新答复
|
||||
</el-button>
|
||||
<el-button @click="handleTaskAction('agree')" :loading="submitLoading" size="small" type="primary">{{submitButtonText()}}</el-button>
|
||||
<el-button @click="handleTaskAction('agree')" size="small" type="primary" :loading="formLoading && formAction === ('handleTaskAction:' + 'agree')" :disabled="$root.proposalSubmitting">{{submitButtonText()}}</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -119,13 +119,15 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT"],
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
@@ -145,7 +147,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
submitLoading: false,
|
||||
|
||||
sessionOptions: [],
|
||||
delegationOptions: [],
|
||||
}
|
||||
@@ -161,12 +163,14 @@ layout("/layouts/platform.html"){
|
||||
return this.isInstructionTask() ? "提交批示" : "同意答复"
|
||||
},
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.$set(this, "formData", {
|
||||
@@ -180,35 +184,35 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
if (this.submitLoading) {
|
||||
return
|
||||
}
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, () => {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (!valid) return
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const formData = {
|
||||
...this.formData,
|
||||
tf_approval: val
|
||||
}
|
||||
delete formData.taskKey
|
||||
delete formData.taskName
|
||||
|
||||
this.$set(this, "submitLoading", true)
|
||||
this.$axios.post("/platform/proposal/schoolLeaderApproval/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const formData = {
|
||||
...this.formData,
|
||||
tf_approval: val
|
||||
}
|
||||
}).finally(() => {
|
||||
this.$set(this, "submitLoading", false)
|
||||
delete formData.taskKey
|
||||
delete formData.taskName
|
||||
|
||||
return this.$axios
|
||||
.post("/platform/proposal/schoolLeaderApproval/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
+63
-48
@@ -78,8 +78,8 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="showAuditButton(row)" @click="openAudit(row)" size="mini" type="primary">附议</el-button>
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button v-if="showAuditButton(row)" @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">附议</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -93,16 +93,16 @@ layout("/layouts/platform.html"){
|
||||
{{approvalTitle}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
class="flow-task-form" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(20)" size="small" type="danger">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="handleTaskAction(20)" size="small" type="danger" :loading="formLoading && formAction === ('handleTaskAction:' + 20)" :disabled="$root.proposalSubmitting">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" :disabled="$root.proposalSubmitting">同意</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -111,12 +111,14 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
@@ -249,7 +251,8 @@ layout("/layouts/platform.html"){
|
||||
return row.count === 0
|
||||
},
|
||||
|
||||
openView: function (row) {
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
@@ -285,42 +288,52 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction: function (val) {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (this.activeTab === "inviteSeconded") {
|
||||
this.handleInviteSeconded(val)
|
||||
} else {
|
||||
this.handlePositiveSeconded(val)
|
||||
}
|
||||
handleTaskAction(val) {
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, () => {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (!valid) return
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
if (this.activeTab === "inviteSeconded") {
|
||||
return this.handleInviteSeconded(val)
|
||||
} else {
|
||||
return this.handlePositiveSeconded(val)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 受邀附议需要先执行流程任务,再同步附议结果。
|
||||
handleInviteSeconded: function (val) {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
handleInviteSeconded(val) {
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({ ...this.formData, submitType: val })
|
||||
})
|
||||
.then((res) => {
|
||||
// WF 已办理后只回写附议结果;第二步失败不得再次执行已完成的 WF 任务。
|
||||
return this.updateInviteSeconded(val)
|
||||
.then(() => {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$refs.guava.index()
|
||||
this.$message.error("流程已办理,但附议结果同步失败,请刷新核对,勿重复提交")
|
||||
this.doSearch()
|
||||
throw error
|
||||
})
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.updateInviteSeconded(val)
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
updateInviteSeconded: function (submitType) {
|
||||
this.$axios.post("/platform/proposal/seconded/updateInfo", {
|
||||
updateInviteSeconded(submitType) {
|
||||
return this.$axios.post("/platform/proposal/seconded/updateInfo", {
|
||||
proposalId: this.row.id,
|
||||
taskActorUserId: this.row.taskActorUserId,
|
||||
opinion: this.formData.tf_opinion,
|
||||
@@ -329,18 +342,20 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
// 主动附议走独立业务接口处理。
|
||||
handlePositiveSeconded: function (val) {
|
||||
this.$axios.post("/platform/proposal/positiveSeconded/handle", {
|
||||
proposalId: this.row.id,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: val
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
handlePositiveSeconded(val) {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/positiveSeconded/handle", {
|
||||
proposalId: this.row.id,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: val
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
validatePositiveTime: function () {
|
||||
|
||||
+31
-23
@@ -131,8 +131,8 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" min-width="160px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row)" size="mini" type="primary">反馈意见</el-button>
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">反馈意见</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -145,7 +145,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="process-title">
|
||||
承办单位意见
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="80px" :rules="formRules" label-suffix="">
|
||||
<el-form :model="formData" ref="formRef" label-width="80px" :rules="formRules" label-suffix="" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="承办意向" prop="result"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.result" size="small">
|
||||
@@ -160,8 +160,8 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="onAudit()" size="small" type="primary">提交</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="onAudit()" size="small" type="primary" :loading="formLoading && formAction === ('onAudit')" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -172,7 +172,7 @@ layout("/layouts/platform.html"){
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div class="left-span-label">意见{{ index + 1 }}</div>
|
||||
<div>
|
||||
<el-button @click="onDelete(item)" size="mini" type="danger">删除</el-button>
|
||||
<el-button @click="onDelete(item)" size="mini" type="danger" :disabled="$root.proposalSubmitting">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-descriptions :column="2" border>
|
||||
@@ -191,12 +191,14 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNDERTAKE_SUGGESTION"],
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
@@ -259,34 +261,40 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.formData = {
|
||||
proposalId: row.id,
|
||||
proposalId: row.id
|
||||
}
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onAudit() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/suggestion/suggest", this.formData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
return this.runProposalSubmit("onAudit", () => {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (!valid) return
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
return this.$axios.post("/platform/proposal/suggestion/suggest", this.formData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
+66
-54
@@ -139,14 +139,14 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" min-width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">答复
|
||||
<el-button @click="openView(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">答复
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger" :disabled="$root.proposalSubmitting">撤回
|
||||
</el-button>
|
||||
<!--承办单位领导、超级管理员才能转办-->
|
||||
<el-button v-if="!pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')"
|
||||
@click="openTransfer(row)" size="mini" type="primary">转交
|
||||
@click="openTransfer(row)" size="mini" type="primary" :disabled="$root.proposalSubmitting">转交
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -160,7 +160,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="80px" :rules="formRules" label-suffix="">
|
||||
<el-form :model="formData" ref="formRef" label-width="80px" :rules="formRules" label-suffix="" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="承办单位">
|
||||
<el-input :value="formData.underTakeName" disabled></el-input>
|
||||
</el-form-item>
|
||||
@@ -186,8 +186,8 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">提交</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -213,7 +213,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-form ref="transferFormRef" :model="transferForm" label-position="top">
|
||||
<el-form ref="transferFormRef" :model="transferForm" label-position="top" :disabled="$root.proposalSubmitting">
|
||||
<el-form-item label="转交给" prop="userId"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-select v-model="transferForm.userId"
|
||||
@@ -231,21 +231,23 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="showTransferDialog = false" size="small">取消</el-button>
|
||||
<el-button @click="handleTransfer" size="small" type="primary">提交</el-button>
|
||||
<el-button @click="$set(this, 'showTransferDialog', false)" size="small" :disabled="$root.proposalSubmitting">取消</el-button>
|
||||
<el-button @click="handleTransfer" size="small" type="primary" :loading="formLoading && formAction === ('handleTransfer')" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_REPLY_IMPLEMENT"],
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
@@ -281,16 +283,18 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.loadCandidates(row.taskId)
|
||||
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskKey: row.taskKey,
|
||||
@@ -304,31 +308,33 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading('提交中')
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, () => {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (!valid) return
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
delete this.formData.underTakeIsMaster
|
||||
delete this.formData.underTakeName
|
||||
|
||||
delete this.formData.underTakeIsMaster
|
||||
delete this.formData.underTakeName
|
||||
|
||||
this.$axios.post("/platform/proposal/unitReply/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
return this.$axios
|
||||
.post("/platform/proposal/unitReply/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -362,14 +368,14 @@ layout("/layouts/platform.html"){
|
||||
|
||||
// 打开转办
|
||||
openTransfer(row) {
|
||||
this.showTransferDialog = true
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showTransferDialog", true)
|
||||
this.transferForm = {
|
||||
taskId: row.taskId,
|
||||
name: row.name,
|
||||
code: row.code,
|
||||
delegationName: row.delegationName
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 查询转办用户
|
||||
@@ -383,22 +389,28 @@ layout("/layouts/platform.html"){
|
||||
|
||||
// 转办
|
||||
handleTransfer() {
|
||||
this.$refs.transferFormRef.validate(valid => {
|
||||
if (!valid) return
|
||||
const transferUserName = this.transferUserOptions.find(item => item.id === this.transferForm.userId)?.username
|
||||
const name = this.transferForm.name
|
||||
return this.runProposalSubmit("handleTransfer", () => {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.transferFormRef.validate(resolve)
|
||||
}).then((valid) => {
|
||||
if (!valid) return
|
||||
const transferUserName = this.transferUserOptions.find(
|
||||
(item) => item.id === this.transferForm.userId
|
||||
)?.username
|
||||
const name = this.transferForm.name
|
||||
|
||||
this.$confirm("您确定要将" + name + "提案转交给" + transferUserName + "办理吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/unitReply/transfer', this.transferForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.showTransferDialog = false
|
||||
this.doSearch()
|
||||
}
|
||||
return this.$confirm("您确定要将" + name + "提案转交给" + transferUserName + "办理吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
return this.$axios.post("/platform/proposal/unitReply/transfer", this.transferForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.$set(this, "showTransferDialog", false)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
+105
-91
@@ -8,7 +8,7 @@ layout("/layouts/platform.html"){
|
||||
<custom-card>
|
||||
<snaker-start slot="header" label="撰写提案" define_key="JDHTA"></snaker-start>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm">
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm" :disabled="$root.proposalSubmitting">
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="代表姓名" prop="createUserName">
|
||||
@@ -154,9 +154,9 @@ layout("/layouts/platform.html"){
|
||||
</el-form>
|
||||
|
||||
<template slot="footer" >
|
||||
<el-button type="primary" @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onSubmitAgain" v-else>提交</el-button>
|
||||
<el-button type="primary" @click="onSave" :loading="formLoading && formAction === ('onSave')" :disabled="$root.proposalSubmitting">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId" :loading="formLoading && formAction === ('onSubmit')" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
<el-button type="primary" @click="onSubmitAgain" v-else :loading="formLoading && formAction === ('onSubmitAgain')" :disabled="$root.proposalSubmitting">提交</el-button>
|
||||
</template>
|
||||
</custom-card>
|
||||
|
||||
@@ -164,16 +164,18 @@ layout("/layouts/platform.html"){
|
||||
<div v-html="proposalConfig.writeRemind" style="max-height: 50vh; overflow-y: auto"></div>
|
||||
|
||||
<div slot="footer">
|
||||
<el-button type="primary" @click="noticeDialogVisible = false">我已知晓</el-button>
|
||||
<el-button type="primary" @click="$set(this, 'noticeDialogVisible', false)" :disabled="$root.proposalSubmitting">我已知晓</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
@@ -214,103 +216,115 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSave() {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
|
||||
this.$axios.post("/platform/proposal/write/save", {info: JSON.stringify(this.formData)}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.formData = res.data
|
||||
commonUtil.pjaxPush('/platform/proposal/mine')
|
||||
onSave() {
|
||||
return this.runProposalSubmit("onSave", async () => {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return this.$axios
|
||||
.post("/platform/proposal/write/save", { info: JSON.stringify(this.formData) })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.$set(this, "formData", res.data)
|
||||
commonUtil.pjaxPush("/platform/proposal/mine")
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
let brief = clone(this.formData.brief)
|
||||
brief = removeHTMLTag(brief)
|
||||
if (brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$message.warning("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
onSubmit() {
|
||||
return this.runProposalSubmit("onSubmit", async () => {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
let brief = clone(this.formData.brief)
|
||||
brief = removeHTMLTag(brief)
|
||||
if (brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$message.warning("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading('正在提交中')
|
||||
this.$axios.post('/platform/proposal/write/submit', {info: JSON.stringify(this.formData)}).then(res => {
|
||||
loading.close()
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
if (this.formData.source==="PERSONAL"){
|
||||
this.$confirm("提交成功,是否立即去邀请附议人?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
commonUtil.pjaxPush('/platform/proposal/mine?bizId=' + res.data.id + "&operation=invite")
|
||||
}).catch(() => {
|
||||
this.$message.info("请到我的提案界面邀请附议人")
|
||||
commonUtil.pjaxPush('/platform/proposal/mine')
|
||||
})
|
||||
}else{
|
||||
commonUtil.pjaxPush('/platform/proposal/mine')
|
||||
}
|
||||
|
||||
}
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/write/submit", { info: JSON.stringify(this.formData) })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
if (this.formData.source === "PERSONAL") {
|
||||
return this.$confirm("提交成功,是否立即去邀请附议人?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
commonUtil.pjaxPush(
|
||||
"/platform/proposal/mine?bizId=" + res.data.id + "&operation=invite"
|
||||
)
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.info("请到我的提案界面邀请附议人")
|
||||
commonUtil.pjaxPush("/platform/proposal/mine")
|
||||
})
|
||||
} else {
|
||||
commonUtil.pjaxPush("/platform/proposal/mine")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 重新提交
|
||||
async onSubmitAgain() {
|
||||
onSubmitAgain() {
|
||||
return this.runProposalSubmit("onSubmitAgain", async () => {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
let brief = clone(this.formData.brief)
|
||||
brief = removeHTMLTag(brief)
|
||||
if (brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$message.warning("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
let brief = clone(this.formData.brief)
|
||||
brief = removeHTMLTag(brief)
|
||||
if (brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$message.warning("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/write/submitAgain', {
|
||||
info: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/proposal/mine')
|
||||
}
|
||||
return this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/write/submitAgain", {
|
||||
info: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush("/platform/proposal/mine")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取提案类别
|
||||
|
||||
@@ -238,16 +238,29 @@ const PROPOSAL_INFO = {
|
||||
detailRequestVersion: 0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 仅办理页面提供历史栈管理;普通查询页面沿用原有查看行为。
|
||||
if (this.$root.trackProposalPopup) this.$root.trackProposalPopup(this, 'visible')
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.proposalPopupUnwatch) this.proposalPopupUnwatch.forEach((stop) => stop())
|
||||
if (this.$root.proposalPopupRecords) {
|
||||
this.$root.proposalPopupRecords.forEach((record, key) => {
|
||||
if (record.vm === this) this.$root.proposalPopupRecords.delete(key)
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
// 每次打开递增版本,阻止前一次查看的迟到响应覆盖当前提案(包括 A→B→A)。
|
||||
this.$set(this, "detailRequestVersion", this.detailRequestVersion + 1)
|
||||
this.$set(this, "row", row)
|
||||
this.$set(this, "viewData", {})
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.$set(this, "positiveSecondList", [])
|
||||
this.visible = true
|
||||
this.$set(this, 'visible', true)
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
this.listPositiveSeconded()
|
||||
@@ -256,7 +269,7 @@ const PROPOSAL_INFO = {
|
||||
|
||||
// 关闭
|
||||
onClose(){
|
||||
this.visible = false
|
||||
this.$set(this, 'visible', false)
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
|
||||
+33
-23
@@ -64,7 +64,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="openCaseFilingResultPicker"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showCaseFilingResultPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -104,23 +104,28 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block @click="$refs.proposalInfoRef.onClose()">取消</van-button>
|
||||
<van-button type="primary" block @click="doSubmit">提交</van-button>
|
||||
<van-button block @click="$refs.proposalInfoRef.onClose()" :disabled="$root.proposalSubmitting">取消</van-button>
|
||||
<van-button type="primary" block @click="doSubmit" :loading="formLoading && formAction === ('doSubmit')" loading-text="提交中…" :disabled="$root.proposalSubmitting">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_SUGGESTION_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
proposalPopupFields: ["showCaseFilingResultPicker", "showCaseFilingTypePicker"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -184,6 +189,7 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
@@ -227,26 +233,30 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
|
||||
async doSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: "您确定要提交吗?",
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/commissioner/doApproval', this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
doSubmit() {
|
||||
return this.runProposalSubmit("doSubmit", async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
.then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/commissioner/doApproval", this.formData)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
|
||||
+65
-53
@@ -64,7 +64,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="openCaseFilingResultPicker"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showCaseFilingResultPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -84,7 +84,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="openCaseFilingTypePicker"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showCaseFilingTypePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -104,7 +104,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="openMasterUnitPicker"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showMasterUnitPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -123,12 +123,12 @@ layout("/layouts/platform_h5.html"){
|
||||
readonly
|
||||
is-link
|
||||
@click="openSlaveUnitPicker"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showSlaveUnitPicker" position="bottom">
|
||||
<div style="padding: 12px 16px; display: flex; justify-content: space-between; align-items: center;">
|
||||
<van-button size="small" @click="hideSlaveUnitPicker">取消</van-button>
|
||||
<van-button size="small" @click="hideSlaveUnitPicker" :disabled="$root.proposalSubmitting">取消</van-button>
|
||||
<span>选择协办单位</span>
|
||||
<van-button size="small" type="primary" @click="onSlaveUnitConfirm">确定</van-button>
|
||||
<van-button size="small" type="primary" @click="onSlaveUnitConfirm" :disabled="$root.proposalSubmitting">确定</van-button>
|
||||
</div>
|
||||
<van-checkbox-group v-model="slaveUnitTempIds" style="max-height: 320px; overflow-y: auto;">
|
||||
<van-cell-group>
|
||||
@@ -159,7 +159,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="openBranchSchoolLeaderPicker"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showBranchSchoolLeaderPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -179,22 +179,27 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block :loading="submitLoading" @click="handleTaskAction(6)">退回到提案人</van-button>
|
||||
<van-button type="primary" block :loading="submitLoading" @click="handleTaskAction(1)">提交</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(6)" :loading="formLoading && formAction === ('handleTaskAction:' + 6)" loading-text="提交中…" :disabled="$root.proposalSubmitting">退回到提案人</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" loading-text="提交中…" :disabled="$root.proposalSubmitting">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
proposalPopupFields: ["showCaseFilingResultPicker", "showCaseFilingTypePicker", "showMasterUnitPicker", "showSlaveUnitPicker", "showBranchSchoolLeaderPicker"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -212,7 +217,7 @@ layout("/layouts/platform_h5.html"){
|
||||
slaveUnitTempIds: [],
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
submitLoading: false,
|
||||
|
||||
showCaseFilingResultPicker: false,
|
||||
showCaseFilingTypePicker: false,
|
||||
showMasterUnitPicker: false,
|
||||
@@ -286,6 +291,7 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
@@ -414,58 +420,64 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$set(this.formData, "userId", value.value)
|
||||
this.$set(this, "showBranchSchoolLeaderPicker", false)
|
||||
},
|
||||
async handleTaskAction(val) {
|
||||
if (this.submitLoading) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
if (val === 1 && this.isBranchSchoolLeaderRequired() && !this.formData.userId) {
|
||||
this.$toast("请选择分管校领导")
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
var data = Object.assign({}, this.formData)
|
||||
data.submitType = val
|
||||
data.tf_helpunitreply = this.formData.tf_slaveUnitIds.length > 0 ? "HAS_HELP_UNIT" : "NO_HELP_UNIT"
|
||||
handleTaskAction(val) {
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
if (val === 1 && this.isBranchSchoolLeaderRequired() && !this.formData.userId) {
|
||||
this.$toast("请选择分管校领导")
|
||||
return
|
||||
}
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
var data = Object.assign({}, this.formData)
|
||||
data.submitType = val
|
||||
data.tf_helpunitreply =
|
||||
this.formData.tf_slaveUnitIds.length > 0 ? "HAS_HELP_UNIT" : "NO_HELP_UNIT"
|
||||
|
||||
this.$set(this, "submitLoading", true)
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(data)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(data)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
// row 提供当前记录的流程任务 ID;确认与请求共用办理锁,离开页面后不再刷新旧表格。
|
||||
onRevoke(row) {
|
||||
return this.runProposalSubmit("onRevoke", () => {
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
if (this.proposalDisposed) return
|
||||
return this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
// code 为 0 表示撤回成功;已销毁页面不提示、不访问失效的组件引用。
|
||||
if (res.code === 0 && !this.proposalDisposed) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.$set(this, "submitLoading", false)
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
// nextTick 执行前页面可能已被 PJAX 替换,不能访问已销毁的表格。
|
||||
if (this.proposalDisposed || !this.$refs.tableListRef) return
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "totalCount", 0)
|
||||
this.$refs.tableListRef.doSearch()
|
||||
|
||||
+53
-37
@@ -62,23 +62,27 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(6)" :loading="formLoading && formAction === ('handleTaskAction:' + 6)" loading-text="提交中…" :disabled="$root.proposalSubmitting">退回</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)" :loading="formLoading && formAction === ('handleTaskAction:' + 2)" loading-text="提交中…" :disabled="$root.proposalSubmitting">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" loading-text="提交中…" :disabled="$root.proposalSubmitting">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -121,7 +125,8 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
@@ -134,49 +139,60 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
handleTaskAction(val) {
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
|
||||
// row 提供当前记录的流程任务 ID;确认与请求共用办理锁,离开页面后不再刷新旧表格。
|
||||
onRevoke(row) {
|
||||
return this.runProposalSubmit("onRevoke", () => {
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
if (this.proposalDisposed) return
|
||||
return this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
// code 为 0 表示撤回成功;已销毁页面不提示、不访问失效的组件引用。
|
||||
if (res.code === 0 && !this.proposalDisposed) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
// nextTick 执行前页面可能已被 PJAX 替换,不能访问已销毁的表格。
|
||||
if (this.proposalDisposed || !this.$refs.tableListRef) return
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
|
||||
+69
-57
@@ -62,7 +62,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="showFeedBackPicker = true"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showFeedBackPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -81,7 +81,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<template v-if="['SATISFIED','FAIRLY_SATISFIED'].includes(formData.tf_feedback)">
|
||||
<van-field
|
||||
@@ -92,7 +92,7 @@ layout("/layouts/platform_h5.html"){
|
||||
:rules="[{ required: true, message: '请输入通讯地址' }]"
|
||||
required
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<!--联系电话-->
|
||||
<van-field
|
||||
v-model="formData.tf_phone"
|
||||
@@ -102,7 +102,7 @@ layout("/layouts/platform_h5.html"){
|
||||
:rules="[{ required: true, message: '请输入联系电话' }]"
|
||||
required
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<!--邮政编码-->
|
||||
<van-field
|
||||
v-model="formData.tf_postcode"
|
||||
@@ -112,24 +112,29 @@ layout("/layouts/platform_h5.html"){
|
||||
:rules="[{ required: true, message: '请输入邮政编码' }]"
|
||||
required
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
</template>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="$refs.proposalInfoRef.onClose()">取消</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">提交</van-button>
|
||||
<van-button type="danger" block @click="$refs.proposalInfoRef.onClose()" :disabled="$root.proposalSubmitting">取消</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" loading-text="提交中…" :disabled="$root.proposalSubmitting">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
dicts: ["PROPOSAL_FEEDBACK"],
|
||||
store,
|
||||
proposalH5: true,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
proposalPopupFields: ["showFeedBackPicker"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -174,7 +179,8 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
@@ -194,66 +200,72 @@ layout("/layouts/platform_h5.html"){
|
||||
this.showFeedBackPicker = false
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
handleTaskAction(val) {
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
const formData = {
|
||||
...this.formData,
|
||||
submitType: val
|
||||
}
|
||||
const lookup =
|
||||
this.formData.tf_feedback === "DISSATISFIED"
|
||||
? this.getCaseInfo(this.formData.instanceId).then((caseInfo) => {
|
||||
formData.tf_masterUnitId = caseInfo.tf_masterUnitId
|
||||
})
|
||||
: Promise.resolve()
|
||||
return lookup.then(() => {
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
// 获取立案信息
|
||||
getCaseInfo(instId) {
|
||||
return this.$axios.post("/platform/proposal/feedbackEvaluation/caseInfo", { instId }).then((res) => res.data)
|
||||
},
|
||||
// row 提供当前记录的流程任务 ID;确认与请求共用办理锁,离开页面后不再刷新旧表格。
|
||||
onRevoke(row) {
|
||||
return this.runProposalSubmit("onRevoke", () => {
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(async () => {
|
||||
debugger
|
||||
const formData = {
|
||||
...this.formData,
|
||||
submitType: val
|
||||
}
|
||||
// 不满意
|
||||
if (this.formData.tf_feedback === 'DISSATISFIED') {
|
||||
const caseInfo = await this.getCaseInfo(this.formData.instanceId)
|
||||
formData.tf_masterUnitId = caseInfo.tf_masterUnitId
|
||||
}
|
||||
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
if (this.proposalDisposed) return
|
||||
return this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
// code 为 0 表示撤回成功;已销毁页面不提示、不访问失效的组件引用。
|
||||
if (res.code === 0 && !this.proposalDisposed) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
// 获取立案信息
|
||||
async getCaseInfo(instId) {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = await this.$axios.post('/platform/proposal/feedbackEvaluation/caseInfo', {instId})
|
||||
if (code === 0) {
|
||||
return data
|
||||
}
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
// nextTick 执行前页面可能已被 PJAX 替换,不能访问已销毁的表格。
|
||||
if (this.proposalDisposed || !this.$refs.tableListRef) return
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
|
||||
+19
-8
@@ -61,16 +61,20 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("inviteSeconder.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
components: {
|
||||
"invite-seconder": PROPOSAL_INVITE_SECONDER_COMPONENT,
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -109,36 +113,42 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onEdit(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$pjaxReplace("/platform/proposal/write/h5?bizId=" + row.id + "&taskId=" + (row.startTaskId || ''))
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
// nextTick 执行前页面可能已被 PJAX 替换,不能访问已销毁的表格。
|
||||
if (this.proposalDisposed || !this.$refs.tableListRef) return
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// row 提供当前记录的流程任务 ID;确认与请求共用办理锁,离开页面后不再刷新旧表格。
|
||||
onRevoke(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
return this.runProposalSubmit("onRevoke", () => {
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if(res.code===0){
|
||||
}).then(() => {
|
||||
if (this.proposalDisposed) return
|
||||
return this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
// code 为 0 表示撤回成功;已销毁页面不提示、不访问失效的组件引用。
|
||||
if (res.code === 0 && !this.proposalDisposed) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
@@ -153,6 +163,7 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onInvite(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$axios.post("/platform/proposal/mine/inviteCheck", {id: row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.inviteSeconderRef.onOpen(row)
|
||||
|
||||
+39
-33
@@ -11,7 +11,7 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
<van-tab title="已邀请" name="1"></van-tab>
|
||||
<van-tab title="可邀请" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
|
||||
<van-checkbox-group v-model="tableSelection" v-if="tableData && tableData.length>0">
|
||||
<van-cell-group >
|
||||
<van-cell
|
||||
@@ -27,26 +27,28 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
<span slot="label" class="font-size0 van-color-text-assist">
|
||||
{{item.unitName}}
|
||||
</span>
|
||||
<van-checkbox
|
||||
:name="item"
|
||||
:ref="'checkboxes'+item.loginName"
|
||||
<van-checkbox
|
||||
:name="item"
|
||||
:ref="'checkboxes'+item.loginName"
|
||||
slot="right-icon"
|
||||
v-if="!pageForm.isInvite"></van-checkbox>
|
||||
</van-cell>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="p10">
|
||||
<van-pagination
|
||||
v-model="pageForm.pageNumber"
|
||||
:total-items="pageForm.totalCount"
|
||||
<van-pagination
|
||||
v-model="pageForm.pageNumber"
|
||||
:total-items="pageForm.totalCount"
|
||||
:items-per-page="pageForm.pageSize"
|
||||
@change="pageData"
|
||||
></van-pagination>
|
||||
<van-button @click="invite" type="primary" block :disabled="pageForm.isInvite" class="mt10">邀请</van-button>
|
||||
<van-button @click="invite" type="primary" block :disabled="(pageForm.isInvite) || $root.proposalSubmitting" class="mt10" :loading="formLoading && formAction === ('invite')" loading-text="提交中…">邀请</van-button>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
<van-empty v-else :figure="2"></van-empty>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
proposalPopupFields: ["visible"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -77,34 +79,38 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
detail(id) {
|
||||
},
|
||||
invite() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$toast("请先选择附议人后在点击邀请")
|
||||
return
|
||||
}
|
||||
return this.runProposalSubmit("invite", () => {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$toast("请先选择附议人后在点击邀请")
|
||||
return
|
||||
}
|
||||
|
||||
const loginNames = [...new Set(this.tableSelection.map((s) => s.loginName))]
|
||||
const userName = [...new Set(this.tableSelection.map((s) => s.userName))]
|
||||
const loginNames = [...new Set(this.tableSelection.map((s) => s.loginName))]
|
||||
const userName = [...new Set(this.tableSelection.map((s) => s.userName))]
|
||||
|
||||
console.log(this.tableSelection)
|
||||
console.log(this.tableSelection)
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: "您确定要邀请" + userName.join("、") + "代表附议吗?",
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/mine/inviteSeconder", {
|
||||
proposalId: this.record.id,
|
||||
seconders: JSON.stringify(loginNames)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$toast.success(res.msg)
|
||||
this.tableSelection = []
|
||||
// this.visible = false
|
||||
this.$emit("refresh", null)
|
||||
}
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要邀请" + userName.join("、") + "代表附议吗?"
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
.then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/mine/inviteSeconder", {
|
||||
proposalId: this.record.id,
|
||||
seconders: JSON.stringify(loginNames)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$toast.success(res.msg)
|
||||
this.$set(this, "tableSelection", [])
|
||||
// this.visible = false
|
||||
this.$emit("refresh", null)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
|
||||
+36
-23
@@ -63,22 +63,26 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(20)" :loading="formLoading && formAction === ('handleTaskAction:' + 20)" loading-text="提交中…" :disabled="$root.proposalSubmitting">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" loading-text="提交中…" :disabled="$root.proposalSubmitting">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -154,7 +158,8 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
@@ -185,26 +190,34 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/positiveSeconded/handle", {
|
||||
proposalId: this.row.id,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: val,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
handleTaskAction(val) {
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
}).catch(() => {})
|
||||
} catch (error) {}
|
||||
.then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/positiveSeconded/handle", {
|
||||
proposalId: this.row.id,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: val
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
|
||||
+55
-46
@@ -62,22 +62,26 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button v-if="isSchoolLeaderTask()" type="danger" block :loading="submitLoading" @click="handleTaskAction('back')">退回答复</van-button>
|
||||
<van-button type="primary" block :loading="submitLoading" @click="handleTaskAction('agree')">{{submitButtonText()}}</van-button>
|
||||
<van-button v-if="isSchoolLeaderTask()" type="danger" block @click="handleTaskAction('back')" :loading="formLoading && formAction === ('handleTaskAction:' + 'back')" loading-text="提交中…" :disabled="$root.proposalSubmitting">退回答复</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction('agree')" :loading="formLoading && formAction === ('handleTaskAction:' + 'agree')" loading-text="提交中…" :disabled="$root.proposalSubmitting">{{submitButtonText()}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -92,7 +96,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
sessionOptions: [],
|
||||
formData: {},
|
||||
submitLoading: false,
|
||||
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
@@ -121,6 +125,7 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
@@ -148,60 +153,64 @@ layout("/layouts/platform_h5.html"){
|
||||
return this.isInstructionTask() ? "提交批示" : "同意答复"
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
if (this.submitLoading) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
handleTaskAction(val) {
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
const formData = {
|
||||
...this.formData,
|
||||
tf_approval: val
|
||||
}
|
||||
delete formData.taskKey
|
||||
delete formData.taskName
|
||||
|
||||
return this.$axios
|
||||
.post("/platform/proposal/schoolLeaderApproval/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
|
||||
// row 提供当前记录的流程任务 ID;确认与请求共用办理锁,离开页面后不再刷新旧表格。
|
||||
onRevoke(row) {
|
||||
return this.runProposalSubmit("onRevoke", () => {
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
|
||||
const formData = {
|
||||
...this.formData,
|
||||
tf_approval: val
|
||||
}
|
||||
delete formData.taskKey
|
||||
delete formData.taskName
|
||||
|
||||
this.$set(this, "submitLoading", true)
|
||||
this.$axios.post("/platform/proposal/schoolLeaderApproval/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
if (this.proposalDisposed) return
|
||||
return this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
// code 为 0 表示撤回成功;已销毁页面不提示、不访问失效的组件引用。
|
||||
if (res.code === 0 && !this.proposalDisposed) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.$set(this, "submitLoading", false)
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
// nextTick 执行前页面可能已被 PJAX 替换,不能访问已销毁的表格。
|
||||
if (this.proposalDisposed || !this.$refs.tableListRef) return
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
|
||||
+65
-46
@@ -73,25 +73,29 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<!-- <van-field v-if="false" label="签字" name="approvalSignature" v-model="formData.signature" required class="direction-column-field">-->
|
||||
<!-- <h5-signature v-if="false" v-model="formData.approvalSignature" slot="input"></h5-signature>-->
|
||||
<!-- </van-field>-->
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(20)" :loading="formLoading && formAction === ('handleTaskAction:' + 20)" loading-text="提交中…" :disabled="$root.proposalSubmitting">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" loading-text="提交中…" :disabled="$root.proposalSubmitting">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
activeTab: "inviteSeconded",
|
||||
@@ -217,6 +221,7 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
@@ -258,63 +263,77 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
if (this.activeTab === "inviteSeconded") {
|
||||
this.handleInviteSeconded(val)
|
||||
} else {
|
||||
this.handlePositiveSeconded(val)
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
handleTaskAction(val) {
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
if (this.activeTab === "inviteSeconded") {
|
||||
return this.handleInviteSeconded(val)
|
||||
} else {
|
||||
return this.handlePositiveSeconded(val)
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
|
||||
// 受邀附议先走流程任务提交,再回写附议结果,与 PC 端保持一致。
|
||||
handleInviteSeconded(val) {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({ ...this.formData, submitType: val })
|
||||
})
|
||||
.then((res) => {
|
||||
// WF 已办理后只回写附议结果;第二步失败不得再次执行已完成的 WF 任务。
|
||||
return this.updateSecond(val)
|
||||
.then(() => {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.fail("流程已办理,但附议结果同步失败,请刷新核对,勿重复提交")
|
||||
this.doSearch()
|
||||
throw error
|
||||
})
|
||||
})
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
this.updateSecond(val)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handlePositiveSeconded(val) {
|
||||
this.$axios.post("/platform/proposal/positiveSeconded/handle", {
|
||||
proposalId: this.row.id,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: val
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
return this.$axios
|
||||
.post("/platform/proposal/positiveSeconded/handle", {
|
||||
proposalId: this.row.id,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: val
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
updateSecond(submitType) {
|
||||
this.$axios.post("/platform/proposal/seconded/updateInfo", {
|
||||
return this.$axios.post("/platform/proposal/seconded/updateInfo", {
|
||||
proposalId: this.row.id,
|
||||
taskActorUserId: this.row.taskActorUserId,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: submitType,
|
||||
submitType: submitType
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
+38
-25
@@ -70,7 +70,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="showPicker = true"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -87,11 +87,11 @@ layout("/layouts/platform_h5.html"){
|
||||
:rules="[{ required: true, message: '必填' }]"
|
||||
required
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block @click="">取消</van-button>
|
||||
<van-button type="primary" block @click="doSubmit">提交</van-button>
|
||||
<van-button block @click="" :disabled="$root.proposalSubmitting">取消</van-button>
|
||||
<van-button type="primary" block @click="doSubmit" :loading="formLoading && formAction === ('doSubmit')" loading-text="提交中…" :disabled="$root.proposalSubmitting">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
@@ -103,7 +103,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>{{ '意见' + (index + 1) }}</div>
|
||||
<div>
|
||||
<van-button type="danger" @click="onDelete(item)" size="small">删除</van-button>
|
||||
<van-button type="danger" @click="onDelete(item)" size="small" :disabled="$root.proposalSubmitting">删除</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -120,14 +120,19 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
dicts: ["UNDERTAKE_SUGGESTION"],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
proposalPopupFields: ["showPicker", "visible"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -151,7 +156,8 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
methods: {
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
}).then(() => {
|
||||
@@ -203,32 +209,39 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
proposalId: row.id,
|
||||
proposalId: row.id
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/suggestion/suggest", this.formData)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
doSubmit() {
|
||||
return this.runProposalSubmit("doSubmit", async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
return this.$axios.post("/platform/proposal/suggestion/suggest", this.formData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
} catch (error) {}
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
doSearch() {
|
||||
|
||||
+61
-43
@@ -65,7 +65,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-form ref="formRef">
|
||||
<van-field :value="formData.underTakeName"
|
||||
label="承办单位"
|
||||
readonly></van-field>
|
||||
readonly :disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.tf_implementStateName"
|
||||
@@ -76,7 +76,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="showImplementPicker = true"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showImplementPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -95,7 +95,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<van-field
|
||||
v-if="supportCandidate && formData.underTakeIsMaster"
|
||||
@@ -107,7 +107,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
@click="showCandidatesPicker = true"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showCandidatesPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -119,22 +119,27 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block @click="$refs.proposalInfoRef.onClose()">取消</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">提交</van-button>
|
||||
<van-button block @click="$refs.proposalInfoRef.onClose()" :disabled="$root.proposalSubmitting">取消</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)" :loading="formLoading && formAction === ('handleTaskAction:' + 1)" loading-text="提交中…" :disabled="$root.proposalSubmitting">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
<transfer ref="transferRef"></transfer>
|
||||
<transfer ref="transferRef" @refresh="doSearch"></transfer>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("transfer.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
proposalH5: true,
|
||||
dicts: ['PROPOSAL_REPLY_IMPLEMENT'],
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
proposalPopupFields: ["showImplementPicker", "showCandidatesPicker"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -185,7 +190,8 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
@@ -226,56 +232,68 @@ layout("/layouts/platform_h5.html"){
|
||||
this.showCandidatesPicker = false
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
delete this.formData.underTakeIsMaster
|
||||
delete this.formData.underTakeName
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
handleTaskAction(val) {
|
||||
return this.runProposalSubmit("handleTaskAction" + ":" + val, async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
delete this.formData.underTakeIsMaster
|
||||
delete this.formData.underTakeName
|
||||
return this.$axios
|
||||
.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
.catch(() => {})
|
||||
} catch (error) {}
|
||||
})
|
||||
},
|
||||
|
||||
// row 提供当前记录的流程任务 ID;确认与请求共用办理锁,离开页面后不再刷新旧表格。
|
||||
onRevoke(row) {
|
||||
return this.runProposalSubmit("onRevoke", () => {
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
if (this.proposalDisposed) return
|
||||
return this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
// code 为 0 表示撤回成功;已销毁页面不提示、不访问失效的组件引用。
|
||||
if (res.code === 0 && !this.proposalDisposed) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 打开转办
|
||||
openTransfer(row){
|
||||
openTransfer(row) {
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$refs.transferRef.openTransfer(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
// nextTick 执行前页面可能已被 PJAX 替换,不能访问已销毁的表格。
|
||||
if (this.proposalDisposed || !this.$refs.tableListRef) return
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
|
||||
+42
-26
@@ -10,7 +10,7 @@ const transfer = {
|
||||
</div>
|
||||
|
||||
<!-- 用户选择 -->
|
||||
<van-field v-model="searchKeyword" label="转交给" placeholder="搜索用户" required readonly @click="showUserList=true"></van-field>
|
||||
<van-field v-model="searchKeyword" label="转交给" placeholder="搜索用户" required readonly @click="showUserList=true" :disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showUserList" position="bottom">
|
||||
<van-search v-model="keyword" placeholder="搜索用户" @search="selectTransferUser(keyword)" @cancel="showUserList=false"></van-search>
|
||||
<van-empty v-if="transferUserOptions.length === 0" class="empty-tip">请搜索需要转办的用户</van-empty>
|
||||
@@ -19,12 +19,14 @@ const transfer = {
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="button-group">
|
||||
<van-button block plain @click="showTransferDialog = false" class="cancel-btn">取消</van-button>
|
||||
<van-button block type="info" @click="handleTransfer" class="submit-btn">提交</van-button>
|
||||
<van-button block plain @click="$set(this, 'showTransferDialog', false)" class="cancel-btn" :disabled="$root.proposalSubmitting">取消</van-button>
|
||||
<van-button block type="info" @click="handleTransfer" class="submit-btn" :loading="formLoading && formAction === ('handleTransfer')" loading-text="提交中…" :disabled="$root.proposalSubmitting">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
proposalPopupFields: ["showTransferDialog", "showUserList"],
|
||||
data() {
|
||||
return {
|
||||
showTransferDialog: false,
|
||||
@@ -37,9 +39,15 @@ const transfer = {
|
||||
},
|
||||
methods: {
|
||||
openTransfer(row) {
|
||||
this.showTransferDialog = true
|
||||
this.transferForm = { taskId: row.taskId, name: row.name, code: row.code, delegationName: row.delegationName }
|
||||
this.searchKeyword = ''
|
||||
if (this.$root.proposalSubmitting) return
|
||||
this.$set(this, "showTransferDialog", true)
|
||||
this.$set(this, "transferForm", {
|
||||
taskId: row.taskId,
|
||||
name: row.name,
|
||||
code: row.code,
|
||||
delegationName: row.delegationName
|
||||
})
|
||||
this.$set(this, "searchKeyword", "")
|
||||
},
|
||||
selectUser(item) {
|
||||
this.transferForm.userId = item.id
|
||||
@@ -54,29 +62,37 @@ const transfer = {
|
||||
|
||||
// 转办
|
||||
handleTransfer() {
|
||||
if (!this.transferForm.userId) {
|
||||
this.$toast('请选择转交用户')
|
||||
return
|
||||
}
|
||||
return this.runProposalSubmit("handleTransfer", () => {
|
||||
if (!this.transferForm.userId) {
|
||||
this.$toast("请选择转交用户")
|
||||
return
|
||||
}
|
||||
|
||||
const transferUserName = this.transferUserOptions.find(item => item.id === this.transferForm.userId)?.username
|
||||
const name = this.transferForm.name
|
||||
const transferUserName = this.transferUserOptions.find(
|
||||
(item) => item.id === this.transferForm.userId
|
||||
)?.username
|
||||
const name = this.transferForm.name
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: `您确定要将` + name + `提案转交给` + transferUserName + `办理吗?`,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/unitReply/transfer', this.transferForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.showTransferDialog = false
|
||||
this.doSearch()
|
||||
}
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要将" + name + "提案转交给" + transferUserName + "办理吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
})
|
||||
}).catch(() => {
|
||||
// 取消操作
|
||||
.then(() => {
|
||||
return this.$axios.post("/platform/proposal/unitReply/transfer", this.transferForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$toast.success(res.msg)
|
||||
this.$set(this, "showTransferDialog", false)
|
||||
this.$emit("refresh")
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// 取消操作
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
+4
@@ -45,11 +45,15 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
// 查看详情也需要同步弹框历史,返回键先关闭详情而非离开列表。
|
||||
proposalH5: true,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
|
||||
+137
-129
@@ -100,14 +100,14 @@ layout("/layouts/platform_h5.html"){
|
||||
label="代表姓名"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请填写提案人' }]"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.createTime"
|
||||
label="提案时间"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请填写提案时间' }]"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.sessionName"
|
||||
@@ -118,7 +118,7 @@ layout("/layouts/platform_h5.html"){
|
||||
placeholder="请选择所属教代会"
|
||||
@click="showSessionPicker = true"
|
||||
:rules="[{ required: true, message: '请选择所属教代会' }]"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showSessionPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -133,7 +133,7 @@ layout("/layouts/platform_h5.html"){
|
||||
label="所属代表团"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请选择所属代表团' }]"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<van-field
|
||||
v-if="formData.mannerCode=='W03'"
|
||||
@@ -145,7 +145,7 @@ layout("/layouts/platform_h5.html"){
|
||||
placeholder="请选择所属委员会"
|
||||
@click="showCommitteePicker = true"
|
||||
:rules="[{ required: true, message: '请选择所属委员会' }]"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showCommitteePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -161,7 +161,7 @@ layout("/layouts/platform_h5.html"){
|
||||
label="单位"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请填写单位' }]"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
@@ -169,7 +169,7 @@ layout("/layouts/platform_h5.html"){
|
||||
type="tel"
|
||||
placeholder="请输入联系电话"
|
||||
:rules="[{ required: true, message: '请填写联系电话' }]"
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
@@ -183,7 +183,7 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.sourceName"
|
||||
@@ -195,7 +195,7 @@ layout("/layouts/platform_h5.html"){
|
||||
@click="showSourcePicker = true"
|
||||
:rules="[{ required: true, message: '请选择提案方式' }]"
|
||||
required
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showSourcePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -215,7 +215,7 @@ layout("/layouts/platform_h5.html"){
|
||||
@click="showTypePicker = true"
|
||||
:rules="[{ required: true, message: '请选择提案类别' }]"
|
||||
required
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
<van-popup v-model="showTypePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
@@ -226,7 +226,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
:value="formData.suggestUnits.length > 0 ? formData.suggestUnits.join(', ') : ''"
|
||||
:value="formData.suggestUnits.length :disabled="$root.proposalSubmitting"> 0 ? formData.suggestUnits.join(', ') : ''"
|
||||
is-link
|
||||
readonly
|
||||
name="suggestUnits"
|
||||
@@ -304,7 +304,7 @@ layout("/layouts/platform_h5.html"){
|
||||
placeholder="请输入案由"
|
||||
:rules="[{ required: true, message: '请填写案由' }]"
|
||||
required
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.measures"
|
||||
@@ -315,13 +315,13 @@ layout("/layouts/platform_h5.html"){
|
||||
placeholder="请输入建议措施"
|
||||
:rules="[{ required: true, message: '请填写建议措施' }]"
|
||||
required
|
||||
></van-field>
|
||||
:disabled="$root.proposalSubmitting"></van-field>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<!-- 附件上传 -->
|
||||
<van-cell-group title="附件上传" class="form-group">
|
||||
<van-field label="附件" name="files" class="direction-column-field">
|
||||
<van-field label="附件" name="files" class="direction-column-field" :disabled="$root.proposalSubmitting">
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.files"
|
||||
@@ -336,9 +336,9 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions" v-if="isWriteTime">
|
||||
<van-button plain type="info" @click="onSave">保存</van-button>
|
||||
<van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button>
|
||||
<van-button type="primary" @click="onSubmitAgain" v-else>提交</van-button>
|
||||
<van-button plain type="info" @click="onSave" :loading="formLoading && formAction === ('onSave')" loading-text="提交中…" :disabled="$root.proposalSubmitting">保存</van-button>
|
||||
<van-button type="primary" @click="onSubmit" v-if="!taskId" :loading="formLoading && formAction === ('onSubmit')" loading-text="提交中…" :disabled="$root.proposalSubmitting">提交</van-button>
|
||||
<van-button type="primary" @click="onSubmitAgain" v-else :loading="formLoading && formAction === ('onSubmitAgain')" loading-text="提交中…" :disabled="$root.proposalSubmitting">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
@@ -353,9 +353,14 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/submit.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
proposalH5: true,
|
||||
mixins: [PROPOSAL_SUBMIT_MIXIN],
|
||||
proposalPopupFields: ["showSessionPicker", "showCommitteePicker", "showSourcePicker", "showTypePicker", "showSuggestionUnitPicker", "noticeDialogVisible"],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
@@ -462,131 +467,134 @@ layout("/layouts/platform_h5.html"){
|
||||
this.showCommitteePicker = false;
|
||||
},
|
||||
|
||||
async onSave() {
|
||||
// 表单验证
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
onSave() {
|
||||
return this.runProposalSubmit("onSave", async () => {
|
||||
// 表单验证
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
|
||||
this.$toast.loading({
|
||||
message: '保存中...',
|
||||
forbidClick: true,
|
||||
});
|
||||
|
||||
this.$axios.post("/platform/proposal/write/save", {info: JSON.stringify(this.formData)})
|
||||
.then((res) => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg);
|
||||
pjaxReplace('/platform/proposal/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '保存失败');
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
} catch (error) {
|
||||
// 表单验证失败
|
||||
console.log('表单验证失败', error);
|
||||
}
|
||||
return this.$axios
|
||||
.post("/platform/proposal/write/save", { info: JSON.stringify(this.formData) })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$toast.success(res.msg)
|
||||
pjaxReplace("/platform/proposal/mine/h5")
|
||||
})
|
||||
} else {
|
||||
this.$toast.fail(res.msg || "保存失败")
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$toast.fail("网络错误,请稍后重试")
|
||||
})
|
||||
} catch (error) {
|
||||
// 表单验证失败
|
||||
console.log("表单验证失败", error)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
onSubmit() {
|
||||
return this.runProposalSubmit("onSubmit", async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$toast("请填写提案名称");
|
||||
return;
|
||||
}
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$toast("请填写提案名称")
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$toast("案由" + this.proposalConfig.briefMinLength + "字");
|
||||
return;
|
||||
}
|
||||
if (this.formData.brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$toast("案由" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$toast.loading({
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
});
|
||||
|
||||
this.$axios.post('/platform/proposal/write/submit', {info: JSON.stringify(this.formData)})
|
||||
.then(res => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功");
|
||||
pjaxReplace('/platform/proposal/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '提交失败');
|
||||
}
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/write/submit", { info: JSON.stringify(this.formData) })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$toast.success("提交成功")
|
||||
pjaxReplace("/platform/proposal/mine/h5")
|
||||
})
|
||||
} else {
|
||||
this.$toast.fail(res.msg || "提交失败")
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$toast.fail("网络错误,请稍后重试")
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
}).catch(() => {
|
||||
// 取消提交
|
||||
});
|
||||
} catch (error) {
|
||||
// 表单验证失败
|
||||
console.log('表单验证失败', error);
|
||||
}
|
||||
.catch(() => {
|
||||
// 取消提交
|
||||
})
|
||||
} catch (error) {
|
||||
// 表单验证失败
|
||||
console.log("表单验证失败", error)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 重新提交
|
||||
async onSubmitAgain() {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
onSubmitAgain() {
|
||||
return this.runProposalSubmit("onSubmitAgain", async () => {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$toast("请填写提案名称");
|
||||
return;
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$toast("请填写提案名称")
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$toast("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
|
||||
return this.proposalConfirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
})
|
||||
.then(() => {
|
||||
return this.$axios
|
||||
.post("/platform/proposal/write/submitAgain", {
|
||||
info: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
return this.finishProposalSubmit(() => {
|
||||
this.$toast.success("提交成功")
|
||||
return new Promise((resolve) =>
|
||||
setTimeout(() => {
|
||||
pjaxReplace("/platform/proposal/mine/h5")
|
||||
resolve()
|
||||
}, 1500)
|
||||
)
|
||||
})
|
||||
} else {
|
||||
this.$toast.fail(res.msg || "提交失败")
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$toast.fail("网络错误,请稍后重试")
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// 取消提交
|
||||
})
|
||||
} catch (error) {
|
||||
// 表单验证失败
|
||||
console.log("表单验证失败", error)
|
||||
}
|
||||
|
||||
if (this.formData.brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$toast("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字");
|
||||
return;
|
||||
}
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$toast.loading({
|
||||
message: '提交中...',
|
||||
forbidClick: true,
|
||||
});
|
||||
|
||||
this.$axios.post('/platform/proposal/write/submitAgain', {
|
||||
info: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功");
|
||||
setTimeout(() => {
|
||||
pjaxReplace('/platform/proposal/mine/h5')
|
||||
}, 1500);
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '提交失败');
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
}).catch(() => {
|
||||
// 取消提交
|
||||
});
|
||||
} catch (error) {
|
||||
// 表单验证失败
|
||||
console.log('表单验证失败', error);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取提案类别
|
||||
|
||||
Reference in New Issue
Block a user