<?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="supplierInfoMngForm">
|
<p:panel styleClass="center-header">
|
<p:outputLabel styleClass="title" value="供应商信息管理"></p:outputLabel>
|
|
<p:panelGrid styleClass="filter" columns="3">
|
<p:outputLabel value="供应商名:"></p:outputLabel>
|
<p:inputText value="#{supplierInfoMngController.name}"></p:inputText>
|
|
<p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
|
</p:panelGrid>
|
</p:panel>
|
<p:panel styleClass="center-body">
|
<p:panelGrid columns="6" styleClass="btn">
|
<p:commandButton value="新建" styleClass="new-btn"
|
process="@this"
|
actionListener="#{supplierInfoMngController.onNewBtnClick}"
|
oncomplete="PF('dialog').show();"
|
update=":dialog,:dialogForm"></p:commandButton>
|
<p:commandButton value="修改" styleClass="edit-btn"
|
process="@form"
|
actionListener="#{supplierInfoMngController.onEditBtnClick}"
|
update=":dialog,:dialogForm"></p:commandButton>
|
<p:commandButton value="删除" styleClass="del-btn"
|
process="@form"
|
actionListener="#{supplierInfoMngController.onDeleteBtnClick}"
|
update="@form">
|
<p:confirm header="确认" message="确认操作?"></p:confirm>
|
</p:commandButton>
|
<p:commandButton value="导入" styleClass="import-btn" onclick="importSupplier()"/>
|
<p:commandButton value="导出" styleClass="new-btn" ajax="false" actionListener="#{supplierInfoMngController.export2Excel}" />
|
|
<a href="resources/template/供应商导入模板.xlsx" style="display: inline-block;"><img src="resources/images/xlsx.png" width="30px;" alt=""/></a>
|
|
</p:panelGrid>
|
<script type="text/javascript">
|
function importSupplier(){
|
$("#supplierInfoMngForm\\:importSuppliertBtn_input").click();
|
}
|
|
</script>
|
<div style="display: none" id='importDv'>
|
<p:fileUpload fileUploadListener="#{supplierInfoMngController.uploadSupplier}"
|
dragDropSupport="false" id="importSuppliertBtn" label="导入"
|
update="@form" auto="true" sizeLimit="5000000"
|
mode="advanced"/>
|
</div>
|
|
<p:dataTable id="supplierInfoMngDataTable" styleClass="data-table"
|
paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
|
lazy="true" value="#{supplierInfoMngController.dataModel}" var="row" rowKey="#{row.id}"
|
emptyMessage="无数据" selection="#{supplierInfoMngController.selectedList}"
|
rows="20" pageLinks="5">
|
<p:column selectionMode="multiple" style="width: 30px;text-align: center;"/>
|
<p:column headerText="供应商名">
|
<h:outputText value="#{row.name}"></h:outputText>
|
</p:column>
|
<p:column headerText="联系人">
|
<h:outputText value="#{row.personName}"></h:outputText>
|
</p:column>
|
<p:column headerText="电话">
|
<h:outputText value="#{row.phone}"></h:outputText>
|
</p:column>
|
<p:column headerText="备注">
|
<h:outputText value="#{row.memo}"></h:outputText>
|
</p:column>
|
</p:dataTable>
|
</p:panel>
|
</h:form>
|
|
<p:dialog modal="true" header="#{supplierInfoMngController.action==constants.ACTION_ADD?'新建':'修改'}" appendTo="@(body)"
|
id="dialog" widgetVar="dialog"
|
resizable="false" width="420">
|
<h:form id="dialogForm">
|
<p:panelGrid columns="1" styleClass="content">
|
<p:outputLabel value="供应商名"></p:outputLabel>
|
<p:inputText value="#{supplierInfoMngController.sysSupplier.name}" maxlength="100"
|
required="true" requiredMessage="请输入供应商名"></p:inputText>
|
|
<p:outputLabel value="联系人"></p:outputLabel>
|
<p:inputText value="#{supplierInfoMngController.sysSupplier.personName}" maxlength="100"
|
required="true" requiredMessage="请输入联系人"></p:inputText>
|
|
<p:outputLabel value="电话"></p:outputLabel>
|
<p:inputText value="#{supplierInfoMngController.sysSupplier.phone}" maxlength="30"
|
required="true" requiredMessage="请输入电话"></p:inputText>
|
|
<p:outputLabel value="备注"></p:outputLabel>
|
<p:inputTextarea autoResize="false" style="height: 80px"
|
value="#{supplierInfoMngController.sysSupplier.memo}"
|
maxlength="200"></p:inputTextarea>
|
</p:panelGrid>
|
<p:panel styleClass="btn">
|
<p:commandButton value="保存" actionListener="#{supplierInfoMngController.onSaveBtnClick}"
|
process="@form" update=":supplierInfoMngForm:supplierInfoMngDataTable">
|
<p:confirm header="确认" message="确认操作?"></p:confirm>
|
</p:commandButton>
|
</p:panel>
|
</h:form>
|
</p:dialog>
|
</ui:composition>
|
</html>
|