Browse Source

[feat]采购管理

按照新版万材需求,调整采购报价的审批流程为:目前没有采购经理这个职位,直接由副总经理审批即可,以后有此岗位之后,管理员可以修改审批流程为:采购员-采购经理-副总经理
修改采购报价审批后端角色校验的方法
新增副总经理审批前端页面
dev
liuxiaoxu 4 days ago
parent
commit
54bbf720a4
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java
  2. 11
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java
  3. 12
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskFzjlVerify.html

2
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java

@ -76,7 +76,7 @@ public interface IPurchaseQuoteService
*/ */
ProcessInstance cancelPurchaseQuoteById(Long purchaseQuoteId); ProcessInstance cancelPurchaseQuoteById(Long purchaseQuoteId);
@Transactional(rollbackFor = Exception.class)
ProcessInstance submitApply(PurchaseQuote purchaseQuote); ProcessInstance submitApply(PurchaseQuote purchaseQuote);
/** /**

11
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java

@ -420,15 +420,16 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
private void buildAuthority(SysUser user, Map<String, Object> variables) { private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId()); Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
variables.put("cgjlExist",false);
// 角色不同审核人不同
if(roleKeys.contains("cgyRole")){ if(roleKeys.contains("cgyRole")){
variables.put("authority",1); variables.put("authority",1);
}else if(roleKeys.contains("cgjlRole")){ }else if(roleKeys.contains("cgjlRole")){
variables.put("authority",2); variables.put("cgjlExist",true);
}else if(roleKeys.contains("cgzgRole")){ }else if(roleKeys.contains("admin")){
variables.put("authority",3); variables.put("authority",3);
} }else if(roleKeys.contains("fzjlRole")){
// 角色不同审核人不同
if(roleKeys.contains("admin")){
variables.put("authority",4); variables.put("authority",4);
} }
} }

12
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskCgzgVerify.html → ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskFzjlVerify.html

@ -9,7 +9,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-purchaseQuote-cgzg-audit" th:object="${formData}"> <form class="form-horizontal m" id="form-purchaseQuote-fzjl-audit" th:object="${formData}">
<input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" type="hidden"> <input name="purchaseQuoteId" th:field="*{purchaseQuoteId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden"> <input name="taskName" th:field="*{taskName}" type="hidden">
@ -100,9 +100,9 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label" for="cgzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> <label class="col-sm-3 control-label" for="fzjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="p_B_cgzgVerifyApproved" id="cgzgVerifyApproved" class="form-control m-b" required> <select name="p_B_fzjlVerifyApproved" id="fzjlVerifyApproved" class="form-control m-b" required>
<option value=""></option> <option value=""></option>
<option value="true">同意</option> <option value="true">同意</option>
<option value="false">拒绝</option> <option value="false">拒绝</option>
@ -115,7 +115,7 @@
<textarea name="comment" class="form-control"></textarea> <textarea name="comment" class="form-control"></textarea>
</div> </div>
</div> </div>
<input id="purchaseQuoteChildList_cgzg" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" /> <input id="purchaseQuoteChildList_fzjl" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" />
</form> </form>
<div class="container"> <div class="container">
<div class="form-row"> <div class="form-row">
@ -204,7 +204,7 @@
} }
}); });
$("#form-purchaseQuote-cgzg-audit").validate({focusCleanup: true}); $("#form-purchaseQuote-fzjl-audit").validate({focusCleanup: true});
$(function() { $(function() {
var options = { var options = {
id:'bootstrap-sub-table-purchaseQuoteChild', id:'bootstrap-sub-table-purchaseQuoteChild',
@ -319,7 +319,7 @@
} else { } else {
// 将子表数据添加到FormData中 // 将子表数据添加到FormData中
$('input[name="purchaseQuoteChildLists"]').val(JSON.stringify(tableData)); $('input[name="purchaseQuoteChildLists"]').val(JSON.stringify(tableData));
var formData = $("#form-purchaseQuote-cgzg-audit").serialize(); var formData = $("#form-purchaseQuote-fzjl-audit").serialize();
// 发送请求 // 发送请求
$.operate.save(prefix + "/complete/" + taskId, formData) $.operate.save(prefix + "/complete/" + taskId, formData)
} }
Loading…
Cancel
Save