Commit 0dbbd7d6 authored by agping's avatar agping

修改

parent caf43935
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading breadcrumb"> <div class="panel-heading breadcrumb">
<li> <li>
<a href="javascript:;">商铺跟进列表</a> <a href="javascript:;">商铺收藏</a>
</li> </li>
</div> </div>
<div class="panel-body"> <div class="panel-body">
...@@ -64,43 +64,19 @@ ...@@ -64,43 +64,19 @@
<tr> <tr>
<td colspan="10"> <td colspan="10">
<form id="form_search"> <form id="form_search">
<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>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_end" name="end_date1" type="date">
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="houseID" placeholder="商铺ID" type="text" value="">-->
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="house_title" placeholder="商铺名称" type="text" value="">-->
<input class="form-control btn4 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="follow_up_con" placeholder="跟进内容" type="text" value="">
<!--<select class="form-control btn4 ld-Marheight input" name="" id="district_id">
<option value="">跟进人所在部门</option>
</select>
<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="">
<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>
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form> </form>
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="text-center">跟进时间</th> <th class="text-center">编号</th>
<th class="text-center">跟进内容</th> <th class="text-center">类型</th>
<th class="text-center">跟进人</th> <!--<th class="text-center">区域</th>-->
<th class="text-center">商铺ID</th> <th class="text-center">对内名称</th>
<th class="text-center">商铺名称</th> <th class="text-center">租金均价</th>
<th class="text-center">面积</th>
<th class="text-center">业态</th>
<!--<th class="text-center">最后跟进时间</th>-->
<th class="text-center">状态</th>
<th class="text-center">操作</th> <th class="text-center">操作</th>
</tr> </tr>
</thead> </thead>
......
...@@ -113,6 +113,46 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -113,6 +113,46 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
e.stopPropagation(); e.stopPropagation();
business.Dujianew(); business.Dujianew();
}); });
//收藏 取消收藏
$(document).delegate(".is_show_shoucang", "click", function() { //点击禁用
if(!confirm('是否继续?')) {
return;
}
business.house_id = $(this).attr("data-id");
var params = {
};
params.id = $(this).attr("data-id");
var str = $.trim($(this).html());
if(str == "收藏") {
$(this).attr('class', 'btn1 btn-default is_show_shoucang');
params.type = 1;
$(this).html('取消收藏');
} else if(str == "取消收藏") {
$(this).attr('class', 'btn1 btn-info is_show_shoucang');
params.type = 0;
$(this).html('收藏');
} else {
params.type = 2;
}
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({ //禁用
'type': 'POST',
'url': '/broker/addCollectHouse',//商铺收藏 取消收藏
data: {
"agents_id": user_info_obj.id,
"status": params.type,
"house_id": business.house_id,
"AuthToken": user_info_obj.AuthToken
},
dataType: "json",
success: function(data) {
if(data.code != 200) {
alert("禁用失败!")
}
}
});
});
//城市 区域 筛选 //城市 区域 筛选
_doc.on('input', '#shop_city_id', function() { _doc.on('input', '#shop_city_id', function() {
console.log(222); console.log(222);
......
...@@ -67,7 +67,46 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home ...@@ -67,7 +67,46 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
$('#create_time_start').val(day_start); $('#create_time_start').val(day_start);
$('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月 $('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月
house.getList(0);//商铺跟进列表 house.getList(0);//商铺跟进列表
//收藏 取消收藏
$(document).delegate(".is_show_shoucang", "click", function() { //点击禁用
if(!confirm('是否继续?')) {
return;
}
house.house_id = $(this).attr("data-id");
var params = {
};
params.id = $(this).attr("data-id");
var str = $.trim($(this).html());
if(str == "收藏") {
$(this).attr('class', 'btn1 btn-default is_show_shoucang');
params.type = 1;
$(this).html('取消收藏');
} else if(str == "取消收藏") {
$(this).attr('class', 'btn1 btn-info is_show_shoucang');
params.type = 0;
$(this).html('收藏');
} else {
params.type = 2;
}
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({ //禁用
'type': 'POST',
'url': '/broker/addCollectHouse',//商铺收藏 取消收藏
data: {
"agents_id": user_info_obj.id,
"status": params.type,
"house_id": house.house_id,
"AuthToken": user_info_obj.AuthToken
},
dataType: "json",
success: function(data) {
if(data.code != 200) {
alert("禁用失败!")
}
}
});
});
// 部门 门店 二级联动 // 部门 门店 二级联动
house.getDistrict(function() { house.getDistrict(function() {
...@@ -173,43 +212,13 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home ...@@ -173,43 +212,13 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
console.log(user_info_obj.AuthToken); console.log(user_info_obj.AuthToken);
house.pageNo = pageNo; house.pageNo = pageNo;
var params = {}; var params = {};
var start_ = $('#create_time_start').val()+" 00:00:00";
date_start =new Date(Date.parse(start_.replace(/-/g, "/")));
params.start_time =date_start.getTime()*0.001;
console.log(params.start_time);
//结束时间
var end_ = $('#create_time_end').val()+" 23:59:59";
date_end =new Date(Date.parse(end_.replace(/-/g, "/")));
console.log(date_end);
params.end_time =date_end.getTime()*0.001;
//时间转化为时间戳
//var date="2014-05-08 00:22:11";
// date = new Date(Date.parse(date.replace(/-/g, "/")));
// date = date.getTime();
// params.district_id = $('#district_id').val() * 1;
// params.store_id = $('#guest_stores').val() * 1;
// params.user_name = $('#user_name').val();
params.name_or_phone = $('#user_phone').val();
// params.report_agent_phone = $('#report_agent_phone').val();
params.search_content = $('#follow_up_con').val();
params.pageNo = house.pageNo; params.pageNo = house.pageNo;
params.pageSize = house.pageSize; params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken; params.AuthToken = user_info_obj.AuthToken;
if($('#shop_city_id').val() == 310100){ params.agents_id = user_info_obj.id;
params.city = '上海市' ;
}
if($('#shop_city_id').val() == 330100){
params.city = '杭州市' ;
}
params.disc = $('#shop_area_id').val(); //区域筛选
if( !(params.end_time&&params.start_time)){
alert('请选择时间')
return;
}
$.ajax({ $.ajax({
type: 'POST', type: 'GET',
url: '/broker/houseFollowUpList', //商铺跟进 对接接口 url: '/broker/getCollectHouseList', //商铺跟进 对接接口
data: params, data: params,
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
...@@ -218,7 +227,7 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home ...@@ -218,7 +227,7 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
if(typeof data === 'object') { if(typeof data === 'object') {
if(data.code == 200) { if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('followHouseUp_list_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('followHouseUp_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.result)); $("#follow_list").html(doTtmpl(data.data));
/*分页代码*/ /*分页代码*/
add_page(data.data.total, pageNo, house.pageSize, house.getList); add_page(data.data.total, pageNo, house.pageSize, house.getList);
} else { } else {
......
...@@ -1348,7 +1348,7 @@ define(['doT','text!temp/performance_subsidiary_template_tpl.html', 'text!temp/r ...@@ -1348,7 +1348,7 @@ define(['doT','text!temp/performance_subsidiary_template_tpl.html', 'text!temp/r
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
// url: bargain.switchUrl(), // url: bargain.switchUrl(),
url: '/index/getTallAgeList', //获取列表 url: '/index/marchInList', //获取业绩明细列表
data: params, data: params,
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
</td>--> </td>-->
<td> <td>
<a class="btn1 [%= (it[item]['is_look'] && it[item]['auth_edit_house'] == 0)?'btn-warning':'btn-success' %]" href="#modal_shop_detail" data-id='[%= it[item]["id"] %]' data-toggle="modal">跟进/查看</a> <a class="btn1 [%= (it[item]['is_look'] && it[item]['auth_edit_house'] == 0)?'btn-warning':'btn-success' %]" href="#modal_shop_detail" data-id='[%= it[item]["id"] %]' data-toggle="modal">跟进/查看</a>
<a class="btn1 btn-info is_show_shoucang" data-toggle="modal" data-id='[%= it[item]["id"] %]'>收藏</a>
[% if(it[item]['auth_edit_house'] || check_auth('index/houseEdit')) { %] [% if(it[item]['auth_edit_house'] || check_auth('index/houseEdit')) { %]
<a class="btn1 btn-success" href="/admin.php/index/houseEdit?id=[%= it[item]['id']%]" data-toggle="modal" >编辑</a> <a class="btn1 btn-success" href="/admin.php/index/houseEdit?id=[%= it[item]['id']%]" data-toggle="modal" >编辑</a>
......
...@@ -2,21 +2,35 @@ ...@@ -2,21 +2,35 @@
[% if(it&&it.length!=0) { %] [% if(it&&it.length!=0) { %]
[% for(var item in it){ %] [% for(var item in it){ %]
<tr class="text-center"> <tr class="text-center">
<!--对接接口--> <!--<th class="text-center">编号</th>
<td>[%= it[item]['create_time'] %]</td> <th class="text-center">类型</th>
<td width="47%" class="text-left">[%= it[item]['follow_up_info'] %]</td> <th class="text-center">区域0</th>
<td>[%= it[item]['name'] %]</td> <th class="text-center">对内名称</th>
<td>[%= it[item]['house_id'] %]</td> <th class="text-center">租金均价</th>
<th class="text-center">面积</th>
<th class="text-center">业态</th>
<th class="text-center">最后跟进时间</th>
<th class="text-center">状态</th>
<th class="text-center">操作</th>-->
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['shop_type'] %]</td>
<td>[%= it[item]['title'] %]</td>
<td>[%= it[item]['rent_price'] %]</td>
<td>[%= it[item]['shop_area_start'] %]</td>
<td>[%= it[item]['industry_type'] %]</td>
<!--<td>[%= it[item]['status'] %]</td>-->
<td> <td>
[% if(it[item]["internal_title"] != null) { %] [% if(it[item]["status"] != null) { %]
<!--[%= it[item]['internal_title'] %]--> [%= hideStr(it[item]['status']) %]
[%= hideStr(it[item]['internal_title']) %]
[% } %] [% } %]
</td> </td>
<td> <td>
<a class="btn1 [%= (it[item]['is_look'] && it[item]['auth_edit_house'] == 0)?'btn-warning':'btn-success' %]" href="#modal_shop_detail" data-id='[%= it[item]["house_id"] %]' data-toggle="modal">跟进/查看</a> <a class="btn1 [%= (it[item]['is_look'] && it[item]['auth_edit_house'] == 0)?'btn-warning':'btn-success' %]" href="#modal_shop_detail" data-id='[%= it[item]["id"] %]' data-toggle="modal">跟进/查看</a>
<a class="btn1 btn-info is_show_shoucang" data-toggle="modal" data-id='[%= it[item]["id"] %]'>收藏</a>
</td> </td>
<!--<td> <!--<td>
<a class="btn1 btn-info" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["report_id"] %]'>查看商铺</a> <a class="btn1 btn-info" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["report_id"] %]'>查看商铺</a>
...@@ -27,7 +41,7 @@ ...@@ -27,7 +41,7 @@
[% } %] [% } %]
[% }else{ %] [% }else{ %]
<tr> <tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td> <td colspan="10" style="text-align:center;"> 暂无数据</td>
</tr> </tr>
[% } %] [% } %]
</script> </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