maia/.svn/pristine/c9/c9fad262981047e4e3cd49b946a...

192 lines
14 KiB
Plaintext
Executable File

<ui:composition
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions"
template="/WEB-INF/templates/template.xhtml"
xmlns:maia="http://java.sun.com/jsf/composite/maiaComponents">
<ui:define name="content">
<h:form id="formTable">
<style>
.ui-growl-title {font-weight:bold;padding:0 0 7px 0;display:block;font-size: 200%;}
.ui-growl-message p {font-size: 200%}
</style>
<p:growl id="msjVerificarArmas" showDetail="true" sticky="true" />
<maia:pageEvents controller="#{reporteDestruccionArmasController}"
queryProcess=":formTable:dt-table, :formTable:filters, :formTable:data-content, :formTable:controls, :formTable:reportePnl"
queryUpdate=":formTable:dt-table, :formTable:filters, :formTable:data-content, :formTable:controls, :formTable:reportePnl"
focusContainer=":formTable:dt-table, :formTable:filters, :formTable:data-content, :formTable:controls, :formTable:reportePnl"
saveProcess=""
saveUpdate=":formTable:dt-table, :formTable:filters, :formTable:data-content, :formTable:controls, :formTable:reportePnl" />
<p:panelGrid id="filters" columns="1" styleClass="m-filters" style="padding-right: 200px;width:100%">
<f:facet name="header">
<h:outputText value="#{msg_general.lbl_filters}" />
</f:facet>
<h:panelGrid columns="6" >
<p:outputLabel for="fechaCorte" value="#{msg_armas.lbl_fechaDeCorte}:" style="display:block;width:200px"/>
<p:calendar id="fechaCorte" value="#{reporteDestruccionArmasController.fechaCorte}" disabled="#{reporteDestruccionArmasController.btnFiltros}"
pattern="#{msg_general.dateformat}" required="true" size="56">
<f:converter converterId="converter.date" for="fechaCorte"/>
</p:calendar>
<p:message for="fechaCorte" />
<p:outputLabel />
<p:outputLabel />
<p:outputLabel />
<!-- <p:outputLabel for="numeroTransaccionRecepcion" value="#{msg_armas.lbl_numerotransaccionrecepcion}:" style="display:block;width:175px;"/>
<p:inputText id="numeroTransaccionRecepcion" value="#{reporteDestruccionArmasController.numeroTransaccionRecepcion}" onkeyup="Maia.forceupper(event, this);" disabled="false" style="display:block;width:300px;"></p:inputText>
<p:message for="numeroTransaccionRecepcion" /> -->
<p:outputLabel for="serie" value="#{msg_armas.lbl_serie}:" style="display:block;width:200px;"/>
<p:inputText id="serie" value="#{reporteDestruccionArmasController.numeroSerie}" onkeyup="Maia.forceupper(event, this);" disabled="#{reporteDestruccionArmasController.btnFiltros}" style="display:block;width:300px;"/>
<p:message for="serie" />
<p:outputLabel for="documento" value="#{msg_armas.lbl_nodecomiso}:" style="display:block;width:200px;"/>
<p:inputText id="documento" value="#{reporteDestruccionArmasController.numeroDecomiso}" onkeyup="Maia.forceupper(event, this);" disabled="#{reporteDestruccionArmasController.btnFiltros}" style="display:block;width:300px;"/>
<p:message for="documento" />
<p:outputLabel for="centroControl" value="#{msg_armas.lbl_organismocontrol}:" style="display:block;width:200px;"/>
<p:inputText id="centroControl" value="#{reporteDestruccionArmasController.centroControlActual}" disabled="true" style="display:block;width:300px;"/>
<p:message for="centroControl" />
<p:outputLabel for="unidadControl" value="#{msg_armas.lbl_unidadcontrol}:" style="display:block;width:200px;"/>
<p:inputText id="unidadControl" value="#{reporteDestruccionArmasController.unidadActual}" disabled="true" style="display:block;width:300px;"/>
<p:message for="unidadControl" />
</h:panelGrid>
</p:panelGrid>
<p:panelGrid id="reportePnl" columns="2" styleClass="m-filters" style="padding-right: 200px;width:100%" >
<f:facet name="header">
<h:outputText value="#{msg_armas.fct_pnlunidaddestino}" />
</f:facet>
<h:panelGrid columns="6">
<p:outputLabel for="organismocontroldestino" value="#{msg_armas.lbl_organismocontroldestino}:" style="display:block;width:200px;"/>
<p:selectOneMenu id="organismocontroldestino" value="#{reporteDestruccionArmasController.centroControlDestino}"
style="display:block;width:290px" disabled="#{reporteDestruccionArmasController.btnGrabar}" required="false" >
<f:selectItem itemLabel="" itemValue="#{null}" />
<f:selectItems value="#{reporteDestruccionArmasController.centroControlsDestinos}" var="id"
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
<p:ajax update="reportePnl organismocontroldestino unidaddestino" event="change" listener="#{reporteDestruccionArmasController.seleccionaCentroControlDestino()}"
process="@this organismocontroldestino"/>
</p:selectOneMenu>
<p:message for="organismocontroldestino" />
<p:outputLabel for="unidaddestino" value="#{msg_armas.lbl_unidaddestino}:" style="padding-left:9px;display:block;width:200px;"/>
<p:selectOneMenu id="unidaddestino" value="#{reporteDestruccionArmasController.unidadDestino}"
style="display:block;width:290px" disabled="#{reporteDestruccionArmasController.btnGrabar}" required="false">
<f:selectItem itemLabel="" itemValue="" />
<f:selectItems value="#{reporteDestruccionArmasController.unidadesDestinos}" var="vmod"
itemLabel="#{vmod.modifiedData['desnombreinstitucion']}" itemValue="#{vmod.pk}" />
<p:ajax event="change" process="@this" update="reportePnl unidaddestino"/>
</p:selectOneMenu>
<p:message for="unidaddestino" />
</h:panelGrid>
</p:panelGrid>
<h:panelGrid columns="3" style="padding-left:21px;font-weight: bold;color: rgb(90, 78, 78)" id="transaccion">
<p:outputLabel for="fpkTransaccion" value="#{msg_armas.lbl_numerotransaccion}:" style="display:block;width:203px;"/>
<p:inputText id="fpkTransaccion"
value="#{reporteDestruccionArmasController.numeroTransaccionEnvioConvertido}"
maxlength="15" style="display:block;width:300px;" disabled="true" />
<p:message for="fpkTransaccion" />
</h:panelGrid>
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
<maia:pageControls controller="#{reporteDestruccionArmasController}"
queryProcess=":formTable:dt-table, :formTable:filters, :formTable:data-content, :formTable:txtSeleccionarArmas, :formTable:fpkTransaccion, :formTable:btnGenerarReporte, :formTable:controls, :formTable:reportePnl, :formTable:idIniciFlujo"
queryUpdate=":formTable:dt-table, :formTable:filters, :formTable:data-content, :formTable:fpkTransaccion, :formTable:btnGenerarReporte, :formTable:controls, :formTable:reportePnl, :formTable:idIniciFlujo"
createProcess=""
saveProcess=":formTable:dt-table, :formTable:filters, :formTable:btnGenerarReporte, :formTable:controls, :formTable:reportePnl, :formTable:data-content, :formTable:msjVerificarArmas"
saveUpdate=":formTable:filters, :formTable:dt-table, :formTable:fpkTransaccion, :formTable:btnGenerarReporte, :formTable:controls, :formTable:reportePnl, :formTable:data-content, :formTable:idIniciFlujo, :formTable:msjVerificarArmas"
createUpdate=":formTable:fpkTransaccion, :formTable:btnGenerarReporte, :formTable:idIniciFlujo, :formTable:reportePnl, :formTable:controls"
dialogWidgetVar=""
showCreateBtn = "false"
showSaveBtn = "true" showPreviousBtn="false" showNextBtn="false"
disableSaveBtn="#{reporteDestruccionArmasController.btnGrabar}"
disableQueryBtn="#{reporteDestruccionArmasController.btnFiltros}"/>
<p:commandButton id="btnGenerarReporte" actionListener="#{reporteDestruccionArmasController.generarActa()}"
ajax="false" process="@this" value="#{msg_armas.btn_generaracta}" update=":formTable:dt-table, :formTable:msjVerificarArmas"
disabled="#{reporteDestruccionArmasController.numeroTransaccionEnvioConvertido==null || empty reporteDestruccionArmasController.numeroTransaccionEnvioConvertido}">
</p:commandButton>
<p:commandButton id="idIniciFlujo" value="#{msg_armas.lbl_inicarFlujo}"
icon="ui-icon-play" process="@this" onclick="PF('confirmFlowDialog').show()"
disabled="#{!reporteDestruccionArmasController.btnFlujo}" rendered="#{reporteDestruccionArmasController.isCentroDpto}" update=":formTable:dt-table, :formTable:filters, :formTable:data-content, :formTable:btnGenerarReporte, :formTable:controls, :formTable:reportePnl, :formTable:msjVerificarArmas, idIniciFlujo" >
</p:commandButton>
</h:panelGrid>
<p:panelGrid id="data-content" columns="1" styleClass="m-data-content" style="text-align: center;">
<f:facet name="header">
<h:outputText value="#{msg_armas.htbl_detalledelmaterialm}" />
</f:facet>
<h:panelGroup layout="block" style="float:right;">
<h:panelGrid columns="2" styleClass="m-data-content" style="min-width: 150px!important;" >
<p:outputLabel for="txtSeleccionarArmas" value="#{msg_armas['lbl_seleccionartodos']}"/>
<p:selectBooleanCheckbox id="txtSeleccionarArmas" value="#{reporteDestruccionArmasController.mfilelds['seleccionarTodos']}" disabled="#{reporteDestruccionArmasController.btnSelTodos}">
<p:ajax listener="#{reporteDestruccionArmasController.seleccionarTodos}" global="false" process="@this dt-table" update="dt-table, :formTable:controls, :formTable:reportePnl"/>
</p:selectBooleanCheckbox>
</h:panelGrid>
</h:panelGroup>
<p:dataTable id="dt-table" var="row" value="#{reporteDestruccionArmasController.lrecord}"
rowIndexVar="index" rowKey="#{row.rowkey()}" selectionMode="single" style="width:100%"
rows="100000" paginatorTemplate=" {PreviousPageLink} {NextPageLink}">
<p:column headerText="#{msg_armas.lbl_No}" resizable="true" width="30">
<h:outputText value="#{index+1}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_nodecomiso}" resizable="true" width="90">
<h:outputText value="#{row.modifiedData['numerotransaccion']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_clase}" resizable="true" >
<h:outputText value="#{row.modifiedData['nclase']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_tipo2}" resizable="true" >
<h:outputText value="#{row.modifiedData['ntipo']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_marca}" resizable="true" >
<h:outputText value="#{row.modifiedData['nmarca']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_calibre}" width="60" resizable="true" >
<h:outputText value="#{row.modifiedData['ncalibre']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_serie}" width="100" resizable="true" >
<h:outputText value="#{row.modifiedData['nserie']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_noRecibo}" resizable="true" >
<h:outputText value="#{row.modifiedData['nrecibo']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_cantidad}" width="20" resizable="true" >
<h:outputText value="#{row.cantidad}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_uniMedida}" resizable="true" >
<h:outputText value="#{row.modifiedData['nunidad']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_numeroDeDocumento}" resizable="true" >
<h:outputText value="#{row.modifiedData['documento']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_nombrerazonsocial}" resizable="true" >
<h:outputText value="#{row.modifiedData['nrazons']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_fecdecimiso}" resizable="true" >
<h:outputText value="#{row.fdecomiso}" >
<f:convertDateTime pattern="#{msg_general.dateformat}"/>
</h:outputText>
</p:column>
<p:column headerText="#{msg_armas.lbl_observacion}" resizable="true" >
<h:outputText value="#{row.observacion}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_verificar}" resizable="true" style="width:60px;text-align: center;">
<p:selectBooleanCheckbox value="#{row.modifiedData['seleccion']}" disabled="#{!reporteDestruccionArmasController.btnTabGrid}">
<p:ajax listener="#{reporteDestruccionArmasController.onChange(row)}"
process="@this dt-table" event="change" update="dt-table, :formTable:controls, :formTable:reportePnl" />
</p:selectBooleanCheckbox>
</p:column>
</p:dataTable>
</p:panelGrid>
</h:form>
</ui:define>
</ui:composition>