From 798aa9213a565c6c5ffb411e3cef40a10f99e9d1 Mon Sep 17 00:00:00 2001
From: lyfO_o <764716047@qq.com>
Date: 星期五, 31 三月 2023 09:16:53 +0800
Subject: [PATCH] 新疆绿色智能综合研究所补充

---
 src/main/webapp/warehouse_stock_mng.xhtml |   38 +++++++++++++++++++++++++++++++++-----
 1 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/src/main/webapp/warehouse_stock_mng.xhtml b/src/main/webapp/warehouse_stock_mng.xhtml
index de017d9..1be7e1a 100644
--- a/src/main/webapp/warehouse_stock_mng.xhtml
+++ b/src/main/webapp/warehouse_stock_mng.xhtml
@@ -100,7 +100,7 @@
 						<p:outputLabel value="产品编号:"></p:outputLabel>
 						<p:inputText value="#{warehouseStockMngController.productSn}"></p:inputText>
 
-						<p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
+						<p:commandLink styleClass="search" process="@form" update="@form" id="first-search" ></p:commandLink>
 					</p:panelGrid>
 				</p:panel>
 				<p:panel styleClass="center-body">
@@ -120,7 +120,7 @@
 						<!--<p:commandButton value="导入" styleClass="import-btn" onclick="importStock()"
 						></p:commandButton>-->
 
-						<script>
+						<script type="text/javascript">
 							function importStock(){
 								$("#warehouseStockMngForm\\:importStockBtn_input").click();
 							}
@@ -133,6 +133,20 @@
 									}
 								}
 							}
+
+							document.onkeydown = function (event) {
+								console.log("按键了")
+								if (event.keyCode === 13) {
+									var $tabView = $("#tabView\\:firstTab");
+									if ($tabView.css("display") !== "none") {
+										PrimeFaces.ab({s:"tabView:warehouseStockMngForm:first-search",p:"tabView:warehouseStockMngForm",u:"tabView:warehouseStockMngForm"});return false;
+									}else{
+										PrimeFaces.ab({s:"tabView:warehouseStockMngFormForPerson:second-search",p:"tabView:warehouseStockMngFormForPerson",u:"tabView:warehouseStockMngFormForPerson"});return false;
+									}
+								}
+							}
+
+
 						</script>
 					</p:panelGrid>
 
@@ -360,7 +374,7 @@
 			<br/>
 			<h:form id="warehouseStockMngFormForPerson">
 				<p:panel styleClass="center-header" style="border-bottom:none;">
-					<p:panelGrid styleClass="filter" columns="14">
+					<p:panelGrid styleClass="filter" columns="16">
 						<style type="text/css">
 							.ui-selectonemenu.ui-widget.ui-state-default.ui-corner-all{
 								min-width: 60px !important;
@@ -384,6 +398,9 @@
 							<f:selectItems value="#{warehouseStockMngController.statusSelectList}" var="item"
 										   itemLabel="#{item.text}" itemValue="#{item.key}"></f:selectItems>
 						</p:selectOneMenu>
+						<p:outputLabel value="过期:"></p:outputLabel>
+						<p:selectBooleanCheckbox value="#{warehouseStockMngController.isExpired}"
+												 itemLabel=""/>
 
 						<p:outputLabel value="已领用:"></p:outputLabel>
 						<p:selectOneMenu value="#{warehouseStockMngController.isAllApply}" style="width: 60px;">
@@ -392,13 +409,13 @@
 							<f:selectItem itemLabel="全部" noSelectionOption="true"/>
 						</p:selectOneMenu>
 
-						<p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
+						<p:commandLink styleClass="search" process="@form" update="@form" id="second-search"></p:commandLink>
 					</p:panelGrid>
 				</p:panel>
 
 				<p:panel styleClass="center-body">
 
-					<p:panelGrid columns="3" styleClass="btn" rendered="#{warehouseStockMngController.editFlag==1}">
+					<p:panelGrid columns="7" styleClass="btn" rendered="#{warehouseStockMngController.editFlag==1}">
 						<p:commandButton value="入库" styleClass="edit-btn" process="@form"
 										 actionListener="#{warehouseStockMngController.addInputStorageOrder}"
 										 disabled="#{warehouseStockMngController.editFlag==0}"
@@ -411,6 +428,17 @@
 										 oncomplete="$('#showTabOrder').css('display','block');$('#putInStorage').css('display','none');"
 										 update="@(.tmpOrder)"
 						></p:commandButton>
+
+						<p:commandButton value="过期处理" styleClass="edit-btn" process="@form"
+										 actionListener="#{warehouseStockMngController.expireOrder}"
+										 disabled="#{warehouseStockMngController.editFlag==0}"
+										 update=":centerRootPanel"
+						></p:commandButton>
+						<p:commandButton value="恢复处理" styleClass="edit-btn" process="@form"
+										 actionListener="#{warehouseStockMngController.recoverOrder}"
+										 disabled="#{warehouseStockMngController.editFlag==0}"
+										 update=":centerRootPanel"
+						></p:commandButton>
 						<p:commandButton update=":centerRootPanel" actionListener="#{warehouseStockMngController.onExportFileBtnClickOrder}"
 										 ajax="false" value="导出" styleClass="new-btn" />
 					</p:panelGrid>

--
Gitblit v1.9.2