cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
[#include "/business/wechat/include/mobiscroll.html" /]
</head>
 
<body>
<header class="kltit">
    <a href="javascript:history.go(-1);"><span></span></a>配置巡检
 
</header>
        <section class="wlresponse">
              <p>
                   <span>处理状态</span>
                <label><select  class="select" id="deal_state" name="deal_state">
                    <option value="1" [#if info.deal_state == 1 || info.deal_state == 3 ]selected="selected"[/#if]>已完成</option>
                    <option value="2" [#if info.deal_state == 2 ]selected="selected"[/#if]>进行中</option>
                </select></label>
              </p>
              <p>
                   <span>配置状态</span>
                <label><select  class="select" id="ci_state" name="ci_state">
                    <option value="1" [#if info.ci_state == 1] selected="selected"[/#if]>正常</option>
                    <option value="2" [#if info.ci_state == 2] selected="selected"[/#if]>告警</option>
                    <option value="3" [#if info.ci_state == 3] selected="selected"[/#if]>异常</option>
                </select></label>
              </p>
              <p class="next2">
                   <span>开始时间</span>
                   <label><input class="enter" type="text" name="start_time" id="start_time" /></label>
              </p>
              <p class="next2">
                   <span>结束时间</span>
                   <label><input class="enter" type="text" name="finish_time" id="finish_time" /></label>
              </p>
              <p>
                 <span>备注</span>
                  <i><textarea name="order_note" id="order_note" cols="" rows="3" class="event-text" >${info.order_note}</textarea></i>
             </p>
            <button class="bluebtn bluebtnsmal2" onclick="checkSubmit();">确定</button>
        </section>
</body>
<script type="text/javascript">
var hxStart = "${DateUtil.format('yyyy-MM-dd HH:mm:ss',info.start_time)}";
var hxEnd = "${DateUtil.format('yyyy-MM-dd HH:mm:ss',info.finish_time)}"
$(function() {
 
    var currYear = (new Date()).getFullYear();    
    var opt={};
    opt.date = {preset : 'date'};
    opt.datetime = {preset : 'datetime'};
    opt.time = {preset : 'time'};
    opt.default = {
        theme: 'android-ics light', //皮肤样式
        display: 'modal', //显示方式 
        mode: 'scroller', //日期选择模式
        dateFormat: 'yyyy-mm-dd',
        lang: 'zh',
        showNow: true,
        nowText: "今天",
        startYear: currYear - 50, //开始年份
        endYear: currYear + 50//结束年份
    };
 
    $("#start_time").scroller($.extend(opt['datetime'], opt['default']));
    $("#finish_time").scroller($.extend(opt['datetime'], opt['default']));
    if(!$.util.isEmpty(hxStart)){
        hxStart = hxStart.substring(0,16);
       $("#start_time").scroller('setDate', new Date(hxStart), true);
    
    }
    if(!$.util.isEmpty(hxEnd)){
        hxEnd = hxEnd.substring(0,16);
       $("#finish_time").scroller('setDate', new Date(hxEnd), true);
    
    }
    
})
 
function checkSubmit(){
    var deal_state = $("#deal_state").val();
    var ci_state = $("#ci_state").val();
    var start_time = $("#start_time").val();
    var finish_time = $.trim($("#finish_time").val());
    var order_note = $.trim($("#order_note").val());
    if(start_time == ""){
        popupTips('请选择开始时间!');
        return;
    }
    if(finish_time == ""){
        popupTips('请选择结束时间!');
        return;
    }
    var start = parseInt(start_time.replace(/-/g, "").replace(/ /g, "").replace(/:/g,""));
    var end = parseInt(finish_time.replace(/-/g, "").replace(/ /g, "").replace(/:/g,""));
    if(end < start){
        popupTips('结束时间不能小于开始时间!');
        return;
    }
    start_time = start + "00";
    finish_time = end + "00";
    $.post("${base}/ewyw/ewHealth/ewHealthCiPatrol.html",{'patrolCiId':'${patrolCiId}','deal_state':deal_state,'ci_state':ci_state,'start_time':start_time,'finish_time':finish_time,'order_note':order_note},function(data,textStatus) {
        if(data == '1') {
            popupTips("操作成功", 2000);
            window.location.href = "${base}/ewyw/ewHealth/ewHealthInfoCl.html?orderId=${orderId}";
        } else {
            popupTips("操作失败", 2000);
        }
    });
}
</script>
</html>