<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>例行维护项周期</title>
|
|
[#include "/business/pages/include/static.html" /]
|
[#include "/component/DatePicker.html" /]
|
[#include "/component/newsel.html" /]
|
</head>
|
<body class="end_task_body widthauto">
|
|
<script type="text/javascript">
|
$(function() {
|
$.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
|
document.getElementById("myform").target = window.top.openDialog("1","操作",
|
{},
|
{"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: "周期为1到3位数字!"}).inputValidator({min: 1, onError: "周期为1到3位的数字!"}).regexValidator({regExp:"intege", dataType:"enum", onError:"周期必须为1到3位数字"});
|
$("#beginExecDate").formValidator({empty: false, onShow: "请选择开始执行日期", onFocus: "开始执行日期不能为空!"}).inputValidator({min: 1, onError: "开始执行日期不能为空!"});
|
$("#contactsName").formValidator({empty: false, onShow: "请输入联系人", onFocus: "联系人不能为空!"}).inputValidator({min: 1, onError: "联系人不能为空!"});
|
$("#contactsTel").formValidator({empty: false, onShow: "请输入联系手机号码", onFocus: "联系手机号码不能为空!"}).inputValidator({min: 1, onError: "联系手机号码不能为空!"}).regexValidator({regExp:"mobile", dataType:"enum", onError:"格式如:15933332222"});
|
|
[#if item.LEIX == 1]
|
$("#zhouqi,#beginExecDate").attr("disabled",false).unFormValidator(false);//恢复校验
|
[#else]
|
$("#zhouqi,#beginExecDate").attr("disabled",true).unFormValidator(true); //解除校验
|
[/#if]
|
|
})
|
</script>
|
|
<div class="edit_txt">
|
<form id="myform" action="${base}/business/pages/remind/itemCycle.html" method="post">
|
<input type="hidden" value="${item.ID}" name="id" />
|
<input type="hidden" value="${itemId}" name="project_item_id" />
|
<input type="hidden" value="${customerId}" name="customerId" />
|
<input type="hidden" value="${subId}" name="subId" />
|
<input type="hidden" value="${outDate}" id="check" />
|
|
<table class="edit_layout2">
|
<tr>
|
<th><label class="required">周期类型:</label></th>
|
<td>
|
<select name="leix" id="leix" class="mysel" >
|
<option value="">请选择</option>
|
<option value="1" [#if item.LEIX==1]selected="selected"[/#if]>周期执行</option>
|
<option value="2" [#if item.LEIX==2]selected="selected"[/#if]>指定日期执行</option>
|
</select>
|
<div id="leixTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
|
<tr id="kszx" [#if item.LEIX == 2]style="display:none;"[/#if]><th><label class="required">开始执行时间:</label></th>
|
<td>
|
[#if item.LEIX==1]
|
[@datepicker id="beginExecDate" class="general" length=8 value="" value="${item.BEGIN_EXEC_DATE}"/]
|
[#else]
|
[@datepicker id="beginExecDate" class="general" length=8 value="" /]
|
[/#if]
|
<div id="beginExecDateTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
<tr id="zq" [#if item.LEIX == 2]style="display:none;"[/#if]><th><label class="required">周期:</label></th>
|
<td><input class="general" type="text" name="zhouqi" id="zhouqi" [#if item.LEIX==1]value="${item.ZHOUQI}"[/#if]/> 天
|
<div id="zhouqiTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th><label class="required">联系人:</label></th>
|
<td><input class="general" type="text" name="contactsName" id="contactsName" value="${item.CONTACTS_NAME}" />
|
<div id="contactsNameTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th><label class="required">联系方式:</label></th>
|
<td><input class="general" type="text" name="contactsTel" id="contactsTel" value="${item.CONTACTS_TEL}" />
|
<div id="contactsTelTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
</table>
|
</form>
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function() {
|
if ($("#leix").val() == 1){
|
$("#zq,#kszx").show();
|
}else {
|
$("#zq,#kszx").hide();
|
}
|
});
|
|
$("#leix").change(function() {
|
var value = $(this).val();
|
if(value==1) {
|
$("#zq,#kszx").show();
|
$("#zhouqi,#beginExecDate").attr("disabled",false).unFormValidator(false);//恢复校验
|
} else {
|
$("#zq,#kszx").hide();
|
$("#zhouqi,#beginExecDate").attr("disabled",true).unFormValidator(true); //解除校验
|
}
|
});
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
var checkDate = $("#check").val();
|
if(checkDate == 1){
|
popupTips("开始执行时间必须小于服务结束时间");
|
return;
|
}
|
$("#myform").submit();
|
}
|
}
|
</script>
|
|
</body>
|
</html>
|