cy
2022-06-22 6e06bba1c89f8077e29d0fbf0ce12f89f027d8d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!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]/>&nbsp;天
                    <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>