order.php 36 KB

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