Commit 3dad55ce authored by agping's avatar agping

经纪人 列表 优化

parent b4359799
...@@ -8,7 +8,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -8,7 +8,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
init: function() { init: function() {
//初始化dot //初始化dot
$("body").append(template + template_binding + pctemplate_binding); $("body").append(template + template_binding + pctemplate_binding);
$("select[name=agent_status]").val('0'); // $("select[name=agent_status]").val('0');
agent.getList(); agent.getList();
agent.event(); agent.event();
}, },
...@@ -163,34 +163,38 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -163,34 +163,38 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
params.id = $(this).attr("data-id"); params.id = $(this).attr("data-id");
if ( $(this).hasClass("isCheck") ){ //取消选中 if ( $(this).hasClass("isCheck") ){ //取消选中
if($(this).html() == '已离职'){ if($(this).html() == '已离职'){
$(this).html('离职') $(this).html('离职');
params.type=0;
} }
if($(this).html() == '已长假'){ if($(this).html() == '已长假'){
$(this).html('长假') $(this).html('长假');
params.type=0;
} }
$(this).removeClass("isCheck").addClass("btn-info").removeClass('btn-warning'); $(this).removeClass("isCheck").addClass("btn-info").removeClass('btn-warning');
} else {//选中 } else {//选中
if($(this).html() == '离职'){ if($(this).html() == '离职'){
$(this).html('已离职'); $(this).html('已离职');
$(".yetai_checkbox:eq(1)").html('长假'); $(".yetai_checkbox:eq(1)").html('长假');
params.type=2;
} }
if($(this).html() == '长假'){ if($(this).html() == '长假'){
$(this).html('已长假'); $(this).html('已长假');
$(".yetai_checkbox:eq(0)").html('离职'); $(".yetai_checkbox:eq(0)").html('离职');
params.type=1;
} }
$(this).siblings(".yetai_checkbox").removeClass("isCheck").addClass("btn-info").removeClass('btn-warning'); $(this).siblings(".yetai_checkbox").removeClass("isCheck").addClass("btn-info").removeClass('btn-warning');
$(this).addClass("isCheck").removeClass("btn-info").addClass('btn-warning'); $(this).addClass("isCheck").removeClass("btn-info").addClass('btn-warning');
}; };
if($(".yetai_checkbox:eq(0)").html() == '已离职' && $(".yetai_checkbox:eq(1)").html() == '长假'){ // if($(".yetai_checkbox:eq(0)").html() == '已离职' && $(".yetai_checkbox:eq(1)").html() == '长假'){
params.type=2; // params.type=2;
} // }
if($(".yetai_checkbox:eq(0)").html() == '离职' && $(".yetai_checkbox:eq(1)").html() == '已长假'){ // if($(".yetai_checkbox:eq(0)").html() == '离职' && $(".yetai_checkbox:eq(1)").html() == '已长假'){
params.type=1; // params.type=1;
} // }
if($(".yetai_checkbox:eq(0)").html() == '离职' && $(".yetai_checkbox:eq(1)").html() == '长假'){ // if($(".yetai_checkbox:eq(0)").html() == '离职' && $(".yetai_checkbox:eq(1)").html() == '长假'){
params.type=0; // params.type=0;
} // }
$.ajax({ //经纪人 离职 长假 $.ajax({ //经纪人 离职 长假
'type': 'POST', 'type': 'POST',
'url': '/index/updateStatus', 'url': '/index/updateStatus',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment