diff --git a/app/customer/controller/Index.php b/app/customer/controller/Index.php index 8a3f602..1d02945 100644 --- a/app/customer/controller/Index.php +++ b/app/customer/controller/Index.php @@ -579,6 +579,10 @@ class Index extends BaseController 'create_time' => time() ); if (Db::name('Customer')->update($data) !== false) { + //删除客户联系人 + Db::name('CustomerContact')->where(['cid' => $params['id']])->update(['delete_time'=>time()]); + //删除客户机会 + Db::name('CustomerChance')->where(['cid' => $params['id']])->update(['delete_time'=>time()]); add_log('delete', $params['id']); Db::name('CustomerLog')->strict(false)->field(true)->insert($log_data); return to_assign(); diff --git a/app/customer/view/index/index.html b/app/customer/view/index/index.html index f3b218c..af1476e 100644 --- a/app/customer/view/index/index.html +++ b/app/customer/view/index/index.html @@ -240,7 +240,7 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - obj.del(); + layui.pageTable.reload(); } } tool.post("/customer/index/to_sea", {id: data.id}, callback); @@ -367,23 +367,12 @@ } }); } - - $('[lay-filter="clear"]').on('click',function(){ - //$('.layui-table-sort').attr('lay-sort',''); - //console.log($('.layui-table-sort').attr('lay-sort')); - setTimeout(function(){ - $('[lay-filter="webform"]').click(); - },10) - }) - //监听搜索提交 form.on('submit(webform)', function(data) { layui.pageTable.reload({ where: data.field, - page: { - curr: 1 - } + page: {curr: 1} }); return false; }); diff --git a/app/customer/view/index/rush.html b/app/customer/view/index/rush.html index 259751a..1587ef1 100644 --- a/app/customer/view/index/rush.html +++ b/app/customer/view/index/rush.html @@ -96,7 +96,7 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - obj.del(); + layui.pageTable.reload(); let count =$('#count').text(); $('#count').html(++count); } diff --git a/app/customer/view/index/sea.html b/app/customer/view/index/sea.html index 0d79d06..1964bbc 100644 --- a/app/customer/view/index/sea.html +++ b/app/customer/view/index/sea.html @@ -255,7 +255,7 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - obj.del(); + layui.pageTable.reload(); } } tool.post("/customer/api/distribute", {id: data.id,uid:ids,did:dids}, callback); @@ -272,7 +272,7 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - obj.del(); + layui.pageTable.reload(); } } tool.post("/customer/index/get", {id: data.id}, callback); @@ -287,7 +287,7 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - obj.del(); + layui.pageTable.reload(); } } tool.delete("/customer/index/to_trash", {id: data.id,type:1}, callback); @@ -300,14 +300,8 @@ //监听搜索提交 form.on('submit(webform)', function(data) { layui.pageTable.reload({ - where: { - keywords: data.field.keywords, - industry_id: data.field.industry_id, - source_id: data.field.source_id - }, - page: { - curr: 1 - } + where: data.field, + page: {curr: 1} }); return false; }); diff --git a/app/customer/view/index/trash.html b/app/customer/view/index/trash.html index 7078006..b6667b6 100644 --- a/app/customer/view/index/trash.html +++ b/app/customer/view/index/trash.html @@ -129,7 +129,7 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - obj.del(); + layui.pageTable.reload(); } } tool.post("/customer/index/revert", {id: data.id}, callback); @@ -144,7 +144,7 @@ let callback = function (e) { layer.msg(e.msg); if (e.code == 0) { - obj.del(); + layui.pageTable.reload(); } } tool.delete("/customer/index/delete", {id: data.id}, callback); @@ -157,14 +157,8 @@ //监听搜索提交 form.on('submit(webform)', function(data) { layui.pageTable.reload({ - where: { - keywords: data.field.keywords, - industry_id: data.field.industry_id, - source_id: data.field.source_id - }, - page: { - curr: 1 - } + where: data.field, + page: {curr: 1} }); return false; }); diff --git a/public/index.php b/public/index.php index f93d4b3..5c58973 100644 --- a/public/index.php +++ b/public/index.php @@ -15,7 +15,7 @@ if (empty(file_exists(__DIR__ . '/../vendor/autoload.php'))) { require __DIR__ . '/../vendor/autoload.php'; // 定义当前版本号 -define('CMS_VERSION','4.50.31'); +define('CMS_VERSION','4.60.28'); // 定义Layui版本号 define('LAYUI_VERSION','2.8.8');