maia/.svn/pristine/02/025e26905f688dc9e1e157252a6...

273 lines
17 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="#{evaluacionController}"
queryProcess=":formTable:datosEvaluacion"
queryUpdate=":formTable:dt-table" saveProcess=""
saveUpdate=":formTable:data-content"
focusContainer=":formTable:m-data-content" />
<p:panelGrid styleClass="m-filters" columns="1" style="width:1200px">
<f:facet name="header">
<h:outputText value="#{msg_general.lbl_filters}"/>
</f:facet>
<h:panelGrid id="datosEvaluacion" columns="5">
<p:outputLabel for="ftest" value="#{msg_armas.lbl_test}:" />
<h:panelGrid column="2">
<p:inputText id="ftest" maxlength="30" disabled="true"
value="#{evaluacionController.tipoEvaluacion.description}" style="width: 260px;" onkeyup="Maia.forceupper(event, this);" />
<p:message for="ftest" />
</h:panelGrid>
<p style="with:0px"></p>
<p:outputLabel for="ffecha" value="#{msg_armas.lbl_fechadeevaluacion}:" />
<h:panelGrid column="2" >
<p:inputText id="ffecha" value="#{importacionController.fechaactual}" maxlength="20"
disabled="true" style="width: 125px;" onkeyup="Maia.forceupper(event, this);">
<f:convertDateTime pattern="dd-MM-yyyy"/>
</p:inputText>
</h:panelGrid>
<p:outputLabel for="fndocumento" value="#{msg_armas.lbl_noDocumento}:"/>
<h:panelGrid column="2">
<p:inputText id="fndocumento" maxlength="30" disabled="true"
value="#{evaluacionController.personafiltroSNAP.identification}"
style="width: 260px;" onkeyup="Maia.forceupper(event, this);" />
<p:message for="fndocumento" />
</h:panelGrid>
<h:panelGroup></h:panelGroup>
<p:outputLabel for="ffechanombrerazonsocial" value="#{msg_armas.lbl_nombrerazonsocial}:" />
<h:panelGrid column="2">
<p:inputText id="ffechanombrerazonsocial" maxlength="30" value="#{evaluacionController.personafiltroSNAP.name}"
disabled="true" style="width: 300px;" />
</h:panelGrid>
</h:panelGrid>
</p:panelGrid>
<h:panelGrid columns="7" id="controls" styleClass="m-controls">
<maia:pageControls controller="#{evaluacionController}"
queryProcess=":formTable:datosEvaluacion"
queryUpdate=":formTable:data-content"
saveUpdate=":formTable:data-content"
showCreateBtn="false"
showQueryBtn="false"
showSaveBtn="false"
dialogWidgetVar="dialog" />
<p:commandButton id="createControl" value="#{msg_general.btn_create}" update=":formCarga" icon="ui-icon-plus" oncomplete="if(args.validationFailed){return false;} PF('dialog').show()" >
<f:setPropertyActionListener target="#{evaluacionController.newRow}" value="#{true}" />
<f:setPropertyActionListener target="#{evaluacionController.showRow}" value="#{false}" />
</p:commandButton>
<p:commandButton id="saveControl" value="#{msg_general.btn_save}" icon="ui-icon-disk" update=":formTable:data-content" action="#{evaluacionController.save()}" />
</h:panelGrid>
<p:panelGrid id="data-content" columns="1"
styleClass="m-data-content" style="width:1200px">
<f:facet name="header">
<h:outputText value="#{msg_armas.lbl_detallevaluacion}" />
</f:facet>
<p:dataTable id="dt-table" var="row"
value="#{evaluacionController.lrecord}"
rows="200" style="min-width: 800px; width: auto;"
rowKey="#{row.rowkey}" selectionMode="single">
<p:column headerText="#{msg_armas.lbl_No}" resizable="true"
style="width:60px" >
<h:outputText value="#{row.personcode}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_noDocumento}" resizable="true">
<h:outputText value="#{row.modifiedData['identificacion']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_nombrerazonsocial}" resizable="true">
<h:outputText value="#{row.modifiedData['nombre']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_tipoPersona}" resizable="true">
<h:outputText value="#{row.modifiedData['tipopersonadesc']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_evaluacion}" resizable="true">
<h:outputText value="#{row.modifiedData['tipoevaluaciondesc']}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_fecharegistrotest}" resizable="true">
<h:outputText value="#{row.fecha}" >
<f:convertDateTime pattern="dd-MM-yyyy"/>
</h:outputText>
</p:column>
<p:column headerText="Resultado"
resizable="true">
<h:outputText value="#{row.resultado}" />
</p:column>
<p:column headerText="#{msg_armas.lbl_estadoevaluacion}" resizable="true">
<h:outputText value="#{row.modifiedData['estadovig']}" />
</p:column>
<p:column resizable="true">
<p:commandButton value="#{msg_general.btn_delete}" process="@this" update=":formTable:data-content" disabled="#{row.modifiedData['eliminar']}" styleClass="m-action-button" icon="ui-icon-trash" action="#{evaluacionController.remove()}">
<f:setPropertyActionListener target="#{evaluacionController.record}" value="#{row}" />
</p:commandButton>
</p:column>
</p:dataTable>
</p:panelGrid>
</h:form>
<p:dialog widgetVar="dialog" resizable="false"
closeOnEscape="true" modal="true" appendTo="@(body)"
showEffect="explode" hideEffect="explode" styleClass="m-dialog" width="650">
<f:facet name="header">
<h:outputText value="#{msg_armas.lbl_test}" />
</f:facet>
<h:form id="formCarga">
<h:panelGroup layout="block" style="height:450px !important; width:620px !important">
<p:messages id="messages" autoUpdate="true" globalOnly="true" />
<h:panelGrid columns="1" id="detallePersona" >
<p:panelGrid columns="1" style="width:600px">
<f:facet name="header">
<h:outputText value="#{msg_armas.lbl_datosevaluado}" />
</f:facet>
<h:panelGrid columns="4">
<p:outputLabel for="fidentificacion" value="#{msg_armas.lbl_noDocumento}: *" style="width:150px;display:block" />
<p:inputText id="fidentificacion" value="#{evaluacionController.personafiltro.identification}" maxlength="30" disabled="true" style="width: 270px;" onkeyup="Maia.forceupper(event, this);"/>
</h:panelGrid>
<h:panelGrid columns="2">
<p:outputLabel for="fnombre" value="#{msg_armas.lbl_nombrerazonsocial}: *" style="width:150px;display:block" />
<p:inputText id="fnombre" value="#{evaluacionController.personafiltro.name}" maxlength="50" disabled="true" style="width: 300px;" onkeyup="Maia.forceupper(event, this);"/>
<p:outputLabel for="ftipo" value="#{msg_armas.lbl_tipoPersona}: *" style="width:135px;display:block" />
<p:inputText id="ftipo" value="#{evaluacionController.lTipoPersona.description}" disabled="true" style="width: 300px;"/>
<p:outputLabel for="esGuardia" value="Guardia:" style="width:150px;display:block"/>
<p:selectBooleanCheckbox id="esGuardia" value="#{evaluacionController.isGuardia}">
<p:ajax event="change" update="detallePersona" process="@this "/>
</p:selectBooleanCheckbox>
</h:panelGrid>
</p:panelGrid >
<p:panelGrid columns="1" style="width:600px" id="pnlDatosEmpSeg" rendered="#{evaluacionController.isGuardia}">
<f:facet name="header">
<h:outputText value="#{msg_armas.lbl_datosempresaseg}" />
</f:facet>
<h:panelGrid columns="4">
<p:outputLabel for="fidentificacionempresa" value="#{msg_armas.lbl_noDocumento}: *" style="width:150px;display:block" />
<p:inputText id="fidentificacionempresa" value="#{evaluacionController.empresa.identification}" maxlength="30" disabled="true" style="width: 270px;" onkeyup="Maia.forceupper(event, this);"/>
<p:commandButton id="cargaremoresa" icon="ui-icon-link" actionListener="#{evaluacionController.openPersonLov()}" process="@this">
<p:ajax event="dialogReturn" listener="#{evaluacionController.onRetrunPersonLovEmpresa}" update=":formCarga:detallePersona"/>
</p:commandButton>
</h:panelGrid>
<h:panelGrid columns="2">
<p:outputLabel for="fnombreempresa" value="#{msg_armas.lbl_compania}:*" style="width:150px;display:block" />
<p:inputText id="fnombreempresa" value="#{evaluacionController.empresa.name}" maxlength="50" disabled="true" style="width: 300px;" onkeyup="Maia.forceupper(event, this);"/>
</h:panelGrid>
</p:panelGrid>
</h:panelGrid>
<p:panelGrid columns="1" style="width:600px">
<f:facet name="header">
<h:outputText value="#{msg_armas.hfld_datosgenerales}" />
</f:facet>
<h:panelGrid id="pEditCarga" columns="2" bodyrows="1">
<!-- <h:panelGrid columns="2" bodyrows="1"> -->
<p:outputLabel for="ffecha" value="#{msg_armas.lbl_fechadeevaluacion}:" style="width:164px;display:block" />
<h:panelGrid columns="4">
<p:calendar id="ffecha" value="#{evaluacionController.fecha}" maxlength="30" pattern="dd-MM-yyyy" disabled="false" required="true" style="width: 125px;" onkeyup="Maia.forceupper(event, this);">
<p:ajax event="dateSelect" update="ffecha" listener="#{evaluacionController.validarfecha(evaluacionController.fecha)}" process="@this"/>
</p:calendar>
<p:outputLabel value="#{msg_armas.lbl_resultado}:" required="true"/>
<p:selectBooleanCheckbox value="#{evaluacionController.aprobado}"/>
<p:outputLabel value="#{msg_armas.lbl_aprobado}" required="true"/>
</h:panelGrid>
<p:outputLabel value="#{msg_armas.lbl_informeevaluacion}: *" />
<h:panelGrid>
<h:outputText value="#{msg_armas['msg_tamano_archivo_requisitos_pdf']}" style="color:blue;font-weight: bold;"/>
<p:fileUpload
fileUploadListener="#{evaluacionController.upload}"
multiple="false"
update=":formTable:data-content :formTable:controls :formTable:datosEvaluacion txtnombrefile"
sizeLimit="#{msg_armas.lbl_archivodosmegas}" allowTypes="/(\.|\/)(pdf)$/"
uploadLabel="#{msg_armas.lbl_subir}" cancelLabel="#{msg_armas.lbl_cancelar}" label="#{msg_armas.lbl_seleccionar}"
required="true"
invalidFileMessage="#{msg_armas.msg_error_tipoarchivoinvalido}"/>
<h:outputText id="txtnombrefile" value="#{evaluacionController.nombreArchivo != null ? 'Realizada':'Pendiente'}" />
</h:panelGrid>
<h:panelGrid id="blank" rendered="#{evaluacionController.subio}"/>
<p:outputLabel id="msgsubio" value="Archivo Cargado" rendered="#{evaluacionController.subio}"/>
<p:outputLabel for="centromedico" value="#{msg_armas.lbl_centromedico}:"/>
<h:panelGrid columns="1">
<p:selectOneMenu id="centromedico" var="p" value="#{evaluacionController.centro}" required="true" style="width:340px" >
<f:selectItem itemLabel="" itemValue="#{null}" />
<p:ajax listener="#{evaluacionController.cargarDeposito()}" event="change" update=":formCarga:valordeposito :formCarga:papeleta :formCarga:ffechadep" process="@this centromedico"/>
<f:selectItems value="#{evaluacionController.lcentro}" var="id" itemLabel="#{id.description}" itemValue="#{id.pk.catalog}" />
</p:selectOneMenu>
</h:panelGrid>
<p:outputLabel for="ffechadep" value="#{msg_armas.lbl_fechaDeDeposito}:" style="width:136px;display:block" />
<h:panelGrid columns="3">
<p:calendar id="ffechadep" value="#{evaluacionController.fechadeposito}" maxlength="30" pattern="dd-MM-yyyy"
disabled="#{evaluacionController.centroMedico}" required="true" style="width: 125px;" onkeyup="Maia.forceupper(event, this);">
<p:ajax event="dateSelect" update="ffecha" listener="#{evaluacionController.validarfecha(evaluacionController.fechadeposito)}" process="@this"/>
</p:calendar>
<p:outputLabel for="papeleta" value="#{msg_armas.lbl_numeroDeDeposito}"/>
<p:inputText id="papeleta" value="#{evaluacionController.record.nopapeleta}" required="true" disabled="#{evaluacionController.centroMedico}"/>
</h:panelGrid>
<p:outputLabel for="valordeposito" value="#{msg_armas.lbl_valorDeDeposito}" />
<h:panelGrid columns="3">
<p:inputText id="valordeposito" value="#{evaluacionController.centromed.legalcode}" disabled="true"/>
<p:outputLabel for="est" value="#{msg_armas.lbl_test}:" style="width:50px;display:block" />
<p:inputText id="est" value="#{msg_armas.lbl_psicologico}" disabled="true"/>
</h:panelGrid>
<!-- </h:panelGrid> -->
<!-- <h:panelGroup></h:panelGroup> -->
<p:outputLabel for="tipodocumento" value="#{msg_armas.lbl_tipodocumentoPsicologo}:" style="width:136px;display:block;"/>
<h:panelGrid columns="2">
<p:selectOneMenu id="tipodocumento" value="#{evaluacionController.record.tipdocpsicologo}"
var="p" style="width:215px" panelStyle="width:230px" required="true"
rendered="true">
<f:selectItem itemLabel="" itemValue="" />
<f:selectItems value="#{evaluacionController.tipoDocumentoLst}" var="vmod"
itemLabel="#{vmod.description}" itemValue="#{vmod.pk.catalog}" />
<p:ajax event="change" process="@this" listener="#{evaluacionController.onChangeTipoDocumento}" update="psico, numerodocumento"/>
</p:selectOneMenu>
<p:message for="tipodocumento" />
</h:panelGrid>
<p:outputLabel for="numerodocumento" value="#{msg_armas.lbl_noDocumentoPsicologo}:" style="width:136px;display:block;"/>
<h:panelGrid columns="3">
<p:inputText id="numerodocumento" value="#{evaluacionController.record.numdocpsicologo}" maxlength="15"
style="width: 230px;" onkeyup="Maia.forceupper(event, this);" required="true" >
</p:inputText>
<p:commandButton value="#{msg_armas.lbl_verificar}" process="@this, numerodocumento, tipodocumento"
action="#{evaluacionController.validarPsicologoResponsable}" update="psico"/>
<p:message for="numerodocumento" />
</h:panelGrid>
<p:outputLabel for="psico" value="#{msg_armas.lbl_psicologo}:" style="width:136px;display:block;"/>
<h:panelGrid columns="2" >
<p:inputText id="psico" value="#{evaluacionController.record.psicologoresponsable}" onkeyup="Maia.forceupper(event, this);" style="width:350px" required="true" maxlength="60" disabled="#{!evaluacionController.isPasaporte}"/>
</h:panelGrid>
<p:outputLabel value="#{msg_armas.lbl_observacion}:" style="width:160px;display:block;"/>
<h:panelGrid columns="2" >
<p:inputTextarea value="#{evaluacionController.record.observacion}" onkeyup="Maia.forceupper(event, this);" autoResize="false" maxlength="250" style="width:350px" />
</h:panelGrid>
</h:panelGrid>
</p:panelGrid>
<h:panelGrid columns="2">
<p:commandButton value="#{msg_general.btn_update}" validateClient="true" process="@this, :formCarga" update=":formCarga :formTable:data-content"
action="#{evaluacionController.actualizar()}"
icon="ui-icon-disk" oncomplete="if(args.validationFailed){return false;} PF('dialog').hide()" />
<p:commandButton value="#{msg_general.btn_cancell}" oncomplete="PF('dialog').hide()" icon="ui-icon-trash" action="#{evaluacionController.limpiar()}" process="@this" />
</h:panelGrid>
</h:panelGroup>
</h:form>
</p:dialog>
</ui:define>
</ui:composition>