cy
2022-06-28 2ba5c891b24d4d0cd6ce7ef833592e4f576ee5e8
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<!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();
    
    });
    
    
    //${Constants.CUSTOMER_CONSTANTS}下拉框点击
    $('#cus p').click(function(){
        $('#cus p.active').not($(this)).removeClass('active');
        $(this).toggleClass('active');
    });
    
    //选择${Constants.CUSTOMER_CONSTANTS}
    $('#pro_btn').click(function(){
        var $pro = $('#cus p.active');
        var cusId = '';
        var cusName = '全部';
        if($pro.length>0){
            cusId = $pro.attr('val');
            cusName = $pro.text();
        }
        $('#cusName').text(cusName);
        $('#cusId').val(cusId);
        $('#pro_close_btn').click();
    });
    
    //一级分类下拉框点击
    $('#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 cusId = $('#cusId').val();
        var lv1Id = $('#lv1Id').val();
        var lv2Id = $('#lv2Id').val();
        var queryType = $('#queryType').val();
           window.location.href = '${base}/ewyw/stats/ewConfigStats/configStatsJump.html?statsType='+statsType
                + '&cusId=' + cusId + '&lv1Id=' + lv1Id + '&lv2Id=' + lv2Id + '&queryType=' + queryType;
        
    });
    
    
})
function changeLv1(lv1Id) {
    $.post("${base}/ewyw/stats/ewConfigStats/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="cusId" id="cusId"/>
<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">
    <a href="#"><p><em></em><label id="cusName" class="taskoption">全部</label>${Constants.CUSTOMER_CONSTANTS}名称</p></a>
    [#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>
 
<div>  
    <div class="tasksearchdate">
        <h2><a id="pro_close_btn" class="taskclose">关闭</a>${Constants.CUSTOMER_CONSTANTS}列表</h2>
        <div class="tasksearchcon" id="cus">
            [#if customers??&&customers?size>0]
            [#list customers as customer]
            <section class="kltype tasksearchlist2">
                <div class="projectname">
                        <a><p val="${customer.id}">
                        <em></em>${customer.name}
                        </p></a>
                </div>
            </section>
            [/#list]
            [/#if]
        </div>
        <button id="pro_btn" type="button" class="tasksearchbtn">确定</button>         
    </div>
    <div class="el_popmask"></div> 
</div> 
[#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>