marketuser.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active">
  7. <if condition="$Request.action eq 'marketuser' ">
  8. <a> 分销用户</a>
  9. <elseif condition="$Request.action eq 'marketoneuser' ">
  10. <a> 一级分销用户</a>
  11. <elseif condition="$Request.action eq 'markettwouser' ">
  12. <a> 二级分销用户</a>
  13. </if>
  14. </li>
  15. </ul>
  16. <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index',array('u'=>1))}">
  17. <!-- 用户ID:
  18. <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
  19. placeholder="请输入用户ID"> -->
  20. 关键字:
  21. <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}" placeholder="昵称/真实姓名/手机">
  22. <input type="submit" class="btn btn-primary" value="搜索"/>
  23. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  24. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>2))}">清空</a>
  25. <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  26. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>3))}">清空</a>
  27. <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
  28. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>4))}">清空</a>
  29. <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  30. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>5))}">清空</a>
  31. <else/>
  32. <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>1))}">清空</a>
  33. </if>
  34. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  35. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>2))}">导出</a>
  36. <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  37. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>3))}">导出</a>
  38. <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
  39. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>4))}">导出</a>
  40. <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  41. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>5))}">导出</a>
  42. <else/>
  43. <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>1))}">导出</a>
  44. </if>
  45. <a class="btn btn-danger" onclick="doDelete()">批量删除</a>
  46. <!-- <a class="btn btn-danger" href="{:url('user/adminIndex/index')}" style="border-color:#7349B8;background-color:#7349B8">已冻结的用户</a> -->
  47. <!--
  48. <a class="btn btn-danger" id="showcho" style="border-color:#7349B8;background-color:#7349B8">条件筛选</a> -->
  49. <div id="showchoice" style="display: none; margin-top: 10px;">
  50. <php>$educationarray=array(1=>'大专',2=>'本科',3=>'硕士',4=>'博士');</php>
  51. <php>$marriedarray=array(1=>'未婚',2=>'离异',3=>'离异有孩子');</php>
  52. <php>$propertyarray=array(0=>'无',1=>'有房',2=>'有车',3=>'有房有车');</php>
  53. <php>$agearray=array('1980','1981','1982','1983','1984','1985','1986','1987','1988','1989','1990','1991','1992','1993','1994','1995','1996','1997','1998','1999','2000');</php>
  54. <php>$sexarray=array(1=>'男',2=>'女');</php>
  55. <div>
  56. <div style="margin-top: 10px;">
  57. <!-- 年龄: <input class="form-control js-bootstrap-datetime" type="text" name="age1" style="width: 150px;margin-right:10px;" value="" placeholder="请选择年龄">
  58. <font style="color: red">至</font> &nbsp;
  59. <input class="form-control js-bootstrap-datetime" type="text" name="age2" style="width: 150px;margin-right:25px;" value="" placeholder="请选择年龄"> -->
  60. 年龄: <select class="form-control" name="age1" id="age1" style="width: 150px;margin-right:10px;">
  61. <option value="none">--请选择年龄--</option>
  62. <volist name="$agearray" id="vo">
  63. <option value="{$vo}">{$vo}</option>
  64. </volist>
  65. </select>
  66. <font style="color: red">至</font> &nbsp;
  67. <select class="form-control" name="age2" id="age2" style="width: 150px;margin-right:10px;">
  68. <option value="none">--请选择年龄--</option>
  69. <volist name="$agearray" id="vo">
  70. <option value="{$vo}">{$vo}</option>
  71. </volist>
  72. </select>
  73. 身高: <select class="form-control" name="height" id="height" style="width: 150px;margin-right:10px;">
  74. <option value="none">--请选择身高--</option>
  75. </select>
  76. <font style="color: red">至</font> &nbsp;
  77. <select class="form-control" name="heightt" id="heightt" style="width: 150px;margin-right:10px;">
  78. <option value="none">--请选择身高--</option>
  79. </select>
  80. </div>
  81. <div style="margin-top: 10px;">
  82. 学历: <select class="form-control" name="education" id="education" style="width: 150px;margin-right:10px;">
  83. <option value="none">--请选择学历--</option>
  84. <volist name="$educationarray" id="vo">
  85. <option value="{$key}">{$vo}</option>
  86. </volist>
  87. </select>
  88. 职业:
  89. <select class="form-control" name="occupation" style="margin-right: 15px;width: 150px;" id="position1">
  90. <option value="none">--请选择职位--</option>
  91. </select>
  92. 收入: <select class="form-control" name="salary" id="salary" style="width: 150px;margin-right:10px;">
  93. <option value="none">--请选择收入--</option>
  94. <option value="1">5-10w</option>
  95. <option value="2">10-20w</option>
  96. <option value="3">20-35w</option>
  97. <option value="4">35-55w</option>
  98. <option value="5">100w以上</option>
  99. </select>
  100. 资产: <select class="form-control" name="property" id="property" style="width: 150px;margin-right:10px;">
  101. <option value="none">--请选择资产--</option>
  102. <volist name="$propertyarray" id="vo">
  103. <option value="{$key}">{$vo}</option>
  104. </volist>
  105. </select>
  106. </div>
  107. <div style="margin-top: 10px;">
  108. 家乡: <input class="form-control" type="text" name="home_city" style="width: 150px;margin-right:10px;" value="" placeholder="请输入省/市">
  109. 居住地: <input class="form-control" type="text" name="city" style="width: 150px;margin-right:10px;" value="" placeholder="请输入市">
  110. 婚姻状况: <select class="form-control" name="married" id="married" style="width: 150px;margin-right:10px;">
  111. <option value="none">--请选择婚姻--</option>
  112. <volist name="$marriedarray" id="vo">
  113. <option value="{$key}">{$vo}</option>
  114. </volist>
  115. </select>
  116. 性别: <select class="form-control" name="sex" id="sex" style="width: 150px;margin-right:10px;">
  117. <option value="none">--请选择性别--</option>
  118. <volist name="$sexarray" id="vo">
  119. <option value="{$key}">{$vo}</option>
  120. </volist>
  121. </select>
  122. <a class="btn btn-warning" style=" padding: 3px 10px; border-color:#ca1883;background-color:#ca1883;color: #fff" id="nonecho">隐藏</a>
  123. </div>
  124. </div>
  125. </div>
  126. </form>
  127. <form method="post" class="js-ajax-form">
  128. <div class="table-actions">
  129. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  130. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  131. data-action="{:url('AdminIndex/tozhuxiao',array('yes'=>1))}" onclick="return confirm('确定要成为注销吗?')" data-subcheck="true">
  132. </button>
  133. </if>
  134. </div>
  135. <table class="table table-hover table-bordered">
  136. <thead>
  137. <tr>
  138. <th><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
  139. <th>ID</th>
  140. <th>账号</th>
  141. <th>{:lang('NICENAME')}</th>
  142. <th>真实姓名</th>
  143. <th>爱心</th>
  144. <th style="text-align: center;">是否推荐</th>
  145. <th style="text-align: center;">推荐人</th>
  146. <th style="text-align: center;">下级分销员数</th>
  147. <th style="text-align: center;">下级普通会员数</th>
  148. <th style="text-align: center;">可提佣金</th>
  149. <!-- <th>等级</th> -->
  150. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  151. <th>冻结原因</th>
  152. <else/>
  153. <th>手机</th>
  154. </if>
  155. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2 || $Request.param.u eq 4">
  156. <th>网址</th>
  157. </if>
  158. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  159. <th>冻结时间</th>
  160. <else/>
  161. <th>{:lang('REGISTRATION_TIME')}</th>
  162. </if>
  163. <!-- <th>登录时间</th> -->
  164. <th>{:lang('STATUS')}</th>
  165. <th>{:lang('ACTIONS')}</th>
  166. </tr>
  167. </thead>
  168. <tbody>
  169. <php>
  170. $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
  171. </php>
  172. <foreach name="list" item="vo">
  173. <tr>
  174. <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
  175. value="{$vo.id}" title="ID:{$vo.id}"></td>
  176. <td>{$vo.id}</td>
  177. <td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
  178. </td>
  179. <td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td>
  180. <td>{$vo['real_name']?$vo['real_name']:lang('NOT_FILLED')}</td>
  181. <td>{$vo['redheart']}</td>
  182. <td style="text-align: center;">
  183. <switch name="vo.is_tuijian">
  184. <case value="1">
  185. <span style="color: blue">是</span>
  186. </case>
  187. <case value="0">
  188. <span style="color: red">否</span>
  189. </case>
  190. </switch>
  191. </td>
  192. <td style="text-align: center;">
  193. <if condition="$vo.marketusername.user_nickname eq ''">
  194. <span style="color: red">无</span>
  195. <else/>
  196. <span style="color: blue">{$vo.marketusername.user_nickname}</span>
  197. </if>
  198. </td>
  199. <td style="text-align: center;">
  200. <if condition="$vo.marketcount eq 0">
  201. <a href="#">{$vo.marketcount}</a>
  202. <else/>
  203. <a href="{:url('Market/marketoneuser',array('id'=>$vo.id,'user_nickname'=>$vo.user_nickname,'agent_type'=>1))}">{$vo.marketcount}</a>
  204. </if>
  205. </td>
  206. <td style="text-align: center;">
  207. <if condition="$vo.marketusercount eq 0">
  208. <a href="#">{$vo.marketusercount}</a>
  209. <else/>
  210. <a href="{:url('Market/marketoneuser',array('id'=>$vo.id,'user_nickname'=>$vo.user_nickname,'agent_type'=>0))}">{$vo.marketusercount}</a>
  211. </if>
  212. </td>
  213. <td style="text-align: center;">
  214. {$vo.balance}
  215. </td>
  216. <!-- <td>{$vo.level}</td> -->
  217. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  218. <td><span style="color:red">{$vo.freezing}</span></td>
  219. <else/>
  220. <td>{$vo.mobile}</td>
  221. </if>
  222. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2 || $Request.param.u eq 4">
  223. <td>
  224. <span class="label label-primary copy-btn copy" data-url="{:url('/weixin/member/home?id=','','',true)}{$vo.id}">复制</span>
  225. </td>
  226. </if>
  227. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  228. <td>{$vo.updated_at}</td>
  229. <else/>
  230. <td>{:date('Y-m-d H:i',$vo['create_time'])}</td>
  231. </if>
  232. <!-- <td>{:date('Y-m-d H:i',$vo['last_login_time'])}</td> -->
  233. <!-- <td>
  234. <switch name="vo.idcard_check">
  235. <case value="1">
  236. <span style="color:red">未审</span>
  237. </case>
  238. <case value="2">
  239. <span style="color:green">已审</span>
  240. </case>
  241. <case value="3">
  242. <span style="color:#ef9413">驳回</span>
  243. </case>
  244. <case value="">
  245. <span style="color:blue">未填</span>
  246. </case>
  247. </switch>
  248. </td>
  249. <td>
  250. <switch name="vo.position_check">
  251. <case value="0">
  252. <span style="color:blue">未填</span>
  253. </case>
  254. <case value="1">
  255. <span style="color:red">未审</span>
  256. </case>
  257. <case value="2">
  258. <span style="color:green">已审</span>
  259. </case>
  260. <case value="3">
  261. <span style="color:#ef9413">驳回</span>
  262. </case>
  263. <case value="">
  264. <span style="color:blue">未填</span>
  265. </case>
  266. </switch>
  267. </td>
  268. <td>
  269. <switch name="vo.education_check">
  270. <case value="0">
  271. <span style="color:blue">未填</span>
  272. </case>
  273. <case value="1">
  274. <span style="color:red">未审</span>
  275. </case>
  276. <case value="2">
  277. <span style="color:green">已审</span>
  278. </case>
  279. <case value="3">
  280. <span style="color:#ef9413">驳回</span>
  281. </case>
  282. <case value="">
  283. <span style="color:blue">未填</span>
  284. </case>
  285. </switch>
  286. </td> -->
  287. <td>
  288. <if condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  289. <if condition="$vo.idcard eq '' || $vo.idcard eq null">
  290. <span style="color:green">身份已清除</span>
  291. <else/>
  292. <span style="color:red">身份未清除</span>
  293. </if>
  294. <else/>
  295. <switch name="vo.user_status">
  296. <case value="0">
  297. <span class="label label-danger">已冻结</span>
  298. </case>
  299. <case value="1">
  300. <span class="label label-success">{$user_statuses[$vo['user_status']]}</span>
  301. </case>
  302. <case value="2">
  303. <span class="label label-warning">{$user_statuses[$vo['user_status']]}</span>
  304. </case>
  305. </switch>
  306. </if>
  307. </td>
  308. <td>
  309. <if condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
  310. <a class="btn btn-xs btn-primary" href="{:url('user/adminIndex/edit',array('id'=>$vo['id']))}">编辑</a>
  311. <a class="btn btn-xs btn-warning js-ajax-dialog-btn" style="background-color: #d00a81;border-color:#d00a81" href="{:url('adminIndex/touserlogout',array('yes'=>1,'ids'=>$vo['id']))}" data-msg="确认清理该用户身份证信息?">清除身份证信息</a>
  312. <else/>
  313. <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
  314. <a class="btn btn-xs btn-primary" href="{:url('user/adminIndex/edit',array('id'=>$vo['id'],'u'=>2))}">编辑</a>
  315. <else/>
  316. <a class="btn btn-xs btn-primary" href="{:url('user/adminIndex/edit',array('id'=>$vo['id']))}">编辑</a>
  317. </if>
  318. <neq name="vo.id" value="1">
  319. <empty name="vo.user_status">
  320. <a class="btn btn-xs btn-success js-ajax-dialog-btn"
  321. href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
  322. data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
  323. <else/>
  324. <!-- <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
  325. href="{:url('adminIndex/ban',array('id'=>$vo['id']))}"
  326. data-msg="确认冻结该用户?">冻结</a> -->
  327. <!-- <a class="btn btn-xs btn-warning" onclick="getPaike({$vo['id']})"
  328. >冻结</a> -->
  329. </empty>
  330. <else/>
  331. <!-- <a class="btn btn-xs btn-warning disabled">冻结</a> -->
  332. </neq>
  333. <if condition="$Request.action eq 'userban' || $Request.param.u eq 3">
  334. <else/>
  335. <php> $adminId = cmf_get_current_admin_id(); </php>
  336. <!-- <if condition="$adminId eq 1">
  337. <a class="btn btn-xs btn-danger" href="{:url('adminIndex/accountadd',array('id'=>$vo['id']))}">爱心充值</a>
  338. </if> -->
  339. </if>
  340. <a class="btn btn-xs btn-danger" style="background-color: #5c0d8e;border-color:#5c0d8e" onclick="getPaike2({$vo['id']})">奖励充值</a>
  341. <if condition="$Request.action eq 'screen' || $Request.param.u eq 2">
  342. <a class="btn btn-xs btn-danger" style="background-color: #e807b8;border-color:#e807b8" onclick="getPaike2({$vo['id']})">备注</a>
  343. </if>
  344. </if>
  345. </td>
  346. </tr>
  347. </foreach>
  348. </tbody>
  349. </table>
  350. <div class="pagination">{$page}</div>
  351. </form>
  352. </div>
  353. <script src="__STATIC__/js/admin.js"></script>
  354. <script src="__STATIC__/js/clipboard.min.js"></script>
  355. <script src="__STATIC__/js/layer/layer.js"></script>
  356. <script>
  357. function doDelete() {
  358. // Wind.use('artDialog', function () {
  359. var ids = [];
  360. $(".js-check:checked").each(function () {
  361. var id = $(this).val();
  362. if (id > 0) {
  363. ids.push(id);
  364. }
  365. });
  366. if (ids.length <= 0) {
  367. showMsg('请先选择操作项');
  368. return false;
  369. }
  370. if(confirm('确定批量删除选择项?不可恢复')){
  371. $.post('/user/admin_index/del',{id:ids},function(res){
  372. if(res.code == 1){
  373. showMsg(res.msg);
  374. setTimeout(function () {
  375. location.reload();
  376. }, 800)
  377. }else{
  378. showMsg(res.msg);
  379. }
  380. },"json")
  381. }
  382. // });
  383. }
  384. function getPaike(id){
  385. var addUrl = "{:url('AdminIndex/ban')}?id="+id;
  386. layer.open({
  387. type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
  388. title: '条件筛选',
  389. shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
  390. shade: 0.8, //遮罩
  391. area: ['480px', '360px'],
  392. content: addUrl,
  393. end: function () { //最后执行reload
  394. location.reload();
  395. }
  396. });
  397. }
  398. $("#showcho").click(function(){
  399. $("#showchoice").show();
  400. });
  401. $("#nonecho").click(function(){
  402. $("#showchoice").hide();
  403. });
  404. /* function showMsg(msg, time){
  405. time = time? time : 1000;
  406. art.dialog({
  407. content: msg,
  408. icon: 'warning'
  409. });
  410. setTimeout(function () {
  411. }, time)
  412. }*/
  413. </script>
  414. <script >
  415. function getPaike2(id){
  416. openIframeLayer("{:url('market/marketshowreward')}?id=" + id , "", {
  417. area: ['600px', '300px'],
  418. // btn: ['确定', '取消'],
  419. })
  420. }
  421. </script>
  422. </body>
  423. </html>