diff --git a/src/main/java/cn/palmte/work/service/ProjectProcessService.java b/src/main/java/cn/palmte/work/service/ProjectProcessService.java index 67cc405..da74f32 100644 --- a/src/main/java/cn/palmte/work/service/ProjectProcessService.java +++ b/src/main/java/cn/palmte/work/service/ProjectProcessService.java @@ -133,20 +133,30 @@ public class ProjectProcessService { * 更新流程 审批人,和状态 * * @param processId 流程Id - * @param auditId 审批人ID + * @param auditId 审批人ID 可以为空 * @param status 流程状态 可以为空,为空的时候不修改 */ public void updateAudit(int processId, ProcessStatus status, List auditId) { - String currentAudit = getCurrentAudit(auditId); - String currentAuditId = auditId.stream().map(String::valueOf).collect(Collectors.joining(",")); - if (status != null) { - if (!CollectionUtils.isEmpty(auditId)) { - jdbcTemplate.update( - "update project_process set current_audit=?,current_audit_id=?,status=? where id=?", currentAudit, currentAuditId, status.getValue(), processId); + if (CollectionUtils.isEmpty(auditId)) { + if (status != null) { + jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=?,status=? where id=?", + null, null, status.getValue(), processId); + } + else { + jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=? where id=?", + null, null, processId); } } else { - jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=? where id=?", currentAudit, currentAuditId, processId); + String currentAudit = getCurrentAudit(auditId); + String currentAuditId = auditId.stream().map(String::valueOf).collect(Collectors.joining(",")); + if (status != null) { + jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=?,status=? where id=?", + currentAudit, currentAuditId, status.getValue(), processId); + } + else { + jdbcTemplate.update("update project_process set current_audit=?,current_audit_id=? where id=?", currentAudit, currentAuditId, processId); + } } } diff --git a/src/main/resources/templates/admin/business/process-completed.ftl b/src/main/resources/templates/admin/business/process-completed.ftl index b0045e7..8cdd13f 100644 --- a/src/main/resources/templates/admin/business/process-completed.ftl +++ b/src/main/resources/templates/admin/business/process-completed.ftl @@ -88,7 +88,7 @@ - + - + + + diff --git a/src/main/resources/templates/admin/business/process-detail.ftl b/src/main/resources/templates/admin/business/process-detail.ftl index 5ae1ee4..1f91898 100644 --- a/src/main/resources/templates/admin/business/process-detail.ftl +++ b/src/main/resources/templates/admin/business/process-detail.ftl @@ -54,12 +54,12 @@ {{process.projectNo}} - {{process.projectTitle}} + {{process.projectTitle}} {{process.applyDate}} ${projectType} ${cooperationType} - {{process.applyDept}} + {{process?.applyDept?.split(',').join('/')}} {{process.applyPersonName}} {{process.applyDeptLeaderName}} {{contract.applyPersonPhone}} @@ -94,7 +94,8 @@ {{process.taxRate}}% ${isPrepaid} - ${repaidAmount}元 + ${repaidAmount}元 + ${project.grossProfitMargin} diff --git a/src/main/resources/templates/admin/business/process-edit.ftl b/src/main/resources/templates/admin/business/process-edit.ftl index 7711efa..e0e5837 100644 --- a/src/main/resources/templates/admin/business/process-edit.ftl +++ b/src/main/resources/templates/admin/business/process-edit.ftl @@ -76,7 +76,7 @@ {{processForm.projectNo}} - + {{processForm.projectTitle}} @@ -364,7 +364,7 @@ @@ -628,6 +628,17 @@ } return true }, + + /** + * 处理 质保期 + * @param row 数据行 + */ + updateExpirationDate(row) { + if (row.expirationDate) { + row.expirationDate = row.expirationDate.replace(/[^\d\u4E00-\u9FA5]/g, '') + } + }, + /** * 保存 业务采购合同清单明细,返回上一级的表单界面 */ diff --git a/src/main/resources/templates/admin/business/process-new.ftl b/src/main/resources/templates/admin/business/process-new.ftl index 0c87e2f..5bc908f 100644 --- a/src/main/resources/templates/admin/business/process-new.ftl +++ b/src/main/resources/templates/admin/business/process-new.ftl @@ -112,7 +112,7 @@ - + @@ -181,7 +181,7 @@ - + {{processForm.projectTitle}} 未选择项目 @@ -474,7 +474,7 @@ @@ -928,7 +928,9 @@ this.projectSelected = true let indexCounter = 1; this.incomeDetails = incomeDetails && incomeDetails.map(detail => ({ - ...detail, type: computeType(detail.type), index: indexCounter++ // 用于记录序号,展示或者定位 + ...detail, type: computeType(detail.type), + expirationDate: null, // 质保期需要全部重新填写 + index: indexCounter++ // 用于记录序号,展示或者定位 })) let rowKey = 0 @@ -1173,6 +1175,17 @@ } return true }, + + /** + * 处理 质保期 + * @param row 数据行 + */ + updateExpirationDate(row) { + if (row.expirationDate) { + row.expirationDate = row.expirationDate.replace(/[^\d\u4E00-\u9FA5]/g, '') + } + }, + /** * 保存销售合同详情数据,并返回表单界面 */ diff --git a/src/main/resources/templates/admin/business/process-review.ftl b/src/main/resources/templates/admin/business/process-review.ftl index 7538280..c3341d8 100644 --- a/src/main/resources/templates/admin/business/process-review.ftl +++ b/src/main/resources/templates/admin/business/process-review.ftl @@ -78,7 +78,7 @@ - +