mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en el diseño del libro
This commit is contained in:
@ -94,5 +94,11 @@ class Js_loader extends BaseController
|
||||
return view('themes/backend/vuexy/form/presupuestos/cliente/tipoLibroItems.js');
|
||||
}
|
||||
|
||||
function presupuestoClienteDisenioLibro_js()
|
||||
{
|
||||
$this->response->setHeader('Content-Type', 'text/javascript');
|
||||
return view('themes/backend/vuexy/form/presupuestos/cliente/disenioLibro.js');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -154,6 +154,7 @@ class Presupuestocliente extends \App\Controllers\GoBaseResourceController
|
||||
|
||||
$datosPresupuesto = (object)array();
|
||||
$datosPresupuesto->paisList = model('App\Models\Configuracion\PaisModel')->getAllForMenu('id, nombre', 'nombre', true);
|
||||
$datosPresupuesto->papelFormatoList = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
|
||||
|
||||
$this->viewData['formAction'] = route_to('crearPresupuestoCliente');
|
||||
|
||||
@ -555,5 +556,13 @@ class Presupuestocliente extends \App\Controllers\GoBaseResourceController
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getPapelFormatoListItems($selId = null)
|
||||
{
|
||||
$papelFormatoModel = model('App\Models\Configuracion\PapelFormatoModel');
|
||||
$data = $papelFormatoModel->getElementsForMenu();
|
||||
array_shift($data);
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1473,14 +1473,14 @@ class PresupuestoService extends BaseService
|
||||
$nueva_tarifa[0]->tiempo != $servicio->tiempo){
|
||||
|
||||
$servicio->precio_unidad = round($nueva_tarifa[0]->precio_unidad, 2);
|
||||
$servicio->tiempo = round($nueva_tarifa[0]->tiempo, 2);
|
||||
$servicio->tiempo = $nueva_tarifa[0]->tiempo==null?"": round($nueva_tarifa[0]->tiempo, 2);
|
||||
$servicio->precio_total = round($nueva_tarifa[0]->total, 2);
|
||||
$servicio->margen = round($nueva_tarifa[0]->margen);
|
||||
$cambio = true;
|
||||
}
|
||||
else if($input_data['is_duplicado'] && $nueva_tarifa[0]->proveedor_id != $servicio->proveedor_id){
|
||||
$servicio->precio_unidad = round($nueva_tarifa[0]->precio_unidad, 2);
|
||||
$servicio->tiempo = round($nueva_tarifa[0]->tiempo, 2);
|
||||
$servicio->tiempo = $nueva_tarifa[0]->tiempo==null?"": round($nueva_tarifa[0]->tiempo, 2);
|
||||
$servicio->precio_total = round($nueva_tarifa[0]->total, 2);
|
||||
$servicio->margen = round($nueva_tarifa[0]->margen);
|
||||
$servicio->proveedor = $nueva_tarifa[0]->proveedor;
|
||||
|
||||
@ -0,0 +1,165 @@
|
||||
<div class="col-12 pb-2">
|
||||
|
||||
<input hidden readonly style="background: #E8E8E8;" id="id" name="id" maxLength="12" class="form-control" value="<?= old('id', $presupuestoEntity->id) ?>">
|
||||
|
||||
<div class="row g-2">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-3 mb-md-0 mb-2">
|
||||
<div class="form-check custom-option custom-option-basic checked">
|
||||
<label class="form-check-label custom-option-content" for="customRadioTemp1">
|
||||
<input name="customRadioTemp" class="form-check-input" type="radio" value="" id="customRadioTemp1" checked="">
|
||||
<span class="custom-option-header">
|
||||
<span class="h6 mb-0">Tapa blanda</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-check custom-option custom-option-basic">
|
||||
<label class="form-check-label custom-option-content" for="customRadioTemp2">
|
||||
<input name="customRadioTemp" class="form-check-input" type="radio" value="" id="customRadioTemp2">
|
||||
<span class="custom-option-header">
|
||||
<span class="h6 mb-0">Tapa Dura</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
<div class="divider divider-dark text-start mb-1">
|
||||
<div class="divider-text">
|
||||
<h5>Datos presupuesto</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3 mb-3">
|
||||
<label for="tirada" class="form-label">
|
||||
<?=lang('Presupuestos.tirada') ?> 1
|
||||
</label>
|
||||
<input type="number" id="tirada" name="tirada" maxLength="8" step="1" class="form-control" value="<?=old('tirada', $presupuestoEntity->tirada) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-sm-3 mb-3">
|
||||
<label for="tirada2" class="form-label">
|
||||
<?=lang('Presupuestos.tirada') ?> 2
|
||||
</label>
|
||||
<input type="number" id="tirada2" name="tirada2" maxLength="8" step="1" class="form-control" value="<?=old('tirada2', $presupuestoEntity->tirada2) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-sm-3 mb-3">
|
||||
<label for="tirada3" class="form-label">
|
||||
<?=lang('Presupuestos.tirada') ?> 3
|
||||
</label>
|
||||
<input type="number" id="tirada3" name="tirada3" maxLength="8" step="1" class="form-control" value="<?=old('tirada3', $presupuestoEntity->tirada3) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-sm-3 mb-3">
|
||||
<label for="tirada4" class="form-label">
|
||||
<?=lang('Presupuestos.tirada') ?> 4
|
||||
</label>
|
||||
<input type="number" id="tirada4" name="tirada4" maxLength="8" step="1" class="form-control" value="<?=old('tirada4', $presupuestoEntity->tirada4) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-3 mb-3">
|
||||
<label for="paginas" class="form-label">
|
||||
<?=lang('Presupuestos.paginas') ?>
|
||||
</label>
|
||||
<input type="number" id="paginas" name="paginas" maxLength="8" step="1" class="form-control" value="<?=old('paginas', $presupuestoEntity->paginas) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="tamanioLibroDiv" class="col-sm-3 mb-3" <?= $presupuestoEntity->papel_formato_personalizado == false ? '' : 'style="display: none"'; ?>>
|
||||
<label id="label_papelFormatoId" for="papelFormatoId" class="form-label">
|
||||
Tamaño Libro*
|
||||
</label>
|
||||
|
||||
<select id="papelFormatoId" name="papel_formato_id" tabindex="3" class="form-control select2bs2" style="width: 100%;">
|
||||
|
||||
<?php if (isset($datosPresupuesto->papelFormatoList) && is_array($datosPresupuesto->papelFormatoList) && !empty($datosPresupuesto->papelFormatoList)) :
|
||||
foreach ($datosPresupuesto->papelFormatoList as $formato) : ?>
|
||||
<option value="<?= $formato->id ?>" <?= $formato->id == $presupuestoEntity->papel_formato_id ? ' selected' : '' ?>>
|
||||
<?= $formato->tamanio ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="anchoLibroDiv" class="col-sm-3 mb-3" <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?>>
|
||||
<div class="mb-1">
|
||||
<label class="form-label" for="papelFormatoAncho">Ancho Libro</label>
|
||||
<input type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="1" class="form-control formato_libro" value="<?= old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div id="altoLibroDiv" class="col-sm-3 mb-3" <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> >
|
||||
<div class="mb-1">
|
||||
<label class="form-label" for="papelFormatoAlto">Alto Libro</label>
|
||||
<input type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="1" class="form-control formato_libro" value="<?= old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-sm-3 mb-3 d-flex align-items-end">
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="papelFormatoPersonalizado" name="papel_formato_personalizado" value="1" <?= $presupuestoEntity->papel_formato_personalizado == true ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.papelFormatoPersonalizado') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
<div class="divider divider-dark text-start mb-1">
|
||||
<div class="divider-text">
|
||||
<h5>Interior</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5> Color del interior </h5>
|
||||
<div class="row">
|
||||
|
||||
</div> <!--//.row -->
|
||||
<div class="row">
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
|
||||
<h5> Papel </h5>
|
||||
|
||||
<div class="col-sm-3 mb-3 d-flex align-items-end">
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="excluirRotativa" name="excluir_rotativa" value="0" <?= $presupuestoEntity->excluir_rotativa == true ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="excluirRotativa">Excluir rotativa</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="divider divider-dark text-start mb-1">
|
||||
<div class="divider-text">
|
||||
<h5>Cubierta</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="divider divider-dark text-start mb-1">
|
||||
<div class="divider-text">
|
||||
<h5>Sobrecubierta</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
|
||||
$('#papelFormatoPersonalizado').on('change', function()
|
||||
{
|
||||
if ($(this).is(":checked")) {
|
||||
$('#tamanioLibroDiv').hide();
|
||||
$('#anchoLibroDiv').show();
|
||||
$('#altoLibroDiv').show();
|
||||
} else {
|
||||
$('#tamanioLibroDiv').show();
|
||||
$('#anchoLibroDiv').hide();
|
||||
$('#altoLibroDiv').hide();
|
||||
}
|
||||
});
|
||||
@ -16,7 +16,8 @@
|
||||
<!-- Create Deal Wizard -->
|
||||
<div id="wizard-presupuesto-cliente" class="bs-stepper vertical mt-2 linear">
|
||||
<div class="bs-stepper-header">
|
||||
<div class="step active" data-target="#datos-generales">
|
||||
|
||||
<div class="step" data-target="#datos-generales">
|
||||
<button type="button" class="step-trigger" aria-selected="true">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-list-details ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
@ -38,7 +39,7 @@
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="step" data-target="#disenio-libro">
|
||||
<div class="step active" data-target="#disenio-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-book ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
@ -74,7 +75,7 @@
|
||||
<form id="presupuesto-cliente-form" onsubmit="return false">
|
||||
|
||||
<!-- Datos Generales -->
|
||||
<div id="datos-generales" class="content active dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div id="datos-generales" class="content dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_datosLibroItems") ?>
|
||||
@ -112,76 +113,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Deal Details -->
|
||||
<div id="disenio-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<!-- Diseño Libro -->
|
||||
<div id="disenio-libro" class="content active fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
<div class="col-sm-6 fv-plugins-icon-container">
|
||||
<label class="form-label" for="dealTitle">Deal Title</label>
|
||||
<input type="text" id="dealTitle" name="dealTitle" class="form-control" placeholder="Black friday sale, 25% off">
|
||||
<div class="fv-plugins-message-container invalid-feedback"></div>
|
||||
</div>
|
||||
<div class="col-sm-6 fv-plugins-icon-container">
|
||||
<label class="form-label" for="dealCode">Deal Code</label>
|
||||
<input type="text" id="dealCode" name="dealCode" class="form-control" placeholder="25PEROFF">
|
||||
<div class="fv-plugins-message-container invalid-feedback"></div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label" for="dealDescription">Deal Description</label>
|
||||
<textarea id="dealDescription" name="dealDescription" class="form-control" rows="5" placeholder="To sell or distribute something as a business deal"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
<label class="form-label" for="dealOfferedItem">Offered Items</label>
|
||||
<div class="position-relative">
|
||||
<select class="select2 select2-hidden-accessible" id="dealOfferedItem" name="dealOfferedItem" multiple="" data-select2-id="dealOfferedItem" tabindex="-1" aria-hidden="true">
|
||||
<option disabled="" value="">Select offered item</option>
|
||||
<option value="65328">Apple iPhone 12 Pro Max (256GB)</option>
|
||||
<option value="25612">Apple iPhone 12 Pro (512GB)</option>
|
||||
<option value="65454">Apple iPhone 12 Mini (256GB)</option>
|
||||
<option value="12365">Apple iPhone 11 Pro Max (256GB)</option>
|
||||
<option value="85466">Apple iPhone 11 (64GB)</option>
|
||||
<option value="98564">OnePlus Nord CE 5G (128GB)</option>
|
||||
</select><span class="select2 select2-container select2-container--default" dir="ltr" data-select2-id="2" style="width: auto;"><span class="selection"><span class="select2-selection select2-selection--multiple" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="-1" aria-disabled="false">
|
||||
<ul class="select2-selection__rendered">
|
||||
<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" placeholder="Select an offered item" style="width: 0px;"></li>
|
||||
</ul>
|
||||
</span></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label class="form-label" for="dealCartCondition">Cart condition</label>
|
||||
<select class="form-select" id="dealCartCondition" name="dealCartCondition">
|
||||
<option disabled="" value="">Select cart condition</option>
|
||||
<option value="all">Cart must contain all selected Downloads</option>
|
||||
<option value="any">Cart needs one or more of the selected Downloads</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label for="dealDuration" class="form-label">Deal Duration</label>
|
||||
<input type="text" id="dealDuration" name="dealDuration" class="form-control flatpickr-input" placeholder="YYYY-MM-DD to YYYY-MM-DD" readonly="readonly">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label">Notify Users</label>
|
||||
<div class="row">
|
||||
<div class="col mt-2">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="dealNotifyEmail" name="dealNotifyEmail" value="email">
|
||||
<label class="form-check-label" for="dealNotifyEmail">Email</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="dealNotifySMS" name="dealNotifySMS" value="sms">
|
||||
<label class="form-check-label" for="dealNotifySMS">SMS</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="dealNotifyPush" name="dealNotifyPush" value="push">
|
||||
<label class="form-check-label" for="dealNotifyPush">Push Notification</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cliente/_disenioLibroItems") ?>
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-label-secondary btn-prev waves-effect">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
@ -194,6 +131,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Deal Usage -->
|
||||
<div id="direcciones-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
@ -387,4 +325,5 @@
|
||||
<script src="<?= site_url('js_loader/translate_js/Presupuestos') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/presupuestoCliente_js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/presupuestoClienteTipoLibro_js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/presupuestoClienteDisenioLibro_js') ?>"></script>
|
||||
<?= $this->endSection() ?>
|
||||
3740
xdebug.log
3740
xdebug.log
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user