order.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <?php
  2. $role = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('setting/role-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $status = array
  13. (
  14. 1 => '待业务初审',
  15. 2 => '待财务终审',
  16. 3 => '待权益发放',
  17. 4 => '已完成',
  18. 5 => '已作废',
  19. );
  20. $pay_status = array
  21. (
  22. 1 => '待支付',
  23. 2 => '已支付',
  24. 3 => '已退款',
  25. );
  26. $goods_status = array
  27. (
  28. 1 => '未发放',
  29. 2 => '无权益',
  30. 3 => '已发放',
  31. );
  32. $type = array
  33. (
  34. 1 => '个人',
  35. 2 => '公司',
  36. );
  37. $pay_type = array
  38. (
  39. 1 => '在线支付',
  40. 2 => '汇款',
  41. 3 => '个人转账',
  42. );
  43. $level = function()
  44. {
  45. $array = array
  46. (
  47. -1 => array
  48. (
  49. 'id' => -1,
  50. 'name' => '普通',
  51. ),
  52. );
  53. $data = Dever::load('setting/level-state');
  54. if($data)
  55. {
  56. $array += $data;
  57. }
  58. return $array;
  59. };
  60. $order_type = array
  61. (
  62. 1 => '新购',
  63. 2 => '升级',
  64. );
  65. return array
  66. (
  67. # 表名
  68. 'name' => 'order',
  69. # 显示给用户看的名称
  70. 'lang' => '代理商订单',
  71. 'set' => array
  72. (
  73. 'status' => $status,
  74. 'pay_status' => $pay_status,
  75. 'goods_status' => $goods_status,
  76. 'type' => $type,
  77. 'pay_type' => $pay_type,
  78. 'order_type' => $order_type,
  79. ),
  80. 'order' => 99,
  81. # 数据结构
  82. 'struct' => array
  83. (
  84. 'id' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => 'ID',
  88. 'default' => '',
  89. 'desc' => '',
  90. 'match' => 'is_numeric',
  91. 'search' => 'order',
  92. //'list' => true,
  93. ),
  94. 'mid' => array
  95. (
  96. 'type' => 'int-11',
  97. 'name' => '代理商',
  98. 'default' => '-1',
  99. 'desc' => '代理商',
  100. 'match' => 'is_string',
  101. 'update' => 'text',
  102. 'searchs' => array
  103. (
  104. 'api' => 'agent/member-select',
  105. 'col' => 'name',
  106. 'result' => 'id',
  107. ),
  108. //'list' => 'Dever::load("agent/member-find#name", {mid})',
  109. ),
  110. 'order_num' => array
  111. (
  112. 'type' => 'varchar-100',
  113. 'name' => '订单号',
  114. 'default' => '',
  115. 'desc' => '订单号',
  116. 'match' => 'is_string',
  117. 'update' => 'text',
  118. 'search' => 'fulltext',
  119. 'list' => true,
  120. ),
  121. 'order_type' => array
  122. (
  123. 'type' => 'tinyint-1',
  124. 'name' => '订单类型',
  125. 'default' => '1',
  126. 'desc' => '订单类型',
  127. 'match' => 'is_numeric',
  128. 'option' => $order_type,
  129. ),
  130. 'mobile' => array
  131. (
  132. 'type' => 'bigint-11',
  133. 'name' => '手机号',
  134. 'default' => '',
  135. 'desc' => '请输入手机号',
  136. 'match' => Dever::rule('mobile'),
  137. 'update' => 'text',
  138. 'search' => 'fulltext',
  139. 'list' => true,
  140. ),
  141. 'parent_mid' => array
  142. (
  143. 'type' => 'int-11',
  144. 'name' => '邀请人',
  145. 'default' => '-1',
  146. 'desc' => '邀请人',
  147. 'match' => 'is_string',
  148. 'update' => 'text',
  149. 'search' => array
  150. (
  151. 'api' => 'agent/member-select',
  152. 'col' => 'name',
  153. 'result' => 'id',
  154. ),
  155. 'list' => 'Dever::load("agent/member-find#name", {mid})',
  156. ),
  157. 'name' => array
  158. (
  159. 'type' => 'varchar-100',
  160. 'name' => '姓名',
  161. 'default' => '',
  162. 'desc' => '姓名',
  163. 'match' => 'is_string',
  164. 'update' => 'text',
  165. 'search' => 'fulltext',
  166. 'list' => true,
  167. ),
  168. 'role' => array
  169. (
  170. 'type' => 'int-11',
  171. 'name' => '代理角色',
  172. 'default' => '',
  173. 'desc' => '代理角色',
  174. 'match' => 'is_numeric',
  175. 'search' => 'select',
  176. 'update' => 'checkbox',
  177. 'option' => $role,
  178. 'list' => true,
  179. ),
  180. 'area' => array
  181. (
  182. 'type' => 'varchar-500',
  183. 'name' => '区域',
  184. 'default' => '',
  185. 'desc' => '区域',
  186. 'match' => 'option',
  187. 'search' => 'linkage',
  188. 'update' => 'linkage',
  189. 'option' => Dever::url('api.get?level_total=4', 'area'),
  190. 'list' => 'Dever::load("area/api.string", "{area}")',
  191. ),
  192. 'desc' => array
  193. (
  194. 'type' => 'varchar-600',
  195. 'name' => '付款备注',
  196. 'default' => '',
  197. 'desc' => '付款备注',
  198. 'match' => 'is_string',
  199. 'update' => 'text',
  200. ),
  201. 'price' => array
  202. (
  203. 'type' => 'varchar-50',
  204. 'name' => '金额',
  205. 'default' => '0',
  206. 'desc' => '金额',
  207. 'match' => 'option',
  208. 'update' => 'text',
  209. 'list' => true,
  210. ),
  211. 'pay_type' => array
  212. (
  213. 'type' => 'tinyint-1',
  214. 'name' => '支付方式',
  215. 'default' => '1',
  216. 'desc' => '支付方式',
  217. 'match' => 'is_numeric',
  218. 'search' => 'select',
  219. 'update' => 'select',
  220. 'option' => $pay_type,
  221. 'list' => true,
  222. ),
  223. 'pay_pic' => array
  224. (
  225. 'type' => 'varchar-150',
  226. 'name' => '打款凭证',
  227. 'default' => '',
  228. 'desc' => '打款凭证',
  229. 'match' => 'option',
  230. 'update' => 'image',
  231. 'key' => '1',
  232. 'place' => '150',
  233. ),
  234. 'bank_id' => array
  235. (
  236. 'type' => 'int-11',
  237. 'name' => '所属银行',
  238. 'default' => '',
  239. 'desc' => '所属银行',
  240. 'match' => 'is_numeric',
  241. ),
  242. 'bank_card' => array
  243. (
  244. 'type' => 'int-11',
  245. 'name' => '银行卡号',
  246. 'default' => '',
  247. 'desc' => '银行卡号',
  248. 'match' => 'is_numeric',
  249. ),
  250. 'type' => array
  251. (
  252. 'type' => 'tinyint-1',
  253. 'name' => '类型',
  254. 'default' => '1',
  255. 'desc' => '类型',
  256. 'match' => 'is_numeric',
  257. 'option' => $type,
  258. ),
  259. 'sign' => array
  260. (
  261. 'type' => 'varchar-150',
  262. 'name' => '手写签名',
  263. 'default' => '',
  264. 'desc' => '手写签名',
  265. 'match' => 'option',
  266. 'update' => 'image',
  267. 'key' => '7',
  268. ),
  269. 'idcard' => array
  270. (
  271. 'type' => 'varchar-100',
  272. 'name' => '身份证号码/营业执照号码',
  273. 'default' => '',
  274. 'desc' => '身份证号码',
  275. 'match' => 'is_string',
  276. 'update' => 'text',
  277. 'search' => 'fulltext',
  278. ),
  279. 'idcard_front' => array
  280. (
  281. 'type' => 'varchar-150',
  282. 'name' => '身份证正面',
  283. 'default' => '',
  284. 'desc' => '身份证正面',
  285. 'match' => 'option',
  286. 'update' => 'image',
  287. 'key' => '8',
  288. 'place' => '660*660',
  289. ),
  290. 'idcard_back' => array
  291. (
  292. 'type' => 'varchar-150',
  293. 'name' => '身份证背面',
  294. 'default' => '',
  295. 'desc' => '身份证背面',
  296. 'match' => 'option',
  297. 'update' => 'image',
  298. 'key' => '8',
  299. 'place' => '660*660',
  300. ),
  301. 'status' => array
  302. (
  303. 'type' => 'tinyint-1',
  304. 'name' => '订单状态',
  305. 'default' => '1',
  306. 'desc' => '状态',
  307. 'match' => 'is_numeric',
  308. 'option' => $status,
  309. 'search' => 'select',
  310. 'list' => true,
  311. ),
  312. 'goods_status' => array
  313. (
  314. 'type' => 'tinyint-1',
  315. 'name' => '权益状态',
  316. 'default' => '1',
  317. 'desc' => '权益状态',
  318. 'match' => 'is_numeric',
  319. 'option' => $goods_status,
  320. 'search' => 'select',
  321. 'list' => true,
  322. ),
  323. 'pay_status' => array
  324. (
  325. 'type' => 'tinyint-1',
  326. 'name' => '支付状态',
  327. 'default' => '1',
  328. 'desc' => '状态',
  329. 'match' => 'is_numeric',
  330. 'option' => $pay_status,
  331. ),
  332. 'state' => array
  333. (
  334. 'type' => 'tinyint-1',
  335. 'name' => '状态',
  336. 'default' => '1',
  337. 'desc' => '请选择状态',
  338. 'match' => 'is_numeric',
  339. ),
  340. 'fdate' => array
  341. (
  342. 'type' => 'int-11',
  343. 'name' => '完成时间',
  344. 'default' => '',
  345. 'match' => 'is_numeric',
  346. 'desc' => '',
  347. ),
  348. 'cdate' => array
  349. (
  350. 'type' => 'int-11',
  351. 'name' => '申请时间',
  352. 'match' => array('is_numeric', time()),
  353. 'desc' => '',
  354. # 只有insert时才生效
  355. //'insert' => true,
  356. 'search' => 'date',
  357. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  358. ),
  359. ),
  360. 'manage' => array
  361. (
  362. 'insert' => false,
  363. 'delete' => false,
  364. 'edit' => false,
  365. 'list_button' => array
  366. (
  367. //fast_list
  368. 'list' => array('查看详情', '"order_process&project=agent&order_id={id}&page_type=1"'),
  369. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
  370. //'delete' => array('删除', '', '{status} == 1'),
  371. ),
  372. ),
  373. 'request' => array
  374. (
  375. ),
  376. );