<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE html>
<html>
<head lang="en">
	<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
 	<%@include file="../../../frame/assets/header-all.jsp"%>
 	<script type="text/javascript" src="../js/jquery.form.js"></script>
	<style>
	* { font-size:13px}
	.form-line .text-content{
		width:120px;
	}
	body { margin:0}
		
	.line { position:relative; float:left; padding: 8px 0px 8px 40px;   border-left: 0 !important;}
		
	.line span { float:left}

	input { border:1px solid #888; vertical-align:middle}
			
	.file { position:absolute; left:90px; top:8px; display:none;filter:alpha(opacity=0);opacity:0}
	
	.file1 { padding:6px 13px; display:block; float:left; background:#67c23a; color:#fff; z-index:1; margin-left:5px; vertical-align:middle; cursor: pointer}
	
	.inputstyle {     width: 180px;height: 26px;border:1px solid #888; z-index:99}
	.fail{padding:0 5px;}
	.datagrid-body{
		height:85px !important;
	}
	</style>
</head>
<body class="easyui-layout">
<form id="childform" class="easyui-form" data-options="novalidate:true">
	<input id="xh" type="hidden" />
	<div class="form-line clearfix" >
		<div class="fl">
			<span class="text-content"><em class="must"></em>设备编号：</span>
			<input id="sbbh" class="easyui-textbox" data-options="required:false,validType:'length[0,128]'" missingMessage="建筑物名称必填项" >
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>通道编号：</span>
			<input id="tdbh" class="easyui-combobox" data-options="valueField:'id', textField:'text',panelHeight:'auto'" missingMessage="建筑物类型必填项" >
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>通道类型：</span>
			<input id="tdlx" class="easyui-textbox" data-options="required:false,validType:'length[0,40]'" missingMessage="建筑物编号必填项" >
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>外部编号：</span>
			<input id="wbbh" class="easyui-textbox" data-options="required:false,validType:'length[0,40]'" missingMessage="建筑物区域必填项" >
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>建筑物详址：</span> 
			<input id="jzwxz" class="easyui-textbox" data-options="required:false,validType:'length[0,128]'" missingMessage="建筑物详址必填项" > 
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>联系人：</span> 
			<input id="lxr" class="easyui-textbox" data-options="required:false,validType:'length[0,40]'" missingMessage="联系人必填项" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>联系人电话：</span> 
			<input id="lxrdh" class="easyui-textbox" data-options="required:false,validType:'length[0,40]'" missingMessage="联系人电话必填项" > 
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>联系人手机：</span> 
			<input id="lxrsj" class="easyui-textbox" data-options="required:false,validType:'length[0,40]'" missingMessage="联系人手机必填项" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<div class="line"> 
				<span>
					<label  style="padding: 6px 0;">建筑物图片：</label>
					<input name="" type="text" id="viewfile"  readonly onmouseout="document.getElementById('myfile').style.display='none';" class="inputstyle" />
				</span>
				<label for="unload" onmouseover="document.getElementById('myfile').style.display='block';" class="file1">浏览...</label>
				<input type="file" onchange="document.getElementById('viewfile').value=this.value;this.style.display='none';" class="file"   id='myfile' name='file' />
			</div>
			<!-- 
			<span class="text-content"><em class="must"></em>建筑物图片：</span> 
			<input id="jzwtp1" class="easyui-textbox" data-options="required:false,validType:'length[0,128]'" missingMessage="建筑物图片1必填项" >
			 --> 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>简介：</span> 
			<input id="jj" class="easyui-textbox" data-options="multiline:true" style="width:300px;height:100px" missingMessage="简介必填项" > 
		</div> 
	</div>

	<div class="form-line hidden">
	</div>
</form>
</body>
</html>
<script type="text/javascript">
var winId	= $.getUrlParam("winId");
var records = top.$("#"+winId).panel("options").data;
$(function(){
	//加载下拉选项
	$('#jzwlx').combobox({
		 url:'xtclAction!query_Xtcl.do?csdl=nhywJzwlx', 
		 textField:"csmc",  
		 valueField:"csdm",
		 panelWidth:148,
		 loadFilter:function(data){
			return data;
		 } 
	});
	setTimeout(loadValue,500);
});
function loadValue(){
	if(records){
		$("#xh").val(records.xh);
		$("#jzwlx").combobox("setValue",records.jzwlx);
		$("#jzwmc").textbox("setValue",records.jzwmc);
		$("#jzwbh").textbox("setValue",records.jzwbh);
		$("#jzwqy").textbox("setValue",records.jzwqy);
		$("#jzwxz").textbox("setValue",records.jzwxz);
		$("#lxr").textbox("setValue",records.lxr);
		$("#lxrdh").textbox("setValue",records.lxrdh);
		$("#lxrsj").textbox("setValue",records.lxrsj);
		//$("#jzwtp1").textbox("setValue",records.jzwtp1);
		$("#jj").textbox("setValue",records.jj);
		$("#jd").textbox("setValue",records.jd);
		$("#wd").textbox("setValue",records.wd);
/*		$("#jzwtp2").textbox("setValue",records.jzwtp2);
		$("#cjry").textbox("setValue",records.cjry);
		$("#cjrq").textbox("setValue",records.cjrq);
		$("#xgry").textbox("setValue",records.xgry);
		$("#xgrq").textbox("setValue",records.xgrq);
		$("#bz").textbox("setValue",records.bz);
		$("#kz1").textbox("setValue",records.kz1);
		$("#kz2").textbox("setValue",records.kz2);
		$("#kz3").textbox("setValue",records.kz3);
		$("#kz4").textbox("setValue",records.kz4);
*/
	}else{
		
	}
}
/*
var xx1 = $("#xx1").textbox("getValue");//文本
var xx2 = $("#xx2").combobox("getValue");//下拉
var xx3 = $("#xx3").datetimebox("getValue");//日期
var xx4 = $("#xx4").numberbox("getValue");//数字
$('#xx5').combobox({  
	url:'xtclAction!select_Xtcl.do?csdl=xx5&page=1&rows=1000', 
	textField:"csmc",  
	valueField:"csdm",
	panelWidth:148,
	loadFilter:function(data){
		//data.unshift({"csmc":"选择","csdm":""});
		return data;
	}
});
$("#xx6").textbox("setValue",records.xx6);
$("#xx7").combobox("setValue",records.xx7);
$("#xx8").combobox("setValue",records.xx8);
$("#xx9").datetimebox("setValue",$.getNowTime());
$("#xx10").datetimebox("setValue",$.getTodayStart('00:00:00',-3));//往前推3天  +'00:00:00'
$("#xx11").datetimebox("setValue",$.getTodayEnd());//当天 +'23:59:59'	
$("#xx12").datetimebox("setValue",$.getDateNumToStr(records.xx12));
$("#xx13").numberbox("setValue",records.xx13);
*/
</script>
