store.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <?php
  2. $status = array
  3. (
  4. 1 => '启用',
  5. 2 => '禁用',
  6. );
  7. $type = array
  8. (
  9. 1 => '实体仓',
  10. 2 => '虚拟仓',
  11. );
  12. $set = Dever::input('set', 2);
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'store',
  17. # 显示给用户看的名称
  18. 'lang' => '配送商仓库',
  19. # 是否显示在后台菜单
  20. 'order' => 10,
  21. 'menu' => false,
  22. 'status' => $status,
  23. # 数据结构
  24. 'struct' => array
  25. (
  26. 'id' => array
  27. (
  28. 'type' => 'int-11',
  29. 'name' => 'ID',
  30. 'default' => '',
  31. 'desc' => '',
  32. 'match' => 'is_numeric',
  33. 'list' => true,
  34. 'order' => 'asc',
  35. ),
  36. 'servicer_id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '配送商ID',
  40. 'default' => '-1',
  41. 'desc' => '配送商ID',
  42. 'match' => 'is_numeric',
  43. 'update' => 'hidden',
  44. 'value' => Dever::input('search_option_servicer_id'),
  45. ),
  46. 'name' => array
  47. (
  48. 'type' => 'varchar-150',
  49. 'name' => '仓库名称',
  50. 'default' => '',
  51. 'desc' => '仓库名称',
  52. 'match' => 'is_string',
  53. 'update' => 'text',
  54. 'search' => 'fulltext',
  55. 'list' => true,
  56. 'edit' => true,
  57. ),
  58. 'code' => array
  59. (
  60. 'type' => 'varchar-150',
  61. 'name' => '仓库编码',
  62. 'default' => '',
  63. 'desc' => '仓库编码',
  64. 'match' => 'is_string',
  65. 'update' => 'text',
  66. 'search' => 'fulltext',
  67. 'list' => true,
  68. ),
  69. 'type' => array
  70. (
  71. 'type' => 'tinyint-1',
  72. 'name' => '门店类型-实体仓需要设置地址',
  73. 'default' => '2',
  74. 'desc' => '门店类型',
  75. 'match' => 'is_numeric',
  76. 'update' => 'radio',
  77. 'option' => $type,
  78. 'list' => true,
  79. 'control' => 'type',
  80. ),
  81. 'area' => array
  82. (
  83. 'type' => 'varchar-500',
  84. 'name' => '所在区县',
  85. 'default' => '',
  86. 'desc' => '所在区县',
  87. 'match' => 'is_string',
  88. 'search' => 'linkage',
  89. 'update' => $set == 1 ? 'linkage' : false,
  90. 'option' => Dever::url('api.get?level_total=3', 'area'),
  91. //'list' => 'Dever::load("area/api.string", "{area}")',
  92. 'show' => 'type=1',
  93. ),
  94. 'address' => array
  95. (
  96. 'type' => 'varchar-1000',
  97. 'name' => '详细地址',
  98. 'default' => '',
  99. 'desc' => '详细地址',
  100. 'match' => 'is_string',
  101. 'update' => $set == 1 ? 'text' : false,
  102. 'show' => 'type=1',
  103. ),
  104. 'truename' => array
  105. (
  106. 'type' => 'varchar-100',
  107. 'name' => '联系人姓名',
  108. 'default' => '',
  109. 'desc' => '请输入联系人姓名',
  110. 'match' => 'is_string',
  111. 'update' => $set == 1 ? 'text' : false,
  112. 'search' => 'fulltext',
  113. 'show' => 'type=1',
  114. ),
  115. 'tel' => array
  116. (
  117. 'type' => 'varchar-50',
  118. 'name' => '联系人电话',
  119. 'default' => '',
  120. 'desc' => '请输入联系人电话',
  121. 'match' => 'is_numeric',
  122. 'update' => $set == 1 ? 'text' : false,
  123. 'search' => 'fulltext',
  124. 'show' => 'type=1',
  125. ),
  126. 'reorder' => array
  127. (
  128. 'type' => 'int-11',
  129. 'name' => '排序(数值越大越靠前)',
  130. 'default' => '1',
  131. 'desc' => '请输入排序',
  132. 'match' => 'option',
  133. //'update' => 'text',
  134. 'search' => 'order',
  135. 'list_name' => '排序',
  136. 'list' => true,
  137. 'order' => 'desc',
  138. 'edit' => true,
  139. ),
  140. 'status' => array
  141. (
  142. 'type' => 'tinyint-1',
  143. 'name' => '是否启用',
  144. 'default' => '1',
  145. 'desc' => '是否启用',
  146. 'match' => 'is_numeric',
  147. 'update' => 'radio',
  148. 'option' => $status,
  149. 'list' => true,
  150. 'edit' => true,
  151. ),
  152. 'state' => array
  153. (
  154. 'type' => 'tinyint-1',
  155. 'name' => '状态',
  156. 'default' => '1',
  157. 'desc' => '请选择状态',
  158. 'match' => 'is_numeric',
  159. ),
  160. 'cdate' => array
  161. (
  162. 'type' => 'int-11',
  163. 'name' => '录入时间',
  164. 'match' => array('is_numeric', time()),
  165. 'desc' => '',
  166. # 只有insert时才生效
  167. 'insert' => true,
  168. //'search' => 'date',
  169. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  170. ),
  171. ),
  172. 'manage' => array
  173. (
  174. 'delete' => false,
  175. ),
  176. 'request' => array
  177. (
  178. )
  179. );