info.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php
  2. return array
  3. (
  4. 'list' => array
  5. (
  6. 'field' => array
  7. (
  8. 'sort' => array
  9. (
  10. 'type' => 'input',
  11. ),
  12. 'name' => array
  13. (
  14. //'tip' => false,
  15. ),
  16. 'cate' => array
  17. (
  18. 'show' => 'Dever::call("content/cate.getInfo", array("goods", "{cate}"))',
  19. ),
  20. 'status' => array
  21. (
  22. 'type' => 'switch',
  23. 'show' => '{status}',
  24. 'active_value' => 1,
  25. 'inactive_value' => 2,
  26. ),
  27. 'cdate',
  28. ),
  29. 'button' => array
  30. (
  31. '新增' => array('add'),
  32. ),
  33. 'data_button' => array
  34. (
  35. '编辑' => 'edit',
  36. ),
  37. 'search' => array
  38. (
  39. 'name' => 'like',
  40. 'cate' => array
  41. (
  42. 'type' => 'cascader',
  43. 'option' => 'Dever::call("content/cate.getList", array("goods"))',
  44. ),
  45. 'cdate' => array
  46. (
  47. 'name' => '创建时间',
  48. 'type' => 'date',
  49. 'date_type' => 'datetimerange',
  50. 'value_format' => 'YYYY-MM-DD HH:mm:ss',
  51. 'start_placeholder' => '开始日期',
  52. 'end_placeholder' => '结束日期',
  53. 'range_separator' => '至',
  54. ),
  55. 'status',
  56. ),
  57. ),
  58. 'update' => array
  59. (
  60. 'end' => 'content/cate.update',
  61. 'control' => array
  62. (
  63. 'goods/sku' => array
  64. (
  65. 'spec_type' => 2,
  66. ),
  67. 'goods/sku#' => array
  68. (
  69. 'spec_type' => 3,
  70. ),
  71. ),
  72. 'tab' => array
  73. (
  74. '基本信息' => 'name,cate,pic,info,content',
  75. '规格设置' => 'spec_type,goods/sku,goods/sku#',
  76. ),
  77. //'desc' => '原创声明:',
  78. 'field' => array
  79. (
  80. 'name' => array
  81. (
  82. 'rules' => true,
  83. ),
  84. 'cate' => array
  85. (
  86. 'rules' => true,
  87. 'type' => 'cascader',
  88. 'option' => 'Dever::call("content/cate.getList", array("goods"))',
  89. ),
  90. 'pic' => array
  91. (
  92. 'type' => 'upload',
  93. 'upload' => '1',
  94. 'multiple' => true,
  95. 'style' => 'pic',
  96. ),
  97. 'info' => array
  98. (
  99. 'type' => 'textarea',
  100. //'rows' => 4,
  101. 'autosize' => array('minRows' => 4),
  102. ),
  103. 'content' => array
  104. (
  105. 'type' => 'editor',
  106. 'editorMenu' => array
  107. (
  108. 'uploadImage' => 1,
  109. 'uploadVideo' => 3,
  110. ),
  111. ),
  112. 'spec_type' => array
  113. (
  114. 'type' => 'radio',
  115. 'control' => true,
  116. ),
  117. 'goods/sku' => array
  118. (
  119. 'name' => '单规格设置',
  120. 'where' => array('info_id' => 'id', 'key' => '-1'),
  121. # 默认值,如果有默认值则无法添加和删除
  122. 'default' => array
  123. (
  124. # 默认值
  125. array
  126. (
  127. 'key' => '-1',
  128. 'code' => '',
  129. 'm_price' => '',
  130. 'price' => '',
  131. ),
  132. ),
  133. 'desc' => '如需设置商品库存,请到“商品库存”中设置,不设置库存则商品无库存',
  134. ),
  135. 'goods/sku#' => array
  136. (
  137. 'name' => '多规格设置',
  138. 'where' => array('info_id' => 'id', 'key' => array('!=', '-1')),
  139. 'type' => 'sku',
  140. # 设置规格表名
  141. 'spec' => 'goods/spec',
  142. # 设置规格表关联字段
  143. 'spec_field' => 'info_id',
  144. # 获取规格数据的接口
  145. 'spec_data' => 'api/spec.manage',
  146. 'desc' => '如需设置商品库存,请到“商品库存”中设置,不设置库存则商品无库存',
  147. ),
  148. ),
  149. ),
  150. );