Commit 0f4e804c authored by agping's avatar agping

修改

parent 2b4ff8ff
{layout name="global/frame_tpl" /} {layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="RemarkFollowIndex" /> <input type="hidden" class="page-load" id="RemarkFollowIndex" />
<style> <style>
.modal-body { /*.modal-body {
height: 600px; height: 600px;
overflow-y: auto; overflow-y: auto;
padding-bottom: 60px; padding-bottom: 60px;
...@@ -23,14 +23,13 @@ ...@@ -23,14 +23,13 @@
line-height: 30px; line-height: 30px;
} }
#search_t {
visibility: hidden;
}
.clear { .clear {
clear: both; clear: both;
} }
*/
/*同步客户列表的样式*/
.btn6-1 { .btn6-1 {
width: 70%; width: 70%;
} }
...@@ -38,6 +37,243 @@ ...@@ -38,6 +37,243 @@
.btn4-1 { .btn4-1 {
width: 30%; width: 30%;
} }
.modal-body1 {
height: 600px;
overflow-y: auto;
padding-bottom: 60px;
}
.modal-body-details {
width: 850px;
}
.user-ul {
width: 100%;
height: auto;
/*padding-bottom: 15px;*/
float: left;
position: relative;
left: -40px;
}
.user-ul li {
list-style: none;
line-height: 30px;
}
.user-ul2,
.look-shop-ul {
width: 100%;
height: auto;
padding-bottom: 6px;
float: left;
position: relative;
left: -40px;
}
.user-ul2 li,
.look-shop-ul li {
list-style: none;
line-height: 30px;
}
.input {
width: 16%!important;
}
#search_t {
visibility: hidden;
}
.text-right {
float: right;
display: inline-block;
}
#batch {
float: left;
height: 34px;
line-height: 34px;
}
.ld-Marheight {
margin-top: 15px;
}
.phone_list {
margin-top: 32px;
width: 182px;
margin-left: -182px;
}
.phone_jia {
width: 182px;
}
.phone_list li {
height: 22px;
line-height: 22px;
}
.phone_list li:nth-of-type(even) {
display: none;
}
.modal-dialog-one {
width: 668px;
}
.clear {
clear: both;
}
.left {
float: left;
font-size: 12px;
}
.bottom {
margin-top: 30px;
}
/*客户列表商 约带看*/
.detail-modal-bargaininfo-main-left {
float: left;
width: 340px;
line-height: 36px;
}
#bargaininfo_is_open,
#bargaininfo_type {
width: 100px !important;
display: inline-block;
}
#bargaininfo_expect_payback_time {
height: 32px;
}
.detail-modal-bargaininfo-main-right {
line-height: 36px;
width: 700px;
}
#bargaininfo_yetai {
width: 150px;
display: inline-block;
height: 26px;
padding: 3px 6px
}
#bargaininfo_chengjiao_price,
#bargaininfo_total_commission {
width: 120px;
display: inline-block;
height: 26px;
padding: 3px 6px
}
.detail-modal-bargaininfo-form {
line-height: 48px;
width: 620px;
margin: 0 auto;
}
.detail-modal-bargaininfo-commission-inputpar {
width: 100%;
overflow: hidden;
clear: both;
}
.detail-modal-bargaininfo-commission-sec,
.addtax-modal-tax-commission-sec {
overflow: hidden;
}
.detail-modal-bargaininfo-commission-sec>label,
.addtax-modal-tax-commission-sec>label {
float: left;
}
.detail-modal-bargaininfo-commission-sec>label:nth-of-type(2),
.addtax-modal-tax-commission-sec>label:nth-of-type(2) {
margin-left: 50px;
}
.detail-modal-bargaininfo-commission-sec>div,
.addtax-modal-tax-commission-sec>div {
float: left;
width: 380px;
}
.detail-modal-bargaininfo-commission-sec>mark,
.addtax-modal-tax-commission-sec>mark {
float: left;
overflow: hidden;
background-color: transparent;
padding-top: 5px;
padding-left: 10px;
}
.detail-modal-bargaininfo-commission-sec>mark>img,
.addtax-modal-tax-commission-sec>mark>img {
float: left;
width: 20px;
}
#bargaininfo_commission_add_btn {
width: 100%;
margin-bottom: 20px;
}
#bargaininfo_commission_add_btn>img {
display: block;
margin: 0 auto;
}
.opacity-0 {
opacity: 0;
}
#user_call {
height: 20px;
width: 30px;
border-radius: 3px;
line-height: 20px;
margin-top: 22px;
font-size: 10px;
text-align: center;
cursor: pointer
}
/*客户动态*/
.followup-modal-list-area {
height: 450px;
overflow-y: scroll;
}
/*客户详情 头像*/
#user_pic {
width: 30px;
height: 30px;
border-radius: 15px;
}
/*初始化 隐藏时间控件*/
/*.datetimepicker{
opacity: 0;
}*/
/*拨打电话样式*/
.modal-body-width {
width: 460px;
}
#phone_title2{
width: 100%;
height: 186px;
line-height: 186px;
text-align: center;
font-weight: 600;
font-size: 43px;
}
#phone_title{
font-weight: 600;
}
</style> </style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container"> <div class="container">
...@@ -103,11 +339,10 @@ ...@@ -103,11 +339,10 @@
</div> </div>
</div> </div>
</div> </div>
<!--操作详情记录 同步客户列表-->
<!--操作详情记录-->
<div class="modal fade" id="modal-record" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="modal-record" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content modal-body1"> <div class="modal-content modal-body-details">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
× ×
...@@ -116,56 +351,124 @@ ...@@ -116,56 +351,124 @@
客户资料/跟进 客户资料/跟进
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body modal-body1">
<table id="caozuo_hide" border="0"> <table class="" id="caozuo_hide" border='0'>
<thead> <thead>
<tr> <tr>
<td width="36%"> <td width="40%">
<span class="fore-span ld-Marheight">产生类型:</span>
<span class="fore-span ld-Marheight" id="source_type"></span>
</td>
<td>
<span class="fore-span ld-Marheight">VIP客户:</span>
<select class="form-control btn6 ld-Marheight" id="user_vip2">
<option value='' class="successModel">请选择</option>
<option value="1"></option>
<option value="0"></option>
</select>
</td>
<td>
<span class="fore-span ld-Marheight">客户编号:</span> <span class="fore-span ld-Marheight">客户编号:</span>
<span class="fore-span ld-Marheight" id="cus_id"></span> <span class="fore-span ld-Marheight" id="cus_id"></span>
</td> </td>
<td width="30%"> </tr>
<tr>
<td>
<span class="fore-span ld-Marheight">姓名:</span> <span class="fore-span ld-Marheight">姓名:</span>
<input class="form-control btn4-1 ld-Marheight fore-span" value="" data-rule-phoneus="false" data-rule-required="false" id="cus_name" name="name" type="text"> <input class="form-control btn6 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="cus_name" name="name" type="text">
</td> </td>
<td>
<td>
<span class="fore-span ld-Marheight">性别:</span> <span class="fore-span ld-Marheight">性别:</span>
<select class="form-control btn4-1 ld-Marheight fore-span" id="sex"> <select class="form-control btn6 ld-Marheight" id="sex">
<option value="" class="successModel">性别</option> <option value="0" class="successModel">性别</option>
<option value="0"></option> <option value="1"></option>
<option value="1"></option> <option value="2"></option>
</select> </select>
</td> </td>
<td>
<span class="fore-span ld-Marheight">电话:</span>
<span class="fore-span ld-Marheight" id="cus_phone"></span>
<a class="fore-span btn-primary ld-Marheight" id="user_call" href="#modal-call" data-toggle="modal">拨打</a>
</td>
</tr> </tr>
<td> <tr>
<span class="fore-span ld-Marheight">客方:</span> <td>
<input type="text" class="form-control btn6-1 ld-Marheight fore-span" name="pwd" autocomplete="off" id="cus_fang"> <span class="fore-span ld-Marheight">业态:</span>
<ul class="user-ul2"> <select class="form-control btn6 ld-Marheight" name="industry_type_two">
<option>轻餐饮</option>
</ul> <option>重餐饮</option>
<option>百货零售</option>
</td> <option>服装</option>
<td> <option>亲子教育</option>
<span class="fore-span ld-Marheight">上传时间:</span> <option>休闲娱乐</option>
<span class="fore-span ld-Marheight" id="cus_date"></span>
</td> </select>
<td> </td>
<span class="fore-span ld-Marheight">电话:</span> <td>
<span class="fore-span ld-Marheight" id="cus_phone"></span> <span class="fore-span ld-Marheight">价格:</span>
</td> <input class="form-control btn6 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="" name="price_demand" type="number"><span class="fore-span ld-Marheight">元/月</span>
</td>
<td>
<span class="fore-span ld-Marheight">面积:</span>
<input class="form-control btn6 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="" name="area_demand" type="number"><span class="fore-span ld-Marheight"></span>
</td>
</tr>
<tr>
<td>
<span class="fore-span ld-Marheight">注册时间:</span>
<span class="fore-span ld-Marheight" id="registration_time"></span>
</td>
<td>
<span class="fore-span ld-Marheight">邀请人:</span>
<span class="fore-span ld-Marheight" id="referrer_user"></span>
</td>
<td>
<span class="fore-span ld-Marheight">昵称:</span>
<img src="" alt="" id="user_pic" class="fore-span ld-Marheight diagram-image J_preview" />
<span class="fore-span ld-Marheight" id="cus_nick"></span>
</td>
</tr>
<tr>
<td>
<span class="fore-span ld-Marheight">创建时间:</span>
<span class="fore-span ld-Marheight" id="cus_date"></span>
</td>
<!--<td>
</td>-->
<td>
<span class="fore-span ld-Marheight">下载登录时间:</span>
<span class="fore-span ld-Marheight" id="firstlogin_time"></span>
</td>
</tr>
<tr>
<td>
<div class="form-group">
<span class="fore-span ld-Marheight">客方:</span>
<div class="col-sm-9">
<input type="text" class="form-control btn6-1 ld-Marheight" name="pwd" autocomplete="off" id="cus_fang">
<ul class="user-ul2"></ul>
</div>
</div>
</td>
</tr>
<tr class="ld-Marheight">
<td class="text-left"><label>客方修改记录:</label></td>
</tr> </tr>
</thead> </thead>
</table> </table>
<table class="table table-striped table-bordered table-hover table-condensed"> <table class="table table-striped table-bordered table-hover table-condensed">
<tr>
<th class="text-center">跟进内容</th>
<th class="text-center">跟进人</th>
<th class="text-center">跟进时间</th>
</tr>
<!--<thead>
<tr class="ld-Marheight">
<td class="text-left">客方修改记录:</td>
</tr>
</thead>-->
<tbody class="text-center" id="caozuo_table"></tbody> <tbody class="text-center" id="caozuo_table"></tbody>
</table> </table>
</div> </div>
...@@ -180,4 +483,236 @@ ...@@ -180,4 +483,236 @@
<!-- /.modal-content --> <!-- /.modal-content -->
</div> </div>
<!-- /.modal --> <!-- /.modal -->
</div>
<!-- /#删除模态框 -->
<div class="modal fade" id="modal-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
删除
</h4>
</div>
<div class="modal-body">
<div class="modal-body">
<input type="hidden" value="" id="delete_id" /> 确认删除吗?
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" id="confirm_delete">
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#跟进 -->
<div class="modal fade" id="modal-add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
跟进
</h4>
</div>
<div class="modal-body">
<label class="col-sm-3 control-label">跟进:</label>
<div class="col-sm-9">
<textarea class="form-control" rows="3" id="genj_text"></textarea>
<span class="use-span text-danger">(必填)</span>
</div>
<label class="col-sm-3 control-label">状态标签:</label>
<div class="col-sm-9">
<label class="control-label">求租</label><input type="radio" name="user_status" value="0">
<label class="control-label">已租</label><input type="radio" name="user_status" value="1">
<label class="control-label">无效</label><input type="radio" name="user_status" value="-1">
<span class="text-danger">(必填)</span>
</div>
<div class="clear">
</div>
<div class="followup-modal-list-area">
<table class="table table-striped table-bordered table-hover table-condensed">
<tbody class="text-center" id="caozuo_table2">
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" id="edit_add" data-dismiss="modal">
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- #批量修改客方-->
<div class="modal fade" id="modal_modify_user" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-one">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
批量修改盘方
</h4>
</div>
<div class="modal-body modal-body-one">
<br>
<!-- ============添加========== -->
<div class="jian_class">
<input name="ues_id" placeholder="请输入经纪人姓名" type="tel" value="" class="phone_jia old_agents form-control">
<ul class="phone_list"></ul>
</div>
<span class="btn3" id="batch">批量修改为&nbsp;&nbsp;</span>
<div class="jian_class">
<input name="ues_id" placeholder="请输入经纪人姓名" type="tel" value="" class="phone_jia new_agents form-control">
<ul class="phone_list"></ul>
</div>
<br><br><br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" id="modify_add" data-dismiss="modal">
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--约带看-->
<div class="modal fade" id="modal-takeLook" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title">
约带看
</h4>
</div>
<div class="modal-body">
<table class="table table-striped table-bordered table-hover table-condensed" id=" ">
<thead>
<tr>
<td>
<form id="form1">
<span class="fore-span ld-Marheight">姓名:</span>
<span class="fore-span ld-Marheight" id="take_look_name"></span>
<div class="clear "></div>
<span class="fore-span ld-Marheight">电话:</span>
<span class="fore-span ld-Marheight" id="take_look_phone"></span>
<div class="clear "></div>
<span class="fore-span ld-Marheight">客户编号:</span>
<span class="fore-span ld-Marheight" id="take_look_id"></span>
<div class="clear"></div>
<div class="detail-modal-bargaininfo-commission-inputpar">
<div class="detail-modal-bargaininfo-commission-addarea">
<div class="form-group detail-modal-bargaininfo-commission-sec">
<span class="fore-span ld-Marheight">约带看商铺:</span>
<div class=" ">
<!--选择式-->
<input type="text" class="form-control ld-Marheight look-shop" name=" " autocomplete="off" placeholder="请输入商铺名称、商铺编号、商铺地址关键词 ">
<ul class="look-shop-ul"></ul>
<!--下拉列表-->
</div>
<!--<mark href="javascript:; " class="detail-modal-bargaininfo-commission-cancel-pic "><img src="/resource/image/search_gb.png " /></mark>-->
</div>
</div>
<div id="bargaininfo_commission_add_btn">
<img src="/resource/image/jia2@2x.png" />
</div>
</div>
<!--<div class="form-group ">
<span class="fore-span ld-Marheight ">约带看商铺:</span>
<input type="text " class="form-control btn6 ld-Marheight " name=" " autocomplete="off " id="look_shop " placeholder="请输入商铺名称、商铺编号、商铺地址关键词 ">
<ul class="look-shop-ul "></ul>
</div>-->
<div class="clear"></div>
<span class="fore-span ld-Marheight">预计到场时间:</span>
<!--<input class="form-control btn6 ld-Marheight " value=" " data-rule-phoneus="false " data-rule-required="false " id=" " name=" " type="datetime-local ">-->
<!--datetime-local-->
<!--bootstrap 时间控件-->
<input type="text" value=" " class="form_datetime form-control btn6 ld-Marheight" id="look_shop_date" readonly="readonly">
<div class="clear"></div>
<div class="textarea-con ld-Marheight">
<span class="fore-span">备注:</span>
<textarea name=" " rows="5" cols="50" id="note_look"></textarea>
</div>
</form>
</td>
</tr>
</thead>
<tbody class="text-center" id="caozuo_table">
</table>
</div>
<div class="modal-footer">
<!--<button type="button " class="btn btn-default " data-dismiss="modal ">关闭
</button>-->
<button type="button" class="btn btn-primary save-look">
<!--data-dismiss="modal "-->
保存
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--拨打手机号-->
<div class="modal fade" id="modal-call" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-body-width">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
请使用
<span id="phone_title">
</span>
的手机拨打该虚拟号
</h4>
</div>
<div class="modal-body">
<!--<input type="hidden " value=" " id="delete_id " />-->
<div id="phone_title2">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" id="unbind_call">没打通
</button>
<button type="button" class="btn btn-primary" data-dismiss="modal">
已拨打
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div> </div>
\ No newline at end of file
define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) { define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination',"datetimepicker", 'bootstrapJs'], function(doT, template) {
follow = { user = {
pageNo: 1, pageNo: 1,
/*第几页*/ /*第几页*/
pageSize: 15, pageSize: 15,
...@@ -12,25 +12,57 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -12,25 +12,57 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
ajaxObj: '', ajaxObj: '',
stopstatus: true, stopstatus: true,
boxphoto: '', boxphoto: '',
user_id: 0,
user_phone:'',
urls: '',
agent_id_two: '',
agent_id2: 0,
isAjaxSaving: false,
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
follow.getList(1); user.getList(1);
follow.event(); user.event();
//汉化实现
;(function($){
$.fn.datetimepicker.dates['zh-CN'] = {
days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
months: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
monthsShort: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
today: "今日",
suffix: [],
meridiem: ["am", "pm"],
weekStart: 1,
};
}(jQuery));
$(".form_datetime").datetimepicker({
//format: 'yyyy-mm-dd hh:ii:ss',
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true,
language: 'zh-CN',
minView: 0,
minuteStep: 30
//hourStep: 1
});
$('.datetimepicker').hide();//初始化隐藏时间控件
}, },
event: function() { event: function() {
$("#search").click(function() { $("#search").click(function() {
follow.getList(1); user.getList(1);
}); });
// 部门 门店 二级联动 // 部门 门店 二级联动
var _doc = $(document); var _doc = $(document);
follow.getDistrict(function() { user.getDistrict(function() {
_doc.on('input', '#district_id, #district_id2', function() { _doc.on('input', '#district_id, #district_id2', function() {
var _this = $(this); var _this = $(this);
var _id = _this.val(); var _id = _this.val();
_this.next().html(''); //先清空 _this.next().html(''); //先清空
if(_id && _id != '0') { if(_id && _id != '0') {
follow.getDistrictStoreList(_id, function(_data) { user.getDistrictStoreList(_id, function(_data) {
// var _str = ''; // var _str = '';
var _str = '<option value="0">全部</option>'; var _str = '<option value="0">全部</option>';
$.each(_data, function(i, item) { $.each(_data, function(i, item) {
...@@ -41,53 +73,381 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -41,53 +73,381 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
} else {}; } else {};
}); });
}); });
$("#reset").click(function() { //重置 //约带看列表 点击新增商铺
var _iYJAAObj = $('.detail-modal-bargaininfo-commission-addarea');
_doc.on('click', '#bargaininfo_commission_add_btn>img', function(e) {
e.preventDefault();
e.stopPropagation();
if($('.detail-modal-bargaininfo-commission-addarea>div').length >= 5) {
alert('最多添加5条');
return false;
} else {
_iYJAAObj.append('<div class="form-group detail-modal-bargaininfo-commission-sec"><span class="fore-span ld-Marheight opacity-0">约带看商铺:</span><div class=" "><input type="text" class="form-control ld-Marheight look-shop" name=" " autocomplete="off" placeholder="请输入商铺名称、商铺编号、商铺地址关键词"><ul class="look-shop-ul"></ul></div><mark href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic ld-Marheight"><img src="/resource/image/search_gb.png"/></mark></div>');
};
});
//详情弹出框,成交信息里的实收佣金相关的事件,点击x删除这条
_doc.on('click', '.detail-modal-bargaininfo-commission-cancel-pic', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).parent().remove();
});
//点击input 出现时间控件
_doc.on('click', '#look_shop_date', function() {
$('.datetimepicker').show();
});
_doc.on('click', '.take-look', function(e) {//点击约带看 获取 客户姓名 编号 电话
e.preventDefault();
e.stopPropagation();
$('#take_look_name').html($(this).attr("data-name"));
$('#take_look_phone').html($(this).attr("data-phone"));
$('#take_look_id').html($(this).attr("data-id"));
$('#look_shop_date').val('');
$('#note_look').val('');
$('.look-shop').val('');
$('.look-shop').removeAttr('data-id');
});
$(".Bannertu").click(function() {
BrowseServer('cover_image');
});
$("#search").click(function() {
user.getList(1);
});
$("#reset").click(function() {
document.getElementById("form_search").reset(); document.getElementById("form_search").reset();
$('#guest_stores').html('');
$('#guest_stores2').html('');
});
$("#close").click(function() {
document.getElementById("add_user_form").reset();
$(".user-ul").empty();
});
$(".close").click(function() {
document.getElementById("add_user_form").reset();
$(".user-ul").empty();
});
$("#confirm_delete").click(function() {
var params = {};
params.id = $("#delete_id").val();
params.status = 1;
if(!params.id || params.id == null) {
alert("要删除的id不能为空");
return false;
}
user.delete_user(params);
});
$(document).delegate(".genj_ure", "click", function() {
user.user_id = $(this).attr("data-id");
// $("#genj_text").val('');
// $("input[name = 'user_status']:checked").removeAttr("checked");
user.getGenjinLabel();
});
$(document).delegate(".add_alert", "click", function() { //重置搜索
document.getElementById("add_user_form").reset();
});
//新增客户
$(document).delegate("#add_user", "click", function() { //新增客户
user.user_id = $(this).attr("data-id");
user.add_user();
}); });
$ (document).delegate (".caozuo", "click", function () {//点击操作跟进详情 //点击新增客户 清除id
follow.house_id = $ (this).attr ("data-id");
follow.Caozuo(); $(document).delegate(".add-user-new", "click", function() { //新增客户
user.agent_id='';
}); });
$ (document).delegate (".submit_edit", "click", function () {//提交 // 跟进的提交按钮 点击
follow.house_id = $ (this).attr ("data-id"); $(document).delegate("#edit_add", "click", function(e) {
follow.Submit_follow(); e.preventDefault();
e.stopPropagation();
user.edit_add();
}); });
$ (document).on ("input","#cus_fang", function () {//手机号搜索客方2 // 批量修改客方
if($("#cus_fang").val()==''){ $(document).delegate("#modify_add", "click", function() {
user.modify_add();
});
$(document).delegate(".caozuo", "click", function() { //点击操作跟进详情
user.user_id = $(this).attr("data-id");
user.user_phone = $(this).attr("data-phone");
user.Caozuo();
});
$(document).on("input", "#set_father_id3", function() { //手机号新增搜索客方
if($("#set_father_id3").val() == '') {
user.agent_id='';
$(".user-ul").html('');
} else {
user.search_phone();
}
});
//拨打手机号
$(document).on("click", "#user_call", function() {
user.user_Call();
});
//没打通手机号
$(document).on("click", "#unbind_call", function() {
user.unbind_Call();
});
//约带看 保存
$(document).on("click", ".save-look", function() { //手机号搜索客方
user.save_look();
});
//约带看 商铺选择
$(document).on("input", ".look-shop", function() { //手机号搜索客方
if($(this).val() == '') {
$(this).next('.look-shop-ul').html('');
$(this).removeAttr("data-id");
} else {
user.search_phone_look(this);
}
});
$(document).on("input", "#cus_fang", function() { //手机号搜索客方2 编辑
if($("#cus_fang").val() == '') {
user.agent_id2='';
$(".user-ul2").html(''); $(".user-ul2").html('');
}else{ } else {
follow.search_phone2(); user.search_phone2();
} }
}); });
$ (document).delegate (".addphone2", "click", function () {//list2消失 $(document).delegate(".addphone", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
follow.addphone2(this); user.addphone(this);
});
$(document).delegate(".addphone2", "click", function() { //list2消失
user.addphone2(this);
});
//点击列表 获取input的值
$(document).delegate(".addphone3", "click", function() { //list3消失
user.addphone3(this);
});
// =============================下拉列表===================
$(document).delegate(".submit_edit", "click", function(e) { //提交
e.preventDefault();
e.stopPropagation();
user.Submit_follow();
});
// =============下拉列表========================
var _ajaxObjTel = null;
_doc.on('input', '.phone_jia', function() {
var _this = $(this),
_thisVal = $.trim(_this.val());
_this.removeAttr('data-id'); //移除之前携带的信息
if(_thisVal != '') {
_ajaxObjTel && _ajaxObjTel.abort();
_ajaxObjTel = $.ajax({
type: 'GET',
url: '/index/getBroker_new',
data: {
'phone': $.trim(_this.val())
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
if(data['data'].length > 0) {
var _htmlTemp = '';
$.each(data['data'], function(i, item) {
_htmlTemp += '<li data-id="{3}">{2}{0}-{1}<li>'.stringFormatObj({
'0': item['name'],
'1': item['phone'],
'2': _this.parent().nextAll('.input-add-tel').data('hideid') ? '' : (item['id'] + '-'),
'3': item['id']
});
});
// 输出trim
_this.next().show().html(_htmlTemp);
} else {
_this.next().html('');
};
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
//alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
};
});
_doc.on('click', '.jian_class>ul>li', function() {
var _this = $(this);
_this.parent().prev().val(_this.html()).attr('data-id', _this.attr('data-id'));
_this.parent().html('').hide();
}); });
}, },
addphone2:function(obj){ addphone: function(obj) {//新增客户 input赋值
var user_ht=$(obj).html(); var user_ht = $(obj).html();
$("#set_father_id3").val(user_ht);
$(".user-ul").html('');
user.agent_id = $(obj).attr("data-id");
},
addphone2: function(obj) {
var user_ht = $(obj).html();
$("#cus_fang").val(user_ht); $("#cus_fang").val(user_ht);
$(".user-ul2").html(''); $(".user-ul2").html('');
follow.agent_id = $ (obj).attr ("data-id"); user.agent_id2 = $(obj).attr("data-id");
}, },
search_phone2:function(){//手机号 //约带看 商铺名称搜索
$.ajax ({ addphone3: function(obj) {
url: '/index/select_by_phone', var _obj = $(obj);
type: 'POST', var user_ht = _obj.html();
_obj.parent().html('').prev().val(user_ht).attr('data-id', _obj.attr('data-id'));
},
save_look: function() { //约带看 点击保存
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
console.log(user_info_obj);
var arr_look=[];
for(var i=0;i<$('.look-shop').length;i++){
if($('.look-shop').eq(i).attr('data-id')){//如果id为空 不提交空的数据
arr_look[i]=$('.look-shop').eq(i).attr('data-id');
}
}
if(user_info_obj.id==1){
alert('当前用户没有权限提交约带看');
return false;
}
if(arr_look.length<0||arr_look.length==0){
alert('请选择约带看商铺');
return false;
}
var look_shop_date_val = $("#look_shop_date").val();
if(look_shop_date_val==''){
alert('请选择预计到场时间');
return false;
}
var _temp_date =new Date(look_shop_date_val+':000');//格式为2018-07-14 10:30:05:000
console.log(_temp_date);
var start_time = _temp_date.getTime()*0.001;
console.log(start_time);
if(!user.isAjaxSaving){
user.isAjaxSaving = true;
$.ajax({
url: '/broker/report',
type: 'POST',
async: true,
timeout: 30000,
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
},
beforeSend: function() {},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert('提交成功');
user.isAjaxSaving = false;//请求结束,再改为初始状态
$("#modal-takeLook").modal('hide');//提交成功后 关闭弹窗
} else {
alert(data.msg);
}
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
layerTipsX('请求超时');
};
}
});
}
},
search_phone: function() { //手机号新增客户
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true, async: true,
data: { data: {
"phone":$("#cus_fang").val() "phone": $("#set_father_id3").val()
}, },
dataType: 'json', dataType: 'json',
success: function (data) { success: function(data) {
if (data.code == 200) { if(data.code == 200) {
var user_ul = "";
$.each(data.data, function(i, item) {
user_ul += '<li class="addphone" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + '</li>';
});
$(".user-ul").html(user_ul);
} else {
alert(data.msg);
}
}
});
},
search_phone2: function() { //手机号 编辑是 客方搜索
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
"phone": $("#cus_fang").val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul2 = ""; var user_ul2 = "";
$.each(data.data, function(i,item) { $.each(data.data, function(i, item) {
user_ul2+='<li class="addphone2" data-id="'+item.id+'">'+item.id+'-'+item.realname+'-'+item.phone+'</li>'; user_ul2 += '<li class="addphone2" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + '</li>';
}); });
$(".user-ul2").html(user_ul2); $(".user-ul2").html(user_ul2);
} else {
alert(data.msg);
}
}
});
},
search_phone_look: function(n) { //商铺名选择
$.ajax({
// url:"https://pre2.tonglianjituan.com"+ '/broker/getShopList',
url:'/broker/getShopList',
type: 'GET',
async: true,
data: {
"site_area":5,
"title":$(n).val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul2 = "";
$.each(data.data, function(i, item) {
user_ul2 += '<li class="addphone3" data-id="' + item.id + '">' + item.id + '-' + item.title + '-' + item.address + '</li>';
});
$(n).next('.look-shop-ul').html(user_ul2);
// $(".look-shop-ul").html(user_ul2);
} else { } else {
alert(data.msg); alert(data.msg);
} }
...@@ -95,66 +455,251 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -95,66 +455,251 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
} }
}); });
}, },
Caozuo:function(){//获取跟进详情的数据 user_Call: function() { //客户详情 点击拨打按钮
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
console.log(user_info_obj);
var params = {};
params.phone_a = user_info_obj.phone;
$('#phone_title').html(user_info_obj.phone);
params.AuthToken = user_info_obj.AuthToken;
params.user_id = user.user_id;
console.log(params);
$.ajax({ $.ajax({
'type': 'GET', 'type': 'POST',
'url' : '/index/useraction_search', 'url': '/index/bindAXB',
data: {"user_id":follow.house_id}, data: params,
dataType: "json", dataType: "json",
success: function(data){ success: function(data) {
if(data.code == 200){ if(data.code == 200) {
if (data.data) { // alert('修改成功');
$("#cus_id").html(data.data.user_info.user_id);//客户编号 console.log(data.data.data.phone);
$("#cus_name").val(data.data.user_info.user_name);//姓名 $('#phone_title2').html(data.data.data.phone);
$("#sex").val(data.data.user_info.sex);//性别
$("#cus_phone").html(data.data.user_info.user_phone);//电话 // $("#modal-record").modal('hide');
$("#cus_date").html(data.data.user_info.create_time);//上传时间
$("#cus_fang").val(data.data.user_info.agentinfo);//客方
var caozuo_table="";
$.each(data['data']['user_date'], function(i, item) {
console.log(item)
caozuo_table +='<tr><td>'+item.content+'</td><td>'+item.agentinfo+'</td><td>'+item.create_time+'</td></tr>';
});
$("#caozuo_table").html(caozuo_table);
}
} else { } else {
alert('获取失败!'); alert(data.msg)
} }
} }
}); });
}, },
unbind_Call: function() { //客户详情 点击拨打按钮 弹出框 没打通
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
console.log(user_info_obj);
var params = {};
params.user_id = user.user_id;
params.phone_a = user_info_obj.phone;
$('#phone_title').html(user_info_obj.phone);
params.AuthToken = user_info_obj.AuthToken;
params.phone_x = $('#phone_title2').html()*1;
console.log(params);
$.ajax({
'type': 'POST',
'url': '/index/agentsUnBind',
data: params,
dataType: "json",
success: function(data) {
if(data.code == 200) {
// alert(data.msg);
// $("#modal-record").modal('hide');
} else {
alert(data.msg)
}
}
});
},
Submit_follow: function() { //提交 Submit_follow: function() { //提交
var params = {};
params.id = user.user_id;
params.user_name = $("#cus_name").val();
params.agents_id = user.agent_id2;
params.sex = $("#sex").val();
params.vip = $("#user_vip2").val();
params.industry_type = $("select[name=industry_type_two]").val();
params.price_demand = $("input[name=price_demand]").val();
params.area_demand = $("input[name=area_demand]").val();
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
'url': '/index/pcEditClient', 'url': '/index/pcEditClient',
data: params,
dataType: "json",
success: function(data) {
if(data.code == 200) {
alert('修改成功');
$("#modal-record").modal('hide');
} else {
alert(data.msg)
}
}
});
},
edit_add: function() { //提交跟进
var user_status = $("input[name = 'user_status']:checked").val();
var genj_text = $("#genj_text").val();
if(genj_text == '') {
alert('提交失败');
return false;
}
if(user_status == undefined) {
alert('状态标签未选中');
return false;
}
$.ajax({
url: '/index/pcAddFollow',
type: 'POST',
async: true,
data: {
"user_id": user.user_id,
"content": genj_text,
"user_status": user_status
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert('修改成功');
$("#modal-add").modal('hide');
} else {
alert(data.msg);
}
}
});
},
// 新增客户页面
Caozuo: function() { //获取跟进详情的数据
$.ajax({
'type': 'GET',
'url': '/index/useraction_search',
data: { data: {
"id": follow.house_id, "user_id": user.user_id
"user_nick": $("#cus_name").val(),
"user_phone": $("#cus_phone").html(),
"agent_id":follow.agent_id,//客方
"sex": $("#sex").val()
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
if(data.data) { if(data.data) {
$("#cus_id").html(data.data.user_info.user_id); //客户编号
$("#cus_name").val(data.data.user_info.user_name); //姓名
$("#cus_nick").html(data.data.user_info.user_nick); //昵称
$("#user_pic").attr('src',data.data.user_info.user_pic); //头像
$("#registration_time").html(data.data.user_info.registration_time);
$("#firstlogin_time").html(data.data.user_info.first_login_time);//第一次登陆时间
$("#sex").val(data.data.user_info.sex); //性别
$("#user_vip2").val(data.data.user_info.vip); //是否vip
$("#cus_phone").html(hideTel(data.data.user_info.user_phone)); //电话
$("#cus_date").html(data.data.user_info.create_time); //创建时间
$("#referrer_user").html(data.data.user_info.referrer_user); //上传时间
$("#cus_fang").val(data.data.user_info.agentinfo); //客方
$("select[name=industry_type_two]").val(data.data.user_info.industry_type);
$("input[name=price_demand]").val(data.data.user_info.price_demand * 1);
$("input[name=area_demand]").val(data.data.user_info.area_demand * 1);
user.agent_id_two = data.data.user_info.agent_id;
console.log(data.data.user_info.source);
if(data.data.user_info.source == 10) {
$("#source_type").html('客户c端注册'); //客方
}
if(data.data.user_info.source == 20) {
$("#source_type").html('经纪人报备时添加,状态未激');
}
if(data.data.user_info.source == 30) {
$("#source_type").html('老数据报备客户');
}
var caozuo_table = "";
$.each(data['data']['user_history'], function(i, item) {
caozuo_table += '<tr><td>' + item.remark + '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
});
if(caozuo_table){
$("#caozuo_table").html(caozuo_table);
}else{
$("#caozuo_table").html('暂无数据(*^_^*)');
}
} }
} else { } else {
alert('获取失败!');
}
}
});
},
delete_user: function(params) {
$.ajax({
url: '/index/del_user',
type: 'POST',
async: true,
data: params,
dataType: 'json',
success: function(data) {
$("#modal-delete").modal('hide');
if(data.code == "101") {
alert(data.msg);
return false;
}
user.getList(user.pageNo);
}
});
},
getGenjinLabel: function() {
$('#genj_text').val('');
$.ajax({
url: '/index/getUserLabel',
type: 'GET',
async: true,
data: {
"user_id": user.user_id
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
$("input[type='radio'][name='user_status'][value=" + data.data + "]").prop("checked", "checked");
user.getGenjincon();
}
}
});
},
getGenjincon: function() {//获取客户动态
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({
url:'/broker/useraction_search',
// url: 'https://pre2.tonglianjituan.com'+'/broker/useraction_search',
type: 'GET',
async: true,
data: {
"AuthToken": user_info_obj.AuthToken,
"user_id": user.user_id,
"agent_id": user_info_obj.id
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
//客户动态 即跟进
var caozuo_table = "";
$.each(data['data']['user_date'], function(i, item) {
caozuo_table += '<tr><td>' + item.step + '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
});
if(caozuo_table){
$("#caozuo_table2").html(caozuo_table);
}else{
$("#caozuo_table2").html('暂无跟进信息');
}
} }
} }
}); });
}, },
getList: function(pageNo) { getList: function(pageNo) {
follow.pageNo = pageNo; user.pageNo = pageNo;
var _startDateObj = $('#start_date'), var _startDateObj = $('#start_date'),
_endDateObj = $('#end_date'), _endDateObj = $('#end_date'),
_customerNameObj = $('#customer_name'), _customerNameObj = $('#customer_name'),
_customerPhoneObj = $('#customer_phone'), _customerPhoneObj = $('#customer_phone'),
_followContentObj = $('#follow_content'); _followContentObj = $('#follow_content');
var params = { var params = {
'pageNo': follow.pageNo, 'pageNo': user.pageNo,
'pageSize': follow.pageSize 'pageSize': user.pageSize
}; };
params.remark_name = $("#remark_name").val(); params.remark_name = $("#remark_name").val();
params.remark_phone = $("#remark_phone").val(); params.remark_phone = $("#remark_phone").val();
...@@ -181,7 +726,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -181,7 +726,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
var doTtmpl = doT.template(document.getElementById('remark_follow_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('remark_follow_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.data.list)); $("#follow_list").html(doTtmpl(data.data.data.list));
/*分页代码*/ /*分页代码*/
add_page(data.data.data.total,pageNo,follow.pageSize,follow.getList); add_page(data.data.data.total,pageNo,user.pageSize,user.getList);
/* $("#pagediv").pagination({ /* $("#pagediv").pagination({
length: data.data.data.total, length: data.data.data.total,
current: pageNo, current: pageNo,
...@@ -248,5 +793,5 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -248,5 +793,5 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}); });
} }
}; };
return follow; return user;
}); });
\ No newline at end of file
...@@ -25,9 +25,23 @@ ...@@ -25,9 +25,23 @@
</td> </td>
<!--<td>[%= it[item]['user_phone'] %]</td>--> <!--<td>[%= it[item]['user_phone'] %]</td>-->
<td>[%= hideTel(it[item]['user_phone']) %]</td> <td>[%= hideTel(it[item]['user_phone']) %]</td>
<td> <!--<td>
<a class="btn1 btn-success caozuo" href="#modal-record" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详细信息</a> <a class="btn1 btn-success caozuo" href="#modal-record" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详细信息</a>
</td> </td>-->
<!--客户跟进列表 同步 跟进列表-->
<td width="16%">
[% if((check_auth('auth_vip') && it[item]['vip']) || (it[item]['agent_id'] == 0) || (it[item]['agent_id'] == it[item]['current_agent_id']) || check_auth('index/pcEditClient') ) { %]
<a class="btn1 btn-success caozuo" href="#modal-record" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["id"] %]'>详细信息</a>&nbsp;
<a class="btn1 btn-success genj_ure" href="#modal-add" data-toggle="modal" data-id='[%= it[item]["id"] %]'>跟进</a>&nbsp;
<a class="btn1 btn-success take-look" href="#modal-takeLook" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-name='[%= it[item]["user_name"] %]' data-phone='[%= it[item]["user_phone"] %]'>约带看</a>
[% } %]
<!--<a class="btn1 btn-danger " href="#modal-delete" data-toggle="modal" onclick="delete_user(this)" data-id='[%= it[item]["id"] %]'>-->
<!--删除-->
<!--</a>-->
</td>
</tr> </tr>
[% } %] [% } %]
[% }else{ %] [% }else{ %]
......
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