<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <LINK rel="Bookmark" href="/favicon.ico">
    <LINK rel="Shortcut Icon" href="/favicon.ico" />
    <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath }/common/admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
    <link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/css" />

    <!--[if IE 6]>
    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>主渠道列表</title>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
    返利记录 <span class="c-gray en">&gt;</span> 主渠道列表 <a
        class="btn btn-success radius r mr-20"
        style="line-height: 1.6em; margin-top: 3px"
        href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pd-20">
    <form action="${pageContext.request.contextPath }/admin/channel/listMainChannel" method="post" style="margin-bottom: 20px;text-align: center;">
       <input name="mainChannelName" id="mainChannelName" value="${mainChannelName }" placeholder="渠道名称" style="width: 150px" class="input-text" type="text">
       <input name="mainChannelDockingName" id="mainChannelDockingName" value="${mainChannelDockingName }" placeholder="对接人名称" style="width: 150px" class="input-text" type="text">
       <input name="mainChannelDockingTel" id="mainChannelDockingTel" value="${mainChannelDockingTel }" placeholder="对接人手机" style="width: 150px" class="input-text" type="text">
       <button name="" id="submitBtn" class="btn btn-success" type="submit">
            <i class="Hui-iconfont"></i> 搜索
        </button>

    </form>
    <form id="goodsform" >
        <%--<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l"><a href="javascript:;" onclick="toAddChannel('1')" class="btn btn-danger radius">添加主渠道</a>&nbsp;</span>
        </div>--%>
        <table class="table table-border table-bordered table-bg">
            <thead>
            <tr>
                <th scope="col" colspan="11">主渠道列表</th>
            </tr>
            <tr class="text-c">
                <th width="150">渠道名称</th>
                <th width="150">对接人</th>
                <th width="90">对接人手机</th>
                <th width="90">账户余额</th>
                <th width="130">账户银行</th>
                <th width="100">收款账号</th>
                <th width="100">开户名称</th>
                <th width="100">开户支行</th>
                <th width="100">备注</th>
                <th width="100">添加日期</th>
                <th width="100">操作</th>
            </tr>
            </thead>
            <tbody>
            <c:if test="${! (empty page.dataList) }">
            <c:forEach items="${page.dataList }" var="infolist">
            <tr class="text-c">
                <td>${infolist.mainChannelName }</td>
                <td>${infolist.mainChannelDockingName }</td>
                <td>${infolist.mainChannelDockingTel }</td>
                <td>${infolist.rebackAmount/100 }元</td>
                <td>${infolist.mainChannelBank }</td>
                <td>${infolist.mainChannelBankAccount}</td>
                <td>${infolist.mainChannelBankName}</td>
                <td>${infolist.mainChannelBankBranch}</td>
                <td>${infolist.mainChannelDesc}</td>
                <td><fmt:formatDate value="${infolist.mainChannelCreateTime}" pattern="yyyy-MM-dd"/></td>
                <td>
                    <a onclick="toRebateList(${infolist.mainChannelId})">查看明细</a><br>
                    <%--<a href="#" onclick="toRebateList(${infolist.mainChannelId})">结算</a>--%>
                </td>
                </c:forEach>
                </c:if>
                <c:if test="${empty page.dataList}">
                    <tr align="center"><td colspan="10" style="text-align: center;">未查询到该类数据!</td></tr>
                </c:if>
            </tbody>
        </table>
        <div align="right" class="mt-10 mb-10 mr-10">
            <%@include file="/common/other/paper/pager.jsp"%>
        </div>
    </form>

</div>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
   /*function update_status(){
        var rebackChannelId = $("#rebackChannelId").val();
                $.ajax({
                    url: '${pageContext.request.contextPath }/admin/channel/updateRebackStatus',
                    type: "POST",
                    dataType: "json",
                    data: {rebackChannelId : rebackChannelId,rebackChannelType : 1},
                    error:function(data){
                        layer.msg(data.status,{icon: 5,time:2000});
                    },
                    success:  function(data){
                        if(data.status){
                            layer.msg("已修改为已打款",{icon: 1,time:2000});
                        }else{
                            layer.msg("修改状态失败",{icon: 5,time:2000});
                        }

                    }
                });
    }*/
    function toRebateList(id) {
        window.location.href = '${pageContext.request.contextPath }/admin/channel/listChannelRebate?rebackChannelType=1&rebackChannelId='+id;
    }
    function toAddChannel(type) {
        window.location.href = '${pageContext.request.contextPath }/admin/channel/toAddChannel?type='+type;
    }
    // 关闭窗口
    function exitWindowsDiv(_this) {
        $(_this).parent().parent().hide();
    }
</script>
</body>
</html>