/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: ......
 * Generated at: 2020-08-11 22:45:18 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp.help.workflow.function.flowform;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;

public final class openReportDialog_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  private volatile javax.el.ExpressionFactory _el_expressionfactory;
  private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
    if (_el_expressionfactory == null) {
      synchronized (this) {
        if (_el_expressionfactory == null) {
          _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
        }
      }
    }
    return _el_expressionfactory;
  }

  public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
    if (_jsp_instancemanager == null) {
      synchronized (this) {
        if (_jsp_instancemanager == null) {
          _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
        }
      }
    }
    return _jsp_instancemanager;
  }

  public void _jspInit() {
  }

  public void _jspDestroy() {
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html;charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");



      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" >\r\n");
      out.write("<html>\r\n");
      out.write("<head><meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("<title> </title>\r\n");
      out.write("    <META http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write("    <META http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write("    <META http-equiv=\"expires\" content=\"0\">\r\n");
      out.write("  \r\n");
      out.write("     <style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write("-->\r\n");
      out.write("\r\n");
      out.write("body {\r\n");
      out.write("\tfont-size:12px;\r\n");
      out.write("\tmargin-left: 2px;\r\n");
      out.write("\tmargin-top: 0px;\r\n");
      out.write("\tmargin-right: 00px;\r\n");
      out.write("\tmargin-bottom: 0px;\r\n");
      out.write("}\r\n");
      out.write(".style30 {\r\n");
      out.write("\tfont-size: 14px;\r\n");
      out.write("\tfont-family: \"Courier New\", Courier, mono;\r\n");
      out.write("}\r\n");
      out.write(".style32 {color: #009900}\r\n");
      out.write("     .style33 {color: #D4D0C8}\r\n");
      out.write("     .STYLE34 {\r\n");
      out.write("\tcolor: #000;\r\n");
      out.write("\tfont-size: 24px;\r\n");
      out.write("}\r\n");
      out.write("     .s1 {\r\n");
      out.write("\tcolor: #00F;\r\n");
      out.write("}\r\n");
      out.write("     .s2 {\r\n");
      out.write("\tfont-weight: bold;\r\n");
      out.write("\tcolor: #00F;\r\n");
      out.write("}\r\n");
      out.write("     .s3 {\r\n");
      out.write("\tfont-size: 12px;\r\n");
      out.write("\tcolor: #F00;\r\n");
      out.write("}\r\n");
      out.write("     </style>\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td class=\"style30\"><strong class=\"STYLE34\">openReportDialog</strong>(title,width,height, template,param )</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td><hr size=\"1\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("<p>[<span class=\"style32\"  >说明</span>]&nbsp;以弹出窗口方式显示一个模板的内容，该窗口显示为模态</p>\r\n");
      out.write("<p> [<span class=\"style32\"  >参看</span>]&nbsp;&nbsp;&nbsp;&nbsp;flow.onOK() ,  flow.onCancel()  这两个函数可以在打开的对话框中模拟按确认或取消。</p>\r\n");
      out.write("<p>[<span class=\"style32\">适用范围</span>] 仅用于结构化模板表单　</p>\r\n");
      out.write("<p>[<span class=\"style32\">参数</span>]</p>\r\n");
      out.write("<table width=\"100%\" style=\"font-size:12px\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#999999\">\r\n");
      out.write("  <tr bgcolor=\"#FFFFFF\">\r\n");
      out.write("    <td width=\"14%\" nowrap><div align=\"center\">参数</div></td>\r\n");
      out.write("    <td width=\"9%\"><div align=\"center\">类型</div></td>\r\n");
      out.write("    <td width=\"77%\"><div align=\"center\">说明</div></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr bgcolor=\"#FFFFFF\">\r\n");
      out.write("    <td nowrap>title</td>\r\n");
      out.write("    <td nowrap>字符串</td>\r\n");
      out.write("    <td>窗口标题</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr bgcolor=\"#FFFFFF\">\r\n");
      out.write("    <td nowrap>width</td>\r\n");
      out.write("    <td nowrap>整数</td>\r\n");
      out.write("    <td>窗口宽度</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr bgcolor=\"#FFFFFF\">\r\n");
      out.write("    <td nowrap>height</td>\r\n");
      out.write("    <td nowrap>整数</td>\r\n");
      out.write("    <td>窗口高度</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr bgcolor=\"#FFFFFF\">\r\n");
      out.write("    <td nowrap>template</td>\r\n");
      out.write("    <td nowrap>整数或字符串</td>\r\n");
      out.write("    <td>模板的ID或名称或代码 </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr bgcolor=\"#FFFFFF\">\r\n");
      out.write("    <td nowrap>param</td>\r\n");
      out.write("    <td nowrap>对象</td>\r\n");
      out.write("    <td>传入的参数，必须是一个javascript对象 ,该对象可以在打开的模板使用 <span class=\"s2\">getDialogParameter</span>获取 </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("<p>[<span class=\"style32\">返回值</span>] 返回一个对象， 其中属性 &quot;返回值对象.onOK&quot; 表示是否按的确认按钮 。  &quot;返回值对象.returnValue&quot;是点击确认按钮后执行函数返回的字符串</p>\r\n");
      out.write("<p>[<span class=\"style32\">示例</span>1]</p>\r\n");
      out.write("<p>   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;脚本&nbsp;<a href=\"../../../../showjs.jsp?file=NBSWY4BPONRXE2LQORWGK5BPWWX3H5WKXWY2RMPNWSYL7WRPWWX3H5WKXWY2RMPNWSYL7WRONJZQ\"  target=\"_blank\" >详看示例</a></p>\r\n");
      out.write("<p>[<span class=\"style32\">示例</span>2]</p>\r\n");
      out.write("<p><img src=\"p1.jpg\" width=\"833\" height=\"247\"></p>\r\n");
      out.write("<p>点击“指定领用方案”后，执行如下脚本段：<br>\r\n");
      out.write("</p>\r\n");
      out.write("<p>...... </p>\r\n");
      out.write("<p> var zdcb= detailDs.getString(row,&quot;zdcb&quot;);</p>\r\n");
      out.write("<p> var param={hwid:hwid,gg:gg,chdd:chdd,sl:sl,zdcb:zdcb};<br>\r\n");
      out.write("  <br>\r\n");
      out.write("  var ret=<span class=\"s1\">openReportDialog</span>('出库成本个别认定',740,400,9,param);<br>\r\n");
      out.write("  <br>\r\n");
      out.write("  if(<span class=\"s1\">ret.onOK</span>) //表示弹出窗口点击“确定”关闭 <br>\r\n");
      out.write("  {<br>\r\n");
      out.write("  &nbsp;&nbsp;&nbsp;&nbsp;var zdcb= <span class=\"s1\">ret.returnValue</span>; //读取点击确定后的返回数据<br>\r\n");
      out.write("  &nbsp;&nbsp;&nbsp;&nbsp;detailDs.setValue(row,&quot;gbrd&quot;,1);<br>\r\n");
      out.write("  &nbsp;&nbsp;&nbsp;&nbsp;detailDs.setValue(row,&quot;zdcb&quot;,zdcb);<br>\r\n");
      out.write("  <br>\r\n");
      out.write("  }<br>\r\n");
      out.write("</p>\r\n");
      out.write("<p>注意<span class=\"s1\">openReportDialog</span>('出库成本个别认定',740,400,<span class=\"s3\">9</span>,param);其中的<span class=\"s3\">9</span>表示的要打开的结构化模板的ID，</p>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p>该段脚本执行后，弹出窗口显示的界面如下：</p>\r\n");
      out.write("<p><img src=\"p2.jpg\" width=\"829\" height=\"474\"></p>\r\n");
      out.write("<p>在弹出窗口的脚本中，有如下脚本 </p>\r\n");
      out.write("<p>function flowOpen()<br>\r\n");
      out.write("  {<br>\r\n");
      out.write("  <br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var parm=<span class=\"s2\">getDialogParameter</span>();<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var sheet=book.getWorkSheet(0);<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;sheet.cells(&quot;classname&quot;).setValue( getStringFromSQL(&quot;select classname from kc_dm_kchw where id='&quot;+parm.hwid+&quot;'&quot;));<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;sheet.cells(&quot;gg&quot;).setValue(parm.gg);<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;sheet.cells(&quot;chdd&quot;).setValue(parm.chdd);<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;sheet.cells(&quot;sl_need&quot;).setValue(parm.sl);<br>\r\n");
      out.write("<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var where=&quot; hwid='&quot;+parm.hwid+&quot;' and gg='&quot;+parm.gg+&quot;' and chdd='&quot;+parm.chdd+&quot;'&quot;;<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;book.getDataSource('query_1').getDataStore().retrieve(where);<br>\r\n");
      out.write("<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;loadZDCB(parm.zdcb);<br>\r\n");
      out.write("}<br>\r\n");
      out.write("</p>\r\n");
      out.write("<p>当点击“确定”按钮后，执行该模板中的名为dialogOnOK 函数 ，脚本如下：</p>\r\n");
      out.write("<p>function <span class=\"s2\">dialogOnOK</span>()<br>\r\n");
      out.write("  {<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var sheet=book.getWorkSheet(0);<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var sum_sl_ck=sheet.cells(&quot;sum_sl_ck&quot;).getValueDouble();<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var sl_need=sheet.cells(&quot;sl_need&quot;).getValueDouble();<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;if( sum_sl_ck!=sl_need)<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;{<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert('指定的出库数量与需要出库的数量不相等，请仔细检查');<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return null;<span class=\"s3\"> //返回null 表示不允许确定返回</span><br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;}<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var ds=\tbook.getDataSource('query_1').getDataStore();<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var ret=&quot;&quot;;<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;var di=0;<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;for( var i=0;i&lt;ds.getRowCount();i++)<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;{<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var sl_ck= ds.getDouble(i,&quot;sl_ck&quot;);<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(sl_ck&gt;0)<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;di++;<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret=ret+&quot;&lt;rkmx_id_&quot;+di+&quot;&gt;&quot;+ds.getString(i,&quot;id&quot;)+&quot;&lt;/rkmx_id_&quot;+di+&quot;&gt;&quot; +<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&lt;sl_&quot;+di+&quot;&gt;&quot;+sl_ck+&quot;&lt;/sl_&quot;+di+&quot;&gt;&quot; ;&nbsp;&nbsp;&nbsp;&nbsp;<br>\r\n");
      out.write("<br>\r\n");
      out.write("<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;}<br>\r\n");
      out.write("<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;ret=ret+&quot;&lt;count&gt;&quot;+di+&quot;&lt;/count&gt;&quot;;<br>\r\n");
      out.write("<br>\r\n");
      out.write("<br>\r\n");
      out.write("&nbsp;&nbsp;&nbsp;&nbsp;return  ret ;</p>\r\n");
      out.write("<p><br>\r\n");
      out.write("}</p>\r\n");
      out.write("<p class=\"STYLE34\">小结：</p>\r\n");
      out.write("<ol>\r\n");
      out.write("  <li>  使用 openReportDialog打开另一个模板</li>\r\n");
      out.write("  <li>在打开的模板中使用 getDialogParameter得到传入的参数</li>\r\n");
      out.write("  <li>在打开的模板中增加一个名为dialogOnOK的函数以响应按钮“确定”的点击操作。</li>\r\n");
      out.write("</ol>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p><br>\r\n");
      out.write("</p>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p>&nbsp;</p>\r\n");
      out.write("<p></p>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            if (response.isCommitted()) {
              out.flush();
            } else {
              out.clearBuffer();
            }
          } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
