<%@ 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="main-title">产品管理</div>
        <form name="dataForm" class="search-form" action="export.do" method="post">
        <div class="search-group">
            <input type="hidden" name="download" value="1" />
            <div class="search-item"><div class="label">产品名称：</div><input type="text" id="productName" name="productName" class="text {text:'请输入关键字'}" size="11" /></div>
            <div class="search-item"><div class="label">品牌：</div><input type="text" id="brandName" name="brandName" class="text {text:'请输入关键字'}" size="11" /></div>
            <div class="search-item">
                <div class="label">一级行业：</div>     
				<select id ="firstInd" name="firstInd">
					<option value=""></option>
				</select>
            </div>
            <div class="search-item"> 
                <div class="label">二级行业：</div>     
                <select id="secondInd" name="secondInd">
                    <option value=""></option>
                </select>
            </div>
            <div class="search-item">
                <a href="javascript:void(0);" onclick="getList(1)" class="search-btn">搜 索</a>
            </div>
        </div>
        </form>
        <div class="table-content">
            <div class="rFloat buttons">
                <c:if test="${funcMap['product_add'] eq 1}">
                    <a href="javascript:platformModfiy('add','产品信息');" class="btn">+新增</a>
                </c:if>
                <c:if test="${funcMap['product_import_template'] eq 1}">
                    <a href="${staticPath}excel/产品导入模板.xlsx" class="btn">下载模板</a>
                </c:if>
                <c:if test="${funcMap['product_import_excel'] eq 1}">
                    <span class="btn upfile">
                    <form id="fileForm" action="import_excel.do" 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['product_import_pic'] eq 1}">
                    <div id="picker" class="btn"></div>
                </c:if>
                <c:if test="${funcMap['product_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['product_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="198" class="nop">产品LOGO</th>
                        <th class="nop">所属品牌</th>
                        <th class="nop">一级行业</th>
                        <th class="nop">二级行业</th>
                        <th >操作</th>
                    </tr>
                </thead>
                <tbody id="list"></tbody>
            </table>
            <div class="mTop20">
                <div id="page" class="rFloat"></div>
                累计 <span id="count" class="blue">0</span> 条
            </div>
        </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/adproduct/adproduct.js"></script>
<script type="text/javascript">
var update_flag = "${funcMap['product_update']}",
	delete_flag = "${funcMap['product_delete']}",data_update_flag = "${funcMap['product_data_update']}";
$(function(){
    $.resetText();
    $(".text").input();
    $(".select").uiSelect();
    $.checkbox();
    getList(1);
    /*上传rar按钮初始化*/
    uploadRar('picker', '导入图片', 0, true, null, null,true,"myCallbcak");
})
function myCallbcak(url){
    alert("导入完成。", 1, function(){
        getList(1);
    });
}
</script>
</body>
</html>