<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="cm" uri="/commons-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>系统用户</title>
<link href="../resources/style/base.css" rel="stylesheet" type="text/css"/>
<script language="javascript" src="../code/vm/ExtCodeJs.htm"></script>
<s:include value="../common/head.jsp" />
</head>

<body>
<div class="body_form">
<s:include value="../common/body.jsp" />
<s:form action="sysUserOperate" namespace="/system" onsubmit="return checkForm(this)">

 <table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
    <s:if test="oper=='edit'">
	 <tr class="form_tr">
      <td width="34%" align="right">工号：</td>
      <td width="66%"><s:property value="user.emplInfo.emplNo"/></td>
      </tr>
	 <tr class="form_tr">
      <td width="34%" align="right">姓名：</td>
      <td width="66%"><s:property value="user.emplInfo.name"/></td>
      </tr>	  
	</s:if>
	<s:if test="oper=='add'">
    <tr class="form_tr">
      <td width="34%" align="right"><span class="required">•</span>员工：</td>
      <td width="66%">
      		<s:textfield title="员工为必填项" cssClass="date_input" name="user.emplInfo.name" readonly="true" 
            	onClick="codeTable('emplInfoTable',gn('user.emplInfo.id'),this,'yes','no_sys_user=true')" cssStyle="width:150px;"/>
            <s:hidden name="user.emplInfo.id"/>
        
      </td>
      </tr>
	 </s:if>
     <tr class="form_tr">
      <td width="34%" align="right" valign="top"><span class="required">•</span>状态：</td>
      <td width="66%" valign="top"><s:select title="状态为必填项" cssStyle="width:150px;" name="user.status.id" list='#request.SysCodeFinder.find("SYS_USER_STATUS")' headerKey="" headerValue="" listKey="id" listValue="codeName"/>
      </td>
	</tr>
    <tr class="form_tr">
      <td width="34%" align="right" valign="top">角色：</td>
      <td width="66%" valign="top">
          	<s:iterator value="roleList" status="st1">
            	<div style=" margin:0 0 5px 0;">
                    <s:if test="user.sysRoleSet.contains(top)">
                        <input type="checkbox" value="<s:property value='id'/>" id="checkbox" checked="checked" 
                            name="roleIds"/><s:property value="name"/>
                    </s:if>
                    <s:else>
                        <input type="checkbox" id="checkbox" value="<s:property value='id'/>"
                            name="roleIds" /><s:property value="name"/>
                    </s:else>
                </div>
            </s:iterator>   
      </td>
	</tr>
    <tr class="form_tr">
      <td width="34%" align="right">&nbsp;</td>
      <td width="66%" valign="top">
        <s:if test="oper=='edit'">
          <input type="submit" name="button" id="button" value="修 改" />
        </s:if>
        <s:if test="oper=='add'">
          <input type="submit" name="button" id="button" value="添 加" />
        </s:if>
        &nbsp;
        <!-- back begin -->
        <input name="winID" type="hidden" value="${param.winID}" />
        <input type="button" onclick="iframeWindowClose('${param.winID}')" name="button" id="button" value="返 回" />
        <!-- back end -->
        <s:hidden name="user.id" />
        <s:hidden name="oper"/>
      </td>
    </tr>
  </table>


</s:form>
</div>
</body>
</html>