leaguesmanage.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. {extend name="layout/base" /}
  2. {block name="detail_css"}
  3. <link rel="stylesheet" href="__STATIC__/css/admin/bootstrap.min.css?v={$Think.STATIC_VERSION}">
  4. <link rel="stylesheet" href="__STATIC__/css/admin/bootstrap-table.css?v={$Think.STATIC_VERSION}">
  5. <link rel="stylesheet" href="__STATIC__/css/FuzzySearch.css?v={$Think.STATIC_VERSION}">
  6. <title>商务管理</title>
  7. <style>
  8. label {
  9. padding-top: 10px;
  10. margin-left: 10px;
  11. }
  12. .x-so {
  13. text-align: unset;
  14. margin-bottom: 20px;
  15. }
  16. section {
  17. float: right;
  18. }
  19. .layui-icon {
  20. vertical-align: bottom;
  21. }
  22. .operation {
  23. border: 0;
  24. padding: 5px;
  25. color: #fff;
  26. border-radius: 5px;
  27. }
  28. .hide{
  29. display: none;
  30. }
  31. .layui-form-label{
  32. width: 120px;
  33. }
  34. .table>tbody>tr>td,
  35. .table>tbody>tr>th,
  36. .table>tfoot>tr>td,
  37. .table>tfoot>tr>th,
  38. .table>thead>tr>td,
  39. .table>thead>tr>th {
  40. padding: 8px;
  41. line-height: 1.42857143;
  42. vertical-align: middle;
  43. border-top: 1px solid #ddd;
  44. }
  45. table td,
  46. table th {
  47. text-align: center;
  48. }
  49. .detail-view td,
  50. .detail-view th {
  51. text-align: left;
  52. }
  53. .detail-view td p a:hover{
  54. cursor: pointer;
  55. }
  56. #modalContant img{
  57. height: 60px;
  58. width: 60px;
  59. cursor: pointer;
  60. }
  61. </style>
  62. <link rel="stylesheet" href="__STATIC__/css/admin/paginator.css?v={$Think.STATIC_VERSION}">
  63. {/block}
  64. {block name="content"}
  65. <div class="x-body">
  66. <form class="layui-form" method="get" action="{:url('leaguesmanage')}">
  67. <div class="layui-inline">
  68. <a href="{:url('league_add')}" class="layui-btn layui-btn-radius"><i class="layui-icon">&#xe654;</i>添加商务</a>
  69. </div>
  70. <div style="float: right;">
  71. <div class="layui-inline">
  72. <input class="layui-input" placeholder="开始时间" name="start_time" id="J_start" value="{:input('request.start_time')}" autocomplete="off" style="width:130px;display:inline-block">
  73. <span>-</span>
  74. <input class="layui-input" placeholder="结束时间" name="end_time" id="J_end" value="{:input('request.end_time',date('Y-m-d'))}" autocomplete="off" style="width:130px;display:inline-block">
  75. </div>
  76. <div class="layui-inline">
  77. <div class="layui-input-inline">
  78. <input class="layui-input" name="username" placeholder="商务账号" value="{:input('request.username', '')}">
  79. </div>
  80. </div>
  81. <div class="layui-inline">
  82. <div class="layui-input-inline">
  83. <select name="channel_status" lay-filter="level" value="{:input('request.channel_status')}">
  84. <option value="">状态</option>
  85. <option value="0" {if condition="$Request.get.channel_status eq '0' " }selected="selected" {/if}>冻结</option>
  86. <option value="1" {if condition="$Request.get.channel_status eq 1 " }selected="selected" {/if}>开启</option>
  87. </select>
  88. </div>
  89. </div>
  90. <div class="layui-inline">
  91. <div class="layui-input-inline">
  92. <select name="status" lay-filter="level" value="{:input('request.status')}">
  93. <option value="">个人身份认证状态</option>
  94. <option value="0" {if condition="$Request.get.status eq '0' " }selected="selected" {/if}>待审核</option>
  95. <option value="1" {if condition="$Request.get.status eq 1 " }selected="selected" {/if}>已身份认证</option>
  96. <option value="2" {if condition="$Request.get.status eq 2 " }selected="selected" {/if}>未身份认证</option>
  97. </select>
  98. </div>
  99. </div>
  100. <div class="layui-inline" style="margin-left:10px;">
  101. <button class="layui-btn" lay-submit>搜索</button>
  102. <a class="layui-btn" href="{:url('leaguesmanage')}">清空</a>
  103. <!-- <a class="layui-btn layui-btn-normal download" href="javascript:;">下载报表</a>-->
  104. </div>
  105. </div>
  106. <div style="clear:both;"></div>
  107. <table data-toggle="table" data-detail-view="true" data-detail-formatter="detailFormatter">
  108. <thead>
  109. <tr>
  110. <th>ID</th>
  111. <th>商务账号</th>
  112. <th>登录验证</th>
  113. <th>手机号</th>
  114. <th>备注</th>
  115. <!--<th>用户账号</th>-->
  116. <th>创建时间</th>
  117. <th>状态</th>
  118. <th>个人身份认证状态</th>
  119. <th>身份认证历史记录</th>
  120. <th>操作</th>
  121. <th class="hide">姓名</th>
  122. <th class="hide">身份证号码</th>
  123. <th class="hide">企业名称</th>
  124. <th class="hide">社会信用码</th>
  125. <th class="hide">法人姓名</th>
  126. <th class="hide">法人身份证</th>
  127. <th class="hide">手机号</th>
  128. <th class="hide">邮箱</th>
  129. <th class="hide">联系地址</th>
  130. </tr>
  131. </thead>
  132. <tbody>
  133. {volist name="channles" id="vo"}
  134. <tr>
  135. <td>{$vo.channelid}</td>
  136. <td>{$vo.username}</td>
  137. <td>{$vo.login_check ? '开启' : '关闭'}</td>
  138. <td>
  139. <a class="showMobile" data-id="{$vo.adminid}" data-field="mobile">
  140. {$vo.mobile != '' ? stringObfuscation($vo.mobile,3) : '' }
  141. </a>
  142. </td>
  143. <td>{$vo.beizhu}</td>
  144. <!--
  145. <td>{$vo.show_full_account ? '明文' : '密文'}</td>
  146. -->
  147. <td>{$vo.created_time|date="Y-m-d H:i:s",###}</td>
  148. <td>{$vo.status ? '开启' : '冻结'}</td>
  149. <td>
  150. {if condition="($vo['id']) AND ($vo['info_status'] eq 1)"}
  151. {switch name=$vo['apply_status']}
  152. {case value="0"}待审核{/case}
  153. {default /}已身份认证
  154. {/switch}
  155. {else /}
  156. {switch name=$vo['apply_status']}
  157. {case value="0"}待审核{/case}
  158. {default /}未身份认证
  159. {/switch}
  160. {/if}
  161. </td>
  162. <!-- <td><a href="{:url('edit', array('id'=>$vo['adminid'],'type'=>1))}" class="layui-btn">
  163. <i class="layui-icon">&#xe642;</i>编辑</a>
  164. {if condition="$vo['status'] eq 1"}
  165. <a href="{:url('ban', array('id'=>$vo['adminid']))}" class="layui-btn layui-btn-warm">冻结</a>
  166. {else /}
  167. <a href="{:url('cancelBan', array('id'=>$vo['adminid']))}" class="layui-btn layui-btn-normal">开启</a>
  168. {/if}
  169. {switch name=$vo['apply_status']}
  170. {case value="0"}<a class="layui-btn layui-btn-normal toGameEnter" data-id='{$vo.channelid}' cid="{$vo.applyId}" apply_status='{$vo.apply_status}'><i class="icon-edit"></i>审核</a>&nbsp;&nbsp;{/case}
  171. {case value="2"}<a class="layui-btn layui-btn-normal toGameEnter" apply_status='{$vo.apply_status}' cid="{$vo.applyId}" data-id='{$vo.channelid}'><i class="icon-edit"></i>查看</a>&nbsp;&nbsp;{/case}
  172. {case value="1"}<a class="layui-btn layui-btn-normal toGameEnter" apply_status='{$vo.apply_status}' cid="{$vo.applyId}" data-id='{$vo.channelid}'><i class="icon-edit"></i>查看</a>&nbsp;&nbsp;{/case}
  173. {default /}
  174. {/switch}
  175. </td> -->
  176. <td><a href="#" class ="checklog" id="{$vo.id}" channelid="{$vo.channel_id}">查看历史记录</a></td>
  177. <td><a href="{:url('edit', array('id'=>$vo['adminid'],'type'=>1))}" class="layui-btn">
  178. <i class="layui-icon">&#xe642;</i>编辑</a>
  179. {if condition="$vo['status'] eq 1"}
  180. <a href="{:url('ban', array('id'=>$vo['adminid']))}" class="layui-btn layui-btn-warm">冻结</a>
  181. {else /}
  182. <a href="{:url('cancelBan', array('id'=>$vo['adminid']))}" class="layui-btn layui-btn-normal" pad="{$vo['apply_status']}">开启</a>
  183. {/if}
  184. {if condition="($vo['id']) AND ($vo['info_status'] neq 0)"}
  185. <a class="layui-btn layui-btn-normal toCheck" apply_status='{$vo.apply_status}' data-id='{$vo.channelid}'><i class="icon-edit"></i>查看身份信息</a>
  186. {/if}
  187. {switch name=$vo['apply_status']}
  188. {case value="0"}<a class="layui-btn layui-btn-normal toGameEnter" apply_status='{$vo.apply_status}' data-id='{$vo.channelid}' cid="{$vo.applyId}"><i class="icon-edit"></i>审核身份信息</a>&nbsp;&nbsp;{/case}
  189. {default /}
  190. {/switch}
  191. </td>
  192. <td>{$vo['real_name']}</td>
  193. <td>{$vo['person_id']}</td>
  194. <td>{$vo['company_name']}</td>
  195. <td>{$vo['us_code']}</td>
  196. <td>{$vo['leson_name']}</td>
  197. <td>{$vo['leson_person_id']}</td>
  198. <td>{$vo['linkman_email']}</td>
  199. <td>{$vo['linkman_mobile']}</td>
  200. <td>{$vo['address']}</td>
  201. </tr>
  202. {/volist}
  203. </tbody>
  204. </table>
  205. <div class="pager-container">
  206. <span>
  207. {$channles->total()}条记录
  208. </span>
  209. {$page}
  210. <div class="layui-inline" style="margin-left:10px;width:80px;">
  211. <input type="text" style="height: 30px;" class="layui-input" placeholder="跳转至" name="page" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
  212. </div>
  213. </div>
  214. </form>
  215. </div>
  216. <!-- 模态框 -->
  217. {/block}
  218. {block name="detail_js"}
  219. <script src="__STATIC__/js/admin/modal.js?v={$Think.STATIC_VERSION}"></script>
  220. <script type="text/javascript" src="__STATIC__/js/admin/bootstrap-table.js?v={$Think.STATIC_VERSION}"></script>
  221. <script type="text/javascript" src="__STATIC__/js/FuzzySearch.js?v={$Think.STATIC_VERSION}"></script>
  222. <!-- <script type="text/javascript" src="__STATIC__/js/link_to_wsocket.js?v={$Think.STATIC_VERSION}"></script> -->
  223. <script>
  224. var $table = $('#objTable');
  225. $table.bootstrapTable({});
  226. layui.use('laydate', function () {
  227. var laydate = layui.laydate;
  228. //执行一个laydate实例
  229. laydate.render({
  230. elem: '#J_start', //指定元素
  231. type: 'date'
  232. });
  233. //执行一个laydate实例
  234. laydate.render({
  235. elem: '#J_end', //指定元素
  236. type: 'date'
  237. });
  238. });
  239. //表格的
  240. function detailFormatter(index, row) {
  241. console.log(row)
  242. var html = [];
  243. var obj = {
  244. 0: "ID",
  245. 1: "渠道名",
  246. 2: "登录验证",
  247. 3: "手机号",
  248. 4: "备注",
  249. 5: "创建时间",
  250. 6: "状态",
  251. 7: "个人身份认证状态",
  252. 8: "身份认证历史记录",
  253. 9: "操作",
  254. 10: "姓名",
  255. 11: "身份证号码",
  256. 12: "企业名称",
  257. 13: "社会信用码",
  258. 14: "法人姓名",
  259. 15: "法人身份证",
  260. 16: "邮箱",
  261. 17: "手机号",
  262. 18: "联系地址",
  263. }
  264. $.each(row, function (key, value) {
  265. if (key >= 10 && key<=32) {
  266. html.push('<p><b>' + obj[key] + ':</b> ' + value + '</p>');
  267. } else {
  268. html.push('<p class="hide"><b>' + obj[key] + ':</b> ' + value + '</p>');
  269. }
  270. });
  271. return html.join('');
  272. }
  273. $(document).on('click', '.toCheck', function(event) {
  274. var id = $(this).attr('data-id');
  275. layer.open({
  276. name:id,
  277. type: 2,
  278. area: ['500px', '750px'],
  279. shadeClose: true,
  280. fixed: false, //不固定
  281. maxmin: true,
  282. content: 'checkInfo?channelid='+id
  283. });
  284. });
  285. $('.download').on('click', function () {
  286. $.ajax({
  287. type: "post",
  288. url: "{:url('download')}?type=union",
  289. async: false,
  290. data: $('.layui-form').serialize(),
  291. dataType: 'json',
  292. timeout: 5000,
  293. success: function (data) {
  294. if (data['code']) {
  295. layer.alert(data['msg']);
  296. } else {
  297. layer.alert(data['msg']);
  298. }
  299. },
  300. error: function () {
  301. layer.alert('网络错误,请重试');
  302. },
  303. });
  304. });
  305. // 查看明文
  306. $("tbody").on("click",".detail-view td p a,.showMobile",function () {
  307. var id = $(this).data('id');
  308. var file = $(this).data('field');
  309. var _that=$(this);
  310. if(file=='account_qq' || file=='account_wechat' || file=='mobile'){
  311. $.ajax({
  312. type: "post",
  313. url: "{:url('viewlinkinfo')}",
  314. /*async: false,*/
  315. data: {'id':id,'file':file},
  316. dataType: 'json',
  317. /*timeout: 5000,*/
  318. success: function (data) {
  319. if (data['code']) {
  320. _that.text(data['data']);
  321. } else {
  322. layer.alert(data['msg']);
  323. }
  324. },
  325. error: function () {
  326. layer.alert('网络错误,请重试');
  327. },
  328. });
  329. }
  330. else{
  331. $.ajax({
  332. type: "post",
  333. url: "{:url('viewpayinfo')}",
  334. /*async: false,*/
  335. data: {'id':id,'file':file},
  336. dataType: 'json',
  337. /*timeout: 5000,*/
  338. success: function (data) {
  339. if (data['code']) {
  340. _that.text(data['data']);
  341. } else {
  342. layer.alert(data['msg']);
  343. }
  344. },
  345. error: function () {
  346. layer.alert('网络错误,请重试');
  347. },
  348. });
  349. }
  350. });
  351. $(document).on('click', '.toGameEnter', function(event) {
  352. var channelid = $(this).attr('data-id');
  353. var cid = $(this).attr('cid');
  354. var apply_status = $(this).attr('apply_status');
  355. layer.open({
  356. name:channelid,
  357. type: 2,
  358. area: ['900px', '800px'],
  359. shadeClose: true,
  360. fixed: false, //不固定
  361. maxmin: true,
  362. content: 'examine?channelid='+channelid+'&apply_status='+apply_status+'&cid='+cid
  363. });
  364. });
  365. $(document).on('click', '.checklog', function(event) {
  366. var channelid = $(this).attr('channelid');
  367. $.ajax({
  368. type: "POST",
  369. url: "{:url('checklog')}",
  370. data: {"channelid":channelid},
  371. dataType: "json",
  372. success: function(res) {
  373. var list ='';
  374. if (res.code == 1) {
  375. console.log(res.data)
  376. $.each(res.data, function(index, val) {
  377. list += '<tr><td>'+val.id+'</td><td>'+val.apply_time+'</td><td><a href="#" class="toLogCont" apply_status='+val.apply_status+' data-id="'+val.channel_id+'" cid="'+val.id+'">查看内容</a></td><td>'+val.status+'</td><td>'+val.check_time+'</td><td>'+val.check_admin_name+'</td></tr>'
  378. });
  379. }else{
  380. list = '<tr><td colspan=6>暂无记录</td></tr>';
  381. }
  382. layer.open({
  383. title: '记录',
  384. type: 1,
  385. skin: 'layui-layer-rim', //加上边框
  386. area: ['840px', '480px'], //宽高
  387. content: '<table class="layui-table"><thead><tr><th>ID</th><th>创建时间</th><th>操作</th><th>状态</th><th>审核时间</th><th>审核人员</th></tr></thead><tbody>'+list+'</tbody></table>'
  388. });
  389. },
  390. });
  391. });
  392. $(document).on('click', '.toLogCont', function(event) {
  393. var id = $(this).attr('data-id');
  394. var cid = $(this).attr('cid');
  395. var apply_status = $(this).attr('apply_status');
  396. layer.open({
  397. name:id,
  398. type: 2,
  399. area: ['500px', '750px'],
  400. shadeClose: true,
  401. fixed: false, //不固定
  402. maxmin: true,
  403. content: 'examine?channelid='+id+'&&apply_status='+apply_status+'&log=1'+'&cid='+cid
  404. });
  405. });
  406. </script>
  407. {/block}