<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<jsp:include flush="true" page="error.jsp"/>
<%@ include file="header.jsp"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
      <jsp:include page="cssoa.jsp"></jsp:include>
    <title></title>
 

  </head>
  <body>
  <%@ include file="menuoperate.jsp"%>
  <form name="depart" method="post" action="depart_save">
  <input name="method" type="hidden" value="<s:property value='#parameters.method[0]'/>"/>
  <input name="myzd_id" type="hidden" value="<s:property value='#parameters.myzd_id[0]'/>"/>
  <input name="pageNo" type="hidden" value="<s:property value='#parameters.pageNo'/>"/>
  <input name="pageSize" type="hidden" value="<s:property value='#parameters.pageSize'/>"/>
  <table width="680" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
    <tr bgcolor="#c0c0c0" class="clickable_t">
      <td align="left" colspan="2">&nbsp;&nbsp;单位信息--编辑</td>
    </tr>
    <tr bgcolor="#ffffff">
      <td width="62" align="center">编码</td>
      <td width="615">
       <input name="FIELD_DPT_NO" type="text" <s:if test='#parameters.method[0]=="update"'>readonly style="background:#c0c0c0;"</s:if>  value="<s:property value="editdata['DPT_NO']"/>"/>
      </td>
    </tr>
    <tr bgcolor="#ffffff">
      <td align="center">名称</td>
      <td>
       <input name="FIELD_DPT_NAME" type="text" maxlength="50" style="width:500px;" value="<s:property value="editdata['DPT_NAME']"/>"/>
      </td>
    </tr>
    <tr bgcolor="#ffffff">
      <td align="center">负责人</td>
      <td>
        <select name="FIELD_MANAGER">
          <s:iterator value="loginuser" var="user">
          <option value="<s:property value="#user.CODE"/>"  <s:if test="#user.CODE==editdata['MANAGER']">selected</s:if> >
              <s:property value="#user.EMNAME"/>
          </option>
         </s:iterator>
     </select>
      </td>
    </tr>
    <tr bgcolor="#ffffff">
      <td align="center">排序</td>
      <td>
       <input name="FIELD_SORT" onblur="cknum(this.name);" type="text" style="width:50px;" value="<s:property value="editdata['SORT']"/>" maxlength="4"/>
      </td>
    </tr>
  </table>
  </form>
  </body>
  <script type="text/javascript">
    document.getElementById("g_list").style.display='none';
    document.getElementById("g_password").style.display='none';
    document.getElementById("g_add").style.display='none';
    document.getElementById("g_open").style.display='none';
    document.getElementById("g_copy").style.display='none';
    document.getElementById("g_delete").style.display='none';
    document.getElementById("g_preview").style.display='none';
    document.getElementById("g_taoda").style.display='none';
    document.getElementById("g_refresh").style.display='none';
    document.getElementById("g_save").style.display='';
    document.getElementById("g_return").style.display='none';
    document.getElementById("g_groupCmodule").style.display='none';
            document.getElementById("g_groupCuser").style.display='none';
            document.getElementById("g_userCuser").style.display='none';
    var ls_code;
    var ls_old,ls_new
    var page="<s:property value='pageNo'/>";
    var pageSize="<s:property value='pageSize'/>";
    function ls_choice(ls_current){
     if(ls_old!=null){
       ls_old.checked=false;
     }
     ls_new = document.getElementById(ls_current);
     ls_new.checked=true;
     ls_old = ls_new;
    }
    
    function g_preview(){
      alert("预览!");
    }
    
    function g_save(){
     document.all.item('depart').submit();
     alert("已保存!");
    }
    function g_return(){
     window.location="depart_grid?pageNo="+page+"&pageSize="+pageSize;
    }
    function cknum(pname){
	 var ck=document.all.item(pname).value;
	 var ck_gz=new RegExp("^[0-9]*$");
	 if(ck_gz.test(ck)==false){
	  alert('请输入数字!');
	  document.all.item(pname).focus();
	  document.all.item(pname).value='';
	  return false;
	 }
	 else 
	  return true;
}
  </script>
</html>
