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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>报告列表</title>
</head>
 
<body class="fullscreen">
[#include "/business/pages/include/static.html" /]
[#include "/uc/include/header.html" /]
[#include "/uc/workReport/selReportHeader.html" /]
<div class="fs_navpath">
    <h3>当前位置</h3>
    <span></span>
    <a>工作报告</a>
    <span></span>
    <em></em>
</div>
<div class="fs_main clearfix">
    <div class="check_date">
        <div class="year_month">
            <div class="icon_select">
            [#if years??&&years?size>0]
            [#list years as item]
                [#if item_index==0]
                    <a class="mainbtn">
                        <span><em>${year}年</em></span>
                    </a>
                    <div class="ins_con">
                [/#if]
                
                <a href="javascript:changeYear();">${item}年</a>
                [#if item_index==years?size-1]    
                </div>
                   [/#if]
                
            [/#list]
            [/#if]
            </div>
            <div class="ym_month">
                [#list 1..12 as m]
                     <a [#if month?number == m]class="focus"[/#if]>[#if m?number<10]0[/#if]${m}月</a>
                [/#list]
            </div>
        </div>
    </div>
    <div class="joininglist">
        <h2><span>周报信息</span></h2>
        <table>
          <tr id="weekDiv">
          </tr>
        </table>
    </div>
    <div class="joininglist">
        <h2><span>月报信息</span></h2>
        <table id="monthDiv">
        </table>
    </div>
    <div class="joininglist">
        <h2><span>季报信息</span></h2>
        <table id="quarterDiv">
        </table>
    </div>
    <div class="joininglist">
        <h2><span>年报信息</span></h2>
        <table>
        [#if years??&&years?size>0]
        [#list years as item]
            [#if item_index==0||item_index%6==0]
              <tr>
              [/#if]
                <td width="16.66%"><a class="joininglista year" val="${item}"><em [#if y_str?index_of(item)==-1]class="color5"[#else]class="color3"[/#if]>年</em><span class="singer">${item}年年报</span></a></td>
                  [#if item_index==years?size-1||(item_index+1)%6!=0]
                  <td colspan="(years?size+1)%6">&nbsp;&nbsp;</td>
                  [/#if]
              [#if (item_index+1)%6==0||item_index==years?size-1]
              </tr>
              [/#if]
        [/#list]
        [/#if]
        </table>
    </div>
</div>
 
<script type="text/javascript">
$(function(){
    var cusId = '${cusId}';
    getYear();
    changeMonth();
    $(".ym_month a").click(function(){
        $(".ym_month a.focus").removeClass("focus");
        $(this).addClass("focus");
        changeMonth();
    });
    
    $(".month").live("click",function(){
        var selDate = $(this).attr("val");
        window.location.href = "${base}/uc/workReport/monthReportIndex.html?selDate="+selDate+"&cusId="+cusId;
    });
    $(".quarter").live("click",function(){
        var selDate = $(this).attr("val");
        window.location.href = "${base}/uc/workReport/quarterReportIndex.html?selDate="+selDate+"&cusId="+cusId;
    });
    $(".week").live("click",function(){
        var selDate = $(this).attr("val");
        window.location.href = "${base}/uc/workReport/weekReportIndex.html?selDate="+selDate+"&cusId="+cusId;
    });
    $(".year").live("click",function(){
        var selDate = $(this).attr("val");
        window.location.href = "${base}/uc/workReport/yearReportIndex.html?selDate="+selDate+"&cusId="+cusId;
    });
})
 
 
function changeMonth(){
    var year = $(".mainbtn em").text().substring(0,4);
    var month = $(".ym_month a.focus").text().substring(0,2);
    var date = year+month;
    var param = {"month":date,"year":year,"type":"week","cusId":"${cusId}"};
    $.post("${base}/uc/workReport/getWeekByMonth.html",param,function(arr){
        $.post("${base}/uc/workReport/getNRecord.html",param,function(str){
            str = ',' + str + ',';
            var htmlStr = '';
            $.each(arr,function(n,val){
                var color = 'color1';
                if(str.indexOf(','+val.val.substring(4)+',')==-1){
                    color = 'color5';
                }
                htmlStr = htmlStr +'<td width="16.66%"><a class="joininglista week" val="'+val.val+'"><em class="'+color+'">周</em><span>'+val.name+'<i>'+val.beginDay+'-'+val.endDay+'</i></span></a></td>';
            });
            if(arr.length<6){
                var col = 6-arr.length;
                htmlStr = htmlStr + '<td colspan="'+col+'">&nbsp;&nbsp;</td>';
            }
            $('#weekDiv').html(htmlStr);
        })
    },'json');
}
 
function getYear(){
    var year = $(".mainbtn em").text().substring(0,4);
    showMonth(year);
    changeMonth();
    showQuarter(year);
}
 
function changeYear(){
    var year = $(".mainbtn em").text().substring(0,4);
    $(".ym_month a.focus").removeClass("focus");
    $(".ym_month a:first").addClass("focus");
    showMonth(year);
    changeMonth();
    showQuarter(year);
}
 
function showMonth(year){
    var param = {"year":year,"type":"month","cusId":"${cusId}"};
    $.post("${base}/uc/workReport/getMonthByYear.html",param,function(arr){
        $.post("${base}/uc/workReport/getNRecord.html",param,function(str){
            var htmlStr = '';
            $.each(arr,function(n,val){
                var color = 'color2'; 
                if(str.indexOf(val.val)==-1){
                    color = 'color5';
                }
                if(n==0||n==6){
                    htmlStr = htmlStr + '<tr>';
                }
                htmlStr = htmlStr + '<td width="16.66%"><a val="'+val.val+'" class="joininglista month"><em class="'+color+'">月</em><span class="singer">'+val.name+'</span></a></td>';
                if(n==5||n==arr.length-1){
                    htmlStr = htmlStr + '</tr>';
                }
            });
            $('#monthDiv').html(htmlStr);
        })
    },'json');
}
 
 
function showQuarter(year){
    var htmlStr = '';
    var year = $(".mainbtn em").text().substring(0,4);
    var param = {"year":year,"type":"quarter","cusId":"${cusId}"};
    $.post("${base}/uc/workReport/getNRecord.html",param,function(str){
        htmlStr = htmlStr + '<tr>';
        for(var i=1;i<=4;i++){
            var color = 'color4'; 
            if(str.indexOf(i)==-1){
                color = 'color5';
            }
            var val = year + i;
            var name = year +"年"+ i + "季度";
            htmlStr = htmlStr + '<td width="16.66%"><a val="'+val+'" class="joininglista quarter"><em class="'+color+'">季</em><span class="singer">'+name+'</span></a></td>';
        }
        htmlStr = htmlStr + '<td colspan="2">&nbsp;&nbsp;</td>';
        $('#quarterDiv').html(htmlStr);
    })
}
</script>
 
[#include "/business/pages/include/footer.html" /]
</body>
</html>