info_field.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php
  2. $type = array
  3. (
  4. 1 => '文本框',
  5. 2 => '下拉框',
  6. );
  7. $is_must = array
  8. (
  9. 1 => '必填项',
  10. 2 => '选填项',
  11. );
  12. $id = Dever::input('search_option_active_id');
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'info_field',
  17. # 显示给用户看的名称
  18. 'lang' => '字段设置',
  19. # 后台菜单排序
  20. 'order' => 2,
  21. 'menu' => false,
  22. # 数据结构
  23. 'struct' => array
  24. (
  25. 'id' => array
  26. (
  27. 'type' => 'int-11',
  28. 'name' => 'ID',
  29. 'default' => '',
  30. 'desc' => '',
  31. 'match' => 'is_numeric',
  32. 'search' => 'order',
  33. 'list' => true,
  34. 'order' => 'desc',
  35. ),
  36. 'active_id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '活动名称',
  40. 'default' => '-1',
  41. 'desc' => '活动名称',
  42. 'match' => 'is_string',
  43. 'value' => $id,
  44. 'update' => 'hidden',
  45. // 'search' => 'text',
  46. 'list' => "Dever::load('active/lib/manage.active#active_name',{active_id})",
  47. ),
  48. 'name' => array
  49. (
  50. 'type' => 'varchar-200',
  51. 'name' => '名称',
  52. 'default' => '',
  53. 'desc' => '名称',
  54. 'match' => 'is_string',
  55. 'update' => 'text',
  56. 'search' => 'fulltext',
  57. 'list' => true,
  58. ),
  59. 'is_must' => array
  60. (
  61. 'type' => 'tinyint-1',
  62. 'name' => '是否必填',
  63. 'default' => '1',
  64. 'desc' => '是否必填',
  65. 'match' => 'is_numeric',
  66. 'update' => 'radio',
  67. 'option' => $is_must,
  68. 'search' => 'select',
  69. 'list' => true,
  70. //'edit' => true,
  71. ),
  72. 'type' => array
  73. (
  74. 'type' => 'tinyint-1',
  75. 'name' => '类型',
  76. 'default' => '1',
  77. 'desc' => '类型',
  78. 'match' => 'is_numeric',
  79. 'update' => 'radio',
  80. 'option' => $type,
  81. 'search' => 'select',
  82. 'list' => true,
  83. 'control' => 'type',
  84. ),
  85. 'reorder' => array
  86. (
  87. 'type' => 'int-11',
  88. 'name' => '排序-数值越大越靠前',
  89. 'default' => '1',
  90. 'desc' => '请输入排序',
  91. 'match' => 'option',
  92. 'update' => 'text',
  93. 'search' => 'order',
  94. 'list' => true,
  95. 'order' => 'desc',
  96. 'edit' => true,
  97. ),
  98. 'state' => array
  99. (
  100. 'type' => 'tinyint-1',
  101. 'name' => '状态',
  102. 'default' => '1',
  103. 'desc' => '请选择状态',
  104. 'match' => 'is_numeric',
  105. ),
  106. 'cdate' => array
  107. (
  108. 'type' => 'int-11',
  109. 'name' => '创建时间',
  110. 'match' => array('is_numeric', time()),
  111. 'desc' => '',
  112. # 只有insert时才生效
  113. 'insert' => true,
  114. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  115. ),
  116. ),
  117. 'manage' => array
  118. (
  119. //'insert' => false,
  120. // 'delete' => false,
  121. // 'edit' => false,
  122. 'list_button' => array
  123. (
  124. 'list1' => array('属性值设置', '"info_field_value&project=active&search_option_field_id={id}&oper_table=info_field&oper_project=active&top_table=info&search_option_active_id={active_id}"' , '{type} > 1'),
  125. ),
  126. ),
  127. 'request' => array
  128. (
  129. 'getList' => array
  130. (
  131. # 匹配的正则或函数 选填项
  132. 'option' => array
  133. (
  134. 'active_id' => 'yes',
  135. 'state' => 1,
  136. ),
  137. 'type' => 'all',
  138. 'order' => array('reorder' => 'desc','type'=>'asc'),
  139. 'col' => 'id,name,type,is_must',
  140. ),
  141. ),
  142. );