info.php 12 KB

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