Commit 096bce24 authored by agping's avatar agping

客户

parent 117badcc
......@@ -21,16 +21,16 @@
line-height: 30px;
}
.user-ul2 {
.user-ul2,.look-shop-ul {
width: 100%;
height: auto;
padding-bottom: 15px;
padding-bottom: 6px;
float: left;
position: relative;
left: -40px;
}
.user-ul2 li {
.user-ul2 li,.look-shop-ul li {
list-style: none;
line-height: 30px;
}
......@@ -162,7 +162,7 @@
.detail-modal-bargaininfo-commission-sec>div,
.addtax-modal-tax-commission-sec>div {
float: left;
width: 350px;
width: 380px;
}
.detail-modal-bargaininfo-commission-sec>mark,
......@@ -762,7 +762,8 @@
<div class="form-group detail-modal-bargaininfo-commission-sec">
<span class="fore-span ld-Marheight">约带看商铺:</span>
<div class=" ">
<input type="text" class="form-control ld-Marheight" name=" " autocomplete="off" id="look_shop" placeholder="请输入商铺名称、商铺编号、商铺地址关键词">
<!--选择式-->
<input type="text" class="form-control ld-Marheight look-shop" name=" " autocomplete="off" placeholder="请输入商铺名称、商铺编号、商铺地址关键词">
<ul class="look-shop-ul"></ul>
<!--下拉列表-->
......
......@@ -33,7 +33,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
alert('最多添加5条');
return false;
} else {
_iYJAAObj.append('<div class="form-group detail-modal-bargaininfo-commission-sec"><span class="fore-span ld-Marheight opacity-0">约带看商铺:</span><div class=" "><input type="text" class="form-control ld-Marheight" name=" " autocomplete="off" id="look_shop" placeholder="请输入商铺名称、商铺编号、商铺地址关键词"></div><mark href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic ld-Marheight"><img src="/resource/image/search_gb.png"/></mark></div>');
_iYJAAObj.append('<div class="form-group detail-modal-bargaininfo-commission-sec"><span class="fore-span ld-Marheight opacity-0">约带看商铺:</span><div class=" "><input type="text" class="form-control ld-Marheight look-shop" name=" " autocomplete="off" placeholder="请输入商铺名称、商铺编号、商铺地址关键词"><ul class="look-shop-ul"></ul></div><mark href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic ld-Marheight"><img src="/resource/image/search_gb.png"/></mark></div>');
};
});
......@@ -43,6 +43,13 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
e.stopPropagation();
$(this).parent().remove();
});
_doc.on('click', '.take-look', function(e) {//点击约带看 获取 客户姓名 编号 电话
e.preventDefault();
e.stopPropagation();
$('#take_look_name').html($(this).attr("data-name"));
$('#take_look_phone').html($(this).attr("data-phone"));
$('#take_look_id').html($(this).attr("data-id"));
});
//二级联动
user.getDistrict(function() {
_doc.on('input', '#district_id, #district_id2', function() {
......@@ -134,6 +141,16 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
user.search_phone();
}
});
//约带看 商铺选择
$(document).on("input", ".look-shop", function() { //手机号搜索客方
if($(this).val() == '') {
// $(".look-shop-ul").html('');
$(this).next('.look-shop-ul').html('');
} else {
user.search_phone_look(this);
}
});
$(document).on("input", "#cus_fang", function() { //手机号搜索客方2
if($("#cus_fang").val() == '') {
$(".user-ul2").html('');
......@@ -147,6 +164,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
$(document).delegate(".addphone2", "click", function() { //list2消失
user.addphone2(this);
});
//点击列表 获取input的值
$(document).delegate(".addphone3", "click", function() { //list3消失
user.addphone3(this);
});
// =============================下拉列表===================
$(document).delegate(".submit_edit", "click", function(e) { //提交
......@@ -231,6 +252,18 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
$(".user-ul2").html('');
user.agent_id2 = $(obj).attr("data-id");
},
//约带看 商铺名称搜索
addphone3: function(obj) {
var user_ht = $(obj).html();
// $(".look-shop").val(user_ht);
$(obj).parent('.look-shop-ul').prev('.look-shop').val(user_ht);
$(obj).parent('.look-shop-ul').html('');
// $(".look-shop-ul").html('');
user.agent_id2 = $(obj).attr("data-id");
// $(".look-shop").removeClass("look-shop");
// $(".look-shop-ul").removeClass("look-shop-ul");
},
search_phone: function() { //手机号
$.ajax({
url: '/index/getBroker_new',
......@@ -278,6 +311,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}
});
},
search_phone_look: function(n) { //商铺名选择
$.ajax({
url:"https://pre2.tonglianjituan.com"+ '/broker/getShopList',
type: 'GET',
async: true,
data: {
"site_area":5,
"title":$(n).val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul2 = "";
$.each(data.data, function(i, item) {
user_ul2 += '<li class="addphone3" data-id="' + item.id + '">' + item.id + '-' + item.title + '-' + item.address + '</li>';
});
$(n).next('.look-shop-ul').html(user_ul2);
// $(".look-shop-ul").html(user_ul2);
} else {
alert(data.msg);
}
}
});
},
Submit_follow: function() { //提交
var params = {};
params.id = user.user_id;
......
......@@ -48,7 +48,7 @@
<a class="btn1 btn-success genj_ure" href="#modal-add" data-toggle="modal" data-id='[%= it[item]["id"] %]'>
跟进
</a>
<a class="btn1 btn-success take-look" href="#modal-takeLook" data-toggle="modal" data-id='[%= it[item]["id"] %]'>
<a class="btn1 btn-success take-look" href="#modal-takeLook" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-name='[%= it[item]["user_name"] %]' data-phone='[%= it[item]["user_phone"] %]'>
约带看
</a>
<!--<a class="btn1 btn-danger " href="#modal-delete" data-toggle="modal" onclick="delete_user(this)" data-id='[%= it[item]["id"] %]'>-->
......@@ -62,4 +62,4 @@
<td colspan="7" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
\ No newline at end of file
</script>
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