editData.jsp 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <%@ page language="java" contentType="text/html;charset=utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <head>
  4. <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  5. <script language="javascript">
  6. $(function(){
  7. // if('<s:property value="supplier.id" />' != null){
  8. // $("#suppId").val('<s:property value="supplier.id" />');
  9. // changeSelect();
  10. // }
  11. var wfid='<s:property value="wfId" />';
  12. if(wfid!='')
  13. {
  14. changeFc(wfid);
  15. }
  16. });
  17. function returnIndex(){
  18. $("#f1").attr("action", "planIndex.action").attr("validate", false).submit();
  19. }
  20. function returnEdit(){
  21. $("#f1").attr("action", "editData.action").attr("validate", false).submit();
  22. }
  23. function returnDetail(){
  24. $("#f1").attr("action", "editData.action").attr("validate", false).submit();
  25. }
  26. function save(){
  27. alert($("#id").text());
  28. if($("#id").text()==null)
  29. {
  30. var wfId=$("#wfId").val();
  31. var projectid=$("#projectid").val();
  32. var year=$("vo\.year").val();
  33. if(wfId=='undefined' || wfId=='' )
  34. {
  35. alert("请选择场站编号");
  36. return false;
  37. }
  38. if(projectid=='undefined' || projectid=='')
  39. {
  40. alert("请选择项目编号");
  41. return false;
  42. }
  43. if(year==null || year=='')
  44. {
  45. alert("请选择年份");
  46. return false;
  47. }
  48. }
  49. $("#f1").attr("action", "saveData.action").submit();
  50. }
  51. function selectAll(t) {
  52. $("input[name='wtIds']").attr("checked", t.checked);
  53. }
  54. function changeFc(fcId){
  55. var url = "changeWindpowerAjax.action?wfId="+fcId;
  56. $.ajax({
  57. type:"post",
  58. url:url,
  59. dataType:"json",
  60. success: function(data){
  61. if(data.length != 0){
  62. eval(data);
  63. $("#projectid").empty();
  64. $("#projectid").append("<option value=''>请选择</option>");
  65. for(var i=0; i<data.length; i++){
  66. $("#projectid").append("<option value='"+data[i].id+"'>"+data[i].name+"</option>");
  67. }
  68. }else{
  69. $("#projectid").empty();
  70. $("#projectid").append("<option value=''>请选择</option>");
  71. }
  72. }
  73. });
  74. }
  75. </script>
  76. <style type="text/css">
  77. .mycss {
  78. font-family: "宋体";
  79. font-size: 12px;
  80. color: #000;
  81. text-decoration: none;
  82. }
  83. </style>
  84. </head>
  85. <body>
  86. <s:form action="" method="post" id="f1">
  87. <lt:token/>
  88. <s:hidden name="page"></s:hidden>
  89. <s:hidden name="pageSize"></s:hidden>
  90. <s:hidden name="year"></s:hidden>
  91. <s:hidden name="vo.windpower"></s:hidden>
  92. <s:hidden name="vo.projectid"></s:hidden>
  93. <table width="100%">
  94. <tr>
  95. <td id="id" align="left" class="mycss">
  96. ${vo.id==null?"新增计划发电量":"修改计划发电量" }
  97. </td>
  98. <td align="right">
  99. <input type="button" class="button" value='保存' onclick="javascript:save()"/>
  100. <s:if test="vo.id != null">
  101. <input type="button" class="button" value='返回' onclick="javascript:returnIndex()"/>
  102. </s:if>
  103. <s:else>
  104. <input type="button" class="button" value='返回' onclick="javascript:returnIndex()"/>
  105. </s:else>
  106. </td>
  107. </tr>
  108. </table>
  109. <hr />
  110. <s:actionerror />
  111. <s:actionmessage />
  112. <!-- 页面修改 开始 -->
  113. <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#f1f1f1">
  114. <tr>
  115. <td width="20%" height="26" bgcolor="#f1f1f1"><span class="mycss">风场:</span></td>
  116. <td width="30%" bgcolor="#f1f1f1"><span class="mycss">
  117. <s:if test="vo == null">
  118. <s:select list="windpowers" cssStyle="width:90%" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="请选择" onchange="javascript:changeFc(this.value);" ></s:select>
  119. </s:if>
  120. <s:else>
  121. <s:property value="vo.windpowerName" />
  122. </s:else>
  123. </span></td>
  124. <td width="20%" height="26" bgcolor="#f1f1f1"><span class="mycss">项目:</span></td>
  125. <td width="30%" bgcolor="#f1f1f1"><span class="mycss">
  126. <s:if test="vo == null">
  127. <select name="projectid" id="projectid" style="width:90%">
  128. <option value="">请选择</option>
  129. </select>
  130. </s:if>
  131. <s:else>
  132. <s:property value="vo.projectName" />
  133. </s:else>
  134. </span></td>
  135. </tr>
  136. <tr>
  137. <td width="20%" height="26" bgcolor="#ffffff"><span class="mycss">年:</span></td>
  138. <td width="30%" bgcolor="#ffffff" colspan="3"><span class="mycss">
  139. <s:if test="vo == null">
  140. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy',isShowWeek:true,readOnly:true})"
  141. id="vo.year" name="vo.year" title="开始日期"/>
  142. </s:if>
  143. <s:else>
  144. <s:property value="vo.year" />
  145. </s:else>
  146. </span></td>
  147. </tr>
  148. <tr>
  149. <td width="20%" height="26" bgcolor="#f1f1f1"><span class="mycss">1月份计划发电量(万kWh):</span></td>
  150. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc01" name="vo.gc01" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  151. </tr>
  152. <tr>
  153. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">2月份计划发电量(万kWh):</span></td>
  154. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc02" name="vo.gc02" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  155. </tr>
  156. <tr>
  157. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">3月份计划发电量(万kWh):</span></td>
  158. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc03" name="vo.gc03" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  159. </tr>
  160. <tr>
  161. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">4月份计划发电量(万kWh):</span></td>
  162. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc04" name="vo.gc04" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  163. </tr>
  164. <tr>
  165. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">5月份计划发电量(万kWh):</span></td>
  166. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc05" name="vo.gc05" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  167. </tr>
  168. <tr>
  169. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">6月份计划发电量(万kWh):</span></td>
  170. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc06" name="vo.gc06" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  171. </tr>
  172. <tr>
  173. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">7月份计划发电量(万kWh):</span></td>
  174. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc07" name="vo.gc07" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  175. </tr>
  176. <tr>
  177. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">8月份计划发电量(万kWh):</span></td>
  178. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc08" name="vo.gc08" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  179. </tr>
  180. <tr>
  181. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">9月份计划发电量(万kWh):</span></td>
  182. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc09" name="vo.gc09" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  183. </tr>
  184. <tr>
  185. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">10月份计划发电量(万kWh):</span></td>
  186. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc10" name="vo.gc10" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  187. </tr>
  188. <tr>
  189. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">11月份计划发电量(万kWh):</span></td>
  190. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc11" name="vo.gc11" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  191. </tr>
  192. <tr>
  193. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">12月份计划发电量(万kWh):</span></td>
  194. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.gc12" name="vo.gc12" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  195. </tr>
  196. <tr>
  197. <td width="10%" height="26" bgcolor="#f1f1f1"><span class="mycss">全年计划发电量(万kWh):</span></td>
  198. <td colspan="3" width="40%" bgcolor="#f1f1f1"><span class="mycss"><s:textfield id="vo.generatingcapacity" name="vo.generatingcapacity" title="计划发电量" maxlength="500" cssStyle="width:90%"/></span></td>
  199. </tr>
  200. </table>
  201. <!-- 页面修改 结束 -->
  202. </s:form>
  203. </body>