Browse Source

[feat]供应商资料添加详情信息资料显示

dev
zhangsiqi 4 months ago
parent
commit
0e7e262fe8
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java
  3. 27
      ruoyi-admin/src/main/resources/templates/system/supplier/detail.html

4
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java

@ -102,8 +102,8 @@ public class SysSupplierController extends BaseController
String loginName = ShiroUtils.getLoginName();
Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("cgyRole");
sysUserlist.add(curUser);
// List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("cgyRole");
// sysUserlist.add(curUser);
//如果主管审批,查看当前自己部门的审核
//如果经理审计需要查询自己部门下所有业务员的提交的订单,以及自身的提交的订单
// if (roleKeys.contains("cgjlRole")) {

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

@ -420,6 +420,10 @@ public class SysSupplierServiceImpl implements ISysSupplierService{
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
if(roleKeys.contains("cgyRole")){
variables.put("authority",1);
}else if(roleKeys.contains("cgjlRole")){
variables.put("authority",2);
}else if(roleKeys.contains("cgzgRole")){
variables.put("authority",3);
}
// 角色不同审核人不同
if(roleKeys.contains("admin")){

27
ruoyi-admin/src/main/resources/templates/system/supplier/detail.html

@ -6,8 +6,8 @@
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplier-detail" th:object="${sysSupplier}">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-supplier-detail" th:object="${sysSupplier}">
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商编号:</label>
<div class="col-sm-8">
@ -206,7 +206,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">采购员:</label>
<div class="col-sm-8">
<select id="purchaseBuyer_add" name="purchaseBuyer" class="form-control" disabled></select>
<select id="purchaseBuyer_add" th:field="*{purchaseBuyer}" name="purchaseBuyer" class="form-control" disabled></select>
</div>
</div>
<div class="form-group">
@ -321,27 +321,6 @@
$("#form-supplier-detail").validate({
focusCleanup: true
});
$(function(){
$.ajax({
url: ctx + 'system/user/cutomerList',
type: 'post',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#form-supplier-edit select[name='purchaseBuyer']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("#form-supplier-edit select[name='purchaseBuyer']").val(sysSupplier.purchaseBuyer).trigger("change");
} else {
$.modal.msgError(res.msg);
}
}
});
$("input[name='confirmFax']").val(sysSupplier.confirmFax);
$("input[name='supplierType']").val(sysSupplier.supplierType);
$("input[name='supplierQualification']").val(sysSupplier.supplierQualification);
})
</script>
</body>
</html>
Loading…
Cancel
Save