123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
- <%@include file="/pages/includes/taglibs.jsp" %>
- <head>
- <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
- <script type="text/javascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
- <script type="text/javascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
-
- <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
- <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
- <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/plugin/jqueryui/js/jquery-ui-1.9.2.custom.min.js"></script>
- <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.core.js"></script>
- <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.widget.js"></script>
- <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.mouse.js"></script>
- <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.draggable.js"></script>
- <script src="<%=request.getContextPath()%>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.droppable.js"></script>
- <script type="text/javascript" src="<%=request.getContextPath()%>/pages/xzbdb/xzb.js"></script>
- <script type="text/javascript">
-
- function queryData(){
- var year = $("#year").val();
- var month = $("#month").val();
- var temp="<%=request.getContextPath()%>/xzbdb/xzbdbList.action?year="+year+"&month="+month;
- var url= encodeURI(encodeURI(temp));
- $("#gridTable").setGridParam({url:url}).trigger("reloadGrid");
- }
-
- $(document).ready(function () {
- showJqGrid();
- });
- function showJqGrid() {
-
- var year = $("#year").val();
- var month = $("#month").val();
- var temp="<%=request.getContextPath()%>/xzbdb/xzbdbList.action?year="+year+"&month="+month;
- var url= encodeURI(encodeURI(temp));
- var id = 'gridTable';
- var datatype = 'json';
- var colNames = ['编号','年份', '月份','操作'];
- /* var colModel = [
- { name: 'id', index: 'id', width: 200, align: 'center', hidden:true},
- { name: 'hcode', index: 'hcode', width: 200, align: 'center',editable : true},
- { name: 'name', index: 'name', width: 200, align: 'center',editable : true},
- { name: 'wpId', index: 'wpId', width: 200, align: 'center',editable : true,edittype : "select",editoptions : {value : "MHS_FDC:麻黄山风电场;NSS_FDC:牛首山风电场;SBQ_FDC:石板泉风电场;QS_FDC:青山风电场;XS_FDC:香山风电场"}},
- { name: 'name', index: 'name', width: 200, align: 'center',formatter:displaybuttons}
- ]; */
- var colModel = [
- { name: 'id', index: 'id', width: 200, align: 'center', hidden:true},
- { name: 'year', index: 'year', width: 200, align: 'center'},
- { name: 'month', index: 'month', width: 200, align: 'center'},
- { name: 'status', index: 'status', width: 300, align: 'center',formatter:displaybuttons}
- ];
- var caption = '小指标对标';
- var sortname = 'year';
- var gridPagerID ='gridPager';
- var sortorder='desc';
- var height='650';
- var width='1610';
- var rownumbers=true;
- var multiselect=true;
- myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
- multiselect,rownumbers);
- }
- function addData(){
- $("#chartContainer").dialog({
- title:"新增小指标对标",
- resizable: false,
- width:400,
- height:400,
- modal: true
- });
- }
-
- function displaybuttons(cellvalue, options, rawObject) {
- var clyxdf = "<input type='button' value='崇礼运行得分' onclick=df('"+ rawObject.id + "','CL_FDC','clyx')>";
- var kbdyxf = "<input type='button' value='康保运行得分' onclick=df('"+ rawObject.id + "','KB_FDC','kbyx')>";
- var cljxdf = "<input type='button' value='崇礼检修得分' onclick=df('"+ rawObject.id + "','CL_FDC','cljx')>";
- var kbjxdf = "<input type='button' value='康保检修得分' onclick=df('"+ rawObject.id + "','KB_FDC','kbjx')>";
- var dxdf = "<input type='button' value='代县得分详情' onclick=df('"+ rawObject.id + "','DX_FDC','dx')>";
- var jj = "<input type='button' value=' 奖金详情 ' onclick=jj('"+ rawObject.id + "')>";
- return clyxdf + " "+cljxdf + " "+kbdyxf+ " "+
- kbjxdf + " "+dxdf + " "+jj+ " </br>";
- };
-
- function df(id,wpid,types) {
- $("#xid").val(id);
- $("#wpid").val(wpid);
- $("#types").val(types);
- $("#f1").attr("action","../xzbdf/xzbdfindex.action").submit();
- }
- function jj(id) {
- $("#xid").val(id);
- $("#f1").attr("action","../xzbjj/xzbjjindex.action").submit();
- }
- function saveXzbdb() {
-
-
- if (confirm("确定按照选择年份月份,新增小指标对标吗?")) {
-
- var year=$("#year").val();
- var month=$("#month").val();
- var obj=new Object();
- obj.year=year;
- obj.month=month;
-
- $.ajax({
- type:'post',
- dataType : "json",
- url:'../xzbdb/saveXzbdb.action',
- data:{"obj":JSON.stringify(obj)},
- success:function(data){
- alert("新增小指标对标完成!");
-
- $("#year").val("");
- $("#month").val("");
-
- queryData();
- }
- });
- }
-
- }
- /*****************************************************************************************************************************************************/
-
- </script>
- <style type="text/css">
- fieldset legend {
- color:#302A2A;
- font: bold 16px/2 Verdana, Geneva, sans-serif;
- font-weight: bold;
- text-align: left;
- text-shadow: 2px 2px 2px rgb(88, 126, 156);
- }
- </style>
- </head>
- <body>
- <form action="../xzbdb/xzbdbindex.action" method="post" id="f1">
- <input type="hidden" id="xid" name="xid"/>
- <input type="hidden" id="wpid" name="wpid"/>
- <input type="hidden" id="types" name="types"/>
- <fieldset style="height: 60px;width: 1580px" id="fst">
- <legend class="item_Name">参数条件</legend>
- <table class="dataform">
- <tr>
- <th width="5%" class="item_Name">
- 年份
- </th>
- <td width="10%" style="text-align: left">
- <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy',isShowWeek:true,readOnly:true})"
- id="year" name="year" title="年份" />
- </td>
- <th width="5%" class="item_Name">
- 月份
- </th>
- <td width="10%" style="text-align: left">
- <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'MM',isShowWeek:true,readOnly:true})"
- id="month" name="month" title="月份" />
- </td>
- <td width="20%" style="text-align: right">
- <input type="button" onclick="queryData();" id="query" value="查询"/>
- <input type="button" onclick="saveXzbdb();" id="add" value="新增"/>
- </td>
- <td width="30%"></td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <table id='gridTable' height="100%">
- </table>
- <div id='gridPager'></div>
- </form>
- </body>
|