order.php 9.9 KB

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