Commit dcc0c993ac0ae285983212fc1184f3ab23048c8e

Authored by teemitop
1 parent cb524807

日志增加订单记录

... ... @@ -155,7 +155,7 @@ class System extends Common
$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>';
... ... @@ -245,8 +245,8 @@ 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'];
//tag = 1 订单详情 = 2 商家信息
$where_id = $data['tag']==2 ? ' a.sid = '.$data['id'].' and a.rid = 0' : ' a.id = '.$data['id'];
$log_info = Db::query("SELECT
a.*,
... ... @@ -262,7 +262,7 @@ class System extends Common
WHERE
".$where_id);
$log_info = $log_info[0];
if($log_info['comment']){
if($log_info['comment'] && $data['tag']!=2){
$log_info['comment'] = json_decode($log_info['comment'],true);
if($log_info['comment']['row']['tableinfo']){
$log_info['comment']['row']['tableinfo'] = json_decode($log_info['comment']['row']['tableinfo'],true);
... ... @@ -302,15 +302,82 @@ class System extends Common
$log_info['action'] = lang('log')[$log_info['action']][1];
}
}
$log_info['rname'] = $log_info['comment']['row']['rname'] ? $log_info['comment']['row']['rname'] : '';
$log_info['sex'] = $log_info['comment']['row']['sex']==1 ? '先生' : ($log_info['comment']['row']['sex']==2 ? '女士' : '公司');
$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['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 ? '是' : '否';
if($data['tag']!=2){
$log_info['rname'] = $log_info['comment']['row']['rname'] ? $log_info['comment']['row']['rname'] : '';
$log_info['sex'] = $log_info['comment']['row']['sex']==1 ? '先生' : ($log_info['comment']['row']['sex']==2 ? '女士' : '公司');
$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['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 ? '是' : '否';
}
/**
* 订单的一生 && 商家管理
*/
$where_id = $data['tag']==2 ? ' a.sid = '.$log_info['sid'].' and rid = 0' : ' a.rid = '.$log_info['rid'];
if($where_id){
$order_detail = Db::query("SELECT
a.*,
h.field,
h.old,
h.new,
h.differ
FROM
`xt-member-two-LINE`.xt_dc_dz_log_action AS a
LEFT JOIN `xt-member-two-LINE`.xt_dc_dz_log_history AS h ON a.id = h.aid
WHERE
$where_id
ORDER BY a.id desc");
foreach ($order_detail as $key => $value) {
if(array_key_exists($value['action'],lang('log'))){
$order_detail[$key]['action'] = lang('log')[$value['action']];
switch ($value['device']) {
case '1':
$order_detail[$key]['device'] = '小程序(C端)';
break;
case '2':
$order_detail[$key]['device'] = '小程序(B端)';
break;
case '3':
$order_detail[$key]['device'] = '铱方';
break;
case '4':
$order_detail[$key]['device'] = '极钛';
break;
case '5':
$order_detail[$key]['device'] = '酷比';
break;
case '6':
$order_detail[$key]['device'] = '华为';
break;
default:
# code...
break;
}
if($data['tag']!=2){
$order_detail[$key]['field'] = lang('log')[$value['field']];
$order_detail[$key]['old'] = lang('log')[$value['old']];
$order_detail[$key]['new'] = lang('log')[$value['new']];
}
}
if(array_key_exists($value['action'],lang('log'))){
if($data['tag']==1){
$order_detail[$key]['action'] = lang('log')[$value['action']][0];
}else if($data['tag']==2){
$order_detail[$key]['action'] = lang('log')[$value['action']];
}else if($data['tag']!=1 && $value['action']==lang('log')[$value['action']]){
$order_detail[$key]['action'] = lang('log')[$value['action']];
}else{
$order_detail[$key]['action'] = lang('log')[$value['action']][1];
}
}
}
$log_info['order_detail'] = $order_detail;
}
}
$this->assign('html', $log_info);
return $this->fetch();
... ...
... ... @@ -8,22 +8,23 @@ return [
'add_rid' => '新增预定',
'edi_rid' => '修改预定',
'seller' => '商家管理',
'App.Customer.SetReserveInfo' => '录入了一笔订单',
'App.Customer.SetReserveInfoById' => '修改了一笔订单',
'App.Customer.SetReserveInfo' => array('录入了订单'),
'App.Customer.SetReserveInfoById' => '修改了订单',
'App.Customer.SetDdate' => '设置了到店时间',
'App.Customer.SetReserveStatus' => '设置了预定状态',
'App.Reserve.NewExportReserve' => '导出了一份预定',
'App.Reserve.NewSetReserveInfo' => '录入了一笔订单',
'App.Reserve.NewSetReserveInfo' => '修改了一笔订单',
'App.Reserve.NewExportReserve' => '导出了预定',
'App.Reserve.NewSetReserveInfo' => '录入了订单',
'App.Reserve.NewSetReserveInfo' => '修改了订单',
'App.Reserve.SetReserveCusman' => '设置了客户经理',
'App.Reserve.SetReserveStatus' => '设置了预定状态',
'App.Reserve.UpdateAction' => '回访了短信',
'App.Seller.AddSeller' => '添加了一个商家',
'App.Seller.setSellerById' => '修改了商家信息',
'App.Seller.AddSeller' => '添加了商家',
'App.Seller.SetSellerById' => '修改了商家信息',
'App.Seller.InSterAuthUser' => '移交了店铺',
'Android.Customer.SetReserveInfo' => '修改了一笔订单',
'Android.Customer.SetReserveInfo' => '修改了订单',
'Android.Customer.SetReserveStatus' => '设置了预定状态',
'Android.Reserve.SetReserveInfo' => array('录入了一笔订单','修改了一笔订单'),
'Android.Reserve.SetReserveInfo' => array('录入了订单','修改了订单'),
'Android.Reserve.SetReserveCusman' => array('设置了客户经理'),
'Android.Reserve.SetReserveStatus' => '设置了预定状态',
'Android.Reserve.UpdateAction' => '回访了短信',
'0' => '待确认',
... ... @@ -48,7 +49,28 @@ return [
'ddate_solt' => '用餐时段',
'room_demand'=> '包间ID',
'openid' => '用户openid',
'cause' => '取消ID',
'cause' => '取消ID',
'channel' => '取消ID',
'id' => '取消ID',
'is_set_ddate' => '取消ID',
'note_name' => '取消ID',
'note_openid' => '取消ID',
'openid' => '取消ID',
'operator_openid' => '取消ID',
'orderid' => '取消ID',
'rname' => '取消ID',
'room_demand' => '取消ID',
'cause' => '取消ID',
),
'order_detail' => '订单详情',
'seller_detail' => '商家信息',
'after' => '变更后',
'befoer' => '变更前',
'order_line' =>'订单的一生',
'edited' => '编辑了',
'deled' => '删除了',
'added' => '添加了',
... ...
... ... @@ -2,8 +2,8 @@
<div class="admin-main layui-anim layui-anim-upbit">
<title>纳极科技 - 变更详情</title>
<div class="header">
<h1>订单详情</h1>
<h3>{:lang('caozuoren')}:{$html.nickname} {$html.action} | {:lang('caozuotime')}:{$html.cdate}</h3>
<h1> {if $html.rid}{:lang('order_detail')}{else}{:lang('seller_detail')}{/if}</h1>
<h3></h3>
</div>
<div class="table-responsive">
<table class="layui-table" lay-even lay-skin="line">
... ... @@ -22,8 +22,10 @@
<td>{$html.sid}</td>
</tr>
<tr>
<td>预定编号</td>
<td>{$html.rid}</td>
{if $html.rid}
<td>预定编号</td>
<td>{$html.rid}</td>
{/if}
</tr>
<tr>
<td>操作人昵称</td>
... ... @@ -37,9 +39,10 @@
<td>操作设备</td>
<td>{$html.device}</td>
</tr>
<tr>
<td>预定人</td>
<td>{$html.rname}{$html.sex}</td>
{if $html.rid}
<td>预定人</td>
<td>{$html.rname}{$html.sex}</td>
{/if}
</tr>
<tr>
<td>电话</td>
... ... @@ -47,8 +50,48 @@
</tr>
</tbody>
</table>
订单的一生:
xxxxx..
{if $html.rid neq 0}
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this">{:lang('order_line')}</li>
</ul>
</div>
<div class="layui-tab-content">
{volist name="html.order_detail" id="vo" key="i"}
<div class="layui-tab-item layui-show">{$vo.cdate} {$vo.nickname} 在{$vo.device} 设备上 {$vo.action}
{if $vo.field eq '' && $vo.comment eq ''}
<a href="/admin/system/differ?id={$vo.id}" target="_blank" style="color:blue;">
点击查看
</a>
{elseif $vo.field && $vo.comment eq ''}
<span style="color:red;"> 变更字段 <b>{$vo.field}</b> {:lang('befoer')} <b>{$vo.old}</b> {:lang('after')} <b>{$vo.new}</b></span>
{else}
{/if}
</div>
{/volist}
</div>
{else}
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this">{:lang('seller_detail')}</li>
</ul>
</div>
<div class="layui-tab-content">
{volist name="html.order_detail" id="vo" key="i"}
<div class="layui-tab-item layui-show">{$vo.cdate} {$vo.nickname} 在{$vo.device} 设备上 {$vo.action}
{if $vo.field eq '' && $vo.old neq ''}
<a href="/admin/system/differ?id={$vo.id}" target="_blank" style="color:blue;">
点击查看
</a>
{elseif $vo.field && $vo.comment eq ''}
<span style="color:red;"> 变更字段 <b>{$vo.field}</b> {:lang('befoer')} <b>{$vo.old}</b> {:lang('after')} <b>{$vo.new}</b></span>
{else}
{/if}
</div>
{/volist}
</div>
{/if}
</div>
</div>
{include file="common/foot"/}
\ No newline at end of file
... ...
... ... @@ -4,11 +4,11 @@
<legend>{:$title}</legend>
</fieldset>
<div class="demoTable">
商家:
商家名称:
<div class="layui-input-inline">
<input class="layui-input" name="key" id="key" placeholder="{:lang('pleaseEnter')}店铺名称" autocomplete="off">
</div>
昵称:
变更人:
<div class="layui-input-inline">
<input class="layui-input" name="key" id="nickname" placeholder="{:lang('pleaseEnter')}用户昵称或者账号" autocomplete="off">
</div>
... ...