role_reward.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?php
  2. $role = function()
  3. {
  4. $info = Dever::db('setting/role')->select();
  5. return $info;
  6. };
  7. $value_type = array
  8. (
  9. 1 => '百分比',
  10. 2 => '数值',
  11. );
  12. $is_give = array
  13. (
  14. 1 => '是',
  15. 2 => '否',
  16. );
  17. $type = array
  18. (
  19. 1 => '街道',
  20. 5 => '分润创客名额',
  21. );
  22. return array
  23. (
  24. # 表名
  25. 'name' => 'role_reward',
  26. # 显示给用户看的名称
  27. 'lang' => '奖励管理',
  28. 'menu' => false,
  29. # 数据结构
  30. 'struct' => array
  31. (
  32. 'id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => 'ID',
  36. 'default' => '',
  37. 'desc' => '',
  38. 'match' => 'is_numeric',
  39. 'search' => 'order',
  40. 'update' => 'hidden',
  41. //'list' => true,
  42. ),
  43. 'role_id' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '代理商角色',
  47. 'default' => '',
  48. 'desc' => '代理商角色',
  49. 'match' => 'is_numeric',
  50. 'update' => 'hidden',
  51. 'search' => 'hidden',
  52. 'value' => Dever::input('search_option_role_id'),
  53. 'list' => 'Dever::load("setting/role-one#name", {role_id})',
  54. ),
  55. 't_role_id' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '推荐角色',
  59. 'default' => '',
  60. 'desc' => '推荐角色',
  61. 'match' => 'is_numeric',
  62. 'update' => 'select',
  63. 'search' => 'select',
  64. 'option' => $role,
  65. 'list' => 'Dever::load("setting/role-one#name", {t_role_id})',
  66. ),
  67. 'num' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '推荐个数-每推荐多少个,奖励多少数值,这里填写推荐个数',
  71. 'default' => '1',
  72. 'desc' => '推荐个数',
  73. 'match' => 'is_numeric',
  74. 'update' => 'text',
  75. 'list' => true,
  76. ),
  77. 'value' => array
  78. (
  79. 'type' => 'varchar-32',
  80. 'name' => '推荐奖励数值-如果是百分比,这里输入10,就是奖励10%,如果是数值,这里以元为单位',
  81. 'default' => '0',
  82. 'desc' => '推荐奖励数值',
  83. 'match' => 'is_string',
  84. 'update' => 'text',
  85. 'search' => 'fulltext',
  86. 'list' => true,
  87. ),
  88. 'value_type' => array
  89. (
  90. 'type' => 'tinyint-1',
  91. 'name' => '奖励数值类型',
  92. 'default' => '1',
  93. 'desc' => '奖励数值类型',
  94. 'match' => 'is_numeric',
  95. 'update' => 'radio',
  96. 'option' => $value_type,
  97. 'search' => 'select',
  98. 'list' => true,
  99. 'control' => 'type',
  100. ),
  101. 'is_give' => array
  102. (
  103. 'type' => 'tinyint-1',
  104. 'name' => '是否有额外奖励',
  105. 'default' => '2',
  106. 'desc' => '是否有额外奖励',
  107. 'match' => 'is_numeric',
  108. 'update' => 'radio',
  109. 'option' => $is_give,
  110. 'control' => 'is_give',
  111. ),
  112. 'give' => array
  113. (
  114. 'type' => 'text-1000',
  115. 'name' => '额外奖励',
  116. 'default' => '',
  117. 'desc' => '额外奖励',
  118. 'match' => 'is_string',
  119. 'show' => 'is_give=1',
  120. 'update' => array
  121. (
  122. array
  123. (
  124. 'col' => 'num',
  125. 'name' => '推荐个数',
  126. 'default' => '0',
  127. 'desc' => '推荐个数',
  128. 'match' => 'is_string',
  129. 'update' => 'text',
  130. ),
  131. array
  132. (
  133. 'col' => 'type',
  134. 'name' => '奖励类型',
  135. 'default' => '1',
  136. 'desc' => '奖励类型',
  137. 'match' => 'is_string',
  138. 'update' => 'radio',
  139. 'option' => $type,
  140. ),
  141. array
  142. (
  143. 'col' => 'value',
  144. 'name' => '奖励数值',
  145. 'default' => '0',
  146. 'desc' => '奖励数值',
  147. 'match' => 'is_string',
  148. 'update' => 'text',
  149. ),
  150. array
  151. (
  152. 'col' => 'value_type',
  153. 'name' => '数值类型',
  154. 'default' => '1',
  155. 'desc' => '数值类型',
  156. 'match' => 'is_string',
  157. 'update' => 'radio',
  158. 'option' => $value_type,
  159. ),
  160. ),
  161. ),
  162. 'state' => array
  163. (
  164. 'type' => 'tinyint-1',
  165. 'name' => '状态',
  166. 'default' => '1',
  167. 'desc' => '请选择状态',
  168. 'match' => 'is_numeric',
  169. ),
  170. 'cdate' => array
  171. (
  172. 'type' => 'int-11',
  173. 'name' => '创建时间',
  174. 'match' => array('is_numeric', time()),
  175. 'desc' => '',
  176. # 只有insert时才生效
  177. //'insert' => true,
  178. 'search' => 'date',
  179. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  180. ),
  181. ),
  182. 'manage' => array
  183. (
  184. ),
  185. 'request' => array
  186. (
  187. ),
  188. );