info.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <?php
  2. $status = Dever::config('base')->status;
  3. $type = array
  4. (
  5. 1 => '永久有效',
  6. 2 => '固定天数',
  7. );
  8. $card_type = array
  9. (
  10. 1 => '全数字',
  11. 2 => '全小写',
  12. 3 => '全大写',
  13. 4 => '大小写组合',
  14. 5 => '数字+大小写组合',
  15. );
  16. return array
  17. (
  18. # 表名
  19. 'name' => 'info',
  20. # 显示给用户看的名称
  21. 'lang' => '礼品卡配置',
  22. # 后台菜单排序
  23. 'order' => 99,
  24. # 数据结构
  25. 'struct' => array
  26. (
  27. 'id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => 'ID',
  31. 'default' => '',
  32. 'desc' => '',
  33. 'match' => 'is_numeric',
  34. 'search' => 'order',
  35. 'list' => true,
  36. 'order' => 'desc',
  37. ),
  38. 'name' => array
  39. (
  40. 'type' => 'varchar-80',
  41. 'name' => '礼品卡名称',
  42. 'default' => '',
  43. 'desc' => '请输入礼品卡名称',
  44. 'match' => 'is_string',
  45. 'update' => 'text',
  46. 'search' => 'fulltext',
  47. 'list' => true,
  48. ),
  49. 'value' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '面值',
  53. 'default' => '100',
  54. 'desc' => '面值',
  55. 'match' => 'is_numeric',
  56. 'update' => 'text',
  57. ),
  58. 'price' => array
  59. (
  60. 'type' => 'varchar-80',
  61. 'name' => '售价',
  62. 'default' => '100',
  63. 'desc' => '售价',
  64. 'match' => 'is_numeric',
  65. 'update' => 'text',
  66. ),
  67. 'type' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '礼品卡类型',
  71. 'default' => '1',
  72. 'desc' => '礼品卡类型',
  73. 'match' => 'is_numeric',
  74. 'update' => 'radio',
  75. 'option' => $type,
  76. 'control' => 'type',
  77. ),
  78. 'day' => array
  79. (
  80. 'type' => 'int-11',
  81. 'name' => '有效天数',
  82. 'default' => '7',
  83. 'desc' => '有效天数',
  84. 'match' => 'is_numeric',
  85. 'update' => 'text',
  86. 'show' => 'type=2',
  87. ),
  88. 'card_type' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '卡号生成规则',
  92. 'default' => '3',
  93. 'desc' => '卡号生成规则',
  94. 'match' => 'is_numeric',
  95. 'update' => 'select',
  96. 'option' => $card_type,
  97. ),
  98. 'card_prefix' => array
  99. (
  100. 'type' => 'varchar-80',
  101. 'name' => '卡号前缀-前缀不占用卡号长度的位数,如卡号长度填写14,卡号前缀为Q,则生成卡号前缀+14位随机数',
  102. 'default' => '',
  103. 'desc' => '卡号前缀',
  104. 'match' => 'option',
  105. 'update' => 'text',
  106. ),
  107. 'card_len' => array
  108. (
  109. 'type' => 'int-11',
  110. 'name' => '卡号长度',
  111. 'default' => '14',
  112. 'desc' => '卡号长度',
  113. 'match' => 'is_numeric',
  114. 'update' => 'text',
  115. ),
  116. 'status' => array
  117. (
  118. 'type' => 'int-11',
  119. 'name' => '状态',
  120. 'default' => '1',
  121. 'desc' => '状态',
  122. 'match' => 'is_numeric',
  123. //'update' => 'select',
  124. 'option' => $status,
  125. 'search' => 'select',
  126. 'list' => true,
  127. 'edit' => true,
  128. ),
  129. 'reorder' => array
  130. (
  131. 'type' => 'int-11',
  132. 'name' => '排序-数值越大越靠前',
  133. 'default' => '1',
  134. 'desc' => '请输入排序',
  135. 'match' => 'option',
  136. 'update' => 'text',
  137. 'search' => 'order',
  138. 'list' => true,
  139. 'order' => 'desc',
  140. 'edit' => true,
  141. ),
  142. 'state' => array
  143. (
  144. 'type' => 'tinyint-1',
  145. 'name' => '状态',
  146. 'default' => '1',
  147. 'desc' => '请选择状态',
  148. 'match' => 'is_numeric',
  149. ),
  150. 'cdate' => array
  151. (
  152. 'type' => 'int-11',
  153. 'name' => '录入时间',
  154. 'match' => array('is_numeric', time()),
  155. 'desc' => '',
  156. # 只有insert时才生效
  157. 'insert' => true,
  158. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  159. ),
  160. ),
  161. 'manage' => array
  162. (
  163. 'list_button' => array
  164. (
  165. //'fast' => array('生成卡号', '"add&where_id=1&search_option_info_id={id}"', '{status} == 1'),
  166. //'list1' => array('卡号列表', '"code&search_option_info_id={id}&oper_table=info"'),
  167. ),
  168. ),
  169. 'request' => array
  170. (
  171. ),
  172. );