Commit b36bbb3a by 李洋

1、列表添加查看操作

2、改为实际发送时间查询与显示
parent fbe434f7
......@@ -288,16 +288,14 @@ class MessageController extends Controller
if(0==$search_channel)
{
$info = $db->table('lie_msg_log')->groupBy('lie_msg_log.tpl_id')->having('lie_msg_log.source_type','=',2)
// ->where('lie_msg_log.expect_send_time','>',$start_time)
// ->where('lie_msg_log.expect_send_time','<',$end_time)
->whereBetween('lie_msg_log.expect_send_time',[$start_time,$end_time])
->whereBetween('lie_msg_log.actual_send_time',[$start_time,$end_time])
->join('lie_msg_tpl','lie_msg_log.tpl_id','=','lie_msg_tpl.tpl_id')
->where('lie_msg_tpl.description','like',"%$search_desc%")->get();
}else
{
$info = $db->table('lie_msg_log')->groupBy('lie_msg_log.tpl_id')->having('lie_msg_log.source_type','=',2)
->join('lie_msg_tpl','lie_msg_log.tpl_id','=','lie_msg_tpl.tpl_id')
->whereBetween('lie_msg_log.expect_send_time',[$start_time,$end_time])
->whereBetween('lie_msg_log.actual_send_time',[$start_time,$end_time])
->where('lie_msg_tpl.channels','like',"%$search_channel%")
->where('lie_msg_tpl.description','like',"%$search_desc%")->get();
}
......@@ -393,24 +391,24 @@ class MessageController extends Controller
{
$info = $db->table('lie_msg_log')
->where('log_id','like',"%$search_id%")->where('obj_user','like',"%$search_user%")
->whereBetween('expect_send_time',[$start_time,$end_time])
->whereBetween('actual_send_time',[$start_time,$end_time])
->where('status',$search_status)->paginate(20);
}elseif($search_channel!=0 && $search_status==0)
{
$info = $db->table('lie_msg_log')
->where('log_id','like',"%$search_id%")->where('obj_user','like',"%$search_user%")
->whereBetween('expect_send_time',[$start_time,$end_time])->where('channel_type',$search_channel)
->whereBetween('actual_send_time',[$start_time,$end_time])->where('channel_type',$search_channel)
->paginate(20);
}elseif($search_channel==0 && $search_status==0)
{
$info = $db->table('lie_msg_log')
->where('log_id','like',"%$search_id%")->where('obj_user','like',"%$search_user%")
->whereBetween('expect_send_time',[$start_time,$end_time])->paginate(20);
->whereBetween('actual_send_time',[$start_time,$end_time])->paginate(20);
}else
{
$info = $db->table('lie_msg_log')
->where('log_id','like',"%$search_id%")->where('obj_user','like',"%$search_user%")
->whereBetween('expect_send_time',[$start_time,$end_time])->where('channel_type',$search_channel)
->whereBetween('actual_send_time',[$start_time,$end_time])->where('channel_type',$search_channel)
->where('status',$search_status)->paginate(20);
}
}
......@@ -546,6 +544,15 @@ class MessageController extends Controller
$res_perm = $this->getUserPerms($request,$perms_arr);
$manualmessage_send = $res_perm['manualmessage_send'];
//为所有历史消息的操作类型赋值
$op_type = '';
if(empty($request['op_type']))
{
$op_type = 2;
}else
{
$op_type = $request['op_type'];
}
$rq_log_id = $request->input('log_id');
//发送人工消息改变了模板的选择时会传过来tpl_id
$rq_tpl_id = $request->input('tpl_id');
......@@ -632,7 +639,8 @@ class MessageController extends Controller
'isContainEmail'=>$isContainEmail,
'isContainWechatNotify'=>$isContainWechatNotify,
'manualmessage_send'=>$manualmessage_send
'manualmessage_send'=>$manualmessage_send,
'op_type'=>$op_type
];
return view($viewid, $data);
......
......@@ -115,12 +115,22 @@
?>
<td>{{ $obj->channel_type }}</td>
<td>{{ $obj->obj_user }}</td>
<?php
if(empty($obj->actual_send_time))
{
$obj->actual_send_time = '';
}else
{
$obj->actual_send_time=date("Y-m-d H:i:s",$obj->actual_send_time);
}
?>
<td>{{ $obj->actual_send_time }}</td>
<?php
switch ($obj->status)
{
case -4:
$obj->status = "删除";
$obj->status = "删除";
break;
case -3:
$obj->status = "已取消";
......
......@@ -72,9 +72,22 @@
@else
<td>{{ $info[$i]->obj_user }}</td>
@endif
<?php
if(empty($info[$i]->actual_send_time))
{
$info[$i]->actual_send_time = '';
}else
{
$info[$i]->actual_send_time=date("Y-m-d H:i:s",$info[$i]->actual_send_time);
}
?>
<td>{{ $info[$i]->actual_send_time }}</td>
@if($manualmessage_edit)
<td><a href="{{url('message/sendmanualmessage')}}?log_id={{$info[$i]->log_id}}" class="btn btn-xs btn-outline btn-primary">编辑</a></td>
<td>
<a href="{{url('message/sendmanualmessage')}}?log_id={{$info[$i]->log_id}}&op_type=1" class="btn btn-xs btn-outline btn-primary">查看</a>
<a href="{{url('message/sendmanualmessage')}}?log_id={{$info[$i]->log_id}}&op_type=2" class="btn btn-xs btn-outline btn-warning">重新发送</a>
</td>
@endif
</tr>
@endfor
......
......@@ -285,12 +285,14 @@
</div>
</div>
@if($op_type==2)
{{--外部统一提交按钮--}}
<div class="col-sm-10" style="margin-top: 40px">
<div align="center">
<button class="btn btn-primary" id="msg_tpl_submit">提交发送</button>
</div>
</div>
@endif
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment