mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
modificacion hecha
This commit is contained in:
@ -164,9 +164,9 @@
|
||||
<div class="form-check form-check-inline">
|
||||
<input type="checkbox"
|
||||
id="isTinta"
|
||||
name="is_tinta"
|
||||
name="is_inkjet"
|
||||
value="1"
|
||||
class="form-check-input"<?= $maquina->is_tinta == true ? 'checked' : ''; ?>
|
||||
class="form-check-input"<?= $maquina->is_inkjet == true ? 'checked' : ''; ?>
|
||||
>
|
||||
<label for="isPadre" class="form-check-label">
|
||||
<?= lang('Maquinas.isTinta') ?>
|
||||
@ -174,7 +174,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($maquina->is_rotativa == false): ?>
|
||||
<?php if ($maquina->is_rotativa == false && $maquina->is_inkjet == false): ?>
|
||||
<div class="row" id="datosRotativa" style="display:none">
|
||||
<?php else: ?>
|
||||
<div class="row" id="datosRotativa">
|
||||
@ -196,7 +196,8 @@
|
||||
maxLength="8" step="0.01" class="form-control"
|
||||
value="<?= old('precio_tinta_color', $maquina->precio_tinta_color) ?>">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="col-md-2" <?= ($maquina->is_rotativa == false)?' style="display:none"':""; ?>>
|
||||
<label for="velocidadCorte" class="form-label">
|
||||
<?= lang('Maquinas.velocidadCorte') ?>
|
||||
</label>
|
||||
@ -204,7 +205,7 @@
|
||||
step="0.01" class="form-control"
|
||||
value="<?= old('velocidad_corte', $maquina->velocidad_corte) ?>">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-2" <?= ($maquina->is_rotativa == false)?' style="display:none"':""; ?>>
|
||||
<label for="precioHoraCorte" class="form-label">
|
||||
<?= lang('Maquinas.precioHoraCorte') ?>
|
||||
</label>
|
||||
@ -212,7 +213,7 @@
|
||||
maxLength="8" step="0.01" class="form-control"
|
||||
value="<?= old('precio_hora_corte', $maquina->precio_hora_corte) ?>">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-2" <?= ($maquina->is_rotativa == false)?' style="display:none"':""; ?>>
|
||||
<label for="metrosxminuto" class="form-label">
|
||||
<?= lang('Maquinas.metrosxminuto') ?>
|
||||
</label>
|
||||
@ -220,4 +221,5 @@
|
||||
step="0.01" class="form-control"
|
||||
value="<?= old('metrosxminuto', $maquina->metrosxminuto) ?>">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -208,6 +208,41 @@
|
||||
$('#isRotativa').prop("checked", !$('#isRotativa').prop("checked"));
|
||||
}
|
||||
|
||||
$('#isRotativa').on('change', function(){
|
||||
updatePapeles()
|
||||
})
|
||||
|
||||
$('#isTinta').on('change', function(){
|
||||
updatePapeles()
|
||||
})
|
||||
|
||||
function updatePapeles(){
|
||||
yeniden(json.<?= csrf_token() ?>);
|
||||
|
||||
$.ajax({
|
||||
url: '<?= route_to('updateMaquinaPapelOnTarifasChange') ?>',
|
||||
data: {
|
||||
maquina_id: id,
|
||||
isRotativa: isRotativa.watch,
|
||||
isInkjet: $('#isTinta').prop('checked'),
|
||||
<?= csrf_token() ?? "token" ?>: <?= csrf_token() ?>v,
|
||||
},
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
success:function(response){
|
||||
|
||||
token=JSON.parse(response).<?= csrf_token() ?>;
|
||||
yeniden(token);
|
||||
|
||||
theTable.clearPipeline();
|
||||
theTable.draw();
|
||||
|
||||
theTable2.clearPipeline();
|
||||
theTable2.draw();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#isPadre').on("click",function(el){
|
||||
if($(this).is(':checked')){
|
||||
$("#selectVariante").show();
|
||||
@ -329,29 +364,7 @@
|
||||
|
||||
editor.on( 'postSubmit', function ( e, json, data, action ) {
|
||||
|
||||
yeniden(json.<?= csrf_token() ?>);
|
||||
|
||||
$.ajax({
|
||||
url: '<?= route_to('updateMaquinaPapelOnTarifasChange') ?>',
|
||||
data: {
|
||||
maquina_id: id,
|
||||
isRotativa: isRotativa.watch,
|
||||
<?= csrf_token() ?? "token" ?>: <?= csrf_token() ?>v,
|
||||
},
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
success:function(response){
|
||||
|
||||
token=JSON.parse(response).<?= csrf_token() ?>;
|
||||
yeniden(token);
|
||||
|
||||
theTable.clearPipeline();
|
||||
theTable.draw();
|
||||
|
||||
theTable2.clearPipeline();
|
||||
theTable2.draw();
|
||||
}
|
||||
});
|
||||
updatePapeles()
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?= old('nombre', $papelImpresion->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="mb-3">
|
||||
<label for="referencia" class="form-label">
|
||||
<?= lang('PapelImpresion.referencia') ?>
|
||||
</label>
|
||||
@ -22,13 +22,13 @@
|
||||
<input type="number" id="mano" name="mano" required maxLength="8" step="0.01" class="form-control" value="<?= old('mano', $papelImpresion->mano) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="mb-3">
|
||||
<label for="precioTonelada" class="form-label">
|
||||
<?= lang('PapelImpresion.precioTonelada') ?>*
|
||||
</label>
|
||||
<input type="number" id="precioTonelada" name="precio_tonelada" required maxLength="31" step="0.01" class="form-control" value="<?= old('precio_tonelada', $papelImpresion->precio_tonelada) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
@ -49,14 +49,14 @@
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="mb-3">
|
||||
<label for="gramaje" class="form-label">
|
||||
<?= lang('PapelImpresion.gramaje') ?>*
|
||||
</label>
|
||||
<input type="number" id="gramaje" name="gramaje" required maxLength="31" step="0.01" class="form-control" value="<?= old('gramaje', $papelImpresion->gramaje) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="mb-3">
|
||||
<label for="espesor" class="form-label">
|
||||
<?= lang('PapelImpresion.espesor') ?>*
|
||||
</label>
|
||||
@ -68,19 +68,19 @@
|
||||
|
||||
</div><!-- //.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="bn" class="form-check-label">
|
||||
<input type="checkbox" id="bn" name="bn" value="1" class="form-check-input" <?= $papelImpresion->bn == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.bn') ?>
|
||||
</label>
|
||||
<label for="bn" class="form-check-label">
|
||||
<input type="checkbox" id="bn" name="bn" value="1" class="form-check-input" <?= $papelImpresion->bn == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.bn') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="cubierta" class="form-check-label">
|
||||
@ -89,8 +89,8 @@
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="rotativa" class="form-check-label">
|
||||
@ -100,7 +100,7 @@
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="isActivo" class="form-check-label">
|
||||
@ -109,10 +109,10 @@
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="color" class="form-check-label">
|
||||
@ -132,6 +132,16 @@
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="inkjet" class="form-check-label">
|
||||
<input type="checkbox" id="inkjet" name="inkjet" value="1" class="form-check-input" <?= $papelImpresion->inkjet == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.inkjet') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
@ -141,5 +151,5 @@
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
</div><!-- //.row -->
|
||||
</div><!--//.col -->
|
||||
</div><!-- //.row -->
|
||||
@ -58,7 +58,7 @@
|
||||
</div> <!-- //.accordion -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(str_contains($formAction,'edit') && $papelImpresion->rotativa == true): ?>
|
||||
<?php if(str_contains($formAction,'edit') && ($papelImpresion->rotativa == true || $papelImpresion->inkjet == true)): ?>
|
||||
<div class="accordion mt-3" id="accordionTipologias">
|
||||
|
||||
<div class="card accordion-item active">
|
||||
@ -729,7 +729,17 @@
|
||||
.submit();
|
||||
} );
|
||||
|
||||
|
||||
$('#rotativa').on('change', function() {
|
||||
if($('#inkjet').prop('checked')){
|
||||
$('#inkjet').prop('checked', false)
|
||||
}
|
||||
})
|
||||
|
||||
$('#inkjet').on('change', function() {
|
||||
if($('#rotativa').prop('checked')){
|
||||
$('#rotativa').prop('checked', false)
|
||||
}
|
||||
})
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
@ -25,7 +25,8 @@
|
||||
<th><?= lang('PapelImpresion.color') ?></th>
|
||||
<th><?= lang('PapelImpresion.cubierta') ?></th>
|
||||
<th><?= lang('PapelImpresion.sobrecubierta') ?></th>
|
||||
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
||||
<th><?= lang('PapelImpresion.inkjet') ?></th>
|
||||
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
||||
<th><?= lang('PapelImpresion.activo') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
@ -100,6 +101,7 @@
|
||||
{ 'data': 'color' },
|
||||
{ 'data': 'cubierta' },
|
||||
{ 'data': 'sobrecubierta' },
|
||||
{ 'data': 'inkjet' },
|
||||
{ 'data': 'rotativa' },
|
||||
{ 'data': 'isActivo' },
|
||||
{ 'data': actionBtns }
|
||||
@ -108,7 +110,7 @@
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
const boolCols = [3, 4, 5, 6, 7, 8];
|
||||
const boolCols = [3, 4, 5, 6, 7, 8, 9];
|
||||
for (let coln of boolCols) {
|
||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = cell.innerHTML == '1' ? '<i class="ti ti-check"></i>' : '';
|
||||
|
||||
Reference in New Issue
Block a user