Sidebars - animaciones
This commit is contained in:
@@ -59,34 +59,58 @@
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.5s; }
|
||||
.btn-animated:hover::before { left: 100%; }
|
||||
.hide { display: none !important; }
|
||||
/* ========== ANIMACIONES PARA INPUTS TEXTO ========== */
|
||||
.form-control:not(.no-animation) { transition: all 0.3s ease; border: 2px solid #dee2e6; position: relative; }
|
||||
.form-control:not(.no-animation).shake { animation: shake 0.5s ease-in-out; }
|
||||
@keyframes shake {
|
||||
0%, 100% { transform: translateX(0); }
|
||||
25% { transform: translateX(-5px); }
|
||||
75% { transform: translateX(5px); }
|
||||
}
|
||||
/* Animación para los campos del formulario */
|
||||
.form-group-animated { opacity: 0; transform: translateY(20px); animation: slideUp 0.6s ease-out forwards; }
|
||||
.form-group-animated:nth-child(1) { animation-delay: 0.1s; }
|
||||
.form-group-animated:nth-child(2) { animation-delay: 0.2s; }
|
||||
.form-group-animated:nth-child(3) { animation-delay: 0.3s; }
|
||||
.form-group-animated:nth-child(4) { animation-delay: 0.4s; }
|
||||
.form-group-animated:nth-child(5) { animation-delay: 0.5s; }
|
||||
.form-group-animated:nth-child(6) { animation-delay: 0.6s; }
|
||||
.form-group-animated:nth-child(7) { animation-delay: 0.7s; }
|
||||
.form-group-animated:nth-child(8) { animation-delay: 0.8s; }
|
||||
.form-group-animated:nth-child(9) { animation-delay: 0.9s; }
|
||||
.form-group-animated:nth-child(10) { animation-delay: 1.0s; }
|
||||
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content">
|
||||
<h4 class="mb-4 animate__animated animate__fadeInDown title_glow">✏️ Editar Solicitud #<?= (int)$factura['id_solicitud'] ?></h4>
|
||||
<div class="card p-4 bg-white shadow-sm card-hover position-relative h-auto">
|
||||
<div class="card p-4 bg-white shadow-sm card-hover position-relative h-auto fade-in-up">
|
||||
<form id="solicitudForm" action="/IMPORTADORES/solicitud_importacion/actualizar" method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="id_solicitud" value="<?= (int)$factura['id_solicitud'] ?>">
|
||||
|
||||
<!-- Datos principales -->
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md-3 mb-3 form-group-animated">
|
||||
<label for="numero_factura" class="form-label">Número de Factura</label>
|
||||
<input id="numero_factura" name="numero_factura" type="text" class="form-control" required
|
||||
value="<?= htmlspecialchars($factura['numero_factura']) ?>">
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
|
||||
<div class="col-md-3 mb-3 form-group-animated">
|
||||
<label for="fecha_factura" class="form-label">Fecha de Factura</label>
|
||||
<input id="fecha_factura" name="fecha_factura" type="date" class="form-control" required
|
||||
value="<?= htmlspecialchars($factura['fecha_factura']) ?>">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<label for="proveedor_id" class="form-label">Proveedor</label>
|
||||
<select id="proveedor_id" name="proveedor_clave" class="form-select searchable">
|
||||
<option value="">Cargando proveedores...</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<label for="anexo22_apendice" class="form-label">Anexo 22 – Apéndice</label>
|
||||
<select id="anexo22_apendice" name="anexo22_apendice" class="form-select searchable" required>
|
||||
@@ -114,6 +138,7 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<label for="incoterm" class="form-label">INCOTERM</label>
|
||||
<select id="incoterm" name="incoterm" class="form-select searchable" required>
|
||||
@@ -125,6 +150,7 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<label for="pais_proveedor" class="form-label">País (Proveedor)</label>
|
||||
<select id="pais_proveedor" name="pais_proveedor" class="form-select searchable">
|
||||
@@ -136,6 +162,7 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<label for="tipo_moneda" class="form-label">Moneda</label>
|
||||
<select id="tipo_moneda" name="tipo_moneda" class="form-select searchable">
|
||||
@@ -150,11 +177,12 @@
|
||||
|
||||
<!-- Valor y Vinculación -->
|
||||
<div class="row">
|
||||
<div class="col-md-8 mb-3">
|
||||
<div class="col-md-8 mb-3 form-group-animated">
|
||||
<label for="valor_factura" class="form-label">Valor Factura</label>
|
||||
<input id="valor_factura" name="valor_factura" type="number" step="0.01" min="0" class="form-control valor-total" required
|
||||
value="<?= htmlspecialchars($factura['valor_factura']) ?>">
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 mb-3">
|
||||
<label for="vinculacion" class="form-label">Vinculación</label>
|
||||
<select id="vinculacion" name="vinculacion" class="form-select searchable">
|
||||
@@ -178,6 +206,7 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 mb-3">
|
||||
<label for="chofer_id" class="form-label">Chofer</label>
|
||||
<select id="chofer_id" name="chofer_id" class="form-select searchable" required>
|
||||
@@ -191,7 +220,8 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
|
||||
<div class="col-md-4 mb-3 form-group-animated">
|
||||
<label for="foto_solicitud" class="form-label">Foto de la Carga (PIPA)</label>
|
||||
<input id="foto_solicitud" name="foto_solicitud" type="file" class="form-control" accept="image/*">
|
||||
</div>
|
||||
@@ -199,9 +229,9 @@
|
||||
|
||||
<!-- Partidas Dinámicas -->
|
||||
<hr>
|
||||
<h5>📦 Partidas</h5>
|
||||
<h5 class="form-group-animated">📦 Partidas</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm" id="tabla-partidas">
|
||||
<table class="table table-sm form-group-animated" id="tabla-partidas">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Descripción</th>
|
||||
@@ -219,9 +249,9 @@
|
||||
<tbody>
|
||||
<?php if (!empty($partidas)): foreach($partidas as $i=>$p): ?>
|
||||
<tr>
|
||||
<td><input name="partidas[<?= $i ?>][descripcion]" class="form-control" value="<?= htmlspecialchars($p['descripcion']) ?>"></td>
|
||||
<td><input name="partidas[<?= $i ?>][cantidad_comercial]" type="number" step="0.0001" min="0" class="form-control" value="<?= htmlspecialchars($p['cantidad_comercial']) ?>"></td>
|
||||
<td><input name="partidas[<?= $i ?>][cantidad_tarifa]" type="number" step="0.0001" min="0" class="form-control" value="<?= htmlspecialchars($p['cantidad_tarifa']) ?>"></td>
|
||||
<td><input name="partidas[<?= $i ?>][descripcion]" class="form-control w-auto" value="<?= htmlspecialchars($p['descripcion']) ?>"></td>
|
||||
<td><input name="partidas[<?= $i ?>][cantidad_comercial]" type="number" step="0.0001" min="0" class="form-control w-auto" value="<?= htmlspecialchars($p['cantidad_comercial']) ?>"></td>
|
||||
<td><input name="partidas[<?= $i ?>][cantidad_tarifa]" type="number" step="0.0001" min="0" class="form-control w-auto" value="<?= htmlspecialchars($p['cantidad_tarifa']) ?>"></td>
|
||||
<td>
|
||||
<select name="partidas[<?= $i ?>][unidad_comercial_id]" class="form-select searchable">
|
||||
<option value="">-- Unidad --</option>
|
||||
@@ -232,8 +262,8 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td><input name="partidas[<?= $i ?>][valor_factura]" type="number" step="0.01" min="0" class="form-control valor-partida" value="<?= htmlspecialchars($p['valor_factura']) ?>"></td>
|
||||
<td><input name="partidas[<?= $i ?>][peso_bruto]" type="number" step="0.0001" min="0" class="form-control" value="<?= htmlspecialchars($p['peso_bruto']) ?>"></td>
|
||||
<td><input name="partidas[<?= $i ?>][valor_factura]" type="number" step="0.01" min="0" class="form-control valor-partida w-auto" value="<?= htmlspecialchars($p['valor_factura']) ?>"></td>
|
||||
<td><input name="partidas[<?= $i ?>][peso_bruto]" type="number" step="0.0001" min="0" class="form-control w-auto" value="<?= htmlspecialchars($p['peso_bruto']) ?>"></td>
|
||||
<td>
|
||||
<select name="partidas[<?= $i ?>][tasa_preferencial]" class="form-select searchable">
|
||||
<option value="">-- Selecciona --</option>
|
||||
@@ -242,15 +272,15 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="hide"><input name="partidas[<?= $i ?>][precio_unitario]" type="number" class="form-control" value="<?= htmlspecialchars($p['precio_unitario'] ?? '') ?>"></td>
|
||||
<td class="hide"><input name="partidas[<?= $i ?>][oma_factura]" class="form-control" value="<?= htmlspecialchars($p['oma_factura'] ?? '') ?>"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm remove-row">✖️</button></td>
|
||||
<td class="hide"><input name="partidas[<?= $i ?>][precio_unitario]" type="number" class="form-control w-auto" value="<?= htmlspecialchars($p['precio_unitario'] ?? '') ?>"></td>
|
||||
<td class="hide"><input name="partidas[<?= $i ?>][oma_factura]" class="form-control w-auto" value="<?= htmlspecialchars($p['oma_factura'] ?? '') ?>"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm remove-row mt-auto w-auto btn-animated">✖️</button></td>
|
||||
</tr>
|
||||
<?php endforeach; else: ?>
|
||||
<tr>
|
||||
<td><input name="partidas[0][descripcion]" class="form-control"></td>
|
||||
<td><input name="partidas[0][cantidad_comercial]" type="number" step="0.0001" class="form-control" min="0"></td>
|
||||
<td><input name="partidas[0][cantidad_tarifa]" type="number" step="0.0001" class="form-control" min="0"></td>
|
||||
<td><input name="partidas[0][descripcion]" class="form-control w-auto"></td>
|
||||
<td><input name="partidas[0][cantidad_comercial]" type="number" step="0.0001" class="form-control w-auto" min="0"></td>
|
||||
<td><input name="partidas[0][cantidad_tarifa]" type="number" step="0.0001" class="form-control w-auto" min="0"></td>
|
||||
<td>
|
||||
<select name="partidas[0][unidad_comercial_id]" class="form-select searchable">
|
||||
<option value="">-- Unidad --</option>
|
||||
@@ -259,8 +289,8 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td><input name="partidas[0][valor_factura]" type="number" step="0.01" class="form-control valor-partida" min="0"></td>
|
||||
<td><input name="partidas[0][peso_bruto]" type="number" step="0.0001" class="form-control" min="0"></td>
|
||||
<td><input name="partidas[0][valor_factura]" type="number" step="0.01" class="form-control valor-partida w-auto" min="0"></td>
|
||||
<td><input name="partidas[0][peso_bruto]" type="number" step="0.0001" class="form-control w-auto" min="0"></td>
|
||||
<td>
|
||||
<select name="partidas[0][tasa_preferencial]" class="form-select searchable">
|
||||
<option value="">-- Selecciona --</option>
|
||||
@@ -268,15 +298,17 @@
|
||||
<option>ALADI</option><option>COMERCIALIZADORA</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="hide"><input name="partidas[0][precio_unitario]" type="number" class="form-control"></td>
|
||||
<td class="hide"><input name="partidas[0][oma_factura]" class="form-control"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm remove-row">✖️</button></td>
|
||||
<td class="hide"><input name="partidas[0][precio_unitario]" type="number" class="form-control w-auto"></td>
|
||||
<td class="hide"><input name="partidas[0][oma_factura]" class="form-control w-auto"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm remove-row mt-auto w-auto btn-animated">✖️</button></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="btn btn-secondary btn-sm mb-3 mt-auto w-auto btn-animated" id="add-partida">➕ Agregar partida</button>
|
||||
<div class="form-group-animated">
|
||||
<button type="button" class="btn btn-secondary btn-sm mb-3 mt-auto w-auto btn-animated" id="add-partida">➕ Agregar partida</button>
|
||||
</div>
|
||||
|
||||
<!-- Activo -->
|
||||
<div class="form-check mb-4">
|
||||
@@ -284,8 +316,10 @@
|
||||
<label for="status" class="hide form-check-label">Activo</label>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-success mt-auto w-auto btn-animated">Actualizar</button>
|
||||
<a href="/IMPORTADORES/solicitud_importacion/lista" class="btn btn-secondary ms-2 mt-auto w-auto btn-animated">Cancelar</a>
|
||||
<div class="text-end mt-4 form-group-animated">
|
||||
<button type="submit" class="btn btn-success mt-auto w-auto btn-animated">Actualizar</button>
|
||||
<a href="/IMPORTADORES/solicitud_importacion/lista" class="btn btn-secondary ms-2 mt-auto w-auto btn-animated">Cancelar</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -359,9 +393,9 @@
|
||||
const row = document.createElement('tr');
|
||||
|
||||
row.innerHTML = `
|
||||
<td><input name="partidas[${idx}][descripcion]" class="form-control"></td>
|
||||
<td><input name="partidas[${idx}][cantidad_comercial]" type="number" step="0.0001" class="form-control"></td>
|
||||
<td><input name="partidas[${idx}][cantidad_tarifa]" type="number" step="0.0001" class="form-control"></td>
|
||||
<td><input name="partidas[${idx}][descripcion]" class="form-control w-auto"></td>
|
||||
<td><input name="partidas[${idx}][cantidad_comercial]" type="number" step="0.0001" class="form-control w-auto"></td>
|
||||
<td><input name="partidas[${idx}][cantidad_tarifa]" type="number" step="0.0001" class="form-control w-auto"></td>
|
||||
<td>
|
||||
<select name="partidas[${idx}][unidad_comercial_id]" class="form-select searchable">
|
||||
<option value="">-- Unidad --</option>
|
||||
@@ -370,8 +404,8 @@
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td><input name="partidas[${idx}][valor_factura]" type="number" step="0.01" class="form-control valor-partida"></td>
|
||||
<td><input name="partidas[${idx}][peso_bruto]" type="number" step="0.0001" class="form-control"></td>
|
||||
<td><input name="partidas[${idx}][valor_factura]" type="number" step="0.01" class="form-control valor-partida w-auto"></td>
|
||||
<td><input name="partidas[${idx}][peso_bruto]" type="number" step="0.0001" class="form-control w-auto"></td>
|
||||
<td>
|
||||
<select name="partidas[${idx}][tasa_preferencial]" class="form-select searchable">
|
||||
<option value="">-- Selecciona --</option>
|
||||
@@ -382,9 +416,9 @@
|
||||
<option>COMERCIALIZADORA</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="hide"><input name="partidas[${idx}][precio_unitario]" type="number" class="form-control"></td>
|
||||
<td class="hide"><input name="partidas[${idx}][oma_factura]" class="form-control"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm remove-row">✖️</button></td>
|
||||
<td class="hide"><input name="partidas[${idx}][precio_unitario]" type="number" class="form-control w-auto"></td>
|
||||
<td class="hide"><input name="partidas[${idx}][oma_factura]" class="form-control w-auto"></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm remove-row mt-auto w-auto btn-animated">✖️</button></td>
|
||||
`;
|
||||
|
||||
tbody.appendChild(row);
|
||||
@@ -579,15 +613,15 @@
|
||||
// Función para cargar choferes en el select
|
||||
function cargarChoferes(choferes) {
|
||||
const opciones = [{
|
||||
value: '',
|
||||
label: '-- Selecciona Chofer --',
|
||||
value: '',
|
||||
label: '-- Selecciona Chofer --',
|
||||
disabled: false
|
||||
}];
|
||||
|
||||
choferes.forEach(chofer => {
|
||||
opciones.push({
|
||||
value: chofer.id_chofer,
|
||||
label: chofer.nombre,
|
||||
value: chofer.id_chofer,
|
||||
label: chofer.nombre,
|
||||
disabled: false
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user