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
init: function() {
//初始化dot
$("body").append(template + template_binding + pctemplate_binding);
$("select[name=agent_status]").val('0');
// $("select[name=agent_status]").val('0');
agent.getList();
agent.event();
},
......@@ -163,34 +163,38 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
params.id = $(this).attr("data-id");
if ( $(this).hasClass("isCheck") ){ //取消选中
if($(this).html() == '已离职'){
$(this).html('离职')
$(this).html('离职');
params.type=0;
}
if($(this).html() == '已长假'){
$(this).html('长假')
$(this).html('长假');
params.type=0;
}
$(this).removeClass("isCheck").addClass("btn-info").removeClass('btn-warning');
} else {//选中
if($(this).html() == '离职'){
$(this).html('已离职');
$(".yetai_checkbox:eq(1)").html('长假');
params.type=2;
}
if($(this).html() == '长假'){
$(this).html('已长假');
$(".yetai_checkbox:eq(0)").html('离职');
params.type=1;
}
$(this).siblings(".yetai_checkbox").removeClass("isCheck").addClass("btn-info").removeClass('btn-warning');
$(this).addClass("isCheck").removeClass("btn-info").addClass('btn-warning');
};
if($(".yetai_checkbox:eq(0)").html() == '已离职' && $(".yetai_checkbox:eq(1)").html() == '长假'){
params.type=2;
}
if($(".yetai_checkbox:eq(0)").html() == '离职' && $(".yetai_checkbox:eq(1)").html() == '已长假'){
params.type=1;
}
if($(".yetai_checkbox:eq(0)").html() == '离职' && $(".yetai_checkbox:eq(1)").html() == '长假'){
params.type=0;
}
// if($(".yetai_checkbox:eq(0)").html() == '已离职' && $(".yetai_checkbox:eq(1)").html() == '长假'){
// params.type=2;
// }
// if($(".yetai_checkbox:eq(0)").html() == '离职' && $(".yetai_checkbox:eq(1)").html() == '已长假'){
// params.type=1;
// }
// if($(".yetai_checkbox:eq(0)").html() == '离职' && $(".yetai_checkbox:eq(1)").html() == '长假'){
// params.type=0;
// }
$.ajax({ //经纪人 离职 长假
'type': 'POST',
'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