|
@@ -57,11 +57,7 @@
|
|
|
<div class="layui-row layui-col-space15">
|
|
|
<div class="layui-col-md12">
|
|
|
<div class="LAY-btns" style="margin-bottom: 10px;">
|
|
|
- <div style="float: left">
|
|
|
- <button class="layui-btn" id="report_check_divide"><i
|
|
|
- class="layui-icon layui-icon-auz"></i>分配客户
|
|
|
- </button>
|
|
|
- </div>
|
|
|
+
|
|
|
<form class="layui-form" lay-filter="query-form-element1">
|
|
|
<div class="seach_items">
|
|
|
<button class="layui-btn" lay-submit lay-filter="query-form-element1"><i
|
|
@@ -69,9 +65,13 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
<div class="seach_items">
|
|
|
- <input type="text" name="name" autocomplete="off" class="layui-input"
|
|
|
+ <input type="text" name="tel" autocomplete="off" class="layui-input"
|
|
|
placeholder="姓名"/>
|
|
|
</div>
|
|
|
+ <div class="seach_items">
|
|
|
+ <input type="text" name="name" autocomplete="off" class="layui-input"
|
|
|
+ placeholder="电话"/>
|
|
|
+ </div>
|
|
|
</form>
|
|
|
<div style="clear: both;"></div>
|
|
|
</div>
|
|
@@ -79,8 +79,16 @@
|
|
|
|
|
|
<script type="text/html" id="report_check-operate-bar">
|
|
|
<div class="layui-btn-group">
|
|
|
- <a class="layui-btn layui-btn-default layui-btn-xs" lay-event="report_check_search"
|
|
|
- >查看跟踪记录</a>
|
|
|
+ <a class="layui-btn layui-btn-default layui-btn-xs" lay-event="dispatch"
|
|
|
+ >分配</a>
|
|
|
+ </div>
|
|
|
+ <div class="layui-btn-group">
|
|
|
+ <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="sign_repeat"
|
|
|
+ >标记撞单</a>
|
|
|
+ </div>
|
|
|
+ <div class="layui-btn-group">
|
|
|
+ <a class="layui-btn layui-btn-default layui-btn-xs" lay-event="repeat_report"
|
|
|
+ >撞单跟踪记录</a>
|
|
|
</div>
|
|
|
</script>
|
|
|
</div>
|
|
@@ -94,30 +102,28 @@
|
|
|
base: '../../../layuiadmin/' //静态资源所在路径
|
|
|
}).extend({
|
|
|
index: 'lib/index' //主入口模块
|
|
|
- }).use(['index', 'table', 'form', 'upload'], function () {
|
|
|
+ }).use(['index', 'table', 'form',], function () {
|
|
|
var $ = layui.$;
|
|
|
var table = layui.table
|
|
|
, form = layui.form
|
|
|
- , upload = layui.upload
|
|
|
, admin = layui.admin;
|
|
|
|
|
|
table.render({
|
|
|
elem: '#report_check_datagrid'
|
|
|
, url: '/customer/report_customer/?report_status=0'
|
|
|
, cols: [[
|
|
|
- {type:'checkbox'}
|
|
|
- , {field: 'name', title: '姓名', width: 200}
|
|
|
+ {field: 'name', title: '姓名', width: 120}
|
|
|
, {field: 'gender_text', title: "性别", width: 70}
|
|
|
- , {field: 'tel', title: '电话', width: 150}
|
|
|
+ , {field: 'tel', title: '电话', width: 120}
|
|
|
, {field: 'project_text', title: '项目', width: 200}
|
|
|
- , {field: 'report_time', title: '报备时间', width: 150}
|
|
|
- , {field: 'report_user', title: '报备人', width: 100}
|
|
|
+ , {field: 'create_time', title: '报备时间', width: 150}
|
|
|
+ , {field: 'create_user_text', title: '报备人', width: 100}
|
|
|
, {field: 'hitBill_customer', title: '撞单客户', width: 100}
|
|
|
, {field: 'hitBill_project_text', title: '撞单项目', width: 100}
|
|
|
, {field: 'stalk_user', title: '撞单跟踪人', width: 100}
|
|
|
, {field: 'stalk_process', title: '撞单进度', width: 100}
|
|
|
, {field: 'last_stalk', title: '最后跟踪', width: 200}
|
|
|
- , {width: 120, align: 'center', fixed: 'right', toolbar: '#report_check-operate-bar'}
|
|
|
+ , {width: 240, align: 'center', fixed: 'right', toolbar: '#report_check-operate-bar'}
|
|
|
]]
|
|
|
, page: true
|
|
|
, height: 'full-108'
|
|
@@ -137,14 +143,33 @@
|
|
|
// }
|
|
|
// });
|
|
|
|
|
|
- $('#btn_download').on('click', function () {
|
|
|
- layui.view.download("/static/xls/设备信息导入模板.xlsx");
|
|
|
- });
|
|
|
//监听工具条
|
|
|
table.on('tool(report_check-operate)', function (obj) {
|
|
|
var data = obj.data;
|
|
|
//查看跟踪记录
|
|
|
- if (obj.event === 'report_check_search') {
|
|
|
+ if (obj.event === 'dispatch') {
|
|
|
+ layer.open({
|
|
|
+ type: 2,
|
|
|
+ title: '分配客户',
|
|
|
+ area: ['30%', '40%'],
|
|
|
+ btn: ['分配', '取消'],
|
|
|
+ yes: function (index, dom) {
|
|
|
+ layui.onSubmitChild = function (data) {
|
|
|
+ layer.close(index);
|
|
|
+ table.reload('report_check_datagrid', {});
|
|
|
+ };
|
|
|
+ layui.submitChild();
|
|
|
+ },
|
|
|
+ btn2: function (index, layero) {
|
|
|
+ layer.close(index);//关闭当前按钮
|
|
|
+ },
|
|
|
+ content: 'divide.html?id=' + data.id
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else if (obj.event === 'sign_repeat') {
|
|
|
+
|
|
|
+ }
|
|
|
+ else if (obj.event === 'repeat_report') {
|
|
|
|
|
|
}
|
|
|
});
|
|
@@ -161,11 +186,14 @@
|
|
|
|
|
|
$('#report_check_divide').on('click', function () {
|
|
|
var checkStatus = table.checkStatus('report_check_datagrid');
|
|
|
- if(checkStatus.data.length === 0){
|
|
|
+ if (checkStatus.data.length === 0) {
|
|
|
layer.msg('请至少选择一条记录');
|
|
|
return
|
|
|
};
|
|
|
- let divide_id = checkStatus.data.map(item=>{ return item.id }).join(",");
|
|
|
+ let divide_id = checkStatus.data.map(item => {
|
|
|
+ return item.id
|
|
|
+ }).join(",");
|
|
|
+
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
title: '分配客户',
|
|
@@ -175,22 +203,22 @@
|
|
|
layui.onSubmitChild = function (data) {
|
|
|
let customer = '华北';
|
|
|
layer.close(index);
|
|
|
- if(!data){
|
|
|
+ if (!data) {
|
|
|
layer.open({
|
|
|
- type: 1,
|
|
|
- title: '操作',
|
|
|
- area: ['300px', '220px'],
|
|
|
- btn: ['标记为撞单客户', '重新分配'],
|
|
|
- yes: function (index, dom) {
|
|
|
- layui.onSubmitChild = function (data) {
|
|
|
+ type: 1,
|
|
|
+ title: '操作',
|
|
|
+ area: ['300px', '220px'],
|
|
|
+ btn: ['标记为撞单客户', '重新分配'],
|
|
|
+ yes: function (index, dom) {
|
|
|
+ layui.onSubmitChild = function (data) {
|
|
|
+ layer.close(index);
|
|
|
+ };
|
|
|
+ },
|
|
|
+ btn2: function (index, layero) {
|
|
|
layer.close(index);
|
|
|
- };
|
|
|
- },
|
|
|
- btn2: function (index, layero) {
|
|
|
- layer.close(index);
|
|
|
- },
|
|
|
- content: '<p style="text-align: center; padding: 15px 0">和' + customer + '客户撞单,请选择后续操作。<p>'
|
|
|
- });
|
|
|
+ },
|
|
|
+ content: '<p style="text-align: center; padding: 15px 0">和' + customer + '客户撞单,请选择后续操作。<p>'
|
|
|
+ });
|
|
|
}
|
|
|
table.reload('report_check_datagrid', {});
|
|
|
};
|