Browse Source

报表界面样式调整

zhuth 7 years ago
parent
commit
f58a8ebbf6

+ 35 - 32
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -9,6 +9,8 @@ Ext.define('saas.view.core.report.ReportPanel', {
         'Ext.grid.plugin.Exporter'
         'Ext.grid.plugin.Exporter'
     ],
     ],
 
 
+    cls: 'x-report-panel',
+
     layout: 'vbox',
     layout: 'vbox',
     autoScroll: true,
     autoScroll: true,
     border: 1,
     border: 1,
@@ -18,6 +20,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
     listUrl: null, // 列表查询URL
     listUrl: null, // 列表查询URL
     defaultCondition: null, // 默认查询条件
     defaultCondition: null, // 默认查询条件
     searchItems: [], // 查询字段
     searchItems: [], // 查询字段
+    reportTitle: '报表',
 
 
     initComponent: function() {
     initComponent: function() {
         var me = this;
         var me = this;
@@ -35,40 +38,18 @@ Ext.define('saas.view.core.report.ReportPanel', {
                     labelWidth: 90,
                     labelWidth: 90,
                     columnWidth: 0.25,
                     columnWidth: 0.25,
                 },
                 },
-                items: me.initSearchItems(),
-                dockedItems: [{
-                    xtype: 'toolbar',
-                    dock: 'bottom',
-                    items: ['->', {
+                items: me.initSearchItems().concat([{
+                    xtype: 'container',
+                    columnWidth: 0.5,
+                    items: [{
                         xtype: 'button',
                         xtype: 'button',
                         text: '查询',
                         text: '查询',
                         handler: 'onQuery'
                         handler: 'onQuery'
-                    }, '->']
-                }]
-            }, {
-                xtype: 'grid',
-                width: '100%',
-                flex: 1,
-                border: 1,
-                plugins: {
-                    gridexporter: true
-                },
-                features: [{
-                    ftype: 'groupingsummary',
-                    hideGroupedHeader: false,
-                    enableGroupingMenu: false,
-                    collapsible: false
-                }, {
-                    ftype: 'summary',
-                    dock: 'bottom'
-                }],
-                store: store,
-                columns: me.initColumns(),
-                dockedItems: [{
-                    xtype: 'toolbar',
-                    dock: 'top',
-                    items: ['->', {
+                    }, {
                         xtype: 'button',
                         xtype: 'button',
+                        style: {
+                            float: 'right'
+                        },
                         text: '导出为...',
                         text: '导出为...',
                         menu: {
                         menu: {
                             defaults: {
                             defaults: {
@@ -126,7 +107,31 @@ Ext.define('saas.view.core.report.ReportPanel', {
                             }]
                             }]
                         }
                         }
                     }]
                     }]
+                }])
+            }, {
+                xtype: 'grid',
+                width: '100%',
+                cls: 'x-report-grid',
+                flex: 1,
+                border: 1,
+                sortableColumns: false,
+                enableColumnHide: false,
+                rowLines: false,
+                plugins: {
+                    gridexporter: true
+                },
+                features: [{
+                    ftype: 'groupingsummary',
+                    hideGroupedHeader: false,
+                    enableGroupingMenu: false,
+                    collapsible: false
                 }, {
                 }, {
+                    ftype: 'summary',
+                    dock: 'bottom'
+                }],
+                store: store,
+                columns: me.initColumns(),
+                dockedItems: [{
                     style: {
                     style: {
                         'border-top': '1px solid #35baf6 !important'
                         'border-top': '1px solid #35baf6 !important'
                     },
                     },
@@ -154,8 +159,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
             fields: me.getFields(),
             fields: me.getFields(),
             autoLoad: true,
             autoLoad: true,
             pageSize: 15,
             pageSize: 15,
-            exportPageSize: 5000,
-            exportNumber: 1,
             data: [],
             data: [],
             proxy: {
             proxy: {
                 type: 'ajax',
                 type: 'ajax',

+ 34 - 0
frontend/saas-web/app/view/core/report/ReportPanel.scss

@@ -0,0 +1,34 @@
+.x-report-panel {
+    
+    .x-report-grid {
+
+        .x-panel-bodyWrap {
+
+            .x-panel-default-outer-border-trl {
+                border-color: #999 !important;
+            }
+
+            .x-grid-header-ct {
+                border-color: #999 !important;
+
+                .x-column-header {
+                    border-color: #999 !important;
+
+                    .x-column-header-text-inner {
+                        font-weight: bold;
+                    }
+                }
+            }
+
+            .x-grid-body {
+                border-color: #999 !important;
+                border-width: 1px;
+                
+                .x-grid-cell-inner {
+                    border-right: 1px solid #999;
+                    border-bottom: 1px solid #999;
+                }
+            }
+        }
+    }
+}

+ 14 - 4
frontend/saas-web/app/view/core/report/ReportPanelController.js

@@ -21,13 +21,23 @@ Ext.define('saas.view.core.report.ReportPanelController', {
     exportTo: function(btn){
     exportTo: function(btn){
         var me = this,
         var me = this,
         reportPanel = me.getView(),
         reportPanel = me.getView(),
-        grid = reportPanel.getListGrid();
+        grid = reportPanel.getListGrid(),
+        title = reportPanel.reportTitle;
 
 
         var cfg = Ext.merge({
         var cfg = Ext.merge({
-            title: 'Grid export demo',
-            fileName: 'GridExport' + '.' + (btn.cfg.ext || btn.cfg.type)
+            title: title,
+            fileName: title + '.' + (btn.cfg.ext || btn.cfg.type)
         }, btn.cfg);
         }, btn.cfg);
 
 
-        grid.saveDocumentAs(cfg);
+
+        grid.store.exportPageSize = 5000;
+        grid.store.exportNumber = 1;
+        grid.store.load(function(records, operation, success) {
+            grid.saveDocumentAs(cfg);
+            grid.store.exportPageSize = null;
+            grid.store.exportNumber = null;
+            grid.store.load(function(records, operation, success) {
+            });
+        });
     }
     }
 });
 });

+ 1 - 0
frontend/saas-web/app/view/purchase/report/Purchase.js

@@ -10,6 +10,7 @@ Ext.define('saas.view.purchase.report.Purchase', {
     groupField: null,
     groupField: null,
     listUrl: '/api/purchase/purchase/list',
     listUrl: '/api/purchase/purchase/list',
     defaultCondition: null,
     defaultCondition: null,
+    reportTitle: '采购明细报表',
 
 
     searchItems: [{
     searchItems: [{
         xtype: 'condatefield',
         xtype: 'condatefield',

+ 1 - 0
frontend/saas-web/app/view/sale/report/SaleIn.js

@@ -10,6 +10,7 @@ Ext.define('saas.view.sale.report.SaleIn', {
     groupField: 'rb_custname',
     groupField: 'rb_custname',
     listUrl: '/api/money/recbalance/list',
     listUrl: '/api/money/recbalance/list',
     defaultCondition: null,
     defaultCondition: null,
+    reportTitle: '销售收款报表',
 
 
     searchItems: [{
     searchItems: [{
         xtype: 'condatefield',
         xtype: 'condatefield',