5ff2c65b5460dd1542e9080af0446003f14d7daf.svn-base 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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/queryStatistics/list/List_addEdit.js"></script>
  19. <script type="text/javascript">
  20. var fd_id = "<%=request.getParameter("fd_id")%>";
  21. //取得用户真实名字
  22. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  23. //部门id
  24. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  25. //部门名称
  26. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
  27. //父部门id
  28. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  29. var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  30. var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  31. var CorpName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  32. //页面初始化
  33. $(function(){
  34. $("#back").hover(function(){
  35. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  36. },function(){
  37. $(this).attr("src","/nwyj/images/temp/back.png");
  38. });
  39. //alert(dept_level);
  40. //修改表单
  41. var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  42. var url = $.pathname() + '/ws/BGDMXB/BGDMXBService/queryByConditions/';
  43. var params = {
  44. deptId : CorpArea,
  45. userId:userId
  46. };
  47. $.ajax({
  48. url : url,
  49. type : 'post',
  50. data : params,
  51. dataType : 'text',
  52. success : function(data){
  53. data = eval('('+data+')');
  54. $("#FD_TASK_613").data("data",data);
  55. $("#FD_TASK_613").render();
  56. },
  57. error : function(e){
  58. $.messager.alert('查询任务失败!', 'error');
  59. }
  60. });
  61. $("#FD_TASK_613").live("change",function(){
  62. if(!$(this).attr("relValue")){
  63. // top.Dialog.alert("");
  64. }else{
  65. var node=$(this).data("selectedNode");
  66. $("#FD_TASK_NAME_613").val($(this).attr("relText"));//任务名称
  67. var time = node.ISSUE_TIME;
  68. if(time.trim()!="" || time!="null" || time!=null){
  69. time = time.substring(0,16);
  70. }else{
  71. time = getDateTime();
  72. }
  73. $("#BGD_RW_TIME_613").val(time);//任务时间
  74. //单位
  75. var deptJson = [];
  76. var deptName = node.GPS_AREA_NAME;
  77. deptName = deptName.split(",");
  78. for(var i = 0; i < deptName.length; i++){
  79. deptJson.push({"key":deptName[i],"value":deptName[i]});
  80. }
  81. $("#BGD_DW_613").data("data",deptJson);
  82. $("#BGD_DW_613").render();
  83. //级别
  84. var gps_level = node.GPS_LEVEL;
  85. if(gps_level==0){
  86. $("#BGD_LEVEL_613").val("特级");
  87. }else if(gps_level==1){
  88. $("#BGD_LEVEL_613").val("一级");
  89. }else if(gps_level==2){
  90. $("#BGD_LEVEL_613").val("二级");
  91. }else if(gps_level==3){
  92. $("#BGD_LEVEL_613").val("三级");
  93. }
  94. }
  95. })
  96. if(fd_id.length>0){
  97. $("#titleShow").text("修改保供电明细");
  98. edit();
  99. }else{//新增
  100. $("#titleShow").text("添加保供电明细");
  101. $("#INPUT_DEPT_613").val(CorpName);
  102. $("#INPUT_TIME_613").val(getDateTime());
  103. $("#INPUT_NAME_613").val(realName);
  104. }
  105. });
  106. //获得当前系统时间
  107. function getDateTime(){
  108. var s="";
  109. var d = allGetServerTime();
  110. var vYear = d.getFullYear();
  111. var vMon = d.getMonth() + 1;
  112. var vDay = d.getDate();
  113. var h = d.getHours();
  114. var m = d.getMinutes();
  115. var se = d.getSeconds();
  116. 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);
  117. return s;
  118. }
  119. function edit(){
  120. //保供电级别
  121. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  122. var params = {
  123. classid : '613',
  124. objectID : fd_id
  125. };
  126. $.request.query(url,params,function(data){
  127. $('#editForm').ajaxWrite({data:data});
  128. setTimeout('$("#FD_TASK_613").change(); $("#FD_TASK_613").setValue(data.FD_TASK_613); $("#BGD_DW_613").render(); ', '100');
  129. });
  130. }
  131. // 重置
  132. function formReset(){
  133. $('#frmright', window.parent.document).attr('src',$.pathname()+"/page/business/gps/queryStatistics/list/List_add.jsp?fd_id="+fd_id);
  134. }
  135. </script>
  136. </head>
  137. <body class="bd" align="center" >
  138. <div id="formContent" class="d_ground">
  139. <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>
  140. <form id="editForm">
  141. <input name="classid" value="613" type="hidden" />
  142. <input type="hidden" name="FD_OBJECTID613" value=""/>
  143. <input name="INPUT_NAME_613" id="INPUT_NAME_613" type="hidden">
  144. <input name="INPUT_TIME_613" id="INPUT_TIME_613" type="hidden">
  145. <input name="INPUT_DEPT_613" id="INPUT_DEPT_613" type="hidden">
  146. <input name="FD_TASK_NAME_613" id="FD_TASK_NAME_613" type="hidden">
  147. <br/>
  148. <div class="button_jl">
  149. <input value="保存" type="button"
  150. id="save" />&nbsp;&nbsp;<input value="重置" input
  151. type="button" onclick="formreset()" />
  152. </div><br />
  153. <fieldset class="fieldset">
  154. <legend class="legend">基本信息:</legend>
  155. <table class="add_table_style" >
  156. <tr>
  157. <td width="25%" align="right"><span class="star">*</span>保供电任务名称:</td>
  158. <td width="25%" ><select name="FD_TASK_613" class="validate[required] selectWidth " swidth="98%" id="FD_TASK_613" prompt="请选择"></select></td>
  159. <td width="25%" align="right"><span class="star">*</span>保供电级别:</td>
  160. <td width="25%"><input id="BGD_LEVEL_613" name="BGD_LEVEL_613" type="text" readonly="readonly" class="validate[required]" ></td>
  161. </tr>
  162. <tr>
  163. <td width="25%" align="right"><span class="star">*</span>单位:</td>
  164. <td width="25%" ><select id="BGD_DW_613" name="BGD_DW_613" class="validate[required] selectWidth " swidth="98%" prompt="请选择"></select></td>
  165. <td width="25%" align="right"><span class="star">*</span>保供电任务时间:</td>
  166. <td width="25%" >
  167. <input type="text" readonly="readonly" dateFmt="yyyy-MM-dd HH:mm" name="BGD_RW_TIME_613" id="BGD_RW_TIME_613" class="date validate[required]" />
  168. </tr>
  169. <tr>
  170. <td width="25%" align="right"><span class="star">*</span>保供电投入人员(人次):</td>
  171. <td width="25%" ><input type="text" class="validate[required,custom[onlyNumber]]" maxlength="6" name="MAN_COUNT_613" inputMode="numberOnly"id="MAN_COUNT_613"></td>
  172. <td width="25%" align="right"><span class="star">*</span>保供电投入车辆(台次):</td>
  173. <td width="25%" ><input type="text" class="validate[required,custom[onlyNumber]]" maxlength="6" name="CAR_COUNT_613" inputMode="numberOnly" id="CAR_COUNT_613"></td>
  174. </tr>
  175. <tr>
  176. <td width="25%" align="right"><span class="star">*</span>保供电投入应急发电车(台):</td>
  177. <td width="25%" ><input type="text" class="validate[required,custom[onlyNumber]]" maxlength="6" name="BGD_FDC_613" inputMode="numberOnly" id="BGD_FDC_613"></td>
  178. <td width="25%" align="right"><span class="star">*</span>保供电投入应急发电机(台):</td>
  179. <td width="25%" ><input type="text" class="validate[required,custom[onlyNumber]]" maxlength="6" name="BGD_FDJ_613" inputMode="numberOnly" id="BGD_FDJ_613"></td>
  180. </tr>
  181. <tr>
  182. <td width="25%" align="right">型号:</td>
  183. <td width="25%" ><input type="text" name="XINGHAO_613" id="XINGHAO_613"></td>
  184. <td width="25%" align="right">容量:</td>
  185. <td width="25%" ><input type="text" name="RONGLIANG_613" id="RONGLIANG_613"></td>
  186. </tr>
  187. <tr>
  188. <td width="25%" align="right">厂家:</td>
  189. <td width="25%" ><input type="text" name="CHANJIA_613" id="CHANJIA_613"></td>
  190. <td width="25%" align="right">其他应急装备:</td>
  191. <td width="25%" ><input type="text" name="QTZHUNGBEI_613" id="QTZHUNGBEI_613"></td>
  192. </tr>
  193. </table>
  194. </fieldset>
  195. </form>
  196. </div>
  197. </body>