servicer_store_goods.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'servicer_store_goods',
  6. # 显示给用户看的名称
  7. 'lang' => '仓库商品列表',
  8. 'order' => 10,
  9. 'menu' => false,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. 'update' => 'hidden',
  22. //'list' => true,
  23. ),
  24. 'servicer_store_id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => '所属配送商',
  28. 'default' => '',
  29. 'desc' => '所属配送商',
  30. 'match' => 'is_numeric',
  31. 'update' => 'hidden',
  32. 'search' => 'hidden',
  33. 'value' => Dever::input('search_option_servicer_store_id'),
  34. 'list' => 'Dever::load("scm_role/servicer_store-one#name", {servicer_store_id})',
  35. ),
  36. 'goods_id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '商品名称',
  40. 'default' => '',
  41. 'desc' => '商品名称',
  42. 'match' => 'is_numeric',
  43. 'update' => 'select',
  44. 'update_search' => 'scm_product/lib/manage.search',
  45. 'list' => 'Dever::load("scm_product/info-one#name", {goods_id})',
  46. ),
  47. 'state' => array
  48. (
  49. 'type' => 'tinyint-1',
  50. 'name' => '状态',
  51. 'default' => '1',
  52. 'desc' => '请选择状态',
  53. 'match' => 'is_numeric',
  54. ),
  55. 'cdate' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '创建时间',
  59. 'match' => array('is_numeric', time()),
  60. 'desc' => '',
  61. # 只有insert时才生效
  62. 'insert' => true,
  63. 'search' => 'date',
  64. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  65. ),
  66. ),
  67. 'manage' => array
  68. (
  69. 'insert' => false,
  70. 'edit' => false,
  71. 'delete' => false,
  72. ),
  73. 'request' => array
  74. (
  75. 'getData' => array
  76. (
  77. # 匹配的正则或函数 选填项
  78. 'option' => array
  79. (
  80. 'seller_id' => array('yes-t_1.seller_id'),
  81. 'sell_type' => array('yes-t_2.sell_type'),
  82. 'name' => array('yes-t_2.name', 'like'),
  83. 'category' => array('yes-t_2.category', 'like'),
  84. 'top_category_id' => array('yes-t_2.top_category_id'),
  85. 'second_category_id' => array('yes-t_2.second_category_id'),
  86. 'category_id' => array('yes-t_2.category_id'),
  87. 'status' => 'yes-t_2.status-1',
  88. 'state' => 'yes-t_2.state-1',
  89. 'state_1' => 'yes-t_1.state-1',
  90. ),
  91. # 联表
  92. 'join' => array
  93. (
  94. array
  95. (
  96. 'table' => 'scm_product/info',
  97. 'type' => 'left join',
  98. 'on' => array('goods_id','id'),
  99. 'col' => 'goods_id',
  100. ),
  101. ),
  102. 'type' => 'all',
  103. 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
  104. 'col' => 'id,name,category,pic,content,video,type,unit,spec_type,goods,commission,pay_money,money_id,score_id,sell_type,buy_type,udate,cdate',
  105. ),
  106. 'getDataPage' => array
  107. (
  108. # 匹配的正则或函数 选填项
  109. 'option' => array
  110. (
  111. 'seller_id' => array('yes-t_1.seller_id'),
  112. 'sell_type' => array('yes-t_2.sell_type'),
  113. 'name' => array('yes-t_2.name', 'like'),
  114. 'category' => array('yes-t_2.category', 'like'),
  115. 'top_category_id' => array('yes-t_2.top_category_id'),
  116. 'second_category_id' => array('yes-t_2.second_category_id'),
  117. 'category_id' => array('yes-t_2.category_id'),
  118. 'status' => 'yes-t_2.status-1',
  119. 'state' => 'yes-t_2.state-1',
  120. 'state_1' => 'yes-t_1.state-1',
  121. ),
  122. # 联表
  123. 'join' => array
  124. (
  125. array
  126. (
  127. 'table' => 'scm_product/info',
  128. 'type' => 'left join',
  129. 'on' => array('goods_id','id'),
  130. 'col' => 'goods_id',
  131. ),
  132. ),
  133. 'type' => 'all',
  134. 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
  135. 'page' => array(10, 'list'),
  136. 'col' => 'id,name,category,pic,content,video,type,unit,spec_type,goods,commission,pay_money,money_id,score_id,sell_type,buy_type,udate,t_1.cdate,t_1.id as id',
  137. ),
  138. ),
  139. );