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
213
214
215
216
217
218
219
220
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
<script type="text/javascript">
/*作业计划-查询-右侧弹出*/
$(function(){
    //初始化查询时间
    fastSearch();
    
    $(".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();
    
    });
    
    $(".scroller").mobiscroll().date();
    var currYear = (new Date()).getFullYear()-3; 
    //初始化日期控件
    var opt = {
        preset: 'date', //日期,可选:date\datetime\time\tree_list\image_text\select
        theme: 'default', //皮肤样式,可选:default\android\android-ics light\android-ics\ios\jqm\sense-ui\wp light\wp
        display: 'inline', //显示方式 ,可选:modal\inline\bubble\top\bottom
        mode: 'scroller', //日期选择模式,可选:scroller\clickpick\mixed
        lang:'zh',
        dateFormat: 'yyyy-mm-dd', // 日期格式
        setText: '确定', //确认按钮名称
        cancelText: '取消',//取消按钮名籍我
        dateOrder: 'yyyymmdd', //面板中日期排列格式
        dayText: '日', monthText: '月', yearText: '年', //面板中年月日文字
        showNow: false,  
        nowText: "今",  
        startYear: currYear,//开始年份  
        endYear:currYear + 100 //结束年份  
        //endYear:2099 //结束年份
    };
    $(".scroller").mobiscroll(opt);
    
    //日期快速选择
    $('#fast_sel_btn').click(function(){
        var frequency = $('.kltype.tasksearchlist').find('.active').text();
        $('#frequency').text(frequency);        
        fastSearch();
        //关闭弹出层
        $('#close_btn_fast').click();
    });
    
    $('.kltype.tasksearchlist p').click(function(){
        $('.kltype.tasksearchlist p.active').removeClass('active');
        $(this).addClass('active');
    });
    
    function fastSearch(){
        var searchType = $('.kltype.tasksearchlist').find('.active').attr('id');
        $.post('${base}/ewyw/stats/ewQuestionStats/getFastSearchDate.html',{'searchType':searchType},function(date){
            $('#startDate').text(date.startDate);
            $('#endDate').text(date.endDate);
        },'json');
    }    
    
    //${Constants.CUSTOMER_CONSTANTS}下拉框点击
    $('.kltype.tasksearchlist2 p').click(function(){
        $('.kltype.tasksearchlist2 p.active').not($(this)).removeClass('active');
        $(this).toggleClass('active');
    });
    
    //选择${Constants.CUSTOMER_CONSTANTS}
    $('#pro_btn').click(function(){
        var $pro = $('.kltype.tasksearchlist2 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();
    });
    
    $('.ok').click(function(){
        var statsType = '${RequestParameters.statsType}';
        var cusId = $('#cusId').val();
        var startDate = $('#startDate').text().replace(/\-/g,'');
        var endDate = $('#endDate').text().replace(/\-/g,'');
        window.location.href = '${base}/ewyw/stats/ewQuestionStats/questionStatsJump.html?statsType='+statsType
                + '&cusId=' + cusId + '&startDate=' + startDate + '&endDate=' + endDate +'&search=1';
    });
    
    $('#start_btn').click(function(){
        var selDate = '';
        $('#start_div').find('div[aria-selected=true]').each(function(){
            if(selDate==''){
                selDate = selDate + $(this).text();
            }else{
                selDate = selDate + '-' + $(this).text();
            }
        });
        $('#startDate').text(selDate);
        $('#start_close_btn').click();
    });
    
    $('#end_btn').click(function(){
        var selDate = '';
        $('#end_div').find('div[aria-selected=true]').each(function(){
            if(selDate==''){
                selDate = selDate + $(this).text();
            }else{
                selDate = selDate + '-' + $(this).text();
            }
        });
        $('#endDate').text(selDate);
        $('#end_close_btn').click();
    });
})
 
</script>
</head>
 
<body>
<input type="hidden" name="cusId" id="cusId"/>
 
<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="frequency" class="taskoption">最近一周</label>时间范围</p></a>
    <a href="#"><p><em></em><label id="startDate" class="taskoption"></label>开始时间</p></a>
    <a href="#"><p><em></em><label id="endDate" class="taskoption"></label>结束时间</p></a>
    <a href="#"><p><em></em><label id="cusName" class="taskoption">全部</label>${Constants.CUSTOMER_CONSTANTS}名称</p></a>
</section>
<div>
    <div class="tasksearchdate">
        <div>
            <h2><a id="close_btn_fast" class="taskclose">关闭</a>时间范围</h2>
            <div class="tasksearchcon">
                <section class="kltype tasksearchlist">
                    <a><p id="one_week" class="active">
                        <em></em>最近一周
                    </p></a>
                    <a><p id="one_month">
                        <em></em>最近一个月
                    </p></a>
                    <a><p id="three_month">
                        <em></em>最近三个月
                    </p></a>
                    <a><p id="six_month">
                        <em></em>最近六个月
                    </p></a>
                    <a><p id="one_year">
                        <em></em>最近一年
                    </p></a>    
                </section> 
            </div>
            <button id="fast_sel_btn" type="button" class="tasksearchbtn">确定</button>  
        </div>   
    </div>
    <div class="el_popmask"></div>
</div>  
<div>  
    <div class="tasksearchdate">
        <h2><a href="#" id="start_close_btn" class="taskclose">关闭</a>开始时间</h2>
        <div id="start_div" class="tasksearchcon">
            <input name="scroller" class="scroller"/>
        </div>
        <button id="start_btn" type="button" class="tasksearchbtn">确定</button>         
    </div>
    <div class="el_popmask"></div>
</div>  
<div>   
    <div class="tasksearchdate">
        <h2><a href="#" id="end_close_btn" class="taskclose">关闭</a>结束时间 </h2>
        <div id="end_div" class="tasksearchcon">
            <input name="scroller" class="scroller"/>
        </div>
        <button id="end_btn" type="button" class="tasksearchbtn">确定</button>          
    </div>
    <div class="el_popmask"></div> 
</div> 
<div>  
    <div class="tasksearchdate">
        <h2><a id="pro_close_btn" class="taskclose">关闭</a>${Constants.CUSTOMER_CONSTANTS}列表</h2>
        <div class="tasksearchcon">
            [#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>    
</body>
</html>