2018-12 07 08:48:13
Nuevo(3,1)
Caso :7
2018-12 07 08:48:13
cargar datos del sujeto(,,s,3,7)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_3 w
inner join core_sujetoverificacion s on w.id=7 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2018-12 07 08:48:13
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=7
2018-12 07 08:48:13
tabla :core_sujetoverificaciongeneral
SELECT * FROM core_sujetoverificaciongeneral where id=3
CasoSeguimiento :13
EjecutarTarea_4() 1. Registro - Modelo de negocio id_comp1017
1
ValidarUsuario(4):1
EjecutarPaso_5: form:15 , caso=7 id_comp 1017
Mostrar form
fin 2018-12-07 08:48:13
/******************************************************************************************************/
fin 2018-12-07 08:48:13
/******************************************************************************************************/
2018-12 07 08:55:00
Continuar(s,4,5,)
EjecutarTarea_4() 1. Registro - Modelo de negocio id_comp1017
1
ValidarUsuario(4):1
EjecutarPaso_5: form:15 , caso=7 id_comp 1017
Paso::Guardar(Caso:7)
Datos a guardar:
Array
(
[wf_proceso_id] => 3
[wf_paso_id] => 5
[wf_tarea_id] => 4
[wf_caso_id] => 7
[id] => 1017
[accion] => nextPaso
[reg] => s
[rta] => n
[cod_formulario2] => 15
[id_periodo] => 2018
[obs_ingreso] =>
[cod_bloque] => 15
[oid] =>
[oid_maestro] =>
[298] => CRIADERO DE GALLINAS
[281] => GALLINERO
[282] => 2018-12-07
[283] =>
)
OID: 5
rta: 1 dato:5 tabla:sce.t15
CasoPaso:26
CargarDatos_5(5)
se carga 3_4_5_15_15_298CRIADERO DE GALLINAS
se carga 3_4_5_15_15_283
se carga 3_4_5_15_15_2822018-12-07
se carga 3_4_5_15_15_281GALLINERO
SiguientePasoDe5: Funcion para ejecutar el siguiente paso
Condicion Tarea : true
TerminarTarea(4,5)
Ultimo seg :13
Ultimo seg :14
EjecutarTarea_5() 2. Inversiones id_comp1017
1 1
ValidarUsuario(5):1
EjecutarPaso_6: form:8 , caso=7 id_comp 1017
Mostrar form
Retorno :
Array
(
[ret] => Ext.getCmp('comp_1017').removeAll();Ext.getCmp('comp_1017').add(new Ext.form.FormPanel({ title: 'Inversiones' ,padding: 10,id:'frm_formulario_3_7',autoScroll:true ,labelAlign:'top',defaults: { anchor: '97%'} ,items: [new Ext.form.Hidden({name:'cod_formulario2',value:'8'}) ,new Ext.form.Hidden({name :'id_periodo',value:'2018'}) ,new Ext.form.Hidden({name :'obs_ingreso',value:''}) ,new Ext.form.Hidden({name:'cod_bloque',value:'8'}) ,new Ext.form.Hidden({name :'oid',value:''}) ,new Ext.form.Hidden({name :'oid_maestro',value:''}) ,{value:'',xtype:'textfield' , maxLength:200,autoCreate:{ tag:'input',maxlength:'200'} ,listeners:{ blur:function(){ this.setValue(this.getValue().toUpperCase()); } } ,allowBlank:false,id:'243',fieldLabel:'* Nombre inversión' },{ xtype:'hidden',id:'hds244',disabled:true },{xtype:'compositefield',fieldLabel:' Tipo de inversión',items:[ new Ext.form.ComboBox({flex:1,listeners:{ select:function(){xajax_comprobar_campoOcultoSelect(this.getValue(),244);},afterrender:function(){ xajax_comprobar_campoOcultoSelect(this.getValue(),244); }},anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'13',id:'OID',et1:'tip_inv'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:50,loadValor:function(val,data){if(data)this.getStore().loadData(data);else this.getStore().load();this.setValue(val);},hiddenName:'244', id:'inp_244',fieldLabel:' Tipo de inversión' }),{xtype:'button',width:40,flex:1,iconCls:'icon-add',handler:function(){xajax_iniciarPintarFormulario({cod_formulario2:'13',id_periodo:'2018',obs_ingreso:'',contenedor_nuevo:'_13'},'n');}}]} ,{value:'',xtype:'numberfield' , maxLength:200,autoCreate:{ tag:'input',maxlength:'200'} ,readOnly:true,id:'245',fieldLabel:'Total Gastos proyectados' },{ xtype:'hidden',id:'hdcampo247',value:'4'},{ xtype:'hidden',id:'247'}, new Ext.grid.EditorGridPanel({xtype:'editorgrid',store:new Ext.data.JsonStore({ fields:[{ name:'oid' },{ name:'cant_gas_proy' },{ name:'desc_gas_proy' },{ name:'cat_gas_proy' },{ name:'cat_gas_proy_txt' },{ name:'vu_gas_proy' },{ name:'vt_gas_proy' }]}),columns:[new Ext.grid.RowNumberer({width:30}),{header:'Cantidad',dataIndex:'cant_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return '
'+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 ,allowBlank:false}},{header:'Descripción',dataIndex:'desc_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'textfield' , maxLength:50 ,allowBlank:false}},{header:'Categoria',dataIndex:'cat_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.cat_gas_proy_txt ?record.data.cat_gas_proy_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'5',id:'OID',et1:'nom_cat'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Valor unitario',dataIndex:'vu_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Valor total',dataIndex:'vt_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }}],stripeRows:true,height:150,id:'247_4',title:'Gastos proyectados',stateful:true,stateId:'grid',autoScroll:true,autoWidth:true,sm:new Ext.grid.RowSelectionModel({singleSelect:false}),anchor:'97%',viewConfig:{forceFit:true,showPreview: true,enableRowBody: false, getRowClass: function(record, rowIndex, rp, ds){ return 'fila-act-sin-pro';},listeners:{rowsinserted:function(view,row,info){this.refresh();},rowremoved:function(view,row,info){this.refresh();}}},tbar:[{iconCls:'icon-add',tooltip:'Agregar',text:'Agregar',handler:function(){xajax_iniciarPintarFormulario({cod_formulario2:'4',id_periodo:'2018',oid_maestro:Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),obs_ingreso:document.getElementsByName('cod_formulario2').item(0).value,contenedor_nuevo:'_4',cod_camp_m:'247'},'n','','411','400');}},{iconCls:'icon-delete',tooltip:'Eliminar',text:'Eliminar',handler:function(){var grid = Ext.getCmp('247_4');var list = grid.getSelectionModel().getSelections();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}Ext.Msg.show({ title:'Advertencia de eliminacion', msg:'Esta seguro que desea eliminar los items seleccionados?', buttons:Ext.Msg.YESNO, animEl:'btnEl', fn:function(btn){ if (btn == 'yes'){grid.store.remove(list);} }, icon:Ext.MessageBox.QUESTION });}},{iconCls:'icon-application_form_edit',tooltip:'Modificar',text:'Modificar',handler:function(){var grid = Ext.getCmp('247_4');var list = grid.getSelectionModel().getSelected();var x_oid=Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}if(x_oid==''){return false;}xajax_iniciarPintarModificarFormulario('4','2018',document.getElementsByName('cod_formulario2').item(0).value,grid.getSelectionModel().getSelected().data.oid,'n','','',Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),'411','400');}}]})/*fgp*/,{ xtype:'hidden',id:'hdcampo277',value:'9'},{ xtype:'hidden',id:'277'}, new Ext.grid.EditorGridPanel({xtype:'editorgrid',store:new Ext.data.JsonStore({ fields:[{ name:'oid' },{ name:'doc_per' },{ name:'nom1_per' },{ name:'nom2_per' },{ name:'ape1_per' },{ name:'ape2_per' },{ name:'tip_cont_per' },{ name:'tip_cont_per_txt' },{ name:'salario_per' },{ name:'ret_per' },{ name:'grid_org_un_per' }]}),columns:[new Ext.grid.RowNumberer({width:30}),{header:'Número de identificación',dataIndex:'doc_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:15 ,allowBlank:false}},{header:'Nombre 1',dataIndex:'nom1_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'textfield' , maxLength:50 ,allowBlank:false}},{header:'Nombre 2',dataIndex:'nom2_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'textfield' , maxLength:50 }},{header:'Apellido 1',dataIndex:'ape1_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'textfield' , maxLength:50 ,allowBlank:false}},{header:'Apellido 2',dataIndex:'ape2_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'textfield' , maxLength:50 }},{header:'Tipo de contrato',dataIndex:'tip_cont_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.tip_cont_per_txt ?record.data.tip_cont_per_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'11',id:'OID',et1:'nom_tip_cont'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Salario',dataIndex:'salario_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Retenciones',dataIndex:'ret_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'textfield' , maxLength:10 }},{header:'Organización/Unidades de Negocio',dataIndex:'grid_org_un_per',width:80,hidden:true,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor: new Ext.form.TextArea({value:''})}],stripeRows:true,height:150,id:'277_9',title:'Peronal ',stateful:true,stateId:'grid',autoScroll:true,autoWidth:true,sm:new Ext.grid.RowSelectionModel({singleSelect:false}),anchor:'97%',viewConfig:{forceFit:true,showPreview: true,enableRowBody: false, getRowClass: function(record, rowIndex, rp, ds){ return 'fila-act-sin-pro';},listeners:{rowsinserted:function(view,row,info){this.refresh();},rowremoved:function(view,row,info){this.refresh();}}},tbar:[{iconCls:'icon-add',tooltip:'Agregar',text:'Agregar',handler:function(){xajax_iniciarPintarFormulario({cod_formulario2:'9',id_periodo:'2018',oid_maestro:Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),obs_ingreso:document.getElementsByName('cod_formulario2').item(0).value,contenedor_nuevo:'_9',cod_camp_m:'277'},'n','','411','400');}},{iconCls:'icon-delete',tooltip:'Eliminar',text:'Eliminar',handler:function(){var grid = Ext.getCmp('277_9');var list = grid.getSelectionModel().getSelections();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}Ext.Msg.show({ title:'Advertencia de eliminacion', msg:'Esta seguro que desea eliminar los items seleccionados?', buttons:Ext.Msg.YESNO, animEl:'btnEl', fn:function(btn){ if (btn == 'yes'){grid.store.remove(list);} }, icon:Ext.MessageBox.QUESTION });}},{iconCls:'icon-application_form_edit',tooltip:'Modificar',text:'Modificar',handler:function(){var grid = Ext.getCmp('277_9');var list = grid.getSelectionModel().getSelected();var x_oid=Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}if(x_oid==''){return false;}xajax_iniciarPintarModificarFormulario('9','2018',document.getElementsByName('cod_formulario2').item(0).value,grid.getSelectionModel().getSelected().data.oid,'n','','',Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),'411','400');}}]})/*fgp*/ ] ,prepararGrids:function(){/*buscar editorgrid - grilla id compuesto, id real, mas id formulario esclavo, separado _*/var grillasF=this.findByType('editorgrid');if(grillasF && grillasF!=''){for (i=0; i < grillasF.length; i++){var xstore=grillasF[i].getStore();if(xstore.getCount()>0){var data=new Array();var xxid=grillasF[i].getId().split('_');for (j=0; j < xstore.getCount(); j++){var xreco = xstore.getAt(j); var cont_dat_vac=0,cont_tot_vac=0; for(var elem in xreco.data){cont_tot_vac++;if( xreco.data[elem] ==null || xreco.data[elem]=='' ){cont_dat_vac++;}} if(cont_dat_vac < cont_tot_vac){data[data.length]=xreco.data;data[data.length-1]['form_master_escribir_xxx']=xxid[1];}}var xfinalfin=Ext.encode(data);Ext.getCmp(xxid[0]).setValue(xfinalfin);}}}/*grabar stores en hiddens*/},tbar:[{text:'Guardar',iconCls: 'icon-disk',handler: function(){ var form = Ext.getCmp('frm_formulario_3_7'); var f=form.getForm();if(f.isValid()){var band_f=true;try{band_f =form.Validar();}catch(e){}if(band_f){form.prepararGrids();f.submit({url:'http://190.121.148.59/sisad16/build/view/'+'workflow/casos/casos_l.php',params:{wf_proceso_id:'3',wf_paso_id:'6',wf_tarea_id:'5',wf_caso_id:'7',id:'1017',accion:'nextPaso',reg:'s',rta:'n'},success:function(form, action){if(action.result.message) crearMsg(action.result.message,'Informacion');else if(action.result.execute){/*try{*/eval(action.result.execute);/*}catch(e){alert(e+'Se presentó un error , por favor cierre la pestaña del caso y continue el proceso desde la pestaña de resumen' );}*/}},failure: function(form, action) {switch (action.failureType) {case Ext.form.Action.CONNECT_FAILURE:Ext.Msg.alert('Error', 'En este momento no hay comunicación con el servidor intente más tarde');break;case Ext.form.Action.SERVER_INVALID: Ext.Msg.alert('Error', action.result.message); break; }}});}}else{Ext.MessageBox.alert('Advertencia',getErrorFields(f));}} } ] ,listeners:{ afterrender:function(){ try{ Ext.getCmp('frm_formulario_3_7').getForm().loadRecord(new Ext.data.Record({"cod_formulario":8,"oid_maestro":null,"cod_bloque":8,"243":null,"245":null})); llamadaAJAX({url:'http://190.121.148.59/sisad16/build/view/workflow/casos/casos_datosForm.php',mostrarMsg:false,params:{accion:'verifica',wf_paso_id:'6',cod_formulario:'8',cod_bloque:'8',wf_caso_id:'{"pro":"3","cas":"7"}'}}); }catch(e){alert(e);} } } }) );Ext.getCmp('comp_1017').doLayout();
[suc] => 1
)
fin 2018-12-07 08:55:01
/******************************************************************************************************/
fin 2018-12-07 08:55:01
/******************************************************************************************************/
2018-12 07 09:00:32
Continuar(s,5,6,)
EjecutarTarea_5() 2. Inversiones id_comp1017
1 1
ValidarUsuario(5):1
EjecutarPaso_6: form:8 , caso=7 id_comp 1017
Paso::Guardar(Caso:7)
Datos a guardar:
Array
(
[wf_proceso_id] => 3
[wf_paso_id] => 6
[wf_tarea_id] => 5
[wf_caso_id] => 7
[id] => 1017
[accion] => nextPaso
[reg] => s
[rta] => n
[cod_formulario2] => 8
[id_periodo] => 2018
[obs_ingreso] =>
[cod_bloque] => 8
[oid] =>
[oid_maestro] =>
[243] => GALLINERO
[244] => 3
[245] => 1800000
[hdcampo247] => 4
[247] => [{"oid":null,"cant_gas_proy":20,"desc_gas_proy":"BULTOS MAIZ","cat_gas_proy":"4","vu_gas_proy":40000,"vt_gas_proy":800000,"form_master_escribir_xxx":"4"}]
[hdcampo277] => 9
[277] => [{"oid":null,"doc_per":12346,"nom1_per":"ANA","nom2_per":"","ape1_per":"PUERRES","ape2_per":"","tip_cont_per":"1","salario_per":1000000,"ret_per":"","grid_org_un_per":"","form_master_escribir_xxx":"9"}]
)
OID: 13
rta: 1 dato:13 tabla:sce.t8
CasoPaso:27
CargarDatos_6(13)
se carga 3_5_6_8_8_277Array
se carga 3_5_6_8_8_247Array
se carga 3_5_6_8_8_2451800000
se carga 3_5_6_8_8_2443
se carga 3_5_6_8_8_243GALLINERO
SiguientePasoDe6: Funcion para ejecutar el siguiente paso
EjecutarPaso_7: form:17 , caso=7 id_comp 1017
Mostrar form
Retorno :
Array
(
[ret] => Ext.getCmp('comp_1017').removeAll();Ext.getCmp('comp_1017').add(new Ext.form.FormPanel({ title: 'Productos a obtener' ,padding: 10,id:'frm_formulario_3_7',autoScroll:true ,labelAlign:'top',defaults: { anchor: '97%'} ,items: [new Ext.form.Hidden({name:'cod_formulario2',value:'17'}) ,new Ext.form.Hidden({name :'id_periodo',value:'2018'}) ,new Ext.form.Hidden({name :'obs_ingreso',value:''}) ,new Ext.form.Hidden({name:'cod_bloque',value:'17'}) ,new Ext.form.Hidden({name :'oid',value:''}) ,new Ext.form.Hidden({name :'oid_maestro',value:''}) ,{ xtype:'hidden',id:'hdcampo286',value:'16'},{ xtype:'hidden',id:'286'}, new Ext.grid.EditorGridPanel({xtype:'editorgrid',store:new Ext.data.JsonStore({ fields:[{ name:'oid' },{ name:'prod_obt_desc' },{ name:'prod_obt_cant' }]}),columns:[new Ext.grid.RowNumberer({width:30}),{header:'Descripción',dataIndex:'prod_obt_desc',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'textfield' , maxLength:50 ,allowBlank:false}},{header:'Cantidad',dataIndex:'prod_obt_cant',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 ,allowBlank:false}}],stripeRows:true,height:150,id:'286_16',title:'Productos a obtener',stateful:true,stateId:'grid',autoScroll:true,autoWidth:true,sm:new Ext.grid.RowSelectionModel({singleSelect:false}),anchor:'97%',viewConfig:{forceFit:true,showPreview: true,enableRowBody: false, getRowClass: function(record, rowIndex, rp, ds){ return 'fila-act-sin-pro';},listeners:{rowsinserted:function(view,row,info){this.refresh();},rowremoved:function(view,row,info){this.refresh();}}},tbar:[{iconCls:'icon-add',tooltip:'Agregar',text:'Agregar',handler:function(){xajax_iniciarPintarFormulario({cod_formulario2:'16',id_periodo:'2018',oid_maestro:Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),obs_ingreso:document.getElementsByName('cod_formulario2').item(0).value,contenedor_nuevo:'_16',cod_camp_m:'286'},'n','','411','400');}},{iconCls:'icon-delete',tooltip:'Eliminar',text:'Eliminar',handler:function(){var grid = Ext.getCmp('286_16');var list = grid.getSelectionModel().getSelections();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}Ext.Msg.show({ title:'Advertencia de eliminacion', msg:'Esta seguro que desea eliminar los items seleccionados?', buttons:Ext.Msg.YESNO, animEl:'btnEl', fn:function(btn){ if (btn == 'yes'){grid.store.remove(list);} }, icon:Ext.MessageBox.QUESTION });}},{iconCls:'icon-application_form_edit',tooltip:'Modificar',text:'Modificar',handler:function(){var grid = Ext.getCmp('286_16');var list = grid.getSelectionModel().getSelected();var x_oid=Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}if(x_oid==''){return false;}xajax_iniciarPintarModificarFormulario('16','2018',document.getElementsByName('cod_formulario2').item(0).value,grid.getSelectionModel().getSelected().data.oid,'n','','',Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),'411','400');}}]})/*fgp*/ ] ,prepararGrids:function(){/*buscar editorgrid - grilla id compuesto, id real, mas id formulario esclavo, separado _*/var grillasF=this.findByType('editorgrid');if(grillasF && grillasF!=''){for (i=0; i < grillasF.length; i++){var xstore=grillasF[i].getStore();if(xstore.getCount()>0){var data=new Array();var xxid=grillasF[i].getId().split('_');for (j=0; j < xstore.getCount(); j++){var xreco = xstore.getAt(j); var cont_dat_vac=0,cont_tot_vac=0; for(var elem in xreco.data){cont_tot_vac++;if( xreco.data[elem] ==null || xreco.data[elem]=='' ){cont_dat_vac++;}} if(cont_dat_vac < cont_tot_vac){data[data.length]=xreco.data;data[data.length-1]['form_master_escribir_xxx']=xxid[1];}}var xfinalfin=Ext.encode(data);Ext.getCmp(xxid[0]).setValue(xfinalfin);}}}/*grabar stores en hiddens*/},tbar:[{text:'Guardar',iconCls: 'icon-disk',handler: function(){ var form = Ext.getCmp('frm_formulario_3_7'); var f=form.getForm();if(f.isValid()){var band_f=true;try{band_f =form.Validar();}catch(e){}if(band_f){form.prepararGrids();f.submit({url:'http://190.121.148.59/sisad16/build/view/'+'workflow/casos/casos_l.php',params:{wf_proceso_id:'3',wf_paso_id:'7',wf_tarea_id:'5',wf_caso_id:'7',id:'1017',accion:'nextPaso',reg:'s',rta:'n'},success:function(form, action){if(action.result.message) crearMsg(action.result.message,'Informacion');else if(action.result.execute){/*try{*/eval(action.result.execute);/*}catch(e){alert(e+'Se presentó un error , por favor cierre la pestaña del caso y continue el proceso desde la pestaña de resumen' );}*/}},failure: function(form, action) {switch (action.failureType) {case Ext.form.Action.CONNECT_FAILURE:Ext.Msg.alert('Error', 'En este momento no hay comunicación con el servidor intente más tarde');break;case Ext.form.Action.SERVER_INVALID: Ext.Msg.alert('Error', action.result.message); break; }}});}}else{Ext.MessageBox.alert('Advertencia',getErrorFields(f));}} } ] ,listeners:{ afterrender:function(){ try{ Ext.getCmp('frm_formulario_3_7').getForm().loadRecord(new Ext.data.Record({"cod_formulario":17,"oid_maestro":null,"cod_bloque":17})); llamadaAJAX({url:'http://190.121.148.59/sisad16/build/view/workflow/casos/casos_datosForm.php',mostrarMsg:false,params:{accion:'verifica',wf_paso_id:'7',cod_formulario:'17',cod_bloque:'17',wf_caso_id:'{"pro":"3","cas":"7"}'}}); }catch(e){alert(e);} } } }) );Ext.getCmp('comp_1017').doLayout();
[suc] => 1
)
fin 2018-12-07 09:00:32
/******************************************************************************************************/
fin 2018-12-07 09:00:32
/******************************************************************************************************/
2018-12 07 09:06:21
Continuar(s,5,7,)
EjecutarTarea_5() 2. Inversiones id_comp1017
1 1
ValidarUsuario(5):1
EjecutarPaso_7: form:17 , caso=7 id_comp 1017
Paso::Guardar(Caso:7)
Datos a guardar:
Array
(
[wf_proceso_id] => 3
[wf_paso_id] => 7
[wf_tarea_id] => 5
[wf_caso_id] => 7
[id] => 1017
[accion] => nextPaso
[reg] => s
[rta] => n
[cod_formulario2] => 17
[id_periodo] => 2018
[obs_ingreso] =>
[cod_bloque] => 17
[oid] =>
[oid_maestro] =>
[hdcampo286] => 16
[286] => [{"oid":null,"prod_obt_desc":"HUEVOS","prod_obt_cant":1000,"form_master_escribir_xxx":"16"},{"oid":null,"prod_obt_desc":"CARNE KILOS","prod_obt_cant":200,"form_master_escribir_xxx":"16"}]
)
OID: 4
rta: 1 dato:4 tabla:sce.t17
CasoPaso:28
CargarDatos_7(4)
se carga 3_5_7_17_17_286Array
SiguientePasoDe7: Funcion para ejecutar el siguiente paso
Condicion Tarea : true
TerminarTarea(5,6)
Ultimo seg :14
Ultimo seg :15
EjecutarTarea_6() 3. Inversión ejecutada id_comp1017
1 1
ValidarUsuario(6):1
EjecutarPaso_8: form:14 , caso=7 id_comp 1017
Mostrar form
Retorno :
Array
(
[ret] => Ext.getCmp('comp_1017').removeAll();Ext.getCmp('comp_1017').add(new Ext.form.FormPanel({ title: 'Inversión ejecutada' ,padding: 10,id:'frm_formulario_3_7',autoScroll:true ,labelAlign:'top',defaults: { anchor: '97%'} ,items: [new Ext.form.Hidden({name:'cod_formulario2',value:'14'}) ,new Ext.form.Hidden({name :'id_periodo',value:'2018'}) ,new Ext.form.Hidden({name :'obs_ingreso',value:''}) ,new Ext.form.Hidden({name:'cod_bloque',value:'14'}) ,new Ext.form.Hidden({name :'oid',value:''}) ,new Ext.form.Hidden({name :'oid_maestro',value:''}) ,{ xtype:'hidden',id:'hdcampo272',value:'6'},{ xtype:'hidden',id:'272'}, new Ext.grid.EditorGridPanel({xtype:'editorgrid',store:new Ext.data.JsonStore({ fields:[{ name:'oid' },{ name:'desc_gas_proy' },{ name:'desc_gas_proy_txt' },{ name:'cant_gas_eje' },{ name:'vu_gas_eje' },{ name:'vt_gas_eje' },{ name:'prov_gas_proy' },{ name:'prov_gas_proy_txt' },{ name:'presupuestado' }]}),columns:[new Ext.grid.RowNumberer({width:30}),{header:'Descripción',dataIndex:'desc_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.desc_gas_proy_txt ?record.data.desc_gas_proy_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'4',id:'OID',et1:'desc_gas_proy'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20,allowBlank:false})},{header:'Cantidad',dataIndex:'cant_gas_eje',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 ,allowBlank:false}},{header:'Valor unitario',dataIndex:'vu_gas_eje',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Valor total',dataIndex:'vt_gas_eje',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Proveedor',dataIndex:'prov_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.prov_gas_proy_txt ?record.data.prov_gas_proy_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'7',id:'OID',et1:'nom_prov'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Presupuestado',dataIndex:'presupuestado',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }}],stripeRows:true,height:150,id:'272_6',title:'Gastos ejecutados',stateful:true,stateId:'grid',autoScroll:true,autoWidth:true,sm:new Ext.grid.RowSelectionModel({singleSelect:false}),anchor:'97%',viewConfig:{forceFit:true,showPreview: true,enableRowBody: false, getRowClass: function(record, rowIndex, rp, ds){ return 'fila-act-sin-pro';},listeners:{rowsinserted:function(view,row,info){this.refresh();},rowremoved:function(view,row,info){this.refresh();}}},tbar:[{iconCls:'icon-add',tooltip:'Agregar',text:'Agregar',handler:function(){xajax_iniciarPintarFormulario({cod_formulario2:'6',id_periodo:'2018',oid_maestro:Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),obs_ingreso:document.getElementsByName('cod_formulario2').item(0).value,contenedor_nuevo:'_6',cod_camp_m:'272'},'n','','411','400');}},{iconCls:'icon-delete',tooltip:'Eliminar',text:'Eliminar',handler:function(){var grid = Ext.getCmp('272_6');var list = grid.getSelectionModel().getSelections();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}Ext.Msg.show({ title:'Advertencia de eliminacion', msg:'Esta seguro que desea eliminar los items seleccionados?', buttons:Ext.Msg.YESNO, animEl:'btnEl', fn:function(btn){ if (btn == 'yes'){grid.store.remove(list);} }, icon:Ext.MessageBox.QUESTION });}},{iconCls:'icon-application_form_edit',tooltip:'Modificar',text:'Modificar',handler:function(){var grid = Ext.getCmp('272_6');var list = grid.getSelectionModel().getSelected();var x_oid=Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}if(x_oid==''){return false;}xajax_iniciarPintarModificarFormulario('6','2018',document.getElementsByName('cod_formulario2').item(0).value,grid.getSelectionModel().getSelected().data.oid,'n','','',Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),'411','400');}}]})/*fgp*/,{ xtype:'hidden',id:'hdcampo280',value:'12'},{ xtype:'hidden',id:'280'}, new Ext.grid.EditorGridPanel({xtype:'editorgrid',store:new Ext.data.JsonStore({ fields:[{ name:'oid' },{ name:'nom_gas_per' },{ name:'nom_gas_per_txt' },{ name:'org_gas_per' },{ name:'org_gas_per_txt' },{ name:'un_gas_per' },{ name:'un_gas_per_txt' },{ name:'h_gas_per' },{ name:'vh_gas_per' },{ name:'d_gas_per' },{ name:'vd_gas_per' },{ name:'tot_gas_per' },{ name:'fi_gas_per' },{ name:'ff_gas_per' }]}),columns:[new Ext.grid.RowNumberer({width:30}),{header:'Personal',dataIndex:'nom_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.nom_gas_per_txt ?record.data.nom_gas_per_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'9',id:'doc_per',et1:'nom1_per',et2:'ape1_per'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Organización',dataIndex:'org_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.org_gas_per_txt ?record.data.org_gas_per_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'3',id:'OID',et1:'nom_org'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Unidad de negocio',dataIndex:'un_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.un_gas_per_txt ?record.data.un_gas_per_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'2',id:'OID',et1:'nom_uni_neg'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Horas trabajadas',dataIndex:'h_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Valor horas',dataIndex:'vh_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Dias trabajados',dataIndex:'d_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Valor dias',dataIndex:'vd_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Total honorarios',dataIndex:'tot_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ Ext.util.Format.usMoney(val) +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Fecha inicio',dataIndex:'fi_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor: new Ext.form.DateField({format:FormatoFecha,renderer:Ext.util.Format.dateRenderer(FormatoFecha),value:''}),xtype:'datecolumn',format:FormatoFecha},{header:'Fecha fin',dataIndex:'ff_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor: new Ext.form.DateField({format:FormatoFecha,renderer:Ext.util.Format.dateRenderer(FormatoFecha),value:''}),xtype:'datecolumn',format:FormatoFecha}],stripeRows:true,height:150,id:'280_12',title:'Gastos de personal',stateful:true,stateId:'grid',autoScroll:true,autoWidth:true,sm:new Ext.grid.RowSelectionModel({singleSelect:false}),anchor:'97%',viewConfig:{forceFit:true,showPreview: true,enableRowBody: false, getRowClass: function(record, rowIndex, rp, ds){ return 'fila-act-sin-pro';},listeners:{rowsinserted:function(view,row,info){this.refresh();},rowremoved:function(view,row,info){this.refresh();}}},tbar:[{iconCls:'icon-add',tooltip:'Agregar',text:'Agregar',handler:function(){xajax_iniciarPintarFormulario({cod_formulario2:'12',id_periodo:'2018',oid_maestro:Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),obs_ingreso:document.getElementsByName('cod_formulario2').item(0).value,contenedor_nuevo:'_12',cod_camp_m:'280'},'n','','411','400');}},{iconCls:'icon-delete',tooltip:'Eliminar',text:'Eliminar',handler:function(){var grid = Ext.getCmp('280_12');var list = grid.getSelectionModel().getSelections();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}Ext.Msg.show({ title:'Advertencia de eliminacion', msg:'Esta seguro que desea eliminar los items seleccionados?', buttons:Ext.Msg.YESNO, animEl:'btnEl', fn:function(btn){ if (btn == 'yes'){grid.store.remove(list);} }, icon:Ext.MessageBox.QUESTION });}},{iconCls:'icon-application_form_edit',tooltip:'Modificar',text:'Modificar',handler:function(){var grid = Ext.getCmp('280_12');var list = grid.getSelectionModel().getSelected();var x_oid=Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}if(x_oid==''){return false;}xajax_iniciarPintarModificarFormulario('12','2018',document.getElementsByName('cod_formulario2').item(0).value,grid.getSelectionModel().getSelected().data.oid,'n','','',Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),'411','400');}}]})/*fgp*/,{value:'',xtype:'numberfield' , maxLength:200,autoCreate:{ tag:'input',maxlength:'200'} ,id:'275',fieldLabel:'Total gastos ejecutados' },new Ext.form.Hidden({ value:'13', id:'290'}) ] ,prepararGrids:function(){/*buscar editorgrid - grilla id compuesto, id real, mas id formulario esclavo, separado _*/var grillasF=this.findByType('editorgrid');if(grillasF && grillasF!=''){for (i=0; i < grillasF.length; i++){var xstore=grillasF[i].getStore();if(xstore.getCount()>0){var data=new Array();var xxid=grillasF[i].getId().split('_');for (j=0; j < xstore.getCount(); j++){var xreco = xstore.getAt(j); var cont_dat_vac=0,cont_tot_vac=0; for(var elem in xreco.data){cont_tot_vac++;if( xreco.data[elem] ==null || xreco.data[elem]=='' ){cont_dat_vac++;}} if(cont_dat_vac < cont_tot_vac){data[data.length]=xreco.data;data[data.length-1]['form_master_escribir_xxx']=xxid[1];}}var xfinalfin=Ext.encode(data);Ext.getCmp(xxid[0]).setValue(xfinalfin);}}}/*grabar stores en hiddens*/},tbar:[{text:'Guardar',iconCls: 'icon-disk',handler: function(){ var form = Ext.getCmp('frm_formulario_3_7'); var f=form.getForm();if(f.isValid()){var band_f=true;try{band_f =form.Validar();}catch(e){}if(band_f){form.prepararGrids();f.submit({url:'http://190.121.148.59/sisad16/build/view/'+'workflow/casos/casos_l.php',params:{wf_proceso_id:'3',wf_paso_id:'8',wf_tarea_id:'6',wf_caso_id:'7',id:'1017',accion:'nextPaso',reg:'s',rta:'n'},success:function(form, action){if(action.result.message) crearMsg(action.result.message,'Informacion');else if(action.result.execute){/*try{*/eval(action.result.execute);/*}catch(e){alert(e+'Se presentó un error , por favor cierre la pestaña del caso y continue el proceso desde la pestaña de resumen' );}*/}},failure: function(form, action) {switch (action.failureType) {case Ext.form.Action.CONNECT_FAILURE:Ext.Msg.alert('Error', 'En este momento no hay comunicación con el servidor intente más tarde');break;case Ext.form.Action.SERVER_INVALID: Ext.Msg.alert('Error', action.result.message); break; }}});}}else{Ext.MessageBox.alert('Advertencia',getErrorFields(f));}} } ] ,listeners:{ afterrender:function(){ try{ Ext.getCmp('frm_formulario_3_7').getForm().loadRecord(new Ext.data.Record({"cod_formulario":14,"oid_maestro":null,"cod_bloque":14,"275":null})); llamadaAJAX({url:'http://190.121.148.59/sisad16/build/view/workflow/casos/casos_datosForm.php',mostrarMsg:false,params:{accion:'verifica',wf_paso_id:'8',cod_formulario:'14',cod_bloque:'14',wf_caso_id:'{"pro":"3","cas":"7"}'}}); }catch(e){alert(e);} } } }) );Ext.getCmp('comp_1017').doLayout();
[suc] => 1
)
fin 2018-12-07 09:06:21
/******************************************************************************************************/
fin 2018-12-07 09:06:22
/******************************************************************************************************/
2019-01-23 06:23:58TraerCaso(7,3,)
CargarCaso :7
2019-01 23 06:23:58
CargarDatos: Caso :7
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_3_seguimiento_id,wf_paso_id from wf_caso_3_pasos a1 group by wf_caso_3_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_3_pasos p using(id,wf_caso_3_seguimiento_id)
inner join ( select max(id) as wf_caso_3_seguimiento_id,wf_caso_3_id,wf_tarea_id from wf_caso_3_seguimiento where wf_caso_3_id =? group by wf_caso_3_id,wf_tarea_id order by wf_caso_3_id,wf_caso_3_seguimiento_id ) b using(wf_caso_3_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"26","id":"26","1":"5","wf_paso_id":"5","2":"13","wf_caso_3_seguimiento_id":"13","3":"1","core_usuario_id":"1","4":"2018-12-07 08:55:01","fecha_ejec":"2018-12-07 08:55:01","5":"5","dato":"5","6":"sce.t15","tabla":"sce.t15","7":"4","tarea_id":"4","8":"ADMIN ADMIN: Administrador1","usr_ejec":"ADMIN ADMIN: Administrador1"}
CargarDatos_5(5)
se carga 3_4_5_15_15_319
se carga 3_4_5_15_15_318
se carga 3_4_5_15_15_317
se carga 3_4_5_15_15_316
se carga 3_4_5_15_15_315
se carga 3_4_5_15_15_298CRIADERO DE GALLINAS
se carga 3_4_5_15_15_283
se carga 3_4_5_15_15_2822018-12-07
se carga 3_4_5_15_15_281GALLINERO
{"0":"27","id":"27","1":"6","wf_paso_id":"6","2":"14","wf_caso_3_seguimiento_id":"14","3":"1","core_usuario_id":"1","4":"2018-12-07 09:00:32","fecha_ejec":"2018-12-07 09:00:32","5":"13","dato":"13","6":"sce.t8","tabla":"sce.t8","7":"5","tarea_id":"5","8":"ADMIN ADMIN: Administrador1","usr_ejec":"ADMIN ADMIN: Administrador1"}
CargarDatos_6(13)
se carga 3_5_6_8_8_320CAMUROS
se carga 3_5_6_8_8_277Array
se carga 3_5_6_8_8_247Array
se carga 3_5_6_8_8_2451800000
se carga 3_5_6_8_8_2443
se carga 3_5_6_8_8_243GALLINERO
{"0":"28","id":"28","1":"7","wf_paso_id":"7","2":"14","wf_caso_3_seguimiento_id":"14","3":"1","core_usuario_id":"1","4":"2018-12-07 09:06:21","fecha_ejec":"2018-12-07 09:06:21","5":"4","dato":"4","6":"sce.t17","tabla":"sce.t17","7":"5","tarea_id":"5","8":"ADMIN ADMIN: Administrador1","usr_ejec":"ADMIN ADMIN: Administrador1"}
CargarDatos_7(4)
se carga 3_5_7_17_17_286Array
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_3_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_3_id,b0.wf_tarea_id from wf_caso_3_seguimiento b0 where b0.wf_caso_3_id =? group by b0.wf_caso_3_id,b0.wf_tarea_id order by wf_caso_3_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"13","id":"13","1":"7","wf_caso_3_id":"7","2":"4","wf_tarea_id":"4","3":null,"core_usuario_id":null,"4":"2018-12-07 08:48:13","fec_asig":"2018-12-07 08:48:13","5":"1","core_usuario_id_resol":"1","6":"2018-12-07 08:55:01","fec_resol":"2018-12-07 08:55:01","7":"4","wf_tarea_id_sig":"4","8":null,"usr_asig":null,"9":"ADMIN ADMIN: Administrador1","usr_resol":"ADMIN ADMIN: Administrador1"}
{"0":"14","id":"14","1":"7","wf_caso_3_id":"7","2":"5","wf_tarea_id":"5","3":"1","core_usuario_id":"1","4":"2018-12-07 08:55:01","fec_asig":"2018-12-07 08:55:01","5":"1","core_usuario_id_resol":"1","6":"2018-12-07 09:06:21","fec_resol":"2018-12-07 09:06:21","7":"5","wf_tarea_id_sig":"5","8":"ADMIN ADMIN: Administrador1","usr_asig":"ADMIN ADMIN: Administrador1","9":"ADMIN ADMIN: Administrador1","usr_resol":"ADMIN ADMIN: Administrador1"}
{"0":"15","id":"15","1":"7","wf_caso_3_id":"7","2":"6","wf_tarea_id":"6","3":"1","core_usuario_id":"1","4":"2018-12-07 09:06:21","fec_asig":"2018-12-07 09:06:21","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"6","wf_tarea_id_sig":"6","8":"ADMIN ADMIN: Administrador1","usr_asig":"ADMIN ADMIN: Administrador1","9":null,"usr_resol":null}
2019-01 23 06:23:58
cargar datos del sujeto(,,s,3,7)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_3 w
inner join core_sujetoverificacion s on w.id=7 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2019-01 23 06:23:58
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=7
2019-01 23 06:23:58
tabla :core_sujetoverificaciongeneral
SELECT * FROM core_sujetoverificaciongeneral where id=3
2019-01 23 06:23:58
Continuar(,6,,s)
EjecutarTarea_6() 3. Inversión ejecutada id_comp1019
1 1
ValidarUsuario(6):1
EjecutarPaso_8: form:14 , caso=7 id_comp 1019
Mostrar form
Retorno :
Array
(
[ret] => Ext.getCmp('comp_1019').removeAll();Ext.getCmp('comp_1019').add(new Ext.form.FormPanel({ title: 'Inversión ejecutada' ,padding: 10,id:'frm_formulario_3_7',autoScroll:true ,labelAlign:'top',defaults: { anchor: '97%'} ,items: [new Ext.form.Hidden({name:'cod_formulario2',value:'14'}) ,new Ext.form.Hidden({name :'id_periodo',value:'2019'}) ,new Ext.form.Hidden({name :'obs_ingreso',value:''}) ,new Ext.form.Hidden({name:'cod_bloque',value:'14'}) ,new Ext.form.Hidden({name :'oid',value:''}) ,new Ext.form.Hidden({name :'oid_maestro',value:''}) ,{ xtype:'hidden',id:'hds321',disabled:true }, new Ext.form.ComboBox({flex:1,listeners:{ select:function(){xajax_comprobar_campoOcultoSelect(this.getValue(),321);},afterrender:function(){ xajax_comprobar_campoOcultoSelect(this.getValue(),321); }},anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'21',id:'OID',et1:'ud_nom'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:50,loadValor:function(val,data){if(data)this.getStore().loadData(data);else this.getStore().load();this.setValue(val);},id:'321',fieldLabel:' Unidad de negocio' }),{ xtype:'hidden',id:'hdcampo272',value:'6'},{ xtype:'hidden',id:'272'}, new Ext.grid.EditorGridPanel({xtype:'editorgrid',store:new Ext.data.JsonStore({ fields:[{ name:'oid' },{ name:'desc_gas_proy' },{ name:'desc_gas_proy_txt' },{ name:'cant_gas_eje' },{ name:'vu_gas_eje' },{ name:'vt_gas_eje' },{ name:'prov_gas_proy' },{ name:'prov_gas_proy_txt' }]}),columns:[new Ext.grid.RowNumberer({width:30}),{header:'Descripción',dataIndex:'desc_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.desc_gas_proy_txt ?record.data.desc_gas_proy_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'4',id:'OID',et1:'desc_gas_proy'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20,allowBlank:false})},{header:'Cantidad',dataIndex:'cant_gas_eje',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 ,allowBlank:false}},{header:'Valor unitario',dataIndex:'vu_gas_eje',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Valor total',dataIndex:'vt_gas_eje',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Proveedor',dataIndex:'prov_gas_proy',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.prov_gas_proy_txt ?record.data.prov_gas_proy_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'7',id:'OID',et1:'nom_prov'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})}],stripeRows:true,height:150,id:'272_6',title:'Gastos ejecutados',stateful:true,stateId:'grid',autoScroll:true,autoWidth:true,sm:new Ext.grid.RowSelectionModel({singleSelect:false}),anchor:'97%',viewConfig:{forceFit:true,showPreview: true,enableRowBody: false, getRowClass: function(record, rowIndex, rp, ds){ return 'fila-act-sin-pro';},listeners:{rowsinserted:function(view,row,info){this.refresh();},rowremoved:function(view,row,info){this.refresh();}}},tbar:[{iconCls:'icon-add',tooltip:'Agregar',text:'Agregar',handler:function(){xajax_iniciarPintarFormulario({cod_formulario2:'6',id_periodo:'2019',oid_maestro:Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),obs_ingreso:document.getElementsByName('cod_formulario2').item(0).value,contenedor_nuevo:'_6',cod_camp_m:'272'},'n','','411','400');}},{iconCls:'icon-delete',tooltip:'Eliminar',text:'Eliminar',handler:function(){var grid = Ext.getCmp('272_6');var list = grid.getSelectionModel().getSelections();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}Ext.Msg.show({ title:'Advertencia de eliminacion', msg:'Esta seguro que desea eliminar los items seleccionados?', buttons:Ext.Msg.YESNO, animEl:'btnEl', fn:function(btn){ if (btn == 'yes'){grid.store.remove(list);} }, icon:Ext.MessageBox.QUESTION });}},{iconCls:'icon-application_form_edit',tooltip:'Modificar',text:'Modificar',handler:function(){var grid = Ext.getCmp('272_6');var list = grid.getSelectionModel().getSelected();var x_oid=Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}if(x_oid==''){return false;}xajax_iniciarPintarModificarFormulario('6','2019',document.getElementsByName('cod_formulario2').item(0).value,grid.getSelectionModel().getSelected().data.oid,'n','','',Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),'411','400');}}]})/*fgp*/,{ xtype:'hidden',id:'hdcampo280',value:'12'},{ xtype:'hidden',id:'280'}, new Ext.grid.EditorGridPanel({xtype:'editorgrid',store:new Ext.data.JsonStore({ fields:[{ name:'oid' },{ name:'nom_gas_per' },{ name:'nom_gas_per_txt' },{ name:'org_gas_per' },{ name:'org_gas_per_txt' },{ name:'un_gas_per' },{ name:'un_gas_per_txt' },{ name:'h_gas_per' },{ name:'vh_gas_per' },{ name:'d_gas_per' },{ name:'vd_gas_per' },{ name:'tot_gas_per' },{ name:'fi_gas_per' },{ name:'ff_gas_per' }]}),columns:[new Ext.grid.RowNumberer({width:30}),{header:'Personal',dataIndex:'nom_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.nom_gas_per_txt ?record.data.nom_gas_per_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'9',id:'doc_per',et1:'nom1_per',et2:'ape1_per'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Organización',dataIndex:'org_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.org_gas_per_txt ?record.data.org_gas_per_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'3',id:'OID',et1:'nom_org'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Unidad de negocio',dataIndex:'un_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},renderer:function(value,metaData,record,rowIndex,colIndex,store) {var combo = this.editor;var record = combo.findRecord(combo.valueField,value);return record ? record.get(combo.displayField):(record && record.data.un_gas_per_txt ?record.data.un_gas_per_txt:value );},editor: new Ext.form.ComboBox({typeAhead:true,anchor:'100%',forceSelection:true,emptyText:'Seleccione una opción',editable:true,displayField:'valor',valueField:'id',triggerAction:'all',minChars:3,store:new Ext.data.Store({autoDestroy:true,url:$view_js+'carga_combo.php',autoSave:false,baseParams:{formulario:'2',id:'OID',et1:'nom_uni_neg'},autoLoad:true,reader:new Ext.data.JsonReader({totalProperty:'total',successProperty:'success',idProperty:'id',root:'data',messageProperty:'message'},[{name:'id'},{name:'valor'}])}),mode:'remote',queryParam:'nombre',pageSize:20})},{header:'Horas trabajadas',dataIndex:'h_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Valor horas',dataIndex:'vh_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Dias trabajados',dataIndex:'d_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Valor dias',dataIndex:'vd_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Total honorarios',dataIndex:'tot_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor:{value:'',xtype:'numberfield' , maxLength:50 }},{header:'Fecha inicio',dataIndex:'fi_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor: new Ext.form.DateField({format:FormatoFecha,renderer:Ext.util.Format.dateRenderer(FormatoFecha),value:''}),xtype:'datecolumn',format:FormatoFecha},{header:'Fecha fin',dataIndex:'ff_gas_per',width:80,resizable:true,sortable:true,renderer: function columnWrap(val){return ''+ val +'
';},editor: new Ext.form.DateField({format:FormatoFecha,renderer:Ext.util.Format.dateRenderer(FormatoFecha),value:''}),xtype:'datecolumn',format:FormatoFecha}],stripeRows:true,height:150,id:'280_12',title:'Gastos de personal',stateful:true,stateId:'grid',autoScroll:true,autoWidth:true,sm:new Ext.grid.RowSelectionModel({singleSelect:false}),anchor:'97%',viewConfig:{forceFit:true,showPreview: true,enableRowBody: false, getRowClass: function(record, rowIndex, rp, ds){ return 'fila-act-sin-pro';},listeners:{rowsinserted:function(view,row,info){this.refresh();},rowremoved:function(view,row,info){this.refresh();}}},tbar:[{iconCls:'icon-add',tooltip:'Agregar',text:'Agregar',handler:function(){xajax_iniciarPintarFormulario({cod_formulario2:'12',id_periodo:'2019',oid_maestro:Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),obs_ingreso:document.getElementsByName('cod_formulario2').item(0).value,contenedor_nuevo:'_12',cod_camp_m:'280'},'n','','411','400');}},{iconCls:'icon-delete',tooltip:'Eliminar',text:'Eliminar',handler:function(){var grid = Ext.getCmp('280_12');var list = grid.getSelectionModel().getSelections();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}Ext.Msg.show({ title:'Advertencia de eliminacion', msg:'Esta seguro que desea eliminar los items seleccionados?', buttons:Ext.Msg.YESNO, animEl:'btnEl', fn:function(btn){ if (btn == 'yes'){grid.store.remove(list);} }, icon:Ext.MessageBox.QUESTION });}},{iconCls:'icon-application_form_edit',tooltip:'Modificar',text:'Modificar',handler:function(){var grid = Ext.getCmp('280_12');var list = grid.getSelectionModel().getSelected();var x_oid=Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue();if (!list) {Ext.MessageBox.alert('Advertencia', 'Ningun item seleccionado');return false;}if(x_oid==''){return false;}xajax_iniciarPintarModificarFormulario('12','2019',document.getElementsByName('cod_formulario2').item(0).value,grid.getSelectionModel().getSelected().data.oid,'n','','',Ext.getCmp('frm_formulario_3_7').getForm().findField('oid').getValue(),'411','400');}}]})/*fgp*/,{value:'',xtype:'numberfield' , maxLength:200,autoCreate:{ tag:'input',maxlength:'200'} ,id:'275',fieldLabel:'Total gastos ejecutados' },new Ext.form.Hidden({ value:'', id:'290'}) ] ,prepararGrids:function(){/*buscar editorgrid - grilla id compuesto, id real, mas id formulario esclavo, separado _*/var grillasF=this.findByType('editorgrid');if(grillasF && grillasF!=''){for (i=0; i < grillasF.length; i++){var xstore=grillasF[i].getStore();if(xstore.getCount()>0){var data=new Array();var xxid=grillasF[i].getId().split('_');for (j=0; j < xstore.getCount(); j++){var xreco = xstore.getAt(j); var cont_dat_vac=0,cont_tot_vac=0; for(var elem in xreco.data){cont_tot_vac++;if( xreco.data[elem] ==null || xreco.data[elem]=='' ){cont_dat_vac++;}} if(cont_dat_vac < cont_tot_vac){data[data.length]=xreco.data;data[data.length-1]['form_master_escribir_xxx']=xxid[1];}}var xfinalfin=Ext.encode(data);Ext.getCmp(xxid[0]).setValue(xfinalfin);}}}/*grabar stores en hiddens*/},tbar:[{text:'Guardar',iconCls: 'icon-disk',handler: function(){ var form = Ext.getCmp('frm_formulario_3_7'); var f=form.getForm();if(f.isValid()){var band_f=true;try{band_f =form.Validar();}catch(e){}if(band_f){form.prepararGrids();f.submit({url:'http://190.121.148.59/sisad16/build/view/'+'workflow/casos/casos_l.php',params:{wf_proceso_id:'3',wf_paso_id:'8',wf_tarea_id:'6',wf_caso_id:'7',id:'1019',accion:'nextPaso',reg:'s',rta:'n'},success:function(form, action){if(action.result.message) crearMsg(action.result.message,'Informacion');else if(action.result.execute){/*try{*/eval(action.result.execute);/*}catch(e){alert(e+'Se presentó un error , por favor cierre la pestaña del caso y continue el proceso desde la pestaña de resumen' );}*/}},failure: function(form, action) {switch (action.failureType) {case Ext.form.Action.CONNECT_FAILURE:Ext.Msg.alert('Error', 'En este momento no hay comunicación con el servidor intente más tarde');break;case Ext.form.Action.SERVER_INVALID: Ext.Msg.alert('Error', action.result.message); break; }}});}}else{Ext.MessageBox.alert('Advertencia',getErrorFields(f));}} } ] ,listeners:{ afterrender:function(){ try{ Ext.getCmp('frm_formulario_3_7').getForm().loadRecord(new Ext.data.Record({"cod_formulario":14,"oid_maestro":null,"cod_bloque":14,"275":null})); llamadaAJAX({url:'http://190.121.148.59/sisad16/build/view/workflow/casos/casos_datosForm.php',mostrarMsg:false,params:{accion:'verifica',wf_paso_id:'8',cod_formulario:'14',cod_bloque:'14',wf_caso_id:'{"pro":"3","cas":"7"}'}}); }catch(e){alert(e);} } } }) );Ext.getCmp('comp_1019').doLayout();
[suc] => 1
)
fin 2019-01-23 06:23:58
/******************************************************************************************************/
fin 2019-01-23 06:23:59
/******************************************************************************************************/