Pārlūkot izejas kodu

优化用户管理

jingbo 4 mēneši atpakaļ
vecāks
revīzija
f398e53d14

+ 17 - 0
src/main/java/com/jeesite/modules/mes/service/MesEmployeeService.java

@@ -14,6 +14,11 @@ import java.util.UUID;
 @Service
 public class MesEmployeeService extends CrudService<MesEmployeeDao, MesEmployee> {
 
+	private static final String DEFAULT_OFFICE_CODE = "SD";
+	private static final String DEFAULT_OFFICE_NAME = "安徽裕洋新能源科技有限公司";
+	private static final String DEFAULT_COMPANY_CODE = "SD";
+	private static final String DEFAULT_COMPANY_NAME = "安徽裕洋新能源科技有限公司";
+
 	@Override
 	public MesEmployee get(MesEmployee mesEmployee) {
 		return super.get(mesEmployee);
@@ -39,6 +44,18 @@ public class MesEmployeeService extends CrudService<MesEmployeeDao, MesEmployee>
 		if (StringUtils.isBlank(mesEmployee.getEmpNameEn())) {
 			mesEmployee.setEmpNameEn("");
 		}
+		if (StringUtils.isBlank(mesEmployee.getOfficeCode())) {
+			mesEmployee.setOfficeCode(DEFAULT_OFFICE_CODE);
+		}
+		if (StringUtils.isBlank(mesEmployee.getOfficeName())) {
+			mesEmployee.setOfficeName(DEFAULT_OFFICE_NAME);
+		}
+		if (StringUtils.isBlank(mesEmployee.getCompanyCode())) {
+			mesEmployee.setCompanyCode(DEFAULT_COMPANY_CODE);
+		}
+		if (StringUtils.isBlank(mesEmployee.getCompanyName())) {
+			mesEmployee.setCompanyName(DEFAULT_COMPANY_NAME);
+		}
 		if (StringUtils.isBlank(mesEmployee.getCorpCode())) {
 			mesEmployee.setCorpCode("0");
 		}

+ 1 - 1
src/main/resources/views/modules/mes/mesScreenConfigList.html

@@ -67,7 +67,7 @@ $('#dataGrid').dataGrid({
 			actions.push('<a href="javascript:" class="screen-preview" data-url="' + encodeURIComponent(row.screenUrl || '') + '" data-title="' + encodeURIComponent(row.screenName || '') + '" title="打开大屏"><i class="fa fa-desktop"></i></a>&nbsp;');
 			<% if(hasPermi('mes:mesScreenConfig:edit')){ %>
 				actions.push('<a href="${ctx}/mes/mesScreenConfig/form?id='+row.id+'" class="btnList" title="${text("编辑大屏配置")}"><i class="fa fa-pencil"></i></a>&nbsp;');
-				actions.push('<a href="${ctx}/mes/mesScreenConfig/delete?id='+row.id+'" class="btnList" title="${text("删除大屏配置")}" data-confirm="${text("确认要删除该大屏配置吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
+				// actions.push('<a href="${ctx}/mes/mesScreenConfig/delete?id='+row.id+'" class="btnList" title="${text("删除大屏配置")}" data-confirm="${text("确认要删除该大屏配置吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
 			<% } %>
 			return actions.join('');
 		}}

+ 2 - 18
src/main/resources/views/modules/mes/skillUserSelect.html

@@ -8,7 +8,6 @@
                 </div>
                 <ul class="dropdown-menu">
                     <li><a href="javascript:" onclick="loadTree('office');"> <i class="fa fa-angle-right"></i> ${text('按组织查询')}</a></li>
-                    <li><a href="javascript:" onclick="loadTree('post');"> <i class="fa fa-angle-right"></i> ${text('按岗位查询')}</a></li>
                     <li><a href="javascript:" onclick="loadTree('role');"> <i class="fa fa-angle-right"></i> ${text('按角色查询')}</a></li>
                     <li><a href="javascript:" onclick="loadTree('userType');"> <i class="fa fa-angle-right"></i> ${text('按用户类型')}</a></li>
                 </ul>
@@ -32,7 +31,6 @@
                 data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
                 <#form:hidden name="status" value="${isNotBlank(empUser.status) ? empUser.status : '0'}" class="isReset"/>
                 <#form:hidden name="isAll" value="${parameter.isAll}" class=""/>
-                <#form:hidden id="postCode" name="employee.postCode" class="isReset"/>
                 <#form:hidden id="roleCode" name="roleCode" class="isReset"/>
                 <#form:hidden id="userType" name="userType" class="isReset"/>
                 <div class="form-group">
@@ -61,16 +59,8 @@
                         url="${ctx}/sys/office/treeData?isAll=${parameter.isAll}" btnClass="btn-sm" allowClear="true" canSelectParent="true"/>
                     </div>
                 </div>
-                <div class="form-group">
-                    <label class="control-label">${text('公司')}:</label>
-                    <div class="control-inline width-90">
-                        <#form:treeselect id="company" title="${text('公司选择')}"
-                        path="employee.company.companyCode" labelPath="employee.company.companyName"
-                        url="${ctx}/sys/company/treeData" btnClass="btn-sm" allowClear="true" canSelectParent="true"/>
-                    </div>
-                </div>
-                <div class="form-group">
-                    <label class="control-label">${text('手机')}:</label>
+				<div class="form-group">
+					<label class="control-label">${text('手机')}:</label>
                     <div class="control-inline">
                         <#form:input path="mobile" maxlength="100" class="form-control width-90"/>
                     </div>
@@ -117,8 +107,6 @@
                     if (!queryType || queryType == 'office'){
                         $('#officeCode').val(treeNode.id);
                         $('#officeName').val(treeNode.name);
-                    } else if (queryType == 'post'){
-                        $('#postCode').val(treeNode.id);
                     } else if (queryType == 'role'){
                         $('#roleCode').val(treeNode.id);
                     }
@@ -140,9 +128,6 @@
             if (!queryType || queryType == 'office'){
                 $('#queryTypeName').text('${text("按组织查询")}');
                 url = "${ctx}/sys/office/treeData?isAll=${parameter.isAll}&___t=" + new Date().getTime();
-            } else if (queryType == 'post'){
-                $('#queryTypeName').text('${text("按岗位查询")}');
-                url = "${ctx}/sys/post/treeData?___t=" + new Date().getTime();
             } else if (queryType == 'role'){
                 $('#queryTypeName').text('${text("按角色查询")}');
                 url = "${ctx}/sys/role/treeData?isAll=${parameter.isAll}&userType=__all&___t=" + new Date().getTime();
@@ -183,7 +168,6 @@
             {header:'${text("用户昵称")}', name:'userName', index:'a.user_name', width:200, align:"center"},
             {header:'${text("员工姓名")}', name:'refName', index:'a.ref_name', width:200, align:"center"},
             {header:'${text("归属机构")}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
-            {header:'${text("归属公司")}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
             {header:'${text("手机号码")}', name:'mobile', index:'a.mobile', width:200, align:"center"},
             {header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
             {header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){

+ 1 - 9
src/main/resources/views/modules/sys/user/empUserForm.html

@@ -217,14 +217,6 @@
 					}
 				}
 			},
-			{header:'${text("附属岗位")}', name:'postCode', sortable:false, width:100,
-				editable:true, edittype:'select', editoptions:{'class':'form-control',
-					items: $.merge([{postName:'&nbsp;',postCode:''}], ${toJson(postList)}),
-					itemLabel: 'postName', itemValue: 'postCode', dataInit: function(element){
-						js.select2(element).on("change",function(){$(this).resetValid()});
-					}
-				}
-			},
 			{header:'${text("操作")}', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
 					var actions = [];
 					actions.push('<a href="#" onclick="js.confirm(\'${text("你确认要删除这条数据吗?")}\', function(){$(\'#empOfficeGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
@@ -241,7 +233,7 @@
 
 		// 编辑表格的提交数据参数
 		editGridInputFormListName: 'employee.employeeOfficeList', // 提交的数据列表名
-		editGridInputFormListAttrs: 'officeCode,officeName,postCode,postName,', // 提交数据列表的属性字段
+		editGridInputFormListAttrs: 'officeCode,officeName,', // 提交数据列表的属性字段
 
 		ajaxSuccess: function(){
 

+ 1 - 8
src/main/resources/views/modules/sys/user/empUserList.html

@@ -88,13 +88,6 @@
 					</div>
 				</div>
 				<div class="form-group">
-					<label class="control-label">${text('岗位')}:</label>
-					<div class="control-inline width-90">
-						<#form:select name="employee.postCode" items="${postList}"
-						itemLabel="postName" itemValue="postCode" blankOption="true" class="form-control isQuick"/>
-					</div>
-				</div>
-				<div class="form-group">
 					<label class="control-label">${text('角色')}:</label>
 					<div class="control-inline width-120">
 						<#form:select name="roleCode" items="${roleList}"
@@ -154,7 +147,7 @@
 
 					actions.push('<a href="${ctx}/mes/mesLineProcess/formAuth?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户工位授权")}"><i class="fa fa-check-circle-o"></i> ${text("工位授权")}</a>&nbsp;');
 
-					actions.push('<a href="${ctx}/sys/empUser/formAuthDataScope?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户分配数据权限")}"><i class="fa fa-check-circle-o"></i> ${text("数据权限")}</a>&nbsp;');
+					// actions.push('<a href="${ctx}/sys/empUser/formAuthDataScope?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户分配数据权限")}"><i class="fa fa-check-circle-o"></i> ${text("数据权限")}</a>&nbsp;');
 					//<% } %>
 					//<% if(hasPermi('sys:empUser:resetpwd')){ %>
 					actions.push('<a href="${ctx}/sys/empUser/resetpwd?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户密码重置")}" data-confirm="${text("确认要将该用户密码重置到初始状态吗?")}"><i class="fa fa-reply-all"></i> ${text("重置密码")}</a>&nbsp;');