Members
clientsSelected :Array.<Client>
listado del cliente seleccionado por el usuario
Type:
- Array.<Client>
(nullable) deliveryId :number
Type:
- number
(nullable) note :Nota
Instancia de la nota
Type:
productsSelected :Array.<Product>
listado de productos seleccionados por el usuario
Type:
- Array.<Product>
totalOrder :number
Type:
- number
Methods
calculateTotal()
calcula el total de la orden
confirmDeleteClient(data)
confirmacion de elminacion de producto
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | objeto de confirmacion
Properties
|
confirmDeleteProduct(data)
confirmacion de elminacion de producto
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | objeto de confirmacion
Properties
|
deleteClient(idClient)
eliminar un cliente de la orden
Parameters:
Name | Type | Description |
---|---|---|
idClient |
number | identificador del cliente |
deleteProduct(idProduct)
eliminar un producto de la orden
Parameters:
Name | Type | Description |
---|---|---|
idProduct |
number | identificador del producto |
(async) getDeliveryNote(idNote)
obtiene la informacion de la nota seleccionada
Parameters:
Name | Type | Description |
---|---|---|
idNote |
number | identificador de la nota |
getParamsUrl()
Obtiene el id de la nota pasada por la url
handleChangeQuantity(element, idDelivery, quantityTotal)
funcion que maneja el cambio de la cantidad seleccionada
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement | elemento html |
idDelivery |
number | identificador de la nota |
quantityTotal |
number | string | cantidad total |
handleSubmit(event)
evento que captura el envio del formulario
Parameters:
Name | Type | Description |
---|---|---|
event |
* | description |
resetForm(button)
Limpia los campos del formulario
Parameters:
Name | Type | Default | Description |
---|---|---|---|
button |
boolean |
false
|
indica si la funcion es llamado desde el boton del formulario |
selectClients()
Funcion que activa la seleccion del cliente
selectProducts()
Funcion que activa la seleccion de productos
sendData(data)
envia la informacion al controlador
Parameters:
Name | Type | Description |
---|---|---|
data |
Nota | instancia de la nota |
setClientsTable()
establece las filas en formato html del card de clientes
setForm(delivery)
establece el formulario de la nota
Parameters:
Name | Type | Default | Description |
---|---|---|---|
delivery |
Nota |
null
|
instancia de la nota |
setHtml(callback)
establece el html del sitio y sus eventos
Parameters:
Name | Type | Description |
---|---|---|
callback |
callback | devolucion de llamada cuando el html se cargue al sitio |
setProductsTable()
establece las filas en formato html del card de productos
validateForm(data, callback)
valida el formulario
Parameters:
Name | Type | Description |
---|---|---|
data |
Nota | instancia de la nota |
callback |
callbackValidateForm | llamada de respuesta |