info.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <?php
  2. # 获取分类权限
  3. $status = array
  4. (
  5. 1 => '已认证',
  6. 2 => '认证中',
  7. 3 => '认证失败',
  8. );
  9. $out_template = array
  10. (
  11. 1 => '默认模板',
  12. 2 => '安鲜达',
  13. 3 => '大连唯捷',
  14. );
  15. $stat_type = Dever::db('cash/shop')->config['config_type'];
  16. return array
  17. (
  18. # 表名
  19. 'name' => 'info',
  20. # 显示给用户看的名称
  21. 'lang' => '仓库列表',
  22. # 后台菜单排序
  23. 'order' => 99,
  24. 'out_template' => $out_template,
  25. 'end' => array
  26. (
  27. 'insert' => 'store/lib/manage.infoUpdate',
  28. 'update' => 'store/lib/manage.infoUpdate',
  29. ),
  30. # 数据结构
  31. 'struct' => array
  32. (
  33. 'id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => 'ID',
  37. 'default' => '',
  38. 'desc' => '',
  39. 'match' => 'is_numeric',
  40. 'search' => 'order',
  41. 'list' => true,
  42. 'order' => 'desc',
  43. ),
  44. 'hr1' => array
  45. (
  46. 'name' => '仓库基本信息',
  47. 'class' => '',//本项必须填写
  48. 'attr' => '',
  49. ),
  50. 'uid' => array
  51. (
  52. 'type' => 'int-11',
  53. 'name' => '用户名',
  54. 'default' => '0',
  55. 'desc' => '请选择用户',
  56. 'match' => 'is_numeric',
  57. //'update' => 'text',
  58. //'search' => 'select',
  59. 'searchs' => array
  60. (
  61. 'api' => 'passport/user-select',
  62. 'col' => 'username',
  63. 'result' => 'id',
  64. ),
  65. //'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  66. ),
  67. 'name' => array
  68. (
  69. 'type' => 'varchar-32',
  70. 'name' => '仓库名称',
  71. 'default' => '',
  72. 'desc' => '请输入仓库名称',
  73. 'match' => 'is_string',
  74. 'update' => 'text',
  75. 'search' => 'fulltext',
  76. 'list' => true,
  77. ),
  78. 'truename' => array
  79. (
  80. 'type' => 'varchar-100',
  81. 'name' => '联系人姓名',
  82. 'default' => '',
  83. 'desc' => '请输入联系人姓名',
  84. 'match' => 'is_string',
  85. 'update' => 'text',
  86. 'search' => 'fulltext',
  87. 'list' => true,
  88. ),
  89. 'mobile' => array
  90. (
  91. 'type' => 'bigint-11',
  92. 'name' => '联系人电话',
  93. 'default' => '',
  94. 'desc' => '请输入联系人电话',
  95. 'match' => 'is_numeric',
  96. 'update' => 'text',
  97. 'search' => 'fulltext',
  98. 'list' => true,
  99. ),
  100. 'area' => array
  101. (
  102. 'type' => 'varchar-500',
  103. 'name' => '所在城市',
  104. 'default' => '',
  105. 'desc' => '所在城市',
  106. 'match' => 'option',
  107. 'search' => 'linkage',
  108. 'update' => 'linkage',
  109. 'option' => Dever::url('api.get?level_total=3', 'area'),
  110. 'list' => 'Dever::load("area/api.string", "{area}")',
  111. ),
  112. 'province' => array
  113. (
  114. 'type' => 'int-11',
  115. 'name' => '省份',
  116. 'default' => '',
  117. 'desc' => '省份',
  118. 'match' => 'option',
  119. //'update' => 'text',
  120. ),
  121. 'city' => array
  122. (
  123. 'type' => 'int-11',
  124. 'name' => '城市',
  125. 'default' => '',
  126. 'desc' => '城市',
  127. 'match' => 'option',
  128. //'update' => 'text',
  129. ),
  130. 'county' => array
  131. (
  132. 'type' => 'int-11',
  133. 'name' => '县区',
  134. 'default' => '',
  135. 'desc' => '县区',
  136. 'match' => 'option',
  137. //'update' => 'text',
  138. ),
  139. 'map' => array
  140. (
  141. 'type' => 'varchar-300',
  142. 'name' => '地理位置',
  143. 'default' => '',
  144. 'desc' => '地理位置',
  145. 'match' => 'is_string',
  146. # 如果是map,必须在config的base.php中设置map信息
  147. 'update' => 'map',
  148. ),
  149. 'lng' => array
  150. (
  151. 'type' => 'varchar-100',
  152. 'name' => '经度',
  153. 'default' => '',
  154. 'desc' => '经度',
  155. 'match' => 'option',
  156. //'update' => 'text',
  157. //'list' => true,
  158. ),
  159. 'lat' => array
  160. (
  161. 'type' => 'varchar-100',
  162. 'name' => '纬度',
  163. 'default' => '',
  164. 'desc' => '纬度',
  165. 'match' => 'option',
  166. //'update' => 'text',
  167. //'list' => true,
  168. ),
  169. 'address' => array
  170. (
  171. 'type' => 'varchar-1000',
  172. 'name' => '仓库地址',
  173. 'default' => '',
  174. 'desc' => '仓库地址',
  175. 'match' => 'option',
  176. 'update' => 'text',
  177. //'list' => true,
  178. ),
  179. 'goods' => array
  180. (
  181. 'type' => 'text-255',
  182. 'name' => '请先选择分类-选择分类,之后选择分类下的商品,点击商品名称可以设置库存',
  183. 'default' => '',
  184. 'desc' => '生产能力',
  185. 'match' => 'option',
  186. // 多级联动+多选
  187. 'update' => Dever::input('col') ? 'linkage' : false,
  188. 'option' => array(Dever::url('api.get', 'category'), 'cate_id', Dever::url('lib/info.getGoods', 'goods'), '快速设置', Dever::url('project/database/list?project=goods&table=info_sku&page_type=1&other=store&other_id={where_id}&goods_id={id}', 'manage')),
  189. ),
  190. 'hr2' => array
  191. (
  192. 'name' => '仓库认证信息',
  193. 'class' => '',//本项必须填写
  194. 'attr' => '',
  195. ),
  196. 'license' => array
  197. (
  198. 'type' => 'varchar-150',
  199. 'name' => '营业执照',
  200. 'default' => '',
  201. 'desc' => '营业执照',
  202. 'match' => 'option',
  203. 'update' => 'image',
  204. 'key' => '8',
  205. 'place' => '660*660',
  206. ),
  207. 'license_number' => array
  208. (
  209. 'type' => 'varchar-200',
  210. 'name' => '营业执照号码',
  211. 'default' => '',
  212. 'desc' => '营业执照号码',
  213. 'match' => 'option',
  214. 'update' => 'text',
  215. ),
  216. 'company_name' => array
  217. (
  218. 'type' => 'varchar-200',
  219. 'name' => '公司名称',
  220. 'default' => '',
  221. 'desc' => '公司名称',
  222. 'match' => 'option',
  223. 'update' => 'text',
  224. ),
  225. 'idcard_front' => array
  226. (
  227. 'type' => 'varchar-150',
  228. 'name' => '身份证正面',
  229. 'default' => '',
  230. 'desc' => '身份证正面',
  231. 'match' => 'option',
  232. 'update' => 'image',
  233. 'key' => '8',
  234. 'place' => '660*660',
  235. ),
  236. 'idcard_back' => array
  237. (
  238. 'type' => 'varchar-150',
  239. 'name' => '身份证背面',
  240. 'default' => '',
  241. 'desc' => '身份证背面',
  242. 'match' => 'option',
  243. 'update' => 'image',
  244. 'key' => '8',
  245. 'place' => '660*660',
  246. ),
  247. 'kh_license' => array
  248. (
  249. 'type' => 'varchar-150',
  250. 'name' => '开户许可证',
  251. 'default' => '',
  252. 'desc' => '开户许可证',
  253. 'match' => 'option',
  254. 'update' => 'image',
  255. 'key' => '8',
  256. 'place' => '660*660',
  257. ),
  258. 'status' => array
  259. (
  260. 'type' => 'int-11',
  261. 'name' => '认证状态',
  262. 'default' => '1',
  263. 'desc' => '认证状态',
  264. 'match' => 'is_numeric',
  265. 'update' => 'select',
  266. 'option' => $status,
  267. 'search' => 'select',
  268. 'list' => true,
  269. 'edit' => true,
  270. ),
  271. 'stat_type' => array
  272. (
  273. 'type' => 'int-11',
  274. 'name' => '对账周期-可以选择周期生成对账单,选择按天生成对账单,则每天会生成前一天的对账单',
  275. 'default' => '1',
  276. 'desc' => '对账周期',
  277. 'match' => 'is_numeric',
  278. 'update' => 'radio',
  279. 'option' => $stat_type,
  280. 'control' => 'stat_type',
  281. ),
  282. 'stat_day' => array
  283. (
  284. 'type' => 'int-11',
  285. 'name' => '对账单生成日期-这里直接填写对账周期内的第几天即可,如按月对账,这里填写10,就是本月10号生成上一个月的对账单,如按周对账,这里填写2,就是本周二生成上一周的对账单',
  286. 'default' => '10',
  287. 'desc' => '对账单生成日期',
  288. 'match' => 'option',
  289. 'update' => 'text',
  290. 'show' => 'stat_type=1,2',
  291. ),
  292. 'out_template' => array
  293. (
  294. 'type' => 'int-11',
  295. 'name' => '导出模板-供应链管理中导出的表格模板',
  296. 'default' => '1',
  297. 'desc' => '导出模板',
  298. 'match' => 'is_numeric',
  299. 'update' => 'select',
  300. 'option' => $out_template,
  301. 'list' => true,
  302. 'edit' => true,
  303. ),
  304. 'reorder' => array
  305. (
  306. 'type' => 'int-11',
  307. 'name' => '排序(数值越大越靠前)',
  308. 'default' => '1',
  309. 'desc' => '请输入排序',
  310. 'match' => 'option',
  311. //'update' => 'text',
  312. 'search' => 'order',
  313. 'list' => true,
  314. 'order' => 'desc',
  315. 'edit' => true,
  316. ),
  317. 'state' => array
  318. (
  319. 'type' => 'tinyint-1',
  320. 'name' => '状态',
  321. 'default' => '1',
  322. 'desc' => '请选择状态',
  323. 'match' => 'is_numeric',
  324. ),
  325. 'cdate' => array
  326. (
  327. 'type' => 'int-11',
  328. 'name' => '录入时间',
  329. 'match' => array('is_numeric', time()),
  330. 'desc' => '',
  331. # 只有insert时才生效
  332. 'insert' => true,
  333. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  334. ),
  335. ),
  336. 'manage' => array
  337. (
  338. 'list_table' => 'html',
  339. 'list_button' => array
  340. (
  341. 'new' => array('仓库管理', '"home?sign=".Dever::login({id})', 'store'),
  342. //'location' => array('商品设置', Dever::url('lib/set.home', 'store')),
  343. //'add' => array('设置库存清单', '"info&where_id={id}&col=goods&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  344. //'list3' => array('商品列表', '"goods&search_option_store_id={id}&oper_table=info"'),
  345. 'list3' => array('商品库存设置', '"goods_sku&search_option_store_id={id}&oper_table=info&search_type=1"'),
  346. 'list1' => array('账号管理', '"member&search_option_store_id={id}&oper_table=info"'),
  347. //'list2' => array('订货单', '"order&search_option_store_id={id}&oper_table=info"'),
  348. ),
  349. ),
  350. 'request' => array
  351. (
  352. 'like' => array
  353. (
  354. # 匹配的正则或函数 选填项
  355. 'option' => array
  356. (
  357. 'name' => array('yes', 'like'),
  358. 'id' => 'yes',
  359. 'status' => 1,
  360. 'state' => 1,
  361. ),
  362. 'type' => 'all',
  363. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  364. 'col' => '*|id',
  365. ),
  366. ),
  367. );