Commit 5e794064 authored by clone's avatar clone

Merge branch '0709-v.2.3.1' of https://gitee.com/zwyjjc/tl_estate into 0709-v.2.3.1

parents 0ee7f2dc 868c0e5a
...@@ -5,6 +5,7 @@ namespace app\api_broker\controller; ...@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\LookShopService; use app\api_broker\service\LookShopService;
use app\api_broker\service\VerifyService; use app\api_broker\service\VerifyService;
use app\model\ACollectHouse;
use app\model\AttentionModel; use app\model\AttentionModel;
use app\model\GHouses; use app\model\GHouses;
use app\model\GHousesFollowUp; use app\model\GHousesFollowUp;
...@@ -13,6 +14,7 @@ use app\model\OBargainModel; ...@@ -13,6 +14,7 @@ use app\model\OBargainModel;
use app\model\Regions; use app\model\Regions;
use think\Log; use think\Log;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
* User : zw * User : zw
...@@ -338,6 +340,20 @@ class Shop extends Basic ...@@ -338,6 +340,20 @@ class Shop extends Basic
} }
} }
//是否被收藏
$result["is_collect"] = 2;
if ($params['site_area'] == 3) {
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["user_id"];
$get_params['house_id'] = $params["id"];
$collect_house = new ACollectHouse();
$res = $collect_house->getCollectHouse($field,$get_params);
if($res && ($res[0]['status'] == 1)){//如果存在
$result["is_collect"] = 1;
}
}
return $this->response("200", 'request success', $result); return $this->response("200", 'request success', $result);
} }
......
...@@ -47,4 +47,8 @@ class VipService ...@@ -47,4 +47,8 @@ class VipService
} }
} }
} }
\ No newline at end of file
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<th class="text-center">跟进人</th> <th class="text-center">跟进人</th>
<th class="text-center">商铺ID</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>-->
</tr> </tr>
</thead> </thead>
<tbody class="text-center" id="follow_list"> <tbody class="text-center" id="follow_list">
......
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed"> <table class="table table-striped table-bordered table-hover table-condensed">
<thead> <thead>
<tr> <!--同步app-->
<!--<tr>
<td colspan="10"> <td colspan="10">
<form id="form_search"> <form id="form_search">
<span class="fore-span ld-Marheight">约带看时间:</span> <span class="fore-span ld-Marheight">约带看时间:</span>
...@@ -74,12 +75,12 @@ ...@@ -74,12 +75,12 @@
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</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">约带看人</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>
......
...@@ -491,9 +491,9 @@ ...@@ -491,9 +491,9 @@
<label for="inputEmail3" class="col-sm-3 control-label">VIP客户:</label> <label for="inputEmail3" class="col-sm-3 control-label">VIP客户:</label>
<div class="col-sm-9"> <div class="col-sm-9">
<select class="form-control btn6" id="user_vip"> <select class="form-control btn6" id="user_vip">
<option value="0" class="successModel">请选择</option> <option value='' class="successModel">请选择</option>
<option value="1"></option> <option value="1"></option>
<option value="2"></option> <option value="0"></option>
</select> </select>
<span class="fore-span">(有权限的人才能看到VIP客户)</span> <span class="fore-span">(有权限的人才能看到VIP客户)</span>
</div> </div>
...@@ -787,7 +787,7 @@ ...@@ -787,7 +787,7 @@
<div class="textarea-con ld-Marheight"> <div class="textarea-con ld-Marheight">
<span class="fore-span">备注:</span> <span class="fore-span">备注:</span>
<textarea name="" rows="5" cols="50"></textarea> <textarea name="" rows="5" cols="50" id="note_look"></textarea>
</div> </div>
</form> </form>
</td> </td>
...@@ -801,7 +801,8 @@ ...@@ -801,7 +801,8 @@
<div class="modal-footer"> <div class="modal-footer">
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭 <!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>--> </button>-->
<button type="button" class="btn btn-primary save_look" data-dismiss="modal"> <button type="button" class="btn btn-primary save-look">
<!--data-dismiss="modal"-->
保存 保存
</button> </button>
</div> </div>
......
...@@ -55,6 +55,8 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css ...@@ -55,6 +55,8 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
follow.house_id2 = _this.attr("data-id"); follow.house_id2 = _this.attr("data-id");
console.log(follow.house_id2); console.log(follow.house_id2);
$("#real_money").val(_this.attr("data-money")); $("#real_money").val(_this.attr("data-money"));
$("#real_money2").val(_this.attr("data-fee"));
}); });
//编辑-收付金额-保存 //编辑-收付金额-保存
...@@ -164,13 +166,20 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css ...@@ -164,13 +166,20 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}); });
}, },
//编辑-收付金额-保存 //编辑-收付金额-保存
Submit_follow: function() { //提交 Submit_follow: function() {//提交
if(!($("#real_money").val()>0&&$("#real_money2").val()>0)){
alert('实付金额及手续费需大于0')
return false;
}
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
'url': '/index/addRealMoney', 'url': '/index/addRealMoney',
data: { data: {
"collection_id": follow.house_id2, "collection_id": follow.house_id2,
"real_money": $("#real_money").val(), "real_money": $("#real_money").val(),
"transaction_fee": $("#real_money2").val()
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
......
...@@ -49,6 +49,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -49,6 +49,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
$('#take_look_name').html($(this).attr("data-name")); $('#take_look_name').html($(this).attr("data-name"));
$('#take_look_phone').html($(this).attr("data-phone")); $('#take_look_phone').html($(this).attr("data-phone"));
$('#take_look_id').html($(this).attr("data-id")); $('#take_look_id').html($(this).attr("data-id"));
$('#look_shop_date').val('');
$('#note_look').val('');
$('.look-shop').val('');
$('.look-shop').removeAttr('data-id');
}); });
//二级联动 //二级联动
user.getDistrict(function() { user.getDistrict(function() {
...@@ -141,10 +145,13 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -141,10 +145,13 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
user.search_phone(); user.search_phone();
} }
}); });
//约带看 保存
$(document).on("click", ".save-look", function() { //手机号搜索客方
user.save_look();
});
//约带看 商铺选择 //约带看 商铺选择
$(document).on("input", ".look-shop", function() { //手机号搜索客方 $(document).on("input", ".look-shop", function() { //手机号搜索客方
if($(this).val() == '') { if($(this).val() == '') {
// $(".look-shop-ul").html('');
$(this).next('.look-shop-ul').html(''); $(this).next('.look-shop-ul').html('');
} else { } else {
user.search_phone_look(this); user.search_phone_look(this);
...@@ -254,15 +261,62 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -254,15 +261,62 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}, },
//约带看 商铺名称搜索 //约带看 商铺名称搜索
addphone3: function(obj) { addphone3: function(obj) {
var user_ht = $(obj).html(); var _obj = $(obj);
// $(".look-shop").val(user_ht); var user_ht = _obj.html();
$(obj).parent('.look-shop-ul').prev('.look-shop').val(user_ht); _obj.parent().html('').prev().val(user_ht).attr('data-id', _obj.attr('data-id'));
$(obj).parent('.look-shop-ul').html(''); },
// $(".look-shop-ul").html(''); save_look: function() { //约带看 点击保存
user.agent_id2 = $(obj).attr("data-id"); var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// $(".look-shop").removeClass("look-shop"); console.log(user_info_obj);
// $(".look-shop-ul").removeClass("look-shop-ul"); var arr_look=[];
for(var i=0;i<$('.look-shop').length;i++){
if($('.look-shop').eq(i).attr('data-id')){
arr_look[i]=$('.look-shop').eq(i).attr('data-id');
}
}
if(arr_look.length<0||arr_look.length==0){
alert('请选择约带看商铺');
return false;
}
if($("#look_shop_date").val()==''){
alert('请选择预计到场时间');
return false;
}
console.log(arr_look);
var start_ = $("#look_shop_date").val()+" 00:00:00";
date_start =new Date(Date.parse(start_.replace(/-/g, "/")));
var start_time =date_start.getTime()*0.001;
$.ajax({
url: '/broker/report',
type: 'POST',
async: true,
data: {
"AuthToken": user_info_obj.AuthToken,
"report_agent_id": user_info_obj.id,
"report_store_id": user_info_obj.store_id,
"vehicle": 10,
"intro": $("#note_look").val(),
"predict_see_time": start_time,
"user_id": $("#take_look_id").html(),
"house_ids": arr_look.join(','),
"report_agent_phone": user_info_obj.phone
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert('提交成功');
$("#modal-takeLook").modal('hide');
} else {
alert(data.msg);
}
}
});
}, },
search_phone: function() { //手机号 search_phone: function() { //手机号
$.ajax({ $.ajax({
...@@ -547,6 +601,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -547,6 +601,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
/*分页代码*/ /*分页代码*/
add_page(data.data.total, pageNo, user.pageSize, user.getList); add_page(data.data.total, pageNo, user.pageSize, user.getList);
$("#total_page").html(data.data.total); $("#total_page").html(data.data.total);
} else { } else {
alert(data.msg); alert(data.msg);
} }
...@@ -562,6 +619,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart', ...@@ -562,6 +619,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
params.price_demand = $("#price_type2").val(); params.price_demand = $("#price_type2").val();
params.area_demand = $("#area_type2").val(); params.area_demand = $("#area_type2").val();
params.industry_type = $("#industry_type2").val(); params.industry_type = $("#industry_type2").val();
params.vip = $("#user_vip").val();
params.type = 'add'; params.type = 'add';
if(params.user_name == '') { if(params.user_name == '') {
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<td>[%= it[item]['name'] %]</td> <td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['house_id'] %]</td> <td>[%= it[item]['house_id'] %]</td>
<td>[%= it[item]['store_name'] %]</td> <td>[%= it[item]['store_name'] %]</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>
<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>
</td> </td>-->
</tr> </tr>
[% } %] [% } %]
[% }else{ %] [% }else{ %]
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<td>[%= it[item]['money'] %]</td> <td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['real_money'] %]</td> <td>[%= it[item]['real_money'] %]</td>
<!--手续费--> <!--手续费-->
<td>[%= it[item]['real_money'] %]</td> <td>[%= it[item]['transaction_fee'] %]</td>
<td>[%= it[item]['type'] %]</td> <td>[%= it[item]['type'] %]</td>
<td>[%= it[item]['pay_type'] %]</td> <td>[%= it[item]['pay_type'] %]</td>
<td>[%= it[item]['internal_address'] %]</td> <td>[%= it[item]['internal_address'] %]</td>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<!--增加收款图片 2.2版本--> <!--增加收款图片 2.2版本-->
<a class="btn1 btn-info add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' father-id='[%= it[item]["father_id"] %]'>收款图片</a> <a class="btn1 btn-info add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' father-id='[%= it[item]["father_id"] %]'>收款图片</a>
<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a> <a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
<a class="btn1 btn-info submit_edit2" href="#modal-linetime" data-toggle="modal" data-id='[%= it[item]["id"]%]' data-money='[%= it[item]["real_money"] %]'>实付金额</a> <a class="btn1 btn-info submit_edit2" href="#modal-linetime" data-toggle="modal" data-id='[%= it[item]["id"]%]' data-fee='[%= it[item]["transaction_fee"]%]' data-money='[%= it[item]["real_money"] %]'>实付金额</a>
</td> </td>
</tr> </tr>
[% } %] [% } %]
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<td>[%= it[item]['user_name'] %]</td> <td>[%= it[item]['user_name'] %]</td>
<td>[%= it[item]['user_phone'] %]</td> <td>[%= it[item]['user_phone'] %]</td>
<td>[%= it[item]['create_time'] %]</td> <td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['report_agent_name'] %]</td> <!--<td>[%= it[item]['report_agent_name'] %]</td>-->
<td>[%= it[item]['house_title'] %]</td> <td>[%= it[item]['house_title'] %]</td>
<td>[%= it[item]['predict_see_time'] %]</td> <td>[%= it[item]['predict_see_time'] %]</td>
<td> <td>
......
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