Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
horario
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Juan Guevara Mayta
horario
Commits
641f7a73
Commit
641f7a73
authored
Jan 14, 2020
by
sistem26user
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
se corrige registro de datos de personales nuevo
parent
99acea16
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
221 additions
and
41 deletions
+221
-41
ServletDocente.java
src/java/pe/siso/horario/Servlets/ServletDocente.java
+166
-27
bus_plana.jsp
web/vista/bus_plana.jsp
+1
-9
datos_docente.jsp
web/vista/datos_docente.jsp
+54
-5
No files found.
src/java/pe/siso/horario/Servlets/ServletDocente.java
View file @
641f7a73
...
@@ -1965,7 +1965,7 @@ public class ServletDocente extends HttpServlet {
...
@@ -1965,7 +1965,7 @@ public class ServletDocente extends HttpServlet {
int
codDepartamento
=
0
;
int
codDepartamento
=
0
;
int
codProvincia
=
0
;
int
codProvincia
=
0
;
int
codDistrito
=
0
;
int
codDistrito
=
0
;
int
numHijos
=
0
;
if
(
docente
.
getTelefono
()
==
null
)
{
if
(
docente
.
getTelefono
()
==
null
)
{
telefono
=
""
;
telefono
=
""
;
}
else
{
}
else
{
...
@@ -1996,32 +1996,132 @@ public class ServletDocente extends HttpServlet {
...
@@ -1996,32 +1996,132 @@ public class ServletDocente extends HttpServlet {
direccion
=
docente
.
getDireccion
();
direccion
=
docente
.
getDireccion
();
}
}
pw
.
println
(
"<center>"
// pw.println("<center>"
+
" <table width='400' border='0'>"
// + " <table width='400' border='0'>"
// + " <tr>"
// + " <td height='15' colspan='3'> </td>"
// + " </tr>"
// + " <tr>"
// + " <td colspan='3' align='center'> <b>DOCENTE: </b> " + nomDocente + " </td>"
// + " </tr>"
// + " <tr>"
// + " <td height='20' colspan='3'> </td>"
// + " </tr>"
// + " <tr>"
// + " <td>Teléfono <font color='red'>*</font></td>"
// + " <td width='5'></td>"
// + " <td><input type='text' class='form-control validate[required ,custom[phone]]' id='txt_new_tel' value='" + telefono + "'/></td><!--- maxSize[15], minSize[7]-->"
// + " </tr>"
// + " <tr>"
// + " <td height='15' colspan='3'> </td>"
// + " </tr>"
// + " <tr>"
// + " <td>Celular <font color='red'>*</font></td>"
// + " <td width='5'></td>"
// + " <td><input type='text' class='form-control validate[required ,custom[onlyCelular]]' id='txt_new_celular' value='" + celular + "'/></td><!--- maxSize[15], minSize[7]-->"
// + " </tr>"
// + " <tr>"
// + " <td colspan='3' height='15'></td>"
// + " </tr>"
// + " <tr>"
// + " <td>Correo <font color='red'>*</font></td>"
// + " <td width='5'></td>"
// + " <td><input type='text' class='form-control validate[required,custom[email]]' id='txt_new_mail' value='" + correo + "' /></td>"
// + " </tr>"
// + " <tr>"
// + " <td colspan='3' height='15'></td>"
// + " </tr>"
// + " <tr>"
// + " <td>Departamento <font color='red'>*</font></td>"
// + " <td width='5'></td>");
// //combo departamento--------------
// pw.println("<td>"
// + " <span id='divDepartamento'>"
// + " <select class='form-control validate[required]' id='cmbDep' onChange='" + accion + "'>"
// + " <option value=''>[Seleccione]</option>");
// pw.println(" </select>"
// + " </span>"
// + " </td>"
// + " </tr>"
// + " <tr>"
// + " <td colspan='3' height='15'></td>"
// + " </tr>"
// + " <tr>"
// // combo provincia
//
// + " <td>Provincia <font color='red'>*</font></td>"
// + " <td width='5'></td>"
// + " <td>"
// + " <span id='divProvincia'>"
// + " <select class='form-control validate[required]' id='cmbProv' >"
// + " <option value=''>[Seleccione]</option>"
// + " </select>"
// + "</span>"
// + " </td>"
// + " </tr>"
// + " <tr>"
// + " <td colspan='3' height='15'></td>"
// + " </tr>"
// + " <tr>"
// //combo Distrito
// + " <td>Distrito <font color='red'>*</font></td>"
// + " <td width='5'></td>"
// + " <td>"
// + " <span id='divDistrito'>"
// + " <select class='form-control validate[required]' id='cmbDis' >"
// + " <option value=''>[Seleccionar]</option>"
// + " </select>"
// + "</span>"
// + " </td>"
// + " </tr>"
// + " <tr>"
// + " <td height='15' colspan='3'> </td>"
// + " </tr>"
// + " <tr>"
// + " <td>Dirección <font color='red'>*</font></td>"
// + " <td width='5'></td>"
// + " <td><input type='text' class='form-control validate[required]' id='txt_new_dir' value='" + direccion + "'/></td><!--- maxSize[15], minSize[7]-->"
// + " </tr>"
// + "</table>"
// + "</center>");
// NUEVO FORMULARIO PARA EL REGISTRO DE DATOS
pw
.
println
(
"<center>"
+
"<table width='400' border='0'>"
+
" <tr>"
+
" <tr>"
+
" <td height='15' colspan='3'
>
</td>"
+
" <td height='15' colspan='3'
>
</td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td
colspan='3' align='center'> <b>DOCENTE: </b>
"
+
nomDocente
+
" </td>"
+
" <td
colspan='3' align='center'><b>DOCENTE:</b>
"
+
nomDocente
+
" </td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td height='20' colspan='3'
>
</td>"
+
" <td height='20' colspan='3'
>
</td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td>Teléfono <font color='red'>*</font></td>"
+
" <td>Teléfono <font color='red'>*</font></td>"
+
" <td width='5'></td>"
+
" <td width='5'></td>"
+
" <td><input type='text' class='form-control validate[required ,custom[phone]
]' id='txt_new_tel' value='"
+
telefono
+
"'/></td><!--- maxSize[15], minSize[7]--
>"
+
" <td><input type='text' class='form-control validate[required ,custom[phone]
, maxSize[15], minSize[7]]' id='txt_new_tel' value='"
+
telefono
+
"'/></td
>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td height='15' colspan='3'
>
</td>"
+
" <td height='15' colspan='3'
>
</td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td>Celular <font color='red'>*</font></td>"
+
" <td>Celular <font color='red'>*</font></td>"
+
" <td width='5'></td>"
+
" <td width='5'></td>"
+
" <td><input type='text' class='form-control validate[required ,custom[onlyCelular]]' id='txt_new_celular' value='"
+
celular
+
"'/></td><!--- maxSize[15], minSize[7]-->"
+
" <td><input type='text' class='form-control validate[required ,custom[onlyCelular], maxSize[15], minSize[7]]' id='txt_new_celular' value='"
+
celular
+
"'/></td>"
+
" </tr>"
+
" <tr>"
+
" <td height='15' colspan='3' ></td>"
+
" </tr>"
+
" <tr>"
+
" <td>Num.Hijos <font color='red'>*</font></td>"
+
" <td width='5'></td>"
+
" <td><input type='number' min='0' max='15' class='form-control validate[required]' id='txt_new_numHijos' value='"
+
numHijos
+
"'/></td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td colspan='3' height='15'>
</td>
"
+
" <td colspan='3' height='15'>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td>Correo <font color='red'>*</font></td>"
+
" <td>Correo <font color='red'>*</font></td>"
...
@@ -2029,22 +2129,60 @@ public class ServletDocente extends HttpServlet {
...
@@ -2029,22 +2129,60 @@ public class ServletDocente extends HttpServlet {
+
" <td><input type='text' class='form-control validate[required,custom[email]]' id='txt_new_mail' value='"
+
correo
+
"' /></td>"
+
" <td><input type='text' class='form-control validate[required,custom[email]]' id='txt_new_mail' value='"
+
correo
+
"' /></td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td colspan='3' height='15'>
</td>
"
+
" <td colspan='3' height='15'>"
+
" </tr>"
+
" </tr>"
// AREA
+
" <tr>"
+
" <td>Area <font color='red'>*</font></td>"
+
" <td width='5'></td>"
+
" <td>"
+
" <span id='divAreaNuevoDatos'>"
+
" <select class='form-control' id='cmbDep' onChange='"
+
accion
+
"'>"
+
" <option value=''>[Seleccionar]</option>"
+
" </select>"
+
" </span>"
+
" </td>"
+
" </tr>"
+
" <tr>"
+
" <td colspan='3' height='15'>"
+
" </tr>"
// FIN AREA
// PLANA
+
" <tr>"
+
" <td>Plana Asiste<font color='red'>*</font></td>"
+
" <td width='5'></td>"
+
" <td>"
+
" <span id='divPlanaNuevoDatos'>"
+
" <select class='form-control' id='cbPlanaNewAsiste'>"
+
" <option>PRUEBA</option>"
+
" </select>"
+
" </span>"
+
" </td>"
+
" </tr>"
// FIN PLANA
+
" <tr>"
+
" <td colspan='3' height='15'>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td>Departamento <font color='red'>*</font></td>"
+
" <td>Departamento <font color='red'>*</font></td>"
+
" <td width='5'></td>"
);
+
" <td width='5'></td>"
);
//combo departamento--------------
//combo departamento--------------
pw
.
println
(
"<td>"
pw
.
println
(
"<td>"
+
" <span id='divDepartamento'>"
+
" <span id='divDepartamento'>"
+
" <select class='form-control validate[required]' id='cmbDep' onChange='"
+
accion
+
"'>"
+
" <select class='form-control' id='cmbDepartamento' onChange='"
+
accion
+
"'>"
+
" <option value=''>[Seleccione]</option>"
);
+
" <option value=''>[Seleccionar]</option>"
);
pw
.
println
(
" </select>"
pw
.
println
(
" </select>"
+
"
</span>"
+
" </span>"
+
"
</td>"
+
"</td>"
+
" </tr>"
+
" </tr>
"
+
" <tr>"
+
" <tr>"
+
" <td colspan='3' height='15'>
</td>
"
+
" <td colspan='3' height='15'>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
// combo provincia
// combo provincia
...
@@ -2053,14 +2191,14 @@ public class ServletDocente extends HttpServlet {
...
@@ -2053,14 +2191,14 @@ public class ServletDocente extends HttpServlet {
+
" <td width='5'></td>"
+
" <td width='5'></td>"
+
" <td>"
+
" <td>"
+
" <span id='divProvincia'>"
+
" <span id='divProvincia'>"
+
" <select class='form-control
validate[required]' id='cmbProv
' >"
+
" <select class='form-control
' id='cmbprovincia
' >"
+
" <option value=''>[Seleccion
e
]</option>"
+
" <option value=''>[Seleccion
ar
]</option>"
+
" </select>"
+
" </select>"
+
"</span>"
+
"</span>
"
+
"
</td>"
+
"</td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td colspan='3' height='15'>
</td>
"
+
" <td colspan='3' height='15'>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
//combo Distrito
//combo Distrito
...
@@ -2068,19 +2206,19 @@ public class ServletDocente extends HttpServlet {
...
@@ -2068,19 +2206,19 @@ public class ServletDocente extends HttpServlet {
+
" <td width='5'></td>"
+
" <td width='5'></td>"
+
" <td>"
+
" <td>"
+
" <span id='divDistrito'>"
+
" <span id='divDistrito'>"
+
" <select class='form-control
validate[required]' id='cmbDis
' >"
+
" <select class='form-control
' id='cmbDistrito
' >"
+
" <option value=''>[Seleccionar]</option>"
+
" <option value=''>[Seleccionar]</option>"
+
" </select>"
+
" </select>"
+
"</span>"
+
"
</span>"
+
"
</td>"
+
"</td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td height='
15' colspan='3'>
</td>"
+
" <td height='
20' colspan='3' >
</td>"
+
" </tr>"
+
" </tr>"
+
" <tr>"
+
" <tr>"
+
" <td>Dirección <font color='red'>*</font></td>"
+
" <td>Dirección <font color='red'>*</font></td>"
+
" <td width='5'></td>"
+
" <td width='5'></td>"
+
" <td><input type='text' class='form-control validate[required]' id='txt_new_dir' value='"
+
direccion
+
"'/></td>
<!--- maxSize[15], minSize[7]-->
"
+
" <td><input type='text' class='form-control validate[required]' id='txt_new_dir' value='"
+
direccion
+
"'/></td>"
+
" </tr>"
+
" </tr>"
+
"</table>"
+
"</table>"
+
"</center>"
);
+
"</center>"
);
...
@@ -2104,6 +2242,7 @@ public class ServletDocente extends HttpServlet {
...
@@ -2104,6 +2242,7 @@ public class ServletDocente extends HttpServlet {
int
codDistrito
=
Integer
.
parseInt
(
request
.
getParameter
(
"codDistrito"
));
int
codDistrito
=
Integer
.
parseInt
(
request
.
getParameter
(
"codDistrito"
));
int
numHijos
=
Integer
.
parseInt
(
request
.
getParameter
(
"numHijos"
));
int
numHijos
=
Integer
.
parseInt
(
request
.
getParameter
(
"numHijos"
));
int
codArea
=
Integer
.
parseInt
(
request
.
getParameter
(
"codArea"
));
int
codArea
=
Integer
.
parseInt
(
request
.
getParameter
(
"codArea"
));
int
codPlana
=
Integer
.
parseInt
(
request
.
getParameter
(
"codPlana"
));
int
codPlana
=
Integer
.
parseInt
(
request
.
getParameter
(
"codPlana"
));
int
codPeriodo
=
Integer
.
parseInt
(
request
.
getParameter
(
"codPeriodo"
));
int
codPeriodo
=
Integer
.
parseInt
(
request
.
getParameter
(
"codPeriodo"
));
...
...
web/vista/bus_plana.jsp
View file @
641f7a73
...
@@ -640,15 +640,7 @@
...
@@ -640,15 +640,7 @@
cargando
();
cargando
();
},
success
:
function
(
resultado
){
},
success
:
function
(
resultado
){
close_carga
();
close_carga
();
$
(
'#divListadoPlana'
).
html
(
resultado
);
$
(
'#divListadoPlana'
).
html
(
resultado
);
name
=
$
(
"#lblUsuario"
).
text
();
if
(
name
===
"6"
){
$
(
"#divListadoPlana #btnAdPlana"
).
hide
();
$
(
"#divListadoPlana #btnEdit"
).
hide
();
$
(
"#divListadoPlana #validarEstadoPlanaBusqueda"
).
hide
();
$
(
"#divListadoPlana #validarEstadoPlanaBusqueda2"
).
hide
();
}
},
complete
:
function
(){
},
complete
:
function
(){
$
(
"#divListadoPlana"
).
fadeIn
();
$
(
"#divListadoPlana"
).
fadeIn
();
}
}
...
...
web/vista/datos_docente.jsp
View file @
641f7a73
...
@@ -671,18 +671,17 @@
...
@@ -671,18 +671,17 @@
}
}
function
cargarPlanaAsisteEdit
(
codDocente
){
function
cargarPlanaAsisteEdit
(
codDocente
){
let
codigoDocente
=
codDocente
let
codigoDocente
=
codDocente
console
.
log
(
"codigoDocente-->"
)
console
.
log
(
codDocente
)
var
nombre
=
"cmbPlanaAsisteEdit"
;
var
nombre
=
"cmbPlanaAsisteEdit"
;
// var accion = "limpiar2();";
var
periodo
=
"<%=periodo != null ? periodo.getCodigoPeriodo() : ""%>"
;
var
periodo
=
"<%=periodo != null ? periodo.getCodigoPeriodo() : ""%>"
;
var
codArea
=
$
(
"#cmbAreaEditarDatos"
).
val
()
var
codArea
=
$
(
"#cmbAreaEditarDatos"
).
val
()
$
.
ajax
({
$
.
ajax
({
type
:
'POST'
,
type
:
'POST'
,
url
:
'../ServletPlana?Accion=listarPlanaAsiste'
,
url
:
'../ServletPlana?Accion=listarPlanaAsiste'
,
data
:
'nombre='
+
nombre
+
'&codDocente='
+
codigoDocente
+
'&codper='
+
periodo
+
'&codArea='
+
codArea
,
data
:
'nombre='
+
nombre
+
'&codDocente='
+
codigoDocente
+
'&codper='
+
periodo
+
'&codArea='
+
codArea
,
success
:
function
(
resultado
)
{
success
:
function
(
resultado
)
{
console
.
log
(
resultado
)
$
(
'#divPlanaEditarDatos'
).
html
(
resultado
);
$
(
'#divPlanaEditarDatos'
).
html
(
resultado
);
}
}
});
});
...
@@ -945,6 +944,7 @@
...
@@ -945,6 +944,7 @@
function
armarRegistro
(
codDocente
,
nomDocente
){
function
armarRegistro
(
codDocente
,
nomDocente
){
var
accion
=
"cargarDepartamento("
+
codDocente
+
")"
;
var
accion
=
"cargarDepartamento("
+
codDocente
+
")"
;
$
.
ajax
({
$
.
ajax
({
type
:
'POST'
,
type
:
'POST'
,
...
@@ -959,10 +959,55 @@
...
@@ -959,10 +959,55 @@
alerta4
(
codDocente
);
alerta4
(
codDocente
);
//ilumina();
//ilumina();
cargarDepartamento
(
codDocente
);
cargarDepartamento
(
codDocente
);
cargarArea
();
}
}
});
});
}
}
function
cargarArea
()
{
$
.
ajax
({
type
:
'POST'
,
url
:
'../ServletArea?Accion=cargarAreaJson'
,
data
:
null
,
datatype
:
'application/json'
,
beforeSend
:
function
()
{
},
success
:
function
(
resultado
)
{
var
datos
=
resultado
;
var
cb
=
"<select class=
\"
form-control validate[required]
\"
name=
\"
cbArea
\"
onchange=
\"
limpiar();cargarPlanaArea();
\"
id=
\"
cbArea
\"
>"
;
cb
+=
"<option value=
\"\"
>[Seleccione]</option>"
;
// cb += "
<
option
value
=
\
"0
\"
>SIN ÁREA</option>"
;
for
(
var
i
=
0
;
i
<
datos
.
length
;
i
++
)
{
cb
+=
"<option value=
\"
"
+
datos
[
i
].
codigoArea
+
"
\"
>"
+
datos
[
i
].
nombreArea
+
"</option>"
;
}
cb
+=
"</select>"
;
$
(
"#divAreaNuevoDatos"
).
html
(
cb
);
},
complete
:
function
()
{
}
});
}
function
cargarPlanaArea
(){
let
name
=
''
var
codArea
=
$
(
"#cbArea"
).
val
();
var
accion
=
""
;
var
nombre
=
"cbPlanaNewAsiste"
;
$
.
ajax
({
type
:
'POST'
,
url
:
'../ServletPlana?Accion=cargarPlanaEditar'
,
data
:
'codArea='
+
codArea
+
'&accion='
+
accion
+
'&nombre='
+
nombre
,
beforeSend
:
function
()
{
cargando
();
},
success
:
function
(
resultado
){
close_carga
();
$
(
'#divPlanaNuevoDatos'
).
html
(
resultado
);
},
complete
:
function
(){
$
(
"#divPlanaNuevoDatos"
).
fadeIn
();
}
});
}
function
alerta4
(
codDocente
){
function
alerta4
(
codDocente
){
$
(
"#dialog-edit"
).
removeClass
(
'hide'
).
dialog
({
$
(
"#dialog-edit"
).
removeClass
(
'hide'
).
dialog
({
resizable
:
false
,
resizable
:
false
,
...
@@ -1058,11 +1103,15 @@
...
@@ -1058,11 +1103,15 @@
var
codDepartamento
=
$
(
"#cmbDepartamento"
).
val
();
var
codDepartamento
=
$
(
"#cmbDepartamento"
).
val
();
var
codProvincia
=
$
(
"#cmbprovincia"
).
val
();
var
codProvincia
=
$
(
"#cmbprovincia"
).
val
();
var
codDistrito
=
$
(
"#cmbDistrito"
).
val
();
var
codDistrito
=
$
(
"#cmbDistrito"
).
val
();
var
numHijos
=
$
(
"#txt_new_numHijos"
).
val
()
var
area
=
$
(
"#cbArea"
).
val
();
var
plana
=
$
(
"#cbPlanaNewAsiste"
).
val
()
var
codPeriodo
=
"<%=periodo != null ? periodo.getCodigoPeriodo() : ""%>"
;
$
.
ajax
({
$
.
ajax
({
type
:
'POST'
,
type
:
'POST'
,
url
:
'../ServletDocente?Accion=registraDatosDocente'
,
url
:
'../ServletDocente?Accion=registraDatosDocente'
,
data
:
'codDocente='
+
codDocente
+
'&telefono='
+
telefono
+
'&mail='
+
mail
+
'&zona='
+
zona
+
'&codDepartamento='
+
codDepartamento
+
'&codProvincia='
+
codProvincia
+
'&codDistrito='
+
codDistrito
+
'&cel='
+
cel
+
'&direccion='
+
direccion
,
data
:
'codDocente='
+
codDocente
+
'&telefono='
+
telefono
+
'&mail='
+
mail
+
'&zona='
+
zona
+
'&codDepartamento='
+
codDepartamento
+
'&codProvincia='
+
codProvincia
+
'&codDistrito='
+
codDistrito
+
'&cel='
+
cel
+
'&direccion='
+
direccion
+
'&numHijos='
+
numHijos
+
'&codArea='
+
area
+
'&codPlana='
+
plana
+
'&codPeriodo='
+
codPeriodo
,
beforeSend
:
function
()
{
beforeSend
:
function
()
{
cargando
();
cargando
();
},
success
:
function
(
resultado
){
},
success
:
function
(
resultado
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment