info.php 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978
  1. <?php
  2. # 获取分类权限
  3. $status = array
  4. (
  5. 1 => '合作中',
  6. 2 => '已终止合作',
  7. //3 => '申请合作中',
  8. );
  9. $type = array
  10. (
  11. 1 => '体验店',
  12. 2 => '零售店',
  13. 10 => '平台商城',#'平台店',
  14. );
  15. $invoice = array
  16. (
  17. 1 => '可以开发票',
  18. 2 => '不可以开发票',
  19. );
  20. $is_agent = array
  21. (
  22. 1 => '代理商可以归店',
  23. 2 => '代理商不可以归店',
  24. );
  25. $col = 'id,name,`desc`,ps_cash,free_ps_cash,truename,mobile,lng,lat,address,open,worktime,method,gotime,city,area,province,county,town,coupon_city,pdesc,license,food_license,jy_license,license_number,company_name,coord_address,invoice,type,mid,sid';
  26. $act = function()
  27. {
  28. $info = Dever::db('act/info')->select();
  29. $id = Dever::input('where_id');
  30. $coupon = Dever::db('shop/coupon')->select(array('shop_id' => $id));
  31. if ($coupon) {
  32. foreach ($coupon as $k => $v) {
  33. $coupon_info = Dever::db('goods/coupon')->find($v['coupon_id']);
  34. if (isset($coupon_info['method'])) {
  35. $prefix = '('.Dever::db('goods/coupon')->config['method'][$coupon_info['method']].')';
  36. $coupon[$k]['name'] = $prefix . $coupon_info['name'];
  37. }
  38. }
  39. }
  40. foreach ($info as $k => $v) {
  41. if ($v['id'] == 1) {
  42. $info[$k]['child'] = $coupon;
  43. }
  44. }
  45. $info['state'] = 2;//1是无需记录上级id,字符串逗号隔开。2是需要记录上级id,json格式
  46. return $info;
  47. };
  48. $yes = array
  49. (
  50. 1 => '可用',
  51. 2 => '不可用',
  52. );
  53. $open = array
  54. (
  55. 1 => '开启',
  56. 2 => '关闭',
  57. );
  58. $method = array
  59. (
  60. 1 => '自提',
  61. 2 => '外送',
  62. 3 => '以上全支持',
  63. );
  64. $stat_type = Dever::db('cash/shop')->config['config_type'];
  65. $add = false;
  66. //$add = array('银联签约','"sign&search_option_shop_id={id}&oper_table=info&where_id={id}"', '"{mid}" == ""');
  67. $excel = false;
  68. $excel[] = array('导出数据', '导出门店列表', 'shop/excel.shop_info');
  69. return array
  70. (
  71. # 表名
  72. 'name' => 'info',
  73. # 显示给用户看的名称
  74. 'lang' => '门店列表',
  75. # 后台菜单排序
  76. 'order' => 99,
  77. 'act' => $act,
  78. 'config_col' => $col,
  79. 'check' => 'sid',
  80. 'config_type' => $type,
  81. 'end' => array
  82. (
  83. 'insert' => 'shop/lib/manage.infoUpdate',
  84. 'update' => 'shop/lib/manage.infoUpdate',
  85. ),
  86. # 数据结构
  87. 'struct' => array
  88. (
  89. 'id' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '店铺ID',
  93. 'default' => '',
  94. 'desc' => '',
  95. 'match' => 'is_numeric',
  96. 'search' => 'order',
  97. 'list' => true,
  98. 'order' => 'desc',
  99. ),
  100. 'hr1' => array
  101. (
  102. 'name' => '门店基本信息',
  103. 'class' => '',//本项必须填写
  104. 'attr' => '',
  105. ),
  106. 'uid' => array
  107. (
  108. 'type' => 'int-11',
  109. 'name' => '用户名',
  110. 'default' => '0',
  111. 'desc' => '请选择用户',
  112. 'match' => 'is_numeric',
  113. //'update' => 'text',
  114. //'search' => 'select',
  115. 'searchs' => array
  116. (
  117. 'api' => 'passport/user-select',
  118. 'col' => 'username',
  119. 'result' => 'id',
  120. ),
  121. //'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  122. ),
  123. 'sid' => array
  124. (
  125. 'type' => 'varchar-30',
  126. 'name' => '店铺编号-一般为5位数字,不能重复',
  127. 'default' => '',
  128. 'desc' => '店铺编号',
  129. 'match' => 'is_string',
  130. 'update' => 'text',
  131. 'search' => 'fulltext',
  132. 'list' => true,
  133. ),
  134. 'name' => array
  135. (
  136. 'type' => 'varchar-300',
  137. 'name' => '门店名称',
  138. 'default' => '',
  139. 'desc' => '请输入门店名称',
  140. 'match' => 'is_string',
  141. 'update' => 'text',
  142. 'search' => 'fulltext',
  143. 'list' => true,
  144. ),
  145. 'desc' => array
  146. (
  147. 'type' => 'varchar-800',
  148. 'name' => '门店介绍',
  149. 'default' => '',
  150. 'desc' => '门店介绍',
  151. 'match' => 'is_string',
  152. 'update' => 'textarea',
  153. ),
  154. 'truename' => array
  155. (
  156. 'type' => 'varchar-100',
  157. 'name' => '联系人姓名',
  158. 'default' => '',
  159. 'desc' => '请输入联系人姓名',
  160. 'match' => 'is_string',
  161. 'update' => 'text',
  162. 'search' => 'fulltext',
  163. 'list' => true,
  164. ),
  165. 'mobile' => array
  166. (
  167. 'type' => 'bigint-11',
  168. 'name' => '联系人电话',
  169. 'default' => '',
  170. 'desc' => '请输入联系人电话',
  171. 'match' => 'is_numeric',
  172. 'update' => 'text',
  173. 'search' => 'fulltext',
  174. 'list' => true,
  175. ),
  176. 'idcard' => array
  177. (
  178. 'type' => 'varchar-32',
  179. 'name' => '身份证号码',
  180. 'default' => '',
  181. 'desc' => '身份证号码',
  182. 'match' => Dever::rule('idcard'),
  183. 'update' => 'text',
  184. ),
  185. 'area' => array
  186. (
  187. 'type' => 'varchar-500',
  188. 'name' => '所在街道',
  189. 'default' => '',
  190. 'desc' => '所在街道',
  191. 'match' => 'option',
  192. 'search' => 'linkage',
  193. 'update' => 'linkage',
  194. 'option' => Dever::url('api.get?level_total=4', 'area'),
  195. //'list' => 'Dever::load("area/api.string", "{area}")',
  196. ),
  197. 'province' => array
  198. (
  199. 'type' => 'int-11',
  200. 'name' => '省份',
  201. 'default' => '',
  202. 'desc' => '省份',
  203. 'match' => 'option',
  204. //'update' => 'text',
  205. ),
  206. 'city' => array
  207. (
  208. 'type' => 'int-11',
  209. 'name' => '城市',
  210. 'default' => '',
  211. 'desc' => '城市',
  212. 'match' => 'option',
  213. //'update' => 'text',
  214. ),
  215. 'county' => array
  216. (
  217. 'type' => 'int-11',
  218. 'name' => '县区',
  219. 'default' => '',
  220. 'desc' => '县区',
  221. 'match' => 'option',
  222. //'update' => 'text',
  223. ),
  224. 'town' => array
  225. (
  226. 'type' => 'int-11',
  227. 'name' => '街道',
  228. 'default' => '',
  229. 'desc' => '街道',
  230. 'match' => 'option',
  231. //'update' => 'text',
  232. ),
  233. 'map' => array
  234. (
  235. 'type' => 'varchar-300',
  236. 'name' => '地理位置',
  237. 'default' => '',
  238. 'desc' => '地理位置',
  239. 'match' => 'is_string',
  240. # 如果是map,必须在config的base.php中设置map信息
  241. //'update' => 'map',
  242. ),
  243. 'lng' => array
  244. (
  245. 'type' => 'varchar-100',
  246. 'name' => '经度',
  247. 'default' => '',
  248. 'desc' => '经度',
  249. 'match' => 'option',
  250. //'update' => 'text',
  251. //'list' => true,
  252. ),
  253. 'lat' => array
  254. (
  255. 'type' => 'varchar-100',
  256. 'name' => '纬度',
  257. 'default' => '',
  258. 'desc' => '纬度',
  259. 'match' => 'option',
  260. //'update' => 'text',
  261. //'list' => true,
  262. ),
  263. 'coord_address' => array
  264. (
  265. 'type' => 'varchar-1000',
  266. 'name' => '门店坐标地址',
  267. 'default' => '',
  268. 'desc' => '门店坐标地址',
  269. 'match' => 'option',
  270. //'update' => 'text',
  271. //'list' => true,
  272. ),
  273. 'address' => array
  274. (
  275. 'type' => 'varchar-1000',
  276. 'name' => '门店地址',
  277. 'default' => '',
  278. 'desc' => '门店地址',
  279. 'match' => 'option',
  280. 'update' => 'text',
  281. //'list' => true,
  282. ),
  283. 'goods' => array
  284. (
  285. 'type' => 'text-255',
  286. 'name' => '请先选择分类-选择分类,之后选择分类下的商品,点击商品名称可以设置库存',
  287. 'default' => '',
  288. 'desc' => '生产能力',
  289. 'match' => 'option',
  290. // 多级联动+多选
  291. 'update' => Dever::input('col') ? 'linkage' : false,
  292. '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=shop&other_id={where_id}&goods_id={id}', 'manage')),
  293. ),
  294. 'factory' => array
  295. (
  296. 'type' => 'text-255',
  297. 'name' => '分配工厂-请先选择地区,再选择工厂',
  298. 'default' => '',
  299. 'desc' => '分配工厂',
  300. 'match' => 'option',
  301. // 多级联动+多选
  302. 'update' => Dever::input('col') ? 'linkage' : false,
  303. 'option' => array(Dever::url('api.get?level_total=3', 'area'), 'city', Dever::url('lib/manage.getInfo', 'factory'), '分配工厂'),
  304. ),
  305. 'store' => array
  306. (
  307. 'type' => 'text-255',
  308. 'name' => '分配仓库-请先选择地区,再选择仓库',
  309. 'default' => '',
  310. 'desc' => '分配仓库',
  311. 'match' => 'option',
  312. // 多级联动+多选
  313. 'update' => Dever::input('col') ? 'linkage' : false,
  314. 'option' => array(Dever::url('api.get?level_total=3', 'area'), 'city', Dever::url('lib/manage.getInfo', 'store'), '分配仓库'),
  315. ),
  316. 'hr2' => array
  317. (
  318. 'name' => '门店营业设置',
  319. 'class' => '',//本项必须填写
  320. 'attr' => '',
  321. ),
  322. 'open' => array
  323. (
  324. 'type' => 'int-11',
  325. 'name' => '营业状态',
  326. 'default' => '1',
  327. 'desc' => '营业状态',
  328. 'match' => 'is_numeric',
  329. 'update' => 'radio',
  330. 'option' => $open,
  331. 'search' => 'select',
  332. 'list' => true,
  333. ),
  334. 'method' => array
  335. (
  336. 'type' => 'int-11',
  337. 'name' => '门店能力',
  338. 'default' => '3',
  339. 'desc' => '门店能力',
  340. 'match' => 'is_numeric',
  341. 'update' => 'radio',
  342. 'option' => $method,
  343. 'control' => 'method',
  344. ),
  345. 'worktime' => array
  346. (
  347. 'type' => 'varchar-100',
  348. 'name' => '营业时间-如10:00~22:00,24小时制',
  349. 'default' => '',
  350. 'desc' => '营业时间',
  351. 'match' => 'is_string',
  352. 'update' => 'text',
  353. //'show' => 'method=1,3',
  354. ),
  355. 'gotime' => array
  356. (
  357. 'type' => 'varchar-100',
  358. 'name' => '外送时间-如10:00~22:00,24小时制',
  359. 'default' => '',
  360. 'desc' => '外送时间',
  361. 'match' => 'is_string',
  362. //'update' => 'text',
  363. //'show' => 'method=2,3',
  364. ),
  365. 'hr3' => array
  366. (
  367. 'name' => '门店认证信息',
  368. 'class' => '',//本项必须填写
  369. 'attr' => '',
  370. ),
  371. 'license' => array
  372. (
  373. 'type' => 'varchar-150',
  374. 'name' => '营业执照',
  375. 'default' => '',
  376. 'desc' => '营业执照',
  377. 'match' => 'option',
  378. 'update' => 'image',
  379. 'key' => '8',
  380. 'place' => '660*660',
  381. ),
  382. 'license_number' => array
  383. (
  384. 'type' => 'varchar-200',
  385. 'name' => '营业执照号码',
  386. 'default' => '',
  387. 'desc' => '营业执照号码',
  388. 'match' => 'option',
  389. 'update' => 'text',
  390. ),
  391. 'company_name' => array
  392. (
  393. 'type' => 'varchar-200',
  394. 'name' => '公司名称',
  395. 'default' => '',
  396. 'desc' => '公司名称',
  397. 'match' => 'option',
  398. 'update' => 'text',
  399. ),
  400. 'idcard_front' => array
  401. (
  402. 'type' => 'varchar-150',
  403. 'name' => '身份证正面',
  404. 'default' => '',
  405. 'desc' => '身份证正面',
  406. 'match' => 'option',
  407. 'update' => 'image',
  408. 'key' => '8',
  409. 'place' => '660*660',
  410. ),
  411. 'idcard_back' => array
  412. (
  413. 'type' => 'varchar-150',
  414. 'name' => '身份证背面',
  415. 'default' => '',
  416. 'desc' => '身份证背面',
  417. 'match' => 'option',
  418. 'update' => 'image',
  419. 'key' => '8',
  420. 'place' => '660*660',
  421. ),
  422. 'jy_license' => array
  423. (
  424. 'type' => 'varchar-150',
  425. 'name' => '经营许可证',
  426. 'default' => '',
  427. 'desc' => '经营许可证',
  428. 'match' => 'option',
  429. 'update' => 'image',
  430. 'key' => '8',
  431. 'place' => '660*660',
  432. ),
  433. 'food_license' => array
  434. (
  435. 'type' => 'varchar-150',
  436. 'name' => '食品许可证',
  437. 'default' => '',
  438. 'desc' => '食品许可证',
  439. 'match' => 'option',
  440. 'update' => 'image',
  441. 'key' => '8',
  442. 'place' => '660*660',
  443. ),
  444. 'hr4' => array
  445. (
  446. 'name' => '其他设置',
  447. 'class' => '',//本项必须填写
  448. 'attr' => '',
  449. ),
  450. 'type' => array
  451. (
  452. 'type' => 'int-11',
  453. 'name' => '门店类型-自营为平台店,当没有找到加盟店时,将自动获取平台店',
  454. 'default' => '1',
  455. 'desc' => '门店类型',
  456. 'match' => 'is_numeric',
  457. 'update' => 'radio',
  458. 'option' => $type,
  459. 'search' => 'select',
  460. 'list' => true,
  461. ),
  462. 'invoice' => array
  463. (
  464. 'type' => 'int-11',
  465. 'name' => '是否可以开发票',
  466. 'default' => '1',
  467. 'desc' => '是否可以开发票',
  468. 'match' => 'is_numeric',
  469. 'update' => 'radio',
  470. 'option' => $invoice,
  471. ),
  472. 'is_agent' => array
  473. (
  474. 'type' => 'int-11',
  475. 'name' => '是否可以归店',
  476. 'default' => '1',
  477. 'desc' => '是否可以归店',
  478. 'match' => 'is_numeric',
  479. 'update' => 'radio',
  480. 'value' => '2',
  481. 'option' => $is_agent,
  482. ),
  483. 'agent_mid' => array
  484. (
  485. 'type' => 'int-11',
  486. 'name' => '所属代理商',
  487. 'default' => '-1',
  488. 'desc' => '代理商',
  489. 'match' => 'is_string',
  490. //'update' => 'text',
  491. 'update' => 'select',
  492. 'update_search' => 'agent/lib/manage.search',
  493. ),
  494. 'coupon_city' => array
  495. (
  496. 'type' => 'int-11',
  497. 'name' => '优惠券是否同城可用-废弃',
  498. 'default' => '2',
  499. 'desc' => '优惠券是否同城可用',
  500. 'match' => 'is_numeric',
  501. //'update' => 'radio',
  502. //'update' => Dever::input('col') ? 'radio' : false,
  503. 'option' => $yes,
  504. ),
  505. 'act' => array
  506. (
  507. 'type' => 'text-255',
  508. 'name' => '参与活动',
  509. 'default' => '',
  510. 'desc' => '参与活动',
  511. 'match' => 'option',
  512. 'update' => 'checkbox',
  513. 'update' => Dever::input('col') ? 'checkbox' : false,
  514. 'data' => 'parent',
  515. 'option' => $act,
  516. ),
  517. 'sign_id' => array
  518. (
  519. 'type' => 'int-11',
  520. 'name' => '签约id',
  521. 'default' => '',
  522. 'desc' => '签约id',
  523. 'match' => 'option',
  524. 'update' => 'text',
  525. ),
  526. 'mid' => array
  527. (
  528. 'type' => 'varchar-50',
  529. 'name' => '分账商户号',
  530. 'default' => '',
  531. 'desc' => '分账商户号',
  532. 'match' => 'option',
  533. 'update' => 'text',
  534. ),
  535. 'ps_cash' => array
  536. (
  537. 'type' => 'varchar-50',
  538. 'name' => '运费-单位为元',
  539. 'default' => '0',
  540. 'desc' => '运费',
  541. 'match' => 'option',
  542. 'update' => 'text',
  543. ),
  544. 'free_ps_cash' => array
  545. (
  546. 'type' => 'varchar-50',
  547. 'name' => '免运费额度-满多少免运费,这里直接填写一个订单满多少金额就免费配送的金额,单位为元',
  548. 'default' => '0',
  549. 'desc' => '免运费额度',
  550. 'match' => 'option',
  551. 'update' => 'text',
  552. ),
  553. 'pdesc' => array
  554. (
  555. 'type' => 'text-255',
  556. 'name' => '配送与自提说明',
  557. 'default' => '',
  558. 'desc' => '配送与自提说明',
  559. 'match' => 'is_string',
  560. 'update' => 'textarea',
  561. ),
  562. 'price' => array
  563. (
  564. 'type' => 'varchar-50',
  565. 'name' => '资金账户-单位为元',
  566. 'default' => '0',
  567. 'desc' => '资金账户',
  568. 'match' => 'option',
  569. // 'update' => 'text',
  570. ),
  571. 'stat_type' => array
  572. (
  573. 'type' => 'int-11',
  574. 'name' => '对账周期-可以选择周期生成对账单,选择按天生成对账单,则每天会生成前一天的对账单',
  575. 'default' => '1',
  576. 'desc' => '对账周期',
  577. 'match' => 'is_numeric',
  578. 'update' => 'radio',
  579. 'option' => $stat_type,
  580. 'control' => 'stat_type',
  581. ),
  582. 'stat_day' => array
  583. (
  584. 'type' => 'int-11',
  585. 'name' => '对账单生成日期-这里直接填写对账周期内的第几天即可,如按月对账,这里填写10,就是本月10号生成上一个月的对账单,如按周对账,这里填写2,就是本周二生成上一周的对账单',
  586. 'default' => '10',
  587. 'desc' => '对账单生成日期',
  588. 'match' => 'option',
  589. 'update' => 'text',
  590. 'show' => 'stat_type=1,2',
  591. ),
  592. 'status' => array
  593. (
  594. 'type' => 'int-11',
  595. 'name' => '合作状态',
  596. 'default' => '1',
  597. 'desc' => '合作状态',
  598. 'match' => 'is_numeric',
  599. //'update' => 'select',
  600. 'option' => $status,
  601. 'search' => 'select',
  602. 'list' => true,
  603. 'edit' => true,
  604. ),
  605. 'reorder' => array
  606. (
  607. 'type' => 'int-11',
  608. 'name' => '排序(数值越大越靠前)',
  609. 'default' => '1',
  610. 'desc' => '请输入排序',
  611. 'match' => 'option',
  612. 'update' => 'text',
  613. 'search' => 'order',
  614. //'list' => true,
  615. 'order' => 'desc',
  616. //'edit' => true,
  617. ),
  618. 'state' => array
  619. (
  620. 'type' => 'tinyint-1',
  621. 'name' => '状态',
  622. 'default' => '1',
  623. 'desc' => '请选择状态',
  624. 'match' => 'is_numeric',
  625. ),
  626. 'cdate' => array
  627. (
  628. 'type' => 'int-11',
  629. 'name' => '录入时间',
  630. 'match' => array('is_numeric', time()),
  631. 'desc' => '',
  632. # 只有insert时才生效
  633. 'insert' => true,
  634. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  635. ),
  636. ),
  637. 'alter' => array
  638. (
  639. 2 => array
  640. (
  641. array('update', 'sid', 'sid', 'varchar-30 店铺编号'),
  642. ),
  643. 'version' => 2,
  644. ),
  645. 'manage' => array
  646. (
  647. //'mul' => true,
  648. //'insert' => false,
  649. 'excel' => $excel,
  650. 'list_button' => array
  651. (
  652. 'delete' => '删除',
  653. 'br3' => array('<br /><br />'),
  654. 'location1' => array('分配工厂', Dever::url('lib/set.factory', 'shop')),
  655. 'location2' => array('分配仓库', Dever::url('lib/set.store', 'shop')),
  656. /*
  657. 'add12' => array('分配工厂', '"info&where_id={id}&col=factory&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  658. 'add13' => array('分配仓库', '"info&where_id={id}&col=store&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  659. */
  660. 'fast' => array('设置活动', '"info&where_id={id}&col=act&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  661. 'br1' => array('<br /><br />'),
  662. 'location' => array('商品设置', Dever::url('lib/set.home', 'shop')),
  663. //'add1' => array('批量设置商品', '"info&where_id={id}&col=goods&oper_save_jump=info&oper_table=info&oper_parent=info"'),
  664. 'list22' => array('商品列表', '"goods&search_option_shop_id={id}&oper_table=info"'),
  665. 'list23' => array('账户管理', '"record&search_option_shop_id={id}&oper_table=info"'),
  666. 'br2' => array('<br /><br />'),
  667. 'list' => array('优惠券管理', '"coupon&search_option_shop_id={id}&oper_table=info"'),
  668. 'list1' => array('账号管理', '"member&search_option_shop_id={id}&oper_table=info"'),
  669. 'list2' => array('打印机管理', '"print&search_option_shop_id={id}&oper_table=info"'),
  670. //'br31' => array('<br /><br />'),
  671. //'add' => $add,
  672. //'list3' => array('销售订单', '"sell_order&search_option_shop_id={id}&oper_table=info"'),
  673. //'list4' => array('采购订单', '"buy_order&search_option_shop_id={id}&oper_table=info"'),
  674. ),
  675. ),
  676. 'request' => array
  677. (
  678. 'search' => array
  679. (
  680. 'option' => array
  681. (
  682. 'ids' => array('yes-id', 'in'),
  683. 'name' => array('yes-name,sid', 'like'),
  684. 'id' => 'yes',
  685. 'state' => 1,
  686. ),
  687. 'type' => 'all',
  688. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  689. 'limit' => '0,20',
  690. 'col' => 'name as name, id, id as value, "" as selected, "" as disabled,mid,type,sid|id',
  691. ),
  692. 'getSearch' => array
  693. (
  694. # 匹配的正则或函数 选填项
  695. 'option' => array
  696. (
  697. 'col' => array('yes-sid,name', 'like'),
  698. ),
  699. 'type' => 'all',
  700. 'col' => '*|id',
  701. ),
  702. # 获取单条数据
  703. 'getOne' => array
  704. (
  705. # 匹配的正则或函数 选填项
  706. 'option' => array
  707. (
  708. 'city' => 'yes',
  709. 'coupon_city' => 'yes',
  710. 'id' => 'yes',
  711. 'type' => 'yes',
  712. 'status' => 1,
  713. 'state' => 1,
  714. ),
  715. 'type' => 'one',
  716. 'col' => $col,
  717. ),
  718. # 获取城市
  719. 'getCity' => array
  720. (
  721. # 匹配的正则或函数 选填项
  722. 'option' => array
  723. (
  724. 'city' => 'yes',
  725. 'id' => 'yes',
  726. 'status' => 1,
  727. 'state' => 1,
  728. ),
  729. 'type' => 'all',
  730. 'group' => 'city',
  731. 'col' => $col,
  732. ),
  733. # 获取城市
  734. 'getDataByType' => array
  735. (
  736. # 匹配的正则或函数 选填项
  737. 'option' => array
  738. (
  739. 'type' => 'yes',
  740. 'id' => 'yes',
  741. 'status' => 1,
  742. 'state' => 1,
  743. ),
  744. 'type' => 'one',
  745. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  746. 'col' => $col,
  747. ),
  748. 'like' => array
  749. (
  750. # 匹配的正则或函数 选填项
  751. 'option' => array
  752. (
  753. 'name' => array('yes', 'like'),
  754. 'sid' => array('yes', 'like'),
  755. 'type' => array('yes', 'like'),
  756. 'id' => 'yes',
  757. 'status' => 1,
  758. 'state' => 1,
  759. ),
  760. 'type' => 'all',
  761. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  762. 'col' => $col . '|id',
  763. ),
  764. 'likeOne' => array
  765. (
  766. # 匹配的正则或函数 选填项
  767. 'option' => array
  768. (
  769. 'name' => array('yes', 'like'),
  770. 'sid' => array('yes', 'like'),
  771. 'mid' => array('yes', 'like'),
  772. 'type' => array('yes', 'like'),
  773. 'id' => 'yes',
  774. 'status' => 1,
  775. 'state' => 1,
  776. ),
  777. 'type' => 'one',
  778. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  779. 'col' => $col,
  780. ),
  781. 'getAll' => array
  782. (
  783. # 匹配的正则或函数 选填项
  784. 'option' => array
  785. (
  786. 'type' => array('yes', '!='),
  787. 'town' => 'yes',
  788. 'area' => array('yes', 'like'),
  789. 'state' => 1,
  790. ),
  791. 'type' => 'all',
  792. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  793. 'col' => 'id,id as value, name',
  794. ),
  795. 'getguiAll' => array
  796. (
  797. # 匹配的正则或函数 选填项
  798. 'option' => array
  799. (
  800. 'type' => array('yes', '!='),
  801. // 'town' => 'yes',
  802. // 'area' => array('yes', 'like'),
  803. 'status' => 1,
  804. 'state' => 1,
  805. ),
  806. 'type' => 'all',
  807. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  808. 'col' => 'id,id as value, name,agent_mid',
  809. ),
  810. 'getAllByType' => array
  811. (
  812. # 匹配的正则或函数 选填项
  813. 'option' => array
  814. (
  815. 'town' => 'yes',
  816. 'is_agent' => 'yes',
  817. 'area' => array('yes', 'like'),
  818. 'type' => array('yes', 'in'),
  819. 'status' => 'yes',
  820. 'state' => 1,
  821. ),
  822. 'type' => 'all',
  823. 'order' => array('type' => 'desc', 'reorder' => 'desc', 'id' => 'desc'),
  824. 'col' => 'id,id as value, concat(sid, name) as name,type,reorder,cdate',
  825. ),
  826. 'getInfo' => array
  827. (
  828. # 匹配的正则或函数 选填项
  829. 'option' => array
  830. (
  831. 'type' => 'yes',
  832. 'state' => 1,
  833. ),
  834. 'type' => 'one',
  835. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  836. 'col' => 'id,id as value, name',
  837. ),
  838. 'getAreaAll' => array
  839. (
  840. # 匹配的正则或函数 选填项
  841. 'option' => array
  842. (
  843. 'city' => 'yes',
  844. 'county' => 'yes',
  845. 'town' => 'yes',
  846. 'type' => 'yes',
  847. 'state' => 1,
  848. ),
  849. 'type' => 'all',
  850. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  851. 'col' => 'id,province,city,county,town',
  852. ),
  853. 'getSerachNum' => array
  854. (
  855. # 匹配的正则或函数 选填项
  856. 'option' => array
  857. (
  858. 'city' => 'yes',
  859. 'county' => 'yes',
  860. 'town' => 'yes',
  861. 'state' => 1,
  862. ),
  863. 'type' => 'count',
  864. 'col' => '*',
  865. ),
  866. 'getSerachTNum' => array
  867. (
  868. # 匹配的正则或函数 选填项
  869. 'option' => array
  870. (
  871. 'city' => 'yes',
  872. 'county' => 'yes',
  873. 'town' => 'yes',
  874. 'type' => 1,
  875. 'state' => 1,
  876. ),
  877. 'type' => 'count',
  878. 'col' => '*',
  879. ),
  880. 'upCash' => array
  881. (
  882. 'type' => 'update',
  883. 'where' => array
  884. (
  885. 'id' => 'yes',
  886. ),
  887. 'set' => array
  888. (
  889. 'price' => array('yes', '+='),
  890. ),
  891. ),
  892. ),
  893. );