info.php 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <?php
  2. $category = function()
  3. {
  4. return Dever::load('scm_product/category-getTop');
  5. };
  6. $type = function()
  7. {
  8. return Dever::load('scm_servicer/type-state');
  9. };
  10. $identity = array
  11. (
  12. 1 => '个人',
  13. 2 => '个体户',
  14. 3 => '企业',
  15. );
  16. $status = array
  17. (
  18. 1 => '启用',
  19. 2 => '禁用',
  20. );
  21. return array
  22. (
  23. # 表名
  24. 'name' => 'info',
  25. # 显示给用户看的名称
  26. 'lang' => '配送商列表',
  27. # 是否显示在后台菜单
  28. 'order' => 10,
  29. # 数据结构
  30. 'struct' => array
  31. (
  32. 'id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '配送商ID',
  36. 'default' => '',
  37. 'desc' => '',
  38. 'match' => 'is_numeric',
  39. 'list' => true,
  40. //'order' => 'desc',
  41. ),
  42. 'name' => array
  43. (
  44. 'type' => 'varchar-150',
  45. 'name' => '配送商名称',
  46. 'default' => '',
  47. 'desc' => '配送商名称',
  48. 'match' => 'is_string',
  49. 'update' => 'text',
  50. 'search' => 'fulltext',
  51. 'list' => true,
  52. 'edit' => true,
  53. ),
  54. 'code' => array
  55. (
  56. 'type' => 'varchar-150',
  57. 'name' => '配送商编码',
  58. 'default' => '',
  59. 'desc' => '配送商编码',
  60. 'match' => 'is_string',
  61. 'update' => 'text',
  62. 'search' => 'fulltext',
  63. 'list' => true,
  64. ),
  65. 'type_id' => array
  66. (
  67. 'type' => 'int-11',
  68. 'name' => '配送商类型',
  69. 'default' => '1',
  70. 'desc' => '配送商类型',
  71. 'match' => 'is_numeric',
  72. 'update' => 'radio',
  73. 'option' => $type,
  74. 'list' => true,
  75. ),
  76. 'category' => array
  77. (
  78. 'type' => 'varchar-2000',
  79. 'name' => '商品属性分类-如不选择就是可以选择所有商品属性分类下的商品',
  80. 'default' => '',
  81. 'desc' => '商品属性分类',
  82. 'match' => 'is_string',
  83. 'update' => 'checkbox',
  84. 'option' => $category,
  85. ),
  86. 'scm_servicer-store'=> array
  87. (
  88. 'name' => '仓库设置',
  89. 'default' => '',
  90. 'desc' => '仓库设置',
  91. 'match' => 'option',
  92. # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
  93. 'sync' => array('id', 'servicer_id'),
  94. 'update' => array(1),
  95. # 1纵向展示 2横向展示
  96. 'update_type' => 2,
  97. 'list_name' => '仓库列表',
  98. 'list' => 'Dever::load("scm_servicer/lib/manage.getStore", {id})',
  99. ),
  100. 'truename' => array
  101. (
  102. 'type' => 'varchar-100',
  103. 'name' => '联系人姓名',
  104. 'default' => '',
  105. 'desc' => '请输入联系人姓名',
  106. 'match' => 'is_string',
  107. 'update' => 'text',
  108. 'search' => 'fulltext',
  109. 'tab' => 1,
  110. ),
  111. 'tel' => array
  112. (
  113. 'type' => 'varchar-50',
  114. 'name' => '联系人电话',
  115. 'default' => '',
  116. 'desc' => '请输入联系人电话',
  117. 'match' => 'is_numeric',
  118. 'update' => 'text',
  119. 'search' => 'fulltext',
  120. 'tab' => 1,
  121. ),
  122. 'email' => array
  123. (
  124. 'type' => 'varchar-50',
  125. 'name' => '联系人邮箱',
  126. 'default' => '',
  127. 'desc' => '联系人邮箱',
  128. 'match' => 'option',
  129. 'update' => 'text',
  130. 'search' => 'fulltext',
  131. 'tab' => 1,
  132. ),
  133. 'area' => array
  134. (
  135. 'type' => 'varchar-500',
  136. 'name' => '联系人城市',
  137. 'default' => '',
  138. 'desc' => '联系人城市',
  139. 'match' => 'option',
  140. 'search' => 'linkage',
  141. 'update' => 'linkage',
  142. 'option' => Dever::url('api.get?level_total=3', 'area'),
  143. //'list' => 'Dever::load("area/api.string", "{area}")',
  144. 'tab' => 1,
  145. ),
  146. 'province' => array
  147. (
  148. 'type' => 'int-11',
  149. 'name' => '省份',
  150. 'default' => '',
  151. 'desc' => '省份',
  152. 'match' => 'option',
  153. //'update' => 'text',
  154. 'tab' => 1,
  155. ),
  156. 'city' => array
  157. (
  158. 'type' => 'int-11',
  159. 'name' => '城市',
  160. 'default' => '',
  161. 'desc' => '城市',
  162. 'match' => 'option',
  163. //'update' => 'text',
  164. 'tab' => 1,
  165. ),
  166. 'county' => array
  167. (
  168. 'type' => 'int-11',
  169. 'name' => '县区',
  170. 'default' => '',
  171. 'desc' => '县区',
  172. 'match' => 'option',
  173. //'update' => 'text',
  174. 'tab' => 1,
  175. ),
  176. 'address' => array
  177. (
  178. 'type' => 'varchar-1000',
  179. 'name' => '联系人地址',
  180. 'default' => '',
  181. 'desc' => '联系人地址',
  182. 'match' => 'option',
  183. 'update' => 'text',
  184. //'list' => true,
  185. 'tab' => 1,
  186. ),
  187. 'identity' => array
  188. (
  189. 'type' => 'tinyint-1',
  190. 'name' => '供应商身份',
  191. 'default' => '1',
  192. 'desc' => '供应商身份',
  193. 'match' => 'is_numeric',
  194. 'update' => 'radio',
  195. 'option' => $identity,
  196. 'control' => 'identity',
  197. 'tab' => 2,
  198. ),
  199. 'idcard_front' => array
  200. (
  201. 'type' => 'varchar-150',
  202. 'name' => '身份证正面-如果是个人,这里上传联系人身份证,如果是个体户或者企业,这里上传法人身份证',
  203. 'default' => '',
  204. 'desc' => '身份证正面',
  205. 'match' => 'option',
  206. 'update' => 'image',
  207. 'key' => '8',
  208. 'place' => '660*660',
  209. 'tab' => 2,
  210. ),
  211. 'idcard_back' => array
  212. (
  213. 'type' => 'varchar-150',
  214. 'name' => '身份证背面-如果是个人,这里上传联系人身份证,如果是个体户或者企业,这里上传法人身份证',
  215. 'default' => '',
  216. 'desc' => '身份证背面',
  217. 'match' => 'option',
  218. 'update' => 'image',
  219. 'key' => '8',
  220. 'place' => '660*660',
  221. 'tab' => 2,
  222. ),
  223. 'company_license' => array
  224. (
  225. 'type' => 'varchar-150',
  226. 'name' => '营业执照',
  227. 'default' => '',
  228. 'desc' => '营业执照',
  229. 'match' => 'option',
  230. 'update' => 'image',
  231. 'key' => '8',
  232. 'place' => '660*660',
  233. 'show' => 'identity=2,3',
  234. 'tab' => 2,
  235. ),
  236. 'company_name' => array
  237. (
  238. 'type' => 'varchar-200',
  239. 'name' => '企业全称',
  240. 'default' => '',
  241. 'desc' => '企业全称',
  242. 'match' => 'option',
  243. //'update' => 'text',
  244. 'show' => 'identity=2,3',
  245. 'tab' => 2,
  246. ),
  247. 'company_number' => array
  248. (
  249. 'type' => 'varchar-200',
  250. 'name' => '社会信用代码',
  251. 'default' => '',
  252. 'desc' => '社会信用代码',
  253. 'match' => 'option',
  254. //'update' => 'text',
  255. 'show' => 'identity=2,3',
  256. 'tab' => 2,
  257. ),
  258. 'reorder' => array
  259. (
  260. 'type' => 'int-11',
  261. 'name' => '排序(数值越大越靠前)',
  262. 'default' => '1',
  263. 'desc' => '请输入排序',
  264. 'match' => 'option',
  265. //'update' => 'text',
  266. 'search' => 'order',
  267. 'list_name' => '排序',
  268. 'list' => true,
  269. 'order' => 'desc',
  270. 'edit' => true,
  271. ),
  272. 'status' => array
  273. (
  274. 'type' => 'int-11',
  275. 'name' => '状态',
  276. 'default' => '1',
  277. 'desc' => '状态',
  278. 'match' => 'is_numeric',
  279. //'update' => 'select',
  280. 'option' => $status,
  281. 'search' => 'select',
  282. 'list' => true,
  283. 'edit' => true,
  284. ),
  285. 'state' => array
  286. (
  287. 'type' => 'tinyint-1',
  288. 'name' => '状态',
  289. 'default' => '1',
  290. 'desc' => '请选择状态',
  291. 'match' => 'is_numeric',
  292. ),
  293. 'cdate' => array
  294. (
  295. 'type' => 'int-11',
  296. 'name' => '录入时间',
  297. 'match' => array('is_numeric', time()),
  298. 'desc' => '',
  299. # 只有insert时才生效
  300. 'insert' => true,
  301. //'search' => 'date',
  302. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  303. ),
  304. ),
  305. 'manage' => array
  306. (
  307. 'tab' => array('基本设置', '联系人信息', '认证信息'),
  308. 'delete' => false,
  309. 'list_button' => array
  310. (
  311. 'location' => array('分配供应商', Dever::url('lib/set.home?role=servicer', 'scm_supplier')),
  312. 'br3' => array('<br />'),
  313. 'add' => array('入库下单', 'in_order&oper_table=info&search_option_servicer_id={id}&oper_save_jump=in_order'),
  314. 'add2' => array('出库下单', 'out_order&oper_table=info&search_option_servicer_id={id}&oper_save_jump=out_order'),
  315. )
  316. ),
  317. 'default' => array
  318. (
  319. 'col' => 'name,code,state,cdate',
  320. 'value' => array
  321. (
  322. '"默认配送商", "default", 1,' . DEVER_TIME,
  323. ),
  324. ),
  325. 'request' => array
  326. (
  327. )
  328. );