Commit c6a09efc by 朱继来

列表添加过期字段

parent 3a4b115c
...@@ -126,7 +126,7 @@ class UserSampleApplyModel extends Model ...@@ -126,7 +126,7 @@ class UserSampleApplyModel extends Model
$page = $request->input('page', 1); $page = $request->input('page', 1);
$limit = $request->input('limit', 10); $limit = $request->input('limit', 10);
$field = ['apply_id', 'user_id', 'account', 'order_id', 'order_sn', 'goods_id', 'goods_name', 'apply_num', 'quota', 'create_time']; $field = ['apply_id', 'user_id', 'account', 'order_id', 'order_sn', 'goods_id', 'goods_name', 'apply_num', 'quota', 'is_expire', 'create_time'];
$list = $this->where('user_id', $user_id) $list = $this->where('user_id', $user_id)
->select($field) ->select($field)
......
...@@ -28,7 +28,7 @@ class UserSampleInviteModel extends Model ...@@ -28,7 +28,7 @@ class UserSampleInviteModel extends Model
$page = $request->input('page', 1); $page = $request->input('page', 1);
$limit = $request->input('limit', 10); $limit = $request->input('limit', 10);
$field = ['invite_id', 'user_id', 'account', 'invitee_uid', 'invitee_mobile', 'create_time']; $field = ['invite_id', 'user_id', 'account', 'invitee_uid', 'invitee_mobile', 'is_expire', 'create_time'];
$list = $this->where('user_id', $user_id) $list = $this->where('user_id', $user_id)
->select($field) ->select($field)
......
...@@ -23,6 +23,7 @@ layui.use(['table'], function(){ ...@@ -23,6 +23,7 @@ layui.use(['table'], function(){
,{field: 'goods_name', title: '样片名称', width: 300} ,{field: 'goods_name', title: '样片名称', width: 300}
,{field: 'apply_num', title: '领取数量', width: 120} ,{field: 'apply_num', title: '领取数量', width: 120}
,{field: 'quota', title: '样片消耗人数', width: 120} ,{field: 'quota', title: '样片消耗人数', width: 120}
,{field: 'is_expire', title: '是否过期', templet: '#is_expire', width: 120}
,{field: 'create_time', title: '领取时间', width: 215} ,{field: 'create_time', title: '领取时间', width: 215}
]] ]]
,limit: 10 ,limit: 10
...@@ -46,6 +47,7 @@ layui.use(['table'], function(){ ...@@ -46,6 +47,7 @@ layui.use(['table'], function(){
,{field: 'account', title: '用户账户'} ,{field: 'account', title: '用户账户'}
,{field: 'invitee_uid', title: '受邀人ID'} ,{field: 'invitee_uid', title: '受邀人ID'}
,{field: 'invitee_mobile', title: '受邀人手机号码'} ,{field: 'invitee_mobile', title: '受邀人手机号码'}
,{field: 'is_expire', title: '是否过期', templet: '#is_expire', width: 120}
,{field: 'create_time', title: '受邀人注册时间'} ,{field: 'create_time', title: '受邀人注册时间'}
]] ]]
,limit: 10 ,limit: 10
......
...@@ -55,4 +55,12 @@ ...@@ -55,4 +55,12 @@
<hr> <hr>
<h3>邀约记录</h3> <h3>邀约记录</h3>
<table id="invite_log" lay-filter="invite"></table> <table id="invite_log" lay-filter="invite"></table>
\ No newline at end of file
<script type="text/html" id="is_expire">
@{{# if (d.is_expire == 1) { }}
<div style="color:green;">未过期</div>
@{{# } else { }}
<div style="color:#ccc;">已过期</div>
@{{# } }}
</script>
\ No newline at end of file
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