|
@@ -47,17 +47,19 @@
|
|
|
color: #000;
|
|
|
}
|
|
|
|
|
|
- .tableContent{
|
|
|
+ .tableContent {
|
|
|
width: 100%;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
flex-direction: row;
|
|
|
}
|
|
|
- .demo-class .layui-layer-btn0{
|
|
|
+
|
|
|
+ .demo-class .layui-layer-btn0 {
|
|
|
background-color: #009688 !important;
|
|
|
color: #fff;
|
|
|
}
|
|
|
- .demo-class .layui-layer-btn1{
|
|
|
+
|
|
|
+ .demo-class .layui-layer-btn1 {
|
|
|
background-color: red;
|
|
|
color: #fff;
|
|
|
}
|
|
@@ -73,9 +75,6 @@
|
|
|
<div class="layui-col-md12">
|
|
|
<div class="LAY-btns" style="margin-bottom: 10px;">
|
|
|
<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
|
|
|
class="layui-icon layui-icon-add-circle"></i>预约量房
|
|
|
</button>
|
|
@@ -120,6 +119,8 @@
|
|
|
<div class="layui-btn-group">
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="customer_search"
|
|
|
>查看</a>
|
|
|
+ <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="add_review" data-permission="customer.view_new_customer"
|
|
|
+ >跟踪报告</a>
|
|
|
</div>
|
|
|
</script>
|
|
|
</div>
|
|
@@ -161,25 +162,26 @@
|
|
|
, {field: 'address', title: '地址', width: 200}
|
|
|
, {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: 'status_text', title: '状态', width: 100}
|
|
|
, {field: 'track_user_text', title: '跟踪人', width: 100}
|
|
|
- , {field: 'end_time_f', title: '最后跟踪时间', width: 150}
|
|
|
- , {field: 'follow_status', title: '跟踪情况', width: 200}
|
|
|
- , {field: 'next_time_f', title: '下次跟踪时间', width: 150}
|
|
|
+ , {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: 'enter_count', title: '进店次数', width: 100}
|
|
|
- , {field: 'last_enter', title: '最后进店时间', width: 150}
|
|
|
- , {field: 'rank', title: '级别', width: 100}
|
|
|
- , {field: 'status', title: '状态', width: 100}
|
|
|
+ , {field: 'last_enter_time', title: '最后进店时间', width: 150}
|
|
|
, {field: 'create_time_f', title: '建档时间', width: 150}
|
|
|
, {field: 'create_user_text', title: '建档人', width: 100}
|
|
|
- , {width: 80, align: 'center', fixed: 'right', toolbar: '#customer-operate-bar'}
|
|
|
+ , {width: 130, align: 'center', fixed: 'right', toolbar: '#customer-operate-bar'}
|
|
|
]]
|
|
|
, page: true
|
|
|
, height: 'full-108'
|
|
|
});
|
|
|
|
|
|
- function createFollowReport(){
|
|
|
+ function createFollowReport(customer_id, stage_progress_sort) {
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
title: '添加跟踪报告',
|
|
@@ -187,9 +189,9 @@
|
|
|
btn: ['保存', '取消'],
|
|
|
yes: function (index, dom) {
|
|
|
layui.onSubmitChild = function (res) {
|
|
|
- if(res.code === 0){
|
|
|
+ if (res.code === 0) {
|
|
|
layer.msg('添加成功!', {icon: 1})
|
|
|
- }
|
|
|
+ }
|
|
|
layer.close(index);
|
|
|
table.reload('customer_datagrid', {});
|
|
|
};
|
|
@@ -198,27 +200,10 @@
|
|
|
btn2: function (index, layero) {
|
|
|
layer.close(index);//关闭当前按钮
|
|
|
},
|
|
|
- content: 'add_report.html'
|
|
|
+ content: 'add_report.html?customer_id=' + customer_id + '&stage_progress_sort=' + stage_progress_sort
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- admin.req({
|
|
|
- url: '/customer/dict/',
|
|
|
- done: function (res) {
|
|
|
- var data = res.data.source;
|
|
|
- var source_node = $('#id_source');
|
|
|
- for (var i in data) {
|
|
|
- var pid = data[i].id;
|
|
|
- var name = data[i].name;
|
|
|
- source_node.append("<option value='" + pid + "'>" + name + "</option>");
|
|
|
- }
|
|
|
- form.render('select');
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- $('#btn_download').on('click', function () {
|
|
|
- layui.view.download("/static/xls/设备信息导入模板.xlsx");
|
|
|
- });
|
|
|
//导出列表
|
|
|
var _params1 = {};
|
|
|
$('#btn_list').on('click', function () {
|
|
@@ -255,27 +240,30 @@
|
|
|
table.on('tool(customer-operate)', function (obj) {
|
|
|
var data = obj.data;
|
|
|
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)
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -288,11 +276,6 @@
|
|
|
return false
|
|
|
});
|
|
|
|
|
|
- //添加跟踪报告
|
|
|
- $('#customer_add').on('click', function () {
|
|
|
- createFollowReport()
|
|
|
- });
|
|
|
-
|
|
|
$('#customer_order').on('click', function () {
|
|
|
layer.open({
|
|
|
type: 2,
|
|
@@ -301,9 +284,9 @@
|
|
|
btn: ['保存', '取消'],
|
|
|
yes: function (index, dom) {
|
|
|
layui.onSubmitChild = function (res) {
|
|
|
- if(res.code === 0){
|
|
|
+ if (res.code === 0) {
|
|
|
layer.msg('添加成功!', {icon: 1})
|
|
|
- }
|
|
|
+ }
|
|
|
layer.close(index);
|
|
|
table.reload('customer_datagrid', {});
|
|
|
};
|