Commit a97ffbb4 by 李洋

列条添加分页、添加搜索

parent 3678e212
......@@ -179,7 +179,7 @@ class MessageController extends Controller
$cnt = DB::connection('message');
//取出自动发送模板数据
$info = $cnt->table('lie_msg_tpl')->where('source_type','1')->get();
$info = $cnt->table('lie_msg_tpl')->where('source_type','1')->paginate(20);
//构建model
foreach ($info as $tpl)
......@@ -201,10 +201,18 @@ class MessageController extends Controller
$tpl->title = $email_title->title;
}
}
$msg_channels=[
'全部',
'站内信',
'短信',
'邮件',
'微信通知'
];
$data=[
'title'=>'asd',
'id'=>$id,
'info'=>$info,
'msg_channels'=>$msg_channels,
];
return view($viewid, $data);
......@@ -238,11 +246,19 @@ class MessageController extends Controller
}
}
$msg_channels=[
'全部',
'站内信',
'短信',
'邮件',
'微信通知'
];
$data=[
'title'=>'asd',
'id'=>$id,
'info'=>$info
'info'=>$info,
'msg_channels'=>$msg_channels,
];
return view($viewid, $data);
......@@ -253,11 +269,19 @@ class MessageController extends Controller
{
Csrf($request);
$db = DB::connection('message')->table('lie_msg_log');
$info = $db->get();
$info = $db->paginate(20);
$msg_channels = [
'全部',
'站内信',
'短信',
'邮件',
'微信通知'
];
$data=[
'title'=>'asd',
'id'=>$id,
'info'=>$info
'info'=>$info,
'msg_channels'=>$msg_channels
];
return view($viewid, $data);
......
//选择定时推送时间
layui.use('laydate', function(){
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#Choice_start', //指定元素
type:'datetime',
format:'yyyy-MM-dd HH:mm'
});
});
\ No newline at end of file
//选择定时推送时间
layui.use('laydate', function(){
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#Choice_start', //指定元素
type:'datetime',
format:'yyyy-MM-dd HH:mm'
});
});
\ No newline at end of file
<style>
.p-l{
margin: 20px;
background-color: rgba(255, 249, 242, 0.02);
height: auto;
}
.p-l label{
margin-left: 30px;
}
.div-b{
margin-top: 20px;
}
</style>
<div class="gray-bg">
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<div class="form-inline">
<div class="form-inline p-l">
<form method="get" action="/message/templateList">
<a class="btn btn-primary btn-sm" href="/message/addHistory">新增消息</a>
<input class="btn btn-primary btn-sm" type="submit" value="搜索" style="float: right"/>
<input type="text" id="searchkey" name="message_title" placeholder="请输入消息标题" style="float:right; width: 150px; height: 30px; margin-right: 5px;"/>
<div style="text-align: center">
<label>消息编号:</label>
<input class="form-control" type="text" id="search-msg-id" placeholder="请输入消息编号"/>
<label>用户:</label>
<input class="form-control" type="text" id="search-msg-userobj" placeholder="请输入用户">
<label>发送时间:</label>
<input type="text" class="form-control" id="Choice_start" name="create_time_start/condition" value=""/>
</div>
<div class="div-b" style="text-align: center">
<label>消息渠道:</label>
<select class="form-control" id="search-msg-channel">
@for($i=0;$i<count($msg_channels);$i++)
<option value="{{ $i }}">{{ $msg_channels[$i] }}</option>
@endfor
</select>
<label>消息状态:</label>
<select class="form-control" id="search-msg-status">
<option value="0">全部</option>
<option value="-3">已取消</option>
<option value="-2">待发送</option>
<option value="-1">发送失败</option>
<option value="1">发送成功</option>
</select>
<input class="btn btn-primary btn-sm" type="submit" value="搜索"/>
</div>
</form>
</div>
</div>
{{--@if(count($lists)>0)--}}
@if(count($info)>0)
<div class="ibox-content">
<div class="dataTables_wrapper form-inline dt-bootstrap">
<div class="row">
......@@ -86,17 +129,17 @@
</tbody>
</table>
{{--{!! $lists->links() !!}--}}
{!! $info->links() !!}
</div>
</div>
{{--<div class="row" id="my_list_paginate"></div>--}}
<div class="row" id="my_list_paginate"></div>
</div>
</div>
{{--@else--}}
{{--<div style="text-align: center">--}}
{{--<label>很抱歉,暂无数据</label>--}}
{{--</div>--}}
{{--@endif--}}
@else
<div style="text-align: center">
<label>很抱歉,暂无数据</label>
</div>
@endif
</div>
</div>
</div>
......
<style>
.p-l{
margin: 20px;
background-color: rgba(255, 249, 242, 0.02);
height: auto;
}
.p-l label{
margin-left: 30px;
}
.div-b{
margin-top: 20px;
}
</style>
<div class="gray-bg">
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<div class="form-inline">
<a class="btn btn-primary btn-sm" href="/message/sendManualMessage">发送消息</a>
<div class="form-inline p-l">
<form method="get" action="/message/templateList">
<input class="btn btn-primary btn-sm" type="submit" value="搜索" style="float: right"/>
<input type="text" id="searchkey" name="message_title" placeholder="请输入消息标题" style="float:right; width: 150px; height: 30px; margin-right: 5px;"/>
<div style="text-align: center" class="div-b">
<a class="btn btn-primary btn-sm" href="/message/sendManualMessage" style="float: left;margin-left: 30px">发送消息</a>
<label>消息标题:</label>
<input type="text" class="form-control" id="serach-title" placeholder="请输入消息标题">
<label>消息渠道:</label>
<select class="form-control" name="inner-choose-type" id="choose-tpl">
@for($i=0;$i<count($msg_channels);$i++)
<option value="{{ $i }}">{{ $msg_channels[$i] }}</option>
@endfor
</select>
<label>发送时间:</label>
<input type="text" class="form-control" id="Choice_start" name="create_time_start/condition" value=""/>
<a class="btn btn-primary btn-sm" href="" style="float: right; margin-right: 50px">搜索</a>
</div>
</form>
</div>
</div>
{{--@if(count($lists)>0)--}}
@if(count($info)>0)
<div class="ibox-content">
<div class="dataTables_wrapper form-inline dt-bootstrap">
<div class="row">
......@@ -47,17 +72,17 @@
</tbody>
</table>
{{--{!! $lists->links() !!}--}}
{{--{!! $info->links() !!}--}}
</div>
</div>
{{--<div class="row" id="my_list_paginate"></div>--}}
<div class="row" id="my_list_paginate"></div>
</div>
</div>
{{--@else--}}
{{--<div style="text-align: center">--}}
{{--<label>很抱歉,暂无数据</label>--}}
{{--</div>--}}
{{--@endif--}}
@else
<div style="text-align: center">
<label>很抱歉,暂无数据</label>
</div>
@endif
</div>
</div>
</div>
......
<style>
.p-l{
margin: 20px;
background-color: rgba(255, 249, 242, 0.02);
height: auto;
}
.p-l label{
margin-left: 30px;
}
.div-b{
margin-top: 20px;
}
</style>
<div class="gray-bg">
<div class="wrapper wrapper-content">
......@@ -5,16 +18,25 @@
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<div class="form-inline">
<div class="form-inline p-l">
<form method="get" action="/message/templateList">
<a class="btn btn-primary btn-sm" href="/message/addHistory">新增消息</a>
<input class="btn btn-primary btn-sm" type="submit" value="搜索" style="float: right"/>
<input type="text" id="searchkey" name="message_title" placeholder="请输入消息标题" style="float:right; width: 150px; height: 30px; margin-right: 5px;"/>
<div style="text-align: center" class="div-b">
<a class="btn btn-primary btn-sm" href="/message/addHistory" style="float: left; margin-left: 30px">新增消息</a>
<label>消息标题:</label>
<input type="text" class="form-control" id="serach-title" placeholder="请输入消息标题">
<label>消息渠道:</label>
<select class="form-control" name="inner-choose-type" id="choose-tpl">
@for($i=0;$i<count($msg_channels);$i++)
<option value="{{ $i }}">{{ $msg_channels[$i] }}</option>
@endfor
</select>
<a class="btn btn-primary btn-sm" href="" style="float: right; margin-right: 60px">搜索</a>
</div>
</form>
</div>
</div>
{{--@if(count($lists)>0)--}}
@if(count($info)>0)
<div class="ibox-content">
<div class="dataTables_wrapper form-inline dt-bootstrap">
<div class="row">
......@@ -42,17 +64,17 @@
@endfor
</tbody>
</table>
{{--{!! $lists->links() !!}--}}
{!! $info->links() !!}
</div>
</div>
{{--<div class="row" id="my_list_paginate"></div>--}}
<div class="row" id="my_list_paginate"></div>
</div>
</div>
{{--@else--}}
{{--<div style="text-align: center">--}}
{{--<label>很抱歉,暂无数据</label>--}}
{{--</div>--}}
{{--@endif--}}
@else
<div style="text-align: center">
<label>很抱歉,暂无数据</label>
</div>
@endif
</div>
</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