diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java index ffc807fd..e913a20c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java @@ -399,7 +399,7 @@ public class ErpMaterialController extends BaseController @ResponseBody public TableDataInfo getEngineerList(){ startPage(); - List list = sysUserService.selectRoleToUserList("gcwyRole"); + List list = sysUserService.selectRoleToUserList("gcwyRole,gcjlRole,gczgRole,yfzjRole,"); return getDataTable(list); } } diff --git a/ruoyi-admin/src/main/resources/templates/erp/material/add.html b/ruoyi-admin/src/main/resources/templates/erp/material/add.html index d02886c4..e0abb662 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/material/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/material/add.html @@ -91,9 +91,7 @@
- +
@@ -174,10 +172,12 @@ } }) - - var prefix = ctx + "erp/material" + var prefix = ctx + "erp/material"; + var userName = [[${@permission.getPrincipalProperty('userName')}]]; + var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; //获取工程员 $(function(){ + $("#businessMembers_add").val(userName); $.ajax({ url: ctx + 'erp/material/getEngineerList', type: 'get', diff --git a/ruoyi-admin/src/main/resources/templates/erp/material/edit.html b/ruoyi-admin/src/main/resources/templates/erp/material/edit.html index 1788a063..372a9a34 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/material/edit.html +++ b/ruoyi-admin/src/main/resources/templates/erp/material/edit.html @@ -85,7 +85,7 @@
-
@@ -269,6 +269,24 @@ } }); }) + //获取工程员 + $(function(){ + $.ajax({ + url: ctx + 'erp/material/getEngineerList', + type: 'get', + success: function (res) { + if (res.rows.length > 0) { + var usertData = res.rows; + for (let i in usertData) { + $("select[name='businessMembers']").append( + ""); + } + } else { + $.modal.msgError(res.msg); + } + } + }); + }) var materialType = $("#materialType").val(); $("#selectMaterialType").val(materialType).trigger("change"); function submitHandler() {