|
@@ -47,17 +47,19 @@
|
|
color: #000;
|
|
color: #000;
|
|
}
|
|
}
|
|
|
|
|
|
- .tableContent{
|
|
|
|
|
|
+ .tableContent {
|
|
width: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
}
|
|
}
|
|
- .demo-class .layui-layer-btn0{
|
|
|
|
|
|
+
|
|
|
|
+ .demo-class .layui-layer-btn0 {
|
|
background-color: #009688 !important;
|
|
background-color: #009688 !important;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
- .demo-class .layui-layer-btn1{
|
|
|
|
|
|
+
|
|
|
|
+ .demo-class .layui-layer-btn1 {
|
|
background-color: red;
|
|
background-color: red;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
@@ -73,20 +75,11 @@
|
|
<div class="layui-col-md12">
|
|
<div class="layui-col-md12">
|
|
<div class="LAY-btns" style="margin-bottom: 10px;">
|
|
<div class="LAY-btns" style="margin-bottom: 10px;">
|
|
<div style="float: left">
|
|
<div style="float: left">
|
|
- <button class="layui-btn" id="customer_add"><i
|
|
|
|
- class="layui-icon layui-icon-add-circle"></i>跟踪报告
|
|
|
|
- </button>
|
|
|
|
<button class="layui-btn" id="customer_order"><i
|
|
<button class="layui-btn" id="customer_order"><i
|
|
class="layui-icon layui-icon-add-circle"></i>预约量房
|
|
class="layui-icon layui-icon-add-circle"></i>预约量房
|
|
</button>
|
|
</button>
|
|
- <button class="layui-nav">
|
|
|
|
- <div class="layui-nav-item">
|
|
|
|
- <a href="javascript:;" style="color:#fff;">导出</a>
|
|
|
|
- <dl class="layui-nav-child">
|
|
|
|
- <dd><a href="#" id="btn_list">列表</a></dd>
|
|
|
|
- <dd><a href="#" id="btn_detail">明细</a></dd>
|
|
|
|
- </dl>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <button class="layui-btn" id="btn_list"><i
|
|
|
|
+ class="layui-icon layui-icon-download-circle"></i>导出
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<form class="layui-form" lay-filter="query-form-element">
|
|
<form class="layui-form" lay-filter="query-form-element">
|
|
@@ -108,10 +101,10 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="tableContent">
|
|
<div class="tableContent">
|
|
- <div style="width: 405px">
|
|
|
|
|
|
+ <div style="width: 375px">
|
|
<table class="layui-hide" id="customer_log" lay-filter="customer-operate-log"></table>
|
|
<table class="layui-hide" id="customer_log" lay-filter="customer-operate-log"></table>
|
|
</div>
|
|
</div>
|
|
- <div style="width: calc(100% - 450px)">
|
|
|
|
|
|
+ <div style="width: calc(100% - 390px)">
|
|
<table class="layui-hide" id="customer_datagrid" lay-filter="customer-operate"></table>
|
|
<table class="layui-hide" id="customer_datagrid" lay-filter="customer-operate"></table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -120,6 +113,9 @@
|
|
<div class="layui-btn-group">
|
|
<div class="layui-btn-group">
|
|
<a class="layui-btn layui-btn-xs" lay-event="customer_search"
|
|
<a class="layui-btn layui-btn-xs" lay-event="customer_search"
|
|
>查看</a>
|
|
>查看</a>
|
|
|
|
+ <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="add_review"
|
|
|
|
+ data-permission="customer.view_new_customer"
|
|
|
|
+ >跟踪报告</a>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
@@ -144,40 +140,44 @@
|
|
, url: '/customer/stage_count/'
|
|
, url: '/customer/stage_count/'
|
|
, cols: [[
|
|
, cols: [[
|
|
{field: 'stage', title: '阶段', width: 100}
|
|
{field: 'stage', title: '阶段', width: 100}
|
|
- , {field: 'total', title: "总人数", width: 100, sort: true}
|
|
|
|
- , {field: 'today_count', title: '今日', width: 100, sort: true}
|
|
|
|
- , {field: 'overdue_count', title: '逾期', width: 100, sort: true}
|
|
|
|
|
|
+ , {field: 'total_count', title: "总人数", width: 90, sort: true}
|
|
|
|
+ , {field: 'today_count', title: '今日', width: 90, sort: true}
|
|
|
|
+ , {field: 'overdue_count', title: '逾期', width: 90, sort: true}
|
|
]]
|
|
]]
|
|
});
|
|
});
|
|
|
|
|
|
table.render({
|
|
table.render({
|
|
elem: '#customer_datagrid'
|
|
elem: '#customer_datagrid'
|
|
- , url: '/api/dataTable.json'
|
|
|
|
|
|
+ , url: '/customer/new_customer/'
|
|
|
|
+ , title: '潜客跟踪'
|
|
, cols: [[
|
|
, cols: [[
|
|
{field: 'name', title: '姓名', width: 110}
|
|
{field: 'name', title: '姓名', width: 110}
|
|
, {field: 'gender_text', title: "性别", width: 70}
|
|
, {field: 'gender_text', title: "性别", width: 70}
|
|
- , {field: 'tel', title: '电话', width: 120}
|
|
|
|
|
|
+ , {field: 'tel', title: '电话', width: 130}
|
|
, {field: 'village', title: '小区', width: 150}
|
|
, {field: 'village', title: '小区', width: 150}
|
|
, {field: 'address', title: '地址', width: 200}
|
|
, {field: 'address', title: '地址', width: 200}
|
|
, {field: 'source_text', title: '来源', width: 100}
|
|
, {field: 'source_text', title: '来源', width: 100}
|
|
|
|
+ , {field: 'project_text', title: '项目', width: 100}
|
|
|
|
+ , {field: 'stage_progress_text', title: '阶段进度', width: 100}
|
|
|
|
+ , {field: 'potential_level_text', title: '客户级别', width: 100}
|
|
, {field: 'notes', title: '备注', width: 200}
|
|
, {field: 'notes', title: '备注', width: 200}
|
|
- , {field: 'follow_user', title: '跟踪人', width: 100}
|
|
|
|
- , {field: 'last_follow', title: '最后跟踪', width: 150}
|
|
|
|
- , {field: 'follow_status', title: '跟踪情况', width: 200}
|
|
|
|
|
|
+ , {field: 'status_text', title: '状态', width: 80}
|
|
|
|
+ , {field: 'track_user_text', title: '跟踪人', width: 100}
|
|
|
|
+ , {field: 'end_time_f', title: '最后跟踪时间', width: 120}
|
|
|
|
+ , {field: 'last_review', title: '最后跟踪情况', width: 200}
|
|
|
|
+ , {field: 'next_time_f', title: '下次跟踪时间', width: 120}
|
|
, {field: 'follow_count', title: '跟踪次数', width: 100}
|
|
, {field: 'follow_count', title: '跟踪次数', width: 100}
|
|
, {field: 'enter_count', title: '进店次数', width: 100}
|
|
, {field: 'enter_count', title: '进店次数', width: 100}
|
|
- , {field: 'last_enter', title: '最后进店时间', width: 150}
|
|
|
|
- , {field: 'rank', title: '级别', width: 100}
|
|
|
|
- , {field: 'status', title: '状态', width: 100}
|
|
|
|
- , {field: 'create_time', title: '建档时间', width: 150}
|
|
|
|
- , {field: 'create_user', title: '建档人', width: 150}
|
|
|
|
- , {width: 80, align: 'center', fixed: 'right', toolbar: '#customer-operate-bar'}
|
|
|
|
|
|
+ , {field: 'last_enter_time', title: '最后进店时间', width: 150}
|
|
|
|
+ , {field: 'create_time_f', title: '建档时间', width: 150}
|
|
|
|
+ , {field: 'create_user_text', title: '建档人', width: 100}
|
|
|
|
+ , {width: 130, align: 'center', fixed: 'right', toolbar: '#customer-operate-bar'}
|
|
]]
|
|
]]
|
|
, page: true
|
|
, page: true
|
|
, height: 'full-108'
|
|
, height: 'full-108'
|
|
});
|
|
});
|
|
|
|
|
|
- function createFollowReport(){
|
|
|
|
|
|
+ function createFollowReport(customer_id, stage_progress_sort) {
|
|
layer.open({
|
|
layer.open({
|
|
type: 2,
|
|
type: 2,
|
|
title: '添加跟踪报告',
|
|
title: '添加跟踪报告',
|
|
@@ -185,9 +185,9 @@
|
|
btn: ['保存', '取消'],
|
|
btn: ['保存', '取消'],
|
|
yes: function (index, dom) {
|
|
yes: function (index, dom) {
|
|
layui.onSubmitChild = function (res) {
|
|
layui.onSubmitChild = function (res) {
|
|
- if(res.code === 0){
|
|
|
|
|
|
+ if (res.code === 0) {
|
|
layer.msg('添加成功!', {icon: 1})
|
|
layer.msg('添加成功!', {icon: 1})
|
|
- }
|
|
|
|
|
|
+ }
|
|
layer.close(index);
|
|
layer.close(index);
|
|
table.reload('customer_datagrid', {});
|
|
table.reload('customer_datagrid', {});
|
|
};
|
|
};
|
|
@@ -196,70 +196,54 @@
|
|
btn2: function (index, layero) {
|
|
btn2: function (index, layero) {
|
|
layer.close(index);//关闭当前按钮
|
|
layer.close(index);//关闭当前按钮
|
|
},
|
|
},
|
|
- content: 'add_report.html'
|
|
|
|
|
|
+ content: 'add_report.html?customer_id=' + customer_id + '&stage_progress_sort=' + stage_progress_sort
|
|
});
|
|
});
|
|
};
|
|
};
|
|
- //导出列表
|
|
|
|
- var _params1 = {};
|
|
|
|
- $('#btn_list').on('click', function () {
|
|
|
|
- $.get({
|
|
|
|
- url: '/order/?export=true',
|
|
|
|
- dataType: 'json',
|
|
|
|
- data: _params1,
|
|
|
|
- success: function (res) {
|
|
|
|
- if (res.code === 1) {
|
|
|
|
- layer.msg(res.msg);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- table.exportFile('datagrid', res,)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- });
|
|
|
|
- //导出明细
|
|
|
|
- var _params2 = {};
|
|
|
|
- $('#btn_detail').on('click', function () {
|
|
|
|
- $.get({
|
|
|
|
- url: '/order/?export=true',
|
|
|
|
- dataType: 'json',
|
|
|
|
- data: _params2,
|
|
|
|
- success: function (res) {
|
|
|
|
- if (res.code === 1) {
|
|
|
|
- layer.msg(res.msg);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- table.exportFile('datagrid', res,)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- });
|
|
|
|
//监听工具条
|
|
//监听工具条
|
|
table.on('tool(customer-operate)', function (obj) {
|
|
table.on('tool(customer-operate)', function (obj) {
|
|
var data = obj.data;
|
|
var data = obj.data;
|
|
if (obj.event === 'customer_search') {
|
|
if (obj.event === 'customer_search') {
|
|
- table.editdata = data;
|
|
|
|
- layer.open({
|
|
|
|
- skin: 'demo-class',
|
|
|
|
- type: 2,
|
|
|
|
- title: '查看客户详情',
|
|
|
|
- area: ['45%', '90%'],
|
|
|
|
- btn: ['跟踪报告', '更新进度', '取消'],
|
|
|
|
- yes: function (index, dom) {
|
|
|
|
- //添加跟踪报告
|
|
|
|
- createFollowReport()
|
|
|
|
- },
|
|
|
|
- btn2: function (index, layero) {
|
|
|
|
- //更新进度
|
|
|
|
- layer.close(index);//关闭当前按钮
|
|
|
|
- },
|
|
|
|
- btn3: function (index, layero) {
|
|
|
|
- //取消
|
|
|
|
- layer.close(index);//关闭当前按钮
|
|
|
|
- },
|
|
|
|
- content: 'detail.html'
|
|
|
|
- });
|
|
|
|
|
|
+ table.editdata = data;
|
|
|
|
+ layer.open({
|
|
|
|
+ skin: 'demo-class',
|
|
|
|
+ type: 2,
|
|
|
|
+ title: '查看客户详情',
|
|
|
|
+ area: ['45%', '90%'],
|
|
|
|
+ btn: ['跟踪报告', '更新进度', '取消'],
|
|
|
|
+ yes: function (index, dom) {
|
|
|
|
+ //添加跟踪报告
|
|
|
|
+ createFollowReport(data.id, data.stage_progress_sort)
|
|
|
|
+ },
|
|
|
|
+ btn2: function (index, layero) {
|
|
|
|
+ //更新进度
|
|
|
|
+ layer.close(index);//关闭当前按钮
|
|
|
|
+ },
|
|
|
|
+ btn3: function (index, layero) {
|
|
|
|
+ //取消
|
|
|
|
+ layer.close(index);//关闭当前按钮
|
|
|
|
+ },
|
|
|
|
+ content: 'detail.html'
|
|
|
|
+ });
|
|
|
|
+ } else if (obj.event === 'add_review') {
|
|
|
|
+ //添加跟踪报告
|
|
|
|
+ createFollowReport(data.id, data.stage_progress_sort)
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ table.on('row(customer-operate-log)', function (obj) {
|
|
|
|
+ var data = obj.data;
|
|
|
|
+ table.reload('customer_datagrid', {
|
|
|
|
+ where: {stage_progress: data.stage_id}
|
|
|
|
+ , page: {curr: 1}
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ //标注选中样式
|
|
|
|
+ obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ var _params = {};
|
|
form.on('submit(query-form-element)', function (data) {
|
|
form.on('submit(query-form-element)', function (data) {
|
|
|
|
+ _params = data.field;
|
|
table.reload('customer_datagrid', {
|
|
table.reload('customer_datagrid', {
|
|
where: data.field
|
|
where: data.field
|
|
, page: {curr: 1}
|
|
, page: {curr: 1}
|
|
@@ -267,10 +251,20 @@
|
|
layer.closeAll();
|
|
layer.closeAll();
|
|
return false
|
|
return false
|
|
});
|
|
});
|
|
-
|
|
|
|
- //添加跟踪报告
|
|
|
|
- $('#customer_add').on('click', function () {
|
|
|
|
- createFollowReport()
|
|
|
|
|
|
+ //导出列表
|
|
|
|
+ $('#btn_list').on('click', function () {
|
|
|
|
+ $.get({
|
|
|
|
+ url: '/customer/new_customer/?export=true',
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ data: _params,
|
|
|
|
+ success: function (res) {
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
+ layer.msg(res.msg);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ table.exportFile('customer_datagrid', res,)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
});
|
|
});
|
|
|
|
|
|
$('#customer_order').on('click', function () {
|
|
$('#customer_order').on('click', function () {
|
|
@@ -281,9 +275,9 @@
|
|
btn: ['保存', '取消'],
|
|
btn: ['保存', '取消'],
|
|
yes: function (index, dom) {
|
|
yes: function (index, dom) {
|
|
layui.onSubmitChild = function (res) {
|
|
layui.onSubmitChild = function (res) {
|
|
- if(res.code === 0){
|
|
|
|
|
|
+ if (res.code === 0) {
|
|
layer.msg('添加成功!', {icon: 1})
|
|
layer.msg('添加成功!', {icon: 1})
|
|
- }
|
|
|
|
|
|
+ }
|
|
layer.close(index);
|
|
layer.close(index);
|
|
table.reload('customer_datagrid', {});
|
|
table.reload('customer_datagrid', {});
|
|
};
|
|
};
|