Commit 40d4156c authored by agping's avatar agping

修改

parent a667842e
...@@ -214,6 +214,7 @@ ...@@ -214,6 +214,7 @@
<td colspan="10"> <td colspan="10">
<form id="form_search"> <form id="form_search">
<div class="col-xs-12" style="padding:0px"> <div class="col-xs-12" style="padding:0px">
<select class="form-control btn2-city shop_city_choose_site_list"></select>
<select class="form-control btn2" id="shop_area_id"> <select class="form-control btn2" id="shop_area_id">
<option value="" selected="selected">区域</option> <option value="" selected="selected">区域</option>
</select> </select>
......
...@@ -82,9 +82,28 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -82,9 +82,28 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
// $('#start_date').val(day_start); // $('#start_date').val(day_start);
// $('#end_date').val(day_end);//去掉默认时间 // $('#end_date').val(day_end);//去掉默认时间
//初始化城市 区域筛选 //初始化城市 区域筛选
business.initializationCityFunction(); // business.initializationCityFunction();
business.getList(1);
business.event(); business.event();
business.resetLoad(); business.resetLoad();
//显示 隐藏城市 默认显示 当前账号 所在城市
$.ajax({
url: '/index/getAgentGroupSite',
type: 'GET',
async: true,
data: {
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '<option value="">选择城市</option>';
$.each(data.data, function(i, item) {
str += '<option value="' + item.city + '">' + item.city + '</option>';
});
$(".shop_city_choose_site_list").append(str);
}
}
});
}, },
event: function() { event: function() {
var _doc = $(document); var _doc = $(document);
...@@ -353,20 +372,17 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -353,20 +372,17 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}); });
}); });
//城市 区域 二级联动 筛选 //城市 区域 二级联动 筛选
_doc.on('input', '#user_city_choose', function() { _doc.on('input', '.shop_city_choose_site_list', function() {
$('#shop_area_id').val(''); $('#shop_area_id').val('');
$('#business_circle_id').val(''); $('#business_circle_id').val('');
$('#business_circle_id').html('');
business.getList();
var _this = $(this); var _this = $(this);
var _id = _this.val(); var _id = _this.val();
// business.setUpCityFunction(_id);
$('#shop_area_id').html(''); //先清空 $('#shop_area_id').html(''); //先清空
if(_id && _id != '0') { if(_id && _id != '0') {
business.getDistrictStoreList(_id, function(_data) { business.getDistrictStoreList(_id, function(_data) {
var _str = '<option value="">区域</option>'; var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) { $.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>'; _str += '<option value="' + item.name + '">' + item.name + '</option>';
}); });
$('#shop_area_id').html(_str); $('#shop_area_id').html(_str);
}); });
...@@ -374,7 +390,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -374,7 +390,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}); });
//点击 区域 获取 商圈 //点击 区域 获取 商圈
_doc.on('input', '#shop_area_id', function() { _doc.on('input', '#shop_area_id', function() {
business.getList();
var _this = $(this); var _this = $(this);
var _id = _this.val(); var _id = _this.val();
var _province=$('#user_city_choose').val(); var _province=$('#user_city_choose').val();
...@@ -1223,12 +1238,7 @@ if(data.code == 200) { ...@@ -1223,12 +1238,7 @@ if(data.code == 200) {
params.vip = $('#is_vip_plate').val(); //VIP盘筛选 params.vip = $('#is_vip_plate').val(); //VIP盘筛选
//添加个人商铺和所有商铺选择功能 //添加个人商铺和所有商铺选择功能
params.dish_id = business.all_shop ? '' : user_info_obj.id ; params.dish_id = business.all_shop ? '' : user_info_obj.id ;
if($('#user_city_choose').val() == 310100){ params.city = $('.shop_city_choose_site_list').val(); //城市筛选
// params.city = '上海市' ;
}
if($('#user_city_choose').val() == 330100){
// params.city = '杭州市' ;
}
params.disc = $('#shop_area_id').val(); //区域筛选 params.disc = $('#shop_area_id').val(); //区域筛选
params.business_id=$('#business_circle_id').val();//商圈筛选 params.business_id=$('#business_circle_id').val();//商圈筛选
params.industry_type = $('#yetai_id').val(); //业态筛选 params.industry_type = $('#yetai_id').val(); //业态筛选
...@@ -1321,8 +1331,7 @@ if(data.code == 200) { ...@@ -1321,8 +1331,7 @@ if(data.code == 200) {
type: 'GET', type: 'GET',
async: true, async: true,
data: { data: {
// 'parent_code': id, 'city': id,
// "pageSize": 1000
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
...@@ -1339,9 +1348,8 @@ if(data.code == 200) { ...@@ -1339,9 +1348,8 @@ if(data.code == 200) {
type: 'GET', type: 'GET',
async: true, async: true,
data: { data: {
// 'province': province, 'city': $('.shop_city_choose_site_list').val(),
'city': user_info_obj.city, 'disc': $('#shop_area_id').val()
'disc': id
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
......
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