287 lines
20 KiB
Plaintext
Executable File
287 lines
20 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">
|
|
<maia:pageEvents controller="#{ventasVariasArmasController}"
|
|
queryProcess=":formTable:filters"
|
|
queryUpdate=":formTable:dt-table"
|
|
saveProcess=""
|
|
saveUpdate=""
|
|
focusContainer=":formTable:filters" />
|
|
<p:panelGrid styleClass="m-filters" columns="1" style="width:1200px">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_armas.hfld_datosgenerales}" />
|
|
</f:facet>
|
|
<h:panelGrid id="filters" columns="1" >
|
|
<h:panelGrid columns="7">
|
|
<p:outputLabel for="fdoctype" value="#{msg_armas.lbl_tipodocumento}:" />
|
|
<p style="width: 23px"></p>
|
|
<p:inputText id="fdoctype" value="#{ventasVariasArmasController.cdetalle.description}" maxlength="30" disabled="true" style="width: 75px;" onkeyup="Maia.forceupper(event, this);"/>
|
|
|
|
<p:outputLabel for="fdocnum" value="#{msg_armas.lbl_numerodocumento}:" style="width:94px;display:block"/>
|
|
<p:inputText id="fdocnum" value="#{ventasVariasArmasController.persondetail.identification}" maxlength="15" disabled="true" style="width: 115px;" onkeyup="Maia.forceupper(event, this);"/>
|
|
|
|
<p:outputLabel for="ffech" value="#{msg_armas.lbl_fecharegistro}:" />
|
|
<p:inputText id="ffech" value="#{ventasVariasArmasController.fecha}" maxlength="20"
|
|
disabled="true" style="width: 70px;" onkeyup="Maia.forceupper(event, this);">
|
|
<f:convertDateTime pattern="dd-MM-yyyy"/>
|
|
</p:inputText>
|
|
|
|
</h:panelGrid>
|
|
|
|
<h:panelGrid id="filter" columns="3">
|
|
<p:outputLabel for="fraz" value="#{msg_general.lbl_razonsocial}:" />
|
|
<p:inputText id="fraz" value="#{ventasVariasArmasController.persondetail.name}" maxlength="180" disabled="true" style="width: 300px;" onkeyup="Maia.forceupper(event, this);"/>
|
|
</h:panelGrid>
|
|
<h:panelGrid id="loteFiltro" columns="3">
|
|
<p:outputLabel for="txtSerieLote" value="#{msg_armas.lbl_serielote}:"/>
|
|
<p:inputText id="txtSerieLote" maxlength="15" onkeyup="Maia.forceupper(event, this);" value="#{ventasVariasArmasController.loteFilter}"/>
|
|
</h:panelGrid>
|
|
</h:panelGrid>
|
|
</p:panelGrid>
|
|
|
|
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
|
|
<maia:pageControls controller="#{ventasVariasArmasController}"
|
|
queryUpdate=":formTable:data-content" queryProcess=":formTable:txtSerieLote"
|
|
dialogWidgetVar="dialogCarga" showCreateBtn="false" showSaveBtn="false"/>
|
|
<p:commandButton value="#{msg_general.btn_delete}" actionListener="#{ventasVariasArmasController.create()}" icon="ui-icon-script"
|
|
process="@this, :formTable:data-content :formCarga" styleClass="m-action-button"
|
|
oncomplete="if(args.validationFailed){return false;} else {PF('dialogCarga').show()}"
|
|
update=":formCarga:datosventa :formCarga"
|
|
rendered="#{row.estadoventa == null}">
|
|
<!-- f:setPropertyActionListener target="#{ventasVariasArmasController.record}" value="#{row}" />
|
|
<f:setPropertyActionListener target="#{ventasVariasArmasController.showRow}" value="#{false}" />
|
|
<f:setPropertyActionListener target="#{ventasVariasArmasController.newRow}" value="#{false}" /> -->
|
|
</p:commandButton>
|
|
</h:panelGrid>
|
|
|
|
<p:panelGrid id="data-content" columns="1" styleClass="m-data-content">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_armas.htbl_detalledelmaterial}" />
|
|
</f:facet>
|
|
<p:dataTable id="dt-table" var="row" value="#{ventasVariasArmasController.lrecord}" rowIndexVar="rowIndex" rows="200" style="min-width: 500px; width: auto;" rowKey="#{row.rowkey()}" selectionMode="single">
|
|
<p:column headerText="Seleccione" resizable="true" style="width:10px" >
|
|
<p:selectBooleanCheckbox value="#{row.modifiedData['seleccionado']}"/>
|
|
</p:column>
|
|
<p:column headerText="No." resizable="true" style="width:60px" >
|
|
<h:outputText value="#{rowIndex+1}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_general.lbl_code}" resizable="true" >
|
|
<h:outputText value="#{row.codigoarma}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_serie}" resizable="true" sortBy="#{row.lote}">
|
|
<h:outputText value="#{row.lote}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_longitud}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['longitud']}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_clase}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['clase']}"/>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_tipo}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['tipoarmaexplosivo']}"/>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_calibre}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['calibre']}"/>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_estado}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['estado']}"/>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_color}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['color']}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_marca}" resizable="true">
|
|
<h:outputText value="#{row.modifiedData['marca']}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_cantidad}" resizable="true" >
|
|
<h:outputText value="#{row.cantidad}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_peso}" resizable="true" >
|
|
<h:outputText value="#{row.peso}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_unidadcantidad}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['unidadmedidapeso']}" />
|
|
</p:column>
|
|
</p:dataTable>
|
|
</p:panelGrid>
|
|
</h:form>
|
|
|
|
|
|
<p:dialog widgetVar="dialogCarga" closeOnEscape="true" modal="true" appendToBody="true" showEffect="explode" hideEffect="explode"
|
|
styleClass="m-dialog" width="500" style="width:500px">
|
|
<f:facet name="header">
|
|
<h:outputText value="Venta de Material" />
|
|
</f:facet>
|
|
<h:form id="formCarga">
|
|
<h:panelGrid column="1" style="width:auto">
|
|
<h:panelGrid columns="2" style="width:500px">
|
|
<p:outputLabel for="ftranstipo" value="#{msg_armas.lbl_tipotransaccion}:" style="width:125px;display:block"/>
|
|
<h:panelGrid>
|
|
<p:selectOneMenu id="ftranstipo" var="p" value="#{ventasVariasArmasController.movimientoArma.tipomovimiento}" required="true" style="width:150px" >
|
|
<f:selectItem itemLabel="" itemValue="#{null}" />
|
|
<p:ajax listener="#{ventasVariasArmasController.changeType()}" event="change" update=":formCarga" process="@this"/>
|
|
<f:selectItems value="#{ventasVariasArmasController.lmovimientos}" var="id"
|
|
itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
|
|
</p:selectOneMenu>
|
|
<p:message for="ftranstipo"/>
|
|
</h:panelGrid>
|
|
</h:panelGrid>
|
|
|
|
<p:panelGrid id="venta" columns="1" style="width:460px" rendered="#{ventasVariasArmasController.movimientoArma.tipomovimiento=='VENT'}">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_armas.lbl_datoscomprador}" />
|
|
</f:facet>
|
|
|
|
<h:panelGrid columns="4" id="detallePersona" >
|
|
<p:outputLabel for="fidentificacion" value="#{msg_armas.lbl_noDocumento}:" />
|
|
<p style="width: 32px" />
|
|
<p:inputText id="fidentificacion" value="#{ventasVariasArmasController.compradorArma.identification}" maxlength="30" disabled="true" style="width: 120px;" onkeyup="Maia.forceupper(event, this);"/>
|
|
<p:commandButton id="cargar" value="#{msg_armas.btn_buscar}" actionListener="#{ventasVariasArmasController.openPersonLov()}" process="@this">
|
|
<p:ajax event="dialogReturn" listener="#{ventasVariasArmasController.onReturnPersonLov}" update=":formCarga:venta"/>
|
|
</p:commandButton>
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="2">
|
|
<p:outputLabel for="fnombre" value="#{msg_armas.lbl_nombrerazonsocial}:" />
|
|
<p:inputText id="fnombre" value="#{ventasVariasArmasController.compradorArma.name}" maxlength="50" disabled="true" style="width: 185px;" onkeyup="Maia.forceupper(event, this);"/>
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="2">
|
|
<p:outputLabel for="ffactura" value="#{msg_armas.lbl_factura}:" style="width:107px;display:block"/>
|
|
<p:inputText id="ffactura" value="#{ventasVariasArmasController.movimientoArma.factura}"
|
|
maxlength="20" required="true" style="width: 125px" onkeyup="Maia.forceupper(event, this);">
|
|
<pe:keyFilter for="ffactura" mask="int"/>
|
|
<p:message for="ffactura"/>
|
|
</p:inputText>
|
|
</h:panelGrid>
|
|
<h:panelGrid columns="2">
|
|
<p:outputLabel for="fregistro" value="#{msg_armas.lbl_registro}:" style="width:107px;display:block"/>
|
|
<p:inputText id="fregistro" value="#{ventasVariasArmasController.movimientoArma.noregistro}" maxlength="5" style="width: 125px;" onkeyup="Maia.forceupper(event, this);">
|
|
<pe:keyFilter for="fregistro" mask="int"/>
|
|
</p:inputText>
|
|
</h:panelGrid>
|
|
</p:panelGrid>
|
|
|
|
<p:panelGrid id="datosventa" columns="1">
|
|
<f:facet name="header">
|
|
<h:outputText value="#{msg_armas.lbl_datostransaccion}" />
|
|
</f:facet>
|
|
<h:panelGroup>
|
|
<p:dataTable id="dt-table" var="row" value="#{ventasVariasArmasController.lrecordSelccionadas}"
|
|
rowIndexVar="rowIndex" rows="200" style="min-width: 500px; width: auto;" rowKey="#{row.rowkey()}"
|
|
selectionMode="single">
|
|
<p:column headerText="No." resizable="true" style="width:1px" >
|
|
<h:outputText value="#{rowIndex+1}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_general.lbl_code}" resizable="true" >
|
|
<h:outputText value="#{row.codigoarma}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_serie}" resizable="true" sortBy="#{row.lote}">
|
|
<h:outputText value="#{row.lote}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_longitud}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['longitud']}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_clase}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['clase']}"/>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_tipo}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['tipoarmaexplosivo']}"/>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_calibre}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['calibre']}"/>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_estado}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['estado']}"/>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_color}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['color']}" />
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_marca}" resizable="true">
|
|
<h:outputText value="#{row.modifiedData['marca']}" />
|
|
</p:column>
|
|
<p:column id="columnCantidad" headerText="#{msg_armas.lbl_cantidad}" resizable="true" >
|
|
<h:outputText value="#{row.cantidad}" /><br />
|
|
<p:inputText id="fcantidad" value="#{row.valorAux}" disabled="#{row.cantidad==null or row.cantidad==0}"
|
|
required="true" maxlength="7" style="width:55px;" onkeyup="Maia.forceupper(event, this);">
|
|
<f:convertNumber pattern="#0" minFractionDigits="0" />
|
|
<p:ajax event="blur" listener="#{ventasVariasArmasController.validarCantidadMaxima(row.valorAux,row)}"
|
|
process="@this, fcantidad" update="fcantidad columnCantidad"></p:ajax>
|
|
<pe:keyFilter for="fcantidad" mask="int"/>
|
|
</p:inputText>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_peso}" resizable="true" >
|
|
<h:outputText value="#{row.peso}" /><br />
|
|
<p:inputText id="fpeso" value="#{row.pesoAux}" disabled="#{row.peso==null}"
|
|
required="true" maxlength="8" style="width:55px;" onkeyup="Maia.forceupper(event, this);">
|
|
<f:convertNumber pattern="#0.00" minFractionDigits="2" />
|
|
<p:ajax event="blur" listener="#{ventasVariasArmasController.validarPesoMaxima(row.pesoAux,row)}" process="@this fpeso" update="fpeso"></p:ajax>
|
|
</p:inputText>
|
|
</p:column>
|
|
<p:column headerText="#{msg_armas.lbl_unidadcantidad}" resizable="true" >
|
|
<h:outputText value="#{row.modifiedData['unidadmedidapeso']}" />
|
|
</p:column>
|
|
</p:dataTable>
|
|
|
|
<h:panelGrid id="just" columns="4" style="width:450px">
|
|
<p:outputLabel for="fjust" value="#{msg_armas.lbl_justificacion}:" style="width:98px;display:block"/>
|
|
<p:inputTextarea id="fjust" autoResize="false" value="#{ventasVariasArmasController.movimientoArma.justificacion}" maxlength="190"
|
|
style="width: 340px;resize: none" onkeyup="Maia.forceupper(event, this);"/>
|
|
|
|
<!-- h:panelGrid columns="3"
|
|
rendered="#{ventasVariasArmasController.flujoventa=='SI' and ventasVariasArmasController.movimientoArma.tipomovimiento=='VENT'}">
|
|
<p:outputLabel for="provinciasolic" value="#{msg_armas.lbl_centroControlArmas}:"/>
|
|
<p:selectOneMenu id="provinciasolic" value="#{ventasVariasArmasController.ccentrocontrol}" style="width:300px;" required="true" var="p" >
|
|
<f:selectItem itemLabel="" itemValue="" />
|
|
<f:selectItems value="#{ventasVariasArmasController.centroControlList}" var="row"
|
|
itemLabel="#{row.modifiedData['desnombreinstitucion']}" itemValue="#{row.pk}"/>
|
|
<p:ajax event="change" process="@this" update="provinciasolic"/>
|
|
</p:selectOneMenu>
|
|
<p:message for="provinciasolic" />
|
|
</h:panelGrid> -->
|
|
</h:panelGrid>
|
|
<!-- documento -->
|
|
<!-- p:outputLabel for="fileUploadCmpt" value="Documento:"
|
|
rendered="#{ventasVariasArmasController.flujoventa=='SI' and ventasVariasArmasController.movimientoArma.tipomovimiento=='VENT'}"/>
|
|
-->
|
|
<!-- h:panelGrid columns="1" rendered="#{ventasVariasArmasController.flujoventa=='SI' and ventasVariasArmasController.movimientoArma.tipomovimiento=='VENT'}">
|
|
<h:outputText value="#{msg_armas['msg_tamano_archivo_requisitos_jpg_png_1']}" style="color:blue;font-weight: bold;"/>
|
|
<p:fileUpload id="fileUploadCmpt" fileUploadListener="#{ventasVariasArmasController.handleUpload}" update="descFileUpload"
|
|
allowTypes="/(\.|\/)(pdf|jpeg|jpg|png)$/" description="Seleccionar documento"
|
|
fileLimit="1"
|
|
required="true"
|
|
label="#{msg_armas.lbl_seleccionar}"
|
|
uploadLabel="#{msg_armas.lbl_subir}"
|
|
cancelLabel="#{msg_armas.lbl_cancelar}"
|
|
invalidFileMessage="#{msg_armas['msg_error_tipoarchivoinvalido']}"
|
|
invalidSizeMessage="#{msg_armas.lbl_mensajearchivoinvalidom} #{msg_armas.lbl_1mb}"
|
|
fileLimitMessage="#{msg_armas['msg_error_exedeelnumero']}"
|
|
sizeLimit="#{msg_armas.lbl_archivounmega}"
|
|
/>
|
|
</h:panelGrid> -->
|
|
<!-- h:panelGrid id="descFileUpload" columns="1" style="width:100%;" >
|
|
<p:outputLabel value="#{ventasVariasArmasController.recorteNombre(ventasVariasArmasController.uploadedFile.fileName)}" rendered="#{ventasVariasArmasController.uploadedFile != null}"/>
|
|
</h:panelGrid> -->
|
|
|
|
<h:panelGrid columns="2" styleClass="m-dialog-controls">
|
|
<p:commandButton value="#{msg_general.btn_save}" process="@this, @form" update="@form :formTable:data-content"
|
|
action="#{ventasVariasArmasController.update()}"
|
|
icon="ui-icon-disk" oncomplete="if(args.validationFailed){return false;} else {PF('dialogCarga').hide()}" />
|
|
|
|
<p:commandButton value="#{msg_general.btn_cancell}" oncomplete="PF('dialogCarga').hide()" icon="ui-icon-trash" process="@this" />
|
|
</h:panelGrid>
|
|
</h:panelGroup>
|
|
</p:panelGrid>
|
|
</h:panelGrid>
|
|
</h:form>
|
|
</p:dialog>
|
|
|
|
|
|
|
|
</ui:define>
|
|
</ui:composition> |