Add UI for warehouse movement
This commit is contained in:
parent
c64de2bbb9
commit
866e8c40b9
|
@ -32,7 +32,7 @@ function products_default_config(){
|
|||
var values = data.json()
|
||||
if(values.is_admin){
|
||||
$$('cmd_add_inventory').show()
|
||||
$$('cmd_products_add').show()
|
||||
//~ $$('cmd_products_add').show()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -477,6 +477,7 @@ function cmd_show_exists_click(id, e, node){
|
|||
return
|
||||
}
|
||||
win_show_exists.init()
|
||||
$$('txt_id_product').setValue(row.id)
|
||||
$$('grid_warehouse_exists').load('warehouseproduct?opt=by_product&id='+row.id)
|
||||
$$('win_show_exists').show()
|
||||
}
|
||||
|
@ -817,3 +818,10 @@ function _add_entries_inventory_manual(row_id, data){
|
|||
|
||||
}
|
||||
|
||||
|
||||
function cmd_warehouse_move_click(id, e, node){
|
||||
var id_product = $$('txt_id_product').getValue()
|
||||
msg_ok(id_product)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -474,7 +474,9 @@ var grid_warehouse_exists = {
|
|||
view: 'datatable',
|
||||
id: 'grid_warehouse_exists',
|
||||
adjust: true,
|
||||
//~ footer: true,
|
||||
autoheight: true,
|
||||
select: 'row',
|
||||
footer: true,
|
||||
columns: grid_warehouse_exists_cols,
|
||||
}
|
||||
|
||||
|
@ -482,13 +484,25 @@ var grid_warehouse_exists = {
|
|||
var body_win_show_exists = {rows: [{maxHeight: 10},
|
||||
{cols: [
|
||||
{maxWidth: 10},
|
||||
{view: 'text', id: 'txt_id_product', readonly: true, hidden: true},
|
||||
grid_warehouse_exists,
|
||||
{maxWidth: 10}
|
||||
]},
|
||||
{maxHeight: 10},
|
||||
{cols: [{maxWidth: 10},
|
||||
{view: 'label', label: 'Primero, selecciona el almacen origen en la tabla superior.'},
|
||||
{maxWidth: 10}]},
|
||||
{cols: [{maxWidth: 10},
|
||||
{view: 'counter', id: 'txt_cant_to_move', label: 'Cantidad a mover:',
|
||||
labelPosition: 'top', step: 1, value: 0, min: 0.01},
|
||||
{view: 'richselect', id: 'lst_warehouse_target', label: 'Almacen destino: ',
|
||||
labelPosition: 'top', required: false, options: []}, {maxWidth: 10},
|
||||
{view: 'button', id: 'cmd_warehouse_move', label: 'Mover', maxWidth: 100},
|
||||
{maxWidth: 10}]},
|
||||
{maxHeight: 20},
|
||||
{cols: [{},
|
||||
{view: 'button', id: 'cmd_win_show_exists_close', label: 'Cerrar', type: 'danger'}, {}
|
||||
]},
|
||||
{view: 'button', id: 'cmd_win_show_exists_close', label: 'Cerrar', type: 'danger'},
|
||||
{}]},
|
||||
{maxHeight: 20},
|
||||
]}
|
||||
|
||||
|
@ -498,12 +512,13 @@ var win_show_exists = {
|
|||
webix.ui({
|
||||
view: 'window',
|
||||
id: 'win_show_exists',
|
||||
width: 400,
|
||||
width: 500,
|
||||
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)
|
||||
$$('cmd_warehouse_move').attachEvent('onItemClick', cmd_warehouse_move_click)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue