This commit is contained in:
amazuecos
2024-12-16 09:19:08 +01:00
parent 422ade0030
commit 43f2daea59
13 changed files with 351 additions and 109 deletions

View File

@ -0,0 +1,7 @@
import OrdenTrabajo from "./ot.js";
$(function() {
const ot = new OrdenTrabajo($("#ot-edit"))
ot.init()
})

View File

@ -0,0 +1,31 @@
import Ajax from "../../components/ajax.js"
class OrdenTrabajo
{
constructor(domItem) {
this.item = domItem
this.otForm = this.item.find("#ot-edit-form")
this.modelId = this.item.data("id");
}
init(){
console.log(this.getFormData())
}
getFormData() {
let data = {}
this.otForm.serializeArray().forEach((e) => {
data[e.name] = e.value
}
)
return data
}
_handleGetData(){
const ajax = new Ajax(`/produccion/ordentrabajo/${this.modelId}`)
}
}
export default OrdenTrabajo;