<%@ 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="/sessionInfoWeixin.jsp"%>
<% 
  String strLevel = "../../"; 
%> 
<head>
<%@ include file="/share/oa_app_title.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no" />
<link href="<%=strLevel_SESSION%>app/images/soarwell_css.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="/app/title.jsp"%>
<table width="100%">
  <tr>
    <td>
    <% if (!bReadonly) { %>
      <%=SzPageHelp.saveButton()%>
    <% } %>
      <%=SzPageHelp.backButton()%>
    </td>
  </tr>
</table>
<!-----信息维护------>
<table width="100%" border="0" cellspacing="3" cellpadding="3" style="border:#D7D7D9 1px solid;">
  <tr>  
    <td><span class="product_content">
        <b>[微信昵称]</b><%=custMessageInfo.getWXNC()%>&nbsp;
        </span>
    </td>
  </tr>  
  <tr>  
    <td><span class="product_content">
        <b>[OA绑定用户]</b><%=user.getBindLoginName(custMessageInfo.getWXOPENID())%>&nbsp;
        </span>
    </td>
  </tr>  
  <tr>  
    <td><span class="product_content">
        <b>[接收时间]</b><%=user.getBindLoginName(custMessageInfo.getWXSJ())%>&nbsp;
        </span>
    </td>
  </tr>    
  <tr>  
    <td><span class="product_content">
        <b>[消息内容]</b><%=user.getBindLoginName(custMessageInfo.getWXNR())%>&nbsp;
        </span>
    </td>
  </tr>
  <tr>  
    <td><span class="product_content">
        <b>[回复人员]</b></span>
        <input type="text" class="txtClass" name="WXHFRY" value="<%=custMessageInfo.getWXHFRY()%>" readonly>&nbsp;
        
    </td>
  </tr>
  <tr>  
    <td><span class="product_content">
        <b>[回复时间]</b></span>
        <input type="text" class="txtClass" name="WXHFSJ" value="<%=custMessageInfo.getWXHFSJ() %>" readonly>&nbsp;
        
    </td>
  </tr>
  <tr>  
    <td valign="top"><span class="product_content">
        <b>[回复内容]</b></span>			
        <textarea class="areaClass" name="WXHFNR"><%=custMessageInfo.getWXHFNR() %>
				</textarea>&nbsp;
        
    </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()%>
