unit_cate.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'unit_cate',
  6. # 显示给用户看的名称
  7. 'lang' => '单位自定义类别',
  8. # 是否显示在后台菜单
  9. 'order' => 10,
  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. 'order' => 'asc',
  23. ),
  24. 'name' => array
  25. (
  26. 'type' => 'varchar-150',
  27. 'name' => '类别名称',
  28. 'default' => '',
  29. 'desc' => '类别名称',
  30. 'match' => 'is_string',
  31. 'update' => 'text',
  32. 'search' => 'fulltext',
  33. 'list' => true,
  34. 'edit' => true,
  35. ),
  36. 'reorder' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '排序(数值越大越靠前)',
  40. 'default' => '1',
  41. 'desc' => '请输入排序',
  42. 'match' => 'option',
  43. //'update' => 'text',
  44. 'search' => 'order',
  45. 'list_name' => '排序',
  46. 'list' => true,
  47. 'order' => 'desc',
  48. 'edit' => true,
  49. ),
  50. 'state' => array
  51. (
  52. 'type' => 'tinyint-1',
  53. 'name' => '状态',
  54. 'default' => '1',
  55. 'desc' => '请选择状态',
  56. 'match' => 'is_numeric',
  57. ),
  58. 'cdate' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '录入时间',
  62. 'match' => array('is_numeric', time()),
  63. 'desc' => '',
  64. # 只有insert时才生效
  65. 'insert' => true,
  66. //'search' => 'date',
  67. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  68. ),
  69. ),
  70. 'manage' => array
  71. (
  72. 'insert' => false,
  73. 'edit' => false,
  74. # 自定义快捷新增和编辑
  75. 'button' => array
  76. (
  77. '新增' => array('fast'),
  78. ),
  79. 'list_button' => array
  80. (
  81. 'edit' => array('编辑'),
  82. )
  83. ),
  84. 'default' => array
  85. (
  86. 'col' => 'name,reorder,state,cdate',
  87. 'value' => array
  88. (
  89. '"采购单位",900,1,' . DEVER_TIME,
  90. '"订货单位",800,1,' . DEVER_TIME,
  91. '"成本单位",700,1,' . DEVER_TIME,
  92. ),
  93. ),
  94. 'request' => array
  95. (
  96. 'getAll' => array
  97. (
  98. # 匹配的正则或函数 选填项
  99. 'option' => array
  100. (
  101. 'type' => 'yes',
  102. 'state' => 1,
  103. ),
  104. 'type' => 'all',
  105. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  106. 'col' => 'id,id as value, name',
  107. ),
  108. )
  109. );