mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
tareas
This commit is contained in:
@ -6,11 +6,44 @@ class OrdenTrabajo
|
||||
this.item = domItem
|
||||
this.otForm = this.item.find("#ot-edit-form")
|
||||
this.modelId = this.item.data("id");
|
||||
this.tareasTableItem = this.item.find("#ot-task-table");
|
||||
this.datatableColumns = [
|
||||
{ data: 'orden', searchable: true, sortable: true },
|
||||
{ data: 'nombre', searchable: true, sortable: true },
|
||||
{ data: 'maquina_presupuesto_linea', searchable: true, sortable: true },
|
||||
{ data: 'maquina_tarea', searchable: false, sortable: false ,render : this._renderMaquinaSelectTable.bind(this)},
|
||||
{ data: 'imposicion_id', searchable: false, sortable: false },
|
||||
{ data: 'tiempo_estimado', searchable: false, sortable: false },
|
||||
{ data: 'tiempo_real', searchable: false, sortable: false },
|
||||
{ data: 'action', searchable: false, sortable: false },
|
||||
]
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
init(){
|
||||
this.initDatatableTareas()
|
||||
console.log(this.getFormData())
|
||||
}
|
||||
initDatatableTareas(){
|
||||
this.datatableTareas = this.tareasTableItem.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
topEnd: 'search',
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
serverSide: true,
|
||||
pageLength: 10,
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/tareas/datatable/' + this.modelId
|
||||
});
|
||||
}
|
||||
getFormData() {
|
||||
let data = {}
|
||||
this.otForm.serializeArray().forEach((e) => {
|
||||
@ -22,6 +55,10 @@ class OrdenTrabajo
|
||||
_handleGetData(){
|
||||
const ajax = new Ajax(`/produccion/ordentrabajo/${this.modelId}`)
|
||||
}
|
||||
_renderMaquinaSelectTable(d,t){
|
||||
return `<select id="select-maquina-tarea-${d}" data-id="${d}" class="select2 form-select select-maquina-tarea-datatable" data-allow-clear="true"></select>`
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user