123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439 |
- <%@ 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>
- <style>
- .big2{
- height:1100px;
- width:1500px;
- border:black solid 1px;
- text-align:center;
- }
- .small2{
- height:1000px;
- width:1100px;
- margin:50px auto; //外面的div高度的一半
- border:black solid 1px;
- }
- </style>
- <script type="text/javascript">
-
- function queryData1(){
- var xid = $("#xid").val();
- var temp="<%=request.getContextPath()%>/xzbjj/findXzbjjxz.action?xid="+xid;
- var url= encodeURI(encodeURI(temp));
- $("#gridTable1").setGridParam({url:url}).trigger("reloadGrid");
- }
-
- $(document).ready(function () {
-
- $("#xid").val('<s:property value="xid"/>');
- $("#wpid").val('<s:property value="wpid"/>');
- showdata();
- showJqGrid1();
- });
- function showJqGrid1() {
- var xid = $("#xid").val();
-
- var url1="<%=request.getContextPath()%>/xzbjj/findXzbjjxz.action?xid="+xid;
-
-
- jQuery("#gridTable1").jqGrid({
- url : url1,
- datastr: 'data.json',
- datatype : 'json',
- height: 1050,
- rowNum :10000,
- colNames: ['编号','父编号','部门编号','部门名称', '类型', '名称', '数值'],
- colModel: [
- { name: 'id', index: 'id', width: 200, align: 'center', hidden:true},
- { name: 'xid', index: 'xid', width: 200, align: 'center', hidden:true},
- { name: 'wpid',index: 'wpid', width: 300, hidden:true},
- { name: 'wpname',index: 'wpname', width: 400},
- { name: 'types',index: 'types', width: 200},
- { name: 'name',index: 'name', width: 200},
- { name: 'value',index: 'value', width: 200,editable : true, formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'}
- ],
- loadtext:'读取数据中。。。',
- loadui:'block',
- jsonReader: {
- repeatitems: false,
- root: function (obj) { return obj.rows; },
- page: function (obj) { return obj.pageindex; },
- total: function (obj) { return obj.pagecount; },
- records: function (obj) { return obj.total; }
- },
- prmNames: {
- page: 'page',
- rows: 'pageSize',
- sort: 'sortorder',
- order: 'sortname'
- },
- hidegrid: false,
- rownumbers : false,
- multiselect : false,
- loadonce : false,
- sortname : 'types',
- sortorder : 'desc',
- pager : '#gridPager1',
- viewrecords : true,
- altRows: true,
- caption : '奖金基准参数列表',
- cellEdit : true,
- cellsubmit : 'clientArray',
- onCellSelect : function(rowid,iCol,cellcontent,e) {
- },// 最后选中的行
- onSelectRow : function(id) {
- if (id && id !== lastsel) {
- jQuery("#gridTable1").jqGrid('restoreRow', lastsel);
- jQuery("#gridTable1").jqGrid('editRow', id, true);
- lastsel = id;
-
-
- }
- },afterInsertRow:function(rowid,rowdata,rowelem){
-
- if(rowdata.types == '基准奖金' ){
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{wpname:"<font color=Green>"+rowdata.wpname+"</font>"});
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{types:"<font color=Green>"+rowdata.types+"</font>"});
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{name:"<font color=Green>"+rowdata.name+"</font>"});
- // jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{value:"<font color=Green>"+rowdata.value+"</font>"});
- } else if(rowdata.types == '人数' ){
-
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{wpname:"<font color=Purple>"+rowdata.wpname+"</font>"});
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{types:"<font color=Purple>"+rowdata.types+"</font>"});
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{name:"<font color=Purple>"+rowdata.name+"</font>"});
- // jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{value:"<font color=Purple>"+rowdata.value+"</font>"});
-
- } else if(rowdata.types == '分数' ){
-
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{wpname:"<font color=Orange>"+rowdata.wpname+"</font>"});
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{types:"<font color=Orange>"+rowdata.types+"</font>"});
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{name:"<font color=Orange>"+rowdata.name+"</font>"});
- // jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{value:"<font color=Orange>"+rowdata.value+"</font>"});
-
- } else if(rowdata.types == '系数' ){
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{wpname:"<font color=Blue>"+rowdata.wpname+"</font>"});
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{types:"<font color=Blue>"+rowdata.types+"</font>"});
- jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{name:"<font color=Blue>"+rowdata.name+"</font>"});
- // jQuery("#gridTable1").jqGrid('setRowData',rowdata.id,{value:"<font color=Blue>"+rowdata.value+"</font>"});
- }
- },afterSaveCell : function(rowid, cellname, value, iRow, iCol) {
- var rowDatas = $("#gridTable1").jqGrid('getRowData', rowid);
-
- if(rowDatas.value!=null && rowDatas.value!="")
- {
- if(!isNaN(rowDatas.value))
- {
-
- var obj=new Object();
- obj.id=rowDatas.id;
- obj.xid=rowDatas.xid;
- obj.wpid=rowDatas.wpid;
- var temp=rowDatas.wpname;
-
- temp=temp.replace('<font color="Green">', '');
- temp=temp.replace('<font color="Purple">', '');
- temp=temp.replace('<font color="Orange">', '');
- temp=temp.replace('<font color="Blue">', '');
- temp=temp.replace('</font>', '');
- obj.wpname=temp;
- temp=rowDatas.types;
- temp=temp.replace('<font color="Green">', '');
- temp=temp.replace('<font color="Purple">', '');
- temp=temp.replace('<font color="Orange">', '');
- temp=temp.replace('<font color="Blue">', '');
- temp=temp.replace('</font>', '');
- obj.types=temp;
-
- temp=rowDatas.name;
- temp=temp.replace('<font color="Green">', '');
- temp=temp.replace('<font color="Purple">', '');
- temp=temp.replace('<font color="Orange">', '');
- temp=temp.replace('<font color="Blue">', '');
- temp=temp.replace('</font>', '');
- obj.name=temp;
-
-
- obj.value=rowDatas.value;
-
- $.ajax({
- type:'post',
- dataType : "json",
- url:'../xzbjj/updateXzbjjxz.action',
- data:{"obj":JSON.stringify(obj)},
- success:function(data){
- //alert(data);
- queryData1();
- }
- });
- }else
- {
- alert("数值必须有值,必须是数值。请修改!");
- }
-
- }
-
- }
- });
- }
- function showdata()
- {
- var xid = $("#xid").val();
- $.ajax({
- type:'post',
- dataType : "json",
- url:'../xzbjj/xzbjjList.action',
- data:{"xid":xid},
- success:function(data){
-
- $("#clyx").html(data.clyx.value);
- $("#cljx").html(data.cljx.value);
- $("#clgl").html(data.clgl.value);
- $("#clze").html(data.clze.value);
- $("#kbyx").html(data.kbyx.value);
- $("#kbjx").html(data.kbjx.value);
- $("#kbgl").html(data.kbgl.value);
- $("#kbze").html(data.kbze.value);
- $("#dxyx").html(data.dxyx.value);
- $("#dxjx").html(data.dxjx.value);
- $("#dxgl").html(data.dxgl.value);
- $("#dxze").html(data.dxze.value);
- $("#sc").html(data.sc.value);
- $("#scze").html(data.sc.value);
- $("#aq").html(data.aq.value);
- $("#aqze").html(data.aq.value);
- $("#jk").html(data.jk.value);
- $("#jkze").html(data.jk.value);
- $("#ze").html(data.ze.value);
- }
- });
-
- }
- function updateData(){
- $("#chartContainer").dialog({
- title:"修正奖金计算参数",
- resizable: false,
- width:1200,
- height:1300,
- modal: true
- });
- }
-
- function recalculateBonus() {
-
- var xid = $("#xid").val();
- if (confirm("确定要重新计算奖金吗?")) {
-
- $.ajax({
- type:'post',
- dataType : "json",
- url:'../xzbjj/recalculateBonus.action',
- data:{"xid":xid},
- success:function(data){
- showdata();
- alert("重新计算奖金完成!");
- $("#chartContainer").dialog("close");
- }
- });
- }
- }
- /*****************************************************************************************************************************************************/
-
- function goback() {
-
- $("#f1").attr("action", "../xzbdb/xzbdbindex.action").submit();
- }
- </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="../xzbjj/xzbjjindex.action" method="post" id="f1">
- <input type="hidden" id="xid" name="xid"/>
- <input type="hidden" id="wpid" name="wpid"/>
- <fieldset style="height: 50px;width: 1200px" id="fst">
- <legend class="item_Name">奖金展示</legend>
- <table class="dataform">
- <tr>
-
- <td width="10%" style="text-align: right">
- <input type="button" onclick="updateData();" id="update" value="修改参数" />
- </td>
- <td width="10%" style="text-align: right">
- <input type="button" onclick="goback();" id="back" value="返回" />
- </td>
- <td width="40%"></td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <div style="width:1200px;height:1300px;display:none;align:center;valign:middle" id="chartContainer">
- <fieldset style="height: 1200px;width: 1100px" id="fst">
- <legend class="item_Name">奖金参数</legend>
- <table class="dataform">
- <tr>
- <td width="10%" style="text-align: right">
- <input type="button" onclick="recalculateBonus()" id="reBonus" value="重算奖金" />
- </td>
- <td width="40%"></td>
- </tr>
- </table>
- <table id='gridTable1' height="100%">
- </table>
- <div id='gridPager1'></div>
- </div>
- </fieldset>
- <div class='big2'>
-
- <div class='small2'>
- <H1>场际小指标对标(奖金明细)</H1>
- <table width="1068" height="900" border="1" style="a">
- <tr>
- <td rowspan="2" align="center" valign="middle">崇礼风电场</td>
- <td align="center" valign="middle">运行奖金</td>
- <td align="center" valign="middle">检修奖金</td>
- <td align="center" valign="middle">管理奖金</td>
- <td align="center" valign="middle">合计</td>
- </tr>
- <tr>
- <td align="center" valign="middle" id="clyx" > </td>
- <td align="center" valign="middle" id="cljx" > </td>
- <td align="center" valign="middle" id="clgl" > </td>
- <td align="center" valign="middle" id="clze" > </td>
- </tr>
- <tr>
- <td rowspan="2" align="center" valign="middle">康保风电场</td>
- <td align="center" valign="middle">运行奖金</td>
- <td align="center" valign="middle">检修奖金</td>
- <td align="center" valign="middle">管理奖金</td>
- <td align="center" valign="middle">合计</td>
- </tr>
- <tr>
- <td align="center" valign="middle" id="kbyx" > </td>
- <td align="center" valign="middle" id="kbjx" > </td>
- <td align="center" valign="middle" id="kbgl" > </td>
- <td align="center" valign="middle" id="kbze" > </td>
- </tr>
- <tr>
- <td rowspan="2" align="center" valign="middle">雁门关风电场</td>
- <td align="center" valign="middle">运行奖金</td>
- <td align="center" valign="middle">检修奖金</td>
- <td align="center" valign="middle">管理奖金</td>
- <td align="center" valign="middle">合计</td>
- </tr>
- <tr>
- <td align="center" valign="middle" id="dxyx" > </td>
- <td align="center" valign="middle" id="dxjx" > </td>
- <td align="center" valign="middle" id="dxgl" > </td>
- <td align="center" valign="middle" id="dxze" > </td>
- </tr>
- <tr>
- <td rowspan="2" align="center" valign="middle">生产技术部</td>
- <td colspan="3" align="center" valign="middle">生产技术部奖金</td>
- <td align="center" valign="middle">合计</td>
- </tr>
- <tr>
- <td colspan="3" align="center" valign="middle" id="sc" > </td>
- <td align="center" valign="middle" id="scze" > </td>
- </tr>
- <tr>
- <td rowspan="2" align="center" valign="middle">安全监察部</td>
- <td colspan="3" align="center" valign="middle">安全监察部奖金</td>
- <td align="center" valign="middle">合计</td>
- </tr>
- <tr>
- <td colspan="3" align="center" valign="middle" id="aq" > </td>
- <td align="center" valign="middle" id="aqze" > </td>
- </tr>
- <tr>
- <td rowspan="2" align="center" valign="middle">集控中心</td>
- <td colspan="3" align="center" valign="middle">集控中心奖金</td>
- <td align="center" valign="middle">合计</td>
- </tr>
- <tr>
- <td colspan="3" align="center" valign="middle" id="jk" > </td>
- <td align="center" valign="middle" id="jkze" > </td>
- </tr>
- <tr>
- <td colspan="4" align="center" valign="middle">合计</td>
- <td align="center" valign="middle" id="ze" > </td>
- </tr>
- </table></div>
-
- </div>
-
- </form>
- </body>
|