Add dialog for show exists in warehouse

This commit is contained in:
Mauricio Baeza 2021-09-05 19:48:05 -05:00
parent 7a1fd8fcaf
commit 2055a904f6
2 changed files with 52 additions and 0 deletions

View File

@ -482,6 +482,11 @@ function cmd_show_exists_click(id, e, node){
}
function cmd_win_show_exists_close_click(id, e, node){
$$('win_show_exists').close()
}
//~ Add products
function cmd_products_add_click(id, e, node){
$$("multi_products").setValue("product_add")

View File

@ -460,3 +460,50 @@ var win_add_inventory = {
$$('cmd_add_inventory_cancel').attachEvent('onItemClick', cmd_add_inventory_cancel_click)
}
}
var grid_warehouse_exists_cols = [
{ id: 'id', header: 'ID', width: 75, hidden: true},
{ id: 'warehouse', header: ['Almacen'], fillspace:true},
{ id: 'exists', header: ['Existencia'], width: 100, sort: 'int',
format: webix.i18n.numberFormat, css: 'right' },
]
var grid_warehouse_exists = {
view: 'datatable',
id: 'grid_warehouse_exists',
adjust: true,
//~ footer: true,
columns: grid_warehouse_exists_cols,
}
var body_win_show_exists = {rows: [{maxHeight: 10},
{cols: [
{maxWidth: 10},
grid_warehouse_exists,
{maxWidth: 10}
]},
{maxHeight: 20},
{cols: [{},
{view: 'button', id: 'cmd_win_show_exists_close', label: 'Cerrar', type: 'danger'}, {}
]},
{maxHeight: 20},
]}
var win_show_exists = {
init: function(){
webix.ui({
view: 'window',
id: 'win_show_exists',
width: 400,
modal: true,
position: 'center',
head: 'Existencia por Almacen',
body: body_win_show_exists,
})
$$('cmd_win_show_exists_close').attachEvent('onItemClick', cmd_win_show_exists_close_click)
}
}