Commit 123c4e57 authored by hefan's avatar hefan

商铺管理列表添加个人商铺筛选功能

parent 58f10444
...@@ -161,7 +161,10 @@ ...@@ -161,7 +161,10 @@
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span> <span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
<!-- 批量修改客方 --> <!-- 批量修改客方 -->
<a href="#modal_modify_user" data-toggle="modal" class="btn btn-info btn3 margin-top-ld"><i class="icon-plus"></i> <a href="#modal_modify_user" data-toggle="modal" class="btn btn-info btn3 margin-top-ld"><i class="icon-plus"></i>
批量修改盘方</a> 批量修改客方</a>
<!-- 本人商铺 -->
<!--<span class="btn btn-info btn3 ld-Marheight" id="persional_shop">本人商铺</span>-->
</form> </form>
</td> </td>
</tr> </tr>
......
...@@ -23,6 +23,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -23,6 +23,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
exclusive_id: 0, exclusive_id: 0,
isFollowupSaving: false, isFollowupSaving: false,
detailTabIndex:0,//查看 弹出框 tab切换 初始化 detailTabIndex:0,//查看 弹出框 tab切换 初始化
all_shop : true , // false: 本人商铺,true:所有商铺
init: function() { init: function() {
//初始化dot //初始化dot
business.getDistrict(); business.getDistrict();
...@@ -92,6 +93,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -92,6 +93,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
business.agent_id = user_info_obj.id; business.agent_id = user_info_obj.id;
business.phone = user_info_obj.phone; business.phone = user_info_obj.phone;
business.name = user_info_obj.name; business.name = user_info_obj.name;
$("#search").click(function() { $("#search").click(function() {
business.getList(1); business.getList(1);
}); });
...@@ -99,6 +101,16 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -99,6 +101,16 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
$("#reset").click(function() { //重置 $("#reset").click(function() { //重置
document.getElementById("form_search").reset(); document.getElementById("form_search").reset();
}); });
$('#persional_shop').unbind('click').bind('click',function(){
if ( business.all_shop ){
$('#persional_shop').html("个人商铺");
} else {
$('#persional_shop').html("所有商铺");
}
business.all_shop = !business.all_shop;
business.getList(1);
});
$(document).delegate(".del_modal", "click", function() { $(document).delegate(".del_modal", "click", function() {
business.id = $(this).attr("data-id"); business.id = $(this).attr("data-id");
...@@ -695,7 +707,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -695,7 +707,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
} else { } else {
alert("删除失败"); alert("删除失败");
...@@ -747,7 +759,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -747,7 +759,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}, },
//==============批量修改客方=========== //==============批量修改客方===========
getList: function(pageNo, type) { getList: function(pageNo, type) {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo')));
business.pageNo = pageNo; business.pageNo = pageNo;
var params = {}; var params = {};
// 商铺列表 默认时间显示 // 商铺列表 默认时间显示
...@@ -767,6 +779,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -767,6 +779,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
params.internal_title = $('#internal_title').val(); //对内商铺名称 params.internal_title = $('#internal_title').val(); //对内商铺名称
params.external_title = $('#internal_title_open').val(); //对外商铺名称 params.external_title = $('#internal_title_open').val(); //对外商铺名称
params.area = $('#area_id').val(); //面积筛选 params.area = $('#area_id').val(); //面积筛选
//添加个人商铺和所有商铺选择功能
/*params.userinfo = this.all_shop ? '' : JSON.parse(decodeURIComponent(localStorage.getItem('userinfo'))).id ;*/
if($('#user_city_choose').val() == 310100){ if($('#user_city_choose').val() == 310100){
params.city = '上海市' ; params.city = '上海市' ;
} }
......
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