7d8acc99007fde4bf32a66029d262102f94d07b6.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>新增报表填报要求</title>
  7. <link rel="stylesheet" type="text/css"
  8. href="/nwyj/scripts/qui/libs/css/import_basic.css" />
  9. <link rel="stylesheet" type="text/css" id="skin"
  10. prePath="/nwyj/scripts/qui/" scrollerY="false" />
  11. <link rel="stylesheet" type="text/css" id="customSkin" />
  12. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  13. <script type="text/javascript"
  14. src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
  15. <script type="text/javascript"
  16. src="/nwyj/scripts/qui/libs/js/framework.js"></script>
  17. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
  18. <!--框架必需end-->
  19. <script type="text/javascript"
  20. src="/nwyj/scripts/qui/libs/js/text/vticker.js"></script>
  21. <!--自动提示框start-->
  22. <script type='text/javascript'
  23. src='/nwyj/scripts/qui/libs/js/form/suggestion.js'></script>
  24. <!--自动提示框end-->
  25. <!--数据表格start-->
  26. <script type="text/javascript"
  27. src="/nwyj/scripts/qui/libs/js/table/quiGrid.js"></script>
  28. <!--数据表格end-->
  29. <!--表单提交start-->
  30. <script type="text/javascript"
  31. src="/nwyj/scripts/qui/libs/js/form/form.js"></script>
  32. <!--表单提交end-->
  33. <!--表单验证start-->
  34. <script type="text/javascript"
  35. src="/nwyj/scripts/qui/libs/js/form/validation.js"></script>
  36. <script type="text/javascript"
  37. src="/nwyj/scripts/qui/libs/js/form/validationRule.js"></script>
  38. <!--表单提交end-->
  39. <!--数据表格end-->
  40. <script type="text/javascript"
  41. src="/nwyj/scripts/qui/libs/thirdparty/highcharts/js/highcharts.js"></script>
  42. <!--弹窗组件start-->
  43. <script type="text/javascript"
  44. src="/nwyj/scripts/qui/libs/js/popup/messager.js"></script>
  45. <script type="text/javascript"
  46. src="/nwyj/scripts/qui/libs/js/popup/drag.js"></script>
  47. <script type="text/javascript"
  48. src="/nwyj/scripts/qui/libs/js/popup/dialog.js"></script>
  49. <!--弹窗组件end-->
  50. <!--布局组件start-->
  51. <script type="text/javascript"
  52. src="/nwyj/scripts/qui/libs/js/nav/layout.js"></script>
  53. <!--布局组件start-->
  54. <!--基本选项卡start-->
  55. <script type="text/javascript"
  56. src="/nwyj/scripts/qui/libs/js/nav/basicTab.js"></script>
  57. <!--基本选项卡end-->
  58. <!--动态选项卡start-->
  59. <script type="text/javascript"
  60. src="/nwyj/scripts/qui/libs/js/nav/dynamicTab.js"></script>
  61. <!--动态选项卡end-->
  62. <!--树组件start-->
  63. <link rel="stylesheet" type="text/css"
  64. href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" />
  65. <script type="text/javascript"
  66. src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
  67. <script type="text/javascript"
  68. src="/nwyj/scripts/qui/libs/js/tree/ztree/exhide.js"></script>
  69. <!-- 树形下拉框start -->
  70. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/selectTree.js"></script>
  71. <!-- 树形下拉框end -->
  72. <!-- 扩展工具js -->
  73. <script type="text/javascript"
  74. src="/nwyj/scripts/jquery/plugins/jquery.extension.util.js"></script>
  75. <script type="text/javascript"
  76. src="/nwyj/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
  77. <script type="text/javascript"
  78. src="/nwyj/scripts/freamwork/com/sinosoft/common/common.js"></script>
  79. <script type="text/javascript"
  80. src="/nwyj/scripts/freamwork/com/sinosoft/common/DateUtil.js"></script>
  81. <script type="text/javascript"
  82. src="/nwyj/scripts/commom/common/common.js"></script>
  83. <!--浮动面板start-->
  84. <script type="text/javascript"
  85. src="/nwyj/scripts/qui/libs/js/popup/floatPanel.js"></script>
  86. <!--浮动面板end-->
  87. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  88. <script type="text/javascript" src="addReportRequire.js"></script>
  89. <script type="text/javascript" src="/nwyj/scripts/setiframeheight.js"></script>
  90. <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/system/invoking/invoking.js"></script>
  91. <script type="text/javascript" src="/nwyj/scripts/showLoading/jquery.showLoading.js"></script>
  92. <link type="text/css" href="/nwyj/page/business/em/report/reportCss/report.css" rel="stylesheet"/>
  93. <style type="text/css">
  94. body{
  95. padding:0px;
  96. margin:0px;
  97. }
  98. ._button{
  99. margin-left: 81%;
  100. margin-top: 10px;
  101. margin-bottom: 10px;
  102. }
  103. .planDiv{
  104. margin:0 auto;
  105. position: relative;
  106. top:5px;
  107. }
  108. .mainCon{
  109. float:none;
  110. }
  111. .add{
  112. margin: 10px 0 0 0 ;
  113. }
  114. .button{
  115. min-width: 40px;
  116. }
  117. </style>
  118. <script type="text/javascript">
  119. var fd_id = "<%=request.getParameter("fd_id")%>";
  120. //获取用户Id
  121. var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  122. //获取用户部门Id
  123. var dept_id = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  124. //获取公司Id
  125. var comp_id = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  126. var role_id = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
  127. var dept_name = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  128. var real_name = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  129. var login_name = top.com.sinosoft.lz.system.user.LoginInfo.getLogin_name();
  130. var is_overTime = false;
  131. //获取时间
  132. function goback(){
  133. window.parent.document.getElementById("frmright").setAttribute("src", "/nwyj/page/business/am/report/reportinputrequest/Report_Require.jsp");
  134. }
  135. function pagereset(){
  136. window.parent.document.getElementById("frmright").setAttribute("src", "/nwyj/page/business/am/report/reportinputrequest/addReportRequire.jsp?fd_id="+fd_id);
  137. };
  138. $(function(){
  139. $("#back").hover(function(){
  140. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  141. },function(){
  142. $(this).attr("src","/nwyj/images/temp/back.png");
  143. });
  144. $("#COMP_ID_429").val(dept_id);
  145. $("#COMP_NAME_429").val(dept_name);
  146. $("#USER_ID_429").val(userId);
  147. $("#USER_NAME_429").val(real_name);
  148. $("#FILL_IN_SCHEDULE_429").initCanstSelect('BM_AM_ReportStat_LJP');
  149. /* $("#FILL_IN_SCHEDULE_429").data("data",circleJson);
  150. $("#FILL_IN_SCHEDULE_429").render(); */
  151. var deptUrl = $.pathname() + '/ws/rcbaobiao/RcBbService/getRequireTabList';
  152. $.post(deptUrl,{comp_id:dept_id},function(data){
  153. $("#report_type").data("data",data);
  154. $("#report_type").render();
  155. }, "json");
  156. var getRoleId = getRole_id(role_id);
  157. var deptUrl = $.pathname()+ "/ws/xianlutingyun/XianlutingyunService/getChildComp";
  158. $.post(deptUrl,{comp_id:dept_id,role_id:getRoleId},function(data){
  159. $("#REPORT_DEPT_429").data("data",data);
  160. $("#REPORT_DEPT_429").render();
  161. }, "json");
  162. $(".tem_content").each(function(){
  163. $(this).hide();
  164. });
  165. $(".tem_content #TEMPORARY_TIME_429").removeClass("validate[required]");
  166. if(fd_id!=undefined&&fd_id!=""&&fd_id!="null"){//修改表单
  167. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  168. var params = {
  169. classid : '429',
  170. objectID : fd_id
  171. };
  172. $.request.query(url,params,function(data){
  173. $('#requireForm').ajaxWrite({data:data});
  174. var reportName = data.PROJECT_NAME_429.split("_")[0];
  175. var circle_num = data.FILL_IN_SCHEDULE_429;
  176. if(circle_num=="5"){
  177. $(".tem_content").each(function(){
  178. $(this).show();
  179. });
  180. $(".tem_content #TEMPORARY_TIME_429").addClass("validate[required]");
  181. }
  182. });
  183. }else{//新增
  184. }
  185. if(fd_id=="null"){
  186. $("#add").text("新增填报要求");
  187. $("#title").text("新增填报要求");
  188. }else{
  189. $("#add").text("修改填报要求");
  190. $("#title").text("修改填报要求");
  191. }
  192. });
  193. //获取当前时间
  194. function getTime(){
  195. var now=allGetServerTime();
  196. var year = now.getFullYear();
  197. var month=now.getMonth()+1;
  198. if(month>=1&&month<=9){
  199. month = "0"+month;
  200. }
  201. //获取日期
  202. var day=now.getDate();
  203. if(day>=1&&day<=9){
  204. day = "0"+day;
  205. }
  206. var currenttime = year+"-"+month+"-"+day;
  207. return currenttime;
  208. };
  209. function checkTime(tem_val){
  210. var currtime = getTime();
  211. tem_val = Date.parse(new Date(tem_val.replace(/-/g,"/")));
  212. currtime = Date.parse(new Date(currtime.replace(/-/g,"/")));
  213. if(tem_val<currtime){
  214. is_overTime = true;
  215. top.Dialog.alert("自定义时间应大于当前时间!");
  216. }
  217. }
  218. function getProjectName(){
  219. is_overTime = false;
  220. var circle_num = $("#FILL_IN_SCHEDULE_429").attr("relvalue");
  221. if(circle_num=="5"){
  222. $(".tem_content").each(function(){
  223. $(this).show();
  224. });
  225. $(".tem_content #TEMPORARY_TIME_429").addClass("validate[required]");
  226. }else{
  227. $(".tem_content").each(function(){
  228. $(this).hide();
  229. });
  230. $(".tem_content #TEMPORARY_TIME_429").val("");
  231. $(".tem_content #TEMPORARY_TIME_429").removeClass("validate[required]");
  232. }
  233. var reportType = $("#report_type").attr("reltext");
  234. var circle = $("#FILL_IN_SCHEDULE_429").attr("reltext");
  235. var tem_val = $("#TEMPORARY_TIME_429").val();
  236. if(tem_val!=""){
  237. checkTime(tem_val);
  238. }
  239. reportType = (reportType==undefined || reportType=="请选择")?"":reportType;
  240. circle = circle=="自定义"?tem_val:circle;
  241. circle = (circle==undefined || reportType=="请选择")?"":circle;
  242. $("#PROJECT_NAME_429").val(reportType+"_"+circle+"_"+"报表填报计划")
  243. }
  244. function getRole_id(id){
  245. if(id.indexOf(",")!=-1){
  246. var role_ids = id.split(",");
  247. for(var i=0;i<role_ids.length;i++){
  248. if(role_ids[i]=="R002105430210"||role_ids[i]=="R002105430211"||role_ids[i]=="R002105430212"||role_ids[i]=="R002105430213"){
  249. return role_ids[i];
  250. }
  251. }
  252. }else{
  253. return id;
  254. }
  255. }
  256. </script>
  257. </head>
  258. <body >
  259. <div class="box1"panelWidth="100%" panelHeight="500">
  260. <div class="title_msg" id="add"></div>
  261. <div class="pic" onclick="goback();" id="go">
  262. <a href="javascript:;">
  263. <img alt="返回" title="返回" src="/nwyj/images/temp/back.png" id="back">
  264. </a>
  265. </div>
  266. <div class="_button">
  267. <input type="button" value="保存并发布" id="saveAndRelease">&nbsp;&nbsp;
  268. <input value="保存" type="button" id="save"/>&nbsp;&nbsp;
  269. <input value="重置" type="button" onclick="pagereset();"/>
  270. </div>
  271. <fieldset>
  272. <legend id="title"></legend>
  273. <div class="planDiv">
  274. <form action="" id="requireForm">
  275. <input type="hidden" name="classid" value="429">
  276. <input type="hidden" name="FD_OBJECTID429" value=""/>
  277. <input type="hidden" value="0" id="SEND_STAT_429" name="SEND_STAT_429">
  278. <input type="hidden" id="COMP_ID_429" name="COMP_ID_429">
  279. <input type="hidden" id="COMP_NAME_429" name="COMP_NAME_429">
  280. <input type="hidden" id="USER_ID_429" name="USER_ID_429">
  281. <input type="hidden" id="REPORT_DEPT_NAME_429" name="REPORT_DEPT_NAME_429">
  282. <input type="hidden" id="USER_NAME_429" name="USER_NAME_429">
  283. <table class="tableStyle">
  284. <tr>
  285. <td width="10%" align="right"><span class="star">*</span>报表类型:</td>
  286. <td width="40%">
  287. <select id="report_type" prompt="请选择" selWidth="380" class="validate[required]" onchange="getProjectName();" name="REPORT_TYPE_429"></select>
  288. </td>
  289. <td width="10%" align="right"><span class="star">*</span>填报要求名称:</td>
  290. <td width="40%"><input type="text" readonly="readonly" name="PROJECT_NAME_429" id="PROJECT_NAME_429" style="width:90%" class="validate[required,length[0,40]]" ></td>
  291. </tr>
  292. <tr>
  293. <td width="10%" align="right"><span class="star">*</span>填报单位:</td>
  294. <td width="90%" colspan="3">
  295. <div class="selectTree validate[required]" id="REPORT_DEPT_429" name="REPORT_DEPT_429" multiMode="true" allSelectable="true" exceptParent="true" selWidth="380" ></div>
  296. </td>
  297. </tr>
  298. <tr>
  299. <td width="10%" align="right"><span class="star">*</span>填报周期:</td>
  300. <td width="40%">
  301. <select id="FILL_IN_SCHEDULE_429" name="FILL_IN_SCHEDULE_429" prompt="请选择" selWidth="380" class="validate[required]" onchange="getProjectName();"></select>
  302. </td>
  303. <td width="10%" align="right" class="tem_content"><span class="star" >*</span>自定义时间:</td>
  304. <td width="40%" class="tem_content">
  305. <input type="text" id="TEMPORARY_TIME_429" readOnly="readOnly" style="width:297px" name="TEMPORARY_TIME_429"
  306. class="date" dateFmt="yyyy-MM-dd" onchange="getProjectName();"/>
  307. </td>
  308. </tr>
  309. </table>
  310. </form>
  311. </div>
  312. </fieldset>
  313. </div>
  314. </body>
  315. </html>