order.php 34 KB

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