<%@ 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>
        <div class="search-group">
            <form name="dataForm" action="ajax_brand_placement.do" method="post">
            <input type="hidden" name="download" value="1" />
            <div class="search-item">品牌名称&nbsp;&nbsp;<input type="text" name="brand" id="brand" class="text {text:'请输入关键字'}" size="30" /></div>
            <div class="search-item">产品型号&nbsp;&nbsp;<input type="text" name="model" id="model" class="text {text:'请输入关键字'}" size="30" /></div>
            <div class="search-item">节目名称&nbsp;&nbsp;<input type="text" name="programName" id="programName" class="text {text:'请输入关键字'}" size="30" /></div>
            <div class="mTop10">
                <div class="search-item">
                    节目类型&nbsp;
                    <div class="select selectW170 {width:170}">
                        <select name="type" id="type">
                            <option value="">节目类型</option>
                            <option value="1">综艺</option>
                            <option value="2">栏目</option>
                            <option value="3">电视剧</option>
                            <option value="4">电影</option>
                        </select>
                    </div>
                </div>
                <div class="search-item">
                    广告形式&nbsp;
                    <div class="select selectW170 {width:170}">
                        <select name="form" id="form">
                            <option value="">广告形式</option>
                            <c:forEach items="${formList}" var="item">
                                <option value="${item.id}">${item.val}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="search-item">
                    广告属性&nbsp;
                    <div class="select selectW170 {width:170}">
                        <select name="showMode" id="showMode">
                            <option value="">广告属性</option>
		                    <c:forEach items="${modeList}" var="item">
								<c:if test="${item.type == 1}">
		                            <option value="${item.id}">${item.val}</option>
								</c:if>
		                    </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="search-item">
                    植入方式&nbsp;
                    <div class="select selectW170 {width:170}">
                        <select name="tvMode" id="tvMode">
                            <option value="">植入方式</option>
                            <c:forEach items="${modeList}" var="item">
                                <c:if test="${item.type == 3}">
                                    <option value="${item.id}">${item.val}</option>
                                </c:if>
                            </c:forEach>
                        </select>
                    </div>
                </div>
            </div>
            <div class="mTop10">
                <div class="search-item">频次&nbsp;&nbsp;<input type="text" name="frequencyMin" id="frequencyMin" class="text {text:'频次1'}" size="11" /> - <input type="text" name="frequencyMax" id="frequencyMax" class="text {text:'频次2'}" size="11" /></div>
                <div class="search-item">时长&nbsp;&nbsp;<input type="text" name="lengthMin" id="lengthMin" class="text {text:'时长1'}" size="11" /> - <input type="text" name="lengthMax" id="lengthMax" class="text {text:'时长2'}" size="11" /></div>
                <div class="search-item">价格&nbsp;&nbsp;<input type="text" name="priceMin" id="priceMin" class="text {text:'价格1'}" size="11" /> - <input type="text" name="priceMax" id="priceMax" class="text {text:'价格2'}" size="11" /></div>
                <div class="search-item">
                    <a href="javascript:void(0);" onclick="getList(1)" class="btn-radius">搜 索</a>
                </div>
            </div>
            </form>
        </div>
        <div class="rFloat buttons">
        	<c:if test="${funcMap['placement_add'] eq 1}">
            	<a href="brand_placement_info.do" target="_blank" class="btn">+新增</a>
            </c:if>
            <a href="${staticPath}excel/品牌植入导入模板.xlsx" class="btn">下载模板</a>
            <c:if test="${funcMap['placement_import_excel'] eq 1}">
	            <span class="btn upfile">
	            <form id="fileForm" action="import_excel_for_advertise.do?type=3" 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['placement_import_pic'] eq 1}">
            	<div id="picker" class="btn"></div>
            </c:if>
            <c:if test="${funcMap['placement_import_video'] eq 1}"></c:if>
                <%--<div id="videoPicker" class="btn"></div>--%>

            <c:if test="${funcMap['placement_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['placement_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="10"><input type="checkbox" class="checkbox checkbox-white {click:checkAll}" name="all" value="" /></th>
                    <th width="85">品牌</th>
                    <th width="80">产品型号</th>
                    <th width="86">节目名称</th>
                    <th width="40">类型</th>
                    <th width="60">年份/季</th>
                    <th width="60">第几期<br />集数</th>
                    <th width="89">首播日期</th>
                    <th width="80">广告形式</th>
                    <th width="150">广告属性<br />植入方式</th>
                    <th width="40">频次<br />（次）</th>
                    <th width="40">时长<br />（秒）</th>
                    <th width="50">预估价格<br />（万）</th>
                    <th width="40">操作</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_placement.js"></script>
<script type="text/javascript">
var update_flag = "${funcMap['placement_update']}",delete_flag = "${funcMap['placement_delete']}";
$(function(){
    $.resetText();
    $(".text").input();
    $(".select").uiSelect();
    $.checkbox();
    $(".table").hoverTable(true);
    getList(1);
    /*上传rar按钮初始化*/
    uploadRar('picker', '导入图片', 3, true, null, null,true,"myCallbcak");
    //uploadRar('videoPicker', '导入视频', 4, true, null, null,true,"myCallbcak");
});
function myCallbcak(url){
    alert("导入完成。", 1, function(){
        getList(1);
    });
}
</script>
</body>
</html>