<!-------------------html------------------------>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<link href="../../css/common.css" rel="stylesheet" type="text/css">
<link href="../../css/log.css" rel="stylesheet" type="text/css">
<link href="../../css/jquery.datetimepicker.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../js/common/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../../js/common/layer/layer.min.js"></script>
<script type="text/javascript" src="../../js/common/servlet.url.js"></script>
<script type="text/javascript" src="../../js/common/jq.ui.js"></script>
<script type="text/javascript" src="../../js/common/util.js"></script>
<script type="text/javascript" src="../../js/common/common.js"></script>
<script type="text/javascript" src="../../js/common/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="../../js/budgetManage/queryjournal.js"></script>
<div class="list-main" id="inspectionPlanLogPage">
<!-- 标题 -->
<div class="page-title mt10">
<div class="seach-box mt20 ">
<ul style="display: inline-block;clear: both;">
<li >地区:<select id="assessmentName" ></select></li>
<li >县分名称:<select id="latnId" > </select></li>
<li >支局名称:<select id="inspectionSystem" ></select></li>
<li>修改人:<input type="text" id="reviser" /></li>
<li >修改时间:<input type="text" id="mtime" /><img src="../../images/del.png" alt="" class="form-img" id="clearSendDate"></li>
<li><a href="javascript:void(0)" class="but ml20" id="senior">查询</a></li>
<li ><a href="javascript:void(0)" class="but ml20" id="reset">重置</a></li>
</ul>
</div>
</div>
<!-- 按钮操作 -->
<div style="margin-top:5px;" id="inspectionQuery">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab2 mt10">
<thead>
<tr>
<th style="6%;">本地网</th>
<th style="6%;">县、分局名称</th>
<th style="10%;">支局名称</th>
<th style="6%;">修改时间</th>
<th style="6%;">修改人</th>
<th style="6%;">存量收入系数</th>
<th style="6%;">增量收入系数</th>
<th style="6%;">超预算系数</th>
<th style="5%;">岗位绩效</th>
<th style="5%;">岗位绩效权重</th>
<th style="4%;">提成权重</th>
</tr>
</thead>
<tbody id="inspectionListLogBody">
</tbody>
</table>
<div class="page mt10" id="inspectionListFoot" style="text-align:center;margin-left: 500px;"></div>
</div>
</div>
<!-------------------js----------------------->
var limit = 0;
var Queryjournal = new Function();
Queryjournal.prototype = {
selecter : "#inspectionPlanLogPage",
pageSize : 10,
areaObj : "",
handleType :"",
dataSource :"",
nameSpace :"",
sqlName : "",
// 初始化执行
init : function() {
this.bindMetod(this);
},
bindMetod : function(parentThis) {
//获取地区的内容
var assessmentNameObj=$("#assessmentName");
$.jump.ajax(URL_QUERY_DATAMANAGEMENT.encodeUrl(),function(json) {
if(json.code == "0" ){
if(json.data.length > 0){
var html = [];
assessmentNameObj.html("");
$.each(json.data,function(i,obj){
html.push('<option id = '+obj.LATN_CODE+' assessmentCode = '+obj.LATN_CODE+' selected="selected">'+obj.LATN_NAME+'</option>');
});
assessmentNameObj.html(html.join(''));
}
}else{
layer.alert(msg);
};
}, null, false,false);
//级联县分名称
var latnIdObj=$("#latnId");
$("#assessmentName").change(function(){
var seleted=$("#assessmentName").children('option:selected').val();
var param={
"seleted" : seleted ,
};
$.jump.ajax(URL_QUERY_DATAMANAGEMENT_COUNTYBRANCH.encodeUrl(),function(json){
if(json.code == "0" ){
if(json.data.length > 0){
var html = [];
latnIdObj.html("");
$.each(json.data,function(i,obj){
html.push('<option latnId = '+obj.AREA_CODE+' latnCode = '+obj.AREA_CODE+' selected="selected">'+obj.AREA_NAME+'</option>');
});
latnIdObj.html(html.join(''));
}
}else{
layer.alert(msg);
};
},param,false,false);
});
//级联支局
var inspectionSystemObj= $("#inspectionSystem");
$("#latnId").change(function(){
var countybrch=$(this).children('option:selected').val();
var param={
"countybrch" : countybrch ,
};
$.jump.ajax(URL_QUERY_DATAMANAGEMENT_BRANCHNAME.encodeUrl() , function(json){
if(json.code==0){
var html=[];
inspectionSystemObj.html();
for(var i=0;i<json.data.length; i++){
html.push('<option inspectionId = '+json.data[i].REGION_CODE+' inspectionCode = '+json.data[i].REGION_CODE+'>'+json.data[i].REGION_NAME+'</option>')
}
inspectionSystemObj.html(html.join(''));
}
},param,false,false);
});
//查询绑定
$("#senior").click(function(){
parentThis.queryPageList(parentThis,limit);
});
var sendDateObj =$("#mtime");
parentThis.dateBind(sendDateObj,0);
var clearSendDateObj = parentThis.selecter.findById("img","clearSendDate")[0];
clearSendDateObj.unbind("click").bind("click",function(){
sendDateObj.val("");
});
},
//时间绑定
dateBind : function(obj,AddDayCount){
var d = new Date();
d.setDate(d.getDate()+AddDayCount);//获取AddDayCount天后的日期
//obj.val(d.getFullYear() + "-"+(d.getMonth()+1)+"-"+d.getDate());
obj.datetimepicker({
lang:'ch',
timepicker:false,
format:'Y-m-d',
formatDate:'Y-m-d',
});
},
queryPageList :function(parentThis,limit){
debugger;
var assessmentName= $("#assessmentName").val();
var latnId= $("#latnId").val();
var inspectionSystem= $("#inspectionSystem").val();
var reviser= $("#reviser").val();
var mtime= $("#mtime").val();
var param={
"assessmentName" : assessmentName,
"latnId" : latnId,
"inspectionSystem" : inspectionSystem,
"reviser" : reviser,
"mtime" : mtime,
"handleType" : 'qry',
"dataSource" : 'ora',
"nameSpace" : 'base',
"sqlName" : 'querylogs',
"limit" : limit,
"pageSize" : parentThis.pageSize,
};
//下面展示数据
var listBodyObj=parentThis.selecter.findById("div","inspectionListFoot")[0];
$.jump.ajax(URL_QUERY_COMMON_METHOD.encodeUrl(),function(data){
var objarray=data.data;
if(objarray.length>0){
listBodyObj.show();
var tbody=$("#inspectionListLogBody");
tbody.html("");
for(var i=0;i<objarray.length;i++){
tbody.append("<tr><td>"+objarray[i].LATN_NAME+"</td><td>"+objarray[i].AREA_NAME+"</td><td>"+objarray[i].REGION_NAME+"</td>" +
"<td>"+objarray[i].UPD_TIME+"</td><td>"+objarray[i].STAFF_NAME+"</td><td>"+objarray[i].STOCK_INCOME_RATE+"</td>" +
"<td>"+objarray[i].INC_INCOME_RATE+"</td><td>"+objarray[i].SUPER_BUDGET_RATE+"</td><td>"+objarray[i].POS_PERFORMANCE+"</td>" +
"<td>"+objarray[i].POS_PERFOR_WEIGHT+"</td><td>"+objarray[i].ROYALTY_WEIGHT+"</td></tr>");
}
var dateNum = data.totalSize;
var pageNum = parseInt((dateNum % 10 == 0)? (dateNum/10):(dateNum/10+1));
var pageDiv = $("#inspectionListFoot");
if(pageNum <= 0)return;
var html = "<ul>";
html+="<li><</li>";
for(var i = 1; i <=pageNum; i++){
html+="<li class='pageNum'>"+i+"</li>";
}
html+="<li>></li>";
html+="</ul>";
pageDiv.html(html);
$("#inspectionListFoot>ul>.pageNum").each(function(index,obj){
if(index == limit){
$(obj).css("border","1px solid #f00");
}else{
$(obj).css("border","1px solid #ccc");
}
});
$("#inspectionListFoot>ul>li").click(function(){
var char = $(this).text();
if(char == '<'){
if(limit > 0){
limit--;
}
}else if(char == '>'){
if(limit <= pageNum){
limit++;
}
}else{
limit = parseInt(char);
limit--;
}
if(limit >= 0 && limit <= pageNum){
parentThis.queryPageList(parentThis,limit);
}
});
}else{
/* pageDiv.hide();
html.push('<div>');
html.push('<div style="130px;">无相关数据</div>');
html.push('<div>');*/
}
},param,false,false);
}
};
$(document).ready(function(){
var queryjournal = new Queryjournal();
queryjournal.init();
//需求详单查询
});