Commit 421d93f5 authored by xishifeng's avatar xishifeng

跟进列表

parent bec935fe
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="RemarkFollowIndex" />
<div id="page-content-wrapper">
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<a href="javascript:;">跟进列表</a>
</li>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="9">
<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="start_date" name="start_date" 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="end_date" name="end_date" type="date">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="customer_name" placeholder="客户姓名" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="customer_phone" placeholder="客户手机号" type="tel" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="follow_content" placeholder="跟进内容" type="text" value="">
<span class="btn btn-default btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-default btn3 ld-Marheight" id="reset">重置</span>
</form>
</td>
</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>
</tr>
</thead>
<tbody class="text-center" id="business_list">
<!--<tr>-->
<!--<td>212</td>-->
<!--<td>商场</td>-->
<!--<td>长兴</td>-->
<!--<td>1000</td>-->
<!--<td>是</td>-->
<!--<td>2018-01-16 17:02:00</td>-->
<!--<td>已租</td>-->
<!--<td>张娜张-->
<!--<a data-toggle="modal" data-id="77" href="#modal-watch" class="btn1 btn-danger add_applies">修改</a>-->
<!--</td>-->
<!--<td>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">编辑</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">推荐至首页</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">设置案场权限人</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">是否独家</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">操作记录</a>-->
<!--<a data-toggle="modal" data-id="77" href="#modal-watch" class="btn1 btn-danger add_applies" onclick="delete_house(4720)">删除</a>-->
<!--</td>-->
<!--</tr>-->
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</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">
×
</button>
<h4 class="modal-title">
删除
</h4>
</div>
<div class="modal-body">
<div class="modal-body" id="del_msg">
确认删除吗?
</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-anch" 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" id="myModalLabel">
设置案场权限人
</h4>
</div>
<div class="modal-body">
<form id="submit_agent">
<div class="jian_class">
<input name="ues_id" placeholder="请输入" type="tel" value="" class="phone_jia">
<!--号码匹配名字-->
<ul class="phone_list"></ul>
</div>
<img src="/resource/image/jia2@2x.png" class="jia">
<input type="hidden" name="ues_id" class="houseinfos_id">
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary submit_follow" data-dismiss="modal">
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--操作记录-->
<div class="modal fade" id="modal-record" 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">
<thead>
<tr>
<th class="text-center">盘方修改记录</th>
<th class="text-center">操作人</th>
<th class="text-center">操作时间</th>
</tr>
</thead>
<tbody class="text-center" id="caozuo_table">
</table>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--是否独家-->
<div class="modal fade" id="modal-dujia" 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">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label">是否独家:</label>
<select class="form-control btn6" id="sel_dujia">
<option value="null" class="successModel">请选择</option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">独家合同上传(小于10张):</label>
<span id="liudan_pic_pre"></span>
<input readonly="readonly" type="hidden" name="liudan_pic_pre" class="form-control btn6" placeholder="请选择图片">
<button class="btn btn-default liudan_pic_btn" id="liudan_pic_btn" type="button">选择图片</button>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">独家代理有效期:</label>
<input class="form-control btn5 " data-rule-phoneus="false" data-rule-required="false" id="start_date_dujia" name="start_date_dujia" type="date">
<span class="fore-span">-</span>
<input class="form-control btn5 " value="" data-rule-phoneus="false" data-rule-required="false" id="end_date_dujia" name="end_date_dujia" type="date">
</div>
<div class="form-group">
<label class="col-sm-3 control-label">独家方:</label>
<input class="form-control btn6" data-rule-buga="false" data-rule-required="true" name="exclusive" placeholder="请输入姓名或手机号码" type="text" value="" id="exclusive">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary submit_follow2" data-dismiss="modal">
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
......@@ -49,6 +49,9 @@
<li role="presentation">
<a href="/admin.php/index/districtList.html">部门列表</a>
</li>
<li role="presentation">
<a href="/admin.php/index/RemarkFollowIndex.html">跟进列表</a>
</li>
<li role="presentation">
<a href="/admin.php/index/authRuleIndex.html">权限管理</a>
</li>
......
define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
business = {
pageNo: 1,
/*第几页*/
pageSize: 10,
/*每页显示多少条*/
id: '',
house_id: '',
type: '',
valueCurrent: '',
ajaxObj: '',
stopstatus: true,
ldHtml: $('.phone_list'),
boxphoto: '',
init: function() {
//初始化dot
$(document.body).append(template);
business.getList(0);
business.event();
},
event: function() {
$("#search").click(function() {
business.getList(1);
});
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
});
},
Submit_follow: function() { //提交案场权限人数据
var agents_id = "";
var _agents_id = "";
$("input[name='ues_id']").each(function() { //拼接经纪人id
var s = $(this).val();
var m = s.match(/[^-]+(?=[-])/g);
if(m === null) {
return false;
} else {
agents_id += "," + m[0];
_agents_id = agents_id.substring(1);
}
});
$.ajax({
'type': 'POST',
'url': '/index/addHousesAgents',
data: {
"houses_id": business.house_id,
"type": business.type,
"agents_id": _agents_id
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
if(data.data) {
$("#modal-anch").hide;
}
} else {
$("#modal-anch").hide;
}
}
});
},
getList: function(pageNo) {
business.pageNo = pageNo;
var _startDateObj = $('#start_date'),
_endDateObj = $('#end_date'),
_customerNameObj = $('#customer_name'),
_customerPhoneObj = $('#customer_phone'),
_followContentObj = $('#follow_content');
var params = {
'pageNo': business.pageNo,
'pageSize': business.pageSize
};
_startDateObj.val() != '' && (params.start_date = _startDateObj.val());
_endDateObj.val() != '' && (params.start_date = _endDateObj.val());
$.trim(_customerNameObj.val()) != '' && (params.customer = $.trim(_customerNameObj.val()));
$.trim(_customerPhoneObj.val()) != '' && (params.phone = $.trim(_customerPhoneObj.val()));
$.trim(_followContentObj.val()) != '' && (params.content = $.trim(_followContentObj.val()));
$.ajax({
type: 'GET',
url: '/index/RemarkFollowList',
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if (data.code == 200) {
var doTtmpl = doT.template(document.getElementById('remark_follow_tpl').innerHTML);
$("#business_list").html(doTtmpl(data.data.list));
/*分页代码*/
$("#pagediv").pagination({
length: data.data.total,
current: pageNo,
every: business.pageSize,
onClick: function(el) {
business.getList(el.num.current);
}
});
}else {
alert(data['msg']);
};
}else{
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
alert('请求超时');
};
}
});
}
};
return business;
});
\ No newline at end of file
<script id="remark_follow_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['created'] %]</td>
<td>[%= it[item]['content'] %]</td>
<td>[%= it[item]['admin'] %]</td>
<td>[%= it[item]['customer'] %]</td>
<td>[%= it[item]['phpone'] %]</td>
<td>
<a class="btn1 btn-success caozuo" href="#modal-record" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详细信息</a>
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
\ No newline at end of file
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