info.php 30 KB

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