seller_goods.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?php
  2. $status = Dever::config('base')->status;
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'seller_goods',
  7. # 显示给用户看的名称
  8. 'lang' => '销售商商品列表',
  9. 'order' => 10,
  10. 'menu' => false,
  11. /*
  12. 'end' => array
  13. (
  14. 'insert' => 'role/lib/seller.goodsUpdate',
  15. 'update' => 'role/lib/seller.goodsUpdate',
  16. ),
  17. */
  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. 'search' => 'order',
  29. 'update' => 'hidden',
  30. //'list' => true,
  31. ),
  32. 'seller_id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '所属销售商',
  36. 'default' => '',
  37. 'desc' => '所属销售商',
  38. 'match' => 'is_numeric',
  39. 'update' => 'hidden',
  40. 'search' => 'hidden',
  41. 'value' => Dever::input('search_option_seller_id'),
  42. 'list' => 'Dever::load("role/seller-one#name", {seller_id})',
  43. ),
  44. 'goods_id' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '商品名称',
  48. 'default' => '',
  49. 'desc' => '商品名称',
  50. 'match' => 'is_numeric',
  51. 'update' => 'select',
  52. 'update_search' => 'product/lib/manage.search',
  53. 'list' => 'Dever::load("product/info-one#name", {goods_id})',
  54. ),
  55. 'state' => array
  56. (
  57. 'type' => 'tinyint-1',
  58. 'name' => '状态',
  59. 'default' => '1',
  60. 'desc' => '请选择状态',
  61. 'match' => 'is_numeric',
  62. ),
  63. 'cdate' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => '创建时间',
  67. 'match' => array('is_numeric', time()),
  68. 'desc' => '',
  69. # 只有insert时才生效
  70. //'insert' => true,
  71. //'search' => 'date',
  72. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  73. ),
  74. ),
  75. 'manage' => array
  76. (
  77. 'insert' => false,
  78. 'edit' => false,
  79. 'delete' => false,
  80. ),
  81. 'request' => array
  82. (
  83. 'getData' => array
  84. (
  85. # 匹配的正则或函数 选填项
  86. 'option' => array
  87. (
  88. 'seller_id' => array('yes-t_1.seller_id'),
  89. 'sell_type' => array('yes-t_2.sell_type'),
  90. 'name' => array('yes-t_2.name', 'like'),
  91. 'category' => array('yes-t_2.category', 'like'),
  92. 'top_category_id' => array('yes-t_2.top_category_id'),
  93. 'second_category_id' => array('yes-t_2.second_category_id'),
  94. 'category_id' => array('yes-t_2.category_id'),
  95. 'status' => 'yes-t_2.status-1',
  96. 'state' => 'yes-t_2.state-1',
  97. 'state_1' => 'yes-t_1.state-1',
  98. ),
  99. # 联表
  100. 'join' => array
  101. (
  102. array
  103. (
  104. 'table' => 'product/info',
  105. 'type' => 'left join',
  106. 'on' => array('goods_id','id'),
  107. 'col' => 'goods_id',
  108. ),
  109. ),
  110. 'type' => 'all',
  111. 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
  112. 'col' => '*,t_2.*',
  113. ),
  114. 'getDataPage' => array
  115. (
  116. # 匹配的正则或函数 选填项
  117. 'option' => array
  118. (
  119. 'seller_id' => array('yes-t_1.seller_id'),
  120. 'sell_type' => array('yes-t_2.sell_type'),
  121. 'name' => array('yes-t_2.name', 'like'),
  122. 'category' => array('yes-t_2.category', 'like'),
  123. 'top_category_id' => array('yes-t_2.top_category_id'),
  124. 'second_category_id' => array('yes-t_2.second_category_id'),
  125. 'category_id' => array('yes-t_2.category_id'),
  126. 'status' => 'yes-t_2.status-1',
  127. 'state' => 'yes-t_2.state-1',
  128. 'state_1' => 'yes-t_1.state-1',
  129. ),
  130. # 联表
  131. 'join' => array
  132. (
  133. array
  134. (
  135. 'table' => 'product/info',
  136. 'type' => 'left join',
  137. 'on' => array('goods_id','id'),
  138. 'col' => 'goods_id',
  139. ),
  140. ),
  141. 'type' => 'all',
  142. 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
  143. 'page' => array(10, 'list'),
  144. 'col' => '*,t_2.*',
  145. ),
  146. ),
  147. );