servicer.php 9.6 KB

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