<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/common.jsp"%>
<title>品牌管理</title>
</head>
<link rel="stylesheet" type="text/css" href="${staticPath}webupload/progress.css">
<body>
<%@ include file="../common/head.jsp"%>
<div class="screen main">
    <%@ include file="../common/left.jsp" %>
    <div class="main-content">
        <div class="btn-radius">品牌型号管理</div>
        <form name="dataForm" action="ajax_brand_list.do" method="post">
        <div class="search-group">
            <input type="hidden" name="download" value="1" />
            <div class="search-item">产品型号&nbsp;&nbsp;<input type="text" id="model" name="model" class="text {text:'请输入关键字'}" size="11" /></div>
            <div class="search-item">品牌&nbsp;&nbsp;<input type="text" id="brand" name="brand" class="text {text:'请输入关键字'}" size="11" /></div>
            <div class="search-item">广告主&nbsp;&nbsp;<input type="text" id="advertiser" name="advertiser" class="text {text:'请输入关键字'}" size="11" /></div>
            <div class="search-item">
                一级行业
                <div class="select {width:120,onchange:onchangeByFirstInd}">
                    <select id="firstInd" name="firstInd">
                        <option value="">一级行业</option>
                        <c:forEach items="${brandType1}" var="item">
                           <option value="${item.number}">${item.name}</option>
                        </c:forEach>
                    </select>
                </div>
            </div>
            <div class="search-item">
                二级行业
                <div class="select">
                    <select id="secondInd" name="secondInd">
                        <option value="">二级行业</option>
                    </select>
                </div>
            </div>
            <div class="search-item">
                <a href="javascript:void(0);" onclick="getList(1)" class="btn-radius">搜 索</a>
            </div>
        </div>
        </form>
        <div class="rFloat buttons">
            <c:if test="${funcMap['brand_add'] eq 1}">
                <a href="javascript:platformModfiy('add','品牌型号信息');" class="btn">+新增</a>
            </c:if>
            <a href="${staticPath}excel/品牌导入模板.xlsx" class="btn">下载模板</a>
            <c:if test="${funcMap['brand_import_excel'] eq 1}">
                <span class="btn upfile">
                <form id="fileForm" action="import_excel_for_advertise.do?type=1" method="post" enctype="multipart/form-data" target="hframe">
                    <span class="webuploader-pick">导入表</span>
                    <input type="file" name="excelfile" id="excelfile" onchange="importExcel()"; />
                </form>
                </span>
            </c:if>
            <c:if test="${funcMap['brand_import_pic'] eq 1}">
                <div id="picker" class="btn"></div>
            </c:if>
            <c:if test="${funcMap['brand_export'] eq 1}">
                <a href="javascript:document.dataForm.submit();" class="btn">导出</a>
            </c:if>
        </div>
        已选 <span id="checkCount" class="orange">0</span> 条&nbsp;&nbsp;
        <c:if test="${funcMap['brand_all_delete'] eq 1}">
            <a href="javascript:void(0);" onclick="delRecordBatch()" class="btn del">批量删除</a>
        </c:if>
        <table class="table mTop10" cellpadding="0" cellspacing="0">
            <thead>
                <tr>
                    <th width="44"><input type="checkbox" class="checkbox checkbox-white {click:checkAll}" name="all" value="" /></th>
                    <th>产品型号</th>
                    <th width="98" class="nop">产品LOGO</th>
                    <th>所属品牌</th>
                    <th width="98" class="nop">品牌LOGO</th>
                    <th>广告主</th>
                    <th>一级行业</th>
                    <th>二级行业</th>
                    <th width="98">操作</th>
                </tr>
            </thead>
            <tbody id="list"></tbody>
        </table>
        <div class="mTop20">
            <div id="page" class="rFloat"></div>
            累计 <span id="count" class="blue">10</span> 条
        </div>
    </div>
    <div class="clear"></div>
</div>
<iframe name="hframe" style="display: none;"></iframe>
<%@ include file="../common/footer.jsp"%>
<script type="text/javascript" src="${staticPath}webupload/webuploader.min.js"></script>
<script type="text/javascript" src="${staticPath}webupload/upload.js"></script>
<script type="text/javascript" src="${staticPath}js/advertise/brand.js"></script>
<script type="text/javascript">
var update_flag = "${funcMap['brand_import_pic']}",delete_flag = "${funcMap['brand_import_pic']}";
$(function(){
    $.resetText();
    $(".text").input();
    $(".select").uiSelect();
    $.checkbox();
    getList(1);
    /*上传rar按钮初始化*/
    uploadRar('picker', '导入图片', 2, true, null, null,true,"myCallbcak");
})
function myCallbcak(url){
    alert("导入完成。", 1, function(){
        getList(1);
    });
}
</script>
</body>
</html>