<%@ 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="tab-buttons">
            <a href="to_advertise_list.do" class="button button-16">电视硬广</a>
            <a href="to_play_list.do" class="button button-16 active">电视节目</a>
            <a href="to_long_list.do" class="button button-16">网络长视频</a>
            <a href="to_short_list.do" class="button button-16">网络短视频</a>
            <a href="to_app_list.do" class="button button-16">APP</a>
            <a href="to_other_list.do" class="button button-16">网络其他资源</a>
        </div>
        <form name="dataForm" action="ajax_resource_list_by_play.do" method="post">
        <div class="search-group">
            <input type="hidden" name="download" value="1" />
            <div class="search-item-15"><input type="text" id="name" name="name" class="text {text:'请输入资源名称'}" size="10" value="${resourceName}" /></div>
            <div class="search-item-15"><input type="text" id="channel" name="channel" class="text {text:'请输入播出频道'}" size="10" /></div>
            <div class="search-item-15"><input type="text" id="showTime" name="showTime" class="text {text:'请输入时间'}" size="8" /></div>
            <div class="search-item-15"><input type="text" id="form" name="form" class="text {text:'请输入广告形式'}" size="10" /></div>
           <%-- <div class="search-item-15">
                <div class="select selectW120 {width:120}">
                    <select id="form" name="form">
                        <option value="">请选择广告形式</option>
                        <option value="1">节目冠名</option>
                        <option value="2">特约播出</option>
                        <option value="3">互动支持</option>
                        <option value="4">合作伙伴</option>
                        <option value="5">指定产品</option>
                        <option value="6">指定用车</option>
                        <option value="7">其他</option>
                    </select>
                </div>
            </div>--%>
            <div class="search-item-15">&nbsp;&nbsp;<input type="text" id="showInterval" name="showInterval" class="text {text:'请输入客户类别'}" size="10"/></div>
            <div class="search-item-15">&nbsp;&nbsp;<input type="text" id="customer" name="customer" class="text {text:'请输入已售客户'}" size="10"/></div>
            <div class="search-item-15">
                <div class="select selectW120 {width:120}">
                    <select id="sellStatus" name="sellStatus">
                        <option value="">请选择售卖状态</option>
                        <option value="0">在售</option>
                        <option value="1">已售</option>
                    </select>
                </div>
            </div>
            <div class="search-item-15">
                <a href="javascript:void(0);" onclick="getList(1)" class="btn-radius">搜 索</a>
            </div>
        </div>
        </form>
        <div class="rFloat buttons">
            <c:if test="${funcMap['resource_all_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['resource_all_import'] eq 1}">
	            <span class="btn upfile">
	                <form id="excelfileForm" action="import_excel_for_advertise.do?type=5" method="post" enctype="multipart/form-data" target="hframe">
	                <span class="webuploader-pick">导入表</span>
	                <input type="file" name="excelfile" id="excelfile" onchange="importExcel()"; />
	                <input type="hidden" id="isSure" name="isSure" >
	                </form>
	            </span>
            </c:if>
            <c:if test="${funcMap['resource_all_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['resource_all_delete'] ne 1}">
            <a href="javascript:void(0);" onclick="delRecordBatch();" class="btn del" style="visibility:hidden;">xxxxxx</a>
        </c:if>
        <c:if test="${funcMap['resource_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>资源名称</th>
                <th>资源类型</th>
                <th>广告形式</th>
                <th>时间</th>
                <th>节目体裁</th>
                <th>售卖方式</th>
                <th>刊例价格（元）</th>
                <th>折扣</th>
                <th>客户类别</th>
                <th>售卖状态</th>
                <th>已售客户</th>
                <th>备注</th>
                <th width="36">操作</th>
            </tr>
            </thead>
            <tbody id="list">
            </tbody>
        </table>
        <div class="mTop20">
            <div id="page" class="rFloat"></div>累计 <span id="count" class="orange">0</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/adresource/play.js"></script>
<script type="text/javascript">
var update_flag = "${funcMap['resource_all_update']}", delete_flag = "${funcMap['resource_all_delete']}", score_flag = "${funcMap['resource_all_score']}";
$(function(){
    $.resetText();
    $(".text").input();
    $(".select").uiSelect();
    // 获取数据
    getList(1);
})
</script>