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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!doctype html>
<html>
<head>
<meta charset="utf-8">
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
[#include "/business/wechat/include/mobiscroll.html" /]
</head>
 
<body>
<header class="kltit">
    [#if  baseMsg.WFSTATE == Constants.WORKFLOW_BASE_WFSTATE_DOING || baseMsg.WFSTATE == Constants.WORKFLOW_BASE_WFSTATE_FINISH || baseMsg.WFSTATE == Constants.WORKFLOW_BASE_WFSTATE_EVALUATE || baseMsg.WFSTATE == Constants.WORKFLOW_BASE_WFSTATE_CLOSE]
    <label class="dropmenu"></label>
    [/#if]
    <a href="${base}/ewyw/ewHealth/ewMyHealth.html"><span></span></a>工单处理
    [#if baseMsg.WFSTATE == Constants.WORKFLOW_BASE_WFSTATE_FINISH || baseMsg.WFSTATE == Constants.WORKFLOW_BASE_WFSTATE_EVALUATE]
        <div class="wlsdrop2"><a href="${base}/ewyw/ewHealth/ewHealthReport.html?orderId=${orderId}&flowId=${baseMsg.FLOW_ID}" ><p class="baogao">健康检查报告</p></a>
    [#elseif baseMsg.WFSTATE == Constants.WORKFLOW_BASE_WFSTATE_DOING]
        <!-- 人员指派 -->
        [#if nodeTemplateId == Constants.HEALTH_DISPATCH]
            <div class="wlsdrop2">
                <a href="javascript:fpTask();"><p class="renwu">分派任务</p></a>
                <a href="${base}/ewyw/ewHealth/ewCloseWorkFlow.html?orderId=${orderId}&nodeId=${nodeId}&flowId=${baseMsg.FLOW_ID}"><p class="guanbi">关闭工单</p></a>
            </div>
        <!-- 工程师执行 -->
        [#elseif nodeTemplateId == Constants.HEALTH_PATROL]
            <div class="wlsdrop2">
                <a href="javascript:engineerCommit();"><p class="tijiao">提交</p></a>
            </div>
        <!-- 项目经理审核 -->
        [#elseif nodeTemplateId == Constants.HEALTH_APPROVE]
            <div class="wlsdrop2">
                <a href="${base}/ewyw/ewHealth/ewApproveCommit.html?orderId=${orderId}&nodeId=${nodeId}&flowId=${baseMsg.FLOW_ID}"><p class="tijiao">提交</p></a>
                <a href="${base}/ewyw/ewHealth/ewHealthSendback.html?orderId=${orderId}&nodeId=${nodeId}&flowId=${baseMsg.FLOW_ID}"><p class="huitui">回退</p></a>
            </div>
        [/#if]
    [/#if]
</header>
<nav class="kltwo clearfix">
    <div class="kltwowrap">
        <a href="#" hidefocus="true" class="active" v="0">基本信息</a>
        <a href="#" hidefocus="true" v="1">巡检配置</a>
        <a href="#" hidefocus="true" v="2">处理记录</a>
        <a href="#" hidefocus="true" v="3">关联工单</a>
        <a href="#" hidefocus="true" v="4">文档附件</a>
        <a href="#" hidefocus="true" v="5">流转记录</a>         
    </div>
</nav>
<div class="swiper-container" id="swiper-pages">
    <div class="swiper-wrapper">
        <div class="swiper-slide">
            <div id="main0"></div>
        </div>
        <div class="swiper-slide">
            <div id="main1"></div>
        </div>
        <div class="swiper-slide">
            <div id="main2"></div>
        </div>
        <div class="swiper-slide">
            <div id="main3"></div>
        </div>
        <div class="swiper-slide">
            <div id="main4"></div>
        </div>        
        <div class="swiper-slide">
            <div id="main5"></div>
        </div>
    </div>
</div>
<script type="text/javascript">
var flowId = '${baseMsg.FLOW_ID}';
var orderId = '${orderId}';
var nodeId = '${nodeId}';
var nodeTemplateId = '${nodeTemplateId}';//当前节点
var showType = '${Constants.WECHAT_DETAIL_DEAL_SCORE_JKJC}';//健康检查界面
 
function query(index) {
    var $main = $("#main"+index);
    var html = $.trim($main.html());
    if($.util.isEmpty(html)) {
        var param = {"flowId":flowId,"orderId":orderId,"nodeId":nodeId,"nodeTemplateId":nodeTemplateId,"showType":showType};
        loading($main);
        if(index==0){
            if(nodeTemplateId == '${Constants.HEALTH_DISPATCH}'){
                $.get("${base}/ewyw/ewHealth/ewDispatchHealthInfo.html",param,function(data,textStatus) {
                    $main.html(data);
                })
            }else if(nodeTemplateId == '${Constants.HEALTH_PATROL}' || nodeTemplateId == '${Constants.HEALTH_APPROVE}'){
                $.get("${base}/ewyw/ewHealth/ewHealthDealInfo.html",param,function(data,textStatus) {
                    $main.html(data);
                })
            }
        } else if(index==1) {
            //巡检配置
            $.post("${base}/ewyw/ewHealth/ewHealthCiListCl.html",param,function(data,textStatus) {
                $main.html(data);
            })
        } else if(index==2) {
            $.post("${base}/ewyw/ewIncident/ewClRecordCl.html",param,function(data,textStatus) {
                $main.html(data);
            })
        } else if(index==3) {
            $.post("${base}/ewyw/ewIncident/ewLinkOrderCl.html",param,function(data,textStatus) {
                $main.html(data);
            })
        } else if(index==4) {
            $.post("${base}/ewyw/ewIncident/ewFileCl.html",param,function(data,textStatus) {
                $main.html(data);
            })
        } else if(index==5) {
            $.post("${base}/ewyw/ewIncident/ewLzRecord.html",param,function(data,textStatus) {
                $main.html(data);
            })
        }
    }
}
 
/*工单详情下拉*/
$(function(){
    var searchBtn = $('.kltit label'),
        searchCon = $('div.wlsdrop2');
    searchBtn.click(function(){
        searchCon.animate({height:'toggle'});
        $(this).children('em').toggleClass("open");
    });
    searchCon.children('a').click(function(){
        searchCon.slideUp();
    });
    $("div").click(function(){
        searchCon.slideUp();
    });
    $("section").click(function(){
        searchCon.slideUp();
    });
    
    query(0);
})
 
 
function fpTask(){
    myform1Submit();
}
 
function engineerCommit(){
    if('${isCanFinish}'=='true'){
          window.location.href = "${base}/ewyw/ewHealth/ewEngineerCommit.html?isAdmin=${isAdmin}&orderId="+orderId+"&nodeId="+nodeId+"&flowId="+flowId;
        }else{
            var users = '';
            $.post("${base}/ewyw/ewHealth/ewGetNotDealList.html",{"flowId":flowId},function(data){
                $.each(data,function(i,item){
                    if(users!=''){
                        users = users + ',' +item.name;
                    }else{
                        users = users +item.name;
                    }
                }); 
                popupTips('执行人:' + users + '未处理,暂不可提交');
            },'json');
            
        }
}
 
$(function() {
    var initIndex = 0;
 
    if(!(typeof(selectIndex) == "undefined")) {
        initIndex = selectIndex;
    } 
    n=$('.kltwowrap a').size();                
    var wh=100*n+"%";
    $('.kltwowrap').width(wh);
    var lt=(100/n/4);
    var lt_li=lt+"%";
    $('.kltwowrap a').width(lt_li);            
    $(".kltwowrap a").on('touchstart mousedown',function(e){
        e.preventDefault()
        $(".kltwowrap .active").removeClass('active');
        $(this).addClass('active');
        tabsSwiper.slideTo($(this).index());
    });
    
    $(".kltwowrap a").click(function(e){
        e.preventDefault();
    });
    
    window.onload=function(){  
        var pages = document.getElementById("swiper-pages");  
        var scale = window.screen.height / window.screen.width;  
        pages.style.height = document.body.clientWidth * scale -$('.kltit').height()-$('.kltwo').height() - 20 + "px";  
    } 
    
    var tabsSwiper = new Swiper(".swiper-container",{
        initialSlide : initIndex,
        setWrapperSize :true,
        onSlideChangeStart: function(tabsSwiper){
            $(".kltwowrap .active").removeClass('active');
            var panelIndex = tabsSwiper.activeIndex;
            var $kltwowrapA = $(".kltwowrap a").eq(panelIndex);
            $kltwowrapA.addClass('active');
            $kltwowrapA.parent().css("left",-parseInt(tabsSwiper.activeIndex/4)*tabsSwiper.width);
            query(panelIndex);
            //离开页面保存表单数据
            $.post("${base}/ewyw/ewHealth/saveTempData.html",$("#myform1").serialize(),function(data,textStatus) {
                if(data == '1') {} 
            });
        }
    });
})
</script>     
</body>
</html>