2017-09-21 23:24:18 -05:00
|
|
|
|
2017-12-03 21:13:31 -06:00
|
|
|
|
|
|
|
var form_editar_usuario_elementos = [
|
2017-12-03 22:33:21 -06:00
|
|
|
{view: "text", id: 'txt_usuarioe_usuario', label: "Usuario",
|
2017-12-03 21:13:31 -06:00
|
|
|
name: "usuario", labelPosition: 'top', required: true},
|
2017-12-03 22:33:21 -06:00
|
|
|
{view: "text", id: 'txt_usuarioe_nombre', label: "Nombre", name: "nombre",
|
2017-12-03 21:13:31 -06:00
|
|
|
labelPosition: 'top', required: true},
|
2017-12-03 22:33:21 -06:00
|
|
|
{view: "text", id: 'txt_usuarioe_apellidos', label: "Apellidos",
|
2017-12-03 21:13:31 -06:00
|
|
|
name: "apellidos", labelPosition: 'top'},
|
2017-12-03 22:33:21 -06:00
|
|
|
{view: "text", id: 'txt_usuarioe_correo', label: "Correo", name: "correo",
|
2017-12-03 21:13:31 -06:00
|
|
|
labelPosition: 'top'},
|
|
|
|
{view: 'text', id: 'txt_usuarioe_contra1', name: 'contra1',
|
|
|
|
label: 'Contraseña: ', type: 'password',
|
|
|
|
labelPosition: 'top'},
|
|
|
|
{view: 'text', id: 'txt_usuarioe_contra2', name: 'contra2',
|
|
|
|
label: 'Confirmación de contraseña: ',
|
|
|
|
type: 'password', labelPosition: 'top'},
|
|
|
|
{cols:[
|
|
|
|
{view: "button", value: "Cancelar", click:function(){
|
|
|
|
this.getTopParentView().hide();
|
|
|
|
}},
|
|
|
|
{view: "button", type:"form", value: "Guardar",
|
|
|
|
click:function(){
|
|
|
|
update_grid_usuarios(this.getFormView(), this.getTopParentView())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]}
|
|
|
|
]
|
|
|
|
|
|
|
|
var admin_ui_windows = {
|
|
|
|
init: function(){
|
|
|
|
webix.ui({
|
|
|
|
view: 'window',
|
|
|
|
id: 'win_edit_usuario',
|
|
|
|
head: 'Editar Usuario',
|
|
|
|
modal: true,
|
|
|
|
position: 'center',
|
|
|
|
body: {
|
|
|
|
view: 'form', id: 'form_editar_usuario',
|
|
|
|
elements: form_editar_usuario_elementos
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
$$('form_editar_usuario').bind($$('grid_usuarios'))
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-09-21 23:24:18 -05:00
|
|
|
var menu_data = [
|
|
|
|
{id: 'app_home', icon: 'dashboard', value: 'Inicio'},
|
|
|
|
{id: 'app_emisor', icon: 'user-circle', value: 'Emisor'},
|
2017-10-07 00:16:58 -05:00
|
|
|
{id: 'app_folios', icon: 'sort-numeric-asc', value: 'Folios'},
|
2017-10-16 00:02:51 -05:00
|
|
|
{id: 'app_correo', icon: 'envelope-o', value: 'Correo'},
|
2017-11-03 20:05:19 -06:00
|
|
|
{id: 'app_sat', icon: 'table', value: 'Catalogos SAT'},
|
2017-12-03 21:13:31 -06:00
|
|
|
{id: 'app_usuarios', icon: 'users', value: 'Usuarios'},
|
2017-11-15 19:29:51 -06:00
|
|
|
{id: 'app_options', icon: 'check-circle-o', value: 'Opciones'},
|
|
|
|
{id: 'app_utilidades', icon: 'cog', value: 'Utilidades'},
|
2017-09-21 23:24:18 -05:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-03 20:05:19 -06:00
|
|
|
var sidebar_admin = {
|
2017-09-21 23:24:18 -05:00
|
|
|
view: 'sidebar',
|
2017-11-03 20:05:19 -06:00
|
|
|
id: 'sidebar_admin',
|
2017-09-21 23:24:18 -05:00
|
|
|
data: menu_data,
|
|
|
|
ready: function(){
|
|
|
|
this.select('app_home');
|
|
|
|
this.open(this.getParentId('app_home'));
|
|
|
|
},
|
|
|
|
on:{
|
|
|
|
onAfterSelect: function(id){
|
2017-10-07 23:52:11 -05:00
|
|
|
$$('multi_admin').setValue(id)
|
2017-09-21 23:24:18 -05:00
|
|
|
}
|
2017-11-15 00:12:55 -06:00
|
|
|
},
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var emisor_datos_fiscales = [
|
|
|
|
{template: 'Datos SAT', type: 'section'},
|
|
|
|
{cols: [{view: 'text', id: 'emisor_rfc', name: 'emisor_rfc', label: 'RFC: ',
|
|
|
|
width: 300, required: true, invalidMessage: 'RFC inválido',
|
|
|
|
readonly: true, attributes: {maxlength: 13}}, {}]},
|
|
|
|
{view: 'text', id: 'emisor_nombre', name: 'emisor_nombre',
|
|
|
|
label: 'Razón Social: ', required: true,
|
|
|
|
invalidMessage: 'La Razón Social es requerida'},
|
|
|
|
{cols: [
|
|
|
|
{view: 'search', id: 'emisor_cp', name: 'emisor_cp', width: 300,
|
2017-10-07 23:52:11 -05:00
|
|
|
label: 'C.P.: ', required: true, attributes: {maxlength: 5},
|
|
|
|
invalidMessage: 'El C.P. es requerido'},
|
2017-10-07 00:16:58 -05:00
|
|
|
{view: 'text', id: 'emisor_cp2', name: 'emisor_cp2', width: 300,
|
|
|
|
label: 'C.P. de Expedición: ', attributes: {maxlength: 5}},
|
|
|
|
{}]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'label', label: 'Regimenes Fiscales *', required: true}, {}]},
|
|
|
|
{cols: [{view: 'list', id: 'lst_emisor_regimen', select: 'multiselect',
|
2017-10-07 23:52:11 -05:00
|
|
|
name: 'lst_emisor_regimen', width: 600, height: 125, required: true,
|
2017-10-07 00:16:58 -05:00
|
|
|
data: []}, {}]},
|
|
|
|
{template: 'Dirección Fiscal', type: 'section'},
|
|
|
|
{view: 'text', id: 'emisor_calle', name: 'emisor_calle', label: 'Calle: '},
|
|
|
|
{cols: [{view: 'text', id: 'emisor_no_exterior', name: 'emisor_no_exterior',
|
|
|
|
width: 300, label: 'No Exterior: '},{}]},
|
|
|
|
{cols: [{view: 'text', id: 'emisor_no_interior', name: 'emisor_no_interior',
|
|
|
|
width: 300, label: 'No Interior: '},{}]},
|
|
|
|
{view: 'text', id: 'emisor_colonia', name: 'emisor_colonia',
|
|
|
|
label: 'Colonia: '},
|
|
|
|
{view: 'text', id: 'emisor_municipio', name: 'emisor_municipio',
|
|
|
|
label: 'Municipio: '},
|
|
|
|
{view: 'text', id: 'emisor_estado', name: 'emisor_estado',
|
|
|
|
label: 'Estado: '},
|
|
|
|
{view: 'text', id: 'emisor_pais', name: 'emisor_pais', label: 'País: ',
|
|
|
|
value: 'México', readonly: true},
|
|
|
|
{template: '', type: 'section', minHeight: 25},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var emisor_otros_datos= [
|
|
|
|
{template: 'Generales', type: 'section'},
|
2017-10-25 22:26:18 -05:00
|
|
|
{view: 'search', id: 'emisor_logo', icon: 'file-image-o',
|
|
|
|
name: 'emisor_logo', label: 'Logotipo: '},
|
2017-10-07 00:16:58 -05:00
|
|
|
{view: 'text', id: 'emisor_nombre_comercial',
|
|
|
|
name: 'emisor_nombre_comercial', label: 'Nombre comercial: '},
|
|
|
|
{view: 'text', id: 'emisor_telefono', name: 'emisor_telefono',
|
|
|
|
label: 'Teléfonos: '},
|
|
|
|
{view: 'text', id: 'emisor_correo', name: 'emisor_correo',
|
|
|
|
label: 'Correos: '},
|
|
|
|
{view: 'text', id: 'emisor_web', name: 'emisor_web',
|
|
|
|
label: 'Página Web: '},
|
|
|
|
{template: 'Escuela', type: 'section'},
|
|
|
|
{cols: [{view: 'checkbox', id: 'chk_escuela', name: 'es_escuela',
|
|
|
|
label: 'Es Escuela'},
|
2017-10-07 23:52:11 -05:00
|
|
|
{view: 'button', id: 'cmd_niveles', label: 'Niveles Escolares',
|
|
|
|
type: 'form', align: 'center', autowidth: true, disabled: true},
|
|
|
|
{}, {}]},
|
2017-10-07 00:16:58 -05:00
|
|
|
{template: 'ONG', type: 'section'},
|
|
|
|
{view: 'checkbox', id: 'chk_ong', name: 'es_ong', label: 'Es ONG'},
|
|
|
|
{cols: [{view: 'text', id: 'ong_autorizacion', name: 'ong_autorizacion',
|
|
|
|
label: 'Autorización: ', disabled: true,
|
|
|
|
placeholder: 'Número de autorización del SAT'}, {}]},
|
|
|
|
{cols: [{view: 'datepicker', id: 'ong_fecha', name: 'ong_fecha',
|
2017-10-07 23:52:11 -05:00
|
|
|
label: 'Fecha de Autorización: ', disabled: true, format: '%d-%M-%Y',
|
2017-10-07 00:16:58 -05:00
|
|
|
placeholder: 'Fecha de autorización en el SAT'}, {}]},
|
|
|
|
{cols: [{view: 'datepicker', id: 'ong_fecha_dof', name: 'ong_fecha_dof',
|
2017-10-07 23:52:11 -05:00
|
|
|
label: 'Fecha de DOF: ', disabled: true, format: '%d-%M-%Y',
|
2017-10-07 00:16:58 -05:00
|
|
|
placeholder: 'Fecha de publicación en el DOF'}, {}]},
|
2017-10-18 23:06:07 -05:00
|
|
|
{template: 'Timbrado y Soporte', type: 'section'},
|
2017-10-25 22:26:18 -05:00
|
|
|
{view: 'text', id: 'correo_timbrado',
|
|
|
|
name: 'correo_timbrado', label: 'Usuario para Timbrado: '},
|
2017-10-18 23:06:07 -05:00
|
|
|
{view: 'text', id: 'token_timbrado',
|
|
|
|
name: 'token_timbrado', label: 'Token de Timbrado: '},
|
|
|
|
{view: 'text', id: 'token_soporte',
|
|
|
|
name: 'token_soporte', label: 'Token de Soporte: '},
|
2017-10-07 00:16:58 -05:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var emisor_certificado = [
|
|
|
|
{template: 'Certificado actual', type: 'section'},
|
|
|
|
{view: 'form', id: 'form_cert', rows: [
|
|
|
|
{cols: [{view: 'text', id: 'cert_rfc', name: 'cert_rfc',
|
|
|
|
label: 'RFC: ', readonly: true, placeholder: 'Ninguno'}, {}]},
|
|
|
|
{cols: [{view: 'text', id: 'cert_serie', name: 'cert_serie',
|
|
|
|
label: 'Serie: ', readonly: true, placeholder: 'Ninguno'}, {}]},
|
|
|
|
{cols: [{view: 'text', id: 'cert_desde', name: 'cert_desde',
|
|
|
|
label: 'Vigente desde: ', readonly: true}, {}]},
|
|
|
|
{cols: [{view: 'text', id: 'cert_hasta', name: 'cert_hasta',
|
|
|
|
label: 'Vigente hasta: ', readonly: true}, {}]},
|
|
|
|
]},
|
|
|
|
{template: 'Cargar Certificado', type: 'section'},
|
|
|
|
{view: 'form', id: 'form_upload', rows: [
|
|
|
|
{cols: [{},
|
2017-10-08 22:01:19 -05:00
|
|
|
{view: 'uploader', id: 'up_cert', autosend: false, link: 'lst_cert',
|
|
|
|
value: 'Seleccionar certificado', upload: '/values/files'}, {}]},
|
2017-10-07 00:16:58 -05:00
|
|
|
{cols: [{},
|
2017-10-08 22:01:19 -05:00
|
|
|
{view: 'list', id: 'lst_cert', name: 'certificado',
|
|
|
|
type: 'uploader', autoheight:true, borderless: true}, {}]},
|
2017-10-07 00:16:58 -05:00
|
|
|
{cols: [{},
|
2017-10-08 22:01:19 -05:00
|
|
|
{view: 'text', id: 'txt_contra', name: 'contra',
|
|
|
|
label: 'Contraseña KEY', labelPosition: 'top',
|
|
|
|
labelAlign: 'center', type: 'password', required: true}, {}]},
|
2017-10-07 00:16:58 -05:00
|
|
|
{cols: [{}, {view: 'button', id: 'cmd_subir_certificado',
|
|
|
|
label: 'Subir certificado'}, {}]},
|
|
|
|
]},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-11 23:58:11 -06:00
|
|
|
var grid_emisor_cuentas_banco_cols = [
|
|
|
|
{id: 'id', header: 'ID', hidden: true},
|
|
|
|
{id: 'activa', header: 'Activa', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox', width: 50},
|
|
|
|
{id: 'nombre', header: 'Nombre', fillspace: 1},
|
|
|
|
{id: 'banco', header: 'Banco', fillspace: 1},
|
|
|
|
{id: 'fecha_apertura', header: 'Fecha de Apertura', fillspace: 1},
|
|
|
|
{id: 'cuenta', header: 'Cuenta', fillspace: 1},
|
|
|
|
{id: 'clabe', header: 'CLABE', fillspace: 1},
|
|
|
|
{id: 'moneda', header: 'Moneda', fillspace: 1},
|
|
|
|
{id: 'saldo', header: 'Saldo', width: 150, format: webix.i18n.priceFormat,
|
|
|
|
css: 'right'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_emisor_cuentas_banco = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_emisor_cuentas_banco',
|
|
|
|
select: 'row',
|
|
|
|
adjust: true,
|
|
|
|
autoheight: true,
|
|
|
|
headermenu: true,
|
2017-11-15 00:12:55 -06:00
|
|
|
columns: grid_emisor_cuentas_banco_cols,
|
2017-11-11 23:58:11 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var emisor_cuentas_banco = [
|
|
|
|
{template: 'Agregar cuenta de banco', type: 'section'},
|
|
|
|
{view: 'form', id: 'form_emisor_cuenta_banco', rows: [
|
|
|
|
{cols: [
|
|
|
|
{view: 'text', id: 'emisor_cuenta_nombre', name: 'emisor_cuenta_nombre',
|
2017-11-17 00:38:06 -06:00
|
|
|
label: 'Nombre: ', required: true},
|
2017-11-11 23:58:11 -06:00
|
|
|
{view: 'richselect', id: 'lst_emisor_banco', name: 'emisor_banco',
|
|
|
|
label: 'Banco: ', required: true, options: []},
|
|
|
|
]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'text', id: 'emisor_cuenta', name: 'emisor_cuenta',
|
|
|
|
label: 'Cuenta: ', required: true},
|
|
|
|
{view: 'text', id: 'emisor_clabe', name: 'emisor_clabe',
|
|
|
|
label: 'CLABE: ', required: true},
|
|
|
|
]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'richselect', id: 'lst_emisor_cuenta_moneda',
|
|
|
|
name: 'emisor_cuenta_moneda', label: 'Moneda: ', required: true,
|
|
|
|
options: []},
|
|
|
|
{view: 'currency', type: 'text', id: 'emisor_cuenta_saldo_inicial',
|
2017-11-17 14:13:39 -06:00
|
|
|
name: 'emisor_cuenta_saldo_inicial', label: 'Saldo inicial: ',
|
2017-11-11 23:58:11 -06:00
|
|
|
required: true, invalidMessage: 'Captura un valor númerico',
|
2017-11-12 18:50:41 -06:00
|
|
|
inputAlign: 'right', value: ''},
|
2017-11-11 23:58:11 -06:00
|
|
|
]},
|
2017-11-17 00:38:06 -06:00
|
|
|
{cols: [
|
|
|
|
{view: 'datepicker', id: 'emisor_cuenta_fecha', format: '%d-%M-%Y',
|
|
|
|
name: 'emisor_cuenta_fecha', label: 'Fecha de apertura: ',
|
|
|
|
required: true},
|
|
|
|
{view: 'datepicker', id: 'emisor_fecha_saldo', format: '%d-%M-%Y',
|
2017-11-17 14:13:39 -06:00
|
|
|
name: 'emisor_fecha_saldo', label: 'Fecha saldo inicial: ',
|
2017-11-17 00:38:06 -06:00
|
|
|
required: true},
|
|
|
|
]},
|
2017-11-11 23:58:11 -06:00
|
|
|
{minHeight: 10},
|
2017-11-17 14:13:39 -06:00
|
|
|
{cols: [{},
|
|
|
|
{view: 'button', id: 'cmd_emisor_agregar_cuenta',
|
|
|
|
label: 'Agregar cuenta'}, {},
|
|
|
|
{view: 'button', id: 'cmd_emisor_eliminar_cuenta',
|
|
|
|
label: 'Eliminar cuenta'},
|
|
|
|
{}]},
|
2017-11-11 23:58:11 -06:00
|
|
|
],
|
|
|
|
|
|
|
|
rules: {
|
|
|
|
emisor_cuenta_saldo_inicial: function(value){return value.trim() != "$";},
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
{minHeight: 20},
|
|
|
|
{template: 'Cuentas de banco existentes', type: 'section'},
|
|
|
|
grid_emisor_cuentas_banco,
|
|
|
|
{minHeight: 50},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-10-07 00:16:58 -05:00
|
|
|
var controls_emisor = [
|
|
|
|
{
|
|
|
|
view: 'tabview',
|
|
|
|
id: 'tab_emisor',
|
|
|
|
tabbar: {options: [
|
|
|
|
'Datos Fiscales',
|
|
|
|
'Otros Datos',
|
2017-11-11 23:58:11 -06:00
|
|
|
'Certificado',
|
|
|
|
'Cuentas de Banco']},
|
2017-10-07 00:16:58 -05:00
|
|
|
animate: true,
|
|
|
|
cells: [
|
|
|
|
{id: 'Datos Fiscales', rows: emisor_datos_fiscales},
|
|
|
|
{id: 'Otros Datos', rows: emisor_otros_datos},
|
|
|
|
{id: 'Certificado', rows: emisor_certificado},
|
2017-11-25 11:39:01 -06:00
|
|
|
{id: 'Cuentas de Banco', rows: emisor_cuentas_banco},
|
2017-10-07 00:16:58 -05:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var form_emisor = {
|
|
|
|
type: 'space',
|
2017-11-25 11:39:01 -06:00
|
|
|
responsive: true,
|
2017-10-07 00:16:58 -05:00
|
|
|
cols: [{
|
|
|
|
view: 'form',
|
|
|
|
id: 'form_emisor',
|
|
|
|
complexData: true,
|
2017-11-25 11:39:01 -06:00
|
|
|
scroll: true,
|
2017-10-07 00:16:58 -05:00
|
|
|
elements: controls_emisor,
|
|
|
|
elementsConfig: {
|
|
|
|
labelWidth: 150,
|
|
|
|
labelAlign: 'right'
|
|
|
|
},
|
2017-11-25 11:39:01 -06:00
|
|
|
//~ autoheight: true,
|
2017-10-07 00:16:58 -05:00
|
|
|
rules: {
|
|
|
|
emisor_nombre: function(value){return value.trim() != ''},
|
|
|
|
}
|
2017-11-15 00:12:55 -06:00
|
|
|
}],
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var options_usarcon = [
|
|
|
|
{id: 'S', value: 'Todos'},
|
|
|
|
{id: 'I', value: 'Ingreso'},
|
|
|
|
{id: 'E', value: 'Egreso'},
|
|
|
|
{id: 'T', value: 'Traslado'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_folios_cols = [
|
|
|
|
{id: 'delete', header: '', width: 30, css: 'delete'},
|
|
|
|
{id: 'serie', header: 'Serie', fillspace: 1},
|
|
|
|
{id: 'inicio', header: 'Inicio', fillspace: 1},
|
|
|
|
{id: 'usarcon', header: 'Usar Con', fillspace: 1},
|
2017-10-09 23:34:16 -05:00
|
|
|
{id: 'pre', header: 'Predeterminado', fillspace: 1}
|
2017-10-07 00:16:58 -05:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_folios = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_folios',
|
|
|
|
select: 'row',
|
|
|
|
adjust: true,
|
|
|
|
headermenu: true,
|
2017-11-15 00:12:55 -06:00
|
|
|
columns: grid_folios_cols,
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var emisor_folios = [
|
|
|
|
{template: 'Nueva serie', type: 'section'},
|
|
|
|
{cols: [
|
|
|
|
{view: 'text', id: 'folio_serie', name: 'folio_serie', label: 'Serie: ',
|
|
|
|
required: true, attributes: {maxlength: 15}},
|
|
|
|
{view: 'counter', id: 'folio_inicio', name: 'folio_inicio', value: 1,
|
2017-10-09 23:34:16 -05:00
|
|
|
required: true, label: 'Inicio: ', step: 1, min: 1},
|
2017-10-07 00:16:58 -05:00
|
|
|
{view: 'richselect', id: 'folio_usarcon', name: 'folio_usarcon',
|
|
|
|
label: 'Usar Con: ', value: 'S', required: true,
|
|
|
|
options: options_usarcon},
|
|
|
|
]},
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{},
|
|
|
|
{view: 'button', id: 'cmd_agregar_serie', label: 'Agregar Serie',
|
|
|
|
autowidth: true, type: 'form'},
|
|
|
|
{}]},
|
|
|
|
{template: 'Series guardadas', type: 'section'},
|
|
|
|
grid_folios
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-10-16 00:02:51 -05:00
|
|
|
var emisor_correo = [
|
|
|
|
{template: 'Servidor de Salida', type: 'section'},
|
|
|
|
{cols: [
|
|
|
|
{view: 'text', id: 'correo_servidor', name: 'correo_servidor',
|
|
|
|
label: 'Servidor SMTP: '},
|
|
|
|
{}]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'counter', id: 'correo_puerto', name: 'correo_puerto',
|
|
|
|
label: 'Puerto: ', value: 26, step: 1},
|
|
|
|
{}]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'checkbox', id: 'correo_ssl', name: 'correo_ssl',
|
|
|
|
label: 'Usar TLS/SSL: '},
|
|
|
|
{}]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'text', id: 'correo_usuario', name: 'correo_usuario',
|
|
|
|
label: 'Usuario: '},
|
|
|
|
{}]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'text', id: 'correo_contra', name: 'correo_contra',
|
|
|
|
label: 'Contraseña: ', type: 'password'},
|
|
|
|
{}]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'text', id: 'correo_copia', name: 'correo_copia',
|
|
|
|
label: 'Con copia a: '}
|
|
|
|
]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'text', id: 'correo_asunto', name: 'correo_asunto',
|
|
|
|
label: 'Asunto del correo: '}
|
|
|
|
]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'textarea', id: 'correo_mensaje', name: 'correo_mensaje',
|
|
|
|
label: 'Mensaje del correo: ', height: 200}
|
|
|
|
]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'checkbox', id: 'correo_directo', name: 'correo_directo',
|
|
|
|
label: 'Enviar directamente: '},
|
|
|
|
{}]},
|
|
|
|
{minHeight: 25},
|
|
|
|
{cols: [{},
|
|
|
|
{view: 'button', id: 'cmd_probar_correo', label: 'Probar Configuración',
|
|
|
|
autowidth: true, type: 'form'},
|
|
|
|
{maxWidth: 100},
|
|
|
|
{view: 'button', id: 'cmd_guardar_correo', label: 'Guardar Configuración',
|
|
|
|
autowidth: true, type: 'form'},
|
|
|
|
{}]}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-10-07 00:16:58 -05:00
|
|
|
var controls_folios = [
|
|
|
|
{
|
|
|
|
view: 'tabview',
|
|
|
|
id: 'tab_folios',
|
|
|
|
tabbar: {options: ['Folios']},
|
|
|
|
animate: true,
|
|
|
|
cells: [
|
|
|
|
{id: 'Folios', rows: emisor_folios},
|
|
|
|
{},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-10-16 00:02:51 -05:00
|
|
|
var controls_correo = [
|
|
|
|
{
|
|
|
|
view: 'tabview',
|
|
|
|
id: 'tab_correo',
|
|
|
|
tabbar: {options: ['Correo Electrónico']},
|
|
|
|
animate: true,
|
|
|
|
cells: [
|
|
|
|
{id: 'Correo Electrónico', rows: emisor_correo},
|
|
|
|
{},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-10-07 00:16:58 -05:00
|
|
|
var form_folios = {
|
|
|
|
type: 'space',
|
|
|
|
cols: [{
|
|
|
|
view: 'form',
|
|
|
|
id: 'form_folios',
|
|
|
|
complexData: true,
|
|
|
|
elements: controls_folios,
|
|
|
|
elementsConfig: {
|
|
|
|
labelWidth: 100,
|
|
|
|
labelAlign: 'right'
|
|
|
|
},
|
|
|
|
autoheight: true,
|
|
|
|
rules: {
|
2017-10-09 23:34:16 -05:00
|
|
|
folio_serie: function(value){return value.trim() != ''},
|
|
|
|
folio_inicio: function(value){return value > 0},
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
2017-11-15 00:12:55 -06:00
|
|
|
}],
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-10-16 00:02:51 -05:00
|
|
|
var form_correo = {
|
|
|
|
type: 'space',
|
|
|
|
cols: [{
|
|
|
|
view: 'form',
|
|
|
|
id: 'form_correo',
|
|
|
|
complexData: true,
|
|
|
|
elements: controls_correo,
|
|
|
|
elementsConfig: {
|
|
|
|
labelWidth: 150,
|
|
|
|
labelAlign: 'right'
|
|
|
|
},
|
|
|
|
autoheight: true
|
2017-11-15 00:12:55 -06:00
|
|
|
}],
|
2017-10-16 00:02:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-03 20:05:19 -06:00
|
|
|
var options_templates = [
|
|
|
|
{maxHeight: 15},
|
|
|
|
{cols: [{maxWidth: 15},
|
|
|
|
{view: 'search', id: 'txt_plantilla_factura_32', name: 'plantilla_factura_32',
|
|
|
|
label: 'Plantilla Factura v3.2 (ODT): ', labelPosition: 'top',
|
|
|
|
icon: 'file'}, {}]},
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15},
|
|
|
|
{view: 'search', id: 'txt_plantilla_factura_33', labelPosition: 'top',
|
|
|
|
label: 'Plantilla Factura v3.3 (ODT): ', icon: 'file'}, {}]},
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15},
|
|
|
|
{view: 'search', id: 'txt_plantilla_factura_33j', name: 'plantilla_factura_33j',
|
|
|
|
label: 'Plantilla Factura v3.3 (JSON): ', labelPosition: 'top',
|
|
|
|
icon: 'file'}, {}]},
|
2017-11-25 00:17:46 -06:00
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15},
|
|
|
|
{view: 'search', id: 'txt_plantilla_donataria', name: 'plantilla_donataria',
|
|
|
|
label: 'Plantilla Donataria (solo ONGs): ', labelPosition: 'top',
|
|
|
|
icon: 'file'}, {}]},
|
2017-11-03 20:05:19 -06:00
|
|
|
{}]
|
|
|
|
|
|
|
|
|
2017-11-19 14:34:54 -06:00
|
|
|
var options_admin_otros = [
|
|
|
|
{maxHeight: 15},
|
|
|
|
{cols: [{maxWidth: 15},
|
|
|
|
{view: 'checkbox', id: 'chk_config_anticipo', labelWidth: 0,
|
|
|
|
labelRight: 'Ayuda para generar anticipos'},
|
|
|
|
{}]},
|
2017-11-20 00:47:23 -06:00
|
|
|
{cols: [{maxWidth: 15},
|
|
|
|
{view: 'checkbox', id: 'chk_config_ine', labelWidth: 0,
|
|
|
|
labelRight: 'Mostrar el complemento INE al facturar'},
|
|
|
|
{}]},
|
2017-11-19 14:34:54 -06:00
|
|
|
{maxHeight: 20},
|
|
|
|
{}]
|
|
|
|
|
|
|
|
|
2017-11-03 20:05:19 -06:00
|
|
|
var tab_options = {
|
|
|
|
view: 'tabview',
|
|
|
|
id: 'tab_options',
|
|
|
|
multiview: true,
|
|
|
|
tabbar: {options: [
|
|
|
|
'Plantillas',
|
|
|
|
'Otros']},
|
|
|
|
animate: true,
|
|
|
|
cells: [
|
|
|
|
{id: 'Plantillas', rows: options_templates},
|
2017-11-19 14:34:54 -06:00
|
|
|
{id: 'Otros', rows: options_admin_otros},
|
2017-11-03 20:05:19 -06:00
|
|
|
{},
|
2017-11-15 00:12:55 -06:00
|
|
|
],
|
2017-11-03 20:05:19 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-29 23:57:31 -06:00
|
|
|
var utilidades_archivos = [
|
|
|
|
{maxHeight: 15},
|
|
|
|
{template: 'Cargar Base de Datos de Factura Libre', type: 'section'},
|
|
|
|
{view: 'form', id: 'form_upload_bdfl', rows: [
|
|
|
|
{cols: [{},
|
|
|
|
{view: 'uploader', id: 'up_bdfl', autosend: false, link: 'lst_bdfl',
|
|
|
|
value: 'Seleccionar base de datos', upload: '/files/bdfl'}, {}]},
|
|
|
|
{cols: [{},
|
|
|
|
{view: 'list', id: 'lst_bdfl', name: 'bdfl',
|
|
|
|
type: 'uploader', autoheight: true, borderless: true}, {}]},
|
|
|
|
{cols: [{}, {view: 'button', id: 'cmd_subir_bdfl',
|
|
|
|
label: 'Subir base de datos de Factura Libre'}, {}]},
|
|
|
|
]},
|
|
|
|
{}]
|
|
|
|
|
|
|
|
|
|
|
|
var tab_utilidades = {
|
|
|
|
view: 'tabview',
|
|
|
|
id: 'tab_utilidades',
|
|
|
|
multiview: true,
|
|
|
|
animate: true,
|
|
|
|
cells: [
|
|
|
|
{id: 'Utilidades', rows: utilidades_archivos},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-03 22:23:15 -06:00
|
|
|
var grid_admin_taxes_cols = [
|
|
|
|
{id: 'id', header: 'ID', hidden: true},
|
2017-11-15 00:12:55 -06:00
|
|
|
{id: 'delete', header: '', width: 30, css: 'delete'},
|
|
|
|
{id: 'name', header: 'Nombre', adjust: 'data'},
|
2017-11-03 22:23:15 -06:00
|
|
|
{id: 'tipo', header: 'Tipo'},
|
|
|
|
{id: 'tasa', header: 'Tasa'},
|
|
|
|
{id: 'activo', header: 'Activo', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox'},
|
|
|
|
{id: 'default', header: 'Predeterminado', template: '{common.radio()}',
|
|
|
|
adjust: 'header'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-06 22:59:39 -06:00
|
|
|
var grid_admin_monedas_cols = [
|
|
|
|
{id: 'id', header: 'ID', hidden: true},
|
|
|
|
{id: 'key', header: 'Clave'},
|
|
|
|
{id: 'name', header: 'Nombre', adjust: 'data'},
|
|
|
|
{id: 'activo', header: 'Activa', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox'},
|
|
|
|
{id: 'default', header: 'Predeterminada', template: '{common.radio()}',
|
|
|
|
adjust: 'header'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-11 20:21:00 -06:00
|
|
|
var grid_admin_bancos_cols = [
|
|
|
|
{id: 'id', header: 'ID', hidden: true},
|
|
|
|
{id: 'key', header: 'Clave', footer: {content: 'rowCount', css: 'right'}},
|
|
|
|
{id: 'name', header: 'Nombre', adjust: 'data', footer: 'Bancos'},
|
|
|
|
{id: 'activo', header: 'Activo', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-12 17:49:06 -06:00
|
|
|
var grid_admin_unidades_cols = [
|
|
|
|
{id: 'id', header: 'ID', hidden: true},
|
|
|
|
{id: 'key', header: 'Clave'},
|
|
|
|
{id: 'name', header: 'Nombre', adjust: 'data'},
|
|
|
|
{id: 'activo', header: 'Activa', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox'},
|
|
|
|
{id: 'default', header: 'Predeterminada', template: '{common.radio()}',
|
|
|
|
adjust: 'header'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-03 22:23:15 -06:00
|
|
|
var grid_admin_taxes = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_admin_taxes',
|
|
|
|
select: 'cell',
|
2017-11-26 13:39:32 -06:00
|
|
|
//~ multiselect: true,
|
2017-11-03 22:23:15 -06:00
|
|
|
adjust: true,
|
|
|
|
autoheight: true,
|
|
|
|
autowidth: true,
|
|
|
|
headermenu: true,
|
2017-11-15 00:12:55 -06:00
|
|
|
columns: grid_admin_taxes_cols,
|
2017-11-03 22:23:15 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-06 22:59:39 -06:00
|
|
|
var grid_admin_monedas = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_admin_monedas',
|
|
|
|
select: 'cell',
|
2017-11-26 13:39:32 -06:00
|
|
|
//~ multiselect: true,
|
2017-11-06 22:59:39 -06:00
|
|
|
adjust: true,
|
|
|
|
autoheight: true,
|
|
|
|
autowidth: true,
|
|
|
|
headermenu: true,
|
2017-11-15 00:12:55 -06:00
|
|
|
columns: grid_admin_monedas_cols,
|
2017-11-06 22:59:39 -06:00
|
|
|
}
|
2017-11-03 22:23:15 -06:00
|
|
|
|
2017-11-06 22:59:39 -06:00
|
|
|
|
2017-11-11 20:21:00 -06:00
|
|
|
var grid_admin_bancos = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_admin_bancos',
|
|
|
|
select: 'cell',
|
2017-11-26 13:39:32 -06:00
|
|
|
//~ multiselect: true,
|
2017-11-11 20:21:00 -06:00
|
|
|
adjust: true,
|
|
|
|
autowidth: true,
|
|
|
|
headermenu: true,
|
|
|
|
footer: true,
|
2017-11-15 00:12:55 -06:00
|
|
|
columns: grid_admin_bancos_cols,
|
2017-11-11 20:21:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 17:49:06 -06:00
|
|
|
var grid_admin_unidades = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_admin_unidades',
|
|
|
|
select: 'cell',
|
2017-11-26 13:39:32 -06:00
|
|
|
//~ multiselect: true,
|
2017-11-12 17:49:06 -06:00
|
|
|
adjust: true,
|
|
|
|
autowidth: true,
|
|
|
|
autoheight: true,
|
|
|
|
headermenu: true,
|
|
|
|
footer: true,
|
2017-11-15 00:12:55 -06:00
|
|
|
columns: grid_admin_unidades_cols,
|
2017-11-12 17:49:06 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-26 13:39:32 -06:00
|
|
|
var grid_admin_formasdepago_cols = [
|
|
|
|
{id: 'id', header: 'ID', hidden: true},
|
|
|
|
{id: 'key', header: 'Clave'},
|
|
|
|
{id: 'name', header: 'Nombre', adjust: 'data'},
|
|
|
|
{id: 'activo', header: 'Activa', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox'},
|
|
|
|
{id: 'default', header: 'Predeterminada', template: '{common.radio()}',
|
|
|
|
adjust: 'header'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_admin_formasdepago = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_admin_formasdepago',
|
|
|
|
select: 'cell',
|
|
|
|
//~ multiselect: true,
|
|
|
|
adjust: true,
|
|
|
|
autowidth: true,
|
|
|
|
//~ autoheight: true,
|
|
|
|
headermenu: true,
|
|
|
|
footer: true,
|
|
|
|
columns: grid_admin_formasdepago_cols,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-15 00:12:55 -06:00
|
|
|
var admin_sat_impuestos = {cols: [{maxWidth: 15},
|
|
|
|
{view: 'richselect', id: 'lst_admin_impuestos', label: 'Impuesto', options:
|
|
|
|
['ISR', 'IVA', 'IEPS', 'ISH', 'INSPECCION DE OBRA', 'ICIC', 'CEDULAR'],
|
|
|
|
labelAlign: 'right', required: true},
|
|
|
|
{view: 'text', id: 'txt_admin_tasa', label: 'Tasa', labelAlign: 'right',
|
|
|
|
required: true},
|
|
|
|
{view: 'button', id: 'cmd_agregar_impuesto', label: 'Agregar',
|
|
|
|
autowidth: true, type: 'iconButton', icon: 'plus'},
|
|
|
|
{}],}
|
|
|
|
|
|
|
|
|
2017-11-06 22:59:39 -06:00
|
|
|
var msg_tax = 'Activa los impuestos que uses. El predeterminado se muestra primero'
|
2017-11-03 22:23:15 -06:00
|
|
|
var sat_impuestos = [
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15}, {view: 'label', label: msg_tax}, {}]},
|
|
|
|
{maxHeight: 20},
|
2017-11-15 00:12:55 -06:00
|
|
|
{cols: [{maxWidth: 15}, admin_sat_impuestos]},
|
|
|
|
{maxHeight: 20},
|
2017-11-03 22:23:15 -06:00
|
|
|
{cols: [{maxWidth: 15}, grid_admin_taxes, {}]},
|
|
|
|
{}]
|
|
|
|
|
2017-11-11 20:21:00 -06:00
|
|
|
|
2017-11-06 22:59:39 -06:00
|
|
|
var msg_moneda = 'Activa las monedas que uses. La predeterminada se muestra primero'
|
|
|
|
var sat_monedas = [
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15}, {view: 'label', label: msg_moneda}, {}]},
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15}, grid_admin_monedas, {}]},
|
|
|
|
{}]
|
|
|
|
|
2017-11-03 22:23:15 -06:00
|
|
|
|
2017-11-12 17:49:06 -06:00
|
|
|
var msg_bancos = 'Activar los bancos necesarios'
|
2017-11-11 20:21:00 -06:00
|
|
|
var sat_bancos = [
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15}, {view: 'label', label: msg_bancos}, {}]},
|
|
|
|
{maxHeight: 20},
|
2017-11-11 20:23:06 -06:00
|
|
|
{cols: [{maxWidth: 15}, grid_admin_bancos, {}]},
|
|
|
|
{maxHeight: 20},
|
2017-11-11 20:21:00 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-14 20:04:01 -06:00
|
|
|
var suggest_sat_unidad = {
|
|
|
|
view: 'gridsuggest',
|
|
|
|
id: 'grid_unidad_found',
|
|
|
|
name: 'grid_unidad_found',
|
|
|
|
body: {
|
|
|
|
autoConfig: false,
|
|
|
|
scroll:true,
|
|
|
|
autoheight:false,
|
|
|
|
header: true,
|
|
|
|
yCount: 10,
|
|
|
|
columns: [
|
|
|
|
{id: 'id', hidden: true},
|
|
|
|
{id: 'key', adjust: 'data', header: 'Clave'},
|
|
|
|
{id: 'name', adjust: 'data', header: 'Unidad'},
|
|
|
|
],
|
|
|
|
dataFeed:function(text){
|
|
|
|
if (text.length > 2){
|
|
|
|
this.load('/values/satunidades?key=' + text)
|
|
|
|
}else{
|
|
|
|
this.hide()
|
|
|
|
}
|
|
|
|
}
|
2017-11-15 00:12:55 -06:00
|
|
|
},
|
2017-11-14 20:04:01 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var buscar_nueva_unidad = {
|
|
|
|
view: 'search',
|
|
|
|
id: 'buscar_nueva_unidad',
|
|
|
|
label: 'Buscar Unidad en el catálogo del SAT',
|
|
|
|
labelPosition: 'top',
|
|
|
|
suggest: suggest_sat_unidad,
|
|
|
|
placeholder: 'Por clave o descripción. Captura al menos tres letras',
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 17:49:06 -06:00
|
|
|
var msg_unidades = 'Activar las unidades necesarias'
|
|
|
|
var sat_unidades = [
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15}, {view: 'label', label: msg_unidades}, {}]},
|
|
|
|
{maxHeight: 20},
|
2017-11-14 20:04:01 -06:00
|
|
|
{cols: [{maxWidth: 15}, buscar_nueva_unidad, {}]},
|
|
|
|
{maxHeight: 20},
|
2017-11-12 17:49:06 -06:00
|
|
|
{cols: [{maxWidth: 15}, grid_admin_unidades, {}]},
|
|
|
|
{},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-26 13:39:32 -06:00
|
|
|
var msg_formasdepago = 'Activar las formas de pago.'
|
|
|
|
var sat_formasdepago = [
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15}, {view: 'label', label: msg_formasdepago}, {}]},
|
|
|
|
{maxHeight: 20},
|
|
|
|
{cols: [{maxWidth: 15}, grid_admin_formasdepago, {}]},
|
|
|
|
{maxHeight: 20},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-11-03 22:23:15 -06:00
|
|
|
var tab_sat = {
|
|
|
|
view: 'tabview',
|
|
|
|
id: 'tab_sat',
|
|
|
|
multiview: true,
|
2017-11-26 13:39:32 -06:00
|
|
|
//~ tabbar: {options: [
|
|
|
|
//~ 'Impuestos',
|
|
|
|
//~ 'Monedas',
|
|
|
|
//~ 'Bancos',
|
|
|
|
//~ 'Unidades'
|
|
|
|
//~ ]},
|
2017-11-03 22:23:15 -06:00
|
|
|
animate: true,
|
|
|
|
cells: [
|
|
|
|
{id: 'Impuestos', rows: sat_impuestos},
|
2017-11-06 22:59:39 -06:00
|
|
|
{id: 'Monedas', rows: sat_monedas},
|
2017-11-11 20:21:00 -06:00
|
|
|
{id: 'Bancos', rows: sat_bancos},
|
2017-11-12 17:49:06 -06:00
|
|
|
{id: 'Unidades', rows: sat_unidades},
|
2017-11-26 13:39:32 -06:00
|
|
|
{id: 'Formas de Pago', rows: sat_formasdepago},
|
2017-11-15 00:12:55 -06:00
|
|
|
],
|
2017-11-03 22:23:15 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-03 21:13:31 -06:00
|
|
|
var usuarios_agregar = [{cols: [
|
|
|
|
{maxWidth: 20},
|
|
|
|
{view: 'text', id: 'txt_usuario_usuario', name: 'usuario_usuario',
|
|
|
|
label: 'Usuario: ', labelPosition: 'top', required: true},
|
|
|
|
{view: 'text', id: 'txt_usuario_contra1', name: 'usuario_contra1',
|
|
|
|
required: true, label: 'Contraseña: ', type: 'password',
|
|
|
|
labelPosition: 'top'},
|
|
|
|
{view: 'text', id: 'txt_usuario_contra2', name: 'usuario_contra2',
|
|
|
|
required: true, label: 'Confirmación de contraseña: ',
|
|
|
|
type: 'password', labelPosition: 'top'},
|
|
|
|
{view: 'button', id: 'cmd_usuario_agregar', label: 'Agregar',
|
|
|
|
autowidth: true, type: 'iconButton', icon: 'plus'},
|
|
|
|
{maxWidth: 20},
|
|
|
|
]}]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_usuarios_cols = [
|
|
|
|
{id: 'id', header: 'ID', hidden: true},
|
|
|
|
{id: 'delete', header: '', width: 30, css: 'delete'},
|
|
|
|
{id: 'usuario', header: 'Usuario', fillspace: 1},
|
|
|
|
{id: 'nombre', header: 'Nombre', fillspace: 1},
|
|
|
|
{id: 'apellidos', header: 'Apellidos', fillspace: 2},
|
|
|
|
{id: 'correo', header: 'Correo Electrónico', fillspace: 2},
|
|
|
|
{id: 'fecha_ingreso', header: 'Fecha de Ingreso', fillspace: 1,
|
|
|
|
hidden: true},
|
|
|
|
{id: 'ultimo_ingreso', header: 'Ultimo Ingreso', fillspace: 1,
|
|
|
|
hidden: true},
|
|
|
|
{id: 'es_activo', header: 'Activo', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox', adjust: 'header'},
|
|
|
|
{id: 'es_admin', header: 'Es Admin', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox', adjust: 'header'},
|
|
|
|
{id: 'es_superusuario', header: 'Es SU', template: '{common.checkbox()}',
|
|
|
|
editor: 'checkbox', adjust: 'header'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_usuarios = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_usuarios',
|
|
|
|
select: 'row',
|
|
|
|
adjust: true,
|
|
|
|
headermenu: true,
|
|
|
|
footer: true,
|
|
|
|
columns: grid_usuarios_cols,
|
|
|
|
on:{
|
|
|
|
'data->onStoreUpdated':function(){
|
|
|
|
this.data.each(function(obj, i){
|
|
|
|
obj.delete = '-'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var usuarios_admin = [
|
|
|
|
{maxHeight: 10},
|
|
|
|
{template: 'Agregar Usuario', type: 'section'},
|
|
|
|
{view: 'form', id: 'form_usuario', rows: usuarios_agregar},
|
|
|
|
{maxHeight: 20},
|
|
|
|
{template: 'Usuarios Registrados', type: 'section'},
|
|
|
|
{cols: [{maxWidth: 10}, grid_usuarios, {maxWidth: 10}]},
|
|
|
|
{},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var tab_usuarios = {
|
|
|
|
view: 'tabview',
|
|
|
|
id: 'tab_usuarios',
|
|
|
|
multiview: true,
|
|
|
|
animate: true,
|
|
|
|
cells: [
|
|
|
|
{id: 'Usuarios', rows: usuarios_admin},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-10-07 00:16:58 -05:00
|
|
|
var app_emisor = {
|
|
|
|
id: 'app_emisor',
|
|
|
|
rows:[
|
|
|
|
{view: 'template', id: 'th_emisor', type: 'header',
|
|
|
|
template: 'Emisor'},
|
|
|
|
form_emisor,
|
|
|
|
{maxHeight: 20},
|
|
|
|
{margin: 10, cols: [{},
|
|
|
|
{view: 'button', id: 'cmd_save_emisor', label: 'Guardar' ,
|
|
|
|
type: 'form', autowidth: true, align: 'center'},
|
|
|
|
{}]
|
|
|
|
},
|
2017-11-25 11:39:01 -06:00
|
|
|
{maxHeight: 20},
|
2017-11-15 00:12:55 -06:00
|
|
|
],
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var app_folios = {
|
|
|
|
id: 'app_folios',
|
|
|
|
rows:[
|
|
|
|
{view: 'template', id: 'th_folios', type: 'header',
|
|
|
|
template: 'Folios'},
|
|
|
|
form_folios,
|
|
|
|
{},
|
2017-11-15 00:12:55 -06:00
|
|
|
],
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
2017-09-21 23:24:18 -05:00
|
|
|
|
|
|
|
|
2017-10-16 00:02:51 -05:00
|
|
|
var app_correo = {
|
|
|
|
id: 'app_correo',
|
|
|
|
rows:[
|
|
|
|
{view: 'template', id: 'th_correo', type: 'header',
|
|
|
|
template: 'Configuración de correo'},
|
|
|
|
form_correo,
|
|
|
|
{},
|
2017-11-15 00:12:55 -06:00
|
|
|
],
|
2017-10-16 00:02:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-03 20:05:19 -06:00
|
|
|
var app_sat = {
|
|
|
|
id: 'app_sat',
|
|
|
|
rows:[
|
|
|
|
{view: 'template', id: 'th_sat', type: 'header',
|
|
|
|
template: 'Catálogos del SAT'},
|
2017-11-03 22:23:15 -06:00
|
|
|
tab_sat,
|
2017-11-15 00:12:55 -06:00
|
|
|
],
|
2017-11-03 20:05:19 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-03 21:13:31 -06:00
|
|
|
var app_usuarios = {
|
|
|
|
id: 'app_usuarios',
|
|
|
|
rows:[
|
|
|
|
{view: 'template', id: 'th_usuarios', type: 'header',
|
|
|
|
template: 'Administración de Usuarios'},
|
|
|
|
tab_usuarios,
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-03 20:05:19 -06:00
|
|
|
var app_options = {
|
|
|
|
id: 'app_options',
|
|
|
|
rows:[
|
|
|
|
{view: 'template', id: 'th_options', type: 'header',
|
|
|
|
template: 'Opciones'},
|
|
|
|
tab_options,
|
2017-11-15 00:12:55 -06:00
|
|
|
],
|
2017-11-03 20:05:19 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-29 23:57:31 -06:00
|
|
|
var app_utilidades = {
|
|
|
|
id: 'app_utilidades',
|
|
|
|
rows:[
|
|
|
|
{view: 'template', id: 'th_utilidades', type: 'header',
|
|
|
|
template: 'Herramientas'},
|
|
|
|
tab_utilidades,
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-10-07 23:52:11 -05:00
|
|
|
var multi_admin = {
|
|
|
|
id: 'multi_admin',
|
2017-09-21 23:24:18 -05:00
|
|
|
animate: true,
|
|
|
|
cells:[
|
|
|
|
{
|
2017-10-07 23:52:11 -05:00
|
|
|
id: 'app_admin_home',
|
2017-09-21 23:24:18 -05:00
|
|
|
view: 'template',
|
2017-11-03 20:05:19 -06:00
|
|
|
template: 'Admin Inicio'
|
2017-10-07 00:16:58 -05:00
|
|
|
},
|
|
|
|
app_emisor,
|
|
|
|
app_folios,
|
2017-10-16 00:02:51 -05:00
|
|
|
app_correo,
|
2017-11-03 20:05:19 -06:00
|
|
|
app_sat,
|
2017-12-03 21:13:31 -06:00
|
|
|
app_usuarios,
|
2017-11-03 20:05:19 -06:00
|
|
|
app_options,
|
2017-11-29 23:57:31 -06:00
|
|
|
app_utilidades,
|
2017-11-15 00:12:55 -06:00
|
|
|
],
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
2017-09-21 23:24:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
var menu_user = {
|
|
|
|
view: 'menu',
|
|
|
|
id: 'menu_user',
|
|
|
|
width: 150,
|
|
|
|
autowidth: true,
|
|
|
|
data: [
|
|
|
|
{id: '0', value: 'User...', submenu:[{id:1, value:'Cerrar Sesión'}]},
|
|
|
|
],
|
|
|
|
type: {
|
|
|
|
subsign: true,
|
2017-11-15 00:12:55 -06:00
|
|
|
},
|
2017-11-03 14:09:34 -06:00
|
|
|
}
|
|
|
|
|
2017-09-21 23:24:18 -05:00
|
|
|
|
|
|
|
var ui_admin = {
|
|
|
|
rows: [
|
|
|
|
{view: 'toolbar', padding: 3, elements: [
|
|
|
|
{view: 'button', type: 'icon', icon: 'bars',
|
|
|
|
width: 37, align: 'left', css: 'app_button', click: function(){
|
2017-11-03 20:05:19 -06:00
|
|
|
$$('sidebar_admin').toggle()
|
2017-09-21 23:24:18 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{view: 'label', label: 'Empresa Libre - Configuración'},
|
|
|
|
{},
|
|
|
|
{view: 'button', type: 'icon', width: 40, css: 'app_button',
|
|
|
|
icon: 'home', click: 'cmd_home_click'},
|
|
|
|
menu_user
|
|
|
|
]},
|
|
|
|
{
|
|
|
|
cols:[
|
2017-11-03 20:05:19 -06:00
|
|
|
sidebar_admin,
|
2017-10-07 23:52:11 -05:00
|
|
|
multi_admin,
|
2017-09-21 23:24:18 -05:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2017-11-15 00:12:55 -06:00
|
|
|
}
|
2017-11-03 14:09:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var body_win_emisor_logo = [
|
|
|
|
{view: 'uploader', id: 'up_emisor_logo', autosend: true, link: 'lst_logo',
|
|
|
|
value: 'Seleccionar logotipo', upload: '/files/emisorlogo', width: 200,
|
|
|
|
accept: "image/png, image/gif, image/jpeg"},
|
|
|
|
{view: 'list', id: 'lst_logo', name: 'logo',
|
|
|
|
type: 'uploader', autoheight:true, borderless: true},
|
|
|
|
{},
|
|
|
|
{cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
|
|
|
|
click:("$$('win_emisor_logo').close();")}, {}]}
|
|
|
|
]
|
2017-11-03 22:23:15 -06:00
|
|
|
|
2017-12-03 21:13:31 -06:00
|
|
|
|
|
|
|
|