diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java index 2b2e881..7d44614 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java @@ -3,8 +3,10 @@ package com.ruoyi.web.controller.technicalConfirm; import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.technicalConfirm.domain.QuotJsqr; +import com.ruoyi.technicalConfirm.domain.QuotJsqrXzDetail; import com.ruoyi.technicalConfirm.service.IQuotJsqrService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -100,77 +102,151 @@ public class QuotJsqrController extends BaseController @PreAuthorize("@ss.hasPermi('jsqr:jsqr:query')") @Log(title = "报价单-技术确认单协助操作", businessType = BusinessType.UPDATE) @PostMapping("/doOperate") - public AjaxResult doOperate(HttpServletResponse response, String quotJsxzGroup,String type,String state, String quotJsqrId) + public AjaxResult doOperate(HttpServletResponse response, @RequestBody QuotJsqrXzDetail info) { QuotJsqr quotJsqr = new QuotJsqr(); + String quotJsqrId = info.getQuotJsqrId(); quotJsqr.setQuotJsqrId(quotJsqrId); + + String quotJsxzGroup = info.getQuotJsxzGroup(); + String type = info.getType(); + String state = info.getState(); + if("TL".equals(quotJsxzGroup)){ if("operater".equals(type)){ quotJsqr.setQuotJsqrTlOperateUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrTlOperateTime(DateUtils.getTime()); quotJsqr.setQuotJsqrTlOperateState(state); + if("3".equals(state)){//驳回 + quotJsqr.setQuotJsqrTlApprovalStatus("3");//特缆协助状态 设置为 驳回 + } } if("checker".equals(type)){ quotJsqr.setQuotJsqrTlCheckUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrTlCheckTime(DateUtils.getTime()); quotJsqr.setQuotJsqrTlCheckState(state); + if("3".equals(state)){//驳回 + String quotJsqrTlCheckRemark = info.getQuotJsqrTlCheckRemark(); + if(StringUtils.isEmpty(quotJsqrTlCheckRemark)){ + return error("特缆审核意见不能为空"); + } + quotJsqr.setQuotJsqrTlOperateState("0");//特缆操作状态 设置为 待通过 + } } if("leader".equals(type)){ quotJsqr.setQuotJsqrTlLeaderUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrTlLeaderTime(DateUtils.getTime()); quotJsqr.setQuotJsqrTlLeaderState(state); - //TODO 协助状态更新 + if("3".equals(state)){//驳回 + String quotJsqrTlLeaderRemark = info.getQuotJsqrTlLeaderRemark(); + if(StringUtils.isEmpty(quotJsqrTlLeaderRemark)){ + return error("特缆组长确认意见不能为空"); + } + quotJsqr.setQuotJsqrTlOperateState("0");//特缆操作状态 设置为 待通过 + quotJsqr.setQuotJsqrTlCheckState("0");//特缆审核状态 设置为 待通过 + } } }else if("DY".equals(quotJsxzGroup)){ if("operater".equals(type)){ quotJsqr.setQuotJsqrDyOperateUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrDyOperateTime(DateUtils.getTime()); quotJsqr.setQuotJsqrDyOperateState(state); + if("3".equals(state)){//驳回 + quotJsqr.setQuotJsqrDyApprovalStatus("3");//低压协助状态 设置为 驳回 + } } if("checker".equals(type)){ quotJsqr.setQuotJsqrDyCheckUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrDyCheckTime(DateUtils.getTime()); quotJsqr.setQuotJsqrDyCheckState(state); + if("3".equals(state)){//驳回 + String quotJsqrDyCheckRemark = info.getQuotJsqrDyCheckRemark(); + if(StringUtils.isEmpty(quotJsqrDyCheckRemark)){ + return error("低压审核意见不能为空"); + } + quotJsqr.setQuotJsqrDyOperateState("0");//低压操作状态 设置为 待通过 + } } if("leader".equals(type)){ quotJsqr.setQuotJsqrDyLeaderUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrDyLeaderTime(DateUtils.getTime()); quotJsqr.setQuotJsqrDyLeaderState(state); - //TODO 协助状态更新 + if("3".equals(state)){//驳回 + String quotJsqrDyLeaderRemark = info.getQuotJsqrDyLeaderRemark(); + if(StringUtils.isEmpty(quotJsqrDyLeaderRemark)){ + return error("低压组长确认意见不能为空"); + } + quotJsqr.setQuotJsqrDyOperateState("0");//低压操作状态 设置为 待通过 + quotJsqr.setQuotJsqrDyCheckState("0");//低压审核状态 设置为 待通过 + } } }else if("ZY".equals(quotJsxzGroup)){ if("operater".equals(type)){ quotJsqr.setQuotJsqrZyOperateUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrZyOperateTime(DateUtils.getTime()); quotJsqr.setQuotJsqrZyOperateState(state); + if("3".equals(state)){//驳回 + quotJsqr.setQuotJsqrZyApprovalStatus("3");//中压协助状态 设置为 驳回 + } } if("checker".equals(type)){ quotJsqr.setQuotJsqrZyCheckUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrZyCheckTime(DateUtils.getTime()); quotJsqr.setQuotJsqrZyCheckState(state); + if("3".equals(state)){//驳回 + String quotJsqrZyCheckRemark = info.getQuotJsqrZyCheckRemark(); + if(StringUtils.isEmpty(quotJsqrZyCheckRemark)){ + return error("中压审核意见不能为空"); + } + quotJsqr.setQuotJsqrZyOperateState("0");//中压操作状态 设置为 待通过 + } } if("leader".equals(type)){ quotJsqr.setQuotJsqrZyLeaderUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrZyLeaderTime(DateUtils.getTime()); quotJsqr.setQuotJsqrZyLeaderState(state); - //TODO 协助状态更新 + if("3".equals(state)){//驳回 + String quotJsqrZyLeaderRemark = info.getQuotJsqrZyLeaderRemark(); + if(StringUtils.isEmpty(quotJsqrZyLeaderRemark)){ + return error("中压组长确认意见不能为空"); + } + quotJsqr.setQuotJsqrZyOperateState("0");//中压操作状态 设置为 待通过 + quotJsqr.setQuotJsqrZyCheckState("0");//中压审核状态 设置为 待通过 + } } }else if("QT".equals(quotJsxzGroup)){ if("operater".equals(type)){ quotJsqr.setQuotJsqrQtOperateUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrQtOperateTime(DateUtils.getTime()); quotJsqr.setQuotJsqrQtOperateState(state); + if("3".equals(state)){//驳回 + quotJsqr.setQuotJsqrQtApprovalStatus("3");//其他协助状态 设置为 驳回 + } } if("checker".equals(type)){ quotJsqr.setQuotJsqrQtCheckUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrQtCheckTime(DateUtils.getTime()); quotJsqr.setQuotJsqrQtCheckState(state); + if("3".equals(state)){//驳回 + String quotJsqrQtCheckRemark = info.getQuotJsqrQtCheckRemark(); + if(StringUtils.isEmpty(quotJsqrQtCheckRemark)){ + return error("其他审核意见不能为空"); + } + quotJsqr.setQuotJsqrQtOperateState("0");//其他操作状态 设置为 待通过 + } } if("leader".equals(type)){ quotJsqr.setQuotJsqrQtLeaderUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrQtLeaderTime(DateUtils.getTime()); quotJsqr.setQuotJsqrQtLeaderState(state); - //TODO 协助状态更新 + if("3".equals(state)){//驳回 + String quotJsqrQtLeaderRemark = info.getQuotJsqrQtLeaderRemark(); + if(StringUtils.isEmpty(quotJsqrQtLeaderRemark)){ + return error("其他确认意见不能为空"); + } + quotJsqr.setQuotJsqrQtOperateState("0");//其他操作状态 设置为 待通过 + quotJsqr.setQuotJsqrQtCheckState("0");//其他审核状态 设置为 待通过 + } } } quotJsqrService.updateQuotJsqr(quotJsqr); diff --git a/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/domain/QuotJsqrXzDetail.java b/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/domain/QuotJsqrXzDetail.java new file mode 100644 index 0000000..88d2e16 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/domain/QuotJsqrXzDetail.java @@ -0,0 +1,115 @@ +package com.ruoyi.technicalConfirm.domain; + +public class QuotJsqrXzDetail { + private String quotJsqrId; + private String quotJsxzGroup; + private String type; + private String state; + private String quotJsqrTlCheckRemark; + private String quotJsqrTlLeaderRemark; + + private String quotJsqrDyCheckRemark; + private String quotJsqrDyLeaderRemark; + + private String quotJsqrZyCheckRemark; + private String quotJsqrZyLeaderRemark; + + private String quotJsqrQtCheckRemark; + private String quotJsqrQtLeaderRemark; + + public String getQuotJsqrId() { + return quotJsqrId; + } + + public void setQuotJsqrId(String quotJsqrId) { + this.quotJsqrId = quotJsqrId; + } + + public String getQuotJsxzGroup() { + return quotJsxzGroup; + } + + public void setQuotJsxzGroup(String quotJsxzGroup) { + this.quotJsxzGroup = quotJsxzGroup; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getQuotJsqrTlCheckRemark() { + return quotJsqrTlCheckRemark; + } + + public void setQuotJsqrTlCheckRemark(String quotJsqrTlCheckRemark) { + this.quotJsqrTlCheckRemark = quotJsqrTlCheckRemark; + } + + public String getQuotJsqrTlLeaderRemark() { + return quotJsqrTlLeaderRemark; + } + + public void setQuotJsqrTlLeaderRemark(String quotJsqrTlLeaderRemark) { + this.quotJsqrTlLeaderRemark = quotJsqrTlLeaderRemark; + } + + public String getQuotJsqrDyCheckRemark() { + return quotJsqrDyCheckRemark; + } + + public void setQuotJsqrDyCheckRemark(String quotJsqrDyCheckRemark) { + this.quotJsqrDyCheckRemark = quotJsqrDyCheckRemark; + } + + public String getQuotJsqrDyLeaderRemark() { + return quotJsqrDyLeaderRemark; + } + + public void setQuotJsqrDyLeaderRemark(String quotJsqrDyLeaderRemark) { + this.quotJsqrDyLeaderRemark = quotJsqrDyLeaderRemark; + } + + public String getQuotJsqrZyCheckRemark() { + return quotJsqrZyCheckRemark; + } + + public void setQuotJsqrZyCheckRemark(String quotJsqrZyCheckRemark) { + this.quotJsqrZyCheckRemark = quotJsqrZyCheckRemark; + } + + public String getQuotJsqrZyLeaderRemark() { + return quotJsqrZyLeaderRemark; + } + + public void setQuotJsqrZyLeaderRemark(String quotJsqrZyLeaderRemark) { + this.quotJsqrZyLeaderRemark = quotJsqrZyLeaderRemark; + } + + public String getQuotJsqrQtCheckRemark() { + return quotJsqrQtCheckRemark; + } + + public void setQuotJsqrQtCheckRemark(String quotJsqrQtCheckRemark) { + this.quotJsqrQtCheckRemark = quotJsqrQtCheckRemark; + } + + public String getQuotJsqrQtLeaderRemark() { + return quotJsqrQtLeaderRemark; + } + + public void setQuotJsqrQtLeaderRemark(String quotJsqrQtLeaderRemark) { + this.quotJsqrQtLeaderRemark = quotJsqrQtLeaderRemark; + } +} diff --git a/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js b/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js index ac9e46c..570c7ad 100644 --- a/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js +++ b/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js @@ -44,10 +44,10 @@ export function delJsqr(quotJsqrId) { } //操作人、审核人、组长 确认事件 -export function doOperate(quotJsxzGroup,type,state,quotJsqrId) { +export function doOperate(param) { return request({ url: '/jsqr/jsqr/doOperate', method: 'post', - params: {quotJsxzGroup:quotJsxzGroup,type:type,state:state,quotJsqrId:quotJsqrId} + data: param }) } diff --git a/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue b/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue index c07833a..9133b1b 100644 --- a/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue +++ b/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue @@ -173,12 +173,18 @@
特缆协助
- 操作人通过 - 操作人驳回 - 审核人通过 - 审核人驳回 - 组长通过 - 组长驳回 +
+ 操作人通过 + 操作人驳回 +
+
+ 审核人通过 + 审核人驳回 +
+
+ 组长通过 + 组长驳回 +
@@ -197,13 +203,13 @@ - 上传文件 ({{this.quotJsqrTlFileNum}}) + 上传文件 ({{this.quotJsqrTlFileNum}}) - + @@ -298,12 +304,18 @@
低压协助
- 操作人通过 - 操作人驳回 - 审核人通过 - 审核人驳回 - 组长通过 - 组长驳回 +
+ 操作人通过 + 操作人驳回 +
+
+ 审核人通过 + 审核人驳回 +
+
+ 组长通过 + 组长驳回 +
@@ -423,12 +435,18 @@
中压协助
- 操作人通过 - 操作人驳回 - 审核人通过 - 审核人驳回 - 组长通过 - 组长驳回 +
+ 操作人通过 + 操作人驳回 +
+
+ 审核人通过 + 审核人驳回 +
+
+ 组长通过 + 组长驳回 +
@@ -548,12 +566,18 @@
其他协助
- 操作人通过 - 操作人驳回 - 审核人通过 - 审核人驳回 - 组长通过 - 组长驳回 +
+ 操作人通过 + 操作人驳回 +
+
+ 审核人通过 + 审核人驳回 +
+
+ 组长通过 + 组长驳回 +
@@ -967,18 +991,43 @@ export default { //操作人、审核人、组长 确认事件 doOperate(quotJsxzGroup,type,state){ - doOperate(quotJsxzGroup,type,state,this.form.quotJsqrId).then(response => { + let param = {} + param.quotJsqrId = this.form.quotJsqrId; + param.quotJsxzGroup = quotJsxzGroup; + param.type = type; + param.state = state; + param.quotJsqrTlCheckRemark = this.form.quotJsqrTlCheckRemark; + param.quotJsqrTlLeaderRemark = this.form.quotJsqrTlLeaderRemark; + + param.quotJsqrDyCheckRemark = this.form.quotJsqrDyCheckRemark; + param.quotJsqrDyLeaderRemark = this.form.quotJsqrDyLeaderRemark; + + param.quotJsqrZyCheckRemark = this.form.quotJsqrZyCheckRemark; + param.quotJsqrZyLeaderRemark = this.form.quotJsqrZyLeaderRemark; + + param.quotJsqrQtCheckRemark = this.form.quotJsqrQtCheckRemark; + param.quotJsqrQtLeaderRemark = this.form.quotJsqrQtLeaderRemark; + + doOperate(param).then(response => { if(quotJsxzGroup=='TL'){ if(type=='operater'){ this.form.quotJsqrTlOperateState = response.data.quotJsqrTlOperateState; this.form.quotJsqrTlOperateTime = response.data.quotJsqrTlOperateTime; this.form.quotJsqrTlOperateUserName = response.data.quotJsqrTlOperateUserName; + + if(state=='3') {//驳回 + this.form.quotJsqrTlApprovalStatus = response.data.quotJsqrTlApprovalStatus; + } } if(type=='checker'){ this.form.quotJsqrTlCheckState = response.data.quotJsqrTlCheckState; this.form.quotJsqrTlCheckTime = response.data.quotJsqrTlCheckTime; - quotJsqrTlCheckState this.form.quotJsqrTlCheckUserName = response.data.quotJsqrTlCheckUserName; + + if(state=='3') {//驳回 + alert(response.data.quotJsqrTlOperateState) + this.form.quotJsqrTlOperateState = response.data.quotJsqrTlOperateState; + } } if(type=='leader'){ this.form.quotJsqrTlLeaderState = response.data.quotJsqrTlLeaderState; @@ -991,11 +1040,19 @@ export default { this.form.quotJsqrDyOperateState = response.data.quotJsqrDyOperateState; this.form.quotJsqrDyOperateTime = response.data.quotJsqrDyOperateTime; this.form.quotJsqrDyOperateUserName = response.data.quotJsqrDyOperateUserName; + + if(state=='3') {//驳回 + this.form.quotJsqrDyApprovalStatus = response.data.quotJsqrDyApprovalStatus; + } } if(type=='checker'){ this.form.quotJsqrDyCheckState = response.data.quotJsqrDyCheckState; this.form.quotJsqrDyCheckTime = response.data.quotJsqrDyCheckTime; this.form.quotJsqrDyCheckUserName = response.data.quotJsqrDyCheckUserName; + + if(state=='3') {//驳回 + this.form.quotJsqrDyOperateState = response.data.quotJsqrDyOperateState; + } } if(type=='leader'){ this.form.quotJsqrDyLeaderState = response.data.quotJsqrDyLeaderState; @@ -1008,11 +1065,19 @@ export default { this.form.quotJsqrZyOperateState = response.data.quotJsqrZyOperateState; this.form.quotJsqrZyOperateTime = response.data.quotJsqrZyOperateTime; this.form.quotJsqrZyOperateUserName = response.data.quotJsqrZyOperateUserName; + + if(state=='3') {//驳回 + this.form.quotJsqrZyApprovalStatus = response.data.quotJsqrZyApprovalStatus; + } } if(type=='checker'){ this.form.quotJsqrZyCheckState = response.data.quotJsqrZyCheckState; this.form.quotJsqrZyCheckTime = response.data.quotJsqrZyCheckTime; this.form.quotJsqrZyCheckUserName = response.data.quotJsqrZyCheckUserName; + + if(state=='3') {//驳回 + this.form.quotJsqrZyOperateState = response.data.quotJsqrZyOperateState; + } } if(type=='leader'){ this.form.quotJsqrZyLeaderState = response.data.quotJsqrZyLeaderState; @@ -1025,11 +1090,19 @@ export default { this.form.quotJsqrQtOperateState = response.data.quotJsqrQtOperateState; this.form.quotJsqrQtOperateTime = response.data.quotJsqrQtOperateTime; this.form.quotJsqrQtOperateUserName = response.data.quotJsqrQtOperateUserName; + + if(state=='3') {//驳回 + this.form.quotJsqrQtApprovalStatus = response.data.quotJsqrQtApprovalStatus; + } } if(type=='checker'){ this.form.quotJsqrQtCheckState = response.data.quotJsqrQtCheckState; this.form.quotJsqrQtCheckTime = response.data.quotJsqrQtCheckTime; this.form.quotJsqrQtCheckUserName = response.data.quotJsqrQtCheckUserName; + + if(state=='3') {//驳回 + this.form.quotJsqrQtOperateState = response.data.quotJsqrQtOperateState; + } } if(type=='leader'){ this.form.quotJsqrQtLeaderState = response.data.quotJsqrQtLeaderState;