order.php 36 KB

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