<%@ 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 currentTime = new Date().getTime();
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }
	
		  return false;
		}
		$(document).ready(function() {
		    $("#currentTime").val(currentTime);
			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'
            });
		});

		function selectJudgeMembers(judgeType) {
            var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
            var consultType = $("#consult_type").val();
            var judgeCount = $("#judgeCount").val();
            if(judgeCount==null || judgeCount==undefined || judgeCount=="" ||isNaN(judgeCount)){
                parent.layer.msg("请指定评委人数！！！",{icon:2});
                parent.layer.close(loadingMessage);
                return false;
			}else{
                judgeCount=parseInt(judgeCount);
                if(judgeCount<=0){
                    parent.layer.msg("评委人数必须大于0",{icon:2});
                    parent.layer.close(loadingMessage);
                    return false;
                }
			}
            if(consultType==null || consultType == undefined || consultType==""){
                parent.layer.msg("请选择咨询类型！！！",{icon:2});
                parent.layer.close(loadingMessage);
                return false;
			}
		    var judge;
			if(judgeType=='0'){judge = 'judge';}
			if(judgeType=='1'){judge = 'judgeBak';judgeCount *=2;}
			$.ajax({
				url:'${ctx}/workbidingevaluation/workBidingEvaluation/selectJudgeMembers',
				data:{"judge":judge,"consultType":consultType,"currentTime":currentTime,
					  "judgeCount":judgeCount,"workBidingEvaluationId":"${workBidingEvaluation.id}"},
				dataType:'json',
				type:'POST',
				async:false,
				cache:false,
				success:function (resultData) {
				    if(judgeType=="0"){
				        $("#listJudge").html("");
                    }
                    if(judgeType=="1"){
				        $("#listJudgeBak").html("");
                    }
                    var judgeList = resultData['body']['judgeList'];
                    for(var i in judgeList){
                        var judgeObj = judgeList[i];
                        var judgeId = judgeObj.id;
                        var judgeName = judgeObj.name;
                        var judgeCompany = judgeObj.companyName;
                        var a = "";
                        var a2 = "";
                        if(judgeType=="0"){
							a = '<a href="javascript:void(0)" class="judgeLeaderSelect" onclick="saveJudgeLeader(\''+judgeId+'\',this)">设为组长</a>';
							a2 = '<a href="javascript:void(0)" onclick="deleteJudgeMember(\''+judgeId+'\',\''+0+'\',this)">删除</a>';
                        }
                        if(judgeType=="1"){
                            a = '<a href="javascript:void(0)" onclick="joinInJudgeMembers(\''+judgeId+'\',this)">加入评委组</a>';
                            a2 = '<a href="javascript:void(0)" onclick="deleteJudgeMember(\''+judgeId+'\',\''+1+'\',this)">删除</a>';
                        }
						var tr = '<tr>'+
									'<td>'+ judgeName+'</td>'+
									'<td>'+ judgeCompany +'</td>'+
									'<td>'+
										'<input type="hidden" value="'+judgeId+'"/>'+
										a+
										'&nbsp;&nbsp;'+
										a2+
									'</td>'+
								  '</tr>';

                        if(judgeType=="0"){
                            $("#listJudge").append(tr);
                        }
                        if(judgeType=="1"){
                            $("#listJudgeBak").append(tr);
                        }
					}
                    if(judgeType=="0"){
                        var judgeListSize = parseInt(resultData['body']['judgeListSize']);
                        if(judgeListSize > 0){
                            parent.layer.msg("抽选到合适的评委 <strong style='color: red;'>"+judgeListSize+"</strong> 人",{icon:6});
                            $("#judge_bak_select_abtn").replaceWith('<a id="judge_bak_select_hide" href="javascript:void(0)" onclick="selectJudgeMembers('+1+')" class="btn btn-info btn-xs">抽选备选评委</a>');
                        }else{
                            parent.layer.msg("没有合适的人选!!!",{icon:5});
                        }
                    }
                    if(judgeType=="1"){
                        var judgeBakListSize = parseInt(resultData['body']['judgeBakListSize']);
                        if(judgeBakListSize > 0){
                            parent.layer.msg("抽选到合适的备选评委 <strong style='color: red;'>"+judgeBakListSize+"</strong> 人",{icon:6});
                        }else{
                            parent.layer.msg("没有合适的人选!!!",{icon:5});
                        }
                    }
                    parent.layer.close(loadingMessage);
                }
			})
        }
        function saveJudgeLeader(judgeId,obj) {
            var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
            var that = obj;
			$.ajax({
				url:'${ctx}/workbidingevaluation/workBidingEvaluation/saveJudgeLeader',
				type:'POST',
				data:{"judgeId":judgeId,"workBidingEvaluationId":"${workBidingEvaluation.id}","currentTime":currentTime},
				dataType:'json',
				cache:false,
				async:false,
				success:function (resultData) {
                    $(".judgeLeaderSelect").removeAttr("style").text("设为组长");
                    $(that).text("组长").css("color","red");
                    parent.layer.msg("设置组长成功！！！",{icon:6});
                    parent.layer.close(loadingMessage);
                }
			})
        }
        function deleteJudgeMember(judgeId,judgeType,obj) {
            var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
            var tr = $(obj).parent().parent();
            $.ajax({
                url:'${ctx}/workbidingevaluation/workBidingEvaluation/deleteJudgeMember',
                type:'POST',
                data:{"judgeId":judgeId,"workBidingEvaluationId":"${workBidingEvaluation.id}",
					  "currentTime":currentTime,"judgeType":judgeType},
                dataType:'json',
                cache:false,
                async:false,
                success:function (resultData) {

					tr.remove();
					if(judgeType=='0'){
					    var judgeCount = $("#judgeCount").val();
					    judgeCount = parseInt(judgeCount)-1;
					    $("#judgeCount").val(judgeCount);
                    }
                    parent.layer.msg("删除成员成功！！！",{icon:6});
                    parent.layer.close(loadingMessage);
                }
            })
        }
        function joinInJudgeMembers(judgeId,obj) {
            var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
			var tr2 = $(obj).parent().parent();
            $.ajax({
                url:'${ctx}/workbidingevaluation/workBidingEvaluation/joinInJudgeMembers',
                type:'POST',
                data:{"judgeId":judgeId,"workBidingEvaluationId":"${workBidingEvaluation.id}",
                    "currentTime":currentTime},
                dataType:'json',
                cache:false,
                async:false,
                success:function (resultData) {
                    tr2.remove();
					var judgeCount = $("#judgeCount").val();
					judgeCount = parseInt(judgeCount)+1;
					$("#judgeCount").val(judgeCount);

                    $("#listJudge").html("");
                    var judgeList = resultData['body']['judgeList'];
                    for(var i in judgeList){
                        var judgeObj = judgeList[i];
                        var judgeId = judgeObj.id;
                        var judgeName = judgeObj.name;
                        var judgeCompany = judgeObj.companyName;
                        var a = '<a href="javascript:void(0)" class="judgeLeaderSelect" onclick="saveJudgeLeader(\''+judgeId+'\',this)">设为组长</a>';
						var a2 = '<a href="javascript:void(0)" onclick="deleteJudgeMember(\''+judgeId+'\',\''+0+'\',this)">删除</a>';
                        var tr = '<tr>'+
                            '<td>'+ judgeName+'</td>'+
                            '<td>'+ judgeCompany +'</td>'+
                            '<td>'+
                            '<input type="hidden" value="'+judgeId+'"/>'+
                            a+
                            '&nbsp;&nbsp;'+
                            a2+
                            '</td>'+
                            '</tr>';
                            $("#listJudge").append(tr);
                    }

                    parent.layer.msg("加入评委组成功！！！",{icon:6});
                    parent.layer.close(loadingMessage);
                }
            })
			
        }
        function confirmDeposit(num,obj,workProjectDepositId) {
            var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
		    var statusValue = $(obj).val();
			$.post('${ctx}/workbidingevaluation/workBidingEvaluation/confirmDeposit',
				  {"num":num,"statusValue":statusValue,"workProjectDepositId":workProjectDepositId},
					function () {


                        parent.layer.msg("确认成功！！！",{icon:6});
                        parent.layer.close(loadingMessage);
					}
			);
        }

        function deleteDeposit(workProjectDepositId,obj) {
            var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
		    var that = obj;
            $.get('${ctx}/workbidingevaluation/workBidingEvaluation/deleteDeposit?workProjectDepositId='+workProjectDepositId,
                function () {
					$(that).parent().parent().remove();
                    parent.layer.msg("删除投标企业成功！！！",{icon:6});
                    parent.layer.close(loadingMessage);
                }
            );
        }

	</script>
	<script type="text/javascript">
        function openDialogEdit(title,url,width,height,target){

            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端，就使用自适应大小弹窗
                width='auto';
                height='auto';
            }else{//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                maxmin: true, //开启最大化最小化按钮
                content: url ,
                btn: ['确定','关闭'],
                yes: function(index, layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    var formId = inputForm.attr("id");
                    if(formId){
                        var $document = iframeWin.contentWindow.document;
                        $document.getElementById(formId).setAttribute("action","${ctx}/workbidingevaluation/workBidingEvaluation/saveDeposit");
                        formSubmitEdit($document,formId,index);

                    }
                },
                cancel: function(index){
                }
            });
        }
        function openDialogre(title,url,width,height,target){

            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端，就使用自适应大小弹窗
                width='auto';
                height='auto';
            }else{//如果是PC端，根据用户设置的width和height显示。

            }
            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                maxmin: true, //开启最大化最小化按钮
                content: url ,
                btn: ['确定','关闭'],
                yes: function(index, layero){
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if(target){
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    }else{
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target",top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示
                    var formId = inputForm.attr("id");
                    if(formId){
                        var $document = iframeWin.contentWindow.document;
                        $document.getElementById(formId).setAttribute("action","${ctx}/workbidingevaluation/workBidingEvaluation/saveDeposit");
                        formSubmit($document,formId,index);
                    }
                },
                cancel: function(index){
                }
            });
        }

        function formSubmit($document,inputForm,index){
            var validateForm = $($document.getElementById(inputForm)).validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $($document.getElementById("#messageBox")).text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
            if(validateForm.form()){
                var loadingMessage = parent.layer.load(0, {shade: false,opacity:0.1});

                $($document.getElementById(inputForm)).ajaxSubmit({

                    success:function(data) {
                        parent.layer.msg("保存成功！！！",{icon:6});
                        parent.layer.close(loadingMessage);
                        top.layer.close(index);

						var projectdeposit = data['body']['workProjectDeposit'];

                            var projectdepositId = projectdeposit.id;
                            var bidingOfficeName = projectdeposit.bidingOfficeName;
                            var contacts = projectdeposit.contacts;
                            var phone = projectdeposit.phone;
                            var email = projectdeposit.email;
                            var deposit = projectdeposit.deposit;
                            var bidingDocumentFee = projectdeposit.bidingDocumentFee;
                            console.log(projectdepositId+"-"+bidingOfficeName+"-"+contacts+
                                "-"+phone+"-"+email+"-"+deposit+"-"+bidingDocumentFee);
                            var a1 = '<a href="javascript:void(0)" onclick="openDialogEdit(\'修改信息\',\'${ctx}/workbidingevaluation/workBidingEvaluation/editDeposit?workProjectDepositId='+projectdepositId+'\',\'800px\',\'500px\')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>';
                            var a2 = '<a href="javascript:void(0)" onclick="deleteDeposit(\''+projectdepositId+'\',this)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>';
                            var tr =
                                '<tr id='+projectdepositId+'>'+
                                '<td>'+bidingOfficeName+'</td>'+
                                '<td>'+contacts+'</td>'+
                                '<td>'+phone+'</td>'+
                                '<td>'+email+'</td>'+
                                '<td>'+deposit+'</td>'+
                                '<td>'+bidingDocumentFee+'</td>'+
                                '<td>' +
										'<div class="deposit_status" style="border: solid 1px #eee; width: 4em;height: 2em;text-align:center;line-height: 2em;float: left;background: #FF8C69;" >待缴纳</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;background: #FF8C69;">待缴纳</div>'+
								'</td>'+
                                '<td>'+
								a1+
								a2+
                                '</td>'+
                                '</tr>';
                            $("#bidCompanys").append(tr);


                    }
                });
            }
        }
        function formSubmitEdit($document,inputForm,index){
            var validateForm = $($document.getElementById(inputForm)).validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $($document.getElementById("#messageBox")).text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
            if(validateForm.form()){
                var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
                $($document.getElementById(inputForm)).ajaxSubmit({

                    success:function(data) {
                        top.layer.close(index);
                        parent.layer.msg("保存成功！！！",{icon:6});
                        parent.layer.close(loadingMessage);

                        var projectdeposit = data['body']['workProjectDeposit'];

                        var projectdepositId = projectdeposit.id;
                        var bidingOfficeName = projectdeposit.bidingOfficeName;
                        var contacts = projectdeposit.contacts;
                        var phone = projectdeposit.phone;
                        var email = projectdeposit.email;
                        var deposit = projectdeposit.deposit;
                        var bidingDocumentFee = projectdeposit.bidingDocumentFee;
                        console.log(projectdepositId+"-"+bidingOfficeName+"-"+contacts+
                            "-"+phone+"-"+email+"-"+deposit+"-"+bidingDocumentFee);
                        var a1 = '<a href="javascript:void(0)" onclick="openDialogEdit(\'修改信息\',\'${ctx}/workbidingevaluation/workBidingEvaluation/editDeposit?workProjectDepositId='+projectdepositId+'\',\'800px\',\'500px\')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>';
                        var a2 = '<a href="javascript:void(0)" onclick="deleteDeposit(\''+projectdepositId+'\',this)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>';
                        var tr =
                            '<tr id='+projectdepositId+'>'+
                            '<td>'+bidingOfficeName+'</td>'+
                            '<td>'+contacts+'</td>'+
                            '<td>'+phone+'</td>'+
                            '<td>'+email+'</td>'+
                            '<td>'+deposit+'</td>'+
                            '<td>'+bidingDocumentFee+'</td>'+
                            '<td>' +
								'<div class="deposit_status" style="border: solid 1px #eee; width: 4em;height: 2em;text-align:center;line-height: 2em;float: left;background: #FF8C69;" >待缴纳</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;background: #FF8C69;">待缴纳</div>'+
                            '</td>'+
                            '<td>'+
                            a1+
                            a2+
                            '</td>'+
                            '</tr>';
                        $("#"+projectdepositId).replaceWith(tr);

                    }
                });
            }
        }
	</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"/>
		<input type="hidden" name="workBidingProjectId" value="${workBidingProjectId}"/>
		<input type="hidden" id="currentTime" name="currentTime"/>
		<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">
						<input id="startTime" name="startTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date input-sm"
							 value="<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">
						<form:input path="startAddress" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评标时间：</label></td>
					<td class="width-30">
						<input id="evaluationTime" name="evaluationTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date input-sm"
							value="<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">
						<form:input path="evaluationAddress" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评委人数：</label></td>
					<td class="width-30">
						<form:input id="judgeCount" path="judgeCount" htmlEscape="false"    class="form-control required number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">评委咨询类型：</label></td>
					<td class="width-30">
						<form:select id="consult_type" path="consultType" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('consult_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</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%;">
								<a href="javascript:void(0)" onclick="selectJudgeMembers('0')" class="btn btn-info btn-xs">抽选评委会成员</a><br>
								<table  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
									<thead>
										<tr><td>评委名称</td><td>工作单位</td><td>操作</td></tr>
									</thead>
									<tbody id="listJudge" >
										<c:forEach items="${workBidingEvaluation.judgeMembersList}" var="judge">
											<tr>
												<td>${judge.name}</td>
												<td><span title="${judge.companyName}">${fns:abbr(judge.companyName, 30)}</span></td>
												<td>
													<input type="hidden" value="${judge.id}"/>
													<c:if test="${workBidingEvaluation.judgeLeader == judge.id}">
														<a href="javascript:void(0)" class="judgeLeaderSelect" style="color: red;" onclick="saveJudgeLeader('${judge.id}',this)">组长</a>
													</c:if>
													<c:if test="${workBidingEvaluation.judgeLeader != judge.id}">
														<a href="javascript:void(0)" class="judgeLeaderSelect" onclick="saveJudgeLeader('${judge.id}',this)">设为组长</a>
													</c:if>
													&nbsp;&nbsp;
													<a href="javascript:void(0)" onclick="deleteJudgeMember('${judge.id}','0',this)">删除</a>
												</td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
							<div id="d_12" style="align-content: center;margin: 10px 10px 10px 30px;height: 80%;width: 40%;">
								<a id="judge_bak_select_abtn" href="javascript:void(0)" onclick="javascript:parent.layer.msg('请先抽选评委成员',{icon:2})" class="btn btn-default btn-xs">抽选备选评委</a>
								<table  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
									<thead>
										<tr><td>评委名称</td><td>工作单位</td><td>操作</td></tr>
									</thead>
									<tbody id="listJudgeBak" >
									<c:forEach items="${workBidingEvaluation.judgeMembersBakList}" var="judge">
										<tr>
											<td>${judge.name}</td>
											<td><span title="${judge.companyName}">${fns:abbr(judge.companyName, 30)}</span></td>
											<td>
												<input type="hidden" value="${judge.id}"/>
												<a href="javascript:void(0)" onclick="joinInJudgeMembers('${judge.id}',this)">加入评委组</a>
												&nbsp;&nbsp;
												<a href="javascript:void(0)" onclick="deleteJudgeMember('${judge.id}','1',this)">删除</a>
											</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">
						<%--<form:input path="otherMembers" htmlEscape="false"    class="form-control "/>--%>
						<div >
							<div id="otherMembers" style="float:left;width: 100%">
								<sys:treeselect id="otherMembers" name="otherMembers" value="${workBidingEvaluation.otherMembers}" labelName="otherMembersNames" labelValue="${workBidingEvaluation.otherMembersNames}"
												title="用户" url="/sys/office/treeData?type=3&isAll=false" cssClass="form-control" allowClear="true" checked="true" notAllowSelectParent="true"/>
							</div>
						</div>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评标室：</label></td>
					<td class="width-30" colspan="3">
						<%--<form:input path="workEvaluationRoom" htmlEscape="false"    class="form-control "/>--%>
							<sys:gridselect2 url="${ctx}/workbidingevaluation/workBidingEvaluation/selectRoom"
											 id="workEvaluationRoom" name="workEvaluationRoom.id"
											 value="${workBidingEvaluation.workEvaluationRoom.id}"
											 title="选择评标室"
											 labelName="workEvaluationRoom.address"
											 labelValue="${workBidingEvaluation.workEvaluationRoom.address}${workBidingEvaluation.workEvaluationRoom.floor}${workBidingEvaluation.workEvaluationRoom.houseNumber}"
											 cssClass="form-control"
											 fieldLabels="评标室" fieldKeys="address"
											 searchLabel="评标室" searchKey="address"
											 floorLabel="楼层" floorKey="floor"
											 housenumberLabel="房间号" housenumberKey="houseNumber"
							></sys:gridselect2>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">评标室预约时间（起）：</label></td>
					<td class="width-30">
						<input id="appointmentTimeBegin" name="appointmentTimeBegin" type="text" maxlength="20" class="laydate-icondate form-control layer-date input-sm"
							   value="<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">
						<input id="appointmentTimeEnd" name="appointmentTimeEnd" type="text" maxlength="20" class="laydate-icondate form-control layer-date input-sm"
							   value="<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>
							<a href="javascript:void(0)" onclick="openDialogre('新增投标企业', '${ctx}/workbidingevaluation/workBidingEvaluation/formDeposit?workBidingProjectId=${workBidingEvaluation.workBidingProjectId}','80%','80%')" class="btn btn-info btn-xs" > <i class="fa fa-plus"></i>新增投标企业</a>
							<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><td>操作</td>
								</tr>
								</thead>
								<tbody id="bidCompanys">
								<c:forEach items="${workBidingEvaluation.workProjectDepositList}" var="workProjectDeposit">
									<tr id="${workProjectDeposit.id}">
										<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>
										<td>
											<a href="javascript:void(0)" onclick="openDialogEdit('修改投标企业', '${ctx}/workbidingevaluation/workBidingEvaluation/editDeposit?workProjectDepositId=${workProjectDeposit.id}','80%','80%',this)" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
											<a href="javascript:void(0)" onclick="deleteDeposit('${workProjectDeposit.id}',this)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
										</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">
						<form:textarea path="remarks" htmlEscape="false" rows="2"    class="form-control "/>
					</td>
				</tr>
		   </tbody>
		</table>
	</form:form>
</body>
</html>