shop.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <?php
  2. $stock = array
  3. (
  4. 1 => '独立库存',
  5. 2 => '共享库存',
  6. );
  7. $shop = function()
  8. {
  9. $array = array();
  10. $data = Dever::load('scm_seller/shop-state');
  11. if($data)
  12. {
  13. $array += $data;
  14. }
  15. return $array;
  16. };
  17. $type = array
  18. (
  19. 1 => '实体店',
  20. 2 => '网店',
  21. 3 => '虚拟店',
  22. );
  23. $status = array
  24. (
  25. 1 => '启用',
  26. 2 => '禁用',
  27. );
  28. $set = Dever::input('set', 2);
  29. return array
  30. (
  31. # 表名
  32. 'name' => 'shop',
  33. # 显示给用户看的名称
  34. 'lang' => '经销商门店',
  35. # 是否显示在后台菜单
  36. 'order' => 10,
  37. 'menu' => false,
  38. 'check' => 'seller_id,code',
  39. 'status' => $status,
  40. # 数据结构
  41. 'struct' => array
  42. (
  43. 'id' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => 'ID',
  47. 'default' => '',
  48. 'desc' => '',
  49. 'match' => 'is_numeric',
  50. 'list' => true,
  51. 'order' => 'asc',
  52. ),
  53. 'seller_id' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '经销商ID',
  57. 'default' => '-1',
  58. 'desc' => '经销商ID',
  59. 'match' => 'is_numeric',
  60. 'update' => 'hidden',
  61. 'value' => Dever::input('search_option_seller_id'),
  62. ),
  63. 'name' => array
  64. (
  65. 'type' => 'varchar-150',
  66. 'name' => '门店名称',
  67. 'default' => '',
  68. 'desc' => '门店名称',
  69. 'match' => 'is_string',
  70. 'update' => 'text',
  71. 'search' => 'fulltext',
  72. 'list' => true,
  73. 'edit' => true,
  74. ),
  75. 'code' => array
  76. (
  77. 'type' => 'varchar-150',
  78. 'name' => '门店编码',
  79. 'default' => '',
  80. 'desc' => '门店编码',
  81. 'match' => 'is_string',
  82. 'update' => 'text',
  83. 'search' => 'fulltext',
  84. 'list' => true,
  85. ),
  86. 'type' => array
  87. (
  88. 'type' => 'tinyint-1',
  89. 'name' => '门店类型-实体店需要设置门店地址',
  90. 'default' => '2',
  91. 'desc' => '门店类型',
  92. 'match' => 'is_numeric',
  93. 'update' => 'radio',
  94. 'option' => $type,
  95. 'list' => true,
  96. 'control' => 'type',
  97. ),
  98. 'area' => array
  99. (
  100. 'type' => 'varchar-500',
  101. 'name' => '所在区县',
  102. 'default' => '',
  103. 'desc' => '所在区县',
  104. 'match' => 'is_string',
  105. 'search' => 'linkage',
  106. 'update' => $set == 1 ? 'linkage' : false,
  107. 'option' => Dever::url('api.get?level_total=3', 'area'),
  108. //'list' => 'Dever::load("area/api.string", "{area}")',
  109. 'show' => 'type=1',
  110. ),
  111. 'address' => array
  112. (
  113. 'type' => 'varchar-1000',
  114. 'name' => '详细地址',
  115. 'default' => '',
  116. 'desc' => '详细地址',
  117. 'match' => 'is_string',
  118. 'update' => $set == 1 ? 'text' : false,
  119. 'show' => 'type=1',
  120. ),
  121. 'truename' => array
  122. (
  123. 'type' => 'varchar-100',
  124. 'name' => '联系人姓名',
  125. 'default' => '',
  126. 'desc' => '请输入联系人姓名',
  127. 'match' => 'is_string',
  128. 'update' => $set == 1 ? 'text' : false,
  129. 'search' => 'fulltext',
  130. 'show' => 'type=1',
  131. ),
  132. 'tel' => array
  133. (
  134. 'type' => 'varchar-50',
  135. 'name' => '联系人电话',
  136. 'default' => '',
  137. 'desc' => '请输入联系人电话',
  138. 'match' => 'is_numeric',
  139. 'update' => $set == 1 ? 'text' : false,
  140. 'search' => 'fulltext',
  141. 'show' => 'type=1',
  142. ),
  143. 'stock' => array
  144. (
  145. 'type' => 'tinyint-1',
  146. 'name' => '库存设置-如果商品有库存,这里设置库存是否独立或共享,独立库存就是该门店自己使用一套库存,共享库存就是和其他门店共享一套库存,共享库存将无法设置商品',
  147. 'default' => '1',
  148. 'desc' => '库存设置',
  149. 'match' => 'is_numeric',
  150. 'update' => $set == 1 ? 'radio' : false,
  151. 'option' => $stock,
  152. 'control' => 'stock',
  153. 'tab' => 1,
  154. ),
  155. 'stock_shop' => array
  156. (
  157. 'type' => 'int-11',
  158. 'name' => '共享门店-选择和哪个门店共享一套库存',
  159. 'default' => '-1',
  160. 'desc' => '共享经销商',
  161. 'match' => 'is_numeric',
  162. 'update' => $set == 1 ? 'select' : false,
  163. 'option' => $shop,
  164. 'show' => 'stock=2',
  165. 'tab' => 1,
  166. ),
  167. 'company_license' => array
  168. (
  169. 'type' => 'varchar-150',
  170. 'name' => '营业执照',
  171. 'default' => '',
  172. 'desc' => '企业营业执照',
  173. 'match' => 'option',
  174. 'update' => 'image',
  175. 'key' => '8',
  176. 'place' => '660*660',
  177. 'tab' => 2,
  178. ),
  179. 'company_name' => array
  180. (
  181. 'type' => 'varchar-200',
  182. 'name' => '企业全称',
  183. 'default' => '',
  184. 'desc' => '企业全称',
  185. 'match' => 'option',
  186. 'update' => 'text',
  187. 'tab' => 2,
  188. ),
  189. 'company_number' => array
  190. (
  191. 'type' => 'varchar-200',
  192. 'name' => '社会信用代码',
  193. 'default' => '',
  194. 'desc' => '社会信用代码',
  195. 'match' => 'option',
  196. 'update' => 'text',
  197. 'tab' => 2,
  198. ),
  199. 'reorder' => array
  200. (
  201. 'type' => 'int-11',
  202. 'name' => '排序(数值越大越靠前)',
  203. 'default' => '1',
  204. 'desc' => '请输入排序',
  205. 'match' => 'option',
  206. //'update' => 'text',
  207. 'search' => 'order',
  208. 'list_name' => '排序',
  209. 'list' => true,
  210. 'order' => 'desc',
  211. 'edit' => true,
  212. ),
  213. 'status' => array
  214. (
  215. 'type' => 'tinyint-1',
  216. 'name' => '是否启用',
  217. 'default' => '1',
  218. 'desc' => '是否启用',
  219. 'match' => 'is_numeric',
  220. 'update' => 'radio',
  221. 'option' => $status,
  222. 'list' => true,
  223. 'edit' => true,
  224. ),
  225. 'state' => array
  226. (
  227. 'type' => 'tinyint-1',
  228. 'name' => '状态',
  229. 'default' => '1',
  230. 'desc' => '请选择状态',
  231. 'match' => 'is_numeric',
  232. ),
  233. 'cdate' => array
  234. (
  235. 'type' => 'int-11',
  236. 'name' => '录入时间',
  237. 'match' => array('is_numeric', time()),
  238. 'desc' => '',
  239. # 只有insert时才生效
  240. 'insert' => true,
  241. //'search' => 'date',
  242. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  243. ),
  244. ),
  245. 'manage' => array
  246. (
  247. 'tab' => array('基本信息', '商品设置', '门店认证'),
  248. 'delete' => false,
  249. ),
  250. 'request' => array
  251. (
  252. )
  253. );