freight.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <?php
  2. $type = array
  3. (
  4. 1 => '数值',
  5. 2 => '百分比',
  6. );
  7. $pricing_type = array
  8. (
  9. 1 => '按件数',
  10. //2 => '按重量',
  11. //3 => '按体积',
  12. );
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'freight',
  17. # 显示给用户看的名称
  18. 'lang' => '运费设置',
  19. 'order' => 1,
  20. # 数据结构
  21. 'struct' => array
  22. (
  23. 'id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => 'ID',
  27. 'default' => '',
  28. 'desc' => '',
  29. 'match' => 'is_numeric',
  30. 'search' => 'order',
  31. //'list' => true,
  32. ),
  33. 'category' => array
  34. (
  35. 'type' => 'varchar-500',
  36. 'name' => '分类',
  37. 'default' => '',
  38. 'desc' => '分类',
  39. 'match' => 'is_string',
  40. 'search' => 'linkage',
  41. 'update' => 'linkage',
  42. 'option' => Dever::url('api.get', 'category'),
  43. 'list' => 'Dever::load("category/api.string", "{category}")',
  44. ),
  45. 'goods_area' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '商品所在地区-先按照省份计算',
  49. 'default' => '',
  50. 'desc' => '商品所在地区',
  51. 'match' => 'is_string',
  52. //'search' => 'linkage',
  53. 'update' => 'linkage',
  54. 'option' => Dever::url('api.get?level_total=1', 'area'),
  55. 'list' => 'Dever::load("area/api.string", "{goods_area}")',
  56. ),
  57. 'area' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '送达地区',
  61. 'default' => '',
  62. 'desc' => '送达地区',
  63. 'match' => 'is_string',
  64. 'search' => 'linkage',
  65. 'update' => 'linkage',
  66. 'option' => Dever::url('api.get?level_total=1', 'area'),
  67. 'list' => 'Dever::load("area/api.string", "{area}")',
  68. ),
  69. 'type' => array
  70. (
  71. 'type' => 'tinyint-1',
  72. 'name' => '运费类型',
  73. 'default' => '1',
  74. 'desc' => '运费类型',
  75. 'match' => 'option',
  76. 'update' => 'radio',
  77. 'option' => $type,
  78. //'list' => true,
  79. //'search' => 'select',
  80. ),
  81. 'pricing_type' => array
  82. (
  83. 'type' => 'tinyint-1',
  84. 'name' => '计价类型',
  85. 'default' => '1',
  86. 'desc' => '计价类型',
  87. 'match' => 'option',
  88. 'update' => 'radio',
  89. 'option' => $pricing_type,
  90. 'list' => true,
  91. 'search' => 'select',
  92. ),
  93. 'first_num' => array
  94. (
  95. 'type' => 'int-11',
  96. 'name' => '首件数量-如果计价类型是按重量,这里就是首件的重量,这里填写了2,就是满2件算首件',
  97. 'default' => '',
  98. 'desc' => '首件数量',
  99. 'match' => 'is_numeric',
  100. 'update' => 'text',
  101. 'list' => true,
  102. ),
  103. 'first_price' => array
  104. (
  105. 'type' => 'varchar-100',
  106. 'name' => '首件价格-如果是百分比类型,这里如果填的是10,那就是总价的10%',
  107. 'default' => '',
  108. 'desc' => '运费价格',
  109. 'match' => 'is_string',
  110. 'update' => 'text',
  111. 'list' => true,
  112. ),
  113. 'next_num' => array
  114. (
  115. 'type' => 'int-11',
  116. 'name' => '续件数量-如果计价类型是按重量,这里就是续件的重量',
  117. 'default' => '',
  118. 'desc' => '续件数量',
  119. 'match' => 'is_numeric',
  120. 'update' => 'text',
  121. 'list' => true,
  122. ),
  123. 'next_price' => array
  124. (
  125. 'type' => 'varchar-100',
  126. 'name' => '续件价格-如果是百分比类型,这里如果填的是10,那就是总价的10%',
  127. 'default' => '',
  128. 'desc' => '续件价格',
  129. 'match' => 'is_string',
  130. 'update' => 'text',
  131. 'list' => true,
  132. ),
  133. 'free' => array
  134. (
  135. 'type' => 'varchar-100',
  136. 'name' => '总价满多少减免运费',
  137. 'default' => '',
  138. 'desc' => '满多少减免运费',
  139. 'match' => 'is_string',
  140. //'update' => 'text',
  141. //'list' => true,
  142. ),
  143. 'state' => array
  144. (
  145. 'type' => 'tinyint-1',
  146. 'name' => '状态',
  147. 'default' => '1',
  148. 'desc' => '请选择状态',
  149. 'match' => 'is_numeric',
  150. ),
  151. 'cdate' => array
  152. (
  153. 'type' => 'int-11',
  154. 'name' => '录入时间',
  155. 'match' => array('is_numeric', DEVER_TIME),
  156. 'desc' => '',
  157. # 只有insert时才生效
  158. 'insert' => true,
  159. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  160. ),
  161. ),
  162. 'manage' => array
  163. (
  164. //'delete' => false,
  165. //'edit' => false,
  166. //'insert' => false,
  167. ),
  168. 'request' => array
  169. (
  170. )
  171. );