clerk.mod.php 3.7 KB

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