Commit cb52480763c53a90d6c4e72ad085a428f8870015

Authored by teemitop
1 parent a7c84b76

日志提交

... ... @@ -62,16 +62,16 @@ class System extends Common
$data = Request::except('file');
$key = input('post.key') ? input('post.key') : "";
$key = $data['key'] ? " a.`name` LIKE '%".$data['key']."%'" : '1=1';
$where = '';
$where .= $data['key'] ? " a.`name` LIKE '%".$data['key']."%'" : '1=1 ';
$where .= $data['nickname'] ? " AND a.nickname LIKE '%".$data['nickname']."%'" : '';
$data_time = $data['time'] ? explode(' - ', $data['time']) : array(date("Y-m-d 00:00:00"),date("Y-m-d H:i:s"));
$where .= $data_time ? "AND a.cdate BETWEEN '".$data_time[0]."' AND '".$data_time[1]."'" : '';
$where .= ($data['iden'] && $data['iden']!=-1) ? " AND a.identity = ".$data['iden'] : "";
$where .= ($data['channel'] && $data['channel']!=-1) ? " AND rel.type_id = ".$data['channel'] : "";
$nickname = $data['nickname'] ? " AND a.nickname LIKE '%".$data['nickname']."%'" : '';
$data_time= $data['time'] ? explode(' - ', $data['time']) : array(date("Y-m-d 00:00:00"),date("Y-m-d H:i:s"));
$time = $data_time ? "AND a.cdate BETWEEN '".$data_time[0]."' AND '".$data_time[1]."'" : '';
$iden = ($data['iden'] && $data['iden']!=-1) ? " AND a.identity = ".$data['iden'] : "";
$channel = ($data['channel'] && $data['channel']!=-1) ? " AND rel.type_id = ".$data['channel'] : "";
$page = ($data['page'] - 1) * $data['limit'];
$limit = $data['limit'];
$log_info = Db::query("SELECT
a.*,
... ... @@ -85,14 +85,10 @@ class System extends Common
LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid
LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid
WHERE
$key
$nickname
$iden
$channel
$time
$where
order by
a.cdate desc
LIMIT ".$data['page'].",".$data['limit']."");
LIMIT ".$page.",".$limit."");
$total = Db::query("SELECT
count(1) as total
FROM
... ... @@ -100,11 +96,7 @@ class System extends Common
LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid
LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid
WHERE
$key
$nickname
$iden
$channel
$time");
$where");
foreach ($log_info as $key => $value) {
switch ($value['device']) {
case '1':
... ... @@ -150,16 +142,20 @@ class System extends Common
//规则:
//1、如果field字段存在 则直接显示变更前,变更后
//2、如果预定ID为0
$haystack = array('Android.Reserve.SetReserveInfo','App.Customer.SetReserveInfo');
$haystack = array('Android.Reserve.SetReserveInfo','App.Customer.SetReserveInfo','App.Reserve.NewSetReserveInfo');
if(array_key_exists($value['field'],lang('log'))){
$log_info[$key]['field'] = lang('log')[$value['field']];
}elseif($value['rid']==0){
$log_info[$key]['field'] = lang('log')['seller'];
$log_info[$key]['old'] = '<a href=/admin/system/detail?id='.$value["sid"].'&tag=2 target="_blank"style="color:blue;">查看详情</a>';
$log_info[$key]['new'] = '<a href=/admin/system/detail?id='.$value["sid"].'&tag=2 target="_blank"style="color:blue;">查看详情</a>';
}elseif(in_array($value['action'], $haystack)){
if($value['comment']){
$log_info[$key]['field'] = lang('log')['add_rid'];
$log_info[$key]['old'] = '<a href=/admin/system/detail?id='.$value["id"].'&tag=1 target="_blank" style="color:blue;">查看详情</a>';
$log_info[$key]['new'] = '<a href=/admin/system/detail?id='.$value["id"].'&tag=1 target="_blank"style="color:blue;">查看详情</a>';
}else if($value['comment']){
}else{
$log_info[$key]['field'] = lang('log')['edi_rid'];
$log_info[$key]['old'] = '<a href=/admin/system/differ?id='.$value["id"].' target="_blank"style="color:blue;">查看详情</a>';
... ... @@ -249,6 +245,9 @@ class System extends Common
public function detail(){
$data = Request::except('file');
if($data['id']){
$where_id = $data['tag']==2 ? ' a.sid = '.$data['id'] : ' a.id = '.$data['id'];
$log_info = Db::query("SELECT
a.*,
h.field,
... ... @@ -261,7 +260,7 @@ class System extends Common
LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid
LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid
WHERE
a.id = ".$data['id']);
".$where_id);
$log_info = $log_info[0];
if($log_info['comment']){
$log_info['comment'] = json_decode($log_info['comment'],true);
... ... @@ -295,6 +294,10 @@ class System extends Common
if(array_key_exists($log_info['action'],lang('log'))){
if($data['tag']==1){
$log_info['action'] = lang('log')[$log_info['action']][0];
}else if($data['tag']==2){
$log_info['action'] = lang('log')[$log_info['action']];
}else if($data['tag']!=1 && $log_info['action']==lang('log')[$log_info['action']]){
$log_info['action'] = lang('log')[$log_info['action']];
}else{
$log_info['action'] = lang('log')[$log_info['action']][1];
}
... ... @@ -304,7 +307,6 @@ class System extends Common
$log_info['phone'] = $log_info['comment']['row']['phone'] ? $log_info['comment']['row']['phone'] : '';
$log_info['cusman'] = $log_info['comment']['row']['cusman'] ? $log_info['comment']['row']['cusman'] : '';
$log_info['ddate'] = $log_info['comment']['row']['ddate'] ? date("Y-m-d H:i:s",$log_info['comment']['row']['ddate']) : '';
$log_info['cdate'] = $log_info['comment']['row']['cdate'] ? date("Y-m-d H:i:s",$log_info['comment']['row']['cdate']) : '';
$log_info['status'] = lang('log')[$log_info['comment']['row']['status']];
$log_info['ddate_solt'] = $log_info['comment']['row']['ddate_solt'] ? $log_info['comment']['row']['ddate_solt'] : '';
$log_info['is_set_ddate'] = $log_info['comment']['row']['is_set_ddate'] ==1 ? '是' : '否';
... ...
... ... @@ -5,8 +5,9 @@ return [
'ddate' => '到店时间',
'status' => '预定状态',
'action' => '短信回访',
'add_rid' => '新增预定',
'edi_rid' => '修改预定',
'add_rid' => '新增预定',
'edi_rid' => '修改预定',
'seller' => '商家管理',
'App.Customer.SetReserveInfo' => '录入了一笔订单',
'App.Customer.SetReserveInfoById' => '修改了一笔订单',
'App.Customer.SetDdate' => '设置了到店时间',
... ... @@ -128,6 +129,8 @@ return [
'time'=>'时间',
'title'=>'标题',
'caozuoren' => '操作人',
'caozuotime' => '操作时间',
'Super administrator cannot be deleted'=>'超级管理员不可删除!',
'Are you sure you want to delete it'=>'你确定要删除吗?',
... ...
... ... @@ -3,7 +3,7 @@
<title>纳极科技 - 变更详情</title>
<div class="header">
<h1>订单详情</h1>
<h3>操作人:{$html.nickname} {$html.action} | 修改时间:{$html.cdate}</h3>
<h3>{:lang('caozuoren')}:{$html.nickname} {$html.action} | {:lang('caozuotime')}:{$html.cdate}</h3>
</div>
<div class="table-responsive">
<table class="layui-table" lay-even lay-skin="line">
... ... @@ -13,7 +13,7 @@
</colgroup>
<thead>
<tr>
<th class="text-center" colspan="2">{:lang('systemInfo')}</th>
<th class="text-center" colspan="2">{:lang('content')}</th>
</tr>
</thead>
<tbody>
... ...
... ... @@ -19,7 +19,7 @@
<div id="main">
<div class="header">
<h1>变更详情</h1>
<h3>操作人:{$html.nickname} | 修改时间:{$html.cdate}</h3>
<h3>{:lang('caozuoren')}:{$html.nickname} | {:lang('caozuotime')}:{$html.cdate}</h3>
</div>
<div class="initContainer">
... ...