作者 郭文星

'312'

@@ -57,7 +57,7 @@ class Coupon extends Backend @@ -57,7 +57,7 @@ class Coupon extends Backend
57 ->paginate($limit); 57 ->paginate($limit);
58 58
59 foreach ($list as $row) { 59 foreach ($list as $row) {
60 - $row->visible(['id','name','createtime','closetime','updatetime','type','voucher_amount','gift','consumption','reduction','consumption_name','image']); 60 + $row->visible(['id','name','verification_store_id','createtime','closetime','updatetime','type','voucher_amount','gift','consumption','reduction','consumption_name','image']);
61 $row->visible(['store']); 61 $row->visible(['store']);
62 $row->getRelation('store')->visible(['name']); 62 $row->getRelation('store')->visible(['name']);
63 } 63 }
@@ -65,7 +65,7 @@ class Order extends Backend @@ -65,7 +65,7 @@ class Order extends Backend
65 $row->visible(['activity']); 65 $row->visible(['activity']);
66 $row->getRelation('activity')->visible(['title']); 66 $row->getRelation('activity')->visible(['title']);
67 $row->visible(['user']); 67 $row->visible(['user']);
68 - $row->getRelation('user')->visible(['username']); 68 + $row->getRelation('user')->visible(['nickname']);
69 } 69 }
70 70
71 $result = array("total" => $list->total(), "rows" => $list->items()); 71 $result = array("total" => $list->total(), "rows" => $list->items());
@@ -65,7 +65,7 @@ class Receive extends Backend @@ -65,7 +65,7 @@ class Receive extends Backend
65 $row->visible(['order']); 65 $row->visible(['order']);
66 $row->getRelation('order')->visible(['order_no']); 66 $row->getRelation('order')->visible(['order_no']);
67 $row->visible(['user']); 67 $row->visible(['user']);
68 - $row->getRelation('user')->visible(['username']); 68 + $row->getRelation('user')->visible(['nickname']);
69 } 69 }
70 70
71 $result = array("total" => $list->total(), "rows" => $list->items()); 71 $result = array("total" => $list->total(), "rows" => $list->items());
@@ -57,11 +57,11 @@ class Staff extends Backend @@ -57,11 +57,11 @@ class Staff extends Backend
57 ->paginate($limit); 57 ->paginate($limit);
58 58
59 foreach ($list as $row) { 59 foreach ($list as $row) {
60 - $row->visible(['id','name','phone','verification_store_id','type']); 60 + $row->visible(['id','name','phone','user_id','verification_store_id','type']);
61 $row->visible(['store']); 61 $row->visible(['store']);
62 $row->getRelation('store')->visible(['name']); 62 $row->getRelation('store')->visible(['name']);
63 $row->visible(['user']); 63 $row->visible(['user']);
64 - $row->getRelation('user')->visible(['username']); 64 + $row->getRelation('user')->visible(['nickname']);
65 } 65 }
66 66
67 $result = array("total" => $list->total(), "rows" => $list->items()); 67 $result = array("total" => $list->total(), "rows" => $list->items());
@@ -19,5 +19,5 @@ return [ @@ -19,5 +19,5 @@ return [
19 'Store.name' => '门店名称', 19 'Store.name' => '门店名称',
20 'Coupon.name' => '卡卷名称', 20 'Coupon.name' => '卡卷名称',
21 'Activity.title' => '活动标题', 21 'Activity.title' => '活动标题',
22 - 'User.username' => '用户名' 22 + 'User.nickname' => '用户名'
23 ]; 23 ];
@@ -17,5 +17,5 @@ return [ @@ -17,5 +17,5 @@ return [
17 'Store.name' => '门店名称', 17 'Store.name' => '门店名称',
18 'Coupon.name' => '卡卷名称', 18 'Coupon.name' => '卡卷名称',
19 'Order.order_no' => '订单编号', 19 'Order.order_no' => '订单编号',
20 - 'User.username' => '用户名' 20 + 'User.nickname' => '用户名'
21 ]; 21 ];
@@ -13,5 +13,5 @@ return [ @@ -13,5 +13,5 @@ return [
13 'Type 3' => '代理人&核销员', 13 'Type 3' => '代理人&核销员',
14 'Type 4' => '电销', 14 'Type 4' => '电销',
15 'Store.name' => '门店名称', 15 'Store.name' => '门店名称',
16 - 'User.username' => '用户名' 16 + 'User.nickname' => '用户名'
17 ]; 17 ];
@@ -39,7 +39,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin @@ -39,7 +39,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
39 {field: 'store.name', title: __('Store.name'), operate: 'LIKE'}, 39 {field: 'store.name', title: __('Store.name'), operate: 'LIKE'},
40 {field: 'coupon.name', title: __('Coupon.name'), operate: 'LIKE'}, 40 {field: 'coupon.name', title: __('Coupon.name'), operate: 'LIKE'},
41 {field: 'activity.title', title: __('Activity.title'), operate: 'LIKE'}, 41 {field: 'activity.title', title: __('Activity.title'), operate: 'LIKE'},
42 - {field: 'user.username', title: __('User.username'), operate: 'LIKE'}, 42 + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
43 {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} 43 {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
44 ] 44 ]
45 ] 45 ]
@@ -31,12 +31,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin @@ -31,12 +31,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
31 {field: 'type', title: __('Type'), searchList: {"0":__('Type 0'),"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal}, 31 {field: 'type', title: __('Type'), searchList: {"0":__('Type 0'),"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
32 {field: 'closetime', title: __('Closetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, 32 {field: 'closetime', title: __('Closetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
33 {field: 'receive_no', title: __('Receive_no'), operate: 'LIKE'}, 33 {field: 'receive_no', title: __('Receive_no'), operate: 'LIKE'},
34 - {field: 'qr_code', title: __('Qr_code'), operate: 'LIKE'}, 34 + {field: 'qr_code', title: __('Qr_code'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
35 {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, 35 {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
36 {field: 'store.name', title: __('Store.name'), operate: 'LIKE'}, 36 {field: 'store.name', title: __('Store.name'), operate: 'LIKE'},
37 {field: 'coupon.name', title: __('Coupon.name'), operate: 'LIKE'}, 37 {field: 'coupon.name', title: __('Coupon.name'), operate: 'LIKE'},
38 {field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE'}, 38 {field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE'},
39 - {field: 'user.username', title: __('User.username'), operate: 'LIKE'}, 39 + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
40 {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} 40 {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
41 ] 41 ]
42 ] 42 ]
@@ -26,12 +26,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin @@ -26,12 +26,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
26 [ 26 [
27 {checkbox: true}, 27 {checkbox: true},
28 {field: 'id', title: __('Id')}, 28 {field: 'id', title: __('Id')},
  29 + {field: 'user_id', title: __('User_id'), operate: 'LIKE'},
29 {field: 'name', title: __('Name'), operate: 'LIKE'}, 30 {field: 'name', title: __('Name'), operate: 'LIKE'},
30 {field: 'phone', title: __('Phone'), operate: 'LIKE'}, 31 {field: 'phone', title: __('Phone'), operate: 'LIKE'},
31 {field: 'verification_store_id', title: __('Verification_store_id')}, 32 {field: 'verification_store_id', title: __('Verification_store_id')},
32 {field: 'type', title: __('Type'), searchList: {"0":__('Type 0'),"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3'),"4":__('Type 4')}, formatter: Table.api.formatter.normal}, 33 {field: 'type', title: __('Type'), searchList: {"0":__('Type 0'),"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3'),"4":__('Type 4')}, formatter: Table.api.formatter.normal},
33 {field: 'store.name', title: __('Store.name'), operate: 'LIKE'}, 34 {field: 'store.name', title: __('Store.name'), operate: 'LIKE'},
34 - {field: 'user.username', title: __('User.username'), operate: 'LIKE'}, 35 + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
35 {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} 36 {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
36 ] 37 ]
37 ] 38 ]