<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>评标管理管理</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		#d_1{border: 1px solid #eee}
		#d_11,#d_12{float: left}
		#d_1{border:0}
		#d_13{clear: left}
	</style>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }
	
		  return false;
		}
		$(document).ready(function() {
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});

            laydate.render({
                elem: '#startTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus', //响应事件。如果没有传入event，则按照默认的click
				type : 'datetime'
            });
            laydate.render({
                elem: '#evaluationTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus' ,//响应事件。如果没有传入event，则按照默认的click
				type :'datetime'
            });
            laydate.render({
                elem: '#appointmentTimeBegin', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus', //响应事件。如果没有传入event，则按照默认的click
				type :'datetime'
            });
            laydate.render({
                elem: '#appointmentTimeEnd', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                event: 'focus', //响应事件。如果没有传入event，则按照默认的click
				type:'datetime'
            });
		});

	</script>
	<script type="text/javascript">
        $(document).ready(function() {
            var status_array = ['待缴纳','已缴纳','已退还','未退还'];
            var color_array  = ['#FF8C69','#83C75D','#83C75D','#FF8C69'];
            $(".deposit_status,.biding_documentFee").each(function(){
                var text = $(this).text().trim();
				var index = status_array.indexOf(text);
				$(this).css("background",color_array[index]);
            });
        })
	</script>
</head>
<body class="hideScroll">
		<form:form id="inputForm" modelAttribute="workBidingEvaluation" action="${ctx}/workbidingevaluation/workBidingEvaluation/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>	
		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
		   <tbody>
				<tr>

					<td class="width-15 active"><label class="pull-right">开标时间：</label></td>
					<td class="width-30">
						<fmt:formatDate value="${workBidingEvaluation.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">开标地点：</label></td>
					<td class="width-40" colspan="3">
						${workBidingEvaluation.startAddress}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评标时间：</label></td>
					<td class="width-30">
						<fmt:formatDate value="${workBidingEvaluation.evaluationTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评标地点：</label></td>
					<td class="width-40" colspan="3">
						${workBidingEvaluation.evaluationAddress}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评委人数：</label></td>
					<td class="width-30">
						${workBidingEvaluation.judgeCount}
					</td>
					<td class="width-15 active"><label class="pull-right">评委咨询类型：</label></td>
					<td class="width-30">
						${fns:getDictLabel(workBidingEvaluation.consultType,'consult_type' ,'' )}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评委信息：</label></td>
					<td class="width-30" colspan="3">
						<div id="d_1">
							<div id="d_11" style="align-content: center;margin: 10px 30px 10px 10px;height: 80%;width: 40%;">
								<span>评委成员：(组长：${workBidingEvaluation.judgeLeaderName})</span>
								<table  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
									<thead>
										<tr><td>评委名称</td><td>工作单位</td></tr>
									</thead>
									<tbody id="listJudge" >
										<c:forEach items="${workBidingEvaluation.judgeMembersList}" var="judge">
											<tr>
												<td>${judge.name}</td>
												<td>${judge.companyName}</td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
							<div id="d_12" style="align-content: center;margin: 10px 10px 10px 30px;height: 80%;width: 40%;">
								<span>备选评委成员：</span>
								<table  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
									<thead>
										<tr><td>评委名称</td><td>工作单位</td></tr>
									</thead>
									<tbody id="listJudgeBak" >
									<c:forEach items="${workBidingEvaluation.judgeMembersBakList}" var="judge">
										<tr>
											<td>${judge.name}</td>
											<td>${judge.companyName}</td>
										</tr>
									</c:forEach>
									</tbody>
								</table>
							</div>
							<div id="d_13"></div>
						</div>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">其他相关工作人员：</label></td>
					<td class="width-30" colspan="3">
						${workBidingEvaluation.otherMembersNames}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评标室：</label></td>
					<td class="width-30" colspan="3">
						<c:if test="${not empty workBidingEvaluation.workEvaluationRoom}">
							<c:if test="${not empty workBidingEvaluation.workEvaluationRoom.address}">
								${workBidingEvaluation.workEvaluationRoom.address}
							</c:if>
							<c:if test="${not empty workBidingEvaluation.workEvaluationRoom.floor}">
								，${workBidingEvaluation.workEvaluationRoom.floor}楼，
							</c:if>
							<c:if test="${workBidingEvaluation.workEvaluationRoom.houseNumber}">
								${workBidingEvaluation.workEvaluationRoom.houseNumber}室
							</c:if>
						</c:if>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评标室预约时间（起）：</label></td>
					<td class="width-30">
						<fmt:formatDate value="${workBidingEvaluation.appointmentTimeBegin}" pattern="yyyy-MM-dd HH:mm:ss"/>
					</td>
					<td class="width-15 active"><label class="pull-right">评标室预约时间（止）：</label></td>
					<td class="width-30">
						<fmt:formatDate value="${workBidingEvaluation.appointmentTimeEnd}" pattern="yyyy-MM-dd HH:mm:ss"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">投标企业：</label></td>
					<td class="width-30" colspan="3">
						<div>
							<table  class="table table-striped table-bordered table-condensed" >
								<thead>
								<tr><td>企业名称</td><td>联系人</td><td>联系电话</td>
									<td>电子邮箱</td><td>保证金(万元)</td><td>标书费</td>
									<td>保证金 | 标书费缴纳情况</td>
								</tr>
								</thead>
								<tbody id="bidCompanys">
								<c:forEach items="${workBidingEvaluation.workProjectDepositList}" var="workProjectDeposit">
									<tr>
										<td>${workProjectDeposit.bidingOfficeName}</td>
										<td>${workProjectDeposit.contacts}</td>
										<td>${workProjectDeposit.phone}</td>
										<td>${workProjectDeposit.email}</td>
										<td>${workProjectDeposit.deposit}</td>
										<td>${workProjectDeposit.bidingDocumentFee}</td>
										<td>
											<div class="deposit_status" style="border: solid 1px #eee; width: 4em;height: 2em;text-align:center;line-height: 2em;float: left" >
												${fns:getDictLabel(workProjectDeposit.depositStatus,'deposit_status' , '')}
											</div>
											<div style="float: left;margin-right: 10px;margin-left: 10px;"> | </div>
											<div class="biding_documentFee" style="border: solid 1px #eee; width: 4em;height: 2em;text-align:center;line-height: 2em;float: left">
												${fns:getDictLabel(workProjectDeposit.bidingDocumentStatus,'biding_document_status' , '')}
											</div>
										</td>
									</tr>
								</c:forEach>
								</tbody>
							</table>
						</div>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">备注信息：</label></td>
					<td class="width-30" colspan="3">
						${workBidingEvaluation.remarks}
					</td>
				</tr>
		   </tbody>
		</table>
	</form:form>
</body>
</html>