Commit cb52480763c53a90d6c4e72ad085a428f8870015

Authored by teemitop
1 parent a7c84b76

日志提交

@@ -62,16 +62,16 @@ class System extends Common @@ -62,16 +62,16 @@ class System extends Common
62 $data = Request::except('file'); 62 $data = Request::except('file');
63 $key = input('post.key') ? input('post.key') : ""; 63 $key = input('post.key') ? input('post.key') : "";
64 64
65 - $key = $data['key'] ? " a.`name` LIKE '%".$data['key']."%'" : '1=1'; 65 + $where = '';
  66 + $where .= $data['key'] ? " a.`name` LIKE '%".$data['key']."%'" : '1=1 ';
  67 + $where .= $data['nickname'] ? " AND a.nickname LIKE '%".$data['nickname']."%'" : '';
  68 + $data_time = $data['time'] ? explode(' - ', $data['time']) : array(date("Y-m-d 00:00:00"),date("Y-m-d H:i:s"));
  69 + $where .= $data_time ? "AND a.cdate BETWEEN '".$data_time[0]."' AND '".$data_time[1]."'" : '';
  70 + $where .= ($data['iden'] && $data['iden']!=-1) ? " AND a.identity = ".$data['iden'] : "";
  71 + $where .= ($data['channel'] && $data['channel']!=-1) ? " AND rel.type_id = ".$data['channel'] : "";
66 72
67 - $nickname = $data['nickname'] ? " AND a.nickname LIKE '%".$data['nickname']."%'" : '';  
68 -  
69 - $data_time= $data['time'] ? explode(' - ', $data['time']) : array(date("Y-m-d 00:00:00"),date("Y-m-d H:i:s"));  
70 - $time = $data_time ? "AND a.cdate BETWEEN '".$data_time[0]."' AND '".$data_time[1]."'" : '';  
71 -  
72 - $iden = ($data['iden'] && $data['iden']!=-1) ? " AND a.identity = ".$data['iden'] : "";  
73 -  
74 - $channel = ($data['channel'] && $data['channel']!=-1) ? " AND rel.type_id = ".$data['channel'] : ""; 73 + $page = ($data['page'] - 1) * $data['limit'];
  74 + $limit = $data['limit'];
75 75
76 $log_info = Db::query("SELECT 76 $log_info = Db::query("SELECT
77 a.*, 77 a.*,
@@ -85,14 +85,10 @@ class System extends Common @@ -85,14 +85,10 @@ class System extends Common
85 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid 85 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid
86 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid 86 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid
87 WHERE 87 WHERE
88 - $key  
89 - $nickname  
90 - $iden  
91 - $channel  
92 - $time 88 + $where
93 order by 89 order by
94 a.cdate desc 90 a.cdate desc
95 - LIMIT ".$data['page'].",".$data['limit'].""); 91 + LIMIT ".$page.",".$limit."");
96 $total = Db::query("SELECT 92 $total = Db::query("SELECT
97 count(1) as total 93 count(1) as total
98 FROM 94 FROM
@@ -100,11 +96,7 @@ class System extends Common @@ -100,11 +96,7 @@ class System extends Common
100 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid 96 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid
101 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid 97 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid
102 WHERE 98 WHERE
103 - $key  
104 - $nickname  
105 - $iden  
106 - $channel  
107 - $time"); 99 + $where");
108 foreach ($log_info as $key => $value) { 100 foreach ($log_info as $key => $value) {
109 switch ($value['device']) { 101 switch ($value['device']) {
110 case '1': 102 case '1':
@@ -150,16 +142,20 @@ class System extends Common @@ -150,16 +142,20 @@ class System extends Common
150 //规则: 142 //规则:
151 //1、如果field字段存在 则直接显示变更前,变更后 143 //1、如果field字段存在 则直接显示变更前,变更后
152 //2、如果预定ID为0 144 //2、如果预定ID为0
153 - $haystack = array('Android.Reserve.SetReserveInfo','App.Customer.SetReserveInfo'); 145 + $haystack = array('Android.Reserve.SetReserveInfo','App.Customer.SetReserveInfo','App.Reserve.NewSetReserveInfo');
154 if(array_key_exists($value['field'],lang('log'))){ 146 if(array_key_exists($value['field'],lang('log'))){
155 $log_info[$key]['field'] = lang('log')[$value['field']]; 147 $log_info[$key]['field'] = lang('log')[$value['field']];
156 }elseif($value['rid']==0){ 148 }elseif($value['rid']==0){
157 $log_info[$key]['field'] = lang('log')['seller']; 149 $log_info[$key]['field'] = lang('log')['seller'];
  150 + $log_info[$key]['old'] = '<a href=/admin/system/detail?id='.$value["sid"].'&tag=2 target="_blank"style="color:blue;">查看详情</a>';
  151 + $log_info[$key]['new'] = '<a href=/admin/system/detail?id='.$value["sid"].'&tag=2 target="_blank"style="color:blue;">查看详情</a>';
158 }elseif(in_array($value['action'], $haystack)){ 152 }elseif(in_array($value['action'], $haystack)){
159 if($value['comment']){ 153 if($value['comment']){
160 $log_info[$key]['field'] = lang('log')['add_rid']; 154 $log_info[$key]['field'] = lang('log')['add_rid'];
161 $log_info[$key]['old'] = '<a href=/admin/system/detail?id='.$value["id"].'&tag=1 target="_blank" style="color:blue;">查看详情</a>'; 155 $log_info[$key]['old'] = '<a href=/admin/system/detail?id='.$value["id"].'&tag=1 target="_blank" style="color:blue;">查看详情</a>';
162 $log_info[$key]['new'] = '<a href=/admin/system/detail?id='.$value["id"].'&tag=1 target="_blank"style="color:blue;">查看详情</a>'; 156 $log_info[$key]['new'] = '<a href=/admin/system/detail?id='.$value["id"].'&tag=1 target="_blank"style="color:blue;">查看详情</a>';
  157 + }else if($value['comment']){
  158 +
163 }else{ 159 }else{
164 $log_info[$key]['field'] = lang('log')['edi_rid']; 160 $log_info[$key]['field'] = lang('log')['edi_rid'];
165 $log_info[$key]['old'] = '<a href=/admin/system/differ?id='.$value["id"].' target="_blank"style="color:blue;">查看详情</a>'; 161 $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 @@ -249,6 +245,9 @@ class System extends Common
249 public function detail(){ 245 public function detail(){
250 $data = Request::except('file'); 246 $data = Request::except('file');
251 if($data['id']){ 247 if($data['id']){
  248 +
  249 + $where_id = $data['tag']==2 ? ' a.sid = '.$data['id'] : ' a.id = '.$data['id'];
  250 +
252 $log_info = Db::query("SELECT 251 $log_info = Db::query("SELECT
253 a.*, 252 a.*,
254 h.field, 253 h.field,
@@ -261,7 +260,7 @@ class System extends Common @@ -261,7 +260,7 @@ class System extends Common
261 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid 260 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid
262 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid 261 LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_seller_type_rel AS rel ON a.sid = rel.sid
263 WHERE 262 WHERE
264 - a.id = ".$data['id']); 263 + ".$where_id);
265 $log_info = $log_info[0]; 264 $log_info = $log_info[0];
266 if($log_info['comment']){ 265 if($log_info['comment']){
267 $log_info['comment'] = json_decode($log_info['comment'],true); 266 $log_info['comment'] = json_decode($log_info['comment'],true);
@@ -295,6 +294,10 @@ class System extends Common @@ -295,6 +294,10 @@ class System extends Common
295 if(array_key_exists($log_info['action'],lang('log'))){ 294 if(array_key_exists($log_info['action'],lang('log'))){
296 if($data['tag']==1){ 295 if($data['tag']==1){
297 $log_info['action'] = lang('log')[$log_info['action']][0]; 296 $log_info['action'] = lang('log')[$log_info['action']][0];
  297 + }else if($data['tag']==2){
  298 + $log_info['action'] = lang('log')[$log_info['action']];
  299 + }else if($data['tag']!=1 && $log_info['action']==lang('log')[$log_info['action']]){
  300 + $log_info['action'] = lang('log')[$log_info['action']];
298 }else{ 301 }else{
299 $log_info['action'] = lang('log')[$log_info['action']][1]; 302 $log_info['action'] = lang('log')[$log_info['action']][1];
300 } 303 }
@@ -304,7 +307,6 @@ class System extends Common @@ -304,7 +307,6 @@ class System extends Common
304 $log_info['phone'] = $log_info['comment']['row']['phone'] ? $log_info['comment']['row']['phone'] : ''; 307 $log_info['phone'] = $log_info['comment']['row']['phone'] ? $log_info['comment']['row']['phone'] : '';
305 $log_info['cusman'] = $log_info['comment']['row']['cusman'] ? $log_info['comment']['row']['cusman'] : ''; 308 $log_info['cusman'] = $log_info['comment']['row']['cusman'] ? $log_info['comment']['row']['cusman'] : '';
306 $log_info['ddate'] = $log_info['comment']['row']['ddate'] ? date("Y-m-d H:i:s",$log_info['comment']['row']['ddate']) : ''; 309 $log_info['ddate'] = $log_info['comment']['row']['ddate'] ? date("Y-m-d H:i:s",$log_info['comment']['row']['ddate']) : '';
307 - $log_info['cdate'] = $log_info['comment']['row']['cdate'] ? date("Y-m-d H:i:s",$log_info['comment']['row']['cdate']) : '';  
308 $log_info['status'] = lang('log')[$log_info['comment']['row']['status']]; 310 $log_info['status'] = lang('log')[$log_info['comment']['row']['status']];
309 $log_info['ddate_solt'] = $log_info['comment']['row']['ddate_solt'] ? $log_info['comment']['row']['ddate_solt'] : ''; 311 $log_info['ddate_solt'] = $log_info['comment']['row']['ddate_solt'] ? $log_info['comment']['row']['ddate_solt'] : '';
310 $log_info['is_set_ddate'] = $log_info['comment']['row']['is_set_ddate'] ==1 ? '是' : '否'; 312 $log_info['is_set_ddate'] = $log_info['comment']['row']['is_set_ddate'] ==1 ? '是' : '否';
@@ -5,8 +5,9 @@ return [ @@ -5,8 +5,9 @@ return [
5 'ddate' => '到店时间', 5 'ddate' => '到店时间',
6 'status' => '预定状态', 6 'status' => '预定状态',
7 'action' => '短信回访', 7 'action' => '短信回访',
8 - 'add_rid' => '新增预定',  
9 - 'edi_rid' => '修改预定', 8 + 'add_rid' => '新增预定',
  9 + 'edi_rid' => '修改预定',
  10 + 'seller' => '商家管理',
10 'App.Customer.SetReserveInfo' => '录入了一笔订单', 11 'App.Customer.SetReserveInfo' => '录入了一笔订单',
11 'App.Customer.SetReserveInfoById' => '修改了一笔订单', 12 'App.Customer.SetReserveInfoById' => '修改了一笔订单',
12 'App.Customer.SetDdate' => '设置了到店时间', 13 'App.Customer.SetDdate' => '设置了到店时间',
@@ -128,6 +129,8 @@ return [ @@ -128,6 +129,8 @@ return [
128 'time'=>'时间', 129 'time'=>'时间',
129 'title'=>'标题', 130 'title'=>'标题',
130 131
  132 + 'caozuoren' => '操作人',
  133 + 'caozuotime' => '操作时间',
131 134
132 'Super administrator cannot be deleted'=>'超级管理员不可删除!', 135 'Super administrator cannot be deleted'=>'超级管理员不可删除!',
133 'Are you sure you want to delete it'=>'你确定要删除吗?', 136 'Are you sure you want to delete it'=>'你确定要删除吗?',
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <title>纳极科技 - 变更详情</title> 3 <title>纳极科技 - 变更详情</title>
4 <div class="header"> 4 <div class="header">
5 <h1>订单详情</h1> 5 <h1>订单详情</h1>
6 - <h3>操作人:{$html.nickname} {$html.action} | 修改时间:{$html.cdate}</h3> 6 + <h3>{:lang('caozuoren')}:{$html.nickname} {$html.action} | {:lang('caozuotime')}:{$html.cdate}</h3>
7 </div> 7 </div>
8 <div class="table-responsive"> 8 <div class="table-responsive">
9 <table class="layui-table" lay-even lay-skin="line"> 9 <table class="layui-table" lay-even lay-skin="line">
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 </colgroup> 13 </colgroup>
14 <thead> 14 <thead>
15 <tr> 15 <tr>
16 - <th class="text-center" colspan="2">{:lang('systemInfo')}</th> 16 + <th class="text-center" colspan="2">{:lang('content')}</th>
17 </tr> 17 </tr>
18 </thead> 18 </thead>
19 <tbody> 19 <tbody>
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 <div id="main"> 19 <div id="main">
20 <div class="header"> 20 <div class="header">
21 <h1>变更详情</h1> 21 <h1>变更详情</h1>
22 - <h3>操作人:{$html.nickname} | 修改时间:{$html.cdate}</h3> 22 + <h3>{:lang('caozuoren')}:{$html.nickname} | {:lang('caozuotime')}:{$html.cdate}</h3>
23 </div> 23 </div>
24 24
25 <div class="initContainer"> 25 <div class="initContainer">