Selaa lähdekoodia

用户收益流水

lizhen_gitee 1 vuosi sitten
vanhempi
commit
69096d27db

+ 7 - 1
application/admin/controller/Usershouyilog.php

@@ -61,7 +61,13 @@ class Usershouyilog extends Backend
                 $row->getRelation('user')->visible(['username','nickname','mobile']);
             }
 
-            $result = array("total" => $list->total(), "rows" => $list->items());
+            $wallet_logtype = config('wallet.logtype');
+            $lists = collection($list->items())->toArray();
+            foreach ($lists as &$row) {
+                $row['log_type_text'] = isset($wallet_logtype[$row['log_type']]) ? $wallet_logtype[$row['log_type']] : '';
+            }
+
+            $result = array("total" => $list->total(), "rows" => $lists);
 
             return json($result);
         }

+ 2 - 2
application/admin/view/usershouyilog/index.html

@@ -7,7 +7,7 @@
                 <div class="widget-body no-padding">
                     <div id="toolbar" class="toolbar">
                         <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
-                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('usershouyilog/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
+                        <!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('usershouyilog/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
                         <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('usershouyilog/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
                         <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('usershouyilog/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                         
@@ -19,7 +19,7 @@
                                 <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
                             </ul>
                         </div>
-
+-->
                         
                     </div>
                     <table id="table" class="table table-striped table-bordered table-hover table-nowrap"

+ 3 - 2
public/assets/js/backend/usershouyilog.js

@@ -29,7 +29,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {checkbox: true},
                         {field: 'id', title: __('Id')},
                         {field: 'user_id', title: __('User_id')},
-                        {field: 'log_type', title: __('Log_type')},
+//                        {field: 'log_type', title: __('Log_type')},
+                        {field: 'log_type_text', title: __('Log_type'),operate:false},
                         {field: 'before', title: __('Before')},
                         {field: 'change_value', title: __('Change_value')},
                         {field: 'remain', title: __('Remain')},
@@ -42,7 +43,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'user.username', title: __('User.username'), operate: 'LIKE'},
                         {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
                         {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
-                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+//                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                     ]
                 ]
             });