<%@ page language="java" import="java.util.*,hiber_xml.SysObjStatus,hiber_xml.hibernateDao" 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>
  <%
  String ls_myzd_id = request.getParameter("ls_myzd_id");
  String ls_operate = request.getParameter("operate");
  String ls_operatename = "";
  String page_num = request.getParameter("page_num");
  hibernateDao dao=new hibernateDao();
  SysObjStatus sobj = new SysObjStatus(0,"","");
  if(ls_operate==null || ls_operate.trim().length()==0){
    ls_operatename = "";
  }else if(ls_operate.trim().equals("g_add")){
    ls_operatename = "新建";
  }else if(ls_operate.trim().equals("g_open")){
    ls_operatename = "编辑";
    dao.setObjOld(sobj);
    sobj=(SysObjStatus)dao.getOne(Integer.parseInt(ls_myzd_id));
  }else if(ls_operate.trim().equals("g_preview")){
    ls_operatename = "预览";
  }
   %>
  <body>
  <%@ include file="menuoperate.jsp"%>
  <form name="sobj" method="post" action="<%="sobjEdit!"+ls_operate %>">
  <input name="ls_operate" type="hidden" value="<%=ls_operate %>"/>
  <input name="ls_pagenum" type="hidden" value="<%=page_num %>"/>
  <table width="300" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
    <tr bgcolor="#c0c0c0" class="clickable_t">
      <td align="left" colspan="2">&nbsp;&nbsp;业务状态--<%=ls_operatename %></td>
    </tr>
    <tr bgcolor="#ffffff">
      <td width="62" align="center">序号</td>
      <td width="238">
       <input name="sobj.sid" type="text" readonly="readonly" style="background:#c0c0c0;width:200px;" value="<%=sobj.getSid() %>"/>
      </td>
    </tr>
    <tr bgcolor="#ffffff">
      <td align="center">名称</td>
      <td>
       <input name="sobj.status" type="text" maxlength="20" style="width:200px;" value="<%=sobj.getStatus() %>"/>
      </td>
    </tr>
    <tr bgcolor="#ffffff">
      <td align="center">值</td>
      <td>
       <input name="sobj.val" type="text" maxlength="10" style="width:200px;" onblur="cknum('sobj.val')" value="<%=sobj.getVal() %>"/>
      </td>
    </tr>
  </table>
  </form>
  </body>
  <%dao.closeSession(); %>
  <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='';
    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=<%=page_num %>
    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_add(){
     alert('g_add');
    }
    function g_open(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      alert("将打开第"+ls_xh.innerHTML+"条记录!");
     }
    }
    function g_copy(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      alert("将复制第"+ls_xh.innerHTML+"条记录!");
     }
    }
    function g_delete(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      var ls_del=confirm('确定删除第'+ls_xh.innerHTML+'条记录?');
      if(ls_del){
       alert("删除成功!");
      }
     }
    }
    function g_preview(){
      alert("预览!");
    }
    function g_refresh(){
     alert('g_refresh');
    }
    function g_save(){
     document.all.item('sobj').submit();
    }
    function g_return(){
     window.location="../interim_gwj?url=sobj&page_num="+page;
    }
    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>
