Commit 1e35aa7e authored by agping's avatar agping

后台列表修改

parent 6503a60d
......@@ -45,14 +45,14 @@
<tr>
<td colspan="10">
<form id="form_search">
<span class="fore-span ld-Marheight">拜访时间:</span>
<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_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="end_date" name="end_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_start" name="start_date1" type="date">
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_start" name="start_date2" 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 btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_end" name="end_date2" type="date">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="district_id" placeholder="部门名称" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="store_id" placeholder="门店名称" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="手机号" type="text" value="">
......@@ -98,11 +98,11 @@
×
</button>
<h4 class="modal-title">
图片
</h4>
</div>
<div class="modal-body">
<img src="images/banner/Tulips.jpg" alt="" />
暂不能删除
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
......
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="evaluationList" />
<input type="hidden" class="page-load" id="marchinList" />
<style>
.modal-body{
/*height: 600px;*/
......@@ -45,33 +45,35 @@
<tr>
<td colspan="10">
<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_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="end_date" name="end_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_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="district_id" placeholder="部门名称" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="store_id" placeholder="门店名称" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="手机号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="姓名" type="text" value="">
<span class="fore-span ld-Marheight">进场平均分数:</span><span class="fore-span ld-Marheight" id='average_score'></span>
<span class="fore-span ld-Marheight">评价平均分数:</span><span class="fore-span ld-Marheight" id='average_score_evaluation'></span>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="district_id" placeholder="报备人所属部门" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="district_id" placeholder="所属门店" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="store_id" placeholder="客户姓名" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="客户手机号手机号" type="text" value="">
<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 btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="报备人姓名" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="商铺名" type="text" value="">
<select class="form-control btn2 ld-Marheight" id="shop_type">
<option value="-1">商铺类型</option>
<option value="0">商场</option>
<option value="1">街铺</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>
</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>
<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>
</thead>
......@@ -90,6 +92,7 @@
</div>
</div>
<!--时间轴-->
<!--时间轴-->
<div class="modal fade" id="modal-time" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
......@@ -98,11 +101,11 @@
×
</button>
<h4 class="modal-title">
图片
时间轴
</h4>
</div>
<div class="modal-body">
<img src="images/banner/Tulips.jpg" alt="" />
<div class="modal-body" class="iframe-div-parent">
<iframe class="iframe-time-line"></iframe>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
......@@ -115,5 +118,4 @@
\ No newline at end of file
......@@ -105,36 +105,16 @@ define(['doT', 'text!temp/evaluation_list_template_tpl.html', 'css!style/home.cs
}
});
},
// 导出列表
exportList: function(pageNo) {
console.log(2);
follow.pageNo = pageNo;
var params = {};
var excel_two = 1;
var user_name = $.trim($('#customer_name').val());
var start_time = $('#start_date').val();
var end_time = $('#end_date').val();
var internal_title = $('#shop_name').val();
var user_phone = $('#customer_phone').val();
var id = $('#shop_num').val() * 1;
var store_name = $('#store_name').val();
var report_phone = $('#applicant_phone').val();
var report_name = $('#applicant_name').val();
window.open('/index/getCollection?'+
'excel='+ excel_two +'&user_name=' + user_name + '&start_time=' + start_time + '&end_time=' + end_time + '&internal_title=' + internal_title + '&user_phone=' + user_phone + '&id=' + id+ '&store_name=' + store_name+ '&report_phone=' + report_phone+ '&report_name=' + report_name);
},
getList: function(pageNo) {
console.log($('#customer_name').val());
console.log($('#start_date').val());
console.log($('#shop_name').val());
follow.pageNo = pageNo;
var params = {};
params.start_time =$('#start_date').val();
params.end_time =$('#end_date').val();
params.create_time_start =$('#create_time_start').val();
params.create_time_end =$('#create_time_start').val();
params.create_time_start =$('#start_date').val();
params.create_time_end =$('#end_date').val();
params.march_in_time_start =$('#create_time_start').val();
params.march_in_time_end =$('#create_time_end').val();
params.district_id =$('#district_id').val();
params.store_id =$('#store_id').val();
params.user_name =$('#user_name').val();
......@@ -149,11 +129,8 @@ define(['doT', 'text!temp/evaluation_list_template_tpl.html', 'css!style/home.cs
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if (data.code == 200) {
var doTtmpl = doT.template(document.getElementById('evaluation_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
$("#average_score_evaluation").html(data.data.average_score_evaluation);
......
define(['doT', 'text!temp/marchin_list_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
follow = {
pageNo: 1,
/*第几页*/
pageSize: 10,
/*每页显示多少条*/
id: '',
house_id: '',
type: '',
valueCurrent: '',
ajaxObj: '',
stopstatus: true,
boxphoto: '',
init: function() {
//初始化dot
$(document.body).append(template);
follow.getList(0);
follow.event();
},
event: function() {
var _doc = $(document);
_doc.on('click', 'a[href="#modal-time"]', function(e){
follow.house_id = $ (this).attr ("data-id");
e.preventDefault();
e.stopPropagation();
// console.log('follow.house_id');
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id='+follow.house_id);
});
$("#search").click(function() {
follow.getList(1);
});
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
});
$ (document).delegate (".review-images", "click", function () {//提交
console.log($(this).attr ("data-img"));
});
$("#export").click(function() { //导出列表
follow.exportList();
});
$ (document).delegate (".submit_edit2", "click", function () {//提交
follow.house_id2 = $ (this).attr ("data-id");
console.log(follow.house_id2);
$("#real_money").val($(this).attr ("data-money"));
});
$ (document).delegate (".submit_edit", "click", function () {//提交
follow.Submit_follow();
});
$ (document).on ("input","#cus_fang", function () {//手机号搜索客方2
if($("#cus_fang").val()==''){
$(".user-ul2").html('');
}else{
follow.search_phone2();
}
});
$ (document).delegate (".addphone2", "click", function () {//list2消失
follow.addphone2(this);
});
},
addphone2:function(obj){
var user_ht=$(obj).html();
$("#cus_fang").val(user_ht);
$(".user-ul2").html('');
follow.agent_id = $ (obj).attr ("data-id");
},
search_phone2:function(){//手机号
$.ajax ({
url: '/index/select_by_phone',
type: 'POST',
async: true,
data: {
"phone":$("#cus_fang").val()
},
dataType: 'json',
success: function (data) {
if (data.code == 200) {
var user_ul2 = "";
$.each(data.data, function(i,item) {
user_ul2+='<li class="addphone2" data-id="'+item.id+'">'+item.id+'-'+item.realname+'-'+item.phone+'</li>';
});
$(".user-ul2").html(user_ul2);
} else {
alert(data.msg);
}
}
});
},
Submit_follow: function() { //提交
$.ajax({
'type': 'POST',
'url': '/index/addRealMoney',
data: {
"collection_id": follow.house_id2,
"real_money": $("#real_money").val(),
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
follow.getList(0);
} else {
}
}
});
},
getList: function(pageNo) {
console.log($('#customer_name').val());
console.log($('#start_date').val());
console.log($('#shop_name').val());
follow.pageNo = pageNo;
var params = {};
// params.start_time =$('#start_date').val();
// params.end_time =$('#end_date').val();
// params.create_time_start =$('#create_time_start').val();
// params.create_time_end =$('#create_time_start').val();
// params.district_id =$('#district_id').val();
// params.store_id =$('#store_id').val();
// params.user_name =$('#user_name').val();
// params.user_phone =$('#user_phone').val();
params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize;
$.ajax({
type: 'GET',
url: '/index/marchInList',//拜访列表
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('marchin_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
// $("#average_score_evaluation").html(data.data.average_score_evaluation);
// $("#average_score").html(data.data.average_score);
/*分页代码*/
add_page(data.data.total,pageNo,follow.pageSize,follow.getList);
}else {
alert(data['msg']);
};
}else{
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
alert('请求超时');
};
}
});
}
};
return follow;
});
\ No newline at end of file
......@@ -20,19 +20,6 @@
</tr>
[% } %]
</script>
<!--create_time string 评价时间
user_nick string 评价人姓名
user_phone string 评价人手机号
name string 经纪人姓名
phone string 经纪人手机号
evaluate_grade int 分数
evaluate_content string 评论内容
average_score int 进场平均分数
average_score_evaluation int 评价平均分数
-->
......
<script id="marchin_list_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['user_name'] %]</td>
<td>[%= it[item]['user_phone'] %]</td>
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['report_agent_name'] %]</td>
<td>[%= it[item]['house_title'] %]</td>
<td>
<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</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