info.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. 'type' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '礼品卡类型',
  62. 'default' => '1',
  63. 'desc' => '礼品卡类型',
  64. 'match' => 'is_numeric',
  65. 'update' => 'radio',
  66. 'option' => $type,
  67. 'control' => 'type',
  68. ),
  69. 'day' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '有效天数',
  73. 'default' => '7',
  74. 'desc' => '有效天数',
  75. 'match' => 'is_numeric',
  76. 'update' => 'text',
  77. 'show' => 'type=2',
  78. ),
  79. 'card_type' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '卡号生成规则',
  83. 'default' => '3',
  84. 'desc' => '卡号生成规则',
  85. 'match' => 'is_numeric',
  86. 'update' => 'select',
  87. 'option' => $card_type,
  88. ),
  89. 'card_prefix' => array
  90. (
  91. 'type' => 'varchar-80',
  92. 'name' => '卡号前缀-前缀不占用卡号长度的位数,如卡号长度填写14,卡号前缀为Q,则生成卡号前缀+14位随机数',
  93. 'default' => '',
  94. 'desc' => '卡号前缀',
  95. 'match' => 'option',
  96. 'update' => 'text',
  97. ),
  98. 'card_len' => array
  99. (
  100. 'type' => 'int-11',
  101. 'name' => '卡号长度',
  102. 'default' => '14',
  103. 'desc' => '卡号长度',
  104. 'match' => 'is_numeric',
  105. 'update' => 'text',
  106. ),
  107. 'status' => array
  108. (
  109. 'type' => 'int-11',
  110. 'name' => '状态',
  111. 'default' => '1',
  112. 'desc' => '状态',
  113. 'match' => 'is_numeric',
  114. //'update' => 'select',
  115. 'option' => $status,
  116. 'search' => 'select',
  117. 'list' => true,
  118. 'edit' => true,
  119. ),
  120. 'state' => array
  121. (
  122. 'type' => 'tinyint-1',
  123. 'name' => '状态',
  124. 'default' => '1',
  125. 'desc' => '请选择状态',
  126. 'match' => 'is_numeric',
  127. ),
  128. 'cdate' => array
  129. (
  130. 'type' => 'int-11',
  131. 'name' => '录入时间',
  132. 'match' => array('is_numeric', time()),
  133. 'desc' => '',
  134. # 只有insert时才生效
  135. 'insert' => true,
  136. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  137. ),
  138. ),
  139. 'manage' => array
  140. (
  141. 'list_button' => array
  142. (
  143. 'fast' => array('生成卡号', '"add&where_id=1&search_option_info_id={id}"', '{status} == 1'),
  144. 'list1' => array('卡号列表', '"code&search_option_info_id={id}&oper_table=info"'),
  145. ),
  146. ),
  147. 'request' => array
  148. (
  149. ),
  150. );