Newer
Older
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<%--
since: 2019/7/15 13:15
author: shen.shaohua
description: 文电管理-发文
url: ${ctx}/wdgl/toQuery/fw
--%>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="cui" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ page import="com.cesgroup.bdc.wdgl.vo.ConditionVo" %>
<%
pageContext.setAttribute("idSuffix", String.valueOf(System.currentTimeMillis()).substring(6));
ConditionVo conditionVo = (ConditionVo)request.getAttribute("conditionVo");
pageContext.setAttribute("conditionVo", conditionVo);
pageContext.setAttribute("cv", conditionVo.toString());
%>
<style type="text/css">
.statistics {
height: 85px;
float: left;
width: auto;
margin-left: 13px;
margin-top: 5px;
}
.statistics table {
border: none;
border-collapse: collapse;
}
.statistics table tr td {
height: 28px;
vertical-align: middle;
text-align: center;
border: 1px solid black;
}
.statistics table tr.dalei {
background-color: #1fb5ad;
font-weight: bold;
}
.statistics table tr.xiaolei td {
/*background-color: #1fb5ad;*/
/*font-weight: bold;*/
padding: 0px 5px;
min-width: 55px;
}
</style>
<div style="height: 100%;">
<div class="nav2"><img src="${ctx}/static/cm/image/wdgl-nav.png"/>文电管理</div>
<c:if test="${not empty conditionVo.statistics}">
<div style="height: 90px;" id="statistics${idSuffix}">
<c:if test="${fn:contains(conditionVo.statistics, '0')}">
<div class="statistics">
<table>
<tr class="dalei">
<td colspan="5">类型</td>
</tr>
<tr class="xiaolei">
<td>文件</td>
<td>简报</td>
<td>会议通知</td>
<td>一般通知</td>
<td>信息</td>
</tr>
<tr class="shuliang">
<td id="mailType-wj${idSuffix}"></td>
<td id="mailType-jb${idSuffix}"></td>
<td id="mailType-hy${idSuffix}"></td>
<td id="mailType-tz${idSuffix}"></td>
<td id="mailType-xx${idSuffix}"></td>
</tr>
</table>
</div>
</c:if>
<c:if test="${fn:contains(conditionVo.statistics, '1')}">
<div class="statistics">
<table>
<tr class="dalei">
<td colspan="5">密级</td>
</tr>
<tr class="xiaolei">
<td>无</td>
<td>秘密</td>
<td>机密</td>
</tr>
<tr class="shuliang">
<td id="safeLevel-wu${idSuffix}"></td>
<td id="safeLevel-mm${idSuffix}"></td>
<td id="safeLevel-jm${idSuffix}"></td>
</tr>
</table>
</div>
</c:if>
<c:if test="${fn:contains(conditionVo.statistics, '2')}">
<div class="statistics">
<table>
<tr class="dalei">
<td colspan="5">紧急度</td>
</tr>
<tr class="xiaolei">
<td>无</td>
<td>平急</td>
<td>加急</td>
<td>特急</td>
<td>特提</td>
</tr>
<tr class="shuliang">
<td id="emergency-wu${idSuffix}"></td>
<td id="emergency-pj${idSuffix}"></td>
<td id="emergency-jj${idSuffix}"></td>
<td id="emergency-tj${idSuffix}"></td>
<td id="emergency-tt${idSuffix}"></td>
</tr>
</table>
</div>
</c:if>
</div>
</c:if>
<div class="table-head">
<div class="table-title">发文列表</div>
<div class="table-head-right">
<a onclick="mailSend_toQuery_sample.exp()">导出报表</a>
<a onclick="mailSend_toQuery_sample.goBack()">返回</a>
</div>
</div>
<cui:grid id="grid${idSuffix}" url="${ctx}/mail-send/toQuery" asyncType="get" postData="mailSend_toQuery_sample.postData"
sortorder="desc" loadonce="false" rownumbers="true" fitStyle="fill" multiselect="true"
style="margin-left: 5px;margin-right: 5px;">
<cui:gridCols>
<cui:gridCol name="id" hidden="true">id</cui:gridCol>
<cui:gridCol name="mailNo" width="30">发文号</cui:gridCol>
<c:if test="${conditionVo.flag eq 'all'}"></c:if>
<cui:gridCol name="deptName" width="20">发送单位</cui:gridCol>
<cui:gridCol name="mailTitle" formatter="mailSend_toQuery_sample.titleFmt" width="80">文电标题</cui:gridCol>
<cui:gridCol name="mailType" width="20">类型</cui:gridCol>
<cui:gridCol name="emergency" width="20">紧急度</cui:gridCol>
<cui:gridCol name="safeLevel" width="20">密级</cui:gridCol>
<cui:gridCol name="mailPage" width="20">页数</cui:gridCol>
<cui:gridCol name="sendTime" width="30">发送时间</cui:gridCol>
<cui:gridCol name="status" formatter="mailSend_toQuery_sample.statusFmt" width="20">状态</cui:gridCol>
</cui:gridCols>
<cui:gridPager gridId="grid${idSuffix}"/>
</cui:grid>
</div>
<cui:form id="expForm${idSuffix}" action="${ctx}/mail-send/toQuery/exp"
target="_blank" style="display: none;">
<input type="hidden" name="mailType"/>
<input type="hidden" name="safeLevel"/>
<input type="hidden" name="emergency"/>
<input type="hidden" name="effDateBegin"/>
<input type="hidden" name="effDateEnd"/>
<input type="hidden" name="sendTimeBegin"/>
<input type="hidden" name="sendTimeEnd"/>
<input type="hidden" name="mailStatus"/>
<input type="hidden" name="sendDept"/>
<input type="hidden" name="autoDownload"/>
<input type="hidden" name="mailNo"/>
<input type="hidden" name="mailTitle"/>
<input type="hidden" name="receiveDateBegin"/>
<input type="hidden" name="receiveDateEnd"/>
<input type="hidden" name="receiveDept"/>
<input type="hidden" name="statistics"/>
<input type="hidden" name="flag"/>
<input type="hidden" name="receiveDeptId"/>
<input type="hidden" name="sendUserId"/>
<input type="hidden" name="descs"/>
<input type="hidden" name="ascs"/>
</cui:form>
<cui:dialog id="dialogC${idSuffix}" modal="true" autoOpen="false" reLoadOnOpen="true"
focusInput="false" resizable="true" autoDestroy="true" maximized="false"></cui:dialog>
<script type="text/javascript">
var mailSend_toQuery_fun = (function (win, $) {
var postData = ${cv};
postData.descs = 'SEND_TIME';
function sample() {
this.postData = postData;
}
var statistics = '${conditionVo.statistics}';//归类统计
var $expForm = $('#expForm${idSuffix}');
var $grid = $('#grid${idSuffix}');
$.parseDone(function () {
$expForm.form('load', postData);
if (statistics) {
loadStatistics();
}
});
//归类统计
function loadStatistics() {
$.ajax({
type: 'POST',
url: '${ctx}/mail-send/statistics',
data: postData,
dataType: 'json',
success: function (data) {
//console.log('归类统计', data);
$('#statistics${idSuffix} .shuliang td').html('0');
$.each(data, function (i, item) {
var id = '';
if (item.MAIL_TYPE == '文件') {
id = 'mailType-wj${idSuffix}';
} else if (item.MAIL_TYPE == '简报') {
id = 'mailType-jb${idSuffix}';
} else if (item.MAIL_TYPE == '会议通知') {
id = 'mailType-hy${idSuffix}';
} else if (item.MAIL_TYPE == '一般通知') {
id = 'mailType-tz${idSuffix}';
} else if (item.MAIL_TYPE == '信息') {
id = 'mailType-xx${idSuffix}';
} else if (item.SAFE_LEVEL == '无') {
id = 'safeLevel-wu${idSuffix}';
} else if (item.SAFE_LEVEL == '秘密') {
id = 'safeLevel-mm${idSuffix}';
} else if (item.SAFE_LEVEL == '机密') {
id = 'safeLevel-jm${idSuffix}';
} else if (item.EMERGENCY == '无') {
id = 'emergency-wu${idSuffix}';
} else if (item.EMERGENCY == '平急') {
id = 'emergency-pj${idSuffix}';
} else if (item.EMERGENCY == '加急') {
id = 'emergency-jj${idSuffix}';
} else if (item.EMERGENCY == '特急') {
id = 'emergency-tj${idSuffix}';
} else if (item.EMERGENCY == '特提') {
id = 'emergency-tt${idSuffix}';
}
$('#' + id).html(item.CC);
});
},
error: function (e) {
error(e);
}
});
}
//导出报表
sample.prototype.exp = function () {
$expForm.submit();
}
//返回
sample.prototype.goBack = function () {
index_sample.refreshTheMainPanel('${ctx}/wdgl/index')
}
//刷新列表
sample.prototype.reloadGrid = function () {
$grid.grid('reload');
}
sample.prototype.titleFmt = function (cellValue, options, rowObject) {
var result = '<a onclick="mailSend_toQuery_sample.view(\'' + rowObject.id + '\')">' + cellValue + '</a>';
return result;
}
sample.prototype.statusFmt = function (cellValue, options, rowObject) {
var result = '';
var status = rowObject.status;
if (status == '0') {
result = '未完成';
} else if (status == '1') {
result = '完成';
} else if (status == '-1') {
result = '未发送';
}else {
result = status;
}
return result;
}
//查看
sample.prototype.view = function (id) {
var url = '${ctx}/mail-send/view/' + id;
$('#dialogC${idSuffix}').dialog('option', {
url: url,
title: '发文',
asyncType: 'get',
width: 1000,
height: 550,
buttons: null
}).dialog('open');
}
return sample;
})(window, $);
var mailSend_toQuery_sample = new mailSend_toQuery_fun();
window['mailSend_toQuery_fun'] = null;
delete window['mailSend_toQuery_fun'];
</script>