123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <%@include file="../../../../include.jsp" %>
- <!--引用资源文件,JS CSS-->
- <script type="text/javascript" src="/nwyj/scripts/jquery/plugins/jquery.extension.util.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/common.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/common/common.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/business/he/common/common.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
- <link href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="/nwyj/scripts/business/gps/queryStatistics/list/List_addEdit.js"></script>
- <script type="text/javascript">
- var fd_id = "<%=request.getParameter("fd_id")%>";
- //取得用户真实名字
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- //部门id
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
- //部门名称
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
- //父部门id
- var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
- var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var CorpName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
- //页面初始化
- $(function(){
-
- $("#back").hover(function(){
- $(this).attr("src","/nwyj/images/temp/back_hover.png");
- },function(){
- $(this).attr("src","/nwyj/images/temp/back.png");
- });
- //alert(dept_level);
- //修改表单
-
- var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var url = $.pathname() + '/ws/BGDMXB/BGDMXBService/queryByConditions/';
- var params = {
- deptId : CorpArea,
- userId:userId
- };
- $.ajax({
- url : url,
- type : 'post',
- data : params,
- dataType : 'text',
- success : function(data){
- data = eval('('+data+')');
- $("#FD_TASK_613").data("data",data);
- $("#FD_TASK_613").render();
- },
- error : function(e){
- $.messager.alert('查询任务失败!', 'error');
- }
- });
-
- $("#FD_TASK_613").live("change",function(){
- if(!$(this).attr("relValue")){
- // top.Dialog.alert("");
- }else{
- var node=$(this).data("selectedNode");
- $("#FD_TASK_NAME_613").val($(this).attr("relText"));//任务名称
- var time = node.ISSUE_TIME;
- if(time.trim()!="" || time!="null" || time!=null){
- time = time.substring(0,16);
- }else{
- time = getDateTime();
- }
- $("#BGD_RW_TIME_613").val(time);//任务时间
- //单位
- var deptJson = [];
- var deptName = node.GPS_AREA_NAME;
- deptName = deptName.split(",");
- for(var i = 0; i < deptName.length; i++){
- deptJson.push({"key":deptName[i],"value":deptName[i]});
- }
- $("#BGD_DW_613").data("data",deptJson);
- $("#BGD_DW_613").render();
- //级别
- var gps_level = node.GPS_LEVEL;
- if(gps_level==0){
- $("#BGD_LEVEL_613").val("特级");
- }else if(gps_level==1){
- $("#BGD_LEVEL_613").val("一级");
- }else if(gps_level==2){
- $("#BGD_LEVEL_613").val("二级");
- }else if(gps_level==3){
- $("#BGD_LEVEL_613").val("三级");
- }
- }
- })
- if(fd_id.length>0){
- $("#titleShow").text("修改保供电明细");
- edit();
-
- }else{//新增
- $("#titleShow").text("添加保供电明细");
- $("#INPUT_DEPT_613").val(CorpName);
- $("#INPUT_TIME_613").val(getDateTime());
- $("#INPUT_NAME_613").val(realName);
- }
-
- });
- //获得当前系统时间
- function getDateTime(){
- var s="";
- var d = allGetServerTime();
- var vYear = d.getFullYear();
- var vMon = d.getMonth() + 1;
- var vDay = d.getDate();
- var h = d.getHours();
- var m = d.getMinutes();
- var se = d.getSeconds();
- 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);
- return s;
- }
-
- function edit(){
- //保供电级别
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '613',
- objectID : fd_id
- };
- $.request.query(url,params,function(data){
- $('#editForm').ajaxWrite({data:data});
- setTimeout('$("#FD_TASK_613").change(); $("#FD_TASK_613").setValue(data.FD_TASK_613); $("#BGD_DW_613").render(); ', '100');
-
- });
- }
-
- // 重置
- function formReset(){
- $('#frmright', window.parent.document).attr('src',$.pathname()+"/page/business/gps/queryStatistics/list/List_add.jsp?fd_id="+fd_id);
- }
-
- </script>
- </head>
- <body class="bd" align="center" >
- <div id="formContent" class="d_ground">
- <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>
- <form id="editForm">
- <input name="classid" value="613" type="hidden" />
- <input type="hidden" name="FD_OBJECTID613" value=""/>
- <input name="INPUT_NAME_613" id="INPUT_NAME_613" type="hidden">
- <input name="INPUT_TIME_613" id="INPUT_TIME_613" type="hidden">
- <input name="INPUT_DEPT_613" id="INPUT_DEPT_613" type="hidden">
- <input name="FD_TASK_NAME_613" id="FD_TASK_NAME_613" type="hidden">
- <br/>
- <div class="button_jl">
- <input value="保存" type="button"
- id="save" /> <input value="重置" input
- type="button" onclick="formreset()" />
- </div><br />
- <fieldset class="fieldset">
- <legend class="legend">基本信息:</legend>
- <table class="add_table_style" >
- <tr>
- <td width="25%" align="right"><span class="star">*</span>保供电任务名称:</td>
- <td width="25%" ><select name="FD_TASK_613" class="validate[required] selectWidth " swidth="98%" id="FD_TASK_613" prompt="请选择"></select></td>
-
- <td width="25%" align="right"><span class="star">*</span>保供电级别:</td>
- <td width="25%"><input id="BGD_LEVEL_613" name="BGD_LEVEL_613" type="text" readonly="readonly" class="validate[required]" ></td>
- </tr>
- <tr>
- <td width="25%" align="right"><span class="star">*</span>单位:</td>
- <td width="25%" ><select id="BGD_DW_613" name="BGD_DW_613" class="validate[required] selectWidth " swidth="98%" prompt="请选择"></select></td>
-
- <td width="25%" align="right"><span class="star">*</span>保供电任务时间:</td>
- <td width="25%" >
- <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]" />
- </tr>
- <tr>
- <td width="25%" align="right"><span class="star">*</span>保供电投入人员(人次):</td>
- <td width="25%" ><input type="text" class="validate[required,custom[onlyNumber]]" maxlength="6" name="MAN_COUNT_613" inputMode="numberOnly"id="MAN_COUNT_613"></td>
-
- <td width="25%" align="right"><span class="star">*</span>保供电投入车辆(台次):</td>
- <td width="25%" ><input type="text" class="validate[required,custom[onlyNumber]]" maxlength="6" name="CAR_COUNT_613" inputMode="numberOnly" id="CAR_COUNT_613"></td>
- </tr>
- <tr>
- <td width="25%" align="right"><span class="star">*</span>保供电投入应急发电车(台):</td>
- <td width="25%" ><input type="text" class="validate[required,custom[onlyNumber]]" maxlength="6" name="BGD_FDC_613" inputMode="numberOnly" id="BGD_FDC_613"></td>
-
- <td width="25%" align="right"><span class="star">*</span>保供电投入应急发电机(台):</td>
- <td width="25%" ><input type="text" class="validate[required,custom[onlyNumber]]" maxlength="6" name="BGD_FDJ_613" inputMode="numberOnly" id="BGD_FDJ_613"></td>
- </tr>
- <tr>
- <td width="25%" align="right">型号:</td>
- <td width="25%" ><input type="text" name="XINGHAO_613" id="XINGHAO_613"></td>
-
- <td width="25%" align="right">容量:</td>
- <td width="25%" ><input type="text" name="RONGLIANG_613" id="RONGLIANG_613"></td>
- </tr>
- <tr>
- <td width="25%" align="right">厂家:</td>
- <td width="25%" ><input type="text" name="CHANJIA_613" id="CHANJIA_613"></td>
-
- <td width="25%" align="right">其他应急装备:</td>
- <td width="25%" ><input type="text" name="QTZHUNGBEI_613" id="QTZHUNGBEI_613"></td>
- </tr>
- </table>
- </fieldset>
- </form>
- </div>
- </body>
|