user_bind.php 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <?php
  2. $status = array
  3. (
  4. 1 => '未核实',
  5. 2 => '已核实',
  6. 3 => '驳回',
  7. );
  8. $manage_audit = array
  9. (
  10. //1 => '未核实',
  11. 2 => '已核实',
  12. 3 => '驳回',
  13. );
  14. $type = array
  15. (
  16. 1 => '个人',
  17. 2 => '公司',
  18. );
  19. $col = Dever::input('col');
  20. $admin = Dever::load('manage/auth.info');
  21. $admin_auth = false;
  22. if ($admin && $admin['role'] == 24){
  23. $admin_auth = $admin['role'];
  24. }
  25. return array
  26. (
  27. # 表名
  28. 'name' => 'user_bind',
  29. # 显示给用户看的名称
  30. 'lang' => '零售绑定认证',
  31. 'end' => array
  32. (
  33. 'update' => 'agent/lib/manage.updateUserBind',
  34. ),
  35. 'status' => $status,
  36. 'order' => 1,
  37. # 数据结构
  38. 'struct' => array
  39. (
  40. 'id' => array
  41. (
  42. 'type' => 'int-11',
  43. 'name' => 'ID',
  44. 'default' => '',
  45. 'desc' => '',
  46. 'match' => 'is_numeric',
  47. 'search' => 'order',
  48. //'list' => true,
  49. ),
  50. 'uid' => array
  51. (
  52. 'type' => 'int-11',
  53. 'name' => '绑定用户',
  54. 'default' => '',
  55. 'desc' => '绑定用户',
  56. 'match' => 'is_numeric',
  57. 'update' => 'text',
  58. 'list_name' => '昵称',
  59. 'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  60. 'list_order' => 1,
  61. ),
  62. 'mid' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => '代理商姓名/手机号',
  66. 'default' => '-1',
  67. 'desc' => '代理商',
  68. 'match' => 'is_string',
  69. 'update' => 'text',
  70. 'search' => array
  71. (
  72. 'api' => 'agent/member-getSearch',
  73. 'col' => 'col',
  74. 'result' => 'id',
  75. 'search' => 'mid',
  76. ),
  77. 'list_name' => '代理商信息',
  78. 'list' => $admin_auth ? 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true,true)' : 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  79. 'list_order' => 3,
  80. ),
  81. 'name' => array
  82. (
  83. 'type' => 'varchar-100',
  84. 'name' => '绑定姓名',
  85. 'default' => '',
  86. 'desc' => '姓名',
  87. 'match' => 'is_string',
  88. 'update' => 'text',
  89. //'search' => 'fulltext',
  90. //'list' => true,
  91. 'list_order' => 4,
  92. ),
  93. 'mobile' => array
  94. (
  95. 'type' => 'bigint-11',
  96. 'name' => '手机号',
  97. 'default' => '',
  98. 'desc' => '请输入手机号',
  99. 'match' => Dever::rule('mobile'),
  100. 'update' => 'text',
  101. //'search' => 'fulltext',
  102. 'list' => true,
  103. 'list_order' => 2,
  104. ),
  105. 'type' => array
  106. (
  107. 'type' => 'tinyint-1',
  108. 'name' => '类型',
  109. 'default' => '1',
  110. 'desc' => '类型',
  111. 'match' => 'is_numeric',
  112. 'option' => $type,
  113. 'update' => 'radio',
  114. 'control' => 'type',
  115. ),
  116. 'idcard' => array
  117. (
  118. 'type' => 'varchar-32',
  119. 'name' => '身份证号码',
  120. 'default' => '',
  121. 'desc' => '身份证号码',
  122. 'match' => 'is_string',
  123. 'update' => 'text',
  124. 'search' => 'fulltext',
  125. 'list' => true,
  126. 'list_order' => 5,
  127. ),
  128. 'idcard_front' => array
  129. (
  130. 'type' => 'varchar-150',
  131. 'name' => '身份证正面',
  132. 'default' => '',
  133. 'desc' => '身份证正面',
  134. 'match' => 'option',
  135. 'update' => 'image',
  136. 'key' => '8',
  137. 'place' => '660*660',
  138. ),
  139. 'idcard_back' => array
  140. (
  141. 'type' => 'varchar-150',
  142. 'name' => '身份证背面',
  143. 'default' => '',
  144. 'desc' => '身份证背面',
  145. 'match' => 'option',
  146. 'update' => 'image',
  147. 'key' => '8',
  148. 'place' => '660*660',
  149. ),
  150. 'company_name' => array
  151. (
  152. 'type' => 'varchar-100',
  153. 'name' => '公司名称',
  154. 'default' => '',
  155. 'desc' => '公司名称',
  156. 'match' => 'is_string',
  157. 'update' => 'text',
  158. //'search' => 'fulltext',
  159. //'list' => true,
  160. 'show' => 'type=2',
  161. ),
  162. 'company_pic' => array
  163. (
  164. 'type' => 'varchar-150',
  165. 'name' => '营业执照',
  166. 'default' => '',
  167. 'desc' => '营业执照',
  168. 'match' => 'option',
  169. 'update' => 'image',
  170. 'key' => '8',
  171. 'place' => '660*660',
  172. 'show' => 'type=2',
  173. ),
  174. 'company_number' => array
  175. (
  176. 'type' => 'varchar-80',
  177. 'name' => '营业执照号码',
  178. 'default' => '',
  179. 'desc' => '营业执照号码',
  180. 'match' => 'is_string',
  181. 'update' => 'text',
  182. 'show' => 'type=2',
  183. ),
  184. 'status' => array
  185. (
  186. 'type' => 'tinyint-1',
  187. 'name' => '状态',
  188. 'default' => '1',
  189. 'desc' => '状态',
  190. 'match' => 'is_numeric',
  191. 'option' => $status,
  192. 'search' => 'select',
  193. 'list' => true,
  194. ),
  195. 'audit' => array
  196. (
  197. 'type' => 'int-11',
  198. 'name' => '审核状态',
  199. 'default' => '2',
  200. 'desc' => '审核状态',
  201. 'match' => 'is_numeric',
  202. 'update' => $col ? 'radio' : false,
  203. 'option' => $manage_audit,
  204. 'mul' => true,
  205. 'control' => 'audit',
  206. ),
  207. 'audit_desc' => array
  208. (
  209. 'type' => 'varchar-600',
  210. 'name' => '备注',
  211. 'default' => '',
  212. 'desc' => '审核说明',
  213. 'match' => 'is_string',
  214. 'update' => $col ? 'textarea' : false,
  215. // 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  216. // 'list_order' => 9,
  217. 'show' => 'audit=3',
  218. ),
  219. 'audit_date' => array
  220. (
  221. 'type' => 'int-11',
  222. 'name' => '审核时间',
  223. 'default' => '',
  224. 'match' => 'is_numeric',
  225. 'desc' => '审核时间',
  226. ),
  227. 'admin' => array
  228. (
  229. 'type' => 'int-11',
  230. 'name' => '操作人',
  231. 'default' => '',
  232. 'match' => 'is_numeric',
  233. 'desc' => '操作人',
  234. //'list' => '"{admin}" > 0 ? Dever::load("manage/admin-find#username", {admin}) : "-"',
  235. ),
  236. 'state' => array
  237. (
  238. 'type' => 'tinyint-1',
  239. 'name' => '状态',
  240. 'default' => '1',
  241. 'desc' => '请选择状态',
  242. 'match' => 'is_numeric',
  243. ),
  244. 'cdate' => array
  245. (
  246. 'type' => 'int-11',
  247. 'name' => '申请日期',
  248. 'match' => array('is_numeric', time()),
  249. 'desc' => '',
  250. # 只有insert时才生效
  251. 'insert' => true,
  252. 'search' => 'date',
  253. 'list' => 'date("Y-m-d H:i", {cdate})',
  254. 'list_order' => 3,
  255. ),
  256. ),
  257. 'manage' => array
  258. (
  259. 'insert' => false,
  260. 'delete' => false,
  261. 'edit' => false,
  262. 'page_list' => 'user_bind',
  263. 'list_button' => array
  264. (
  265. 'list' => array('查看详情', '"user_bind&id={id}&page_type=1"'),
  266. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
  267. 'edit' => array('审核', 'audit,audit_desc', '{status} == 1'),
  268. //'delete' => array('删除关联', '', '{status} == 2'),
  269. ),
  270. ),
  271. 'request' => array
  272. (
  273. 'getInfo' => array
  274. (
  275. # 匹配的正则或函数 选填项
  276. 'option' => array
  277. (
  278. 'status' => 2,
  279. 'state' => 1,
  280. ),
  281. 'order' => array('id' => 'desc'),
  282. 'type' => 'one',
  283. 'col' => '*',
  284. ),
  285. 'getData' => array
  286. (
  287. # 匹配的正则或函数 选填项
  288. 'option' => array
  289. (
  290. 'idcard' => 'yes',
  291. 'id' => array('yes', '!='),
  292. 'status' => 2,
  293. 'state' => 1,
  294. ),
  295. 'order' => array('id' => 'desc'),
  296. 'type' => 'all',
  297. 'page' => array(20, 'list'),
  298. 'col' => '*',
  299. ),
  300. ),
  301. );