<%@ 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="machineid" type="hidden" />
	<div class="form-line clearfix" >
		<div class="fl">
			<span class="text-content"><em class="must"></em>服务器编号：</span> 
			<input id="machinenum" 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="machinename" class="easyui-textbox" data-options="required:true,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="machinebrand" 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="machinebrandtype" 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="machinetype" 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="machineostype" class="easyui-combobox" data-options="required:false,validType:'length[0,64]'" missingMessage="机器系统类型必填项" > 
		</div> 		 		
		<div class="fl">
			<span class="text-content"><em class="must">*</em>是否启用：</span> 
			<input id="detectionswitch" class="easyui-combobox" data-options="required:true" missingMessage="检测开关必填项" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must">*</em>机器ip：</span> 
			<input id="machineip" class="easyui-textbox" data-options="required:true,validType:'length[0,19]'" missingMessage="机器ip必填项" > 
		</div>  
		<div class="fl">
			<span class="text-content"><em class="must"></em>网管端口：</span> 
			<input id="networkport" class="easyui-textbox" data-options="required:false,validType:'length[0,10]'" missingMessage="网管端口必填项" > 
		</div> 		
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>登录账号：</span> 
			<input id="machineloginuser" class="easyui-textbox" data-options="required:false,validType:'length[0,64]'" missingMessage="机器账号必填项" > 
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>登录密码：</span> 
			<input id="machineloginpwd"   type="password" class="easyui-textbox" data-options="required:false,validType:'length[0,64]'" missingMessage="机器密码必填项" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em> 转发数阈值：</span> 
			<input id="extend1" class="easyui-textbox" data-options="required:false,validType:'length[0,64]'" > 
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must"></em>  录像路径：</span> 
			<input id="extend2" class="easyui-textbox" data-options="required:false,validType:'length[0,64]'"> 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>所在位置：</span> 
			<input id="machineposition" class="easyui-textbox" data-options="required:false,validType:'length[0,126]'" missingMessage="机器所在位置必填项" > 
		</div>
		<div class="fl">
			<span class="text-content"><em class="must"></em>区域编号：</span> 
			<input id="machineareanum" 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> 
			<textarea id="machinedescribe"  style="width:441px;height:80px"></textarea>  			
		</div> 
		<!-- <div class="fl">
			<span class="text-content"><em class="must"></em>机器描述：</span> 
			<input id="machinedescribe" class="easyui-textbox" data-options="required:false,validType:'length[0,126]'" missingMessage="机器描述必填项" > 
		</div> -->		
	</div>
	<!-- 
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>备注：</span> 
			<input id="remarks" class="easyui-textbox" data-options="required:false,validType:'length[0,128]'" 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(){
	//加载下拉选项
	$('#detectionswitch').combobox({
		 url:'xtclAction!query_Xtcl.do?csdl=ywTaskEnable',
		 textField:"csmc",  
		 valueField:"csdm",
		 panelWidth:148,
		 value:"1" 
	});
	$('#machineostype').combobox({
		 url:'xtclAction!query_Xtcl.do?csdl=ywMachineOsType',
		 textField:"csmc",  
		 valueField:"csdm",
		 panelWidth:148,
		 value:"1" 
	});
	
	
	setTimeout(loadValue,500);

});
function loadValue(){

	if(records){
		console.log("jjjjj：",records);
		$("#machineid").val(records.machineid);
 		$("#machinenum").textbox("setValue",records.machinenum);
		$("#machinename").textbox("setValue",records.machinename);
		$("#machinetype").textbox("setValue",records.machinetype);
		$("#machinebrand").textbox("setValue",records.machinebrand);
		$("#machinebrandtype").textbox("setValue",records.machinebrandtype);
		$("#machineos").textbox("setValue",records.machineos);
		$("#machineostype").combobox("setValue",records.machineostype);
		$("#machineip").textbox("setValue",records.machineip);
		$("#networkport").textbox("setValue",records.networkport);
		$("#machineloginuser").textbox("setValue",records.machineloginuser);
		$("#machineloginpwd").textbox("setValue",records.machineloginpwd);
		$("#machineposition").textbox("setValue",records.machineposition);
		$("#machineareanum").textbox("setValue",records.machineareanum);
		$("#extend1").textbox("setValue",records.extend1);
		$("#extend2").textbox("setValue",records.extend2);
		$("#machinedescribe").val(records.machinedescribe);
//		$("#machinedescribe").textbox("setValue",records.machinedescribe);
//		$("#machinestatus").combobox("setValue",records.machinestatus); 
//	    $("#machinestatusuptime").textbox("setValue",records.machinestatusuptime); 
//		$("#machinefaulttype").textbox("setValue",records.machinefaulttype);
		$("#detectionswitch").combobox("setValue",records.detectionswitch); 
//		$("#detectionstarttime").textbox("setValue",records.detectionstarttime); 
		$("#remarks").textbox("setValue",records.remarks);
		

	}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>
