123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- <%@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/programManagement/createPlan.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/business/am/org/maintenance/orgSel.js"></script>
- <style type="text/css">
- .bg_readonly{
- color:#cccccc !important;
- background:none repeat-x scroll left top #eeeeee!important;
- }
- </style>
- <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();
- //用于确定日期比较结果
- var is_ok_time = true;
-
- //页面初始化
- $(function(){
-
- $("#back").hover(function(){
- $(this).attr("src","/nwyj/images/temp/back_hover.png");
- },function(){
- $(this).attr("src","/nwyj/images/temp/back.png");
- });
-
- $('#GPS_SIREL_610').initCanstSelect('BM_GPS_TASK_RWLY');
- $('#GPS_LEVEL_610').initCanstSelect('BM_GPS_PROGRAM_MANAGE_GPS_LEVEL');
- $('#GPS_TASK_PROPERTY_610').initCanstSelect('BM_GPS_TASK_RWXZ');
- $('#GPS_TASK_PLAN_TYPE_610').initCanstSelect('BM_GPS_TASK_JHX');
- $('#GPS_SIREL_610').initCanstSelect('BM_GPS_TASK_RWLY');
- $('#GPS_TASK_TYPE_610').initCanstSelect('BM_GPS_TASK_RWLB');
-
- //alert(dept_level);
- //修改表单
- var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- $("#GPS_AREA_ID_610").OrgSel({
- selectedMulti : true,
- loadId_in:CorpArea,loadCorp:"loadCorp",
- orgWidth : "95%",
- setMulti : {
- "Y" : "p",
- "N" : "s"
- }
- });
- $("#fileDiv").newAsyncFileUpload("",fd_id,1);
- if(fd_id.length>0){
- $("#titleShow").text("生成保供电任务");
- edit();
-
- }/* else{
- $("#titleShow").text("生成保供电任务");
- $("#INPUT_UNIT_NAME_610").val(CorpName);
- $("#INPUT_UNIT_ID_610").val(CorpArea);
- $("#INPUT_TIME_610").val(getDateTime());
- $("#INPUT_NAME_610").val(realName);
- $("#INPUT_NAME_ID_610").val(userId);
- $("#PARENT_DEPT_ID_610").val(parentId);
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '800',
- objectID : CorpArea
- };
-
- } */
-
- });
- //获得当前系统时间
- 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 getYearMonth(){
- var s="";
- var d = new Date();
- 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);
- return s;
- }
- function edit(){
- //保供电级别
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '610',
- objectID : fd_id
- };
- $.request.query(url,params,function(data){
- /* if(data.IMPLEMENT_TIME_610!="" || data.IMPLEMENT_TIME_610!=undefined){
- var time = data.IMPLEMENT_TIME_610;
- //alert(time);
- data.IMPLEMENT_TIME_610 = time.substring(0,7);
- } */
- $('#editForm').ajaxWrite({data:data});
- $("#INPUT_UNIT_NAME_610").val(CorpName);
- $("#INPUT_UNIT_ID_610").val(CorpArea);
- $("#GPS_LEVEL_610").setValue(data.GPS_LEVEL_610);
- $('#editForm input[name="classid"]').val('610');
- $('#show_GPS_AREA_ID_610').val(data.GPS_AREA_NAME_610);
- $("#GPS_AREA_NAME_610").val(data.GPS_AREA_NAME_610);
- $("#GPS_AREA_ID_610").val(data.GPS_AREA_ID_610);
- $("#GPS_AREA_ID_610_show").val(data.GPS_AREA_NAME_610);
- });
- }
- //检查日期
- function checkdate(){
- is_ok_time = false;
- var begintimestr = $("#START_TIME_610").val();
- var endtimestr = $("#END_TIME_610").val();
- if(begintimestr=="" || begintimestr==null || begintimestr==undefined ||
- endtimestr =="" || endtimestr == null || endtimestr ==undefined){
- return;
- }
- /* var begintime = stringToDate(begintimestr);//该方法在common.js中
- var engtime = stringToDate(endtimestr);
- alert(begintime)
- if(begintime > engtime){
- is_ok_time = true;
- } */
- if(begintimestr>endtimestr){
- is_ok_time = true;
- }
- }
- // 重置
- function formReset(){
- $('#frmright', window.parent.document).attr('src',$.pathname()+"/page/business/gps/programManagement/programManagementAddEdit.jsp?fd_id="+fd_id);
- }
-
- function changeTaskNum(){
- var xz = $("#GPS_TASK_PROPERTY_610").val();
- var jb = $("#GPS_LEVEL_610").val();
- var lb = $("#GPS_TASK_TYPE_610").val();
- var ly = $("#GPS_SIREL_610").val();
- $("#GPS_TASK_NUMBER_610").val(xz+jb+lb+ly);
- }
- </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="610" type="hidden" />
- <input type="hidden" name="FD_OBJECTID610" value=""/>
- <input name="INPUT_NAME_610" id="INPUT_NAME_610" type="hidden">
- <input name="INPUT_UNIT_NAME_610" id="INPUT_UNIT_NAME_610" type="hidden">
- <input name="INPUT_UNIT_ID_610" id="INPUT_UNIT_ID_610" type="hidden">
- <input name="GPS_YEAR_610" id="GPS_YEAR_610" type="hidden">
- <input id="INPUT_NAME_ID_610" name="INPUT_NAME_ID_610" type="hidden"/>
- <input name="INPUT_TIME_610" id="INPUT_TIME_610" type="hidden">
- <!-- <input name="GPS_AREA_NAME_610" id="GPS_AREA_NAME_610" type="hidden"> -->
- <input name="PROGRAM_STATE_610" id="PROGRAM_STATE_610" value="1" type="hidden">
- <input name="TASK_STATE_610" id="TASK_STATE_610" value="0" type="hidden">
- <input name="PARENT_DEPT_ID_610" id="PARENT_DEPT_ID_610" type="hidden"/>
- <input name="GPS_AREA_NAME_610" id="GPS_AREA_NAME_610" type="hidden"/>
- <input name="GPS_CONTINATION_TIME_610" id="GPS_CONTINATION_TIME_610" type="hidden"/>
- <input name="GPS_AREA_ID_FU_610" id="GPS_AREA_ID_FU_610" type="hidden"/>
- <br/>
- <div class="button_jl">
- <input value="生成任务" type="button" id="save" />
- <input value="重置" type="button" onclick="formReset()"/>
- </div><br />
- <fieldset class="fieldset">
- <legend class="legend">基本信息:</legend>
- <table class="tableStyle" >
- <tr>
- <td width="15%" class="class_color" align="right" ><span class="star">*</span>任务名称:</td>
- <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>
-
- <td width="15%" class="class_color" align="right"><span class="star">*</span>任务性质:</td>
- <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>
- </tr>
- <tr>
- <td width="15%" class="class_color" align="right" ><span class="star">*</span>任务编号:</td>
- <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>
-
- <td width="15%" class="class_color" align="right"><span class="star">*</span>任务级别:</td>
- <td width="35%"><select id="GPS_LEVEL_610" name="GPS_LEVEL_610" class="validate[required] selectWidth " swidth="88%" onchange="changeTaskNum();" prompt="请选择"></select></td>
- </tr>
- <tr>
- <td width="15%" class="class_color" align="right" ><span class="star">*</span>保供电区域:</td>
- <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>
-
- <td width="15%" class="class_color" align="right"><span class="star">*</span>任务类别:</td>
- <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>
- </tr>
- <tr>
- <td width="15%" class="class_color" align="right"><span class="star">*</span>任务计划性:</td>
- <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>
-
- <td width="15%" class="class_color" align="right"><span class="star">*</span>任务来源:</td>
- <td width="35%"><select id="GPS_SIREL_610" name="GPS_SIREL_610" class="validate[required] selectWidth " swidth="88%" onchange="changeTaskNum();" prompt="请选择"></select></td>
- </tr>
- <tr>
- <td class="class_color" align="right"><span class="star">*</span>开始日期:</td>
- <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>
- <td class="class_color" align="right"><span class="star">*</span>结束日期:</td>
- <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>
- </tr>
- <tr>
- <td class="class_color" align="right"><span class="star">*</span>保供电实施单位:</td>
- <td colspan="3" ><div id="GPS_AREA_ID_610" ></div></td>
- </tr>
- </table>
- </fieldset>
-
- <!-- <fieldset class="fieldset">
- <legend class="legend">保供电资源投入:</legend>
- <fieldset class="fieldset1">
- <legend class="legend">应急发电车(UPS电源):</legend>
- <table class="tableStyle" >
- <tr>
- <td width="15%" class="class_color" align="right">单日最大用量:</td>
- <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"> /台</td>
- <td width="16%" class="class_color" align="right">投入总量:</td>
- <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"> /台次</td>
- </tr>
- </table>
- </fieldset>
- -->
- <!-- <fieldset class="fieldset1">
- <legend class="legend">应急发电机(UPS电源):</legend>
- <table class="tableStyle" >
- <tr>
- <td width="15%" class="class_color" align="right">单日最大用量:</td>
- <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"> /台</td>
- <td width="16%" class="class_color" align="right">投入总量:</td>
- <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"> /台次</td>
- </tr>
- </table>
- </fieldset>
-
- <table class="tableStyle" >
- <tr>
- <td width="17%" class="class_color" align="right">车辆:</td>
- <td colspan="3" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_CAR_610" inputMode="numberOnly" id="GPS_TASK_CAR_610"> /辆次</td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset class="fieldset">
- <legend class="legend">保供电人员投入:</legend>
- <table class="tableStyle" >
- <tr>
- <td width="17%" class="class_color" align="right">值班指挥管理人员:</td>
- <td width="32%" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_ZBZHGLRY_610" inputMode="numberOnly" id="GPS_TASK_ZBZHGLRY_610"> /人日</td>
- <td width="15%" class="class_color" align="right">本单位班组人员:</td>
- <td width="35%" ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_BDWBZRY_610" inputMode="numberOnly" id="GPS_TASK_BDWBZRY_610"> /人日</td>
- </tr>
- <tr>
- <td class="class_color" align="right">安保人员:</td>
- <td ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_ABRY_610" inputMode="numberOnly" id="GPS_TASK_ABRY_610"> /人日</td>
- <td class="class_color" align="right">外委生产人员:</td>
- <td ><input type="text" class="validate[custom[onlyNumber]]" maxlength="6" name="GPS_TASK_WWSCRY_610" inputMode="numberOnly" id="GPS_TASK_WWSCRY_610"> /人日</td>
- </tr>
- </table>
- </fieldset> -->
-
- <fieldset class="fieldset">
- <legend class="legend">保供电来源文件:</legend>
- <table class="add_table_style file_table" >
- <tr>
- <td width="120px" align="right"><span class="td-font">上传附件:</span></td>
- <td width="680px" colspan="3" ><div style="width:100%" id="fileDiv" name="fileDiv" ></div></td>
- </tr>
- </table>
- </fieldset>
- </form>
- </div>
- </body>
|