<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>询价与核价管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var validateForm;
        function doSubmit(obj){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
            if(validateForm.form()){
                if(obj == 2){
                    $("#inputForm").attr("action","${ctx}/workaskcheckprice/workAskCheckPrice/store");
                }else if (obj == 3){
                    $("#inputForm").attr("action","${ctx}/workaskcheckprice/workAskCheckPrice/save");
                }else if (obj == 4){
                    $("#inputForm").attr("action","${ctx}/workaskcheckprice/workAskCheckPrice/store");
                }else{
                    $("#inputForm").attr("action","${ctx}/workaskcheckprice/workAskCheckPrice/save");
                }
                $("#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: '#quotyVtime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
						,type:"datetime"
			        });
		});
	</script>
</head>
<body class="hideScroll">
		<form:form id="inputForm" modelAttribute="workAskCheckPrice" method="post" class="form-horizontal">
		<form:hidden path="id"/>
			<form:hidden path="fullManage.id" value="${workFullManage.id}"/>
		<sys:message content="${message}"/>
			<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
				<tbody>
				<tr>
					<td class="width-20 active" rowspan="5"><label class="pull-right">台账信息</label></td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>核价设备名称：</label></td>
					<td class="width-35">
						<form:input path="equipmentName" htmlEscape="false"    class="form-control required"/>
					</td>
					<td class="width-15 active"><label class="pull-right">规格型号：</label></td>
					<td class="width-35">
						<form:input path="formatType" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">核价人：</label></td>
					<td class="width-35">
						<form:input path="checkUname" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right">核价：</label></td>
					<td class="width-35">
						<form:input path="checkPrice" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>报价单位：</label></td>
					<td class="width-35">
						<form:input path="quotyClient" htmlEscape="false"    class="form-control required"/>
					</td>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>报价：</label></td>
					<td class="width-35">
						<form:input path="quotyPrice" htmlEscape="false"    class="form-control required"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">报价有效期：</label></td>
					<td class="width-35">
						<input id="quotyVtime" name="quotyVtime" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
							   value="<fmt:formatDate value="${workAskCheckPrice.quotyVtime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
					</td>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>核价单编号：</label></td>
					<td class="width-35">
						<form:input path="checkNum" htmlEscape="false"    readonly="true" class="form-control required"/>
					</td>
				</tr>
				<%--<tr>
					<td class="width-15 active"><label class="pull-right">备注信息：</label></td>
					<td class="width-35" colspan="3">
						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
					</td>
				</tr>--%>
				<tr>
					<td class="width-20 active" rowspan="5"><label class="pull-right">项目信息</label></td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">项目编号：</label></td>
					<td class="width-25">
							${workFullManage.fullProjectNumber}
					</td>
					<td class="width-15 active"><label class="pull-right">项目来源：</label></td>
					<td class="width-25">
							${fns:getDictLabel(workFullManage.fullProjectSource, 'full_project_source', '')}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">项目名称：</label></td>
					<td class="width-25">
							${workFullManage.fullProjectName}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">行业分类：</label></td>
					<td class="width-25">
							${fns:getDictLabel(workFullManage.fullIndustryType, 'full_industry_type', '')}
					</td>
					<td class="width-15 active"><label class="pull-right">结构类型：</label></td>
					<td class="width-25">
							${fns:getDictLabel(workFullManage.fullStructureType, 'full_structure_type', '')}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">投资额（元）：</label></td>
					<td class="width-25">
							${workFullManage.fullInvestMoney}
					</td>
				</tr>
				<tr>
					<td class="width-20 active" rowspan="5"><label class="pull-right">客户信息</label></td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">业主单位：</label></td>
					<td class="width-25" colspan="3">
						<input type="hidden" id="clientId" name="clientId" value="${workFullManage.workClientInfo.id}"/>
							${workFullManage.workClientInfo.name}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">客户信用等级：</label></td>
					<td class="width-25">
							${workFullManage.workClientInfo.creditRank}
					</td>
					<td class="width-15 active"><label class="pull-right">业主联系人：</label></td>
					<td class="width-25">
							${workFullManage.workClientInfo.workClientLinkmanList[0].name}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">职务：</label></td>
					<td class="width-25">
							${workFullManage.workClientInfo.workClientLinkmanList[0].position}
					</td>
					<td class="width-15 active"><label class="pull-right">联系方式：</label></td>
					<td class="width-25">
							${workFullManage.workClientInfo.workClientLinkmanList[0].linkPhone}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">QQ：</label></td>
					<td class="width-25">
							${workFullManage.workClientInfo.workClientLinkmanList[0].qq}
					</td>
					<td class="width-15 active"><label class="pull-right">Email：</label></td>
					<td class="width-25">
							${workFullManage.workClientInfo.workClientLinkmanList[0].email}
					</td>
				</tr>
				</tbody>
			</table>
	</form:form>
</body>
</html>