| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633 |
- <!-- <script src="../../../../public/static/js/admin/modal.js"></script> -->
- {extend name="layout/base" /}
- {block name="detail_css"}
- <link rel="stylesheet" href="__STATIC__/css/admin/bootstrap.min.css?v={$Think.STATIC_VERSION}">
- <link rel="stylesheet" href="__STATIC__/css/admin/bootstrap-table.css?v={$Think.STATIC_VERSION}">
- <title>推广账号管理</title>
- <style>
- label {
- padding-top: 10px;
- margin-left: 10px;
- }
- .x-so {
- text-align: unset;
- margin-bottom: 20px;
- }
- section {
- float: right;
- }
- .layui-icon {
- vertical-align: bottom;
- }
- .operation {
- border: 0;
- padding: 5px;
- color: #fff;
- border-radius: 5px;
- }
- .hide{
- display: none;
- }
- .table>tbody>tr>td,
- .table>tbody>tr>th,
- .table>tfoot>tr>td,
- .table>tfoot>tr>th,
- .table>thead>tr>td,
- .table>thead>tr>th {
- padding: 8px;
- line-height: 1.42857143;
- vertical-align: middle;
- border-top: 1px solid #ddd;
- }
- table td,
- table th {
- text-align: center;
- }
- .detail-view td,
- .detail-view th {
- text-align: left;
- }
- .detail-view td p a:hover{
- cursor: pointer;
- }
- </style>
- <link rel="stylesheet" href="__STATIC__/css/admin/paginator.css?v={$Think.STATIC_VERSION}">
- {/block}
- {block name="content"}
- <div class="x-body">
- <form class="layui-form " method="get" action="{:url('index')}">
- <div style="float: right;" class="layui-form-item" >
- <div class="layui-input-inline layui-form">
- <select name="business_type" lay-filter="business_type" id="business_type" lay-search>
- <option value="">请选择商务</option>
- </select>
- </div>
- <div class="layui-input-inline">
- <select name="president_type" lay-filter="president_type" id="president_type" lay-search>
- <option value="">请选择会长</option>
- </select>
- </div>
- <div class="layui-input-inline">
- <select name="president_type_son" lay-filter="president_type_son" id="president_type_son" lay-search>
- <option value="">请选择子会长</option>
- </select>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <input class="layui-input" name="username" placeholder="账号名" value="{:input('request.username', '')}">
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <select name="channel_status" lay-filter="level" value="{:input('request.channel_status')}">
- <option value="">状态</option>
- <option value="0" {if condition="$Request.get.channel_status eq '0' " }selected="selected" {/if}>冻结</option>
- <option value="1" {if condition="$Request.get.channel_status eq 1 " }selected="selected" {/if}>开启</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <select name="status" lay-filter="level" value="{:input('request.status')}">
- <option value="">个人身份认证状态</option>
- <option value="0" {if condition="$Request.get.status eq '0' " }selected="selected" {/if}>待审核</option>
- <option value="1" {if condition="$Request.get.status eq 1 " }selected="selected" {/if}>已身份认证</option>
- <option value="2" {if condition="$Request.get.status eq 2 " }selected="selected" {/if}>未身份认证</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <input class="layui-input" placeholder="开始时间" name="start_time" id="J_start" value="{:input('request.start_time')}" autocomplete="off" style="width:130px;display:inline-block">
- <span>-</span>
- <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">
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <select name="level" lay-filter="level" value="{:input('request.level', '')}">
- <option value="0">账号类型</option>
- <option value="1" {if condition="$Request.get.level eq '1'" }selected="selected" {/if}>会长(B)</option>
- <option value="2" {if condition="$Request.get.level eq '2'" }selected="selected" {/if}>子会长(B-)</option>
- <option value="3" {if condition="$Request.get.level eq '3'" }selected="selected" {/if}>推广员(C)</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <select name="gh_status" lay-filter="level" value="{:input('request.gh_status')}">
- <option value="">是否聚合用户</option>
- <option value="1" {if condition="$Request.get.gh_status eq 1 " }selected="selected" {/if}>是</option>
- <option value="0" {if condition="$Request.get.gh_status eq '0' " }selected="selected" {/if}>否</option>
- </select>
- </div>
- </div>
- <div class="layui-inline" style="margin-left:10px;">
- <button class="layui-btn" lay-submit id="J_search_submit">搜索</button>
- <a class="layui-btn" href="{:url('index')}">清空</a>
- <a class="layui-btn layui-btn-normal download" href="javascript:;">下载报表</a>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <div class="layui-inline">
- <a href="{:url('add')}" class="layui-btn layui-btn-radius"><i class="layui-icon"></i>添加会长账号</a>
- </div>
- </div>
- </div>
- </div>
- <hr>
- <div style="clear:both;"></div>
- <table data-toggle="table" data-detail-view="true" data-detail-formatter="detailFormatter">
- <thead>
- <tr>
- <th>渠道号</th>
- <th>账号名</th>
- <th>登录验证</th>
- <th>手机号</th>
- <th>保证金(元)</th>
- <th>账号类型</th>
- <th>子会长</th>
- <th>会长账号</th>
- <th>商务账号</th>
- <th>创建时间</th>
- <th>状态</th>
- <th>个人身份认证状态</th>
- <th>身份认证历史记录</th>
- <th>祈盟聚合用户</th>
- <th>176 ID</th>
- <th>操作</th>
- <th class="hide">姓名</th>
- <th class="hide">身份证号码</th>
- <th class="hide">企业名称</th>
- <th class="hide">社会信用码</th>
- <th class="hide">法人姓名</th>
- <th class="hide">法人身份证</th>
- <th class="hide">手机号</th>
- <th class="hide">邮箱</th>
- <th class="hide">联系地址</th>
- </tr>
- </thead>
- <tbody>
- {volist name="channles" id="vo"}
- <tr>
- <td>{$vo.channelid}</td>
- <td>{$vo.username}</td>
- <td>{$vo.login_check ? '开启' : '关闭'}</td>
- <td>
- <a class="showMobile" data-id="{$vo.adminid}" data-field="mobile">
- {$vo.mobile != '' ? stringObfuscation($vo.mobile,3) : '' }
- </a>
- </td>
- <td>
- {switch name="$vo.level"}
- {case value="1" }
- {$vo.deposit_amt|floatval}
- {/case}
- {default /}--
- {/switch}
- </td>
- <td>
- {switch name="$vo.level"}
- {case value="1" }
- 会长
- {/case}
- {case value="2"}
- 子会长
- {/case}
- {default /}推广员
- {/switch}
- </td>
- <td>
- {php} echo get_top_second_channel_name($vo['channelid'])['second_name']; {/php}
- </td>
- <td>
- {php} echo get_top_channel($vo['channelid'])['name']; {/php}
- </td>
- <td>
- {$vo.top_name}
- </td>
- <!--
- <td>{$vo.show_full_account ? '明文' : '密文'}</td>
- -->
- <td>{$vo.created_time|date="Y-m-d H:i:s",###}</td>
- <td>{$vo.status ? '开启' : '冻结'}</td>
- <td>
- {if condition="($vo['id']) AND ($vo['info_status'] eq 1)"}
- {switch name=$vo['apply_status']}
- {case value="0"}待审核{/case}
- {default /}已身份认证
- {/switch}
- {else /}
- {switch name=$vo['apply_status']}
- {case value="0"}待审核{/case}
- {default /}未身份认证
- {/switch}
- {/if}
- </td>
- <td><a href="#" class ="checklog" id="{$vo.id}" channelid="{$vo.channel_id}">查看历史记录</a></td>
- <td>
- <input type="checkbox" name="yyy" lay-skin="switch" lay-filter="gh_status" value="{$vo.gh_status}" lay-text="是|否" {$vo.gh_status==1?'checked':''} data-channelid="{$vo.channelid}">
- </td>
- <td>{$vo.yql_id>0 ?$vo.yql_id:'-'}</td>
- <td><a href="{:url('edit', array('id'=>$vo['adminid'],'type'=>0))}" class="layui-btn">
- <i class="layui-icon"></i>编辑</a>
- {if condition="$vo['status'] eq 1"}
- <a href="{:url('ban', array('id'=>$vo['adminid']))}" class="layui-btn layui-btn-warm">冻结</a>
- <a target="_blank" href="{$Think.config.self_cps_url}/prod-api/login/checklogin?username={$vo.username}" class="layui-btn layui-btn-normal" pad="{$vo['apply_status']}">进入渠道后台</a>
- {else /}
- <a href="{:url('cancelBan', array('id'=>$vo['adminid']))}" class="layui-btn layui-btn-normal" pad="{$vo['apply_status']}">开启</a>
- {/if}
- {if condition="($vo['id']) AND ($vo['info_status'] neq 0)"}
- <a class="layui-btn layui-btn-normal toCheck" apply_status='{$vo.apply_status}' data-id='{$vo.channelid}'><i class="icon-edit"></i>查看身份信息</a>
- {/if}
- {switch name=$vo['apply_status']}
- {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> {/case}
- {default /}
- {/switch}
- {if condition="$vo['level'] eq 1"}
- <a class="layui-btn layui-btn-normal toSetDeposit" data-id='{$vo.channelid}' "><i class="icon-edit"></i>设置保证金</a>
- {/if}
- </td>
- <td>{$vo['real_name']}</td>
- <td>{$vo['person_id']}</td>
- <td>{$vo['company_name']}</td>
- <td>{$vo['us_code']}</td>
- <td>{$vo['leson_name']}</td>
- <td>{$vo['leson_person_id']}</td>
- <td>{$vo['linkman_email']}</td>
- <td>{$vo['linkman_mobile']}</td>
- <td>{$vo['address']}</td>
- </tr>
- {/volist}
- </tbody>
- </table>
- <div class="pager-container">
- <span>
- {$channles->total()}条记录
- </span>
- {$page}
- <div class="layui-inline" style="margin-left:10px;width:80px;">
- <input type="text" style="height: 30px;" class="layui-input" placeholder="跳转至" name="page" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
- </div>
- </div>
- </form>
- </div>
- {/block}
- {block name="detail_js"}
- <!-- <script type="text/javascript" src="__STATIC__/js/jquery-2.1.4.min.js?v={$Think.STATIC_VERSION}"></script> -->
- <!-- <script src="__STATIC__/js/admin/modal.js?v={$Think.STATIC_VERSION}"></script> -->
- <!-- <script type="text/javascript" src="__STATIC__/js/admin/bootstrap-table.js?v={$Think.STATIC_VERSION}"></script> -->
- <script>
- var $table = $('#objTable');
- $table.bootstrapTable({});
- layui.use(['laydate', 'form', 'layCascader'], function () {
- var laydate = layui.laydate, form = layui.form, layCascader = layui.layCascader;
- //执行一个laydate实例
- laydate.render({
- elem: '#J_start', //指定元素
- type: 'date'
- });
- //执行一个laydate实例
- laydate.render({
- elem: '#J_end', //指定元素
- type: 'date'
- });
- $(document).on('mouseenter', '.tips', function(event) {
- var id = $(this).attr('data_id');
- var str = "驳回原因:"+$(this).attr('var');
- layer.tips(str, '.tps'+id, {
- tips: [1, '#0FA6D8'] //还可配置颜色
- });
- });
- form.on('switch(gh_status)', function(data){
- var channelid = $(data.elem).attr("data-channelid");
- if (!channelid){
- layer.alert("操作有误!获取当前用户ID失败!");
- return false;
- }
- var gh_status = 0;
- if (data.elem.checked == true){
- gh_status = 1
- }
- $.ajax({
- type: "post",
- url: "{:url('editGhStatus')}",
- data: {'channelid':channelid,'gh_status':gh_status},
- dataType: 'json',
- success: function (data) {
- var icon = 5;
- if (data['code'] == 1){
- icon = 1;
- }
- layer.alert(data['msg'], {
- icon: icon
- });
- },
- error: function () {
- layer.alert('网络错误,请重试');
- },
- });
- });
- var businessType = getQueryVariable("business_type"), president_type = getQueryVariable("president_type"), president_type_son = getQueryVariable("president_type_son")
- /**
- * 获取下拉数据
- * @param type sw=商务/hz=会长/zhz=子会长
- * @param pid 上级ID
- */
- function getChannelSelectData(type = 'sw', pid = ''){
- $.ajax({
- type: "GET",
- url: '{:url("Channel/getSelectList")}',
- dataType: "json",
- async: false,
- data: {'type': type,'pid': pid},
- success: function (res) {
- listData = res.data
- // console.log("## getChannelSelectData: ", listData)
- if (type === 'sw'){
- $("#business_type").empty();
- $("#business_type").append("<option value=''>请选择商务</option>")
- businessType = getQueryVariable("business_type");
- $.each(listData, function (i, item) {
- if (item.id == businessType){
- $("#business_type").append("<option value='" + item.id + "' selected>" + item.name + "</option>")
- }else{
- $("#business_type").append("<option value='" + item.id + "'>" + item.name + "</option>")
- }
- })
- }else if (type === 'hz'){
- $("#president_type").empty();
- $("#president_type").append("<option value=''>请选择会长</option>")
- president_type = getQueryVariable("president_type");
- $.each(listData, function (i, item) {
- if (item.id == president_type){
- $("#president_type").append("<option value='" + item.id + "' selected>" + item.name + "</option>")
- }else{
- $("#president_type").append("<option value='" + item.id + "'>" + item.name + "</option>")
- }
- })
- }else if (type === 'zhz'){
- $("#president_type_son").empty();
- $("#president_type_son").append("<option value=''>请选择子会长</option>")
- president_type_son = getQueryVariable("president_type_son");
- $.each(listData, function (i, item) {
- if (item.id == president_type_son){
- $("#president_type_son").append("<option value='" + item.id + "' selected>" + item.name + "</option>")
- }else{
- $("#president_type_son").append("<option value='" + item.id + "'>" + item.name + "</option>")
- }
- })
- }
- form.render('select')
- },
- });
- }
- // 初始化下拉
- getChannelSelectData('sw');
- getChannelSelectData('hz', businessType);
- getChannelSelectData('zhz', president_type);
- // 获取指定URL的参数值
- function getQueryVariable(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if (r != null) return unescape(r[2]);
- return null;
- }
- form.on('select(business_type)', function (data) {
- if (data.value > 0){
- getChannelSelectData('hz', data.value);
- }else{
- getChannelSelectData('hz', businessType);
- getChannelSelectData('zhz', president_type);
- }
- });
- form.on('select(president_type)', function (data) {
- if (data.value > 0){
- getChannelSelectData('zhz', data.value);
- }else{
- getChannelSelectData('zhz', president_type);
- }
- });
- });
- //表格的
- function detailFormatter(index, row) {
- var html = [];
- var obj = {
- 0: "ID",
- 1: "账号名",
- 2: "登录验证",
- 3: "手机号",
- 4: "保证金(元)",
- 5: "账号类型",
- 6: "会长账号",
- 7: "会长账号",
- 8: "商务账号",
- 9: "创建时间",
- 10: "状态",
- 11: "个人身份认证状态",
- 12: "身份认证历史记录",
- 13: "操作",
- 14: "姓名",
- 15: "身份证号码",
- 16: "企业名称",
- 17: "社会信用码",
- 18: "法人姓名",
- 19: "法人身份证",
- 20: "邮箱",
- 21: "手机号",
- 22: "联系地址",
- }
- $.each(row, function (key, value) {
- if (key >= 14 && key<=32) {
- html.push('<p><b>' + obj[key] + ':</b> ' + value + '</p>');
- } else {
- html.push('<p class="hide"><b>' + obj[key] + ':</b> ' + value + '</p>');
- }
- });
- return html.join('');
- }
- $('.download').on('click', function () {
- $.ajax({
- type: "post",
- url: "{:url('download')}",
- async: false,
- data: $('.layui-form').serialize(),
- dataType: 'json',
- timeout: 5000,
- success: function (data) {
- if (data['code']) {
- layer.alert(data['msg']);
- } else {
- layer.alert(data['msg']);
- }
- },
- error: function () {
- layer.alert('网络错误,请重试');
- },
- });
- });
- // 查看明文
- $("tbody").on("click",".detail-view td p a,.showMobile",function () {
- var id = $(this).data('id');
- var file = $(this).data('field');
- var _that=$(this);
- if(file=='account_qq' || file=='account_wechat' || file=='mobile'){
- $.ajax({
- type: "post",
- url: "{:url('viewlinkinfo')}",
- /*async: false,*/
- data: {'id':id,'file':file},
- dataType: 'json',
- /*timeout: 5000,*/
- success: function (data) {
- if (data['code']) {
- _that.text(data['data']);
- } else {
- layer.alert(data['msg']);
- }
- },
- error: function () {
- layer.alert('网络错误,请重试');
- },
- });
- }
- else{
- $.ajax({
- type: "post",
- url: "{:url('viewpayinfo')}",
- /*async: false,*/
- data: {'id':id,'file':file},
- dataType: 'json',
- /*timeout: 5000,*/
- success: function (data) {
- if (data['code']) {
- _that.text(data['data']);
- } else {
- layer.alert(data['msg']);
- }
- },
- error: function () {
- layer.alert('网络错误,请重试');
- },
- });
- }
- });
- $(document).on('click', '.toGameEnter', function(event) {
- var channelid = $(this).attr('data-id');
- var cid = $(this).attr('cid');
- var apply_status = $(this).attr('apply_status');
- layer.open({
- name:channelid,
- type: 2,
- area: ['50%', '95%'],
- shadeClose: true,
- fixed: false, //不固定
- maxmin: true,
- content: 'examine?channelid='+channelid+'&apply_status='+apply_status+'&cid='+cid
- });
- });
- $(document).on('click', '.toSetDeposit', function(event) {
- var channelid = $(this).attr('data-id');
- layer.open({
- name:channelid,
- type: 2,
- area: ['30%', '50%'],
- shadeClose: true,
- fixed: false, //不固定
- maxmin: true,
- content: 'deposit?channelid='+channelid
- });
- });
- $(document).on('click', '.toLogCont', function(event) {
- var id = $(this).attr('data-id');
- var cid = $(this).attr('cid');
- var apply_status = $(this).attr('apply_status');
- layer.open({
- name:id,
- type: 2,
- area: ['60%', '90%'],
- shadeClose: true,
- fixed: false, //不固定
- maxmin: true,
- content: 'examine?channelid='+id+'&&apply_status='+apply_status+'&log=1'+'&cid='+cid
- });
- });
- $(document).on('click', '.toCheck', function(event) {
- var id = $(this).attr('data-id');
- layer.open({
- name:id,
- type: 2,
- area: ['60%', '90%'],
- shadeClose: true,
- fixed: false, //不固定
- maxmin: true,
- content: 'checkInfo?channelid='+id
- });
- });
- $(document).on('click', '.checklog', function(event) {
- var channelid = $(this).attr('channelid');
- $.ajax({
- type: "POST",
- url: "{:url('checklog')}",
- data: {"channelid":channelid},
- dataType: "json",
- success: function(res) {
- var list ='';
- if (res.code == 1) {
- console.log(res.data)
- $.each(res.data, function(index, val) {
- 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>'
- });
- }else{
- list = '<tr><td colspan=6>暂无记录</td></tr>';
- }
- layer.open({
- title: '记录',
- type: 1,
- skin: 'layui-layer-rim', //加上边框
- area: ['840px', '480px'], //宽高
- 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>'
- });
- },
- });
- });
- </script>
- {/block}
|