baoming.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?php
  2. $status = array
  3. (
  4. 1 => array('name' => '待审核', 'style' => 'font-weight:bold;color:#436EEE'),
  5. 2 => array('name' => '入选审核通过', 'style' => 'font-weight:bold;color:#003366'),
  6. 3 => array('name' => '未通过入选', 'style' => 'font-weight:bold;color:#993333'),
  7. );
  8. $audit = array
  9. (
  10. //1 => '待审核',
  11. 2 => '审核通过',
  12. 3 => '审核未通过',
  13. );
  14. $sex = array
  15. (
  16. 1 => '男',
  17. 2 => '女',
  18. );
  19. return array
  20. (
  21. # 表名
  22. 'name' => 'baoming',
  23. # 显示给用户看的名称
  24. 'lang' => '报名列表',
  25. 'order' => 100,
  26. 'set' => array
  27. (
  28. 'status' => $status,
  29. 'audit' => $audit,
  30. ),
  31. # 数据结构
  32. 'struct' => array
  33. (
  34. 'id' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => 'ID',
  38. 'default' => '',
  39. 'desc' => '',
  40. 'match' => 'is_numeric',
  41. 'list' => true,
  42. ),
  43. 'act_id' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '活动id',
  47. 'default' => 'act_id',
  48. 'desc' => '活动id',
  49. 'match' => 'is_numeric',
  50. ),
  51. 'parent_name' => array
  52. (
  53. 'type' => 'varchar-300',
  54. 'name' => '家长姓名',
  55. 'default' => '',
  56. 'desc' => '家长姓名',
  57. 'match' => 'is_string',
  58. 'update' => 'text',
  59. 'list' => true,
  60. 'search' => 'fulltext',
  61. ),
  62. 'mobile' => array
  63. (
  64. 'type' => 'bigint-11',
  65. 'name' => '联系电话',
  66. 'default' => '',
  67. 'desc' => '联系电话',
  68. 'match' => 'is_numeric',
  69. 'update' => 'text',
  70. 'list' => true,
  71. 'search' => 'fulltext',
  72. ),
  73. 'area' => array
  74. (
  75. 'type' => 'varchar-500',
  76. 'name' => '所在城市',
  77. 'default' => '',
  78. 'desc' => '所在城市',
  79. 'match' => 'is_string',
  80. 'search' => 'linkage',
  81. 'update' => 'linkage',
  82. 'option' => Dever::url('api.get?level_total=2', 'area'),
  83. 'list' => 'Dever::load("area/api.string", "{area}")',
  84. ),
  85. 'name' => array
  86. (
  87. 'type' => 'varchar-300',
  88. 'name' => '宝贝姓名',
  89. 'default' => '',
  90. 'desc' => '宝贝姓名',
  91. 'match' => 'is_string',
  92. 'update' => 'text',
  93. 'list' => true,
  94. 'search' => 'fulltext',
  95. ),
  96. 'age' => array
  97. (
  98. 'type' => 'int-11',
  99. 'name' => '宝贝年龄',
  100. 'default' => '',
  101. 'desc' => '宝贝年龄',
  102. 'match' => 'option',
  103. 'update' => 'text',
  104. ),
  105. 'sex' => array
  106. (
  107. 'type' => 'int-11',
  108. 'name' => '宝贝性别',
  109. 'default' => '',
  110. 'desc' => '宝贝性别',
  111. 'match' => 'option',
  112. 'update' => 'radio',
  113. 'option' => $sex,
  114. ),
  115. 'height' => array
  116. (
  117. 'type' => 'int-11',
  118. 'name' => '宝贝身高',
  119. 'default' => '',
  120. 'desc' => '宝贝身高',
  121. 'match' => 'option',
  122. 'update' => 'text',
  123. ),
  124. 'weight' => array
  125. (
  126. 'type' => 'int-11',
  127. 'name' => '宝贝体重',
  128. 'default' => '',
  129. 'desc' => '宝贝体重',
  130. 'match' => 'option',
  131. 'update' => 'text',
  132. ),
  133. 'size' => array
  134. (
  135. 'type' => 'int-11',
  136. 'name' => '宝贝衣服尺码',
  137. 'default' => '',
  138. 'desc' => '宝贝衣服尺码',
  139. 'match' => 'option',
  140. 'update' => 'text',
  141. ),
  142. 'audit' => array
  143. (
  144. 'type' => 'tinyint-1',
  145. 'name' => '审核状态',
  146. 'default' => '2',
  147. 'desc' => '审核状态',
  148. 'match' => 'is_numeric',
  149. 'option' => $audit,
  150. 'update' => $col ? 'radio' : false,
  151. ),
  152. 'audit_desc' => array
  153. (
  154. 'type' => 'varchar-500',
  155. 'name' => '审核备注',
  156. 'default' => '',
  157. 'desc' => '审核备注',
  158. 'match' => 'option',
  159. 'update' => $col ? 'textarea' : false,
  160. ),
  161. 'audit_admin' => array
  162. (
  163. 'type' => 'int-11',
  164. 'name' => '审核人',
  165. 'default' => '',
  166. 'match' => 'is_numeric',
  167. 'desc' => '审核人',
  168. //'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  169. ),
  170. 'status' => array
  171. (
  172. 'type' => 'tinyint-1',
  173. 'name' => '状态',
  174. 'default' => '1',
  175. 'desc' => '状态',
  176. 'match' => 'is_numeric',
  177. 'option' => $status,
  178. 'search' => 'select',
  179. 'list' => true,
  180. //'search_after' => '<br />',
  181. //'mul' => true,
  182. //'mul_option' => array(2 => '批量审核'),
  183. ),
  184. 'reorder' => array
  185. (
  186. 'type' => 'int-11',
  187. 'name' => '排序-数值越大越靠前,相当于置顶',
  188. 'default' => '1',
  189. 'desc' => '请输入排序',
  190. 'match' => 'option',
  191. //'update' => 'text',
  192. 'search' => 'order',
  193. 'list' => true,
  194. 'order' => 'desc',
  195. 'edit' => true,
  196. ),
  197. 'state' => array
  198. (
  199. 'type' => 'tinyint-1',
  200. 'name' => '状态',
  201. 'default' => '1',
  202. 'desc' => '请选择状态',
  203. 'match' => 'is_numeric',
  204. ),
  205. 'cdate' => array
  206. (
  207. 'type' => 'int-11',
  208. 'name' => '录入时间',
  209. 'match' => array('is_numeric', time()),
  210. 'desc' => '',
  211. # 只有insert时才生效
  212. 'insert' => true,
  213. ),
  214. ),
  215. # 管理功能
  216. 'manage' => array
  217. (
  218. //'insert' => false,
  219. # 列表
  220. 'list_button' => array
  221. (
  222. //'edit' => array('预览', str_replace('https://api.', 'http://www.', Dever::url('main/preview.get?type=1'))),
  223. ),
  224. ),
  225. # request 请求接口定义
  226. 'request' => array
  227. (
  228. 'list_button' => array
  229. (
  230. 'list' => array('查看详情', '"up&page_type=1&baoming_id={id}"'),
  231. 'fast' => array('审核', '"baoming&where_id={id}&col=audit,audit_desc"', '{status} == 1'),
  232. 'fast1' => array('反审核', '"baoming&where_id={id}&col=audit,audit_desc"', '{status} == 3'),
  233. ),
  234. ),
  235. );