feat(project): 提交审核时添加备注功能
- 在项目预算编辑页面添加备注输入框 - 提交审核时将备注信息传递给后端 - 后端接收并处理备注信息,将其添加到审批流程中 - 修改相关服务方法以支持备注功能dev_2.0.3
parent
9edd5f13f0
commit
d02ce1738d
|
|
@ -258,6 +258,16 @@ public class ProjectBudget {
|
|||
|
||||
@Transient
|
||||
private String advancePeakAmountRoundBudget;
|
||||
@Transient
|
||||
private String approveRemark;
|
||||
|
||||
public String getApproveRemark() {
|
||||
return approveRemark;
|
||||
}
|
||||
|
||||
public void setApproveRemark(String approveRemark) {
|
||||
this.approveRemark = approveRemark;
|
||||
}
|
||||
|
||||
public String getCostDetailAttrName() {
|
||||
return costDetailAttrName;
|
||||
|
|
|
|||
|
|
@ -101,6 +101,10 @@ public class ActProcInsService {
|
|||
|
||||
String taskId = task.getId();
|
||||
String comment = "提交" + processDefinition.getName();
|
||||
Object message = variables.get("message");
|
||||
if (message != null && StringUtils.isNotEmpty(message.toString())) {
|
||||
comment = comment+"-"+message;
|
||||
}
|
||||
Authentication.setAuthenticatedUserId(adminId);
|
||||
taskService.addComment(taskId, procInsId, comment);
|
||||
|
||||
|
|
|
|||
|
|
@ -1053,11 +1053,14 @@ public class ProjectBudgetService {
|
|||
|
||||
saveProjectExtend(projectInDb);
|
||||
|
||||
budgetApprove(approveStatusBudget, projectInDb, admin);
|
||||
Map<String,Object> paramMap = new HashMap<String,Object>() {{
|
||||
put("message", projectBudget.getApproveRemark());
|
||||
}};
|
||||
budgetApprove(approveStatusBudget, projectInDb, admin,paramMap);
|
||||
}
|
||||
|
||||
public void budgetApprove(Integer approveStatusBudget, Project projectInDb, Admin admin) throws Exception {
|
||||
projectInstanceService.startFourcalProcess(projectInDb, ActProcessKeyEnum.BUDGET);
|
||||
public void budgetApprove(Integer approveStatusBudget, Project projectInDb, Admin admin,Map<String,Object> paramMap) throws Exception {
|
||||
projectInstanceService.startFourcalProcess(projectInDb, ActProcessKeyEnum.BUDGET,paramMap);
|
||||
// int type = projectInDb.getType();
|
||||
// List<SysUserRole> userIds = new ArrayList<>();
|
||||
// if (type == 1) {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,14 @@ public class ProjectInstanceService {
|
|||
* @throws Exception
|
||||
*/
|
||||
public void startFourcalProcess(Project project, ActProcessKeyEnum keyEnum) throws Exception {
|
||||
startFourcalProcess(project, keyEnum, null);
|
||||
}
|
||||
|
||||
public void startFourcalProcess(Project project, ActProcessKeyEnum keyEnum, Map<String, Object> paramMap) throws Exception {
|
||||
HashMap<String, Object> variables = new HashMap<>();
|
||||
if (paramMap != null) {
|
||||
variables.putAll(paramMap);
|
||||
}
|
||||
variables.put(ActConstant.KEY_PROJECT_TYPE, project.getType());
|
||||
ProjectBudget firstByProjectId = projectBudgetRepository.findFirstByProjectId(project.getId());
|
||||
variables.put(ActConstant.KEY_RESOLVE_PLAN_SYNERGY, firstByProjectId.getResolvePlanSynergy());
|
||||
|
|
|
|||
|
|
@ -830,7 +830,7 @@ public class ProjectService {
|
|||
} else if (project.getApproveStatusBudget() == ApproveStatusEnum.APPROVAL_UNCOMMIT.getApproveStatus()) {
|
||||
Integer approveStatusBudget = project.getApproveStatusBudget();
|
||||
|
||||
projectBudgetService.budgetApprove(approveStatusBudget, project, admin);
|
||||
projectBudgetService.budgetApprove(approveStatusBudget, project, admin,null);
|
||||
project.setApproveStatusBudget(ApproveStatusEnum.APPROVAL_PENDING.getApproveStatus());
|
||||
} else if (project.getApproveStatusSettle() == ApproveStatusEnum.APPROVAL_UNCOMMIT.getApproveStatus()) {
|
||||
projectInstanceService.startFourcalProcess(project, ActProcessKeyEnum.SETTLE);
|
||||
|
|
|
|||
|
|
@ -249,6 +249,25 @@ $(function () {
|
|||
$("#pmsForm").submit();
|
||||
|
||||
|
||||
});
|
||||
$("#saveApprovePre").click(async function () {
|
||||
const _that=this
|
||||
$('#my-message-modal').modal({
|
||||
relatedTarget: this,
|
||||
closeOnConfirm: false,
|
||||
onConfirm: function (e) {
|
||||
let val = $('#approve-remark').val().trim();
|
||||
if (!val && val.length<=0){
|
||||
parent.layer.msg("备注必填");
|
||||
return
|
||||
}
|
||||
$('#my-message-modal').modal('close')
|
||||
$("#saveApprove").click()
|
||||
},
|
||||
onCancel: function (e) {
|
||||
$('#my-message-modal').modal('close')
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#saveApprove").click(async function () {
|
||||
$("#saveApprove").attr('disabled', true);
|
||||
|
|
|
|||
|
|
@ -522,10 +522,11 @@
|
|||
<td class="table-title" colspan="2">
|
||||
<select data-am-selected="{btnSize: 'sm',btnWidth: '80%',searchBox: 1}"
|
||||
id="resolvePlanSynergy" name="resolvePlanSynergy">
|
||||
<option value="true" <#if projectBudget.resolvePlanSynergy==true>selected</#if>>是
|
||||
</option>
|
||||
<option value="false" <#if projectBudget.resolvePlanSynergy==false>selected</#if>>否
|
||||
</option>
|
||||
<option value="true" <#if projectBudget.resolvePlanSynergy==true>selected</#if>>是
|
||||
</option>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -2302,14 +2303,37 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div class="am-modal am-modal-prompt" style="width: 600px;max-height:600px;overflow-y:auto;"
|
||||
tabindex="-1" id="my-message-modal">
|
||||
<div class="am-modal-dialog">
|
||||
<div class="modal-content" style="margin:0px 20px" >
|
||||
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myModalLabel">请填写备注</h4>
|
||||
</div>
|
||||
<div class="am-g am-form-group am-margin-top" style="display: flex;">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right">
|
||||
<span style="color: red;">*</span>备注
|
||||
</div>
|
||||
<div class="am-u-sm-8 am-u-md-8">
|
||||
<textarea id="approve-remark" name="approveRemark" minlength="10" maxlength="200"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="am-btn am-btn-default am-btn-xs" data-am-modal-cancel>关闭</button>
|
||||
<button type="button" class="am-btn am-btn-primary am-btn-xs" data-am-modal-confirm>提交审核</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--选项卡(tabs)end-->
|
||||
<div class="am-margin" style="position: relative">
|
||||
<button type="button" class="am-btn am-btn-warning am-btn-xs" onclick="javascript:history.go(-1);">
|
||||
返回上一级
|
||||
</button>
|
||||
<button type="button" class="am-btn am-btn-primary am-btn-xs" id="saveDraft">保存草稿</button>
|
||||
<button type="button" class="am-btn am-btn-primary am-btn-xs" id="saveApprove">提交审核</button>
|
||||
<button type="button" class="am-btn am-btn-primary am-btn-xs" id="saveApprovePre">提交审核</button>
|
||||
<input type="hidden" class="am-btn am-btn-primary am-btn-xs" id="saveApprove" value="提交审核"/>
|
||||
<#-- <div id="planTbodyScroll">-->
|
||||
<#-- <div id="planTbodyScrollContent"></div>-->
|
||||
<#-- </div>-->
|
||||
|
|
@ -2321,7 +2345,7 @@
|
|||
</script>
|
||||
<script src="${base}/layui/layui.js"></script>
|
||||
<script src="${base}/assets/js/project_common.js"></script>
|
||||
<script src="${base}/assets/js/project_budget.js"></script>
|
||||
<script src="${base}/assets/js/project_budget.js?v=23232"></script>
|
||||
<script src="${base}/assets/js/project_budget_income.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_income_plan.js"></script>
|
||||
<script src="${base}/assets/js/project_budget_cost.js">
|
||||
|
|
|
|||
Loading…
Reference in New Issue