From 5bd11ed20c2e283cb3c0ce82c0f90a9ce3425417 Mon Sep 17 00:00:00 2001
From: gdg <764716047@qq.com>
Date: 星期四, 07 一月 2021 10:50:45 +0800
Subject: [PATCH] 领用优化

---
 src/main/webapp/warehouse_stock_mng.xhtml |   84 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 76 insertions(+), 8 deletions(-)

diff --git a/src/main/webapp/warehouse_stock_mng.xhtml b/src/main/webapp/warehouse_stock_mng.xhtml
index 8b869c9..d13c3f1 100644
--- a/src/main/webapp/warehouse_stock_mng.xhtml
+++ b/src/main/webapp/warehouse_stock_mng.xhtml
@@ -14,18 +14,18 @@
 			<div id ="showTab" style="display: none">
 			<h:form id="tmp">
 				<p:panel styleClass="center-body">
-				<p:panelGrid columns="3" styleClass="btn" rendered="#{warehouseStockMngController.editFlag==1}">
+				<p:panelGrid columns="3" styleClass="btn">
 					<p:commandButton value="删除" styleClass="del-btn" process="@form"
 									 actionListener="#{warehouseStockMngController.cancel}"
-									 disabled="#{warehouseStockMngController.editFlag==0}" update=":centerRootPanel"/>
+									 update="@(.tempTable)"/>
 					<p:commandButton value="清空" styleClass="del-btn" process="@form"
 									 actionListener="#{warehouseStockMngController.clear}"
-									 disabled="#{warehouseStockMngController.editFlag==0}" update=":centerRootPanel"/>
+									 update="@(.tempTable)"/>
 					<p:commandButton value="提交" styleClass="edit-btn" process="@form"
 									 actionListener="#{warehouseStockMngController.onUseBtnClick}"
-									 disabled="#{warehouseStockMngController.editFlag==0}" update=":centerRootPanel"/>
+									 update=":centerRootPanel"/>
 				</p:panelGrid>
-					<p:dataTable id="tempTable" styleClass="data-table"
+					<p:dataTable id="tempTable" styleClass="tempTable data-table"
 								 paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
 								 lazy="true" value="#{warehouseStockMngController.selectedTmpList}" var="row"
 								 selection="#{warehouseStockMngController.trulySelectedList}"
@@ -95,7 +95,7 @@
 							actionListener="#{warehouseStockMngController.add}"
 										 disabled="#{warehouseStockMngController.editFlag==0}"
 							oncomplete="$('#showTab').css('display','block');"
-							update=":centerRootPanel"></p:commandButton>
+							update="@(.tempTable)"></p:commandButton>
 						<p:commandButton value="入库" styleClass="ruku-btn"
                                  process="@form"
 										 disabled="#{warehouseStockMngController.editFlag==0}"
@@ -335,6 +335,70 @@
 		-->
 
 		<p:tab title="订单领取">
+				<div id ="showTabOrder" style="display: none">
+					<h:form id="tmpOrder" styleClass="tmpOrder">
+						<p:panel styleClass="center-body">
+					<p:panelGrid columns="3" styleClass="btn">
+						<p:commandButton value="删除" styleClass="del-btn" process="@form"
+										 actionListener="#{warehouseStockMngController.cancelOrderTmp}"
+										  update="@(.tmpOrder)"
+										 />
+						<p:commandButton value="清空" styleClass="del-btn" process="@form"
+										 actionListener="#{warehouseStockMngController.clearOrderTmp}"
+										 update="@(.tmpOrder)"
+										/>
+						<p:commandButton value="提交" styleClass="edit-btn" process="@form"
+										 actionListener="#{warehouseStockMngController.onUseBtnClickOrderTmp}"
+										 update=":centerRootPanel"/>
+					</p:panelGrid>
+					<p:dataTable id="tempOrderTable" styleClass="data-table"
+								 paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
+								 lazy="true" value="#{warehouseStockMngController.selectedTmpOrderList}" var="row"
+								 selection="#{warehouseStockMngController.trulySelectedOrderList}"
+								 rowKey="#{row.id}"
+								 emptyMessage="无数据" rows="20" pageLinks="5">
+						<p:column selectionMode="multiple" style="width: 30px;text-align: center;" />
+						<p:column headerText="试剂名称">
+							<h:outputText value="#{row.reagent.name}"/>
+						</p:column>
+
+						<p:column headerText="产品编号">
+							<h:outputText value="#{row.reagent.productSn}"/>
+						</p:column>
+
+						<p:column headerText="CAS">
+							<h:outputText value="#{row.reagent.cas}"/>
+						</p:column>
+
+						<p:column headerText="规格">
+							<h:outputText value="#{row.reagent.reagentFormat}"/>
+						</p:column>
+
+						<p:column headerText="危险性质">
+							<h:outputText value="#{row.reagent.reagentCharacter}"/>
+						</p:column>
+						<p:column headerText="价格">
+							<h:outputText value="#{row.reagent.price}"/>
+						</p:column>
+
+						<p:column headerText="厂商">
+							<h:outputText
+									value="#{row.reagent.productHome}"/>
+						</p:column>
+
+						<p:column headerText="包装">
+							<h:outputText
+									value="#{''.concat(row.reagent.mainMetering).concat(baseMetaService.getBaseMetaValue(row.reagent.reagentUnit))}"/>
+						</p:column>
+
+						<p:column headerText="批号">
+							<h:outputText value="#{row.articleNumber}"/>
+						</p:column>
+
+					</p:dataTable>
+				</p:panel>
+					</h:form>
+				</div>
 			<h:form id="warehouseStockMngFormForPerson">
 				<p:panel styleClass="center-header" style="border-bottom:none;">
 					<p:panelGrid styleClass="filter" columns="5">
@@ -351,9 +415,13 @@
 				<p:panel styleClass="center-body">
 
 					<p:panelGrid columns="2" styleClass="btn" rendered="#{warehouseStockMngController.editFlag==1}">
+
 						<p:commandButton value="领用" styleClass="edit-btn" process="@form"
-							actionListener="#{warehouseStockMngController.onUseBtnClickForPerson}"
-							update=":centerRootPanel"></p:commandButton>
+										 actionListener="#{warehouseStockMngController.addOrder}"
+										 disabled="#{warehouseStockMngController.editFlag==0}"
+										 oncomplete="$('#showTabOrder').css('display','block');"
+										 update="@(.tmpOrder)"
+										 	></p:commandButton>
 					</p:panelGrid>
 
 					<p:dataTable id="warehouseStockMngDataTableForPerson" styleClass="data-table"

--
Gitblit v1.9.2