forked from elmau/empresa-libre
139 lines
4.4 KiB
JavaScript
139 lines
4.4 KiB
JavaScript
|
|
|
|
var toolbar_banco = [
|
|
{view: 'richselect', id: 'lst_cuentas_banco', label: 'Cuenta',
|
|
labelWidth: 100, options: []},
|
|
{view: 'text', id: 'txt_cuenta_moneda', label: 'Moneda', readonly: true},
|
|
{view: 'currency', id: 'txt_cuenta_saldo', label: 'Saldo', readonly: true,
|
|
inputAlign: 'right', value: 0}
|
|
]
|
|
|
|
|
|
var toolbar_filtro_cuenta = [
|
|
{view: 'richselect', id: 'filtro_cuenta_year', label: 'Año',
|
|
labelAlign: 'right', labelWidth: 50, width: 150, options: []},
|
|
{view: 'richselect', id: 'filtro_cuenta_mes', label: 'Mes',
|
|
labelAlign: 'right', labelWidth: 50, width: 200, options: months},
|
|
{view: 'daterangepicker', id: 'filtro_cuenta_fechas', label: 'Fechas',
|
|
labelAlign: 'right', width: 300},
|
|
{},
|
|
{view: 'button', id: 'cmd_agregar_retiro', label: 'Retiro',
|
|
type: 'iconButton', autowidth: true, icon: 'minus'},
|
|
{view: 'button', id: 'cmd_agregar_deposito', label: 'Depósito',
|
|
type: 'iconButton', autowidth: true, icon: 'plus'},
|
|
]
|
|
|
|
|
|
var grid_cuentabanco_cols = [
|
|
{id: 'id', header:'ID', hidden: true},
|
|
{id: 'fecha', header: 'Fecha', width: 150},
|
|
{id: 'numero_operacion', header: 'Referencia'},
|
|
{id: 'descripcion', header: ['Descripción', {content: 'textFilter'}],
|
|
fillspace:true},
|
|
{id: 'retiro', header: ['Retiro', {content: 'numberFilter'}],
|
|
width: 125, format: webix.i18n.priceFormat, css: 'right'},
|
|
{id: 'deposito', header: ['Depósito', {content: 'numberFilter'}],
|
|
width: 125, format: webix.i18n.priceFormat, css: 'right'},
|
|
{id: 'saldo', header: ['Saldo'],
|
|
width: 125, format: webix.i18n.priceFormat, css: 'right'},
|
|
]
|
|
|
|
|
|
var grid_cuentabanco = {
|
|
view: 'datatable',
|
|
id: 'grid_cuentabanco',
|
|
select: 'row',
|
|
adjust: true,
|
|
footer: true,
|
|
resizeColumn: true,
|
|
headermenu: true,
|
|
columns: grid_cuentabanco_cols,
|
|
}
|
|
|
|
|
|
var toolbar_banco_retiro = [
|
|
{view: 'label', label: 'Agregar retiro de banco'},
|
|
{},
|
|
{view: 'icon', click: '$$("multi_bancos").setValue("banco_home")',
|
|
icon: 'times-circle'}
|
|
]
|
|
|
|
|
|
var body_banco_retiro = [
|
|
|
|
]
|
|
|
|
var controls_banco_retiro = [
|
|
{view: 'toolbar', elements: toolbar_banco_retiro},
|
|
{cols: [
|
|
{view: 'datepicker', id: 'date_retiro', name: 'retiro_fecha',
|
|
label: 'Fecha', format: '%d-%M-%Y', labelAlign: 'right',
|
|
required: true, invalidMessage: 'Selecciona una fecha',
|
|
labelWidth: 125},
|
|
{view: 'search', id: 'time_retiro', name: 'retiro_hora',
|
|
label: 'Hora', icon: 'clock-o', labelAlign: 'right',
|
|
pattern:{mask: '##:##:##', allow:/[0-9]/g}, required: true,
|
|
invalidMessage: 'Captura una hora'},
|
|
{view: 'text', id: 'retiro_referencia', name: 'retiro_referencia',
|
|
label: 'Referencia', labelAlign: 'right'},
|
|
]},
|
|
{cols: [
|
|
{view: 'richselect', id: 'lst_retiro_forma_pago',
|
|
name: 'retiro_forma_pago', label: 'Forma de Pago', required: true,
|
|
options: [], labelWidth: 125, labelAlign: 'right'},
|
|
{view: 'currency', type: 'text', id: 'txt_retiro_importe',
|
|
name: 'retiro_importe', label: 'Importe', labelAlign: 'right',
|
|
required: true, invalidMessage: 'Captura un valor númerico',
|
|
inputAlign: 'right', value: ''}
|
|
]},
|
|
{cols: [
|
|
{view: 'text', id: 'retiro_descripcion', name: 'retiro_descripcion',
|
|
label: 'Descripción', labelAlign: 'right', required: true,
|
|
labelWidth: 125},
|
|
]},
|
|
{cols: [{},
|
|
{view: 'button', id: 'cmd_guardar_retiro', label: 'Guardar Retiro',
|
|
type: 'iconButton', autowidth: true, icon: 'minus'},
|
|
{}]},
|
|
]
|
|
|
|
|
|
var form_banco_retiro = {
|
|
type: 'space',
|
|
responsive: true,
|
|
cols: [{
|
|
view: 'form',
|
|
id: 'form_banco_retiro',
|
|
complexData: true,
|
|
scroll: true,
|
|
elements: controls_banco_retiro,
|
|
}]
|
|
}
|
|
|
|
|
|
var multi_bancos = {
|
|
id: 'multi_bancos',
|
|
animate: true,
|
|
cells:[
|
|
{id: 'banco_home', rows:[
|
|
{view: 'toolbar', elements: toolbar_banco},
|
|
{view: 'toolbar', elements: toolbar_filtro_cuenta},
|
|
grid_cuentabanco,
|
|
]},
|
|
{id: 'banco_retiro', rows: [form_banco_retiro]}
|
|
],
|
|
}
|
|
|
|
|
|
var title_partners = 'Administración de Bancos'
|
|
var app_bancos = {
|
|
id: 'app_bancos',
|
|
rows:[
|
|
{view: 'template', id: 'th_bancos', type: 'header',
|
|
template: title_partners},
|
|
multi_bancos
|
|
]
|
|
}
|
|
|
|
|