|
|
@@ -22,6 +22,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
searchItems: [], // 查询字段
|
|
|
reportTitle: '报表',
|
|
|
autoLoad:true,
|
|
|
+ allowPaging: true,
|
|
|
printAble: true,
|
|
|
exportAble: true,
|
|
|
queryMode: 'DETAIL',
|
|
|
@@ -162,23 +163,12 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
}],
|
|
|
store: store,
|
|
|
columns: me.initColumns(),
|
|
|
- dockedItems: [{
|
|
|
+ dockedItems: [me.allowPaging ? {
|
|
|
xtype: 'pagingtoolbar',
|
|
|
dock: 'bottom',
|
|
|
displayInfo: true,
|
|
|
store: store
|
|
|
- }],
|
|
|
- viewConfig: {
|
|
|
- deferEmptyText: false,
|
|
|
- listeners: {
|
|
|
- itemcontextmenu: function(view, rec, node, index, e) {
|
|
|
- e.stopEvent();
|
|
|
- me.getContextMenu().show().setLocalXY(e.getXY());
|
|
|
- me.selectedData = e.target.innerText;
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ } : null],
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
@@ -187,12 +177,13 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
|
|
|
listeners: {
|
|
|
boxready: function(p) {
|
|
|
+ var allowPaging = p.allowPaging;
|
|
|
var grid = p.down('grid');
|
|
|
var store = grid.getStore();
|
|
|
var gridBodyBox = grid.body.dom.getBoundingClientRect();
|
|
|
var gridBodyBoxHeight = gridBodyBox.height;
|
|
|
|
|
|
- var pageSize = Math.floor(gridBodyBoxHeight / 32);
|
|
|
+ var pageSize = allowPaging ? Math.floor(gridBodyBoxHeight / 32) : 99999;
|
|
|
|
|
|
store.setPageSize(pageSize);
|
|
|
}
|
|
|
@@ -501,6 +492,10 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
conditions.push(condition);
|
|
|
}
|
|
|
|
|
|
+ return me.myGetConditions(conditions);
|
|
|
+ },
|
|
|
+
|
|
|
+ myGetConditions: function(conditions) {
|
|
|
return conditions;
|
|
|
},
|
|
|
|
|
|
@@ -511,7 +506,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
|
|
|
if(me.isContainsAny(xtypes, ['numberfield'])) {
|
|
|
type = 'number';
|
|
|
- }else if(me.isContainsAny(xtypes, ['datefield', 'condatefield'])) {
|
|
|
+ }else if(me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
|
|
|
type = 'date';
|
|
|
}else if(me.isContainsAny(xtypes, ['dbfindtrigger'])) {
|
|
|
type = 'string';
|
|
|
@@ -544,7 +539,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
|
|
|
if(me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
|
|
|
operation = '=';
|
|
|
- }else if(me.isContainsAny(xtypes, ['condatefield'])) {
|
|
|
+ }else if(me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
|
|
|
operation = 'between';
|
|
|
}else if(me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
|
|
|
operation = 'in';
|
|
|
@@ -564,6 +559,11 @@ Ext.define('saas.view.core.report.ReportPanel', {
|
|
|
conditionValue;
|
|
|
if(me.isContainsAny(xtypes, ['datefield'])) {
|
|
|
conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
|
|
|
+ }else if(me.isContainsAny(xtypes, ['conmonthfield'])) {
|
|
|
+ var from = value.from,
|
|
|
+ to = value.to;
|
|
|
+
|
|
|
+ conditionValue = from + ',' + to;
|
|
|
}else if(me.isContainsAny(xtypes, ['condatefield'])) {
|
|
|
var from = value.from,
|
|
|
to = value.to;
|