equipmentevaluate.jsp 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp" %>
  3. <head>
  4. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
  5. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
  6. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
  7. <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagridpage.js"></script><script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  8. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  9. <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  10. <script type="text/javascript">
  11. function wpsChangeValue(){
  12. // 场站编号
  13. var wfId = $("#wfId").val();
  14. if(wfId==''){
  15. $("#model").text('');
  16. $("#quantity").text('');
  17. $("#capacity").text('');
  18. $("#capacityunit").text('');
  19. } else {
  20. $.ajax({
  21. type:"POST",
  22. url:"/singleMachineAnalysis/valueChangeGetData.action?wfId="+wfId,
  23. success:function(data){
  24. var d = eval("("+data+")");
  25. var model = d.model;
  26. var quantity = d.quantity;
  27. var capacity = d.capacity;
  28. var capacityunit = d.capacityunit;
  29. $("#model").text(model);
  30. $("#quantity").text(quantity+'台');
  31. $("#capacity").text(capacity);
  32. $("#capacityunit").text(capacityunit);
  33. $("#ts").removeAttr("disabled");
  34. }
  35. });
  36. }
  37. }
  38. function tsChangeValue(){
  39. var tsselected = $("#ts").val();
  40. var vtext = $("#"+tsselected).text();
  41. $("#tsv").text(vtext);
  42. }
  43. // 进行评估
  44. function evaluateAction(){
  45. // 校验场站、体系、时间是否选中
  46. var wfId = $("#wfId").val();
  47. var tid = $("#ts").val();
  48. var recordDate = $("#recordDate").val();
  49. if(wfId==''){
  50. alert('请选择场站名称!');
  51. return false;
  52. }
  53. if(tid==''){
  54. alert('请选择体系名称!');
  55. return false;
  56. }
  57. if(recordDate==''){
  58. alert('请选择时间范围!');
  59. return false;
  60. }
  61. // 获取评估日期
  62. var evaluateDate = $("#evaluateDate").val();
  63. confirm_ = confirm('确认要进行评估吗?');
  64. if(confirm_){
  65. $.ajax({
  66. type:"POST",
  67. url:encodeURI(encodeURI("/singleMachineAnalysis/evaluate.action?wfId="+wfId+"&tid="+tid+"&recordDate="+recordDate+"&evaluateDate="+evaluateDate)),
  68. success:function(data){
  69. var d = eval("("+data+")");
  70. if(d.action=='success'){
  71. alert("评估成功,请到评估列表查看!");
  72. }else{
  73. alert("无风机统计分析数据,不能进行评估!");
  74. }
  75. }
  76. });
  77. }
  78. }
  79. // 评估列表查看
  80. function evaluateView(){
  81. $("#f1").submit();
  82. }
  83. $(function(){
  84. });
  85. </script>
  86. <style type="text/css">
  87. fieldset legend {
  88. color:#302A2A;
  89. font: bold 16px/2 Verdana, Geneva, sans-serif;
  90. font-weight: bold;
  91. text-align: left;
  92. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  93. }
  94. </style>
  95. </head>
  96. <body>
  97. <div style="margin-top: 10px;margin-left: 10px">场站基本信息</div>
  98. <hr>
  99. <table style="width: 100%;border-style:double;">
  100. <tr>
  101. <td style="width: 80px;">场站名称:</td>
  102. <td><s:select list="windpowers" cssStyle="width:173px;" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="请选择" onchange="wpsChangeValue()"></s:select><font color="red">*</font></td>
  103. </tr>
  104. <tr>
  105. <td style="height: 30px;">设备型号:</td>
  106. <td><font id="model"></font></td>
  107. </tr>
  108. <tr>
  109. <td style="height: 30px;">装机容量:</td>
  110. <td><font id="capacity"></font><font id="capacityunit"></font></td>
  111. </tr>
  112. <tr>
  113. <td style="height: 30px;">装机台数:</td>
  114. <td><font id="quantity"></font></td>
  115. </tr>
  116. <tr>
  117. <td style="height: 30px;">体系名称:</td>
  118. <td><s:select list="targetSystems" cssStyle="width:173px;" listKey="id" listValue="name" id="ts" name="ts" headerKey="" headerValue="请选择" onchange="tsChangeValue()"></s:select><font color="red">*</font></td>
  119. </tr>
  120. <tr>
  121. <td style="height: 30px;">指标体系:</td>
  122. <td><font id="tsv"></font></td>
  123. </tr>
  124. <tr>
  125. <td style="height: 30px;">时间范围:</td>
  126. <td>
  127. <s:textfield
  128. cssClass="Wdate"
  129. onFocus="WdatePicker({dateFmt:'yyyy-MM',isShowWeek:true,readOnly:true})"
  130. id="recordDate" name="recordDate" title="日期" /><font color="red" style="margin-left: 10px;">*</font>
  131. </td>
  132. </tr>
  133. <tr>
  134. <td style="height: 30px;">评估时间:</td>
  135. <td>${evaluateDate}</td>
  136. </tr>
  137. </table>
  138. <div align="right" style="padding-top: 5px;padding-right: 10px;"><input type="button" class="button" onclick="evaluateView()" id="evaluateViewBtn" value="返回" style="margin-right: 10px;"/><input type="button" class="button" onclick="evaluateAction()" id="evaluateBtn" value="进行评估"/></div>
  139. <input type="text" id="evaluateDate" value="${evaluateDate}" style="display: none;"/>
  140. <s:iterator value="targetSystems" var="bean">
  141. <div id="${bean.id}" style="display: none;">场站:${bean.windPowestationName}&nbsp工程:${bean.projectName}&nbsp线路:${bean.lineName}&nbsp设备型号${bean.equipmentId}</div>
  142. </s:iterator>
  143. <form id="f1" action="/singleMachineAnalysis/evaluateViewMain.action" method="post"></form>
  144. </body>