<%@ 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"%>
	<style>
	.form-line .text-content{
		width:120px;
	}
	</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="xcdh" 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="xcdmc" 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="xcsbbh" 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="xcsbmc" 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="xcsbzt" 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="xfzt" class="easyui-textbox" data-options="required:false,validType:'length[0,10]'" missingMessage="修复状态必填项" > 
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>修复时间：</span> 
			<input id="xfsj" class="easyui-datetimebox" 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="xfms" 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="sbtp" class="easyui-textbox" data-options="required:false,validType:'length[0,128]'" missingMessage="设备图片必填项" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>设备视频：</span> 
			<input id="sbsp" 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="gztp" class="easyui-textbox" data-options="required:false,validType:'length[0,128]'" missingMessage="故障图片必填项" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>故障视频：</span> 
			<input id="gzsp" 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="bz" class="easyui-textbox" data-options="required:false,validType:'length[0,80]'" missingMessage="备注必填项" > 
		</div> 
		<!-- <div class="fl">
			<span class="text-content"><em class="must"></em>创建人员：</span> 
			<input id="cjry" 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="cjrq" class="easyui-textbox" data-options="required:false,validType:'length[0,19]'" missingMessage="创建日期必填项" > 
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>修改人员：</span> 
			<input id="xgry" 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="xgrq" class="easyui-textbox" data-options="required:false,validType:'length[0,19]'" missingMessage="修改日期必填项" > 
		</div> 
		
	</div> -->
	<!-- <div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>扩展1：</span> 
			<input id="kz1" class="easyui-textbox" data-options="required:false,validType:'length[0,64]'" missingMessage="扩展1必填项" > 
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>扩展2：</span> 
			<input id="kz2" class="easyui-textbox" data-options="required:false,validType:'length[0,64]'" missingMessage="扩展2必填项" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>扩展3：</span> 
			<input id="kz3" class="easyui-textbox" data-options="required:false,validType:'length[0,64]'" missingMessage="扩展3必填项" > 
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>扩展4：</span> 
			<input id="kz4" class="easyui-textbox" data-options="required:false,validType:'length[0,64]'" missingMessage="扩展4必填项" > 
		</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(){
	$('#xcsbzt').combobox("loadData",[{"id":"0","text":"异常"},{"id":"1","text":"正常","selected":true}]); 
	//加载下拉选项
	setTimeout(loadValue,500);
});
function loadValue(){
	if(records){
		$("#xh").val(records.xh);
		$("#xcdh").textbox("setValue",records.xcdh);
		$("#xcdmc").textbox("setValue",records.xcdmc);
		//$("#xcsbbh").textbox("setValue",records.xcsbbh);
		$("#xcsbmc").textbox("setValue",records.xcsbmc);
		$("#xcsbzt").combobox("setValue",records.xcsbzt);
		$("#xfzt").textbox("setValue",records.xfzt);
		$("#xfsj").datetimebox("setValue",records.xfsj);
		$("#xfms").textbox("setValue",records.xfms);
		$("#sbtp").textbox("setValue",records.sbtp);
		$("#sbsp").textbox("setValue",records.sbsp);
		$("#gztp").textbox("setValue",records.gztp);
		$("#gzsp").textbox("setValue",records.gzsp);
	/* 	$("#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{
		$("#xfsj").datetimebox("setValue",getCurrtentTime());
	}
}
/*
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);
*/
function getCurrtentTime(){
	var date = new Date();
	var year = date.getFullYear();
	var month = date.getMonth()+1;
	var day = date.getDate();
	var hour = date.getHours();
	var minute = date.getMinutes();
	var second = date.getSeconds();
	if(month<10){
		month = "0"+month;
	}
	if(day<10){
		day = "0"+day;
	}
	if(hour<10){
		hour = "0"+hour;
	}
	if(minute<10){
		minute = "0"+minute;
	}
	if(second<10){
		second = "0"+second;
	}
	//console.log(year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second);
	return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second; 
}
</script>
