xzbdb.jsp 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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/javascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
  6. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
  7. <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/ecmascript" src="<%=request.getContextPath()%>/resource/plugin/jqueryui/js/jquery-ui-1.9.2.custom.min.js"></script>
  11. <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.core.js"></script>
  12. <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.widget.js"></script>
  13. <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.mouse.js"></script>
  14. <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.draggable.js"></script>
  15. <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.droppable.js"></script>
  16. <script type="text/javascript" src="<%=request.getContextPath()%>/pages/xzbdb/xzb.js"></script>
  17. <script type="text/javascript">
  18. function queryData(){
  19. var year = $("#year").val();
  20. var month = $("#month").val();
  21. var temp="<%=request.getContextPath()%>/xzbdb/xzbdbList.action?year="+year+"&month="+month;
  22. var url= encodeURI(encodeURI(temp));
  23. $("#gridTable").setGridParam({url:url}).trigger("reloadGrid");
  24. }
  25. $(document).ready(function () {
  26. showJqGrid();
  27. });
  28. function showJqGrid() {
  29. var year = $("#year").val();
  30. var month = $("#month").val();
  31. var temp="<%=request.getContextPath()%>/xzbdb/xzbdbList.action?year="+year+"&month="+month;
  32. var url= encodeURI(encodeURI(temp));
  33. var id = 'gridTable';
  34. var datatype = 'json';
  35. var colNames = ['编号','年份', '月份','操作'];
  36. /* var colModel = [
  37. { name: 'id', index: 'id', width: 200, align: 'center', hidden:true},
  38. { name: 'hcode', index: 'hcode', width: 200, align: 'center',editable : true},
  39. { name: 'name', index: 'name', width: 200, align: 'center',editable : true},
  40. { name: 'wpId', index: 'wpId', width: 200, align: 'center',editable : true,edittype : "select",editoptions : {value : "MHS_FDC:麻黄山风电场;NSS_FDC:牛首山风电场;SBQ_FDC:石板泉风电场;QS_FDC:青山风电场;XS_FDC:香山风电场"}},
  41. { name: 'name', index: 'name', width: 200, align: 'center',formatter:displaybuttons}
  42. ]; */
  43. var colModel = [
  44. { name: 'id', index: 'id', width: 200, align: 'center', hidden:true},
  45. { name: 'year', index: 'year', width: 200, align: 'center'},
  46. { name: 'month', index: 'month', width: 200, align: 'center'},
  47. { name: 'status', index: 'status', width: 300, align: 'center',formatter:displaybuttons}
  48. ];
  49. var caption = '小指标对标';
  50. var sortname = 'year';
  51. var gridPagerID ='gridPager';
  52. var sortorder='desc';
  53. var height='650';
  54. var width='1610';
  55. var rownumbers=true;
  56. var multiselect=true;
  57. myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
  58. multiselect,rownumbers);
  59. }
  60. function addData(){
  61. $("#chartContainer").dialog({
  62. title:"新增小指标对标",
  63. resizable: false,
  64. width:400,
  65. height:400,
  66. modal: true
  67. });
  68. }
  69. function displaybuttons(cellvalue, options, rawObject) {
  70. var clyxdf = "<input type='button' value='崇礼运行得分' onclick=df('"+ rawObject.id + "','CL_FDC','clyx')>";
  71. var kbdyxf = "<input type='button' value='康保运行得分' onclick=df('"+ rawObject.id + "','KB_FDC','kbyx')>";
  72. var cljxdf = "<input type='button' value='崇礼检修得分' onclick=df('"+ rawObject.id + "','CL_FDC','cljx')>";
  73. var kbjxdf = "<input type='button' value='康保检修得分' onclick=df('"+ rawObject.id + "','KB_FDC','kbjx')>";
  74. var dxdf = "<input type='button' value='代县得分详情' onclick=df('"+ rawObject.id + "','DX_FDC','dx')>";
  75. var jj = "<input type='button' value='&nbsp奖金详情&nbsp' onclick=jj('"+ rawObject.id + "')>";
  76. return clyxdf + "&nbsp;"+cljxdf + "&nbsp;"+kbdyxf+ "&nbsp;"+
  77. kbjxdf + "&nbsp;"+dxdf + "&nbsp;"+jj+ "&nbsp;</br>";
  78. };
  79. function df(id,wpid,types) {
  80. $("#xid").val(id);
  81. $("#wpid").val(wpid);
  82. $("#types").val(types);
  83. $("#f1").attr("action","../xzbdf/xzbdfindex.action").submit();
  84. }
  85. function jj(id) {
  86. $("#xid").val(id);
  87. $("#f1").attr("action","../xzbjj/xzbjjindex.action").submit();
  88. }
  89. function saveXzbdb() {
  90. if (confirm("确定按照选择年份月份,新增小指标对标吗?")) {
  91. var year=$("#year").val();
  92. var month=$("#month").val();
  93. var obj=new Object();
  94. obj.year=year;
  95. obj.month=month;
  96. $.ajax({
  97. type:'post',
  98. dataType : "json",
  99. url:'../xzbdb/saveXzbdb.action',
  100. data:{"obj":JSON.stringify(obj)},
  101. success:function(data){
  102. alert("新增小指标对标完成!");
  103. $("#year").val("");
  104. $("#month").val("");
  105. queryData();
  106. }
  107. });
  108. }
  109. }
  110. /*****************************************************************************************************************************************************/
  111. </script>
  112. <style type="text/css">
  113. fieldset legend {
  114. color:#302A2A;
  115. font: bold 16px/2 Verdana, Geneva, sans-serif;
  116. font-weight: bold;
  117. text-align: left;
  118. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  119. }
  120. </style>
  121. </head>
  122. <body>
  123. <form action="../xzbdb/xzbdbindex.action" method="post" id="f1">
  124. <input type="hidden" id="xid" name="xid"/>
  125. <input type="hidden" id="wpid" name="wpid"/>
  126. <input type="hidden" id="types" name="types"/>
  127. <fieldset style="height: 60px;width: 1580px" id="fst">
  128. <legend class="item_Name">参数条件</legend>
  129. <table class="dataform">
  130. <tr>
  131. <th width="5%" class="item_Name">
  132. 年份
  133. </th>
  134. <td width="10%" style="text-align: left">
  135. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy',isShowWeek:true,readOnly:true})"
  136. id="year" name="year" title="年份" />
  137. </td>
  138. <th width="5%" class="item_Name">
  139. 月份
  140. </th>
  141. <td width="10%" style="text-align: left">
  142. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'MM',isShowWeek:true,readOnly:true})"
  143. id="month" name="month" title="月份" />
  144. </td>
  145. <td width="20%" style="text-align: right">
  146. <input type="button" onclick="queryData();" id="query" value="查询"/>
  147. <input type="button" onclick="saveXzbdb();" id="add" value="新增"/>
  148. </td>
  149. <td width="30%"></td>
  150. </tr>
  151. </table>
  152. </fieldset>
  153. <br/>
  154. <table id='gridTable' height="100%">
  155. </table>
  156. <div id='gridPager'></div>
  157. </form>
  158. </body>