mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en servicios encuadernacion (init)
This commit is contained in:
@ -75,6 +75,8 @@
|
||||
<table id="tableOfTarifaencuadernacionlineas" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th><?= lang('TarifaEncuadernacionLineas.dimensiones') ?></th>
|
||||
<th><?= lang('TarifaEncuadernacionLineas.paginasMin') ?></th>
|
||||
<th><?= lang('TarifaEncuadernacionLineas.precioMax') ?></th>
|
||||
<th><?= lang('TarifaEncuadernacionLineas.paginasMax') ?></th>
|
||||
@ -171,7 +173,13 @@
|
||||
},
|
||||
table : "#tableOfTarifaencuadernacionlineas",
|
||||
idSrc: 'id',
|
||||
fields: [ {
|
||||
fields: [
|
||||
{name: "id"},
|
||||
{
|
||||
name: "dimensiones_id",
|
||||
"type": "select"
|
||||
},
|
||||
{
|
||||
name: "paginas_libro_min"
|
||||
}, {
|
||||
name: "precio_max"
|
||||
@ -194,6 +202,9 @@
|
||||
]
|
||||
} );
|
||||
|
||||
// Generación de la lista de proveedores (id, nombre) para encuadernación
|
||||
const dimensionesList = <?php echo json_encode($dimensiones); ?>;
|
||||
editor.field( 'dimensiones_id' ).update( dimensionesList );
|
||||
|
||||
editor.on( 'preSubmit', function ( e, d, type ) {
|
||||
if ( type === 'create'){
|
||||
@ -243,6 +254,13 @@
|
||||
async: true,
|
||||
}),
|
||||
columns: [
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'dimensiones_id',
|
||||
render: function(data, type, row, meta) {
|
||||
var value = dimensionesList.find(element => element.value === data);
|
||||
return value['label'];
|
||||
},
|
||||
},
|
||||
{ 'data': 'paginas_libro_min' },
|
||||
{ 'data': 'precio_max' },
|
||||
{ 'data': 'paginas_libro_max' },
|
||||
@ -401,6 +419,7 @@
|
||||
|
||||
// Tabla de tiradas
|
||||
var theTable2 = $('#tableOfTarifaencuadernaciontiradas').DataTable( {
|
||||
draw:1,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
autoWidth: true,
|
||||
|
||||
Reference in New Issue
Block a user