Commit eb5c7cfa authored by agping's avatar agping

城市筛选优化

parent 7660243e
......@@ -46,6 +46,9 @@
margin-top: 20px;
text-align: center;
}
.ld-Marheight-city{
margin-top: 8px;
}
</style>
<div id="page-content-wrapper">
<div class="container">
......@@ -64,6 +67,9 @@
<tr>
<td colspan="10">
<form id="form_search">
<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="" selected="selected">区域筛选</option>
</select>
<span class="fore-span ld-Marheight">跟进时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_start" name="start_date1" type="date">
<span class="fore-span ld-Marheight">-</span>
......@@ -77,19 +83,17 @@
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>-->
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="跟进人姓名" type="text" value="">-->
<input class="form-control btn4 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="跟进人姓名电话" type="text" value="">
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="跟进人姓名" type="text" value="">-->
<input class="form-control btn4 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="跟进人姓名/电话" type="text" value="">
<div class="clear"></div>
<select class="form-control btn2 ld-Marheight" id="shop_city_id">
<!--<div class="clear"></div>-->
<!--<select class="form-control btn2 ld-Marheight" id="shop_city_id">
<option value="" selected="selected">城市筛选</option>
<option value="310100">上海市</option>
<option value="330100">杭州市</option>
</select>
<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="" selected="selected">区域筛选</option>
</select>
</select>-->
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
......
......@@ -55,6 +55,9 @@
margin-top: 20px;
text-align: center;
}
.ld-Marheight-city{
margin-top: 8px;
}
</style>
<div id="page-content-wrapper">
<div class="container">
......@@ -81,6 +84,9 @@
<tr>
<td colspan="10">
<form id="form_search">
<select class="form-control btn2" id="shop_area_id">
<option value="" selected="selected">区域</option>
</select>
<select class="form-control btn11" id="is_carefully_chosen">
<option value="-1"">是否显示在首页</option>
<option value="1"></option>
......@@ -107,25 +113,25 @@
<option value="2" >10000-30000</option>
<option value="3">30000以上</option>
</select>
<select class="form-control btn2" id="is_exclusive_type">
<br style="clear: both;" />
<select class="form-control btn2 ld-Marheight" id="is_exclusive_type">
<option value="-1">是否独家</option>
<option value="1"></option>
<option value="0"></option>
</select>
<br style="clear: both;" />
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="id" placeholder="商铺编号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shop_address" placeholder="商铺地址" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_title" placeholder="对内商铺名称" type="text" value="">
<!--新加筛选-->
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_title_open" placeholder="对外商铺名称" type="text" value="">
<select class="form-control btn2 ld-Marheight" id="shop_city_id">
<!--<select class="form-control btn2 ld-Marheight" id="shop_city_id">
<option value="" selected="selected">城市筛选</option>
<option value="310100">上海市</option>
<option value="330100">杭州市</option>
</select>
<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="" selected="selected">区域筛选</option>
</select>
</select>-->
<select class="form-control btn2 ld-Marheight" id="area_id">
<option value="" selected="selected">面积筛选</option>
......
......@@ -313,6 +313,9 @@
.input-border-0{
border: 0;
}
.ld-Marheight-city{
margin-top: 8px;
}
</style>
<!--导航star-->
......@@ -347,6 +350,9 @@
<tr>
<td colspan="11">
<form action="" method="get" id="form_search">
<select class="form-control btn2 ld-Marheight" id="user_area_choose">
<option value="" selected="selected">区域筛选</option>
</select>
<span class="fore-span ld-Marheight">创建时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date" type="date">
<span class="fore-span ld-Marheight">-</span>
......@@ -460,15 +466,15 @@
<span class="fore-span ld-Marheight">-</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="first_login_end" type="date">
<select class="form-control btn2 ld-Marheight" id="user_city_choose">
<!--<select class="form-control btn2 ld-Marheight" id="user_city_choose">
<option value="" selected="selected">城市筛选</option>
<option value="310100">上海市</option>
<option value="330100">杭州市</option>
</select>
<select class="form-control btn2 ld-Marheight" id="user_area_choose">
<option value="" selected="selected">区域筛选</option>
</select>
</select>-->
<div class="clear"></div>
<span class="btn btn-info btn3 margin-top-ld" id="search">搜索</span>
<span class="btn btn-info btn3 margin-top-ld" id="reset">重置</span>
<!--<a class="btn btn-info btn3 margin-top-ld user-favorites"> 收藏夹 </a>-->
......
......@@ -334,6 +334,9 @@
<tr>
<td colspan="9">
<form id="form_search">
<select class="form-control btn2 ld-Marheight" id="user_area_choose">
<option value="" selected="selected">区域筛选</option>
</select>
<span class="fore-span ld-Marheight">跟进时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date" type="date">
<span class="fore-span ld-Marheight">-</span>
......@@ -358,9 +361,7 @@
<option value="310100">上海市</option>
<option value="330100">杭州市</option>
</select>-->
<select class="form-control btn2 ld-Marheight" id="user_area_choose">
<option value="" selected="selected">区域筛选</option>
</select>
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
......
......@@ -371,4 +371,7 @@ a:hover{
}
.file-upload-area>.btn-area>button{
z-index: 2;
}
\ No newline at end of file
}
.ld-Marheight-city{
margin-top: 8px;
}
\ No newline at end of file
......@@ -66,6 +66,25 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
var day_start = getPreMonth(day_end);
$('#create_time_start').val(day_start);
$('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月
//初始化城市 区域筛选
if($("#user_city_choose").val() == 310100){
var city_id=310100;
}
if($("#user_city_choose").val() == 330100){
var city_id=330100;
}
//区域 渲染
if(city_id) {
house.getCityAreaList(city_id, function(_data) {
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$("#shop_area_id").html(_str);
});
} else {
};
house.getList(0);//商铺跟进列表
......@@ -130,7 +149,8 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
house.followupAdd();
});
//城市 区域 筛选
_doc.on('input', '#shop_city_id', function() {
_doc.on('input', '#user_city_choose', function() {
house.getList();
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
......@@ -139,12 +159,12 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
_objTemp.html(''); //先清空
if(_id && _id != '0') {
house.getCityAreaList(_id, function(_data) {
var _str = '<option value="">全部</option>';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
_objTemp.html(_str);
_this.next().html(_str);
$('#shop_area_id').html(_str);
});
} else {};
......@@ -190,15 +210,20 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
// params.store_id = $('#guest_stores').val() * 1;
// params.user_name = $('#user_name').val();
params.name_or_phone = $('#user_phone').val();
if(params.name_or_phone.length == 1){
alert('跟进人姓名的搜素必须2字及2字以上');
return;
}
// params.report_agent_phone = $('#report_agent_phone').val();
params.search_content = $('#follow_up_con').val();
params.pageNo = house.pageNo;
params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken;
if($('#shop_city_id').val() == 310100){
if($('#user_city_choose').val() == 310100){
params.city = '上海市' ;
}
if($('#shop_city_id').val() == 330100){
if($('#user_city_choose').val() == 330100){
params.city = '杭州市' ;
}
params.disc = $('#shop_area_id').val(); //区域筛选
......
......@@ -62,6 +62,25 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
var day_start = getPreMonth(day_end);
// $('#start_date').val(day_start);
// $('#end_date').val(day_end);//去掉默认时间
//初始化城市 区域筛选
if($("#user_city_choose").val() == 310100){
var city_id=310100;
}
if($("#user_city_choose").val() == 330100){
var city_id=330100;
}
//区域 渲染
if(city_id) {
business.getDistrictStoreList(city_id, function(_data) {
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$("#shop_area_id").html(_str);
});
} else {
};
business.getList(1);
business.event();
business.resetLoad();
......@@ -153,28 +172,24 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}
});
});
//城市 区域 筛选
_doc.on('input', '#shop_city_id', function() {
console.log(222);
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
//新增 编辑
var _objTemp = _this.parent().next().find('select');
_objTemp.html(''); //先清空
if(_id && _id != '0') {
business.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
_objTemp.html(_str);
_this.next().html(_str);
//城市 区域 二级联动 筛选
_doc.on('input', '#user_city_choose', function() {
business.getList();
var _this = $(this);
var _id = _this.val();
$('#user_area_choose').html(''); //先清空
if(_id && _id != '0') {
business.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
} else {};
});
$('#shop_area_id').html(_str);
});
} else {};
});
//查看弹出框里的tab点击事件,查看商铺,商铺跟进
_doc.on('click', '.detail-modal-header-tab>a', function(e){
e.preventDefault();
......@@ -750,10 +765,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
params.internal_title = $('#internal_title').val(); //对内商铺名称
params.external_title = $('#internal_title_open').val(); //对外商铺名称
params.area = $('#area_id').val(); //面积筛选
if($('#shop_city_id').val() == 310100){
if($('#user_city_choose').val() == 310100){
params.city = '上海市' ;
}
if($('#shop_city_id').val() == 330100){
if($('#user_city_choose').val() == 330100){
params.city = '杭州市' ;
}
params.disc = $('#shop_area_id').val(); //区域筛选
......@@ -818,7 +833,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
$('#district_id').append(str_district);
$('#area_id').append(str_area);
$('#yetai_id').append(str_yetai);
fn && fn();
}
}
});
......
......@@ -17,6 +17,25 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
init: function() {
//初始化dot
$("body").append(template);
//初始化城市 区域筛选
if($("#user_city_choose").val() == 310100){
var city_id=310100;
}
if($("#user_city_choose").val() == 330100){
var city_id=330100;
}
//区域 渲染
if(city_id) {
user.getCityAreaList(city_id, function(_data) {
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$("#user_area_choose").html(_str);
});
} else {
};
user.getList();
user.event();
//新增 默认上海
......@@ -120,8 +139,26 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}
});
});
//城市 区域 二级联动 筛选
_doc.on('input', '#user_city_choose', function() {
user.getList();
var _this = $(this);
var _id = _this.val();
$('#user_area_choose').html(''); //先清空
if(_id && _id != '0') {
user.getCityAreaList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$('#user_area_choose').html(_str);
});
} else {};
});
//城市 区域 筛选
_doc.on('input', '#user_city_add,#user_city_edit,#user_city_choose', function() {
_doc.on('input', '#user_city_add,#user_city_edit', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
......
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