<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="com.soarwell.weixin.append.*" %>
<%@ page import="com.soarwell.weixin.oa.User" %>
<%@ include file="/sessionInfo.jsp"%>
<% 
  String strLevel = "../../"; 
%> 
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    String sType = SzConvert.toZeroStr(request.getParameter("type"));
    String sPage = SzConvert.toZeroStr(request.getParameter("page"));
    String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
%>
<%
    SzData szData = null;
    SzDataInfo szDataInfo = null;

    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
    String sKEY =  SzConvert.toZeroStr(request.getParameter("KEY"));
    String sReadonly = "";
    boolean bReadonly = false;
    if (sOPERATOR.equals("detail")) {
        sReadonly = "readonly";
        bReadonly = true;
    }
    //读取数据
    CustMessageInfo custMessageInfo = null;
    CustMessage custMessage = new CustMessage();
    if (!sKEY.equals("0")) {
    	custMessageInfo = (CustMessageInfo)custMessage.getInfoByKey(Integer.parseInt(sKEY));
    }
    if (custMessageInfo == null) {
    	custMessageInfo = new CustMessageInfo();
    } else {
    	if (custMessageInfo.getWXHFNR().equals("")) {
        	custMessageInfo.setWXHFRY(sDLXM_SESSION);
        	custMessageInfo.setWXHFSJ(SzDateHelp.getTimeStr());
    		
    	}    	
    }
    
	User user = new User(); 
    
%>

<body>
<!-----上面的工具栏------>
<form name="formUpdate" method="post">
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="OPERATOR" value="<%=sOPERATOR%>">
  <input type="hidden" name="KEY" value="<%=sKEY%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="WXOPENID" value="<%=custMessageInfo.getWXOPENID() %>" > 
<%@ include file="/share/title.jsp"%>
<table width="100%">
  <tr>
    <td>
    <% if (!bReadonly) { %>
      <%=SzPageHelp.saveButton()%>
    <% } %>
      <%=SzPageHelp.backButton()%>
    </td>
  </tr>
</table>
<!-----信息维护------>
<table width="750" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="3" cellspacing="0">
  <tr>
    <td class="tdClassTitle">昵称</td>
    <td colspan="3"><%= custMessageInfo.getWXNC()%></td>
  </tr>
  <tr>
    <td class="tdClassTitle">OA绑定用户</td>
    <td><%=user.getBindLoginName(custMessageInfo.getWXOPENID())%>
    </td>
  </tr>
    <td class="tdClassTitle">接收时间</td>
    <td><%= custMessageInfo.getWXSJ()%></td>
  </tr>   
  <tr>
    <td class="tdClassTitle">消息内容</td>
    <td colspan="3"><%= custMessageInfo.getWXNC()%>
    </td>
  </tr>
  <tr>
    <td class="tdClassTitle">回复人员</td>
    <td colspan="3">
      <input type="text" class="txtClass1" name="WXHFRY" value="<%=custMessageInfo.getWXHFRY()%>" readonly>
    </td>
  </tr>      
  <tr>
    <td class="tdClassTitle">回复时间</td>
    <td colspan="3"><input type="text" class="txtClass1" name="WXHFSJ" value="<%=custMessageInfo.getWXHFSJ() %>" readonly>
    </td>
  </tr>
  <tr>
    <td class="tdClassTitle">回复内容</td>
    <td colspan="3">
			<textarea class="areaClass2" name="WXHFNR"><%=custMessageInfo.getWXHFNR() %>
			</textarea>
    </td>
  </tr>
</table>  
</form>
<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="type" value="<%=sType%>">
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>
<script language="javascript">

  function FormSave(formName, url) {
    //检查是否可以保存
    if (!notSpace(formName.WXHFNR, "回复内容")) {
      return false;
    }

    formName.action = url;
    formName.submit();
  }
 
</script>
</body>
<%=SzPageHelp.calendarFrame2()%>
