clerk.mod.php
3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
function clerk_check() {
global $_W;
if(empty($_W['openid'])) {
return error(-1, '获取粉丝openid失败');
}
$data = pdo_get('activity_clerks', array('uniacid' => $_W['uniacid'], 'openid' => $_W['openid']));
if(empty($data)) {
return error(-1, '不是操作店员');
}
return $data;
}
function clerk_permission_list() {
$data = array(
'mc' => array(
'title' => '快捷交易',
'permission' => 'mc_manage',
'items' => array(
array(
'title' => '积分充值',
'permission' => 'mc_credit1',
'icon' => 'fa fa-money',
'type' => 'modal',
'modal' => 'modal-trade',
'data' => 'credit1',
),
array(
'title' => '余额充值',
'permission' => 'mc_credit2',
'icon' => 'fa fa-cny',
'type' => 'modal',
'modal' => 'modal-trade',
'data' => 'credit2',
),
array(
'title' => '消费',
'permission' => 'mc_consume',
'icon' => 'fa fa-usd',
'type' => 'modal',
'modal' => 'modal-trade',
'data' => 'consume',
),
array(
'title' => '发放会员卡',
'permission' => 'mc_card',
'icon' => 'fa fa-credit-card',
'type' => 'modal',
'modal' => 'modal-trade',
'data' => 'card',
),
)
),
'stat' => array(
'title' => '数据统计',
'permission' => 'stat_manage',
'items' => array(
array(
'title' => '积分统计',
'permission' => 'stat_credit1',
'icon' => 'fa fa-bar-chart',
'type' => 'url',
'url' => './index.php?c=stat&a=credit1'
),
array(
'title' => '余额统计',
'permission' => 'stat_credit2',
'icon' => 'fa fa-bar-chart',
'type' => 'url',
'url' => './index.php?c=stat&a=credit2'
),
array(
'title' => '现金消费统计',
'permission' => 'stat_cash',
'icon' => 'fa fa-bar-chart',
'type' => 'url',
'url' => './index.php?c=stat&a=cash'
),
array(
'title' => '会员卡统计',
'permission' => 'stat_card',
'icon' => 'fa fa-bar-chart',
'type' => 'url',
'url' => './index.php?c=stat&a=card'
),
array(
'title' => '收银台收款统计',
'permission' => 'stat_paycenter',
'icon' => 'fa fa-bar-chart',
'type' => 'url',
'url' => './index.php?c=stat&a=paycenter'
),
)
),
'activity' => array(
'title' => '系统优惠券核销',
'permission' => 'activity_card_manage',
'items' => array(
array(
'title' => '折扣券核销',
'permission' => 'activity_consume_coupon',
'icon' => 'fa fa-money',
'type' => 'url',
'url' => './index.php?c=activity&a=consume&do=display&type=1'
),
array(
'title' => '代金券核销',
'permission' => 'activity_consume_token',
'icon' => 'fa fa-money',
'type' => 'url',
'url' => './index.php?c=activity&a=consume&do=display&type=2'
),
)
),
'wechat' => array(
'title' => '微信卡券核销',
'permission' => 'wechat_card_manage',
'items' => array(
array(
'title' => '卡券核销',
'permission' => 'wechat_consume',
'icon' => 'fa fa-money',
'type' => 'url',
'url' => './index.php?c=wechat&a=consume'
)
)
),
'paycenter' => array(
'title' => '收银台',
'permission' => 'paycenter_manage',
'items' => array(
array(
'title' => '微信刷卡收款',
'permission' => 'paycenter_wxmicro_pay',
'icon' => 'fa fa-money',
'type' => 'url',
'url' => './index.php?c=paycenter&a=wxmicro&do=pay'
)
)
),
);
return $data;
}