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
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
<script type="text/javascript">
/*查询-右侧弹出*/
$(function(){
    
    $(".taskoption").click(function(){ 
        var i=$(".taskoption").index(this);
        var taskcon = $(".tasksearchdate"); 
        taskcon.eq(i).animate({width: 'toggle'}); 
        $(".tasksearchdate h2").delay(300).fadeIn(); 
        $(".tasksearchcon").delay(300).fadeIn(); 
        taskcon.eq(i).next(".el_popmask").fadeIn();
    });
    
    $(".taskclose").click(function(){
        var taskcon = $(this).parents("div.tasksearchdate");
        taskcon.animate({width: 'toggle'});  
        $(".tasksearchdate h2").fadeOut(); 
        $(".tasksearchcon").fadeOut(); 
        taskcon.next(".el_popmask").fadeOut();
    });
    
    $(".el_popmask").click(function(){
        var taskcon = $(this).prev("div"); 
        taskcon.animate({width: 'toggle'});  
        $(".tasksearchdate h2").fadeOut(); 
        $(".tasksearchcon").fadeOut();
        $(this).fadeOut();
    
    });
    
    
    //一级分类下拉框点击
    $('#yjcate p').click(function(){
        $('#yjcate p.active').not($(this)).removeClass('active');
        $(this).toggleClass('active');
    });
    
    //选择一级分类
    $('#lv1_btn').click(function(){
        var $pro = $('#yjcate p.active');
        var cateId = '';
        var cateName = '全部';
        if($pro.length>0){
            cateId = $pro.attr('val');
            cateName = $pro.text();
        }
        $('#lv1Name').text(cateName);
        $('#lv1Id').val(cateId);
        $('#yj_close_btn').click();
        changeLv1(cateId);
        
    });
    
    //选择二级分类
    $('#lv2_btn').click(function(){
        var $pro = $('#ejcate p.active');
        var cateId = '';
        var cateName = '全部';
        if($pro.length>0){
            cateId = $pro.attr('val');
            cateName = $pro.text();
        }
        $('#lv2Name').text(cateName);
        $('#lv2Id').val(cateId);
        $('#ej_close_btn').click();
    });
    
    //类型下拉框点击
    $('#type p').click(function(){
        $('#type p.active').not($(this)).removeClass('active');
        $(this).toggleClass('active');
    });
    
    //选择类型
    $('#type_btn').click(function(){
        var $pro = $('#type p.active');
        var cateId = '';
        var cateName = '全部';
        if($pro.length>0){
            cateId = $pro.attr('val');
            cateName = $pro.text();
        }
        $('#queryTypeName').text(cateName);
        $('#queryType').val(cateId);
        $('#type_close_btn').click();
    });
    
    $('.ok').click(function(){
        var statsType = '${RequestParameters.statsType}';
        var lv1Id = $('#lv1Id').val();
        var lv2Id = $('#lv2Id').val();
        var queryType = $('#queryType').val();
           window.location.href = '${base}/uwyw/stats/uConfigStats/configStatsJump.html?statsType='+statsType
                + '&lv1Id=' + lv1Id + '&lv2Id=' + lv2Id + '&queryType=' + queryType;
        
    });
    
    
})
function changeLv1(lv1Id) {
    $.post("${base}/uwyw/stats/uConfigStats/getCategotyList.html",{"lv1Id":lv1Id},function(data,textStatus) {
        var optionHtml = "";
        $.each(data,function(i,item) {
            optionHtml += "<section class='kltype tasksearchlist2'><div class='projectname'><a><p val='"+item.id+"' > <em></em>"+item.name+"</p></a>";
        })
        $('#ejcate').html(optionHtml);
        $('#ejcate p').click(function(){
            $('#ejcate p.active').not($(this)).removeClass('active');
            $(this).toggleClass('active');
        });
    },"json")
}
 
function selectLv2(index){
 
  $('.kltype.tasksearchlist2 p.active').removeClass('active');
  $(".sel"+index).addClass('active');
}
</script>
</head>
 
<body>
<input type="hidden" name="lv1Id" id="lv1Id"/>
<input type="hidden" name="lv2Id" id="lv2Id"/>
<input type="hidden" name="queryType" id="queryType"/>
 
<header class="kltit"><a href="#"><label class="ok">确定</label></a><a href="javascript:history.go(-1);" ><span></span></a>查询条件</header>
<section class="kltype">
    [#if RequestParameters.statsType == 'type'||RequestParameters.statsType == 'flreport']
    <a href="#"><p><em></em><label id="lv1Name" class="taskoption">全部</label>一级分类</p></a>
    <a href="#"><p><em></em><label id="lv2Name" class="taskoption">全部</label>二级分类</p></a>
    [/#if]
    [#if RequestParameters.statsType == 'csreport']
    <a href="#"><p><em></em><label id="queryTypeName" class="taskoption">全部</label>类型</p></a>
    [/#if]
</section>
 
[#if RequestParameters.statsType == 'type'||RequestParameters.statsType == 'flreport']
<div>  
    <div class="tasksearchdate">
        <h2><a id="yj_close_btn" class="taskclose">关闭</a>一级分类</h2>
        <div class="tasksearchcon" id="yjcate">
            [#if lv1List??&&lv1List?size>0]
            [#list lv1List as lv1]
            <section class="kltype tasksearchlist2">
                <div class="projectname">
                        <a><p val="${lv1.id}">
                        <em></em>${lv1.name}
                        </p></a>
                </div>
            </section>
            [/#list]
            [/#if]
        </div>
        <button id="lv1_btn" type="button" class="tasksearchbtn">确定</button>         
    </div>
    <div class="el_popmask"></div> 
</div> 
<div>  
    <div class="tasksearchdate">
        <h2><a id="ej_close_btn" class="taskclose">关闭</a>二级分类</h2>
        <div class="tasksearchcon" id="ejcate">
        </div>
        <button id="lv2_btn" type="button" class="tasksearchbtn">确定</button>         
    </div>
    <div class="el_popmask"></div> 
</div> 
[/#if]
[#if RequestParameters.statsType == 'csreport']
<div>  
    <div class="tasksearchdate">
        <h2><a id="type_close_btn" class="taskclose">关闭</a>类型</h2>
        <div class="tasksearchcon" id="type">
            <section class="kltype tasksearchlist2">
                <div class="projectname">
                        <a><p val="1">
                        <em></em>厂商
                        </p></a>
                </div>
            </section>
            <section class="kltype tasksearchlist2">
                <div class="projectname">
                        <a><p val="2">
                        <em></em>集成商
                        </p></a>
                </div>
            </section>
        </div>
        <button id="type_btn" type="button" class="tasksearchbtn">确定</button>         
    </div>
    <div class="el_popmask"></div> 
</div>
[/#if]    
</body>
</html>