|
@@ -33,6 +33,9 @@ function initQueryEmp(){
|
|
|
var startD = new Date(now.getTime() - 7 * 24 * 3600 * 1000);
|
|
var startD = new Date(now.getTime() - 7 * 24 * 3600 * 1000);
|
|
|
var start_time = startD.getFullYear()+"-"+(startD.getMonth()+1)+"-"+startD.getDate();
|
|
var start_time = startD.getFullYear()+"-"+(startD.getMonth()+1)+"-"+startD.getDate();
|
|
|
var end_time = endD.getFullYear()+"-"+(endD.getMonth()+1)+"-"+endD.getDate();
|
|
var end_time = endD.getFullYear()+"-"+(endD.getMonth()+1)+"-"+endD.getDate();
|
|
|
|
|
+ var start_score = $("#start-score").val();
|
|
|
|
|
+ var end_score = $("#end-score").val();
|
|
|
|
|
+ setJobSelect("#jobSelect");
|
|
|
//默认初始化时间页面回显
|
|
//默认初始化时间页面回显
|
|
|
$("#start-time").val(start_time);
|
|
$("#start-time").val(start_time);
|
|
|
$("#end-time").val(end_time);
|
|
$("#end-time").val(end_time);
|
|
@@ -44,7 +47,7 @@ function initQueryEmp(){
|
|
|
"end_date": end_date,
|
|
"end_date": end_date,
|
|
|
}
|
|
}
|
|
|
var url = "statistics/employee/order";
|
|
var url = "statistics/employee/order";
|
|
|
- getEmployeeInfos(url,param);
|
|
|
|
|
|
|
+ getEmployeeInfosClick(url,param,start_score,end_score);
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* click
|
|
* click
|
|
@@ -53,51 +56,86 @@ function initQueryEmp(){
|
|
|
*/
|
|
*/
|
|
|
function getEmployeeInfosClick(url,param,start_score,end_score){
|
|
function getEmployeeInfosClick(url,param,start_score,end_score){
|
|
|
post_common_service( url,param,function(data){
|
|
post_common_service( url,param,function(data){
|
|
|
|
|
+
|
|
|
var strTbody='';
|
|
var strTbody='';
|
|
|
|
|
+ var count=0;
|
|
|
for(var i=0;i<data.length;i++){
|
|
for(var i=0;i<data.length;i++){
|
|
|
var score = 1000-filterByZeroHandle(average(data[i]).toFixed(2),'0');
|
|
var score = 1000-filterByZeroHandle(average(data[i]).toFixed(2),'0');
|
|
|
- if(score>=parseFloat(start_score) && score<=parseFloat(end_score)){
|
|
|
|
|
- strTbody+="<tr><td width='67px;'>"+(i+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
|
|
|
|
|
- +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+"</td>"
|
|
|
|
|
|
|
+ var flag=judgeParamFilter(data, i,score, start_score,end_score)
|
|
|
|
|
+ console.log("职位是是:"+flag)
|
|
|
|
|
+ if(flag){
|
|
|
|
|
+ strTbody+="<tr><td width='67px;'>"+(count+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
|
|
|
|
|
+ +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+data[i].user.position_name+"</td>"
|
|
|
+"<td width='87px;'>"+data[i].user.workno+"</td><td width='58px;'>"+ getItemScore(data[i], '环境') +"</td>"
|
|
+"<td width='87px;'>"+data[i].user.workno+"</td><td width='58px;'>"+ getItemScore(data[i], '环境') +"</td>"
|
|
|
+"<td width='58px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='58px;'>"+getItemScore(data[i], '表情')+"</td>"
|
|
+"<td width='58px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='58px;'>"+getItemScore(data[i], '表情')+"</td>"
|
|
|
+"<td width='58px;'>"+getItemScore(data[i], '动作')+"</td><td width='58px;'>"+getItemScore(data[i], '文明用语')+"</td>"
|
|
+"<td width='58px;'>"+getItemScore(data[i], '动作')+"</td><td width='58px;'>"+getItemScore(data[i], '文明用语')+"</td>"
|
|
|
+"<td width='58px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='58px'>"+getItemScore(data[i], '便民服务')+"</td><td width='58px'>"
|
|
+"<td width='58px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='58px'>"+getItemScore(data[i], '便民服务')+"</td><td width='58px'>"
|
|
|
+getItemScore(data[i], '安全管理')+"</td><td width='58px;'>"+data[i].check_all_score+"</td>"
|
|
+getItemScore(data[i], '安全管理')+"</td><td width='58px;'>"+data[i].check_all_score+"</td>"
|
|
|
+"<td width='67px;'>"+filter(data[i].checked_num,'0')+"</td><td width='67px;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
|
|
+"<td width='67px;'>"+filter(data[i].checked_num,'0')+"</td><td width='67px;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
|
|
|
- +"<td width='55px;'>"+score+"</td><td width='58px;'>"+"</td><td>"+"</td></tr>";
|
|
|
|
|
|
|
+ +"<td width='55px;'>"+score+"</td><td width='58px;'>"+"</td><td width='58px;'>"+"</td></tr>";
|
|
|
|
|
+ count++;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
$(".table-tbody").append(strTbody);
|
|
$(".table-tbody").append(strTbody);
|
|
|
},function(error){
|
|
},function(error){
|
|
|
return "" ;
|
|
return "" ;
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function judgeParamFilter(data,i,score, start_score,end_score){
|
|
|
|
|
+ var flag1=false;
|
|
|
|
|
+ if(score>=parseFloat(start_score) && score<=parseFloat(end_score)){
|
|
|
|
|
+ flag1=true;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ flag1=false;
|
|
|
|
|
+ }
|
|
|
|
|
+ var checkCount = $("#check_count").val();
|
|
|
|
|
+ if(checkCount){
|
|
|
|
|
+ console.log("fff:"+filter(data[i].checked_num,'0')+","+(filter(data[i].checked_num,'0')==checkCount));
|
|
|
|
|
+ if(filter(data[i].checked_num,'0')==checkCount){
|
|
|
|
|
+ flag2=true;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ flag2=false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ flag2=true;
|
|
|
|
|
+ }
|
|
|
|
|
+ var jobSelect = $("#jobSelect").val();
|
|
|
|
|
+ if(jobSelect){
|
|
|
|
|
+ if(data[i].user.positionid==jobSelect){
|
|
|
|
|
+ flag3=true;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ flag3=false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ flag3=true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return flag1&flag2&flag3;
|
|
|
|
|
+}
|
|
|
/**
|
|
/**
|
|
|
* init
|
|
* init
|
|
|
* @param {*} url
|
|
* @param {*} url
|
|
|
* @param {*} param
|
|
* @param {*} param
|
|
|
*/
|
|
*/
|
|
|
-function getEmployeeInfos(url,param){
|
|
|
|
|
- post_common_service( url,param,function(data){
|
|
|
|
|
- var strTbody='';
|
|
|
|
|
- for(var i=0;i<data.length;i++){
|
|
|
|
|
- strTbody+="<tr><td width='67px;'>"+(i+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
|
|
|
|
|
- +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+"</td>"
|
|
|
|
|
- +"<td width='87px;'>"+data[i].user.workno+"</td><td width='58px;'>"+ getItemScore(data[i], '环境') +"</td>"
|
|
|
|
|
- +"<td width='58px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='58px;'>"+getItemScore(data[i], '表情')+"</td>"
|
|
|
|
|
- +"<td width='58px;'>"+getItemScore(data[i], '动作')+"</td><td width='58px;'>"+getItemScore(data[i], '文明用语')+"</td>"
|
|
|
|
|
- +"<td width='58px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='58px'>"+getItemScore(data[i], '便民服务')+"</td><td width='58px'>"
|
|
|
|
|
- +getItemScore(data[i], '安全管理')+"</td><td width='58px'>"+data[i].check_all_score+"</td>"
|
|
|
|
|
- +"<td width='67px;'>"+filter(data[i].checked_num,'0')+"</td><td width='67px;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
|
|
|
|
|
- +"<td width='55px;'>"+(1000-filterByZeroHandle(average(data[i]).toFixed(2),'0'))+"</td><td width='58px;'>"+"</td><td>"+"</td></tr>";
|
|
|
|
|
- }
|
|
|
|
|
- $(".table-tbody").append(strTbody);
|
|
|
|
|
- },function(error){
|
|
|
|
|
- return "" ;
|
|
|
|
|
- });
|
|
|
|
|
-}
|
|
|
|
|
|
|
+// function getEmployeeInfos(url,param){
|
|
|
|
|
+// post_common_service( url,param,function(data){
|
|
|
|
|
+// var strTbody='';
|
|
|
|
|
+// for(var i=0;i<data.length;i++){
|
|
|
|
|
+// strTbody+="<tr><td width='67px;'>"+(i+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
|
|
|
|
|
+// +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+"</td>"
|
|
|
|
|
+// +"<td width='87px;'>"+data[i].user.workno+"</td><td width='58px;'>"+ getItemScore(data[i], '环境') +"</td>"
|
|
|
|
|
+// +"<td width='58px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='58px;'>"+getItemScore(data[i], '表情')+"</td>"
|
|
|
|
|
+// +"<td width='58px;'>"+getItemScore(data[i], '动作')+"</td><td width='58px;'>"+getItemScore(data[i], '文明用语')+"</td>"
|
|
|
|
|
+// +"<td width='58px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='58px'>"+getItemScore(data[i], '便民服务')+"</td><td width='58px'>"
|
|
|
|
|
+// +getItemScore(data[i], '安全管理')+"</td><td width='58px'>"+data[i].check_all_score+"</td>"
|
|
|
|
|
+// +"<td width='67px;'>"+filter(data[i].checked_num,'0')+"</td><td width='67px;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
|
|
|
|
|
+// +"<td width='55px;'>"+(1000-filterByZeroHandle(average(data[i]).toFixed(2),'0'))+"</td><td width='58px;'>"+"</td><td>"+"</td></tr>";
|
|
|
|
|
+// }
|
|
|
|
|
+// $(".table-tbody").append(strTbody);
|
|
|
|
|
+// },function(error){
|
|
|
|
|
+// return "" ;
|
|
|
|
|
+// });
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
function average(obj){
|
|
function average(obj){
|
|
|
if(filter(obj.checked_num,'0') == 0){
|
|
if(filter(obj.checked_num,'0') == 0){
|
|
@@ -195,3 +233,4 @@ function param_method(start_score,end_score){
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|