Browse Source

[fix]采购管理

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

11
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java

@ -441,15 +441,16 @@ public class SysSupplierServiceImpl implements ISysSupplierService{
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);
} }
} }

10
ruoyi-admin/src/main/resources/templates/system/supplier/taskCgzgVerify.html → ruoyi-admin/src/main/resources/templates/system/supplier/taskFzjlVerify.html

@ -8,7 +8,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplier-cgzg-audit" th:object="${formData}"> <form class="form-horizontal m" id="form-supplier-fzjl-audit" th:object="${formData}">
<input name="supplierId" th:field="*{supplierId}" type="hidden"> <input name="supplierId" th:field="*{supplierId}" 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">
@ -328,9 +328,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>
@ -354,14 +354,14 @@
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "system/supplier"; var prefix = ctx + "system/supplier";
$("#form-supplier-cgzg-audit").validate({focusCleanup: true}); $("#form-supplier-fzjl-audit").validate({focusCleanup: true});
function submitHandler() { function submitHandler() {
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
if ($.validate.form()) { if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }
var formData = $("#form-supplier-cgzg-audit").serialize(); var formData = $("#form-supplier-fzjl-audit").serialize();
$.operate.save(prefix + "/complete/" + taskId,formData); $.operate.save(prefix + "/complete/" + taskId,formData);
} }
} }
Loading…
Cancel
Save