service_product.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?php
  2. $identity = array
  3. (
  4. 1 => '个人',
  5. 2 => '个体户',
  6. 3 => '企业',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'service_product',
  12. # 显示给用户看的名称
  13. 'lang' => '产品管理',
  14. # 是否显示在后台菜单
  15. 'order' => -10,
  16. 'menu' => false,
  17. 'check' => 'key',
  18. # 数据结构
  19. 'struct' => array
  20. (
  21. 'id' => array
  22. (
  23. 'type' => 'int-11',
  24. 'name' => 'ID',
  25. 'default' => '',
  26. 'desc' => '',
  27. 'match' => 'is_numeric',
  28. 'list' => true,
  29. 'order' => 'desc',
  30. ),
  31. 'service_id' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => '业务id',
  35. 'default' => '1',
  36. 'desc' => '业务id',
  37. 'match' => 'is_numeric',
  38. 'update' => 'hidden',
  39. 'value' => Dever::input('search_option_service_id'),
  40. ),
  41. 'name' => array
  42. (
  43. 'type' => 'varchar-150',
  44. 'name' => '产品名称',
  45. 'default' => '',
  46. 'desc' => '产品名称',
  47. 'match' => 'is_string',
  48. 'update' => 'text',
  49. 'search' => 'fulltext',
  50. 'list' => true,
  51. ),
  52. 'key' => array
  53. (
  54. 'type' => 'varchar-150',
  55. 'name' => '产品标识',
  56. 'default' => '',
  57. 'desc' => '产品标识',
  58. 'match' => 'is_string',
  59. 'update' => 'text',
  60. 'search' => 'fulltext',
  61. 'list' => true,
  62. ),
  63. 'value' => array
  64. (
  65. 'type' => 'varchar-150',
  66. 'name' => '产品值',
  67. 'default' => '',
  68. 'desc' => '产品值',
  69. 'match' => 'is_string',
  70. 'update' => 'text',
  71. 'search' => 'fulltext',
  72. 'list' => true,
  73. ),
  74. 'middleware-service_product_col'=> array
  75. (
  76. 'name' => '字段设置',
  77. 'default' => '',
  78. 'desc' => '字段设置',
  79. 'match' => 'option',
  80. # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
  81. 'sync' => array('id', 'product_id'),
  82. 'update' => array(1),
  83. ),
  84. 'reorder' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => '排序(数值越大越靠前)',
  88. 'default' => '1',
  89. 'desc' => '请输入排序',
  90. 'match' => 'option',
  91. //'update' => 'text',
  92. 'search' => 'order',
  93. 'list_name' => '排序',
  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. //'search' => 'date',
  115. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  116. ),
  117. ),
  118. 'manage' => array
  119. (
  120. //'insert' => false,
  121. //'edit' => false,
  122. # 自定义快捷新增和编辑
  123. 'button' => array
  124. (
  125. //'新增' => array('fast'),
  126. ),
  127. 'list_button' => array
  128. (
  129. //'edit' => array('编辑'),
  130. //'list' => array('字段列表', 'service_product_col&oper_table=service_product&top_table=service&search_option_product_id={id}'),
  131. )
  132. ),
  133. 'request' => array
  134. (
  135. )
  136. );