From 47a751cb301d05276ae5d75145d57b2d090fe4e1 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: Mon, 01 Jul 2024 10:58:35 +0800
Subject: [PATCH] change
---
src/main/webapp/sys_hazardous_waste.xhtml | 322 +++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 239 insertions(+), 83 deletions(-)
diff --git a/src/main/webapp/sys_hazardous_waste.xhtml b/src/main/webapp/sys_hazardous_waste.xhtml
index 4767b72..ae003c3 100644
--- a/src/main/webapp/sys_hazardous_waste.xhtml
+++ b/src/main/webapp/sys_hazardous_waste.xhtml
@@ -15,9 +15,137 @@
<p:tab title="危废处理信息">
<h:form id="hazardousWasteForm">
<p:panel styleClass="center-header">
- <p:outputLabel styleClass="title" value="危废处理信息"/>
+ <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:panelGrid styleClass="filter" columns="9">
+ <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"
@@ -28,46 +156,75 @@
converter="timestampConvert"
pattern="yyyy-MM-dd" locale="zh_CN"/>
- <p:commandLink styleClass="search" process="@form" update="@form" actionListener="#{hazardousWasteController.modelChange}"/>
+ <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="#{dangerousEncodeController.export2Excel}" />
+ <p:commandButton value="导出" styleClass="new-btn" ajax="false" actionListener="#{hazardousWasteController.exportStatistics2Excel}" />
</p:panelGrid>
- <p:dataTable id="hazardousWasteInfoMngDataTable"
+ <p:dataTable id="hazardousWasteInfoAnalysisDataTable"
styleClass="data-table"
paginator="true"
paginatorAlwaysVisible="false"
paginatorPosition="bottom"
- lazy="true" value="#{hazardousWasteController.dataModel}"
+ lazy="true" value="#{hazardousWasteController.analysisDataModel}"
var="row"
rowKey="#{row.id}"
emptyMessage="无数据"
rows="20"
selectionMode="single"
pageLinks="5">
- <p:column headerText="酸">
+
+ <p:column headerText="状态">
+ <h:outputText value="#{row.status}"/>
+ </p:column>
+ <p:column headerText="酸性废液">
<h:outputText value="#{row.acid}"/>
</p:column>
- <p:column headerText="碱">
+ <p:column headerText="碱性废液">
<h:outputText value="#{row.alkali}"/>
</p:column>
- <p:column headerText="有机">
+ <p:column headerText="有机废液">
<h:outputText value="#{row.organic}"/>
</p:column>
- <p:column headerText="固废">
+ <p:column headerText="固体废弃物">
<h:outputText value="#{row.solid}"/>
</p:column>
- <p:column headerText="医疗">
+ <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>
@@ -84,77 +241,76 @@
</p:panel>
</h:form>
</p:tab>
- <p:tab title="统计分析">
- <h:form id="hazardousWasteAnalysisForm">
- <p:panel styleClass="center-header">
- <p:outputLabel styleClass="title" value="危废处理信息"/>
-
- <p:panelGrid styleClass="filter" columns="9">
- <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:commandLink styleClass="search" process="@form" update="@form" actionListener="#{hazardousWasteController.modelChange}"/>
-
- </p:panelGrid>
- </p:panel>
- <p:panel styleClass="center-body">
- </p:panel>
- </h:form>
-
- <p:dataTable id="hazardousWasteInfoAnalysisDataTable"
- styleClass="data-table"
- paginator="true"
- paginatorAlwaysVisible="false"
- paginatorPosition="bottom"
- lazy="true" value="#{hazardousWasteController.dataModel}"
- var="row"
- rowKey="#{row.id}"
- emptyMessage="无数据"
- rows="20"
- selectionMode="single"
- pageLinks="5">
- <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.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: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>
--
Gitblit v1.9.2