info.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. <?php
  2. $type = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('scm_seller/type-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $category = function()
  13. {
  14. $array = array();
  15. $data = Dever::load('scm_product/category-getTop');
  16. if($data)
  17. {
  18. $array += $data;
  19. }
  20. return $array;
  21. };
  22. $price = function()
  23. {
  24. $array = array
  25. (
  26. -1 => '默认模板',
  27. );
  28. $data = Dever::load('scm_product/price-state');
  29. if($data)
  30. {
  31. $array += $data;
  32. }
  33. return $array;
  34. };
  35. $func = array
  36. (
  37. 'base' => '基础运营',
  38. 'news' => '文章资讯',
  39. 'agent' => '分销代理',
  40. 'product' => '平台商品',
  41. 'resource' => '平台资源',
  42. 'self_product' => '自营商品',
  43. 'self_resource' => '自营资源',
  44. 'yuding' => '场地预定',
  45. );
  46. $identity = array
  47. (
  48. 1 => '个人',
  49. 2 => '个体户',
  50. 3 => '企业',
  51. );
  52. $status = array
  53. (
  54. 1 => '启用',
  55. 2 => '禁用',
  56. );
  57. $account = function() {
  58. return Dever::load('account/api')->getConfig('scm_seller/info');
  59. };
  60. return array
  61. (
  62. # 表名
  63. 'name' => 'info',
  64. # 显示给用户看的名称
  65. 'lang' => '经销商列表',
  66. # 是否显示在后台菜单
  67. 'order' => 100,
  68. 'check' => 'code',
  69. # 数据结构
  70. 'struct' => array
  71. (
  72. 'id' => array
  73. (
  74. 'type' => 'int-11',
  75. 'name' => '经销商ID',
  76. 'default' => '',
  77. 'desc' => '',
  78. 'match' => 'is_numeric',
  79. //'list' => true,
  80. 'order' => 'asc',
  81. ),
  82. 'name' => array
  83. (
  84. 'type' => 'varchar-150',
  85. 'name' => '经销商名称',
  86. 'default' => '',
  87. 'desc' => '经销商名称',
  88. 'match' => 'is_string',
  89. 'update' => 'text',
  90. 'search' => 'fulltext',
  91. 'list' => true,
  92. 'edit' => true,
  93. ),
  94. 'code' => array
  95. (
  96. 'type' => 'varchar-150',
  97. 'name' => '经销商编码',
  98. 'default' => '',
  99. 'desc' => '经销商编码',
  100. 'match' => 'is_string',
  101. 'update' => 'text',
  102. 'search' => 'fulltext',
  103. 'list' => true,
  104. ),
  105. 'info' => array
  106. (
  107. 'type' => 'varchar-800',
  108. 'name' => '经销商介绍',
  109. 'default' => '',
  110. 'desc' => '经销商介绍',
  111. 'match' => 'option',
  112. 'update' => 'textarea',
  113. ),
  114. 'type_id' => array
  115. (
  116. 'type' => 'int-11',
  117. 'name' => '经销商类型',
  118. 'default' => '1',
  119. 'desc' => '经销商类型',
  120. 'match' => 'is_numeric',
  121. 'update' => 'radio',
  122. 'option' => $type,
  123. //'list' => true,
  124. ),
  125. 'scm_seller-shop'=> array
  126. (
  127. 'name' => '门店设置',
  128. 'default' => '',
  129. 'desc' => '门店设置',
  130. 'match' => 'option',
  131. # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
  132. 'sync' => array('id', 'seller_id'),
  133. 'update' => array(1),
  134. # 1纵向展示 2横向展示
  135. 'update_type' => 2,
  136. 'list_name' => '门店列表',
  137. 'list' => 'Dever::load("scm_seller/lib/manage.getShop", {id})',
  138. ),
  139. 'account' => array
  140. (
  141. 'type' => 'varchar-800',
  142. 'name' => '资金账户-可以选择多个资金账户,账户余额可用于提现和分销',
  143. 'default' => '',
  144. 'desc' => '资金账户',
  145. 'match' => 'is_string',
  146. 'update' => 'checkbox',
  147. 'option' => $account,
  148. 'tab' => 1,
  149. //'list_name' => '账户信息',
  150. //'list' => 'Dever::load("account/api.getInfo", {id}, "{account}")',
  151. ),
  152. 'func' => array
  153. (
  154. 'type' => 'varchar-2000',
  155. 'name' => '基础功能',
  156. 'default' => 'base',
  157. 'desc' => '基础功能',
  158. 'match' => 'is_string',
  159. 'update' => 'checkbox',
  160. 'option' => $func,
  161. 'tab' => 1,
  162. 'control' => 'func',
  163. ),
  164. 'category' => array
  165. (
  166. 'type' => 'varchar-2000',
  167. 'name' => '平台商品属性分类-如不选择就是可以销售所有商品属性分类下的商品',
  168. 'default' => '',
  169. 'desc' => '商品属性分类',
  170. 'match' => 'is_string',
  171. 'update' => 'checkbox',
  172. 'option' => $category,
  173. 'tab' => 1,
  174. 'show' => 'func=product',
  175. ),
  176. 'price_id' => array
  177. (
  178. 'type' => 'int-11',
  179. 'name' => '平台商品价格模板',
  180. 'default' => '-1',
  181. 'desc' => '平台商品价格模板',
  182. 'match' => 'is_numeric',
  183. 'update' => 'select',
  184. 'option' => $price,
  185. 'tab' => 1,
  186. 'show' => 'func=product',
  187. ),
  188. 'commission' => array
  189. (
  190. 'type' => 'varchar-20',
  191. 'name' => '销售佣金调整-针对每个商品的销售佣金做统一调整,如填写5%,就是在原有销售佣金的基础上增加5%佣金,设置为0则不做任何调整,设置为no,则佣金为0',
  192. 'default' => '0',
  193. 'desc' => '销售佣金调整',
  194. 'match' => 'option',
  195. 'update' => 'text',
  196. 'tab' => 1,
  197. 'show' => 'func=agent',
  198. ),
  199. 'truename' => array
  200. (
  201. 'type' => 'varchar-100',
  202. 'name' => '联系人姓名',
  203. 'default' => '',
  204. 'desc' => '请输入联系人姓名',
  205. 'match' => 'is_string',
  206. 'update' => 'text',
  207. 'search' => 'fulltext',
  208. 'tab' => 2,
  209. ),
  210. 'mobile' => array
  211. (
  212. 'type' => 'bigint-11',
  213. 'name' => '联系人电话',
  214. 'default' => '',
  215. 'desc' => '请输入联系人电话',
  216. 'match' => 'is_numeric',
  217. 'update' => 'text',
  218. 'search' => 'fulltext',
  219. 'tab' => 2,
  220. ),
  221. 'area' => array
  222. (
  223. 'type' => 'varchar-500',
  224. 'name' => '联系人所在区县',
  225. 'default' => '',
  226. 'desc' => '联系人所在区县',
  227. 'match' => 'option',
  228. 'search' => 'linkage',
  229. 'update' => 'linkage',
  230. 'option' => Dever::url('api.get?level_total=3', 'area'),
  231. //'list' => 'Dever::load("area/api.string", "{area}")',
  232. 'tab' => 2,
  233. ),
  234. 'province' => array
  235. (
  236. 'type' => 'int-11',
  237. 'name' => '省份',
  238. 'default' => '',
  239. 'desc' => '省份',
  240. 'match' => 'option',
  241. //'update' => 'text',
  242. 'tab' => 2,
  243. ),
  244. 'city' => array
  245. (
  246. 'type' => 'int-11',
  247. 'name' => '城市',
  248. 'default' => '',
  249. 'desc' => '城市',
  250. 'match' => 'option',
  251. //'update' => 'text',
  252. 'tab' => 2,
  253. ),
  254. 'county' => array
  255. (
  256. 'type' => 'int-11',
  257. 'name' => '县区',
  258. 'default' => '',
  259. 'desc' => '县区',
  260. 'match' => 'option',
  261. //'update' => 'text',
  262. 'tab' => 2,
  263. ),
  264. 'address' => array
  265. (
  266. 'type' => 'varchar-1000',
  267. 'name' => '联系人详细地址',
  268. 'default' => '',
  269. 'desc' => '联系人详细地址',
  270. 'match' => 'option',
  271. 'update' => 'text',
  272. //'list' => true,
  273. 'tab' => 2,
  274. ),
  275. 'identity' => array
  276. (
  277. 'type' => 'tinyint-1',
  278. 'name' => '经销商身份',
  279. 'default' => '1',
  280. 'desc' => '经销商身份',
  281. 'match' => 'is_numeric',
  282. 'update' => 'radio',
  283. 'option' => $identity,
  284. 'control' => 'identity',
  285. 'tab' => 3,
  286. ),
  287. 'idcard_front' => array
  288. (
  289. 'type' => 'varchar-150',
  290. 'name' => '身份证正面-如果是个人,这里上传联系人身份证,如果是个体户或者企业,这里上传法人身份证',
  291. 'default' => '',
  292. 'desc' => '身份证正面',
  293. 'match' => 'option',
  294. 'update' => 'image',
  295. 'key' => '8',
  296. 'place' => '660*660',
  297. 'tab' => 3,
  298. ),
  299. 'idcard_back' => array
  300. (
  301. 'type' => 'varchar-150',
  302. 'name' => '身份证背面-如果是个人,这里上传联系人身份证,如果是个体户或者企业,这里上传法人身份证',
  303. 'default' => '',
  304. 'desc' => '身份证背面',
  305. 'match' => 'option',
  306. 'update' => 'image',
  307. 'key' => '8',
  308. 'place' => '660*660',
  309. 'tab' => 3,
  310. ),
  311. 'company_license' => array
  312. (
  313. 'type' => 'varchar-150',
  314. 'name' => '营业执照',
  315. 'default' => '',
  316. 'desc' => '企业营业执照',
  317. 'match' => 'option',
  318. 'update' => 'image',
  319. 'key' => '8',
  320. 'place' => '660*660',
  321. 'show' => 'identity=2,3',
  322. 'tab' => 3,
  323. ),
  324. 'company_name' => array
  325. (
  326. 'type' => 'varchar-200',
  327. 'name' => '企业全称',
  328. 'default' => '',
  329. 'desc' => '企业全称',
  330. 'match' => 'option',
  331. //'update' => 'text',
  332. 'show' => 'identity=2,3',
  333. 'tab' => 3,
  334. ),
  335. 'company_number' => array
  336. (
  337. 'type' => 'varchar-200',
  338. 'name' => '社会信用代码',
  339. 'default' => '',
  340. 'desc' => '社会信用代码',
  341. 'match' => 'option',
  342. //'update' => 'text',
  343. 'show' => 'identity=2,3',
  344. 'tab' => 3,
  345. ),
  346. 'reorder' => array
  347. (
  348. 'type' => 'int-11',
  349. 'name' => '排序(数值越大越靠前)',
  350. 'default' => '1',
  351. 'desc' => '请输入排序',
  352. 'match' => 'option',
  353. //'update' => 'text',
  354. 'search' => 'order',
  355. 'list_name' => '排序',
  356. 'list' => true,
  357. 'order' => 'desc',
  358. 'edit' => true,
  359. ),
  360. 'status' => array
  361. (
  362. 'type' => 'int-11',
  363. 'name' => '状态',
  364. 'default' => '1',
  365. 'desc' => '状态',
  366. 'match' => 'is_numeric',
  367. //'update' => 'select',
  368. 'option' => $status,
  369. 'search' => 'select',
  370. 'list' => true,
  371. 'edit' => true,
  372. ),
  373. 'state' => array
  374. (
  375. 'type' => 'tinyint-1',
  376. 'name' => '状态',
  377. 'default' => '1',
  378. 'desc' => '请选择状态',
  379. 'match' => 'is_numeric',
  380. ),
  381. 'cdate' => array
  382. (
  383. 'type' => 'int-11',
  384. 'name' => '录入时间',
  385. 'match' => array('is_numeric', time()),
  386. 'desc' => '',
  387. # 只有insert时才生效
  388. 'insert' => true,
  389. //'search' => 'date',
  390. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  391. ),
  392. ),
  393. 'manage' => array
  394. (
  395. 'delete' => false,
  396. 'tab' => array('基本设置', '功能设置', '联系人信息', '认证信息'),
  397. 'button' => array
  398. (
  399. //'类型配置' => array('list', 'type&oper_parent=seller'),
  400. ),
  401. 'list_button' => array
  402. (
  403. 'br1' => array('<br />'),
  404. 'location' => array('分配供应商', Dever::url('lib/set.home?role=seller', 'scm_supplier')),
  405. 'location1' => array('分配配送商', Dever::url('lib/set.home?role=seller', 'scm_servicer')),
  406. 'location2' => array('商品设置', Dever::url('lib/set.home?project=seller&table=goods&info=info', 'scm_product')),
  407. 'add' => array('采购下单', 'buy_order&oper_table=info&search_option_seller_id={id}&oper_save_jump=buy_order'),
  408. 'add1' => array('代客下单', 'buy_order&oper_table=info&search_option_seller_id={id}&oper_save_jump=buy_order'),
  409. 'br4' => array('<br />'),
  410. 'fast_add' => array('账户操作', 'push&project=account&oper_table=info&oper_project=scm_seller&uid={id}'),
  411. 'list' => array('账户列表', 'info&project=account&oper_table=info&oper_project=scm_seller&search_option_uid={id}', '"{account}"'),
  412. )
  413. ),
  414. 'default' => array
  415. (
  416. 'col' => 'name,code,type_id,state,cdate',
  417. 'value' => array
  418. (
  419. '"平台经销商", "platform", 1, 1,' . DEVER_TIME,
  420. ),
  421. ),
  422. 'request' => array
  423. (
  424. 'like' => array
  425. (
  426. # 匹配的正则或函数 选填项
  427. 'option' => array
  428. (
  429. 'name' => array('yes', 'like'),
  430. 'id' => 'yes',
  431. 'status' => 1,
  432. 'state' => 1,
  433. ),
  434. 'type' => 'all',
  435. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  436. 'col' => '*|id',
  437. ),
  438. )
  439. );