Commit 045505a4 authored by agping's avatar agping

客户列表 客户姓名搜索

parent 82984d5a
......@@ -6,21 +6,25 @@
overflow-y: auto;
padding-bottom: 60px;
}
/*客方姓名 搜索*/
.left-phone{
margin-left: 10px;
float: left;
}
.modal-body-details {
width: 850px;
}
.modal-body-new-user{
width: 639px;
}
.user-ul,.user-ul-new-introduce{
.user-ul,.user-ul-new-introduce,.user-ul-agent{
width: 100%;
height: auto;
float: left;
position: relative;
left: -40px;
}
.user-ul li, .user-ul-new-introduce li, .user-ul-edit-introduce li{
.user-ul li, .user-ul-new-introduce li, .user-ul-edit-introduce li,.user-ul-agent li{
list-style: none;
line-height: 30px;
}
......@@ -431,7 +435,6 @@
<select class="form-control btn2 margin-top-ld input" name="" id="guest_stores" title="客方所属部门、客方所属门店 与邀请人所属部门、邀请人所属门店 不作为并列筛选项" value="">
</select>
<input class="form-control btn2 margin-top-ld input" data-rule-phoneus="false" data-rule-required="false" name="user_agent_name" placeholder="客方(员工)姓名" type="text" value="">
<input class="form-control btn2 margin-top-ld input" data-rule-phoneus="false" data-rule-required="false" name="user_agent" placeholder="客方手机号" type="text" value="">
<!--邀请人-->
<select class="form-control btn2 margin-top-ld input" name="" id="district_id2" title="
......@@ -455,6 +458,10 @@
<option value="310100">上海市</option>
<option value="330100">杭州市</option>
</select>-->
<div class="left-phone">
<input class="form-control margin-top-ld" data-rule-phoneus="false" data-rule-required="false" id="user_agent_name" placeholder="客方(员工)姓名" type="text" value="">
<ul class="user-ul-agent"></ul>
</div>
</div>
<div class="col-xs-12" style="padding:0px">
<span class="btn btn-info btn3 margin-top-ld" id="search">搜索</span>
......
......@@ -488,6 +488,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
user.search_phone();
}
});
$(document).on("input", "#user_agent_name", function() { //客户列表 客方员工姓名 下拉式搜索
if($("#user_agent_name").val() == '') {
user.agent_id='';
$(".user-ul-agent").html('');
} else {
user.search_phone_agent();
}
});
$(document).on("input", "#introduce_new_user", function() { //新增客户 转介绍人 搜索客户
if($("#introduce_new_user").val() == '') {
......@@ -557,6 +565,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$(document).delegate(".addphone", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
user.addphone(this);
});
$(document).delegate(".addphone-agent", "click", function() { //客户列表 客户员工 下拉式 搜索 点击li事件 获取id ul消失
user.addphoneAgent(this);
});
$(document).delegate(".add-user-new-li", "click", function() { //list消失新增客户 点击li事件 获取客户id ul消失
user.addUserNewLi(this);
});
......@@ -1050,6 +1061,12 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$(".user-ul").html('');
user.agent_id = $(obj).attr("data-id");
},
addphoneAgent: function(obj) {//客户列表 客方姓名 搜索 input赋值
var user_ht = $(obj).html();
$("#user_agent_name").val(user_ht);
$(".user-ul-agent").html('');
user.agent_id = $(obj).attr("data-id");
},
addUserNewLi: function(obj) {//新增客户 input赋值 搜索客户id
var user_ht = $(obj).html();
$("#introduce_new_user").val(user_ht);
......@@ -1171,6 +1188,31 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
});
},
search_phone_agent: function() { //客户列表 客方员工 姓名的下拉式搜索
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
"phone": $("#user_agent_name").val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul = "";
$.each(data.data, function(i, item) {
user_ul += '<li class="addphone-agent" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + '</li>';
});
$(".user-ul-agent").html(user_ul);
} else {
alert(data.msg);
}
}
});
},
introduce_userId: function() { //新增客户 转介绍 客户id搜索
$.ajax({
url: '/broker/searchUser',
......@@ -1670,7 +1712,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
params.pageNo = user.pageNo;
params.pageSize = user.pageSize;
params.user_agent = $.trim($("input[name='user_agent']").val());
params.user_agent_name = $.trim($("input[name='user_agent_name']").val());
params.user_agent_name = $.trim($("#user_agent_name").val());
params.invite_agent_phone = $.trim($("input[name='invite_agent_phone']").val());
params.area_type = $.trim($("select[name=area_type]").val());
params.price_type = $.trim($("select[name=price_type]").val());
......
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