order.php 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089
  1. <?php
  2. $role = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('setting/role-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $source_id = function()
  13. {
  14. $array = array
  15. (
  16. -1 => array
  17. (
  18. 'id' => '-1',
  19. 'name' => '无来源',
  20. ),
  21. );
  22. $data = Dever::load('setting/source-state');
  23. if($data)
  24. {
  25. $array += $data;
  26. }
  27. return $array;
  28. };
  29. $status = array
  30. (
  31. -2 => array('name' => '待签名', 'style' => 'font-weight:bold;color:#00FFFF'),
  32. 1 => array('name' => '待业务初审', 'style' => 'font-weight:bold;color:#436EEE'),
  33. 2 => array('name' => '待财务终审', 'style' => 'font-weight:bold;color:#003366'),
  34. 3 => array('name' => '待权益发放', 'style' => 'font-weight:bold;color:#993333'),
  35. 4 => array('name' => '已完成', 'style' => 'font-weight:bold;color:green'),
  36. 5 => array('name' => '驳回', 'style' => 'font-weight:bold;color:#CD3700'),
  37. 6 => array('name' => '挂起', 'style' => 'font-weight:bold;color:#436EEE'),
  38. 7 => array('name' => '关闭', 'style' => 'font-weight:bold;color:#000000'),
  39. );
  40. $pay_status = array
  41. (
  42. 1 => '待支付',
  43. 2 => '已支付',
  44. 3 => '已退款',
  45. );
  46. $goods_status = array
  47. (
  48. 1 => array('name' => '未发放', 'style' => 'font-weight:bold;color:#436EEE'),
  49. 2 => array('name' => '无权益', 'style' => 'font-weight:bold;'),
  50. 3 => array('name' => '已发放', 'style' => 'font-weight:bold;color:green'),
  51. );
  52. $type = array
  53. (
  54. 1 => '个人',
  55. 2 => '公司',
  56. );
  57. $pay_type = array
  58. (
  59. 1 => '在线支付',
  60. 2 => '汇款',
  61. 3 => '个人转账',
  62. );
  63. $get_type = array
  64. (
  65. 1 => '购买',
  66. 2 => '赠送',
  67. );
  68. $level = function()
  69. {
  70. $array = array
  71. (
  72. -1 => array
  73. (
  74. 'id' => -1,
  75. 'name' => '普通',
  76. ),
  77. );
  78. $data = Dever::load('setting/level-state');
  79. if($data)
  80. {
  81. $array += $data;
  82. }
  83. return $array;
  84. };
  85. $import = array
  86. (
  87. 1 => '最新系统',
  88. 2 => 'v2旧系统导入',
  89. 3 => 'v1旧系统导入',
  90. );
  91. $order_type = array
  92. (
  93. 1 => '新购',
  94. 2 => '升级',
  95. );
  96. $button = array();
  97. $parent_mid = Dever::input('search_option_parent_mid');
  98. $mid = Dever::input('search_option_mid');
  99. $pmid = '';
  100. if ($parent_mid) {
  101. $pmid = $parent_mid;
  102. }
  103. if ($mid) {
  104. $pmid = $mid;
  105. }
  106. $excel = false;
  107. if ($pmid) {
  108. $button = array
  109. (
  110. '返回上一页' => array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $pmid),
  111. );
  112. }else{
  113. if(Dever::load('manage/auth')->checkFunc('agent.order', 'editorderout', '数据导出')){
  114. $excel[] = array('数据导出', '代理商订单','agent/lib/order.out_order');
  115. }
  116. if(Dever::load('manage/auth')->checkFunc('agent.order', 'editbeidiao', '背调订单记录数据导出')){
  117. $excel[] = array('代理商订单导出', '代理商订单记录','agent/lib/order.out_beidiaoorder');
  118. }
  119. }
  120. # 权限设置 1是查看详情、2是城市数据统计
  121. $search_auth = Dever::input('search_option_dever_auth', 1);
  122. $list_button = array();
  123. if($search_auth == 1){
  124. $list_button['list'] = array('查看详情', '"order_process&project=agent&order_id={id}&page_type=1&[refer]"');
  125. if(Dever::load('manage/auth')->checkFunc('agent.order', 'editSoftorderout', '软件服务费数据导出')){
  126. $excel[] = array('软件服务费数据导出','软件服务费数据导出', 'agent/lib/order.out_softorder');
  127. }
  128. }
  129. $list_button['oper'] = array('删除订单', '"agent/lib/manage.setOrderStatus?id={id}&value=7"', '{status} <= 1 || {status} == 5');
  130. $search_pmid = Dever::input('search_in_parent_mid');
  131. $invite_type = array
  132. (
  133. 1 => '邀请人',
  134. 2 => '来源',
  135. );
  136. # id小于50000为导入的数据
  137. return array
  138. (
  139. # 表名
  140. 'name' => 'order',
  141. # 显示给用户看的名称
  142. 'lang' => '代理商订单',
  143. 'auto' => 50000,
  144. 'set' => array
  145. (
  146. 'status' => $status,
  147. 'pay_status' => $pay_status,
  148. 'goods_status' => $goods_status,
  149. 'type' => $type,
  150. 'pay_type' => $pay_type,
  151. 'order_type' => $order_type,
  152. ),
  153. 'start' => array
  154. (
  155. 'update' => 'agent/lib/manage.orderUpdateParent',
  156. ),
  157. 'order' => 99,
  158. # 数据结构
  159. 'struct' => array
  160. (
  161. 'id' => array
  162. (
  163. 'type' => 'int-11',
  164. 'name' => 'ID',
  165. 'default' => '',
  166. 'desc' => '',
  167. 'match' => 'is_numeric',
  168. 'search' => 'order',
  169. //'list' => true,
  170. ),
  171. 'mid' => array
  172. (
  173. 'type' => 'int-11',
  174. 'name' => '代理商姓名/手机号',
  175. 'default' => '-1',
  176. 'desc' => '代理商',
  177. 'match' => 'is_string',
  178. 'update' => 'text',
  179. 'search' => $search_pmid ? false : array
  180. (
  181. 'api' => 'agent/member-getSearch',
  182. 'col' => 'col',
  183. 'result' => 'id',
  184. 'search' => 'mid',
  185. ),
  186. 'list_name' => '代理商信息',
  187. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)' : false,
  188. 'list_order' => 3,
  189. ),
  190. 'order_num' => array
  191. (
  192. 'type' => 'varchar-100',
  193. 'name' => '订单号',
  194. 'default' => '',
  195. 'desc' => '订单号',
  196. 'match' => 'is_string',
  197. 'update' => 'text',
  198. //'search' => 'fulltext',
  199. //'list' => true,
  200. //'list_order' => 1,
  201. ),
  202. 'order_type' => array
  203. (
  204. 'type' => 'tinyint-1',
  205. 'name' => '订单类型',
  206. 'default' => '1',
  207. 'desc' => '订单类型',
  208. 'match' => 'is_numeric',
  209. 'option' => $order_type,
  210. ),
  211. 'mobile' => array
  212. (
  213. 'type' => 'bigint-11',
  214. 'name' => '手机号',
  215. 'default' => '',
  216. 'desc' => '请输入手机号',
  217. 'match' => Dever::rule('mobile'),
  218. 'update' => 'text',
  219. //'search' => 'fulltext',
  220. 'list' => $search_auth == 2 ? true : false,
  221. 'list_order' => 2,
  222. ),
  223. 'invite_type' => array
  224. (
  225. 'type' => 'tinyint-1',
  226. 'name' => '邀请类型',
  227. 'default' => '1',
  228. 'desc' => '邀请类型',
  229. 'match' => 'is_numeric',
  230. //'search' => 'select',
  231. 'update' => 'radio',
  232. 'option' => $invite_type,
  233. //'list' => true,
  234. //'list_order' => 7,
  235. 'control' => 'invite_type',
  236. ),
  237. 'parent_code' => array
  238. (
  239. 'type' => 'varchar-100',
  240. 'name' => '上级邀请码',
  241. 'default' => '',
  242. 'desc' => '上级邀请码',
  243. 'match' => 'is_string',
  244. 'update' => 'text',
  245. # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
  246. 'bind' => array('onblur', 'loading', array('url' => Dever::url("lib/member.search", 'agent'))),
  247. 'show' => 'invite_type=1',
  248. ),
  249. 'parent_mid' => array
  250. (
  251. 'type' => 'int-11',
  252. 'name' => '上级姓名/手机号',
  253. 'default' => '-1',
  254. 'desc' => '邀请人',
  255. 'match' => 'is_string',
  256. //'update' => 'text',
  257. 'search' => $search_pmid ? false : array
  258. (
  259. 'api' => 'agent/member-getSearch',
  260. 'col' => 'col',
  261. 'result' => 'id',
  262. 'search' => 'parent_mid',
  263. ),
  264. 'list_name' => '上级信息',
  265. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/member.getOne", {parent_mid})' : false,
  266. ),
  267. 'source_id' => array
  268. (
  269. 'type' => 'int-11',
  270. 'name' => '注册来源',
  271. 'default' => '-1',
  272. 'desc' => '注册来源',
  273. 'match' => 'is_numeric',
  274. 'search' => 'select',
  275. 'update' => 'radio',
  276. 'option' => $source_id,
  277. // 'list' => true,
  278. // 'list_order' => 5,
  279. // 'show' => 'invite_type=2',
  280. ),
  281. 'name' => array
  282. (
  283. 'type' => 'varchar-100',
  284. 'name' => '姓名',
  285. 'default' => '',
  286. 'desc' => '姓名',
  287. 'match' => 'is_string',
  288. 'update' => 'text',
  289. //'search' => 'fulltext',
  290. 'list' => $search_auth == 2 ? true : false,
  291. 'list_order' => 1,
  292. ),
  293. 'role' => array
  294. (
  295. 'type' => 'int-11',
  296. 'name' => '代理角色',
  297. 'default' => '',
  298. 'desc' => '代理角色',
  299. 'match' => 'is_numeric',
  300. 'search' => 'select',
  301. 'update' => 'select',
  302. 'option' => $role,
  303. 'list' => $search_auth == 2 ? true : false,
  304. 'list_order' => 3,
  305. ),
  306. 'area' => array
  307. (
  308. 'type' => 'varchar-500',
  309. 'name' => '代理区域',
  310. 'default' => '',
  311. 'desc' => '代理区域',
  312. 'match' => 'option',
  313. 'search' => 'linkage',
  314. 'update' => 'linkage',
  315. 'option' => Dever::url('api.get?level_total=4', 'area'),
  316. 'list' => $search_auth == 2 ? 'Dever::load("agent/lib/order.getArea", {id})' : false,
  317. 'list_order' => 3,
  318. ),
  319. 'desc' => array
  320. (
  321. 'type' => 'varchar-600',
  322. 'name' => '付款备注',
  323. 'default' => '',
  324. 'desc' => '付款备注',
  325. 'match' => 'is_string',
  326. 'update' => 'text',
  327. ),
  328. 'f_price' => array
  329. (
  330. 'type' => 'decimal-11,2',
  331. 'name' => '原价',
  332. 'default' => '0',
  333. 'desc' => '原价',
  334. 'match' => 'option',
  335. 'update' => 'text',
  336. ),
  337. 'price' => array
  338. (
  339. 'type' => 'decimal-11,2',
  340. 'name' => '金额',
  341. 'default' => '0',
  342. 'desc' => '金额',
  343. 'match' => 'option',
  344. 'update' => 'text',
  345. // 'list' => true,
  346. //'list_name' => '应付金额<br />实付金额<br />代理费<br />软件服务费<br />',
  347. 'list_name' => $search_auth == 1 ? '实付金额' : '总销售额',
  348. 'list' => true,
  349. // 'list' =>'Dever::load("agent/lib/order.set_price", {id})',
  350. 'list_order' => 100,
  351. ),
  352. 'pay_type' => array
  353. (
  354. 'type' => 'tinyint-1',
  355. 'name' => '支付方式',
  356. 'default' => '1',
  357. 'desc' => '支付方式',
  358. 'match' => 'is_numeric',
  359. //'search' => 'select',
  360. //'update' => 'select',
  361. 'option' => $pay_type,
  362. //'list' => true,
  363. //'list_order' => 7,
  364. ),
  365. 'pay_pic' => array
  366. (
  367. 'type' => 'text-255',
  368. 'name' => '打款凭证',
  369. 'default' => '',
  370. 'desc' => '打款凭证',
  371. 'match' => 'option',
  372. 'update' => 'images',
  373. 'key' => '1',
  374. //'place' => '150',
  375. ),
  376. 'pay_price' => array
  377. (
  378. 'type' => 'decimal-11,2',
  379. 'name' => '交款金额',
  380. 'default' => '0',
  381. 'desc' => '交款金额',
  382. 'match' => 'option',
  383. 'update' => 'text',
  384. ),
  385. 'option_price' => array
  386. (
  387. 'type' => 'decimal-11,2',
  388. 'name' => '赠送期权价值',
  389. 'default' => '0',
  390. 'desc' => '金额',
  391. 'match' => 'option',
  392. 'update' => 'text',
  393. // 'value' => Dever::input('soft_price', '0'),
  394. // 'show' => 'cstatus=2',
  395. ),
  396. 'bank_id' => array
  397. (
  398. 'type' => 'int-11',
  399. 'name' => '所属银行',
  400. 'default' => '',
  401. 'desc' => '所属银行',
  402. 'match' => 'is_numeric',
  403. ),
  404. 'bank_card' => array
  405. (
  406. 'type' => 'int-11',
  407. 'name' => '银行卡号',
  408. 'default' => '',
  409. 'desc' => '银行卡号',
  410. 'match' => 'is_numeric',
  411. ),
  412. 'type' => array
  413. (
  414. 'type' => 'tinyint-1',
  415. 'name' => '类型',
  416. 'default' => '1',
  417. 'desc' => '类型',
  418. 'match' => 'is_numeric',
  419. 'option' => $type,
  420. 'update' => 'radio',
  421. 'control' => 'type',
  422. ),
  423. 'sign' => array
  424. (
  425. 'type' => 'varchar-150',
  426. 'name' => '手写签名',
  427. 'default' => '',
  428. 'desc' => '手写签名',
  429. 'match' => 'option',
  430. 'update' => 'image',
  431. 'key' => '7',
  432. ),
  433. 'idcard' => array
  434. (
  435. 'type' => 'varchar-100',
  436. 'name' => '身份证号码',
  437. 'default' => '',
  438. 'desc' => '身份证号码',
  439. 'match' => 'is_string',
  440. 'match' => Dever::rule('idcard'),
  441. 'update' => 'text',
  442. //'search' => 'fulltext',
  443. ),
  444. 'idcard_front' => array
  445. (
  446. 'type' => 'varchar-150',
  447. 'name' => '身份证正面',
  448. 'default' => '',
  449. 'desc' => '身份证正面',
  450. 'match' => 'option',
  451. 'update' => 'image',
  452. 'key' => '8',
  453. //'place' => '660*660',
  454. ),
  455. 'idcard_back' => array
  456. (
  457. 'type' => 'varchar-150',
  458. 'name' => '身份证背面',
  459. 'default' => '',
  460. 'desc' => '身份证背面',
  461. 'match' => 'option',
  462. 'update' => 'image',
  463. 'key' => '8',
  464. //'place' => '660*660',
  465. ),
  466. 'company_name' => array
  467. (
  468. 'type' => 'varchar-100',
  469. 'name' => '公司名称',
  470. 'default' => '',
  471. 'desc' => '公司名称',
  472. 'match' => 'is_string',
  473. 'update' => 'text',
  474. //'search' => 'fulltext',
  475. //'list' => true,
  476. 'show' => 'type=2',
  477. ),
  478. 'company_pic' => array
  479. (
  480. 'type' => 'varchar-150',
  481. 'name' => '营业执照',
  482. 'default' => '',
  483. 'desc' => '营业执照',
  484. 'match' => 'option',
  485. 'update' => 'image',
  486. 'key' => '8',
  487. //'place' => '660*660',
  488. 'show' => 'type=2',
  489. ),
  490. 'company_number' => array
  491. (
  492. 'type' => 'varchar-80',
  493. 'name' => '营业执照号码',
  494. 'default' => '',
  495. 'desc' => '营业执照号码',
  496. 'match' => 'is_string',
  497. 'update' => 'text',
  498. 'show' => 'type=2',
  499. ),
  500. 'address' => array
  501. (
  502. 'type' => 'varchar-800',
  503. 'name' => '地址',
  504. 'default' => '',
  505. 'desc' => '地址',
  506. 'match' => 'is_string',
  507. 'update' => 'text',
  508. ),
  509. 'audit_desc' => array
  510. (
  511. 'type' => 'varchar-400',
  512. 'name' => '审核备注-从order_process中同步过来',
  513. 'default' => '',
  514. 'desc' => '审核备注',
  515. 'match' => 'is_string',
  516. //'update' => 'textarea',
  517. ),
  518. 'admin_desc' => array
  519. (
  520. 'type' => 'varchar-800',
  521. 'name' => '管理员备注',
  522. 'default' => '',
  523. 'desc' => '管理员备注',
  524. 'match' => 'is_string',
  525. 'update' => 'textarea',
  526. ),
  527. 'status' => array
  528. (
  529. 'type' => 'tinyint-1',
  530. 'name' => '订单状态',
  531. 'default' => '1',
  532. 'desc' => '状态',
  533. 'match' => 'is_numeric',
  534. 'option' => $status,
  535. 'search' => 'select',
  536. 'list' => $search_auth == 1 ? true : false,
  537. 'list_order' => 8,
  538. ),
  539. 'history_status' => array
  540. (
  541. 'type' => 'tinyint-1',
  542. 'name' => '记录挂起之前的状态',
  543. 'default' => '1',
  544. 'desc' => '状态',
  545. 'match' => 'is_numeric',
  546. 'option' => $status,
  547. ),
  548. 'goods_status' => array
  549. (
  550. 'type' => 'tinyint-1',
  551. 'name' => '权益状态',
  552. 'default' => '1',
  553. 'desc' => '权益状态',
  554. 'match' => 'is_numeric',
  555. 'option' => $goods_status,
  556. 'search' => 'select',
  557. 'list' => $search_auth == 1 ? true : false,
  558. 'list_order' => 9,
  559. ),
  560. 'pay_status' => array
  561. (
  562. 'type' => 'tinyint-1',
  563. 'name' => '支付状态',
  564. 'default' => '1',
  565. 'desc' => '状态',
  566. 'match' => 'is_numeric',
  567. 'option' => $pay_status,
  568. ),
  569. 'get_type' => array
  570. (
  571. 'type' => 'tinyint-1',
  572. 'name' => '获取方式',
  573. 'default' => '1',
  574. 'desc' => '获取方式',
  575. 'match' => 'is_numeric',
  576. 'update' => 'radio',
  577. 'option' => $get_type,
  578. ),
  579. 'agent_cash' => array
  580. (
  581. 'type' => 'decimal-11,2',
  582. 'name' => '代理费',
  583. 'default' => '0',
  584. 'desc' => '代理费',
  585. 'match' => 'option',
  586. 'update' => 'text',
  587. 'list' => $search_auth == 2 ? true : false,
  588. ),
  589. 'soft_cash' => array
  590. (
  591. 'type' => 'decimal-11,2',
  592. 'name' => '软件服务费',
  593. 'default' => '0',
  594. 'desc' => '软件服务费',
  595. 'match' => 'option',
  596. 'update' => 'text',
  597. 'list' => $search_auth == 2 ? '{soft_cash}' : false,
  598. ),
  599. 'goods_cash' => array
  600. (
  601. 'type' => 'decimal-11,2',
  602. 'name' => '商品价值-名额不算,商品价值第一次分配后保持不变',
  603. 'default' => '0',
  604. 'desc' => '商品价值',
  605. 'match' => 'option',
  606. 'update' => 'text',
  607. ),
  608. 'import' => array
  609. (
  610. 'type' => 'tinyint-1',
  611. 'name' => '是否导入',
  612. 'default' => '1',
  613. 'desc' => '是否导入',
  614. 'match' => 'is_numeric',
  615. 'option' => $import,
  616. 'update' => 'radio',
  617. ),
  618. 'dever_auth' => array
  619. (
  620. 'name' => '权限',
  621. 'default' => '',
  622. 'desc' => '类型',
  623. 'match' => 'is_string',
  624. 'search' => 'hidden',
  625. ),
  626. 'state' => array
  627. (
  628. 'type' => 'tinyint-1',
  629. 'name' => '状态',
  630. 'default' => '1',
  631. 'desc' => '请选择状态',
  632. 'match' => 'is_numeric',
  633. ),
  634. 'fdate' => array
  635. (
  636. 'type' => 'int-11',
  637. 'name' => '完成时间',
  638. 'default' => '',
  639. 'match' => 'is_numeric',
  640. 'search' => 'date',
  641. 'desc' => '',
  642. ),
  643. 'udate' => array
  644. (
  645. 'type' => 'int-11',
  646. 'name' => '更新时间',
  647. 'default' => '',
  648. 'match' => 'is_numeric',
  649. 'desc' => '',
  650. 'order' => 'desc',
  651. ),
  652. 'cdate' => array
  653. (
  654. 'type' => 'int-11',
  655. 'name' => '注册时间',
  656. 'match' => array('is_numeric', time()),
  657. 'default' => '',
  658. 'desc' => '',
  659. # 只有insert时才生效
  660. 'insert' => true,
  661. 'search' => 'date',
  662. // 'list' => 'date("Y-m-d H:i:s", {cdate})',
  663. 'list_name' => '注册时间<br />初审时间<br />终审时间<br />完成时间<br />',
  664. 'list' => $search_auth == 1 ? 'Dever::load("agent/lib/order.set_cdate", {id})' : false,
  665. 'list_order' => 200,
  666. ),
  667. ),
  668. 'alter' => array
  669. (
  670. 10 => array
  671. (
  672. array('update', 'price', 'price', 'decimal-11,2 0 实付金额'),
  673. array('update', 'f_price', 'f_price', 'decimal-11,2 0 原价'),
  674. array('update', 'agent_cash', 'agent_cash', 'decimal-11,2 0 代理费'),
  675. array('update', 'soft_cash', 'soft_cash', 'decimal-11,2 0 软件服务费'),
  676. array('update', 'goods_cash', 'goods_cash', 'decimal-11,2 0 商品价值'),
  677. array('update', 'pay_price', 'pay_price', 'decimal-11,2 0 交款金额'),
  678. array('update', 'option_price', 'option_price', 'decimal-11,2 0 赠送期权价值'),
  679. ),
  680. 11 => array
  681. (
  682. array('update', 'pay_pic', 'pay_pic', 'text-255 打款凭证'),
  683. ),
  684. 'version' => 11,
  685. ),
  686. 'manage' => array
  687. (
  688. //'list_table' => 'js',
  689. 'insert' => false,
  690. 'delete' => false,
  691. 'edit' => false,
  692. 'excel' => $excel,
  693. 'button' => $button,
  694. 'list_button' => $list_button,
  695. // (
  696. // //fast_list
  697. // 'list' => array('查看详情', '"order_process&project=agent&order_id={id}&page_type=1&[refer]"'),
  698. // //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
  699. // //'delete' => array('删除', '', '{status} == 1'),
  700. // ),
  701. ),
  702. 'request' => array
  703. (
  704. 'getNew' => array
  705. (
  706. # 匹配的正则或函数 选填项
  707. 'option' => array
  708. (
  709. 'mid' => 'yes',
  710. 'status' => array('yes', 'in'),
  711. 'state' => 1,
  712. ),
  713. 'order' => array('id' => 'desc'),
  714. 'type' => 'one',
  715. 'col' => '*',
  716. ),
  717. 'getTotal' => array
  718. (
  719. # 匹配的正则或函数 选填项
  720. 'option' => array
  721. (
  722. 'mid' => 'yes',
  723. 'status' => array('yes', 'in'),
  724. 'state' => 1,
  725. ),
  726. 'order' => array('id' => 'desc'),
  727. 'type' => 'count',
  728. 'col' => '*',
  729. ),
  730. 'getData' => array
  731. (
  732. # 匹配的正则或函数 选填项
  733. 'option' => array
  734. (
  735. 'mid' => 'yes',
  736. 'status' => array('yes', 'in'),
  737. 'state' => 1,
  738. ),
  739. 'order' => array('id' => 'desc'),
  740. 'page' => array(10, 'list'),
  741. 'type' => 'all',
  742. 'col' => '*',
  743. ),
  744. # 获取订单数量
  745. 'getNum' => array
  746. (
  747. # 匹配的正则或函数 选填项
  748. 'option' => array
  749. (
  750. 'start' => array('yes-cdate', '>='),
  751. 'end' => array('yes-cdate', '<='),
  752. 'fstart' => array('yes-fdate', '>='),
  753. 'fend' => array('yes-fdate', '<='),
  754. 'role' => 'yes',
  755. 'status' => array('yes', 'in'),
  756. 'state' => 1,
  757. ),
  758. 'type' => 'count',
  759. 'col' => '*',
  760. ),
  761. # 获取订单数量
  762. 'getCash' => array
  763. (
  764. # 匹配的正则或函数 选填项
  765. 'option' => array
  766. (
  767. 'start' => array('yes-cdate', '>='),
  768. 'end' => array('yes-cdate', '<='),
  769. 'fstart' => array('yes-fdate', '>='),
  770. 'fend' => array('yes-fdate', '<='),
  771. 'role' => 'yes',
  772. 'status' => array('yes', 'in'),
  773. 'state' => 1,
  774. ),
  775. 'type' => 'one',
  776. 'col' => 'sum(price) as total',
  777. ),
  778. 'getDailiCash' => array
  779. (
  780. # 匹配的正则或函数 选填项
  781. 'option' => array
  782. (
  783. 'start' => array('yes-cdate', '>='),
  784. 'end' => array('yes-cdate', '<='),
  785. 'fstart' => array('yes-fdate', '>='),
  786. 'fend' => array('yes-fdate', '<='),
  787. 'status' => array('yes', 'in'),
  788. 'state' => 1,
  789. ),
  790. 'type' => 'one',
  791. 'col' => 'sum(agent_cash) as total',
  792. ),
  793. #期权价值
  794. 'getOptionPrice' => array
  795. (
  796. # 匹配的正则或函数 选填项
  797. 'option' => array
  798. (
  799. 'start' => array('yes-cdate', '>='),
  800. 'end' => array('yes-cdate', '<='),
  801. 'fstart' => array('yes-fdate', '>='),
  802. 'fend' => array('yes-fdate', '<='),
  803. 'status' => array('yes', 'in'),
  804. 'role' => 'yes',
  805. 'state' => 1,
  806. ),
  807. 'type' => 'one',
  808. 'col' => 'sum(option_price) as total',
  809. ),
  810. 'getSoftCash' => array
  811. (
  812. # 匹配的正则或函数 选填项
  813. 'option' => array
  814. (
  815. 'start' => array('yes-cdate', '>='),
  816. 'end' => array('yes-cdate', '<='),
  817. 'fstart' => array('yes-fdate', '>='),
  818. 'fend' => array('yes-fdate', '<='),
  819. 'status' => array('yes', 'in'),
  820. 'role' => 'yes',
  821. 'state' => 1,
  822. ),
  823. 'type' => 'one',
  824. 'col' => 'sum(soft_cash) as total',
  825. ),
  826. 'getSoftNoCash' => array
  827. (
  828. # 匹配的正则或函数 选填项
  829. 'option' => array
  830. (
  831. 'fstart' => array('yes-cdate', '>='),
  832. 'fend' => array('yes-cdate', '<='),
  833. 'status' => array('yes', 'in'),
  834. 'state' => 1,
  835. ),
  836. 'type' => 'one',
  837. 'col' => 'sum(soft_cash) as total',
  838. ),
  839. 'getSoftNum' => array
  840. (
  841. # 匹配的正则或函数 选填项
  842. 'option' => array
  843. (
  844. 'fstart' => array('yes-fdate', '>='),
  845. 'fend' => array('yes-fdate', '<='),
  846. 'soft_cash' => array('yes', '>='),
  847. 'status' => array('yes','in'),
  848. 'state' => 1,
  849. ),
  850. 'type' => 'count',
  851. 'col' => '*',
  852. ),
  853. 'getSoftNoNum' => array
  854. (
  855. # 匹配的正则或函数 选填项
  856. 'option' => array
  857. (
  858. 'fstart' => array('yes-cdate', '>='),
  859. 'fend' => array('yes-cdate', '<='),
  860. 'soft_cash' => array('yes', '>='),
  861. 'status' => array('yes','in'),
  862. 'state' => 1,
  863. ),
  864. 'type' => 'count',
  865. 'col' => '*',
  866. ),
  867. 'getGoodsCash' => array
  868. (
  869. # 匹配的正则或函数 选填项
  870. 'option' => array
  871. (
  872. 'start' => array('yes-cdate', '>='),
  873. 'end' => array('yes-cdate', '<='),
  874. 'fstart' => array('yes-fdate', '>='),
  875. 'fend' => array('yes-fdate', '<='),
  876. 'status' => array('yes', 'in'),
  877. 'state' => 1,
  878. ),
  879. 'type' => 'one',
  880. 'col' => 'sum(goods_cash) as total',
  881. ),
  882. 'getFindOne' => array
  883. (
  884. # 匹配的正则或函数 选填项
  885. 'option' => array
  886. (
  887. 'id' => array('yes','!='),
  888. 'mid' => 'yes',
  889. 'order_type' => 'yes',
  890. 'state' => 1,
  891. ),
  892. 'type' => 'one',
  893. 'order' => array('cdate' => 'desc'),
  894. 'col' => '*',
  895. ),
  896. 'getPrice' => array
  897. (
  898. # 匹配的正则或函数 选填项
  899. 'option' => array
  900. (
  901. 'mid' => 'yes',
  902. 'status' => 4,
  903. 'state' => 1,
  904. ),
  905. 'type' => 'one',
  906. 'col' => 'sum(price) as total',
  907. ),
  908. 'getCount' => array
  909. (
  910. # 匹配的正则或函数 选填项
  911. 'option' => array
  912. (
  913. 'start' => array('yes-fdate','>='),
  914. 'end' => array('yes-fdate','<='),
  915. 'mid' => 'yes',
  916. 'parent_mid' => 'yes',
  917. 'state' => 1,
  918. ),
  919. 'type' => 'one',
  920. 'col' => 'sum(price) as total',
  921. ),
  922. 'getVCount' => array
  923. (
  924. # 匹配的正则或函数 选填项
  925. 'option' => array
  926. (
  927. 'start' => array('yes-fdate','>='),
  928. 'end' => array('yes-fdate','<='),
  929. 'mid' => 'yes',
  930. 'parent_mid' => 'yes',
  931. 'role' => array('yes','in'),
  932. 'status' => 4,
  933. 'state' => 1,
  934. ),
  935. 'type' => 'one',
  936. 'col' => 'sum(price) as total',
  937. ),
  938. 'getExcelAll' => array
  939. (
  940. # 匹配的正则或函数 选填项
  941. 'option' => array
  942. (
  943. 'start' => array('yes-cdate', '>='),
  944. 'end' => array('yes-cdate', '<='),
  945. 'fstart' => array('yes-fdate', '>='),
  946. 'fend' => array('yes-fdate', '<='),
  947. 'status' => array('yes', 'in'),
  948. 'state' => 1,
  949. ),
  950. 'type' => 'all',
  951. 'col' => '*',
  952. ),
  953. 'getSum' => array
  954. (
  955. # 匹配的正则或函数 选填项
  956. 'option' => array
  957. (
  958. 'start' => array('yes-fdate', '>='),
  959. 'end' => array('yes-fdate', '<='),
  960. 'fstart' => array('yes-fdate', '>='),
  961. 'fend' => array('yes-fdate', '<='),
  962. 'status' => array('yes', 'in'),
  963. 'role' => 'yes',
  964. 'state' => 1,
  965. ),
  966. 'type' => 'one',
  967. 'col' => 'sum(price) as total',
  968. ),
  969. 'getAll' => array
  970. (
  971. # 匹配的正则或函数 选填项
  972. 'option' => array
  973. (
  974. 'start' => array('yes-fdate','>='),
  975. 'end' => array('yes-fdate','<='),
  976. 'mid' => 'yes',
  977. 'area' => array('yes','in'),
  978. 'role' => array('yes','in'),
  979. 'state' => 1,
  980. ),
  981. 'type' => 'all',
  982. 'page' => array(20,'list'),
  983. 'col' => 'id,mid,name,mobile,idcard,soft_cash,option_price,price,area,role,agent_cash',
  984. ),
  985. 'getDataByNew' => array
  986. (
  987. # 匹配的正则或函数 选填项
  988. 'option' => array
  989. (
  990. 'id' => 'yes',
  991. 'ids' => array('yes-id', '>='),
  992. 'status' => 4,
  993. 'state' => 1,
  994. ),
  995. 'order' => array('id' => 'asc'),
  996. 'type' => 'all',
  997. //'limit' => '0,2',
  998. 'col' => '*',
  999. ),
  1000. 'getDataBySoft' => array
  1001. (
  1002. # 匹配的正则或函数 选填项
  1003. 'option' => array
  1004. (
  1005. 'soft_cash' => array('yes', '>='),
  1006. 'status' => 4,
  1007. 'state' => 1,
  1008. ),
  1009. 'order' => array('id' => 'asc'),
  1010. 'type' => 'all',
  1011. 'col' => '*',
  1012. ),
  1013. ),
  1014. );