<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/common.jsp"%>
<title>电视剧数据</title>
</head>
<body>
<%@ include file="../common/head.jsp"%>
<div class="screen main">
    <%@ include file="../common/left.jsp" %>
    <div class="main-content relative">
        <div class="main-title">电视剧数据</div>
        <form id="dataForm" method="post">
            <input type="hidden" name="id" value="${map.id}" />
            <input type="hidden" name="adTheatreId" value="${adTheatreId}" />
            <div class="search-form">
                <div class="search-group"><div class="search-item blue"><h2>《${adTheatre.name}》第${adTheatre.mediaNum}集电视台数据</h2></div></div>
                <div class="search-group">
                    <div class="search-item">播放电视台：${adTheatre.mediaName}</div>
                    <div class="search-item">播放日期：${adTheatre.showDate}</div>
                    <div class="search-item">播放时间：${adTheatre.showTime}</div>
                </div>
            </div>
            <div class="table-content">
                <div class="hd-title">29省网每集收视率</div>
                <div class="search-group">
                    <div class="search-item"><span class="label">收视率：</span><input type="text" id="rating29" name="rating29" class="text" size="5" value="${map.rating29}" /></div>
                    <div class="search-item"><span class="label">到达千人：</span><input type="text" id="dk29" name="dk29" class="text" size="5" value="${map.dk29}" /></div>
                </div>
                <div class="search-group"><div class="search-item"><b>分省达到千人</b></div></div>
                <div class="search-group">
                    <div class="search-item"><span class="label">山东：</span><input type="text" id="shandong" name="shandong" class="text" size="5" value="${map.shandong}" /></div>
                    <div class="search-item"><span class="label">辽宁：</span><input type="text" id="liaoning" name="liaoning" class="text" size="5" value="${map.liaoning}" /></div>
                    <div class="search-item"><span class="label">黑龙江：</span><input type="text" id="heilongjiang" name="heilongjiang" class="text" size="5" value="${map.heilongjiang}" /></div>
                    <div class="search-item"><span class="label">吉林：</span><input type="text" id="jilin" name="jilin" class="text" size="5" value="${map.jilin}" /></div>
                    <div class="search-item"><span class="label">内蒙古：</span><input type="text" id="neimenggu" name="neimenggu" class="text" size="5" value="${map.neimenggu}" /></div>
                </div>
                <div class="search-group">
                    <div class="search-item"><span class="label">北京：</span><input type="text" id="beijing" name="beijing" class="text" size="5" value="${map.beijing}" /></div>
                    <div class="search-item"><span class="label">上海：</span><input type="text" id="shanghai" name="shanghai" class="text" size="5" value="${map.shanghai}" /></div>
                    <div class="search-item"><span class="label">天津：</span><input type="text" id="tianjing" name="tianjing" class="text" size="5" value="${map.tianjing}" /></div>
                    <div class="search-item"><span class="label">重庆：</span><input type="text" id="chongqing" name="chongqing" class="text" size="5" value="${map.chongqing}" /></div>
                    <div class="search-item"><span class="label">山西：</span><input type="text" id="shanxi" name="shanxi" class="text" size="5" value="${map.shanxi}" /></div>
                </div>
                <div class="search-group">
                    <div class="search-item"><span class="label">四川：</span><input type="text" id="sichuan" name="sichuan" class="text" size="5" value="${map.sichuan}" /></div>
                    <div class="search-item"><span class="label">云南：</span><input type="text" id="yunnan" name="yunnan" class="text" size="5" value="${map.yunnan}" /></div>
                    <div class="search-item"><span class="label">贵州：</span><input type="text" id="guizhou" name="guizhou" class="text" size="5" value="${map.guizhou}" /></div>
                    <div class="search-item"><span class="label">甘肃：</span><input type="text" id="gansu" name="gansu" class="text" size="5" value="${map.gansu}" /></div>
                    <div class="search-item"><span class="label">陕西：</span><input type="text" id="shaanxi" name="shaanxi" class="text" size="5" value="${map.shaanxi}" /></div>
                </div>
                <div class="search-group">
                    <div class="search-item"><span class="label">河北：</span><input type="text" id="hebei" name="hebei" class="text" size="5" value="${map.hebei}" /></div>
                    <div class="search-item"><span class="label">河南：</span><input type="text" id="henan" name="henan" class="text" size="5" value="${map.henan}" /></div>
                    <div class="search-item"><span class="label">福建：</span><input type="text" id="fujian" name="fujian" class="text" size="5" value="${map.fujian}" /></div>
                    <div class="search-item"><span class="label">广东：</span><input type="text" id="guangdong" name="guangdong" class="text" size="5" value="${map.guangdong}" /></div>
                    <div class="search-item"><span class="label">浙江：</span><input type="text" id="zhejiang" name="zhejiang" class="text" size="5" value="${map.zhejiang}" /></div>
                </div>
                <div class="search-group">
                    <div class="search-item"><span class="label">江苏：</span><input type="text" id="jiangsu" name="jiangsu" class="text" size="5" value="${map.jiangsu}" /></div>
                    <div class="search-item"><span class="label">江西：</span><input type="text" id="jiangxi" name="jiangxi" class="text" size="5" value="${map.jiangxi}" /></div>
                    <div class="search-item"><span class="label">安徽：</span><input type="text" id="anhui" name="anhui" class="text" size="5" value="${map.anhui}" /></div>
                    <div class="search-item"><span class="label">湖南：</span><input type="text" id="hunan" name="hunan" class="text" size="5" value="${map.hunan}" /></div>
                    <div class="search-item"><span class="label">湖北：</span><input type="text" id="hubei" name="hubei" class="text" size="5" value="${map.hubei}" /></div>
                </div>
                <div class="search-group">
                    <div class="search-item"><span class="label">广西：</span><input type="text" id="guangxi" name="guangxi" class="text" size="5" value="${map.guangxi}" /></div>
                    <div class="search-item"><span class="label">海南：</span><input type="text" id="hainan" name="hainan" class="text" size="5" value="${map.hainan}" /></div>
                    <div class="search-item"><span class="label">宁夏：</span><input type="text" id="ningxia" name="ningxia" class="text" size="5" value="${map.ningxia}" /></div>
                    <div class="search-item"><span class="label">新疆：</span><input type="text" id="xinjiang" name="xinjiang" class="text" size="5" value="${map.xinjiang}" /></div>
                    <div class="search-item"></div>
                </div>

                <div class="search-group"><div class="search-item"><b>受众人群构成</b>&nbsp;&nbsp;比例（%）</div></div>
                <div class="search-group">
                    <div class="search-item flex-column pRight30"><span class="label">男性比例：</span><input type="text" id="peopleMan29" name="peopleMan29" class="text" size="5" value="${map.peopleMan29}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">女性比例：</span><input type="text" id="peopleWomen29" name="peopleWomen29" class="text" size="5" value="${map.peopleWomen29}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">4-14岁：</span><input type="text" id="people41429" name="people41429" class="text" size="5" value="${map.people41429}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">15-24岁：</span><input type="text" id="people152429" name="people152429" class="text" size="5" value="${map.people152429}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">25-34岁：</span><input type="text" id="people253429" name="people253429" class="text" size="5" value="${map.people253429}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">35-44岁：</span><input type="text" id="people354429" name="people354429" class="text" size="5" value="${map.people354429}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">45-54岁：</span><input type="text" id="people455429" name="people455429" class="text" size="5" value="${map.people455429}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">55-64岁：</span><input type="text" id="people556429" name="people556429" class="text" size="5" value="${map.people556429}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">65+岁：</span><input type="text" id="people6529" name="people6529" class="text" size="5" value="${map.people6529}" /></div>
                </div>
            </div>
            <div class="table-content">
                <div class="hd-title">51城网每集收视率</div>
                <div class="search-group">
                    <div class="search-item"><span class="label">收视率：</span><input type="text" id="rating51" name="rating51" class="text" size="5" value="${map.rating51}" /></div>
                    <div class="search-item"><span class="label">到达千人：</span><input type="text" id="dk51" name="dk51" class="text" size="5" value="${map.dk51}" /></div>
                </div>
                <div class="search-group"><div class="search-item"><b>受众人群构成</b>&nbsp;&nbsp;比例（%）</div></div>
                <div class="search-group">
                    <div class="search-item flex-column pRight30"><span class="label">男性比例：</span><input type="text" id="peopleMan51" name="peopleMan51" class="text" size="5" value="${map.peopleMan51}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">女性比例：</span><input type="text" id="peopleWoman51" name="peopleWoman51" class="text" size="5" value="${map.peopleWoman51}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">1-14岁：</span><input type="text" id="people11451" name="people11451" class="text" size="5" value="${map.people11451}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">15-24岁：</span><input type="text" id="people152451" name="people152451" class="text" size="5" value="${map.people152451}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">25-34岁：</span><input type="text" id="people253451" name="people253451" class="text" size="5" value="${map.people253451}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">35-44岁：</span><input type="text" id="people354451" name="people354451" class="text" size="5" value="${map.people354451}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">45-54岁：</span><input type="text" id="people455451" name="people455451" class="text" size="5" value="${map.people455451}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">55-64岁：</span><input type="text" id="people556451" name="people556451" class="text" size="5" value="${map.people556451}" /></div>
                    <div class="search-item flex-column pRight30"><span class="label">65+岁：</span><input type="text" id="people6551" name="people6551" class="text" size="5" value="${map.people6551}" /></div>
                </div>
            </div>
        </form>
        <div class="btn-position">
            <div class="rFloat buttons">
                <a href="${basePath}ad-theatre/index.do" class="search-btn cancel">返回</a>
                <c:if test="${edit eq 1}"><a href="javascript:save();" class="search-btn">提交</a></c:if>
            </div>
        </div>
    </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">
$(function(){
    $.resetText();
    $(".text").input();
    $.checkbox();
})
// 保存
function save(){
    // 得到数据
    var data = $('#dataForm').serializeJSON();
    console.log(data);
    if (data['adTheatreId'].isEmpty()){
        top.alert("没有 adTheatreId");
        return false;
    }
    // 提交数据
    top.ajax("save.do", data, function(res){
        if (res.code == 1){
            top.alert("保存成功。", 1, function(){
                window.location.reload();
            });
        } else {
            top.alert(res.msg);
        }
    });
}
</script>
</body>
</html>