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 | 143 +++++++++++++++++++++++++++++++++++++----------
1 files changed, 112 insertions(+), 31 deletions(-)
diff --git a/src/main/webapp/sys_hazardous_waste.xhtml b/src/main/webapp/sys_hazardous_waste.xhtml
index c3ec6f4..ae003c3 100644
--- a/src/main/webapp/sys_hazardous_waste.xhtml
+++ b/src/main/webapp/sys_hazardous_waste.xhtml
@@ -15,13 +15,11 @@
<p:tab title="危废处理信息">
<h:form id="hazardousWasteForm">
<p:panel styleClass="center-header">
- <p:outputLabel styleClass="title" value="危废处理信息"/>
-
- <p:panelGrid styleClass="filter" columns="9">
+ <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"/>
+ pattern="yyyy-MM-dd" locale="zh_CN" />
<p:outputLabel value="结束时间:"/>
<p:calendar value="#{hazardousWasteController.endTime}"
@@ -31,22 +29,20 @@
<p:outputLabel value="状态:"/>
<p:selectOneMenu value="#{hazardousWasteController.status}">
<f:selectItems value="#{hazardousWasteController.statusList}" var="item"
- itemLabel="#{item}" itemValue="#{item}"/>
+ itemLabel="#{item}" itemValue="#{item}" />
</p:selectOneMenu>
<p:outputLabel value="确认者:"/>
<p:inputText value="#{hazardousWasteController.applyPerson}"/>
- </p:panelGrid>
- <p:panelGrid styleClass="filter" columns="8">
<p:outputLabel value="单号:"/>
- <p:inputText value="#{hazardousWasteController.tid}"/>
- <p:outputLabel value="课题组"></p:outputLabel>
- <p:selectOneMenu value="#{hazardousWasteController.project}" filter="true" filterMatchMode="startsWith">
- <f:selectItem itemLabel="不选择课题组" />
- <f:selectItems value="#{sysProjectServiceImpl.getAll()}"
- var="item" itemLabel="#{item.project}" itemValue="#{item.project}"/>
- </p:selectOneMenu>
+ <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="请选择部门">
@@ -57,10 +53,22 @@
<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"
@@ -68,12 +76,14 @@
paginatorAlwaysVisible="false"
paginatorPosition="bottom"
lazy="true" value="#{hazardousWasteController.dataModel}"
+ selection="#{hazardousWasteController.selectedList}"
var="row"
rowKey="#{row.id}"
emptyMessage="无数据"
rows="20"
- selectionMode="single"
- pageLinks="5">
+ 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>
@@ -100,18 +110,22 @@
<h:outputText value="#{row.medical}"/>
</p:column>
<p:column headerText="确认者">
- <h:outputText value="#{row.applyPerson}"/>
+ <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.project}"/>
+ <h:outputText value="#{row.projectName}"/>
</p:column>
-
<p:column headerText="部门">
<h:outputText value="#{row.department}"/>
</p:column>
<p:column headerText="单位">
- <h:outputText value="#{row.unit}"/>
+ <h:outputText value="#{row.unitName}"/>
</p:column>
<p:column headerText="创建者">
@@ -120,19 +134,17 @@
<p:column headerText="创建时间">
<h:outputText value="#{row.createTime}">
- <f:convertDateTime pattern="yyyy-MM-dd" locale="zh_CN"></f:convertDateTime>
+ <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:outputLabel styleClass="title" value="危废处理信息"/>
-
<p:panelGrid styleClass="filter" columns="15">
<p:outputLabel value="开始时间:"/>
<p:calendar value="#{hazardousWasteController.startTime}"
@@ -153,12 +165,12 @@
<p:outputLabel value="确认者:"/>
<p:inputText value="#{hazardousWasteController.applyPerson}"/>
- <p:outputLabel value="课题组"></p:outputLabel>
- <p:selectOneMenu value="#{hazardousWasteController.project}" filter="true" filterMatchMode="startsWith">
- <f:selectItem itemLabel="不选择课题组" />
- <f:selectItems value="#{sysProjectServiceImpl.getAll()}"
- var="item" itemLabel="#{item.project}" itemValue="#{item.project}"/>
- </p:selectOneMenu>
+<!-- <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="请选择部门">
@@ -229,7 +241,76 @@
</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>
--
Gitblit v1.9.2