<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE html
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
xmlns:ui="http://java.sun.com/jsf/facelets"
|
xmlns:p="http://primefaces.org/ui"
|
xmlns:h="http://java.sun.com/jsf/html"
|
xmlns:f="http://java.sun.com/jsf/core"
|
xmlns:c="http://java.sun.com/jsp/jstl/core">
|
<head></head>
|
<ui:composition>
|
<h:form id="barcodeMngForm">
|
<p:panel styleClass="center-header">
|
<p:outputLabel styleClass="title" value="打印条码"></p:outputLabel>
|
<p:panelGrid styleClass="filter" columns="8">
|
<p:outputLabel value="订单编号:"></p:outputLabel>
|
<p:inputText value="#{barcodeMngController.orderCode}"></p:inputText>
|
|
<p:outputLabel value="订单名称:"></p:outputLabel>
|
<p:inputText value="#{barcodeMngController.orderName}"></p:inputText>
|
|
<p:outputLabel value="申请编号:"></p:outputLabel>
|
<p:inputText value="#{barcodeMngController.applyCode}"></p:inputText>
|
<p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
|
</p:panelGrid>
|
</p:panel>
|
<p:panel styleClass="center-body">
|
<p:panelGrid columns="5" styleClass="btn">
|
<p:commandButton value="查看条码" styleClass="edit-btn"
|
process="@form"
|
actionListener="#{barcodeMngController.onViewBarcodeClick}"
|
update=":viewPrintReagentCodeList,:dialogViewPrintReagentCodeForm">
|
</p:commandButton>
|
<p:commandButton value="打印二维码" styleClass="edit-btn"
|
process="@form"
|
actionListener="#{barcodeMngController.onPrintBarcodeClick}"
|
update=":dialogPrintReagentCode,:dialogPrintReagentCodeForm">
|
</p:commandButton>
|
</p:panelGrid>
|
<p:dataTable id="barcodeMngDataTable" styleClass="data-table"
|
paginator="true" paginatorAlwaysVisible="false"
|
paginatorPosition="bottom" lazy="true"
|
value="#{barcodeMngController.dataModel}"
|
var="row" rowKey="#{row.id}" emptyMessage="无数据" rows="10"
|
selection="#{barcodeMngController.selectedViewList}"
|
pageLinks="5">
|
<p:column selectionMode="multiple" style="width: 30px;text-align: center;"/>
|
<p:column headerText="申购编号">
|
<h:outputText value="#{row.applyCode}"></h:outputText>
|
</p:column>
|
<p:column headerText="申请数量" width="50px;">
|
<h:outputText value="#{row.num}"></h:outputText>
|
</p:column>
|
<p:column headerText="订单名称">
|
<h:outputText value="#{row.order.orderName}"></h:outputText>
|
</p:column>
|
<p:column headerText="订单编号">
|
<h:outputText value="#{row.order.orderCode}"></h:outputText>
|
</p:column>
|
<!-- <p:column headerText="产品编号">-->
|
<!-- <h:outputText value="#{row.reagent.productSn}"></h:outputText>-->
|
<!-- </p:column>-->
|
<p:column headerText="试剂名称">
|
<h:outputText value="#{row.reagent.name}"></h:outputText>
|
</p:column>
|
<!-- <p:column headerText="CAS号">-->
|
<!-- <h:outputText value="#{row.reagent.cas}"></h:outputText>-->
|
<!-- </p:column>-->
|
|
<p:column headerText="危险性质">
|
<h:outputText value="#{row.reagent.reagentCharacter}"></h:outputText>
|
</p:column>
|
|
<p:column headerText="厂家">
|
<h:outputText value="#{row.reagent.productHome}"></h:outputText>
|
</p:column>
|
|
<p:column headerText="试剂类型">
|
<h:outputText value="#{row.reagent.reagentType}"></h:outputText>
|
</p:column>
|
|
<p:column headerText="申购人">
|
<h:outputText value="#{row.applyUserName}"></h:outputText>
|
</p:column>
|
|
<p:column headerText="申购日期">
|
<h:outputText value="#{row.createTime}">
|
<f:convertDateTime pattern="yyyy-MM-dd" locale="zh_CN"></f:convertDateTime>
|
</h:outputText>
|
</p:column>
|
|
</p:dataTable>
|
</p:panel>
|
</h:form>
|
<p:dialog modal="true" header="打印条码" appendTo="@(body)"
|
id="dialogPrintReagentCode" widgetVar="dialogPrintReagentCode"
|
resizable="false" width="500">
|
<h:form id="dialogPrintReagentCodeForm">
|
<!--50*40 label尺寸 -->
|
<p:panel styleClass="center-body">
|
<div style="max-height: 800px;overflow: auto;height: 500px;width: 100%;">
|
<div id="printReagentCodeContent" style="width: 190px;">
|
<c:if test="#{barcodeMngController.reagentCodeList!=null and barcodeMngController.reagentCodeList.size()>0}">
|
<c:forEach items="#{barcodeMngController.reagentCodeList[0].reagentCodes}" var="reagentCode">
|
<div style="margin-bottom: 5px;">
|
<table style="height: 130px;width: 100%;text-align: center;border:1px solid #000;" cellspacing="0" cellpadding="0">
|
<tbody>
|
<tr>
|
<td colspan="2" style="border:1px solid #000;">
|
<div><h:outputText value="#{barcodeMngController.reagentCodeList[0].reagent.name}" style="font-size:14px;font-weight: bold;"></h:outputText></div>
|
<div><h:graphicImage value="data:image/png;base64,#{barcodeMngController.getQrcode(reagentCode)}" style="width: 50px; height: 50px;" dataURI="true"/></div>
|
<div><h:outputText value="#{reagentCode}" style="font-size:10px;"></h:outputText></div>
|
</td>
|
</tr>
|
<tr><td style="border:1px solid #000;">【CAS号】</td><td style="border:1px solid #000;"><h:outputText value="#{barcodeMngController.reagentCodeList[0].reagent.cas}"></h:outputText></td></tr>
|
<tr><td style="border:1px solid #000;">【危险性质】</td><td style="border:1px solid #000;"><h:outputText value="#{barcodeMngController.reagentCodeList[0].reagent.reagentCharacter}"></h:outputText></td></tr>
|
</tbody>
|
</table>
|
</div>
|
|
</c:forEach>
|
</c:if>
|
</div>
|
</div>
|
</p:panel>
|
<p:panel styleClass="btn no-print">
|
<div class="div-btn cancel" id="barcodeCancel">关闭</div>
|
<div class="div-btn print" id="barcodePrint">打印</div>
|
<script type="text/javascript" src="resources/js/print.js"/>
|
<script type="text/javascript">
|
$(function () {
|
$("#barcodePrint").on("click", function () {
|
jQuery.print('#printReagentCodeContent')
|
})
|
$("#barcodeCancel").on("click", function () {
|
$("#dialogPrintReagentCode a").click();
|
})
|
})
|
</script>
|
</p:panel>
|
</h:form>
|
</p:dialog>
|
|
|
|
<p:dialog modal="true" header="条码列表" appendTo="@(body)"
|
id="viewPrintReagentCodeList" widgetVar="viewPrintReagentCodeList"
|
resizable="false" width="1000">
|
<h:form id="dialogViewPrintReagentCodeForm">
|
<p:dataTable styleClass="data-table"
|
paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
|
value="#{barcodeMngController.viewReagentCodeList}" var="row" rowKey="#{row.reagentCode}"
|
emptyMessage="无数据">
|
<p:column headerText="试剂名称">
|
<h:outputText value="#{row.name}"></h:outputText>
|
</p:column>
|
|
<p:column headerText="CAS号">
|
<h:outputText value="#{row.cas}"></h:outputText>
|
</p:column>
|
|
<p:column headerText="危险性质">
|
<h:outputText value="#{row.reagentCharacter}"></h:outputText>
|
</p:column>
|
<p:column headerText="条码" width="280px;">
|
<h:outputText value="#{row.reagentCode}"></h:outputText>
|
</p:column>
|
<p:column headerText="条形码" >
|
<p:commandButton value="打印条码" styleClass="edit-btn" process="@form"
|
actionListener="#{barcodeMngController.onPrintSingleBarcodeClick(row.reagentCode)}"
|
update=":dialogPrintReagentCode,:dialogPrintReagentCodeForm">
|
</p:commandButton>
|
</p:column>
|
</p:dataTable>
|
</h:form>
|
</p:dialog>
|
|
</ui:composition>
|
</html>
|