From 366659f2bc5226a8da99489e89fb8f5b7c6aec9f Mon Sep 17 00:00:00 2001
From: liyu <986321569@qq.com>
Date: 星期三, 02 十二月 2020 23:30:34 +0800
Subject: [PATCH] 更换数据库

---
 src/main/webapp/apply_mng_new.xhtml |   74 ++++++++++++++++++++++++++++++++++--
 1 files changed, 69 insertions(+), 5 deletions(-)

diff --git a/src/main/webapp/apply_mng_new.xhtml b/src/main/webapp/apply_mng_new.xhtml
index 77f1661..c65469b 100644
--- a/src/main/webapp/apply_mng_new.xhtml
+++ b/src/main/webapp/apply_mng_new.xhtml
@@ -68,7 +68,7 @@
                     </p:column>
 
                     <p:column headerText="含税售价">
-                        <h:outputText value="#{row.reagent!=null?row.reagent.price:''}"></h:outputText>
+                        <h:outputText value="#{row.reagent.price}"></h:outputText>
                     </p:column>
 
                     <p:column headerText="CAS号">
@@ -283,6 +283,68 @@
         </h:form>
 		<br/>
         <p:tabView dynamic="true" style="margin-left: 26px">
+            <p:tab title="我的收藏">
+                <h:form id="myFavor">
+                    <p:panelGrid style="margin: 5px">
+                        <div class="label-tip" style="margin-left: 5px; ">注意:已经收藏的试剂不会再出现在<span style="font-weight: 900;">*试剂库*</span>页面中</div>
+                    </p:panelGrid>
+                    <p:dataTable id="favorDataTable" styleClass="data-table" style="margin-left: 2px"
+                                 resizableColumns="true" paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
+                                 lazy="true" value="#{applyMngController.reagentFavorDataModel}" var="row" rowKey="#{row.id}"
+                                 emptyMessage="请添加收藏" selectionMode="single"
+                                 rows="50" pageLinks="5">
+
+                        <p:ajax event="rowDblselect" listener="#{applyMngController.onReagentRowSelect}" update=":applyMngNewForm,:applyDialog"></p:ajax>
+                        <p:column headerText="产品编号">
+                            <h:outputText value="#{row.productSn}"></h:outputText>
+                        </p:column>
+                        <p:column headerText="试剂名称">
+                            <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>
+                        </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>
+                        </p:column>
+                        <p:column headerText="包装">
+                            <h:outputText value="#{''.concat(row.mainMetering).concat(baseMetaService.getBaseMetaValue(row.reagentUnit))}"></h:outputText>
+                        </p:column>
+                        <p:column headerText="含税售价">
+                            <h:outputText value="#{row.price}"></h:outputText>
+                        </p:column>
+                        <p:column headerText="CAS号">
+                            <h:outputText value="#{row.cas}"></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.productHomeName}"></h:outputText>
+                        </p:column>
+                        <p:column headerText="试剂类型">
+                            <h:outputText value="#{baseMetaService.getBaseMetaValue(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">
+                                <f:setPropertyActionListener value="#{row}" target="#{applyMngController.selectReagent}" />
+                            </h:commandButton>
+
+                        </p:column>
+                    </p:dataTable>
+                </h:form>
+
+            </p:tab>
             <p:tab title="试剂库">
                 <h:form id="applyMngNewReagentForm">
                     <p:panelGrid styleClass="apply-mng-new-reagent-filter" columns="9" style="margin-left: -18px">
@@ -293,8 +355,6 @@
                         <p:inputText value="#{applyMngController.applyNewCas}"></p:inputText>
                         <p:outputLabel value="产品编号:"></p:outputLabel>
                         <p:inputText value="#{applyMngController.applyNewSn}"></p:inputText>
-                        <p:outputLabel value="我的收藏: " />
-                        <p:inputSwitch value="#{applyMngController.favorFlag}" styleClass="toggle-class"/>
                         <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
                     </p:panelGrid>
 
@@ -438,7 +498,7 @@
                     </h:form>
                 </p:dialog>
             </p:tab>
-            <p:tab title="申请履历">
+            <p:tab title="申请履历">`
                 <h:form id="applyMngNewHistoryForm">
 
                     <p:panelGrid styleClass="apply-mng-new-reagent-filter" columns="5" style="margin-left: -18px">
@@ -491,10 +551,14 @@
                             <h:outputText value="#{row.reagent!=null?(''.concat(row.reagent.mainMetering).concat(baseMetaService.getBaseMetaValue(row.reagent.reagentUnit))):''}"></h:outputText>
                         </p:column>
 
-                        <p:column headerText="含税售价">
+                        <p:column headerText="试剂单价">
                             <h:outputText value="#{row.reagent!=null?row.reagent.price:''}"></h:outputText>
                         </p:column>
 
+                        <p:column headerText="含税售价">
+                            <h:outputText value="#{row.applyPrice}"></h:outputText>
+                        </p:column>
+
                         <p:column headerText="每箱数量">
                             <h:outputText value="#{row.reagent!=null?row.reagent.perBox:''}"></h:outputText>
                         </p:column>

--
Gitblit v1.9.2