<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>添加项目通用巡检指标项</title>
|
|
[#include "/business/pages/include/static.html" /]
|
</head>
|
<body class="edit_txt_body">
|
[#include "/component/DatePicker.html" /]
|
[#include "/component/newsel.html" /]
|
<script type="text/javascript">
|
$(function() {
|
$.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
|
document.getElementById("myform").target = window.top.openDialog("2","操作",
|
{},
|
{"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
|
return true;
|
}});
|
|
$("#leix").formValidator({empty: false, onShow: "请选择周期类型", onFocus: "周期类型不能为空!"}).inputValidator({min: 1, onError: "周期类型不能为空!"});
|
$("#zhouqi").formValidator({empty: false, onShow: "请输入周期", onFocus: "周期不能为空!"}).inputValidator({min: 1, onError: "周期不能为空!"})
|
.regexValidator({regExp:"intege1",dataType:"enum",onError:"周期必须为整数"});
|
[#if item.TYPE==2]
|
$("#beginExecDate").formValidator({empty: false, onShow: "请选择开始执行日期", onFocus: "开始执行日期不能为空!"}).inputValidator({min: 1, onError: "开始执行日期不能为空!"});
|
[/#if]
|
})
|
</script>
|
|
<div class="edit_txt">
|
<form id="myform" action="${base}/business/pages/health/updateLeix.html" method="post">
|
<input type="hidden" value="${item.id}" name="id" />
|
<input type="hidden" value="${item.id}" name="planId" />
|
<input type="hidden" value="${RequestParameters.proId}" name="proId" />
|
<table class="edit_layout">
|
<tr>
|
<th><label class="required">周期类型:</label></th>
|
<td>
|
<select name="leix" id="leix">
|
<option value="">请选择</option>
|
<option value="1" [#if item.TYPE==1]selected="selected"[/#if]>周期执行</option>
|
<option value="2" [#if item.TYPE==2]selected="selected"[/#if]>指定日期执行</option>
|
</select>
|
<div id="leixTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr id="kszx"><th><label class="required">开始执行时间:</label></th>
|
<td>
|
[#if item.TYPE==1]
|
[@datepicker id="beginExecDate" class="general" length=8 minDate="${beginTime}" maxDate="${endTime}" value="${item.NEXT_EXE_DATE}"/]
|
[#else]
|
[@datepicker id="beginExecDate" class="general" length=8 minDate="${beginTime}" maxDate="${endTime}" value=""/]
|
[/#if]
|
<div id="beginExecDateTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
<tr id="zq" [#if item.TYPE == 2]style="display:none;"[/#if]><th><label class="required">周期:</label></th>
|
<td><input class="general" type="text" name="zhouqi" id="zhouqi" [#if item.TYPE == 1]value="${item.CYCLE}"[/#if]/> 天
|
<div id="zhouqiTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
</table>
|
</form>
|
</div>
|
|
|
|
<script type="text/javascript">
|
var type = "${item.TYPE}";
|
|
$(function(){
|
$("#leix").live('change',function(){
|
if($(this).val() == 1){
|
$("#zq").show();
|
$("#zhouqi").attr("disabled",false).unFormValidator(false);
|
}else{
|
$("#zq").hide();
|
$("#zhouqi").attr("disabled",true).unFormValidator(true);
|
}
|
});
|
$("#leix").trrgier("change");
|
});
|
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("#myform").submit();
|
}
|
}
|
</script>
|
|
</body>
|
</html>
|