From 47a751cb301d05276ae5d75145d57b2d090fe4e1 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: 星期一, 01 七月 2024 10:58:35 +0800
Subject: [PATCH] change

---
 src/main/webapp/apply_mng_new.xhtml |  128 +++++++++++++++++-------------------------
 1 files changed, 53 insertions(+), 75 deletions(-)

diff --git a/src/main/webapp/apply_mng_new.xhtml b/src/main/webapp/apply_mng_new.xhtml
index 3115715..92efbb4 100644
--- a/src/main/webapp/apply_mng_new.xhtml
+++ b/src/main/webapp/apply_mng_new.xhtml
@@ -47,24 +47,24 @@
 
                		<p:column selectionMode="multiple" style="width: 30px;text-align: center;"/>
 
-                    <p:column headerText="产品编号">
+                    <p:column headerText="产品编号" style="white-space:normal;">
                         <h:outputText value="#{row.reagent!=null?row.reagent.productSn:''}"></h:outputText>
                     </p:column>
 
-	                <p:column headerText="试剂名称">
-	                    <h:outputText value="#{row.reagent!=null?row.reagent.name:''}"></h:outputText>
+	                <p:column headerText="试剂名称" style="white-space:normal;">
+	                    <h:outputText value="#{row.reagent!=null?row.reagent.name:''}" ></h:outputText>
 	                </p:column>
 
                     <p:column headerText="管制品">
-                        <h:outputText value="#{row.reagent!=null?baseMetaService.getBaseMetaValue(row.reagent.controlProducts):''}"></h:outputText>
+                        <h:outputText value="#{row.reagent!=null?row.reagent.controlProducts:''}"></h:outputText>
                     </p:column>
 
                     <p:column headerText="规格型号">
-                        <h:outputText value="#{row.reagent!=null?baseMetaService.getBaseMetaValue(row.reagent.reagentFormat):''}"></h:outputText>
+                        <h:outputText value="#{row.reagent!=null?row.reagent.reagentFormat:''}"></h:outputText>
                     </p:column>
 
                     <p:column headerText="包装">
-                        <h:outputText value="#{row.reagent!=null?(''.concat(row.reagent.mainMetering).concat(baseMetaService.getBaseMetaValue(row.reagent.reagentUnit))):''}"></h:outputText>
+                        <h:outputText value="#{row.reagent!=null?(''.concat(row.reagent.mainMetering).concat(row.reagent.reagentUnit)):''}"></h:outputText>
                     </p:column>
 
                     <p:column headerText="含税售价">
@@ -76,15 +76,15 @@
                     </p:column>
 
                     <p:column headerText="危险性质">
-                        <h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagent.reagentCharacter)}"></h:outputText>
+                        <h:outputText value="#{row.reagent.reagentCharacter}"></h:outputText>
                     </p:column>
 
                     <p:column headerText="厂家">
-                        <h:outputText value="#{row.reagent!=null?row.reagent.productHomeName:''}"></h:outputText>
+                        <h:outputText value="#{row.reagent!=null?row.reagent.productHome:''}"></h:outputText>
                     </p:column>
 
                     <p:column headerText="试剂类型">
-                        <h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagent.reagentType)}"></h:outputText>
+                        <h:outputText value="#{row.reagent.reagentType}"></h:outputText>
                     </p:column>
 
 	            </p:dataTable>
@@ -107,7 +107,7 @@
                             <p:outputLabel value="厂商:"></p:outputLabel>
                         </p:column>
                         <p:column>
-                            <p:inputText value="#{applyMngController.opeApply.reagent.productHomeName}" disabled="true"></p:inputText>
+                            <p:inputText value="#{applyMngController.opeApply.reagent.productHome}" disabled="true"></p:inputText>
                         </p:column>
                     </p:row>
 
@@ -116,13 +116,13 @@
                             <p:outputLabel value="规格:"></p:outputLabel>
                         </p:column>
                         <p:column>
-                            <p:inputText value="#{baseMetaService.getBaseMetaValue(applyMngController.opeApply.reagent.reagentFormat)}" disabled="true"></p:inputText>
+                            <p:inputText value="#{applyMngController.opeApply.reagent.reagentFormat}" disabled="true"></p:inputText>
                         </p:column>
                         <p:column>
                             <p:outputLabel value="包装:"></p:outputLabel>
                         </p:column>
                         <p:column>
-                            <p:inputText value="#{''.concat(applyMngController.opeApply.reagent.mainMetering).concat(baseMetaService.getBaseMetaValue(applyMngController.opeApply.reagent.reagentUnit))}"
+                            <p:inputText value="#{''.concat(applyMngController.opeApply.reagent.mainMetering).concat(applyMngController.opeApply.reagent.reagentUnit)}"
                                          disabled="true"></p:inputText>
                         </p:column>
                     </p:row>
@@ -176,14 +176,14 @@
                         <p:row>
 
                             <p:column>
-                                <p:outputLabel value="课题名称:"></p:outputLabel>
+                                <p:outputLabel value="课题组:"></p:outputLabel>
 
                             </p:column>
                             <p:column>
-                                <p:selectOneMenu value="#{applyMngController.opeApply.objective}"
-                                                 required="true" requiredMessage="请选则课题名称" id="projectIdSel1">
+                                <p:selectOneMenu value="#{applyMngController.opeApply.projectId}"
+                                                 required="true" requiredMessage="请选则课题组" id="projectIdSel1">
                                     <f:selectItems value="#{applyMngController.sysProjectList}"
-                                                   var="item" itemLabel="#{item.projectName}" itemValue="#{item.projectId}"></f:selectItems>
+                                                   var="item" itemLabel="#{item.projectName}" itemValue="#{item.id}"></f:selectItems>
                                 </p:selectOneMenu>
                             </p:column>
                             <p:column>
@@ -223,13 +223,13 @@
                     <p:inputText value="#{applyMngController.opeApply.reagent.name}" disabled="true"></p:inputText>
 
                     <p:outputLabel value="厂商:"></p:outputLabel>
-                    <p:inputText value="#{applyMngController.opeApply.reagent.productHomeName}" disabled="true"></p:inputText>
+                    <p:inputText value="#{applyMngController.opeApply.reagent.productHome}" disabled="true"></p:inputText>
 
                     <p:outputLabel value="规格:"></p:outputLabel>
-                    <p:inputText value="#{baseMetaService.getBaseMetaValue(applyMngController.opeApply.reagent.reagentFormat)}" disabled="true"></p:inputText>
+                    <p:inputText value="#{applyMngController.opeApply.reagent.reagentFormat}" disabled="true"></p:inputText>
 
                     <p:outputLabel value="包装:"></p:outputLabel>
-                    <p:inputText value="#{''.concat(applyMngController.opeApply.reagent.mainMetering).concat(baseMetaService.getBaseMetaValue(applyMngController.opeApply.reagent.reagentUnit))}"
+                    <p:inputText value="#{''.concat(applyMngController.opeApply.reagent.mainMetering).concat(applyMngController.opeApply.reagent.reagentUnit)}"
                                  disabled="true"></p:inputText>
 
 
@@ -258,11 +258,11 @@
                         <f:ajax listener="#{applyMngController.changeCharge}" render="projectIdSel"/>
                     </p:selectOneMenu>
 
-                    <p:outputLabel value="课题名称:"></p:outputLabel>
+                    <p:outputLabel value="课题组:"></p:outputLabel>
                     <p:selectOneMenu value="#{applyMngController.opeApply.objective}"
-                                     required="true" requiredMessage="请选则课题名称" id="projectIdSel">
+                                     required="true" requiredMessage="请选择课题组" id="projectIdSel">
                         <f:selectItems value="#{applyMngController.sysProjectList}"
-                                       var="item" itemLabel="#{item.projectName}" itemValue="#{item.projectId}"></f:selectItems>
+                                       var="item" itemLabel="#{item.projectName}" itemValue="#{item.id}"></f:selectItems>
                     </p:selectOneMenu>
                 </p:panelGrid>
 
@@ -282,9 +282,9 @@
             </p:panel>
         </h:form>
 		<br/>
-        <p:tabView dynamic="true" style="margin-left: 26px">
-
-            <p:tab title="试剂库">
+        <p:tabView dynamic="true" style="margin-left: 26px" activeIndex="#{applyMngController.tabValue}">
+            <p:ajax event="tabChange" listener="#{applyMngController.onTabChange}"/>
+            <p:tab title="试剂库" id="reagent">
                 <h:form id="applyMngNewReagentForm">
                     <p:panelGrid styleClass="apply-mng-new-reagent-filter" columns="9" style="margin-left: -18px">
                         <p:outputLabel value="试剂名称:"></p:outputLabel>
@@ -294,14 +294,8 @@
                         <p:inputText value="#{applyMngController.applyNewCas}"></p:inputText>
                         <p:outputLabel value="产品编号:"></p:outputLabel>
                         <p:inputText value="#{applyMngController.applyNewSn}"></p:inputText>
-                        <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
+                        <p:commandLink styleClass="search reagentSearch" process="@form" update="@form"></p:commandLink>
                     </p:panelGrid>
-
-                    <p:commandButton value="新增试剂" process="@this"
-                                     actionListener="#{applyMngController.onReagentNewBtnClick}"
-                                     oncomplete="PF('dialog').show();"
-                                     update="@parent:@parent:@parent:dialog"
-                                     styleClass="new-btn" style="position: absolute;display: none;right: 42px;top:62px"></p:commandButton>
 
                     <p:dataTable id="applyMngNewReagentDataTable" styleClass="data-table" style="margin-left: 2px"
                                  resizableColumns="true" paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
@@ -313,27 +307,18 @@
                         <p:column headerText="产品编号">
                             <h:outputText value="#{row.productSn}"></h:outputText>
                         </p:column>
-                        <p:column headerText="试剂名称">
+                        <p:column headerText="试剂名称"  style="white-space:normal;">
                             <h:outputText value="#{row.name}"></h:outputText>
                             <h:outputText value="收藏" readonly="true" rendered="#{row.favor!=null}" styleClass="favor"></h:outputText>
                         </p:column>
                         <p:column headerText="管制品">
-                            <h:outputText value="#{baseMetaService.getBaseMetaValue(row.controlProducts)}"></h:outputText>
+                            <h:outputText value="#{row.controlProducts}"></h:outputText>
                         </p:column>
-                        <!--<p:column headerText="试剂类型">-->
-                            <!--<h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentType)}"></h:outputText>-->
-                        <!--</p:column>-->
-                        <!--<p:column headerText="危险性质">-->
-                            <!--<h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentCharacter)}"></h:outputText>-->
-                        <!--</p:column>-->
-                        <!--  <p:column headerText="供应商">
-                            <h:outputText value="#{row.supplierName}"></h:outputText>
-                        </p:column>-->
                         <p:column headerText="规格型号">
-                            <h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentFormat)}"></h:outputText>
+                            <h:outputText value="#{row.reagentFormat}"></h:outputText>
                         </p:column>
                         <p:column headerText="包装">
-                            <h:outputText value="#{''.concat(row.mainMetering).concat(baseMetaService.getBaseMetaValue(row.reagentUnit))}"></h:outputText>
+                            <h:outputText value="#{''.concat(row.mainMetering).concat(row.reagentUnit)}"></h:outputText>
                         </p:column>
                         <p:column headerText="含税售价">
                             <h:outputText value="#{row.price}"></h:outputText>
@@ -342,13 +327,13 @@
                             <h:outputText value="#{row.cas}"></h:outputText>
                         </p:column>
                         <p:column headerText="危险性质">
-                            <h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentCharacter)}"></h:outputText>
+                            <h:outputText value="#{row.reagentCharacter}"></h:outputText>
                         </p:column>
                         <p:column headerText="厂家">
-                            <h:outputText value="#{row.productHomeName}"></h:outputText>
+                            <h:outputText value="#{row.productHome}"></h:outputText>
                         </p:column>
                         <p:column headerText="试剂类型">
-                            <h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentType)}"></h:outputText>
+                            <h:outputText value="#{row.reagentType}"></h:outputText>
                         </p:column>
                         <p:column headerText="操作" style="text-align: center;">
                             <h:commandButton  styleClass="favor-btn-common #{row.favor == null?'favor-btn':'not-favor-btn'}"  value="#{row.favor == null?'加入收藏':'取消收藏'}"  update="@this">
@@ -437,7 +422,7 @@
                     </h:form>
                 </p:dialog>
             </p:tab>
-            <p:tab title="申请履历">`
+            <p:tab title="申请履历" id="applyHistory">
                 <h:form id="applyMngNewHistoryForm">
 
                     <p:panelGrid styleClass="apply-mng-new-reagent-filter" columns="5" style="margin-left: -18px">
@@ -466,11 +451,11 @@
                         <p:column selectionMode="multiple" style="width: 30px;text-align: center;"/>
 
                         <p:ajax event="rowDblselect" listener="#{applyMngController.onApplyHistoryRowSelect}" update=":applyMngNewForm,:applyDialog"></p:ajax>
-                        <p:column headerText="申购编号" width="120">
+                        <p:column headerText="申购编号" width="120" style="white-space:normal;">
                             <h:outputText value="#{row.applyCode}"></h:outputText>
                         </p:column>
 
-                        <p:column headerText="申购产品">
+                        <p:column headerText="申购产品" style="white-space:normal;">
                             <h:outputText value="#{row.reagent!=null?row.reagent.name:''}"></h:outputText>
                         </p:column>
 
@@ -483,11 +468,11 @@
                         </p:column>
 
                         <p:column headerText="规格">
-                            <h:outputText value="#{row.reagent!=null?baseMetaService.getBaseMetaValue(row.reagent.reagentFormat):''}"></h:outputText>
+                            <h:outputText value="#{row.reagent!=null?row.reagent.reagentFormat:''}"></h:outputText>
                         </p:column>
 
                         <p:column headerText="包装">
-                            <h:outputText value="#{row.reagent!=null?(''.concat(row.reagent.mainMetering).concat(baseMetaService.getBaseMetaValue(row.reagent.reagentUnit))):''}"></h:outputText>
+                            <h:outputText value="#{row.reagent!=null?(''.concat(row.reagent.mainMetering).concat(row.reagent.reagentUnit)):''}"></h:outputText>
                         </p:column>
 
                         <p:column headerText="试剂单价">
@@ -528,8 +513,8 @@
                     </p:dataTable>
                 </h:form>
             </p:tab>
-            <p:tab title="我的收藏">
-                <h:form id="myFavor">
+            <p:tab title="我的收藏" id="favor">
+                <h:form id="myFavor" styleClass="myFavor">
                     <!--                    <p:panelGrid style="margin: 5px">-->
                     <!--                        <div class="label-tip" style="margin-left: 5px; ">注意:已经收藏的试剂不会再出现在<span style="font-weight: 900;">*试剂库*</span>页面中</div>-->
                     <!--                    </p:panelGrid>-->
@@ -540,30 +525,21 @@
                                  rows="50" pageLinks="5">
 
                         <p:ajax event="rowDblselect" listener="#{applyMngController.onReagentRowSelect}" update=":applyMngNewForm,:applyDialog"></p:ajax>
-                        <p:column headerText="产品编号">
+                        <p:column headerText="产品编号" style="white-space:normal;">
                             <h:outputText value="#{row.productSn}"></h:outputText>
                         </p:column>
-                        <p:column headerText="试剂名称">
-                            <h:outputText value="#{row.name}"></h:outputText>
+                        <p:column headerText="试剂名称" style="white-space:normal;">
+                            <h:outputText value="#{row.name}" ></h:outputText>
                             <h:outputText value="收藏" readonly="true" rendered="#{row.favor!=null}" styleClass="favor"></h:outputText>
                         </p:column>
                         <p:column headerText="管制品">
-                            <h:outputText value="#{baseMetaService.getBaseMetaValue(row.controlProducts)}"></h:outputText>
+                            <h:outputText value="#{row.controlProducts}"></h:outputText>
                         </p:column>
-                        <!--<p:column headerText="试剂类型">-->
-                        <!--<h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentType)}"></h:outputText>-->
-                        <!--</p:column>-->
-                        <!--<p:column headerText="危险性质">-->
-                        <!--<h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentCharacter)}"></h:outputText>-->
-                        <!--</p:column>-->
-                        <!--  <p:column headerText="供应商">
-                            <h:outputText value="#{row.supplierName}"></h:outputText>
-                        </p:column>-->
                         <p:column headerText="规格型号">
-                            <h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentFormat)}"></h:outputText>
+                            <h:outputText value="#{row.reagentFormat}"></h:outputText>
                         </p:column>
                         <p:column headerText="包装">
-                            <h:outputText value="#{''.concat(row.mainMetering).concat(baseMetaService.getBaseMetaValue(row.reagentUnit))}"></h:outputText>
+                            <h:outputText value="#{''.concat(row.mainMetering).concat(row.reagentUnit)}"></h:outputText>
                         </p:column>
                         <p:column headerText="含税售价">
                             <h:outputText value="#{row.price}"></h:outputText>
@@ -572,18 +548,20 @@
                             <h:outputText value="#{row.cas}"></h:outputText>
                         </p:column>
                         <p:column headerText="危险性质">
-                            <h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentCharacter)}"></h:outputText>
+                            <h:outputText value="#{row.reagentCharacter}"></h:outputText>
                         </p:column>
                         <p:column headerText="厂家">
-                            <h:outputText value="#{row.productHomeName}"></h:outputText>
+                            <h:outputText value="#{row.productHome}"></h:outputText>
                         </p:column>
                         <p:column headerText="试剂类型">
-                            <h:outputText value="#{baseMetaService.getBaseMetaValue(row.reagentType)}"></h:outputText>
+                            <h:outputText value="#{row.reagentType}"></h:outputText>
                         </p:column>
                         <p:column headerText="操作" style="text-align: center;">
-                            <h:commandButton  styleClass="favor-btn-common #{row.favor == null?'favor-btn':'not-favor-btn'}"  value="#{row.favor == null?'加入收藏':'取消收藏'}"  update="@this">
+                            <p:commandButton  styleClass="favor-btn-common #{row.favor == null?'favor-btn':'not-favor-btn'}"
+                                              style="background-image:unset;background-color: #1b9aee;color:#ffffff;border: unset" value="#{row.favor == null?'加入收藏':'取消收藏'}"
+                                              update="@(.myFavor)">
                                 <f:setPropertyActionListener value="#{row}" target="#{applyMngController.selectReagent}" />
-                            </h:commandButton>
+                            </p:commandButton>
 
                         </p:column>
                     </p:dataTable>

--
Gitblit v1.9.2