123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <%@ page language="java" contentType="text/html;charset=utf-8"%>
- <%@include file="/pages/includes/taglibs.jsp"%>
- <head>
- <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
- <script language="javascript">
- $(function(){
- // if('<s:property value="supplier.id" />' != null){
- // $("#suppId").val('<s:property value="supplier.id" />');
- // changeSelect();
- // }
- });
-
- function returnIndex(){
- $("#f1").attr("action", "index.action").attr("validate", false).submit();
- }
-
- function returnEdit(){
- $("#f1").attr("action", "editData.action").attr("validate", false).submit();
- }
-
- function returnDetail(){
- $("#f1").attr("action", "detail.action").attr("validate", false).submit();
- }
-
- function save(){
- var curDate = new Date();
- var windspeed = $("#windspeed").val();
- var limitload = $("#limitload").val();
- var thisload = $("#thisload").val();
- var lossPower = $("#lossPower").val();
-
- // 为空判断
- windspeed = windspeed.replace(/\s+/g, "");
- /*if(windspeed==""){
- alert("当日值不能为空");
- return false;
- }*/
-
- // 非法数字判断
- if(isNaN(windspeed)){
- alert("风速必须为数字");
- return false;
- }if(isNaN(limitload)){
- alert("限电负荷必须为数字");
- return false;
- }if(isNaN(thisload)){
- alert("当时负荷必须为数字");
- return false;
- }if(isNaN(lossPower)){
- alert("损失电量必须为数字");
- return false;
- }
- if($("#beginDate").val() > $("#endDate").val()){
- alert("恢复时刻不允许小于限电时刻!");
- }else if($("#endDate").val() > curDate){
- alert("恢复时刻不允许大于当前日期!");
- }else{
- $("#f1").attr("action", "saveData.action").submit();
- }
- }
- function selectAll(t) {
- $("input[name='wtIds']").attr("checked", t.checked);
- }
- </script>
- <style type="text/css">
- .mycss {
- font-family: "宋体";
- font-size: 12px;
- color: #000;
- text-decoration: none;
-
- }
- </style>
- </head>
- <body>
- <s:form action="" method="post" id="f1">
- <lt:token/>
- <s:hidden name="page"></s:hidden>
- <s:hidden name="pageSize"></s:hidden>
- <s:hidden name="mainBrownouts.id"></s:hidden>
- <s:hidden name="wfId"></s:hidden>
- <table width="100%">
- <tr>
- <td align="left" class="mycss">
- ${mainBrownouts.id==null?"新增限电事件":"修改限电事件" }
- </td>
- <td align="right">
- <input type="button" class="button" value='保存' onclick="javascript:save()"/>
- <s:if test="mainBrownouts.id != null">
- <input type="button" class="button" value='返回' onclick="javascript:returnDetail()"/>
- </s:if>
- <s:else>
- <input type="button" class="button" value='返回' onclick="javascript:returnIndex()"/>
- </s:else>
-
-
- </td>
- </tr>
- </table>
- <hr />
- <s:actionerror cssClass="mycss"/>
- <s:actionmessage cssClass="mycss"/>
- <!-- 页面修改 开始 -->
- <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C1C1C1">
- <tr>
-
- </tr>
- <tr>
- <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">限电原因:</span></td>
- <td width="40%" bgcolor="#efefef"><span class="mycss"><s:select id="description" name="mainBrownouts.description" cssClass="required"
- list="%{#{'大风天气限负荷':'大风天气限负荷','调峰困难限负荷':'调峰困难限负荷','网架结构限负荷':'网架结构限负荷',
- '电网事故抢修限负荷':'电网事故抢修限负荷','线路检修限负荷':'线路检修限负荷','热电夜间供热限负荷':'热电夜间供热限负荷'}}" /></span></td>
-
-
- <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">限电类型:</span></td>
- <td width="40%" bgcolor="#efefef"><span class="mycss"><s:if test="mainBrownouts.id == null">
- <s:select id="stopTypeId" list="%{#{'停机限电':'停机限电','非停机限电':'非停机限电'}}" name="mainBrownouts.stopTypeId" cssClass="required"/>
- </s:if>
- <s:else>
- <s:property value="mainBrownouts.stopTypeId" />
- </s:else></span></td>
- </tr>
- <tr>
- <td width="10%" height="26" bgcolor="#ffffff"><span class="mycss">限电指令:</span></td>
- <td width="40%" bgcolor="#ffffff"><span class="mycss"><s:textfield id="brownoutsDirective" name="mainBrownouts.brownoutsDirective" title="限电指令" cssStyle="width:90%"/></span></td>
-
-
- <td width="10%" height="26" bgcolor="#ffffff"><span class="mycss">当时风速(m/s):</span></td>
- <td width="40%" bgcolor="#ffffff"><span class="mycss"><s:textfield id="windspeed" name="mainBrownouts.windspeed" title="当时风速" cssStyle="width:90%" cssClass="numberbox gt0"/></span></td>
- </tr>
- <tr>
- <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">限电负荷(万kW):</span></td>
- <td width="40%" bgcolor="#efefef"><span class="mycss"><s:textfield id="limitload" name="mainBrownouts.limitload" title="限电负荷" cssStyle="width:90%" cssClass="numberbox gt0"/></span></td>
-
-
- <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">当时负荷(万kW):</span></td>
- <td width="40%" bgcolor="#efefef"><span class="mycss"><s:textfield id="thisload" name="mainBrownouts.thisload" title="当时负荷" cssStyle="width:90%" cssClass="numberbox gt0"/></span></td>
- </tr>
- <tr>
- <td width="10%" height="26" bgcolor="#ffffff"><span class="mycss">限电时刻:</span></td>
- <td width="40%" bgcolor="#ffffff"><span class="mycss"><s:if test="mainBrownouts .id== null">
- <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowWeek:true,readOnly:true})"
- id="beginDate" name="beginTime" title="开始日期"/>
- </s:if>
- <s:else>
- <s:date name="mainBrownouts.stopTime" format="yyyy-MM-dd HH:mm:ss"/>
- </s:else></span></td>
-
-
- <td width="10%" height="26" bgcolor="#ffffff"><span class="mycss">恢复时刻:</span></td>
- <td width="40%" bgcolor="#ffffff"><span class="mycss"><s:if test="mainBrownouts.id == null">
- <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowWeek:true,readOnly:true})"
- id="endDate" name="endTime" title="结束日期"/>
- </s:if>
- <s:else>
- <s:date name="mainBrownouts.startTime" format="yyyy-MM-dd HH:mm:ss"/>
- </s:else></span></td>
- </tr>
- <tr>
- <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">损失电量(万kWh):</span></td>
- <td colspan="3" width="40%" bgcolor="#efefef"><span class="mycss"><s:textfield cssClass="numberbox gt0" id="lossPower" name="mainBrownouts.lossPower" title="损失电量" maxlength="500" cssStyle="width:90%"/></td>
-
-
-
- </tr>
-
-
- </table>
- <s:if test="mainBrownouts.id == null">
- <table width="98%">
- <tr>
- <td>
- 选择风机:<input type=checkbox name=ck id=ck onclick=javascript:selectAll(this)></input>(全选)
- </td>
- </tr>
- </table>
- <table width="98%">
-
- <tr>
- <td>
- <div >
- <s:checkboxlist list="wts" name="wtIds" listKey="id" listValue="code" theme="xhtml" template="customcheckboxlist.ftl"></s:checkboxlist>
- </div>
- </td>
- </tr>
-
- </table>
- </s:if>
- <!-- 页面修改 结束 -->
-
- </s:form>
- </body>
|