${text(empUser.isNewRecord ? '新增用户' : op == 'auth' ? '用户分配角色' : '编辑用户')}
<#form:form id="inputForm" model="${empUser}" action="${ctx}/sys/empUser/save" method="post" class="form-horizontal"> <#form:hidden name="op" value="${op}"/> <#form:hidden name="userType" value="employee"/> <#form:hidden path="userCode"/>
<% if(op=='auth'){ %>
<% } %> <% if(op == 'add' || op == 'edit') { %>
${text('基本信息')}
<#form:treeselect id="office" title="${text('机构选择')}" path="employee.office.officeCode" labelPath="employee.office.officeName" url="${ctx}/sys/office/treeData?ctrlPermi=${@Global.getConfig('user.adminCtrlPermi', '2')}" class="required" allowClear="false" canSelectRoot="true" canSelectParent="true"/>
<% } %>
<#form:hidden name="oldLoginCode" value="${empUser.loginCode}"/> <#form:input path="loginCode" minlength="4" maxlength="20" readonly="${op=='auth'}" class="form-control required userName" remote="${ctx}/sys/user/checkLoginCode?oldLoginCode=${empUser.loginCode}" data-msg-remote="${text('登录账号已存在')}"/>
<#form:input path="userName" maxlength="32" readonly="${op=='auth'}" class="form-control required "/>
<% if(op == 'add' || op == 'edit') { %>
<#form:input path="email" maxlength="300" class="form-control email"/>
<#form:input path="mobile" maxlength="100" class="form-control mobile"/>
<#form:input path="phone" maxlength="100" class="form-control phone"/>
<#form:input path="userWeight" maxlength="8" class="form-control digits" placeholder="${text('权重越大排名越靠前,请填写数字。')}"/>
${text('详细信息')}
<#form:input path="employee.empNo" maxlength="32" class="form-control userName" remote="${ctx}/sys/empUser/checkEmpNo?oldEmpNo=${empUser.employee.empNo}" data-msg-remote="${text('员工工号已存在')}"/>
<#form:input path="employee.empName" maxlength="32" class="form-control "/>
<#form:select multiple="true" path="employee.employeePosts" items="${postList}" itemLabel="postName" itemValue="postCode" class="form-control"/>
<#form:input path="employee.empNameEn" maxlength="32" class="form-control "/>
<% if (hasPermi('sys:empUser:edit')){ %> ${text('增行')} <% } %>
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control "/>
<% } %> <% if(hasPermi('sys:empUser:authRole') && (op == 'add' || op == 'auth')) { %>
${text('分配角色')}
<#form:hidden name="userRoleString"/>
<% } %> <% if(op == 'add' || op == 'edit') { %> <#form:extend collapsed="true" /> <% } %>