|
|
@@ -51,20 +51,26 @@ $(function() {
|
|
|
var url_t = "/statistics/employee/order/detail"
|
|
|
post_common_service(url_t, data_t, function(res) {
|
|
|
|
|
|
+ $("#c_dept_ranking").html("-");
|
|
|
+ $("#c_com_ranking").html("-");
|
|
|
+ $("#c_score_ranking").html("-");
|
|
|
+ $("#l_dept_ranking").html("-");
|
|
|
+ $("#l_com_ranking").html("-");
|
|
|
+ $("#l_score_ranking").html("-");
|
|
|
|
|
|
var isshow_c = false;
|
|
|
var isshow_l = false;
|
|
|
if (typeof(res.currentP) != undefined && res.currentP != null) {
|
|
|
var p = res.currentP;
|
|
|
- $("#c_dept_ranking").html(p.fee_station_ranking);
|
|
|
- $("#c_com_ranking").html(p.company_ranking);
|
|
|
+ $("#c_dept_ranking").html(p.fee_station_ranking == undefined ? "-" : p.fee_station_ranking);
|
|
|
+ $("#c_com_ranking").html(p.company_ranking == undefined ? "-" : p.company_ranking);
|
|
|
$("#c_score_ranking").html(p.check_all_score + p.check_all_m_score);
|
|
|
isshow_c = true;
|
|
|
}
|
|
|
if (typeof(res.lastP) != undefined && res.lastP != null) {
|
|
|
var p = res.lastP;
|
|
|
- $("#l_dept_ranking").html(p.fee_station_ranking);
|
|
|
- $("#l_com_ranking").html(p.company_ranking);
|
|
|
+ $("#l_dept_ranking").html(p.fee_station_ranking == undefined ? "-" : p.fee_station_ranking);
|
|
|
+ $("#l_com_ranking").html(p.company_ranking == undefined ? "-" : p.company_ranking);
|
|
|
$("#l_score_ranking").html(p.check_all_score + p.check_all_m_score);
|
|
|
isshow_l = true;
|
|
|
}
|
|
|
@@ -72,24 +78,17 @@ $(function() {
|
|
|
if (isshow_c && isshow_l) {
|
|
|
var p_c = res.currentP;
|
|
|
var p_l = res.lastP;
|
|
|
- var dept_r = p_c.fee_station_ranking - p_l.fee_station_ranking;
|
|
|
- if (dept_r != 0) {
|
|
|
- $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
|
|
|
- }
|
|
|
- var com_r = p_c.company_ranking - p_l.company_ranking;
|
|
|
- if (com_r != 0) {
|
|
|
- $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
|
|
|
+ if (p_c.fee_station_ranking != undefined && p_l.fee_station_ranking != undefined) {
|
|
|
+ var dept_r = p_c.fee_station_ranking - p_l.fee_station_ranking;
|
|
|
+ if (dept_r != 0) {
|
|
|
+ $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
|
|
|
+ }
|
|
|
+ var com_r = p_c.company_ranking - p_l.company_ranking;
|
|
|
+ if (com_r != 0) {
|
|
|
+ $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}, function(error) {})
|
|
|
|
|
|
|
|
|
@@ -289,9 +288,9 @@ $(function() {
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
for (var j = 33; j <= 53; j++) {
|
|
|
if (select_road == j) {
|
|
|
- if(data[i].id==userId){
|
|
|
+ if (data[i].id == userId) {
|
|
|
tempStr += "<option value=" + data[i].id + " selected='selected'>" + data[i].truename + "</option>";
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
tempStr += "<option value=" + data[i].id + ">" + data[i].truename + "</option>";
|
|
|
}
|
|
|
}
|