<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../common/common.jsp" %>
<title>节目数据-电影</title>
<link rel="stylesheet" type="text/css" href="${staticPath}css/jquery.datetimepicker.css" />
<script type="text/javascript" src="${staticPath}js/program/vareity.js"></script>
<script type="text/javascript" src="${staticPath}js/program/movie.js"></script>
<script type="text/javascript" src="${staticPath}js/common/jquery.datetimepicker.js"></script>
</head>
<script type="text/javascript">
$(function(){
	$.resetText();
	$(".text").input();
	$(".select").uiSelect();
	$("#movieLastDate, #netLastDate,#doubanLastDate").datetimepicker();
	readOnly();
});
</script>
</head>
<body>
<%@ include file="../common/head.jsp"%>
<div class="screen main">
	<%@ include file="../common/left.jsp" %>
	<div class="main-content">
		<input id="mode" type="hidden" value="${mode}"/>
		<input id="programId" type="hidden" value="${record.id}"/>
		<div class="btn-radius">节目数据--电影：${record.programName} 首播：<fmt:formatDate value='${record.showTime}' type='date' /></div>
		<div class="hd-title mTop10">电影票房</div>
		<div class="box-pd">
			截止日期&nbsp;&nbsp;<input type="text" id="movieLastDate" name="lastDate" class="text {text:'请选择日期'}" value="<fmt:formatDate value='${programData.movieData.lastDate}' type='date' />" />
			累计票房&nbsp;&nbsp;<input type="text" class="text" id="movieCboTotal" name="cboTotal" value="<fmt:formatNumber value='${programData.movieData.cboTotal}' pattern="#.##" minFractionDigits="2" ></fmt:formatNumber>" size="6" />
		<div class="hd-title mTop10">网络平台数据</div>
		<div class="box-pd">
			<a href="javascript:addNetWork();" class="btn rFloat">+添加</a>
			截止日期&nbsp;&nbsp;<input type="text" id="netLastDate" name="lastDate" class="text {text:'请选择日期'}" value="<fmt:formatDate value='${programData.netData[0].lastDate}' type='date' />"/>
			<table class="table table-gray network-table mTop10" cellpadding="0" cellspacing="0">
				<thead>
					<tr>
						<th>视频平台</th>
						<th>点击量（个）</th>
						<th>评分（分）</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody id="netWorkTerrace">
						<c:choose>
							<c:when test="${programData.netData != null && programData.netData.size() > 0}">
								<c:forEach var="it" items="${programData.netData}">
									<tr>
										<td>
											<div class="select">
												<select name="platformName">
													<c:forEach var="item" items="${netData}">		
														<option value="${item.platformName}" ${item.platformName == it.platformName? "selected" :""}>${item.platformName}</option>
													</c:forEach>
												</select>
											</div>
										</td>
										<td><input type="text" class="text" name="clickTimes" value="${it.clickTimes}" size="6" /></td>
										<td><input type="text" class="text" name="score" value="${it.score}" size="6" /></td>
										<td class="edit"><a href="javascript:void(0);" onclick="removeNetWork(this);">删除</a></td>
									</tr>
								</c:forEach>
							</c:when>
						<c:otherwise>
							<tr>
								<td>
									<div class="select">
										<select name="platformName">
											<c:forEach var="item" items="${netData}">		
												<option value="${item.platformName}">${item.platformName}</option>
											</c:forEach>
										</select>
									</div>
								</td>
								<td><input type="text" class="text" name="clickTimes" value="${it.clickTimes}" size="6" /></td>
								<td><input type="text" class="text" name="score" value="${it.score}" size="6" /></td>
								<td class="edit"><a href="javascript:void(0);" onclick="removeNetWork(this);">删除</a></td>
							</tr>
						</c:otherwise>
					</c:choose>			
				</tbody>
			</table>
			<script type="text/html" id="netWork_tempalte">
				<tr>
					<td>
						<div class="select">
							<select name="platformName">
								<c:forEach var="item" items="${netData}">		
									<option value="${item.platformName}">${item.platformName}</option>
								</c:forEach>
							</select>
						</div>
					</td>
					<td><input type="text" class="text" name="clickTimes" value="" size="6" /></td>
					<td><input type="text" class="text" name="score" value="" size="6" /></td>
					<td class="edit"><a href="javascript:void(0);" onclick="removeNetWork(this);">删除</a></td>
				</tr>
			</script>
		</div>
		<div class="hd-title mTop10">网络平台人群受众构成 - 比例(%)</div>
		<table class="table table-gray network-table" cellpadding="0" cellspacing="0">
			<thead>
				<tr>
					<th>男性</th>
					<th>女性</th>
					<th>1-17岁</th>
					<th>18-24岁</th>
					<th>25-30岁</th>
					<th>31-35岁</th>
					<th>35-40岁</th>
					<th>40岁以上</th>
				</tr>
			</thead>
			<tbody id="netGroupTerrace">
				<tr>
					<td><input type="text" class="text" name="sexMan" value="${programData.netGroup.sexMan}" size="6" /></td>
					<td><input type="text" class="text" name="sexWoman" value="${programData.netGroup.sexWoman}" size="6" /></td>
					<td><input type="text" class="text" name="age17" value="${programData.netGroup.age17}" size="6" /></td>
					<td><input type="text" class="text" name="age1824" value="${programData.netGroup.age1824}" size="6" /></td>
					<td><input type="text" class="text" name="age2530" value="${programData.netGroup.age2530}" size="6" /></td>
					<td><input type="text" class="text" name="age3135" value="${programData.netGroup.age3135}" size="6" /></td>
					<td><input type="text" class="text" name="age3640" value="${programData.netGroup.age3640}" size="6" /></td>
					<td><input type="text" class="text" name="age40" value="${programData.netGroup.age40}" size="6" /></td>
				</tr>
			</tbody>
		</table>
		<div class="hd-title mTop20">豆瓣数据</div>
		<table class="table table-gray network-table" cellpadding="0" cellspacing="0">
			<thead>
				<tr>
					<th>截止日期</th>
					<th>评分（分）</th>
					<th>评论数（人）</th>
				</tr>
			</thead>
			<tbody id="doubanTerrace">
				<tr>
					<td><input type="text" class="text {text:'日期'}" id="doubanLastDate" name="lastDate" value="<fmt:formatDate value='${programData.doubanData.lastDate}' type='date' />" /></td>
					<td><input type="text" class="text" id="doubanScore" name="score" value="${programData.doubanData.score}" size="6" /></td>
					<td><input type="text" class="text" name="commentCount" value="${programData.doubanData.commentCount}" size="6" /></td>
				</tr>
			</tbody>
		</table>
		<div align="center" class="mTop20"><a href="javascript:saveMovieData()" class="btn-radius max-btn">提交</a></div>
	</div>
	<div class="clear"></div>
</div>
<%@ include file="../common/footer.jsp" %>
</body>
</html>