<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->

<!--{if $a == "run"}-->
<div class="layui-fluid oe_fluid">
  <form class="layui-form" id="mysearch" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post">
  <div class="oe_breadcrumb_box clearfix">
    <div class="layui-breadcrumb fl" lay-filter="breadcrumb" style="visibility: visible;">
      <a href="javascript:;">内容管理</a><span lay-separator="">/</span>
      <a href="javascript:;">举报管理</a><span lay-separator="">/</span>
      <a><cite>举报列表</cite></a>
    </div>   
  </div>
  <!--//top end -->
  
  <div class="oe_searchbar layui-form">
    <div class="more_search_open"></div>
    <div class="layui-form-item">
      
      <div class="layui-inline">
        <div class="layui-form-label">举报者ID：</div>
        <div class="layui-input-inline input-150">
          <input type="text" name="suserid" id="suserid" class="layui-input" value="<!--{if $suserid > 0}--><!--{$suserid}--><!--{/if}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">举报类型：</div>
        <div class="layui-input-inline input-150">
          <!--{hook mod="var" item="blacktype" type="select" name="sblacktype" text="=请选择=" value=$sblacktype}-->
        </div>
      </div>
      
      <div class="layui-inline">
        <div class="layui-form-label">被举报者ID：</div>
        <div class="layui-input-inline input-150">
          <input type="text" name="shomeuid" id="shomeuid" class="layui-input" value="<!--{if $shomeuid > 0}--><!--{$homeuid}--><!--{/if}-->" />
        </div>
      </div>
      
      <div class="layui-inline">
        <button class="layui-btn layui-btn-sm search" id="but_submit_search2" lay-submit lay-filter="searchform2">
          <i class="layui-icon layui-icon-search"></i>
          搜索
          <span class="oe_btn_loading layui-anim layui-icon layui-anim-rotate layui-anim-loop" style="display:none;">&#xe63d;</span>
        </button>
      </div>
      
      <br />
      <div class="layui-form-label">状&#12288;&#12288;态：</div>
      <div class="label_box">
        <input type="hidden" name="sflag" id="sflag" value="<!--{$sflag}-->" />
        <span f="but_search_cat" data-val="0" data-input="sflag"<!--{if $sflag == '0'}--> class="current"<!--{/if}-->>不限</span>
        <span f="but_search_cat" data-val="1" data-input="sflag"<!--{if $sflag == '1'}--> class="current"<!--{/if}-->>举报成功</span>
        <span f="but_search_cat" data-val="2" data-input="sflag"<!--{if $sflag == '2'}--> class="current"<!--{/if}-->>举报失败</span>
        <span f="but_search_cat" data-val="3" data-input="sflag"<!--{if $sflag == '3'}--> class="current"<!--{/if}-->>待处理</span>
      </div>
      
    </div>
  </div>
  <!--//search End -->
  </form>

  <div class="oe_table_wrap layui-form">
    <div class="oe_tbl_tool clearfix">
      <div class="oe_gnbar clearfix">
        <div class="select btn fl">
          <input type="checkbox" id="id[]" name="allid[]" lay-skin="primary" title="全选" lay-filter="selectAll">
        </div>
        <div class="btn del fl del_line" f="handle-array" data-form="myform">
          <i class="layui-icon layui-icon-delete"></i>
          <span>删除</span>
        </div>
      </div>
      <div class="oe_tongji_bar clearfix current">
        <span><b><!--{$total}--></b> 条记录</span>
      </div>
    </div>
    <form class="layui-form" id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post">
    <table class="layui-table">
      <thead>
        <tr>
          <th width="2%">选</th>
          <th width="6%">ID</th>
          <th width="13%">举报者</th>
          <th width="9%">举报者手机</th>
          <th width="12%">举报类型</th>
          <th width="13%">被举报者</th>
          <th>情况说明</th>
          <th width="12%">处理状态</th>
          <th width="6%">拉黑</th>
          <th width="10%">操作</th>
        </tr>
      </thead>
      <!--{if empty($jubao)}-->
      <tr>
        <td class="text_center" colspan="10">没有符合条件的信息！</td>
      </tr>
      <!--{else}-->
      <!--{foreach $jubao as $volist}-->
      <tr>
        <td class="text_center check">
          <input type="checkbox" name="id[]" id="id[]" lay-skin="primary" class="selall" value="<!--{$volist.juid}-->" />
        </td>
        <td class="text_center"><!--{$volist.juid}--></td>
        <td class="text_center">
          <a href="<!--{$oefile}-->&c=user&a=view&id=<!--{$volist.userid}-->">
          <!--{$volist.username}-->/<!--{$volist.userid}-->
          </a>
        </td>
        <td class="text_center"><!--{$volist.jumobile}--></td>
        
        <td class="text_center"><!--{hook mod="var" item="blacktype" type="text" value=$volist.blacktype}--></td>
        
        <td class="text_center">
          <a href="<!--{$oefile}-->&c=user&a=view&id=<!--{$volist.homeuid}-->">
          <!--{$volist.home_username}-->/<!--{$volist.homeuid}-->
          </a>
        </td>
        <td>
          <!--{$volist.judes}-->
        </td>
        <td class="text_center">
          <!--{if $volist.flag == '1'}-->
          <font color="green">已处理，举报成功</font>
          <!--{elseif $volist.flag == '2'}-->
          <font color="red">已处理，举报失败</font>
          <!--{else}-->
          <font color="gray">待处理</font>
          <!--{/if}-->
        </td>
        <td class="text_center">
          <!--{if $volist.isblack == '1'}-->
          <font color="green">是</font>
          <!--{else}-->
          <font color="gray">否</font>
          <!--{/if}-->
        </td>
        <td class="text_center">
          <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=edit&id=<!--{$volist.juid}-->&<!--{$comeurl}-->" class="layui-btn layui-btn-xs layui-btn-normal">查看</a>
          <a href="javascript:;" f="handle-one" data-text="确定要删除吗？" data-url="<!--{$oefile}-->&c=<!--{$c}-->&a=del&id[]=<!--{$volist.juid}-->&<!--{$comeurl}-->" class="layui-btn layui-btn-xs layui-btn-danger">删除</a>
        </td>
      </tr>
      <!--{/foreach}-->
      <!--{/if}-->
    </table>
    </form>
    
    <div class="oe_page_box"><!--{$showpage}--></div>
    
  </div>
</div>
<script type="text/javascript">
$(function(){
    layui.use(['layer', 'element'], function(){

    });
});
</script>
<!--{/if}-->


<!--{if $a == 'edit'}-->
<div class="layui-fluid oe_fluid">

  <div class="oe_breadcrumb_box clearfix">
    <div class="layui-breadcrumb fl" lay-filter="breadcrumb" style="visibility: visible;">
      <a href="javascript:;">内容管理</a><span lay-separator="">/</span>
      <a href="javascript:;">举报管理</a><span lay-separator="">/</span>
      <a><cite>查看/管理举报</cite></a>
    </div>
    <div class="oe_tool_bar ft">
      <a href="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->" class="layui-btn layui-btn-sm layui-btn-primary layui-btn-radius">返回列表</a>
    </div> 
  </div>
  
  
  <div class="layui-card">
    <div class="layui-card-header">
      举报信息
      <span class="text_tip_inline">(举报者会员信息)</span>
    </div>
    
    <div class="layui-card-body">
      <table class="oe_tbl_form layui-form oe_edit_table">
        <tr>
          <th width="15%">举报者：<span class="f_red"></span></th>
          <td width="85%">
            <!--{$jubao.fromuser.username}-->（uid:<!--{$jubao.fromuser.userid}-->）
            <!--{if $jubao.fromuser.gender == '1'}-->男<!--{else}-->女<!--{/if}-->
          </td>
        </tr>
        <tr>
          <th>举报者手机：<span class="f_red"></span></th>
          <td>
            <!--{$jubao.jumobile}-->
          </td>
        </tr>
        <tr>
          <th>举报者邮箱：<span class="f_red"></span></th>
          <td>
            <!--{$jubao.juemail}-->
          </td>
        </tr>
        <tr>
            <th>举报类型：<span class="f_red"></span></th>
          <td>
            <!--{hook mod="var" item="blacktype" type="text" value=$jubao.blacktype}-->
          </td>
        </tr>
        <tr>
          <th>举报描述：<span class="f_red"></span></th>
          <td>
            <!--{$jubao.judes}-->
          </td>
        </tr>
        <tr>
          <th>举报图片：<span class="f_red"></span></th>
          <td>
            <!--{if !empty($jubao.juimg)}-->
            <img src="<!--{$jubao.juimg}-->" width="20px" height="20px" f="viewimg" />
            <!--{/if}-->
          </td>
        </tr>
        <tr>
          <th>举报时间：<span class="f_red"></span></th>
          <td>
            <!--{$jubao.addtime|date_format:"%Y-%m-%d %H:%M:%S"}-->
          </td>
        </tr>        
      </table>
    </div>
    
    <div class="layui-card-header">
      被举报者资料
	    <span class="text_tip_inline">(开启RP诚信查询应用，可查询该会员的诚信举报情况，还可以上报举报资料)</span>
    </div>
    <div class="layui-card-body">
      <table class="oe_tbl_form layui-form oe_edit_table">
        <tr>
          <th width="15%">被举报会员：<span class="f_red"></span></th>
          <td width="35%">
            <!--//0.05.28 -->
            <a href="<!--{$oefile}-->&c=user&a=view&id=<!--{$jubao.homeuid}-->"><!--{$jubao.jbuser.username}--></a>
            （<!--{$jubao.jbuser.userid}-->）
            <!--{if $jubao.jbuser.gender == '1'}-->男<!--{else}-->女<!--{/if}--> 
            <!--{$jubao.jbuser.age}-->岁 
            <!--{area type="text" value=$jubao.jbuser.dist1}--> 
            <!--{area type="text" value=$jubao.jbuser.dist2}--> 
            <!--{if $jubao.jbuser.height > 0}-->
            <!--{$jubao.jbuser.height}-->CM 
            <!--{/if}-->
            <!--{if $jubao.jbuser.weight > 0}-->
            <!--{$jubao.jbuser.weight}-->KG  
            <!--{/if}-->
            <!--{hook mod="var" item="salary" type="text" value=$jubao.jbuser.salary}--> 
            <!--{hook mod="var" item="education" type="text" value=$jubao.jbuser.education}--> 
          </td>
        </tr>

        <tr>
          <th width="15%">姓名：<span class="f_red"></span></th>
          <td width="35%">
            <!--{if empty($jubao.jbuser.truename)}-->
            --
            <!--{else}-->
            <!--{$jubao.jbuser.truename}-->
            <!--{/if}-->
          </td>
          <th width="15%">身份证号：<span class="f_red"></span></th>
          <td width="35%">
            <!--{if empty($jubao.jbuser.idnumber)}-->
            --
            <!--{else}-->
            <!--{$jubao.jbuser.idnumber}-->
            
            <!--//9.05.28 -->
            <!--{if $config.rpzy_flag == '1'}-->
            <!--{if $jubao.flag == '0'}-->
            <input type="checkbox" name="creditidnumber" id="creditidnumber" value="1" checked lay-skin="primary" title="上报RP诚信"/>
            <!--{/if}-->
            <a href="javascript:;" class="oe_deluploadimg" f="creditget" data-type="idcard" data-value="<!--{$jubao.jbuser.idnumber}-->" data-tips="tips_idnumber">查询诚信</a> <span id="tips_idnumber"></span>
            <!--{/if}-->
            <!--{/if}-->
          </td>
        </tr>
        <tr>
          <th>手机号：<span class="f_red"></span></th>
          <td>
            <!--{if empty($jubao.jbuser.mobile)}-->
            --
            <!--{else}-->
            <!--{$jubao.jbuser.mobile}-->
            
            <!--//9.05.28 -->
            <!--{if $config.rpzy_flag == '1'}-->
            <!--{if $jubao.flag == '0'}-->
            <input type="checkbox" name="creditmobile" id="creditmobile" value="1" checked lay-skin="primary" title="上报RP诚信"/>
            <!--{/if}-->
            <a href="javascript:;" class="oe_deluploadimg" f="creditget" data-type="mobile" data-value="<!--{$jubao.jbuser.mobile}-->" data-tips="tips_mobile">查询诚信</a> <span id="tips_mobile"></span>
            <!--{/if}-->

            <!--{/if}-->
          </td>
          <th>邮箱：<span class="f_red"></span></th>
          <td>
            <!--{if empty($jubao.jbuser.email)}-->
            --
            <!--{else}-->
            <!--{$jubao.jbuser.email}-->
            
            <!--//9.05.28 -->
            <!--{if $config.rpzy_flag == '1'}-->
            <!--{if $jubao.flag == '0'}-->
            <input type="checkbox" name="creditemail" id="creditemail" value="1" checked lay-skin="primary" title="上报RP诚信"/>
            <!--{/if}-->
            <a href="javascript:;" class="oe_deluploadimg" f="creditget" data-type="email" data-value="<!--{$jubao.jbuser.email}-->" data-tips="tips_email">查询诚信</a> <span id="tips_email"></span>
            <!--{/if}-->

            <!--{/if}-->
          </td>
        </tr>
        <tr>
          <th>QQ号：<span class="f_red"></span></th>
          <td>
            <!--{if empty($jubao.jbuser.qq)}-->
            --
            <!--{else}-->
            <!--{$jubao.jbuser.qq}-->

            <!--{if $config.rpzy.flag == '1'}-->
            <!--{if $jubao.flag == '0'}-->
            <input type="checkbox" name="creditqq" id="creditqq" value="1" checked lay-skin="primary" title="上报RP诚信"/>
            <!--{/if}-->
            <a href="javascript:;" class="oe_deluploadimg" f="creditget" data-type="qq" data-value="<!--{$jubao.jbuser.qq}-->" data-tips="tips_qq">查询诚信</a> <span id="tips_qq"></span>
            <!--{/if}-->

            <!--{/if}-->
          </td>
          <th>微信：<span class="f_red"></span></th>
          <td>
            <!--{if empty($jubao.jbuser.weixin)}-->
            --
            <!--{else}-->
            <!--{$jubao.jbuser.weixin}-->
            
            <!--//9.05.28 -->
            <!--{if $config.rpzy_flag == '1'}-->
            <!--{if $jubao.flag == '0'}-->
            <input type="checkbox" name="creditweixin" id="creditweixin" value="1" checked lay-skin="primary" title="上报RP诚信"/>
            <!--{/if}-->
            <a href="javascript:;" class="oe_deluploadimg" f="creditget" data-type="weixin" data-value="<!--{$jubao.jbuser.weixin}-->" data-tips="tips_weixin">查询诚信</a> <span id="tips_weixin"></span>
            <!--{/if}-->

            <!--{/if}-->
          </td>
        </tr>
      </table>
    </div>
    
    <div class="layui-card-header">
      处理结果
    </div>
    <div class="layui-card-body">
      <table class="oe_tbl_form layui-form oe_edit_table">
        <!--{if $jubao.flag == "0"}-->
        <tr>
          <th width="15%"><font color="red">*</font>处理状态：</th>
          <td width="85%">
            <div class="layui-input-inline input-200">
              <select name="flag" id="flag" lay-filter="status">
                <option value="">=请选择=</option>
                <option value="1">情况属实，举报成功</option>
                <option value="2">举报失败，证据不足</option>
              </select>
            </div>
            <br />
            <span class="text_tip_inline" id="tips_credit" style="display:none;">
            <font color="">(开启RP诚信查询应用，将举报对象上报到RP诚信开放平台)</font>
            </span>
          </td>
        </tr>
        <tr id="tips_reason" style="display:none;">
          <th>
            <font color="red">*</font>上报理由：
          </th>
          <td>
            <textarea name="dealreason" id="dealreason" class="layui-textarea" style="width:40%;height:60px;border:1px solid #ddd;overflow:auto;"></textarea>
            <span class="text_tip_inline">(请填写举报理由，上报到RP诚信开放平台)</span>
          </td>
        </tr>
        <tr id="tips_forbid" style="display:none;">
          <th>处理结果：<span class="f_red"></span> </th>
          <td>
            <input type="checkbox" name="isforbid" id="isforbid" value="1" lay-skin="primary" title="禁封帐号" />
            <input type="checkbox" name="isblack" id="isblack" value="1" lay-skin="primary" title="拉入黑名单" />
          </td>
        </tr>
        <tr>
          <th>处理备注：<span class="f_red"></span> </th>
          <td>
            <textarea name="handremark" id="handremark" class="layui-textarea" style="width:40%;height:60px;border:1px solid #ddd;overflow:auto;"></textarea>
          </td>
        </tr>
        <!--{else}-->
        <tr>
          <th width="15%">处理状态：</th>
          <td width="85%">
            <!--{if $jubao.flag == "1"}-->
            <font color="green">情况属实，举报成功</font>
            <!--{else}-->
            <font color="red">举报失败，证据不足</font>
            <!--{/if}-->
          </td>
        </tr>
        <tr>
          <th>处理结果：</th>
          <td>
            <!--{if $jubao.isforbid == '1'}-->
            禁封帐号&nbsp;
            <!--{/if}-->
            
            <!--{if $jubao.isblack == '1'}-->
            拉入黑名单
            <!--{/if}-->
          </td>
        </tr>
        <tr>
          <th>备注说明：</th>
          <td>
            <!--{if empty($jubao.handremark)}-->
            --
            <!--{else}-->
            <!--{$jubao.handremark|nl2br}-->
            <!--{/if}-->
          </td>
        </tr>
        <tr>
          <th>处理时间：</th>
          <td>
            <!--{if $jubao.handtime == 0}-->
            --
            <!--{else}-->
            <!--{$jubao.handtime|date_format:"%Y-%m-%d %H:%M:%S"}-->
            <!--{/if}-->
          </td>
        </tr>
        <!--{/if}-->

      </table>
    </div>
    
    <!--//body End -->
  </div>
  
  <!--{if $jubao.flag == "0"}-->
  <div class="oe_tbl_form_btn">
    <button class="layui-btn" id="but_submit_post" lay-submit lay-filter="editform">
      保存结果
      <span class="oe_btn_loading layui-anim layui-icon layui-anim-rotate layui-anim-loop" style="display:none;">&#xe63d;</span>
    </button>
  </div>
  <!--{/if}-->
  
</div>
<script type="text/javascript">
$(function(){

    layui.use('form', function(){
        $form = layui.form;
        
        //选择处理状态
        $form.on('select(status)', function(data){
            $_val = data.value; //得到被选中的值
            if ($_val == "1") {
                
                //9.05.28
                <!--{if $config.rpzy_flag == '1'}-->
                $("#tips_credit").show();
                $("#tips_reason").show();
                <!--{/if}-->
                $("#tips_forbid").show();
            }
            else if ($_val == "2") {
                //9.05.28
                <!--{if $config.rpzy_flag == '1'}-->
                $("#tips_credit").hide();
                $("#tips_reason").hide();
                <!--{/if}-->
                $("#tips_forbid").hide();
            }
        });

      
        //保存结果...
        $form.on('submit(editform)', function(data){
            $obj_id = data.elem.getAttribute("id");
            if (!$("#"+$obj_id).hasClass("forbid_submit")) {
                $tips_obj = $("#tips_submit");
                $_flag = $("#flag").val();
                if ($_flag.length == 0) {
                    layer.msg("请选择处理状态");
                    return false;
                }
                
                //身份证号
                $_creditidnumber = $("input[name='creditidnumber']:checked").val();
                if (typeof($_creditidnumber) == "undefined") {
                    $_creditidnumber = 0;
                }
                //邮箱
                $_creditemail = $("input[name='creditemail']:checked").val();
                if (typeof($_creditemail) == "undefined") {
                    $_creditemail = 0;
                }
                //手机
                $_creditmobile = $("input[name='creditmobile']:checked").val();
                if (typeof($_creditmobile) == "undefined") {
                    $_creditmobile = 0;
                }
                //QQ号
                $_creditqq = $("input[name='creditqq']:checked").val();
                if (typeof($_creditqq) == "undefined") {
                    $_creditqq = 0;
                }
                //微信号
                $_creditweixin = $("input[name='creditweixin']:checked").val();
                if (typeof($_creditweixin) == "undefined") {
                    $_creditweixin = 0;
                }

                $_dealreason = $("#dealreason").val();
                $_isforbid = $("input[name='isforbid']:checked").val();
                if (typeof($_isforbid) == "undefined") {
                    $_isforbid = 0;
                }
                $_isblack = $("input[name='isblack']:checked").val();
                if (typeof($_isblack) == "undefined") {
                    $_isblack = 0;
                }
                $_handremark = $("#handremark").val();
                
                //审批成功
                if ($_flag == "1") {
                    //9.05.28
                    <!--{if $config.rpzy_flag == '1'}-->
                    if ($_dealreason.length == 0) {
                        layer.msg("请填写上报理由");
                        return false;
                    }
                    <!--{/if}-->
                }
                
                //成功
                if ($_flag == "1") {
                    $.ajax({
                        type: "POST",
                        url: "<!--{$oefile}-->",
                        cache: false,
                        data: {
                            c:"<!--{$c}-->", a:"success", id:"<!--{$id}-->", creditidnumber:$_creditidnumber, creditemail:$_creditemail, creditmobile:$_creditmobile, creditqq:$_creditqq, creditweixin:$_creditweixin, dealreason:$_dealreason, isforbid:$_isforbid, isblack:$_isblack, handremark:$_handremark, r:get_rndnum(8)},
                        dataType: "json",
                        success: function($data) {
                            $json = eval($data);
                            $response = $json.response;
                            $result = $json.result;
                            if ($response == "1") {
                                layer.msg("操作成功");
                                setTimeout(function(){
                                    window.location.reload();
                                }, 500);
                            }
                            else {
                                if ($result.length > 0) {
                                    layer.msg($result);
                                }
                                else {
                                    layer.msg("操作失败，请检查");
                                }
                            }
                        },
                        error: function() {

                        }
                    });

                }
                //失败
                else if ($_flag == "2") {
                
                    $.ajax({
                        type: "POST",
                        url: "<!--{$oefile}-->",
                        cache: false,
                        data: {
                            c:"<!--{$c}-->", a:"fail", id:"<!--{$id}-->", handremark:$_handremark, r:get_rndnum(8)
                        },
                        dataType: "json",
                        success: function($data) {
                            $json = eval($data);
                            $response = $json.response;
                            $result = $json.result;
                            if ($response == "1") {
                                layer.msg("操作成功");
                                setTimeout(function(){
                                    window.location.reload();
                                }, 500);
                            }
                            else {
                                if ($result.length > 0) {
                                    layer.msg($result);
                                }
                                else {
                                    layer.msg("操作失败，请检查");
                                }
                            }

                        },
                        error: function() {

                        }
                    });
                }

                $("#"+$obj_id).addClass("forbid_submit");
                if ($("#"+$obj_id).find("span").length > 0) {
                    $("#"+$obj_id).find("span").show();
                }
                
                return false;
            }
        });   
    });
});
</script>
<!--{/if}-->

</body>
</html>