worked on report table form Extjs part
This commit is contained in:
@@ -4,11 +4,28 @@ try
|
|||||||
G::LoadClass('processMap');
|
G::LoadClass('processMap');
|
||||||
$oProcessMap = new processMap(new DBConnection);
|
$oProcessMap = new processMap(new DBConnection);
|
||||||
|
|
||||||
if ( isset($_GET['pid']) )
|
if(isset($_GET['pid']) && !isset($_GET['type'])){
|
||||||
{
|
$rows = $oProcessMap->getExtReportTables($_GET['pid']);
|
||||||
$rows = ExtreportTablesList($_GET['pid']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(isset($_GET['pid']) && $_GET['type'] == 'global')
|
||||||
|
{
|
||||||
|
$aTheFields = array();
|
||||||
|
$aTheFields = getDynaformsVars($_GET['pid'], false);
|
||||||
|
foreach ($aTheFields as $aField) {
|
||||||
|
$rows[] = array('FIELD_UID' => $aField['sName'] . '-' . $aField['sType'],
|
||||||
|
'FIELD_NAME' => $aField['sName']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(isset($_GET['pid']) && $_GET['type'] == 'grid'){
|
||||||
|
$aTheFields = array();
|
||||||
|
$aTheFields = getGridsVars($_GET['pid']);
|
||||||
|
foreach ($aTheFields as $aField) {
|
||||||
|
$rows[] = array('FIELD_UID' => $aField['sName'] . '-' . $aField['sXmlForm'],
|
||||||
|
'FIELD_NAME' => $aField['sName']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$result['totalCount'] = count($rows);
|
$result['totalCount'] = count($rows);
|
||||||
$result['data'] = $rows;
|
$result['data'] = $rows;
|
||||||
|
|||||||
@@ -2036,8 +2036,11 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
|||||||
{
|
{
|
||||||
name: 'REP_TAB_TITLE',
|
name: 'REP_TAB_TITLE',
|
||||||
type: 'string'
|
type: 'string'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'FIELD_NAME',
|
||||||
|
type: 'string'
|
||||||
}
|
}
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var reportStore = new Ext.data.JsonStore({
|
var reportStore = new Ext.data.JsonStore({
|
||||||
@@ -2050,6 +2053,7 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
|||||||
url : 'proxyReportTables?pid='+pro_uid
|
url : 'proxyReportTables?pid='+pro_uid
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
reportStore.load();
|
||||||
|
|
||||||
var reportColumns = new Ext.grid.ColumnModel({
|
var reportColumns = new Ext.grid.ColumnModel({
|
||||||
columns: [
|
columns: [
|
||||||
@@ -2111,7 +2115,6 @@ var reportForm =new Ext.FormPanel({
|
|||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
|
|
||||||
items:[{
|
items:[{
|
||||||
|
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: 'Title',
|
fieldLabel: 'Title',
|
||||||
name: 'REP_TAB_TITLE',
|
name: 'REP_TAB_TITLE',
|
||||||
@@ -2148,14 +2151,19 @@ var reportForm =new Ext.FormPanel({
|
|||||||
onSelect: function(record, index) {
|
onSelect: function(record, index) {
|
||||||
//Show-Hide Format Type Field
|
//Show-Hide Format Type Field
|
||||||
if(record.data.value == 'global')
|
if(record.data.value == 'global')
|
||||||
{Ext.getCmp("fields").show();
|
{
|
||||||
|
Ext.getCmp("fields").show();
|
||||||
Ext.getCmp("gridfields").hide();
|
Ext.getCmp("gridfields").hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{Ext.getCmp("gridfields").show();
|
{
|
||||||
|
Ext.getCmp("gridfields").show();
|
||||||
Ext.getCmp("fields").hide();
|
Ext.getCmp("fields").hide();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
var link = 'proxyReportTables?pid='+pro_uid+'&type='+record.data.value;
|
||||||
|
reportStore.proxy.setUrl(link, true);
|
||||||
|
reportStore.load();
|
||||||
|
|
||||||
this.setValue(record.data[this.valueField || this.displayField]);
|
this.setValue(record.data[this.valueField || this.displayField]);
|
||||||
this.collapse();
|
this.collapse();
|
||||||
}
|
}
|
||||||
@@ -2169,19 +2177,15 @@ var reportForm =new Ext.FormPanel({
|
|||||||
xtype: 'multiselect',
|
xtype: 'multiselect',
|
||||||
width: 150,
|
width: 150,
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
// hidden: true,
|
editable:true,
|
||||||
editable: false,
|
|
||||||
fieldLabel: 'Fields',
|
fieldLabel: 'Fields',
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
forceSelection: true,
|
forceSelection: true,
|
||||||
//dataIndex : 'ENGINE',
|
dataIndex : 'FIELD_NAME',
|
||||||
name: 'FIELDS',
|
name: 'FIELDS',
|
||||||
store: new Ext.data.JsonStore({
|
valueField: 'FIELD_NAME',
|
||||||
fields : ['name', 'value'],
|
displayField: 'FIELD_NAME',
|
||||||
data : [
|
store: reportStore
|
||||||
|
|
||||||
|
|
||||||
]})
|
|
||||||
}]
|
}]
|
||||||
//displayField: 'name',
|
//displayField: 'name',
|
||||||
//emptyText : 'Select Format',
|
//emptyText : 'Select Format',
|
||||||
@@ -2216,6 +2220,21 @@ var reportForm =new Ext.FormPanel({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
var gridWindow = new Ext.Window({
|
||||||
|
title: 'New Report Table',
|
||||||
|
collapsible: false,
|
||||||
|
maximizable: true,
|
||||||
|
width: 450,
|
||||||
|
//autoHeight: true,
|
||||||
|
height: 400,
|
||||||
|
//layout: 'fit',
|
||||||
|
plain: true,
|
||||||
|
bodyStyle: 'padding:5px;',
|
||||||
|
buttonAlign: 'center',
|
||||||
|
items: reportGrid
|
||||||
|
});
|
||||||
|
gridWindow.show();
|
||||||
|
|
||||||
|
|
||||||
var formWindow = new Ext.Window({
|
var formWindow = new Ext.Window({
|
||||||
title: 'New Report Table',
|
title: 'New Report Table',
|
||||||
|
|||||||
Reference in New Issue
Block a user