<!DOCTYPE html>
<html lang=zh-cn>
<head>
	<meta charset=utf-8>
	<title>纵横计量支付系统</title>
	<meta name=description content=计量支付>
	<meta name=copyright content=smartcost.com.cn>
	<meta name="viewport" content="width=device-width,initial-scale=1.0">
	<link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
	<link rel=stylesheet href={{rootUrl}}global/css/style.css>
	<script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
	<script src={{rootUrl}}global/js/bootstrap.js></script>
	<script src={{rootUrl}}global/js/jl.js></script>
	<script src={{rootUrl}}global/js/echarts.min.js></script>
</head>
<body>
<!-- include "top" -->
<div class="wrapContent">
	<!-- include "left" -->
	<div class="mainContainer">
		<!--内容-->
		<div class="mainContent">
			<div class="title clearfix">
				<ul class="nav nav-pills">
					<li class="dropdown"><a title="返回" href="{{rootUrl}}sproject/index"><span class="closePanel" aria-hidden="true" data-icon="Z"></span></a></li>
					<li class="dropdown">
						<a href="{{rootUrl}}sproject/{{currproArray.pid}}/section" data-toggle="dropdown" class="dropdown-toggle">
							{{currproArray.pname}}<b class="caret"></b>
						</a>
						<ul class="dropdown-menu">
							<!-- loop allproArray -->
							<li><a href="{{rootUrl}}sproject/{{allproArray' value.pid}}/section">{{allproArray' value.pname}}</a></li>
							<!-- endloop -->
						</ul>
					</li>
				</ul>
			</div>
			<div class="project">
				<div class="proSection clearfix">
					<!--图表5-->
					<div class="fL" style="width:30%">
						<div id="chartContainer6" style="height: 300px; width: 100%;">
						</div>
					</div>
					<!--图表5-->
					<div class="fL" style="width:70%;height:300px;overflow:hide">
						<div id="chartContainer7" style="height: 300px; width: 100%;">
						</div>
					</div>
				</div>
				<!--表-->
				<div class="proSection clearfix">
					<table class="table table-striped">
						<thead>
						<tr>
							<th width="15%">标段名</th><th width="16%" class="taC">总价/期数</th><th width="40%" class="taC">截止上期完成/本期完成/未完成</th>
						</tr>
						</thead>
					</table>
					<!--<div style="height:264px;overflow-y:auto">-->
						<table class="table table-striped">
							<!-- loop MyMeasureArray -->
							<tr>
								<td width="15%"><a href="{{rootUrl}}sproject/{{MyMeasureArray' value.pid}}/section/{{MyMeasureArray' value.pmid}}/detail">{{MyMeasureArray' value.pmname}}</a><br>{{MyMeasureArray' value.type}}<br>
									<a id="idsec_{{MyMeasureArray' value.pmid}}" secid="{{MyMeasureArray' value.pmid}}" secname="{{MyMeasureArray' value.pmname}}" sectype="<!-- if {{MyMeasureArray' value.totalnum}} == 0 -->2<!-- else -->1<!-- endif -->" data-target="#del-confirm-<!-- if {{MeasureArray' value.totalnum}} == 0 -->2<!-- else -->1<!-- endif -->" data-toggle="modal" class="colRed"><span aria-hidden="true" data-icon="U"></span>删除</a></td><td width="16%" class="taR">￥<b>{{MyMeasureArray' value.totalplus}}</b><br>第 {{MyMeasureArray' value.totalnum}} 期（<span class="colOrange">{{MyMeasureArray' value.ownstatus}}</span>）</td><td width="40%" class="taR"><div class="progress">
								<div data-original-title="截止上期完成：￥{{MyMeasureArray' value.nstopnow}}" data-toggle="tooltip" data-placement="bottom" style="width: <!-- if tofloat({{MyMeasureArray' value.dispstopnow}}) >= 100 -->100%<!-- else -->{{MyMeasureArray' value.dispstopnow}}<!-- endif -->;" class="progress-bar progress-bar-success">{{MyMeasureArray' value.dispstopnow}}</div>
								<div data-original-title="本期完成：￥{{MyMeasureArray' value.ncurrdone}}" data-toggle="tooltip" data-placement="bottom" style="width:<!-- if tofloat({{MyMeasureArray' value.dispcurrdone}}) >= 100 -->100%<!-- else -->{{MyMeasureArray' value.dispcurrdone}}<!-- endif -->" class="progress-bar">{{MyMeasureArray' value.dispcurrdone}}</div>
								<div data-original-title="未完成：￥{{MyMeasureArray' value.nless}}" data-toggle="tooltip" data-placement="bottom" style="width:<!-- if tofloat({{MyMeasureArray' value.pless}}) >= 100 -->100%<!-- else -->{{MyMeasureArray' value.pless}}<!-- endif -->" class="progress-bar progress-bar-gary">{{MyMeasureArray' value.pless}}</div>
							</div></td>
							</tr>
							<!-- endloop -->
						</table>
					<!--</div>-->
				</div>
				<!--表-->
			</div>
		</div>
		<!--内容-->
	</div>
</div>
<!-- 删除已上报标段 -->
<div id="del-confirm-1" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h4 class="modal-title">删除标段</h4>
			</div>
			<form method="post" onsubmit="return checkdel();">
				<input type="hidden" name="secid" id="secid" value="">
				<div class="modal-body">
					<div class="form">
						<div class="alert alert-danger">
							<span id="delsection"></span> 已有审批数据，请谨慎操作。<br>需要删除，请在以下输入框输入"&nbsp;&nbsp;&nbsp;<b>删除标段</b>&nbsp;&nbsp;&nbsp;"，再点击“确认删除”按钮。
						</div>
						<div class="form-group">
							<input class="form-control" type="text" name="text" id="text" placeholder="">

						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
					<input type="submit" class="btn btn-danger" name="delsec" value="确认删除" />
				</div>
			</form>
		</div>
	</div>
</div>
<!-- 删除已上报标段 -->
<!-- 删除未上报标段 -->
<div id="del-confirm-2" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h4 class="modal-title">删除标段</h4>
			</div>
			<form class="form-horizontal" method="post">
				<input type="hidden" name="secid" id="secid2" value="">
				<div class="modal-body">
					<div class="form">
						<div class="alert alert-danger">
							确认删除 <span id="delsection2"></span> ?
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
					<input type="submit" class="btn btn-danger" name="delsec2" value="确认删除" />
				</div>
			</form>
		</div>
	</div>
</div>
<!-- 删除未上报标段 -->
<script type="text/javascript">autoFlashHeight();</script>
<script type="text/javascript">
// 路径配置
$(function () {
	//5 期数组成//
	// 基于准备好的dom，初始化echarts图表
	var myChart = echarts.init(document.getElementById('chartContainer6'));
	var option = {
		color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
			'#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
			'#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
			'#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
		title: {
			text: '',
			x: 'left'
		},
		tooltip: {
			trigger: 'item',
			formatter: "{a} <br/>{b}：<br>{c} 元<br>占标段：{d} %"
		},
		calculable: true,
		series: [
			{
				name: '标段计量分布',
				type: 'pie',
				radius: '40%',
				center: ['50%', 155],
				data: [
					<!-- loop MeasureArray -->
					{value: {{MeasureArray' value.contracttotal}}, name: '{{MeasureArray' value.pmname}}'},
					<!-- endloop -->
				]
			}
		]
	};
	// 为echarts对象加载数据
	myChart.setOption(option);
	//5 期数组成//
	//6 标段计量分布//
	// 基于准备好的dom，初始化echarts图表
	var myChart2 = echarts.init(document.getElementById('chartContainer7'));
	var option = {
		color: ['#e9af68', '#57b7b6', '#e4575a', '#959eac', '#6699FF',
			'#d38b70', '#8fb7cf', '#cd5c5c', '#ffa500', '#40e0d0',
			'#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
			'#5c616b', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'],
		title: {
			text: '标段按月进度'
		},
		tooltip: {
			trigger: 'axis',
			formatter: "{b} <br/>{a}：{c} %<br/>{a1}：{c1} %"
		},
		legend: {
			data:['累计完成','本月完成']
		},
		toolbox: {
			show: true,
			feature: {
				magicType: {show: true, type: ['line', 'bar']}
			}
		},
		dataZoom : {
			show : true,
			start :0,
			end : 100
		},
		xAxis: [
			{
				type: 'category',
				boundaryGap: true,
				data: [{{projectDate}}]
			}
		],
		yAxis: [
			{
				type: 'value',
				axisLabel: {
					formatter: '{value} %'
				},
				splitArea : {show : true}
			}
		],
		series: [
			{
				name: '累计完成',
				type: 'line',
				itemStyle: {
					normal: {
						lineStyle: {
							shadowColor: 'rgba(0,0,0,0.4)',
							shadowBlur: 5,
							shadowOffsetX: 3,
							shadowOffsetY: 3
						}
					}
				},
				data: [{{t1}}]
			},
			{
				name: '本月完成',
				type: 'line',
				itemStyle: {
					normal: {
						lineStyle: {
							shadowColor: 'rgba(0,0,0,0.4)',
							shadowBlur: 5,
							shadowOffsetX: 3,
							shadowOffsetY: 3
						}
					}
				},
				data: [{{t2}}]
			},
		]
	};
	// 为echarts对象加载数据
	myChart2.setOption(option);
	//3 标段计量分布//

	$("[id^='idsec_']").click(function (e) {
		var secid = $(this).attr('secid');
		var secname = $(this).attr('secname');
		var sectype = $(this).attr('sectype');
		if(sectype == 1){
			$("#secid").val(secid);
			$("#delsection").text(secname);
		}else{
			$("#secid2").val(secid);
			$("#delsection2").text(secname);
		}
	});
});

function checkdel(){
	if($('#text').val().trim() != '删除标段'){
		alert('请仔细阅读红色框中的内容并确认输入“删除标段”到输入框中');
		return false;
	}else{
		return true;
	}
}
</script>
</body>
</html>