category_attr_search.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'category_attr_search',
  6. # 显示给用户看的名称
  7. 'lang' => '搜索值设置',
  8. # 是否显示在后台菜单
  9. 'order' => 9,
  10. 'menu' => false,
  11. # 数据结构
  12. 'struct' => array
  13. (
  14. 'id' => array
  15. (
  16. 'type' => 'int-11',
  17. 'name' => 'ID',
  18. 'default' => '',
  19. 'desc' => '',
  20. 'match' => 'is_numeric',
  21. 'list' => true,
  22. ),
  23. 'category_id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '分类',
  27. 'default' => '-1',
  28. 'desc' => '分类',
  29. 'match' => 'is_numeric',
  30. 'update' => 'hidden',
  31. 'value' => Dever::input('search_option_category_id'),
  32. ),
  33. 'attr_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '属性id',
  37. 'default' => '1',
  38. 'desc' => '属性id',
  39. 'match' => 'is_numeric',
  40. 'update' => 'hidden',
  41. 'value' => Dever::input('search_option_attr_id'),
  42. ),
  43. 'name' => array
  44. (
  45. 'type' => 'varchar-1000',
  46. 'name' => '搜索名称-如设置为100万以下',
  47. 'default' => '',
  48. 'desc' => '搜索名称',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'search' => 'fulltext',
  52. 'list' => true,
  53. 'edit' => true,
  54. ),
  55. 'value' => array
  56. (
  57. 'type' => 'varchar-1000',
  58. 'name' => '搜索值-直接输入要搜索的值即可,也可以设置为公式,如{v}<=100,{v}为当前值,如果是区间输入框,则{s}为区间最小值,{e}为区间最大值',
  59. 'default' => '',
  60. 'desc' => '搜索值',
  61. 'match' => 'is_string',
  62. 'update' => 'textarea',
  63. 'search' => 'fulltext',
  64. 'list' => true,
  65. 'edit' => true,
  66. ),
  67. 'reorder' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '排序(数值越大越靠前)',
  71. 'default' => '1',
  72. 'desc' => '请输入排序',
  73. 'match' => 'option',
  74. //'update' => 'text',
  75. 'search' => 'order',
  76. 'list_name' => '排序',
  77. 'list' => true,
  78. 'order' => 'desc',
  79. 'edit' => true,
  80. ),
  81. 'state' => array
  82. (
  83. 'type' => 'tinyint-1',
  84. 'name' => '状态',
  85. 'default' => '1',
  86. 'desc' => '请选择状态',
  87. 'match' => 'is_numeric',
  88. ),
  89. 'cdate' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '录入时间',
  93. 'match' => array('is_numeric', time()),
  94. 'desc' => '',
  95. # 只有insert时才生效
  96. 'insert' => true,
  97. 'search' => 'date',
  98. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  99. ),
  100. ),
  101. 'manage' => array
  102. (
  103. 'lang' => 'name,value',
  104. 'insert' => false,
  105. 'edit' => false,
  106. 'button' => array
  107. (
  108. '新增' => array('fast'),
  109. ),
  110. # 列表
  111. 'list_button' => array
  112. (
  113. 'fast' => array('编辑'),
  114. ),
  115. ),
  116. 'request' => array
  117. (
  118. 'getData' => array
  119. (
  120. # 匹配的正则或函数 选填项
  121. 'option' => array
  122. (
  123. 'info_id' => 'yes',
  124. 'ids' => array('yes-id', 'in'),
  125. 'state' => 1,
  126. ),
  127. 'type' => 'all',
  128. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  129. 'col' => '*',
  130. ),
  131. )
  132. );