admin caso especial funiones imprimir
This commit is contained in:
+15
-35
@@ -78,8 +78,7 @@
|
||||
</b-button>
|
||||
</b-field>
|
||||
|
||||
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
|
||||
</b-loading>
|
||||
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -90,13 +89,17 @@ import axios from 'axios'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
alumno: { Usuario: {}, Carrera: {}, Status: {} },
|
||||
idCasoEspecial: null,
|
||||
isLoading: false,
|
||||
token: {},
|
||||
}
|
||||
},
|
||||
props: {
|
||||
admin: { type: Object, required: true },
|
||||
imprimirMensaje: { type: Function, required: true },
|
||||
imprimirWarning: { type: Function, required: true },
|
||||
imprimirError: { type: Function, required: true },
|
||||
},
|
||||
methods: {
|
||||
fecha(date) {
|
||||
if (date) {
|
||||
@@ -112,7 +115,7 @@ export default {
|
||||
return axios
|
||||
.get(
|
||||
`${process.env.api}/caso_especial?idCasoEspecial=${this.idCasoEspecial}`,
|
||||
this.token
|
||||
this.admin.token
|
||||
)
|
||||
.then((res) => {
|
||||
this.alumno = res.data
|
||||
@@ -128,7 +131,11 @@ export default {
|
||||
|
||||
this.isLoading = true
|
||||
axios
|
||||
.put(`${process.env.api}/caso_especial/liberacion`, data, this.token)
|
||||
.put(
|
||||
`${process.env.api}/caso_especial/liberacion`,
|
||||
data,
|
||||
this.admin.token
|
||||
)
|
||||
.then((res) => {
|
||||
localStorage.removeItem('idCasoEspecial')
|
||||
this.$buefy.dialog.alert('El servicio ha sido liberado.')
|
||||
@@ -140,37 +147,10 @@ export default {
|
||||
this.error(err.response.data)
|
||||
})
|
||||
},
|
||||
imprimirError(err) {
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: err.message,
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: 'alert-circle',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
})
|
||||
if (err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = localStorage.getItem('idUsuario')
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
this.idCasoEspecial = localStorage.getItem('idCasoEspecial')
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
if (this.admin.idTipoUsuario === 1 && this.idCasoEspecial)
|
||||
this.obtenerCasoEspecial()
|
||||
this.idCasoEspecial = localStorage.getItem('idCasoEspecial')
|
||||
if (this.admin.idTipoUsuario === 1) this.obtenerCasoEspecial()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
+18
-49
@@ -13,8 +13,7 @@
|
||||
:placeholder="viejo.telefono"
|
||||
maxlength="10"
|
||||
v-model="nuevo.telefono"
|
||||
>
|
||||
</b-input>
|
||||
/>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Dirección">
|
||||
@@ -22,8 +21,7 @@
|
||||
type="text"
|
||||
:placeholder="viejo.direccion"
|
||||
v-model="nuevo.direccion"
|
||||
>
|
||||
</b-input>
|
||||
/>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Fecha de inicio">
|
||||
@@ -32,8 +30,7 @@
|
||||
icon="calendar-today"
|
||||
:min-date="minDate1"
|
||||
v-model="nuevo.fechaInicio"
|
||||
>
|
||||
</b-datepicker>
|
||||
/>
|
||||
</b-field>
|
||||
|
||||
<transition name="fade">
|
||||
@@ -43,8 +40,7 @@
|
||||
icon="calendar-today"
|
||||
:min-date="minDate2"
|
||||
v-model="nuevo.fechaFin"
|
||||
>
|
||||
</b-datepicker>
|
||||
/>
|
||||
</b-field>
|
||||
</transition>
|
||||
|
||||
@@ -53,8 +49,7 @@
|
||||
icon="calendar-today"
|
||||
:placeholder="fecha(viejo.fechaNacimiento)"
|
||||
v-model="nuevo.fechaNacimiento"
|
||||
>
|
||||
</b-datepicker>
|
||||
/>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Motivo" v-if="viejo.motivo">
|
||||
@@ -69,8 +64,7 @@
|
||||
type="text"
|
||||
v-model="nuevo.dependencia"
|
||||
:placeholder="viejo.dependencia"
|
||||
>
|
||||
</b-input>
|
||||
/>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Institución" v-if="viejo.institucion">
|
||||
@@ -78,8 +72,7 @@
|
||||
type="text"
|
||||
:placeholder="viejo.institucion"
|
||||
v-model="nuevo.institucion"
|
||||
>
|
||||
</b-input>
|
||||
/>
|
||||
</b-field>
|
||||
|
||||
<b-button
|
||||
@@ -90,8 +83,7 @@
|
||||
Actualizar Datos
|
||||
</b-button>
|
||||
|
||||
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
|
||||
</b-loading>
|
||||
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -103,15 +95,19 @@ import validator from 'validator'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
idCasoEspecial: null,
|
||||
minDate1: new Date('2020-01-01'),
|
||||
viejo: {},
|
||||
nuevo: {},
|
||||
isLoading: false,
|
||||
token: {},
|
||||
}
|
||||
},
|
||||
props: {
|
||||
admin: { type: Object, required: true },
|
||||
imprimirMensaje: { type: Function, required: true },
|
||||
imprimirWarning: { type: Function, required: true },
|
||||
imprimirError: { type: Function, required: true },
|
||||
},
|
||||
methods: {
|
||||
fecha(date) {
|
||||
if (date) {
|
||||
@@ -173,7 +169,7 @@ export default {
|
||||
data.fechaNacimiento = moment(this.nuevo.fechaNacimiento)
|
||||
|
||||
axios
|
||||
.put(`${process.env.api}/caso_especial/update`, data, this.token)
|
||||
.put(`${process.env.api}/caso_especial/update`, data, this.admin.token)
|
||||
.then((res) => {
|
||||
this.isLoading = false
|
||||
this.$buefy.dialog.alert('Los datos han sido actualizados')
|
||||
@@ -189,7 +185,7 @@ export default {
|
||||
return axios
|
||||
.get(
|
||||
`${process.env.api}/caso_especial/?idCasoEspecial=${this.idCasoEspecial}`,
|
||||
this.token
|
||||
this.admin.token
|
||||
)
|
||||
.then((res) => {
|
||||
this.viejo = res.data
|
||||
@@ -200,32 +196,6 @@ export default {
|
||||
this.error(err.response.data.message)
|
||||
})
|
||||
},
|
||||
imprimirError(err) {
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: err.message,
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: 'alert-circle',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
})
|
||||
if (err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = localStorage.getItem('idUsuario')
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
this.idCasoEspecial = localStorage.getItem('idCasoEspecial')
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
minDate2() {
|
||||
@@ -234,9 +204,8 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
if (this.admin.idTipoUsuario === 1 && this.idCasoEspecial)
|
||||
this.obtenerCasoEspecial()
|
||||
this.idCasoEspecial = localStorage.getItem('idCasoEspecial')
|
||||
if (this.admin.idTipoUsuario === 1) this.obtenerCasoEspecial()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -113,7 +113,6 @@ import moment from 'moment'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
status: [],
|
||||
data: [],
|
||||
page: 1,
|
||||
@@ -125,9 +124,14 @@ export default {
|
||||
},
|
||||
busquedaAnterior: {},
|
||||
servicioSeleccionado: {},
|
||||
token: {},
|
||||
}
|
||||
},
|
||||
props: {
|
||||
admin: { type: Object, required: true },
|
||||
imprimirMensaje: { type: Function, required: true },
|
||||
imprimirWarning: { type: Function, required: true },
|
||||
imprimirError: { type: Function, required: true },
|
||||
},
|
||||
methods: {
|
||||
fecha(date) {
|
||||
if (date) {
|
||||
@@ -174,7 +178,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/caso_especial/servicios_especiales?&pagina=${this.page}${data}`,
|
||||
this.token
|
||||
this.admin.token
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data.serviciosEspeciales
|
||||
@@ -188,7 +192,7 @@ export default {
|
||||
},
|
||||
obtenerCatalogoStatus() {
|
||||
axios
|
||||
.get(`${process.env.api}/status`, this.token)
|
||||
.get(`${process.env.api}/status`, this.admin.token)
|
||||
.then((res) => {
|
||||
this.status = res.data
|
||||
})
|
||||
@@ -196,31 +200,6 @@ export default {
|
||||
this.imprimirError(err.response.data)
|
||||
})
|
||||
},
|
||||
imprimirError(err) {
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: err.message,
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: 'alert-circle',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
})
|
||||
if (err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = localStorage.getItem('idUsuario')
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
servicioSeleccionado() {
|
||||
@@ -232,7 +211,6 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
if (this.admin.idTipoUsuario === 1) {
|
||||
this.obtenerCatalogoStatus()
|
||||
this.obtenerCasosEspeciales()
|
||||
|
||||
@@ -6,15 +6,23 @@
|
||||
:deleteFromLocalStorage="['idServicio', 'idStatus']"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<TituloServicio :status="alumno.Status.idStatus" />
|
||||
|
||||
<DatosPrograma :programa="alumno.Programa" />
|
||||
|
||||
<DatosPersonales :alumno="alumno" />
|
||||
|
||||
<div id="enlaces">
|
||||
<b-button class="boton is-info" @click="editar()" v-if="mostrarEditar()">
|
||||
Editar información
|
||||
</b-button>
|
||||
<br /><br />
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<TituloStatus :status="alumno.Status.idStatus" />
|
||||
|
||||
<div v-if="alumno.cartaAceptacion">
|
||||
<Documento
|
||||
:title="'Ver carta de aceptación'"
|
||||
@@ -24,6 +32,7 @@
|
||||
:status="alumno.Status.idStatus"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="alumno.cartaTermino" style="margin-top: 10px">
|
||||
<Documento
|
||||
:title="'Ver carta de término'"
|
||||
@@ -33,6 +42,7 @@
|
||||
:status="alumno.Status.idStatus"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="alumno.informeGlobal" style="margin-top: 10px">
|
||||
<Documento
|
||||
:title="'Ver informe global de actividades'"
|
||||
@@ -42,6 +52,7 @@
|
||||
:status="alumno.Status.idStatus"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<b-checkbox
|
||||
v-if="alumno.Programa.acatlan && alumno.Status.idStatus == 5"
|
||||
v-model="alumno.vistoBuenoAcatlan"
|
||||
@@ -50,13 +61,16 @@
|
||||
>
|
||||
Visto bueno Acatlán
|
||||
</b-checkbox>
|
||||
|
||||
<p v-if="alumno.idCuestionarioPrograma" class="my-4">
|
||||
<strong> Cuenta con cuestionario de programa resuelto. </strong>
|
||||
</p>
|
||||
|
||||
<p v-if="alumno.idCuestionarioAlumno" class="my-4">
|
||||
<strong> Cuenta con cuestionario de alumno resuelto. </strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="acciones" class="my-5">
|
||||
<b-button
|
||||
class="is-success"
|
||||
@@ -65,6 +79,7 @@
|
||||
>
|
||||
Confirmar
|
||||
</b-button>
|
||||
|
||||
<b-button
|
||||
class="is-success"
|
||||
@click="confirmarDialog(2)"
|
||||
@@ -72,6 +87,7 @@
|
||||
>
|
||||
Confirmar
|
||||
</b-button>
|
||||
|
||||
<b-button
|
||||
v-if="mostrarCancelar()"
|
||||
class="is-danger"
|
||||
@@ -79,14 +95,14 @@
|
||||
>
|
||||
Cancelar
|
||||
</b-button>
|
||||
<br /><br />
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<b-field label="Razón para cancelar: " v-if="enviarCancel">
|
||||
<b-input
|
||||
maxlength="500"
|
||||
type="textarea"
|
||||
v-model="mensajeCancel"
|
||||
></b-input>
|
||||
<b-input maxlength="500" type="textarea" v-model="mensajeCancel" />
|
||||
</b-field>
|
||||
|
||||
<b-button
|
||||
v-if="mensajeCancel && enviarCancel"
|
||||
class="is-danger"
|
||||
@@ -94,7 +110,9 @@
|
||||
>
|
||||
Cancelar servicio
|
||||
</b-button>
|
||||
|
||||
<b-button v-else-if="enviarCancel" disabled> Cancelar servicio </b-button>
|
||||
|
||||
<div>
|
||||
<BotonRegresar
|
||||
path="/admin"
|
||||
@@ -102,8 +120,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
|
||||
</b-loading>
|
||||
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FormEditar from '@/components/admin/casos_especiales/editar/formEditar'
|
||||
import FormEditar from '@/components/admin/casos_especiales/caso_especial/editar/formEditar'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -16,22 +16,13 @@
|
||||
|
||||
<script>
|
||||
import BotonRegresar from '@/components/botonRegresar'
|
||||
import DatosPersonalesEspecial from '@/components/admin/casos_especiales/casoEspecial'
|
||||
import DatosPersonalesEspecial from '@/components/admin/casos_especiales/caso_especial/casoEspecial'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
BotonRegresar,
|
||||
DatosPersonalesEspecial,
|
||||
},
|
||||
beforeCreate() {
|
||||
const idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
|
||||
if (idTipoUsuario === 2) this.$router.push('/responsable')
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
if (!localStorage.getItem('idCasoEspecial'))
|
||||
this.$router.push('/admin/casos_especiales')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
@@ -108,6 +99,8 @@ export default {
|
||||
if (this.admin.idTipoUsuario === 2) this.$router.push('/responsable')
|
||||
if (this.admin.idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (this.admin.idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
if (!localStorage.getItem('idCasoEspecial'))
|
||||
this.$router.push('/admin/casos_especiales')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -16,17 +16,6 @@ export default {
|
||||
components: {
|
||||
VistaServicio,
|
||||
},
|
||||
beforeCreate() {
|
||||
const idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
|
||||
if (idTipoUsuario === 2) this.$router.push('/responsable')
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
|
||||
if (!localStorage.getItem('idServicio')) {
|
||||
this.$router.push('/admin')
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
@@ -103,6 +92,7 @@ export default {
|
||||
if (this.admin.idTipoUsuario === 2) this.$router.push('/responsable')
|
||||
if (this.admin.idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (this.admin.idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
if (!localStorage.getItem('idServicio')) this.$router.push('/admin')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user