order.php 35 KB

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