b80cbdea3d087f6cabc406582d44e1e3dd757837.svn-base 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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. <%@include file="../../../include.jsp" %>
  8. <!--引用资源文件,JS CSS-->
  9. <script type="text/javascript" src="/nwyj/scripts/jquery/plugins/jquery.extension.util.js"></script>
  10. <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/common.js"></script>
  11. <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
  12. <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
  13. <script type="text/javascript" src="/nwyj/scripts/common/common.js"></script>
  14. <script type="text/javascript" src="/nwyj/scripts/business/he/common/common.js"></script>
  15. <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
  16. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
  17. <link href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css" />
  18. <script type="text/javascript" src="/nwyj/scripts/business/gps/programManagement/createPlan.js"></script>
  19. <script type="text/javascript" src="/nwyj/scripts/business/am/org/maintenance/orgSel.js"></script>
  20. <style type="text/css">
  21. .bg_readonly{
  22. color:#cccccc !important;
  23. background:none repeat-x scroll left top #eeeeee!important;
  24. }
  25. </style>
  26. <script type="text/javascript">
  27. var fd_id = "<%=request.getParameter("fd_id")%>";
  28. //取得用户真实名字
  29. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  30. //部门id
  31. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  32. //部门名称
  33. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
  34. //父部门id
  35. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  36. var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  37. var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  38. var CorpName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  39. //用于确定日期比较结果
  40. var is_ok_time = true;
  41. //页面初始化
  42. $(function(){
  43. $("#back").hover(function(){
  44. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  45. },function(){
  46. $(this).attr("src","/nwyj/images/temp/back.png");
  47. });
  48. $('#GPS_SIREL_610').initCanstSelect('BM_GPS_TASK_RWLY');
  49. $('#GPS_LEVEL_610').initCanstSelect('BM_GPS_PROGRAM_MANAGE_GPS_LEVEL');
  50. $('#GPS_TASK_PROPERTY_610').initCanstSelect('BM_GPS_TASK_RWXZ');
  51. $('#GPS_TASK_PLAN_TYPE_610').initCanstSelect('BM_GPS_TASK_JHX');
  52. $('#GPS_SIREL_610').initCanstSelect('BM_GPS_TASK_RWLY');
  53. $('#GPS_TASK_TYPE_610').initCanstSelect('BM_GPS_TASK_RWLB');
  54. //alert(dept_level);
  55. //修改表单
  56. var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  57. $("#GPS_AREA_ID_610").OrgSel({
  58. selectedMulti : true,
  59. loadId_in:CorpArea,loadCorp:"loadCorp",
  60. orgWidth : "95%",
  61. setMulti : {
  62. "Y" : "p",
  63. "N" : "s"
  64. }
  65. });
  66. $("#fileDiv").newAsyncFileUpload("",fd_id,1);
  67. if(fd_id.length>0){
  68. $("#titleShow").text("生成保供电任务");
  69. edit();
  70. }/* else{
  71. $("#titleShow").text("生成保供电任务");
  72. $("#INPUT_UNIT_NAME_610").val(CorpName);
  73. $("#INPUT_UNIT_ID_610").val(CorpArea);
  74. $("#INPUT_TIME_610").val(getDateTime());
  75. $("#INPUT_NAME_610").val(realName);
  76. $("#INPUT_NAME_ID_610").val(userId);
  77. $("#PARENT_DEPT_ID_610").val(parentId);
  78. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  79. var params = {
  80. classid : '800',
  81. objectID : CorpArea
  82. };
  83. } */
  84. });
  85. //获得当前系统时间
  86. function getDateTime(){
  87. var s="";
  88. var d = allGetServerTime();
  89. var vYear = d.getFullYear();
  90. var vMon = d.getMonth() + 1;
  91. var vDay = d.getDate();
  92. var h = d.getHours();
  93. var m = d.getMinutes();
  94. var se = d.getSeconds();
  95. s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m)+":"+(se<10 ? "0" +se : se);
  96. return s;
  97. }
  98. //获取当前系统时间(年-月)
  99. function getYearMonth(){
  100. var s="";
  101. var d = new Date();
  102. var vYear = d.getFullYear();
  103. var vMon = d.getMonth() + 1;
  104. /* var vDay = d.getDate();
  105. var h = d.getHours();
  106. var m = d.getMinutes();
  107. var se = d.getSeconds(); */
  108. s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon);
  109. return s;
  110. }
  111. function edit(){
  112. //保供电级别
  113. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  114. var params = {
  115. classid : '610',
  116. objectID : fd_id
  117. };
  118. $.request.query(url,params,function(data){
  119. /* if(data.IMPLEMENT_TIME_610!="" || data.IMPLEMENT_TIME_610!=undefined){
  120. var time = data.IMPLEMENT_TIME_610;
  121. //alert(time);
  122. data.IMPLEMENT_TIME_610 = time.substring(0,7);
  123. } */
  124. $('#editForm').ajaxWrite({data:data});
  125. $("#INPUT_UNIT_NAME_610").val(CorpName);
  126. $("#INPUT_UNIT_ID_610").val(CorpArea);
  127. $("#GPS_LEVEL_610").setValue(data.GPS_LEVEL_610);
  128. $('#editForm input[name="classid"]').val('610');
  129. $('#show_GPS_AREA_ID_610').val(data.GPS_AREA_NAME_610);
  130. $("#GPS_AREA_NAME_610").val(data.GPS_AREA_NAME_610);
  131. $("#GPS_AREA_ID_610").val(data.GPS_AREA_ID_610);
  132. $("#GPS_AREA_ID_610_show").val(data.GPS_AREA_NAME_610);
  133. });
  134. }
  135. //检查日期
  136. function checkdate(){
  137. is_ok_time = false;
  138. var begintimestr = $("#START_TIME_610").val();
  139. var endtimestr = $("#END_TIME_610").val();
  140. if(begintimestr=="" || begintimestr==null || begintimestr==undefined ||
  141. endtimestr =="" || endtimestr == null || endtimestr ==undefined){
  142. return;
  143. }
  144. /* var begintime = stringToDate(begintimestr);//该方法在common.js中
  145. var engtime = stringToDate(endtimestr);
  146. alert(begintime)
  147. if(begintime > engtime){
  148. is_ok_time = true;
  149. } */
  150. if(begintimestr>endtimestr){
  151. is_ok_time = true;
  152. }
  153. }
  154. // 重置
  155. function formReset(){
  156. $('#frmright', window.parent.document).attr('src',$.pathname()+"/page/business/gps/programManagement/programManagementAddEdit.jsp?fd_id="+fd_id);
  157. }
  158. function changeTaskNum(){
  159. var xz = $("#GPS_TASK_PROPERTY_610").val();
  160. var jb = $("#GPS_LEVEL_610").val();
  161. var lb = $("#GPS_TASK_TYPE_610").val();
  162. var ly = $("#GPS_SIREL_610").val();
  163. $("#GPS_TASK_NUMBER_610").val(xz+jb+lb+ly);
  164. }
  165. </script>
  166. </head>
  167. <body class="bd" align="center" >
  168. <div id="formContent" class="d_ground">
  169. <div class="title" align="center"><a href="javascript:;"><img class="back" id='back' align="left" alt="返回" src="/nwyj/images/temp/back.png" ></img></a><font class="title_font" id="titleShow"></font></div>
  170. <form id="editForm">
  171. <input name="classid" value="610" type="hidden" />
  172. <input type="hidden" name="FD_OBJECTID610" value=""/>
  173. <input name="INPUT_NAME_610" id="INPUT_NAME_610" type="hidden">
  174. <input name="INPUT_UNIT_NAME_610" id="INPUT_UNIT_NAME_610" type="hidden">
  175. <input name="INPUT_UNIT_ID_610" id="INPUT_UNIT_ID_610" type="hidden">
  176. <input name="GPS_YEAR_610" id="GPS_YEAR_610" type="hidden">
  177. <input id="INPUT_NAME_ID_610" name="INPUT_NAME_ID_610" type="hidden"/>
  178. <input name="INPUT_TIME_610" id="INPUT_TIME_610" type="hidden">
  179. <!-- <input name="GPS_AREA_NAME_610" id="GPS_AREA_NAME_610" type="hidden"> -->
  180. <input name="PROGRAM_STATE_610" id="PROGRAM_STATE_610" value="1" type="hidden">
  181. <input name="TASK_STATE_610" id="TASK_STATE_610" value="0" type="hidden">
  182. <input name="PARENT_DEPT_ID_610" id="PARENT_DEPT_ID_610" type="hidden"/>
  183. <input name="GPS_AREA_NAME_610" id="GPS_AREA_NAME_610" type="hidden"/>
  184. <input name="GPS_CONTINATION_TIME_610" id="GPS_CONTINATION_TIME_610" type="hidden"/>
  185. <input name="GPS_AREA_ID_FU_610" id="GPS_AREA_ID_FU_610" type="hidden"/>
  186. <br/>
  187. <div class="button_jl">
  188. <input value="生成任务" type="button" id="save" />&nbsp;&nbsp;
  189. <input value="重置" type="button" onclick="formReset()"/>
  190. </div><br />
  191. <fieldset class="fieldset">
  192. <legend class="legend">基本信息:</legend>
  193. <table class="tableStyle" >
  194. <tr>
  195. <td width="15%" class="class_color" align="right" ><span class="star">*</span>任务名称:</td>
  196. <td width="35%" ><input name="PROGRAM_NAME_610" class="validate[required,custom[illegalLetter]]" id="PROGRAM_NAME_610" type="text" value="" maxlength="100" style="width:85%"></td>
  197. <td width="15%" class="class_color" align="right"><span class="star">*</span>任务性质:</td>
  198. <td width="35%"><select id="GPS_TASK_PROPERTY_610" name="GPS_TASK_PROPERTY_610" class="validate[required] selectWidth " swidth="88%" onchange="changeTaskNum();" prompt="请选择"></select></td>
  199. </tr>
  200. <tr>
  201. <td width="15%" class="class_color" align="right" ><span class="star">*</span>任务编号:</td>
  202. <td width="35%" ><input name="GPS_TASK_NUMBER_610" readonly="readonly" class="validate[required,custom[illegalLetter]] bg_readonly" id="GPS_TASK_NUMBER_610" type="text" value="" maxlength="100" style="width:85%"></td>
  203. <td width="15%" class="class_color" align="right"><span class="star">*</span>任务级别:</td>
  204. <td width="35%"><select id="GPS_LEVEL_610" name="GPS_LEVEL_610" class="validate[required] selectWidth " swidth="88%" onchange="changeTaskNum();" prompt="请选择"></select></td>
  205. </tr>
  206. <tr>
  207. <td width="15%" class="class_color" align="right" ><span class="star">*</span>保供电区域:</td>
  208. <td width="35%" ><input name="GPS_AREA_CITY_610" class="validate[required,custom[illegalLetter]]" id="GPS_AREA_CITY_610" type="text" value="" maxlength="100" style="width:85%"></td>
  209. <td width="15%" class="class_color" align="right"><span class="star">*</span>任务类别:</td>
  210. <td width="35%"><select id="GPS_TASK_TYPE_610" name="GPS_TASK_TYPE_610" class="validate[required] selectWidth " swidth="88%" onchange="changeTaskNum();" prompt="请选择"></select></td>
  211. </tr>
  212. <tr>
  213. <td width="15%" class="class_color" align="right"><span class="star">*</span>任务计划性:</td>
  214. <td width="35%"><select id="GPS_TASK_PLAN_TYPE_610" name="GPS_TASK_PLAN_TYPE_610" class="validate[required] selectWidth " swidth="88%" prompt="请选择"></select></td>
  215. <td width="15%" class="class_color" align="right"><span class="star">*</span>任务来源:</td>
  216. <td width="35%"><select id="GPS_SIREL_610" name="GPS_SIREL_610" class="validate[required] selectWidth " swidth="88%" onchange="changeTaskNum();" prompt="请选择"></select></td>
  217. </tr>
  218. <tr>
  219. <td class="class_color" align="right"><span class="star">*</span>开始日期:</td>
  220. <td ><input type="text" id="START_TIME_610" readOnly="readOnly" name="START_TIME_610" class="date validate[required]" dateFmt="yyyy-MM-dd" style="width:88%" onchange="checkdate()"/></td>
  221. <td class="class_color" align="right"><span class="star">*</span>结束日期:</td>
  222. <td ><input type="text" id="END_TIME_610" readOnly="readOnly" name="END_TIME_610" class="date validate[required]" dateFmt="yyyy-MM-dd" style="width:88%" onchange="checkdate()"/></td>
  223. </tr>
  224. <tr>
  225. <td class="class_color" align="right"><span class="star">*</span>保供电实施单位:</td>
  226. <td colspan="3" ><div id="GPS_AREA_ID_610" ></div></td>
  227. </tr>
  228. </table>
  229. </fieldset>
  230. <!-- <fieldset class="fieldset">
  231. <legend class="legend">保供电资源投入:</legend>
  232. <fieldset class="fieldset1">
  233. <legend class="legend">应急发电车(UPS电源):</legend>
  234. <table class="tableStyle" >
  235. <tr>
  236. <td width="15%" class="class_color" align="right">单日最大用量:</td>
  237. <td width="35%" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_FDC_DAY_610" inputMode="numberOnly" id="GPS_TASK_FDC_DAY_610">&nbsp;/台</td>
  238. <td width="16%" class="class_color" align="right">投入总量:</td>
  239. <td width="34%" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK__FDC_TOTAL_610" inputMode="numberOnly" id="GPS_TASK__FDC_TOTAL_610">&nbsp;/台次</td>
  240. </tr>
  241. </table>
  242. </fieldset>
  243. -->
  244. <!-- <fieldset class="fieldset1">
  245. <legend class="legend">应急发电机(UPS电源):</legend>
  246. <table class="tableStyle" >
  247. <tr>
  248. <td width="15%" class="class_color" align="right">单日最大用量:</td>
  249. <td width="35%" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_FDJ_DAY_610" inputMode="numberOnly" id="GPS_TASK_FDJ_DAY_610">&nbsp;/台</td>
  250. <td width="16%" class="class_color" align="right">投入总量:</td>
  251. <td width="34%" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_FDJ_TOTAL_610" inputMode="numberOnly" id="GPS_TASK_FDJ_TOTAL_610">&nbsp;/台次</td>
  252. </tr>
  253. </table>
  254. </fieldset>
  255. <table class="tableStyle" >
  256. <tr>
  257. <td width="17%" class="class_color" align="right">车辆:</td>
  258. <td colspan="3" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_CAR_610" inputMode="numberOnly" id="GPS_TASK_CAR_610">&nbsp;/辆次</td>
  259. </tr>
  260. </table>
  261. </fieldset>
  262. <fieldset class="fieldset">
  263. <legend class="legend">保供电人员投入:</legend>
  264. <table class="tableStyle" >
  265. <tr>
  266. <td width="17%" class="class_color" align="right">值班指挥管理人员:</td>
  267. <td width="32%" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_ZBZHGLRY_610" inputMode="numberOnly" id="GPS_TASK_ZBZHGLRY_610">&nbsp;/人日</td>
  268. <td width="15%" class="class_color" align="right">本单位班组人员:</td>
  269. <td width="35%" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_BDWBZRY_610" inputMode="numberOnly" id="GPS_TASK_BDWBZRY_610">&nbsp;/人日</td>
  270. </tr>
  271. <tr>
  272. <td class="class_color" align="right">安保人员:</td>
  273. <td ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_ABRY_610" inputMode="numberOnly" id="GPS_TASK_ABRY_610">&nbsp;/人日</td>
  274. <td class="class_color" align="right">外委生产人员:</td>
  275. <td ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_WWSCRY_610" inputMode="numberOnly" id="GPS_TASK_WWSCRY_610">&nbsp;/人日</td>
  276. </tr>
  277. </table>
  278. </fieldset> -->
  279. <fieldset class="fieldset">
  280. <legend class="legend">保供电来源文件:</legend>
  281. <table class="add_table_style file_table" >
  282. <tr>
  283. <td width="120px" align="right"><span class="td-font">上传附件:</span></td>
  284. <td width="680px" colspan="3" ><div style="width:100%" id="fileDiv" name="fileDiv" ></div></td>
  285. </tr>
  286. </table>
  287. </fieldset>
  288. </form>
  289. </div>
  290. </body>