kongzy
2024-07-01 47a751cb301d05276ae5d75145d57b2d090fe4e1
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
304
305
306
307
308
309
310
311
312
313
314
315
316
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:composition>
 
    <p:tabView dynamic="true">
        <p:tab title="危废处理信息">
            <h:form id="hazardousWasteForm">
                <p:panel styleClass="center-header">
                    <p:panelGrid styleClass="filter" columns="20" style="white-space: nowrap">
                        <p:outputLabel value="开始时间:"/>
                        <p:calendar value="#{hazardousWasteController.startTime}"
                                    converter="timestampConvert"
                                    pattern="yyyy-MM-dd" locale="zh_CN" />
 
                        <p:outputLabel value="结束时间:"/>
                        <p:calendar value="#{hazardousWasteController.endTime}"
                                    converter="timestampConvert"
                                    pattern="yyyy-MM-dd" locale="zh_CN"/>
 
                        <p:outputLabel value="状态:"/>
                        <p:selectOneMenu value="#{hazardousWasteController.status}">
                            <f:selectItems value="#{hazardousWasteController.statusList}" var="item"
                                           itemLabel="#{item}" itemValue="#{item}" />
                        </p:selectOneMenu>
 
                        <p:outputLabel value="确认者:"/>
                        <p:inputText value="#{hazardousWasteController.applyPerson}"/>
 
                        <p:outputLabel value="单号:"/>
                        <p:inputText value="#{hazardousWasteController.tid}" style="width: 120px"/>
<!--                        <p:outputLabel value="课题组"></p:outputLabel>-->
<!--                        <p:selectOneMenu value="#{hazardousWasteController.projectId}" filter="true" filterMatchMode="startsWith">-->
<!--                            <f:selectItem itemLabel="不选择课题组" />-->
<!--                            <f:selectItems value="#{sysProjectServiceImpl.getAll()}"-->
<!--                                           var="item" itemLabel="#{item.projectName}"  itemValue="#{item.id}"/>-->
<!--                        </p:selectOneMenu>-->
 
                        <p:outputLabel value="部门"></p:outputLabel>
                        <p:selectOneMenu value="#{hazardousWasteController.department}" requiredMessage="请选择部门">
                            <f:selectItem itemLabel="不选择部门"/>
                            <f:selectItems value="#{baseMetaService.getBaseMetaList(constants.BASE_META_GROUP_USER_DEPARTMENT)}"
                                           var="item" itemLabel="#{item.metaValue}" itemValue="#{item.metaValue}"/>
                        </p:selectOneMenu>
 
                        <p:commandLink styleClass="search" process="@form" update="@form" actionListener="#{hazardousWasteController.modelChange}"/>
                    </p:panelGrid>
 
                </p:panel>
                <p:panel styleClass="center-body">
                    <p:panelGrid columns="5" styleClass="btn">
                        <p:commandButton value="新增" styleClass="new-btn"
                                         process="@form"
                                         actionListener="#{hazardousWasteController.addHazardousWaste}"
                                         oncomplete="PF('wastedialog').show();"
                                         update=":wastedialog,:dialogForm"></p:commandButton>
                        <p:commandButton value="编辑" styleClass="edit-btn"
                                         process="@form"
                                         actionListener="#{hazardousWasteController.editHazardousWaste}"
                                         update=":wastedialog,:dialogForm"></p:commandButton>
                        <p:commandButton value="导出" styleClass="new-btn"   ajax="false" actionListener="#{hazardousWasteController.export2Excel}" />
                        <p:commandButton value="取消" styleClass="del-btn"   ajax="false" actionListener="#{hazardousWasteController.cancelOne}" />
                        <p:commandButton value="恢复" styleClass="edit-btn"   ajax="false" actionListener="#{hazardousWasteController.recoverOne}" />
                    </p:panelGrid>
                    <p:dataTable id="hazardousWasteInfoMngDataTable"
                                 styleClass="data-table"
                                 paginator="true"
                                 paginatorAlwaysVisible="false"
                                 paginatorPosition="bottom"
                                 lazy="true" value="#{hazardousWasteController.dataModel}"
                                 selection="#{hazardousWasteController.selectedList}"
                                 var="row"
                                 rowKey="#{row.id}"
                                 emptyMessage="无数据"
                                 rows="20"
                                 pageLinks="5"
                                 resizableColumns="true">
                        <p:column selectionMode="multiple" style="width: 30px;text-align: center;"/>
                        <p:column headerText="单号" width="150">
                            <h:outputText value="#{row.tid}"/>
                        </p:column>
                        <p:column headerText="状态">
                            <h:outputText value="#{row.status}"/>
                        </p:column>
                        <p:column headerText="酸性废液">
                            <h:outputText value="#{row.acid}"/>
                        </p:column>
 
                        <p:column headerText="碱性废液">
                            <h:outputText value="#{row.alkali}"/>
                        </p:column>
 
                        <p:column headerText="有机废液">
                            <h:outputText value="#{row.organic}"/>
                        </p:column>
 
                        <p:column headerText="固体废弃物">
                            <h:outputText value="#{row.solid}"/>
                        </p:column>
 
                        <p:column headerText="医疗废弃物">
                            <h:outputText value="#{row.medical}"/>
                        </p:column>
                        <p:column headerText="确认者">
                            <h:outputText value="#{row.applyPersonName}"/>
                        </p:column>
                        <p:column headerText="确认时间">
                            <h:outputText value="#{row.updatetime}">
                                <f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" locale="zh_CN"></f:convertDateTime>
                            </h:outputText>
                        </p:column>
                        <p:column headerText="课题组">
                            <h:outputText value="#{row.projectName}"/>
                        </p:column>
                        <p:column headerText="部门">
                            <h:outputText value="#{row.department}"/>
                        </p:column>
 
                        <p:column headerText="单位">
                            <h:outputText value="#{row.unitName}"/>
                        </p:column>
 
                        <p:column headerText="创建者">
                            <h:outputText value="#{row.creator}"/>
                        </p:column>
 
                        <p:column headerText="创建时间">
                            <h:outputText value="#{row.createTime}">
                                <f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" locale="zh_CN"></f:convertDateTime>
                            </h:outputText>
                        </p:column>
                    </p:dataTable>
                </p:panel>
            </h:form>
 
        </p:tab>
        <p:tab title="统计分析">
            <h:form id="hazardousWasteAnalysisForm">
                <p:panel styleClass="center-header">
                    <p:panelGrid styleClass="filter" columns="15">
                        <p:outputLabel value="开始时间:"/>
                        <p:calendar value="#{hazardousWasteController.startTime}"
                                    converter="timestampConvert"
                                    pattern="yyyy-MM-dd" locale="zh_CN"/>
 
                        <p:outputLabel value="结束时间:"/>
                        <p:calendar value="#{hazardousWasteController.endTime}"
                                    converter="timestampConvert"
                                    pattern="yyyy-MM-dd" locale="zh_CN"/>
 
                        <p:outputLabel value="状态:"/>
                        <p:selectOneMenu value="#{hazardousWasteController.status}">
                            <f:selectItems value="#{hazardousWasteController.statusList}" var="item"
                                           itemLabel="#{item}" itemValue="#{item}"/>
                        </p:selectOneMenu>
 
                        <p:outputLabel value="确认者:"/>
                        <p:inputText value="#{hazardousWasteController.applyPerson}"/>
 
<!--                        <p:outputLabel value="课题组"></p:outputLabel>-->
<!--                        <p:selectOneMenu value="#{hazardousWasteController.projectId}" filter="true">-->
<!--                            <f:selectItem itemLabel="不选择课题组" />-->
<!--                            <f:selectItems value="#{sysProjectServiceImpl.getAll()}"-->
<!--                                           var="item" itemLabel="#{item.projectName}"  itemValue="#{item.id}"/>-->
<!--                        </p:selectOneMenu>-->
 
                        <p:outputLabel value="部门"></p:outputLabel>
                        <p:selectOneMenu value="#{hazardousWasteController.department}" requiredMessage="请选择部门">
                            <f:selectItem itemLabel="不选择部门"/>
                            <f:selectItems value="#{baseMetaService.getBaseMetaList(constants.BASE_META_GROUP_USER_DEPARTMENT)}"
                                           var="item" itemLabel="#{item.metaValue}" itemValue="#{item.metaValue}"/>
                        </p:selectOneMenu>
 
                        <p:commandLink styleClass="search" process="@form" update="@form" actionListener="#{hazardousWasteController.modelAnalysisChange}"/>
 
                    </p:panelGrid>
                </p:panel>
                <p:panel styleClass="center-body">
                    <p:panelGrid columns="5" styleClass="btn">
                        <p:commandButton value="导出" styleClass="new-btn"   ajax="false" actionListener="#{hazardousWasteController.exportStatistics2Excel}" />
                    </p:panelGrid>
                    <p:dataTable id="hazardousWasteInfoAnalysisDataTable"
                                 styleClass="data-table"
                                 paginator="true"
                                 paginatorAlwaysVisible="false"
                                 paginatorPosition="bottom"
                                 lazy="true" value="#{hazardousWasteController.analysisDataModel}"
                                 var="row"
                                 rowKey="#{row.id}"
                                 emptyMessage="无数据"
                                 rows="20"
                                 selectionMode="single"
                                 pageLinks="5">
 
                        <p:column headerText="状态">
                            <h:outputText value="#{row.status}"/>
                        </p:column>
                        <p:column headerText="酸性废液">
                            <h:outputText value="#{row.acid}"/>
                        </p:column>
 
                        <p:column headerText="碱性废液">
                            <h:outputText value="#{row.alkali}"/>
                        </p:column>
 
                        <p:column headerText="有机废液">
                            <h:outputText value="#{row.organic}"/>
                        </p:column>
 
                        <p:column headerText="固体废弃物">
                            <h:outputText value="#{row.solid}"/>
                        </p:column>
 
                        <p:column headerText="医疗废弃物">
                            <h:outputText value="#{row.medical}"/>
                        </p:column>
                        <p:column headerText="确认者">
                            <h:outputText value="#{row.applyPerson}"/>
                        </p:column>
                        <p:column headerText="课题组">
                            <h:outputText value="#{row.project}"/>
                        </p:column>
 
                        <p:column headerText="部门">
                            <h:outputText value="#{row.department}"/>
                        </p:column>
 
                        <p:column headerText="单位">
                            <h:outputText value="#{row.unit}"/>
                        </p:column>
 
                    </p:dataTable>
                </p:panel>
            </h:form>
        </p:tab>
    </p:tabView>
    <style type="text/css">
        .ui-selectonemenu.ui-widget.ui-state-default.ui-corner-all{
            min-width: 100px !important;
        }
    </style>
 
    <p:dialog modal="true"
              header="#{hazardousWasteController.action==constants.ACTION_ADD?'新建':'修改'}"
              appendTo="@(body)" id="wastedialog" widgetVar="wastedialog" resizable="false"
              width="800">
        <h:form id="dialogForm">
            <p:panelGrid columns="4" styleClass="content2 grid-padding-bottom2">
                <p:outputLabel value="确认者"></p:outputLabel>
                <p:autoComplete value="#{hazardousWasteController.hazardousWaste.applyPerson}" completeMethod="#{hazardousWasteController.getUserSelectList()}"
                                var="item"
                                dropdown="true"
                                styleClass="apply-user-autocomplete"
                                itemLabel="#{!empty hazardousWasteController.hazardousWaste and !empty hazardousWasteController.hazardousWaste.applyPerson ? hazardousWasteController.getSelectedUserById(hazardousWasteController.hazardousWaste.applyPerson).name: (!empty item?item.name:'')}"
                                itemValue="#{!empty item ? item.id:''}" forceSelection="true">
                    <p:ajax event="itemSelect" process="@this" update="@this" />
                    <p:column>
                        <h:outputText value="#{item.name}" required="true" requiredMessage="请填写确认者"/>
                    </p:column>
                </p:autoComplete>
 
 
                <p:outputLabel value="部门"></p:outputLabel>
                <p:selectOneMenu value="#{hazardousWasteController.hazardousWaste.department}"
                                 required="true" requiredMessage="请选择部门">
                    <f:selectItems value="#{baseMetaService.getBaseMetaList(constants.BASE_META_GROUP_USER_DEPARTMENT)}"
                                   var="item" itemLabel="#{item.metaValue}" itemValue="#{item.metaValue}"></f:selectItems>
                </p:selectOneMenu>
 
                <p:outputLabel value="课题组"></p:outputLabel>
                <p:selectOneMenu value="#{hazardousWasteController.hazardousWaste.projectId}" filter="true" filterMatchMode="startsWith" required="true" requiredMessage="请选择课题组">
                    <f:selectItem itemLabel="不选择课题组" />
                    <f:selectItems value="#{sysProjectServiceImpl.getAll()}"
                                   var="item" itemLabel="#{item.projectName}"  itemValue="#{item.id}"></f:selectItems>
                </p:selectOneMenu>
 
 
                <p:outputLabel value="酸性废液"></p:outputLabel>
                <p:inputText value="#{hazardousWasteController.hazardousWaste.acid}" maxlength="100"
                             required="true" requiredMessage="请输入酸性废液"></p:inputText>
 
                <p:outputLabel value="碱性废液"></p:outputLabel>
                <p:inputText value="#{hazardousWasteController.hazardousWaste.alkali}" maxlength="100"
                             required="true" requiredMessage="请输入碱性废液"></p:inputText>
 
                <p:outputLabel value="有机废液"></p:outputLabel>
                <p:inputText value="#{hazardousWasteController.hazardousWaste.organic}" maxlength="100"
                             required="true" requiredMessage="请输入有机废液"></p:inputText>
 
                <p:outputLabel value="固体废弃物"></p:outputLabel>
                <p:inputText value="#{hazardousWasteController.hazardousWaste.solid}" maxlength="100"
                             required="true" requiredMessage="请输入固体废弃物"></p:inputText>
 
                <p:outputLabel value="医疗废弃物"></p:outputLabel>
                <p:inputText value="#{hazardousWasteController.hazardousWaste.medical}" maxlength="100"
                             required="true" requiredMessage="请输入医疗废弃物"></p:inputText>
            </p:panelGrid>
            <p:panel styleClass="btn">
                <p:commandButton value="保存"
                                 actionListener="#{hazardousWasteController.onSaveBtnClick}" process="@form" >
                    <p:confirm header="确认" message="确认操作?"></p:confirm>
                </p:commandButton>
            </p:panel>
        </h:form>
    </p:dialog>
 
</ui:composition>
</html>