supplier.php 9.4 KB

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