Ver Fonte

代码提交

hy há 7 anos atrás
pai
commit
317f9c980c

+ 10 - 0
frontend/saas-web/app/view/core/base/ImportWindow.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.core.base.ImportWindow', {
+    extend: 'Ext.window.Window',
+    xtype: 'importwindow',
+
+    initComponent: function() {
+        var me = this;
+        me.callParent(arguments);
+    }
+
+});

+ 16 - 0
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -179,6 +179,22 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                                 grid.selModel.deselectAll();
                                 grid.selModel.select(grid.selectRecordArr);
                                 grid.selModel.noChange = false;
+                                //刷新展示数据
+                                var dataCount = grid.selectRecordArr.length,msg;
+                                var display = b.ownerCt.child('#displayItem');
+                                if (dataCount === 0) {
+                                    msg = b.ownerCt.emptyMsg;
+                                } else {
+                                    msg = Ext.String.format(
+                                        b.ownerCt.displayMsg,
+                                        1,
+                                        dataCount,
+                                        dataCount
+                                    );
+                                }
+                                display.setText(msg);
+                                b.ownerCt.child('#inputItem').setValue(1);
+                                b.ownerCt.child("#afterTextItem").setText('页,共'+dataCount+'页');
                             }else{
                                 grid.selModel.noChange = true;
                                 grid.selModel.deselectAll();

+ 4 - 2
frontend/saas-web/app/view/core/form/MultiCombo.js

@@ -148,8 +148,10 @@ Ext.define('saas.view.core.form.MultiCombo', {
     hideMenu: function(b) {
         if (this.hasVisibleMenu()) {
             var target=b.parentEvent.relatedTarget;
-            if(!((target.className && target.className.indexOf('x-menu')!=-1) || (target.name && target.name.indexOf(this.name)!=-1))){
-                this.menu.hide();
+            if(target){
+                if(!((target.className && target.className.indexOf('x-menu')!=-1) || (target.name && target.name.indexOf(this.name)!=-1))){
+                    this.menu.hide();
+                }
             }
         }
         return this;

+ 47 - 9
frontend/saas-web/app/view/core/query/QueryFormPanel.js

@@ -19,16 +19,54 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
 	},
 
     dockedItems: [{
+        width:110,
+        height: 40,
         xtype: 'toolbar',
-        dock: 'bottom',
-        items: ['->', {
-        //     xtype: 'button',
-        //     text: '更多查询',
-        //     handler: 'moreQuery'
-        // }, {
-            xtype: 'button',
-            text: '查询',
-            handler: 'onQuery'
+        dock: 'right',
+        items: [{
+            margin:'8 0 0 0',
+            xtype: 'buttongroup',
+            cls:'x-query-buttongroup',
+            items:[{
+                height:24,
+                width:50,
+                style:'min-width: 0px;min-height: 0px;',
+                xtype: 'button',
+                text: '查询',
+                handler: 'onQuery',
+            },{
+                height:24,
+                style:'min-width: 0px;min-height: 0px;border-color: #fff;background-color: #fff; height: 24px;width: 24px;margin-top: -4px;',
+                xtype: 'button',
+                iconCls:'x-fa fa-caret-square-o-down',
+                handler: 'showMore',
+                name:'showMore',
+                tooltip:'更多',
+                listeners:{
+                    afterrender:function(b){
+                        var columnWidthCount = 0;
+                        var items = b.ownerCt.ownerCt.ownerCt.items.items;
+                        Ext.each(items, function(item, index){
+                            if(item.xtype != 'hidden'){
+                                columnWidthCount+= item.columnWidth
+                            }
+                        });
+                        columnWidthCount = Math.ceil(columnWidthCount);
+                        if(columnWidthCount<=1){
+                            b.hide();
+                        }
+                    }
+                }
+            },{
+                name:'hideMore',
+                hidden:true,
+                height:24,
+                tooltip:'隐藏',
+                style:'min-width: 0px;min-height: 0px;border-color: #fff;background-color: #fff; height: 24px;width: 24px;margin-top: -4px;',
+                xtype: 'button',
+                iconCls:'x-fa fa-caret-square-o-up',
+                handler: 'hideMore'
+            }]
         },'->']
     }],
 

+ 1 - 0
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -16,6 +16,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
         reference: 'queryform',
         xtype: 'core-query-queryformpanel',
         width: '100%',
+        height:56,
         margin: '0 0 12 0',
     }, {
         // margin: '12 0 0 0',

+ 12 - 0
frontend/saas-web/app/view/core/query/QueryPanel.scss

@@ -3,6 +3,7 @@
     .x-panel-bodyWrap {
 
         .x-panel-body {
+            overflow: hidden !important;
             cursor: pointer;
 
             .x-box-inner {
@@ -18,6 +19,7 @@
                                 padding: 6px 0 16px 8px;
 
                                 .x-box-inner {
+                                    height: 36px !important;
                                     background: #FFFFFF;
         
                                 }
@@ -49,4 +51,14 @@
             }
         }
     }
+}
+
+.x-query-buttongroup{
+    border: 1px solid #ffffff !important;
+    .x-btn-group-body-default-framed .x-table-layout{
+        border-spacing: 2px !important;
+    }
+    .x-btn-default-toolbar-small .x-btn-inner-default-toolbar-small{
+        height:24px !important;
+    }
 }

+ 28 - 0
frontend/saas-web/app/view/core/query/QueryPanelController.js

@@ -22,6 +22,34 @@ Ext.define('saas.view.core.query.QueryPanelController', {
         viewModel.set('moreQuery', false);
         queryGrid.store.loadPage(1);
     },
+    showMore:function (){
+        var me = this,
+        queryPanel = me.getView(),
+        queryForm = queryPanel.down('core-query-queryformpanel');
+        var items = queryForm.items.items;
+        var columnWidthCount = 0;
+        Ext.each(items, function(item, index){
+            if(item.xtype != 'hidden'){
+                columnWidthCount+= item.columnWidth
+            }
+        });
+        columnWidthCount = Math.ceil(columnWidthCount);
+        if(columnWidthCount>1){
+            //展开
+            queryForm.animate({dynamic: true, duration: 500, to: {height: (24+42*columnWidthCount)+'px'}})
+            queryForm.dockedItems.items[0].down('[name=showMore]').hide();
+            queryForm.dockedItems.items[0].down('[name=hideMore]').show();
+        }
+    },
+    hideMore:function (){
+        var me = this,
+        queryPanel = me.getView(),
+        queryForm = queryPanel.down('core-query-queryformpanel');
+        //收缩
+        queryForm.animate({dynamic: true, duration: 500, to: {height: '56px'}})
+        queryForm.dockedItems.items[0].down('[name=hideMore]').hide();
+        queryForm.dockedItems.items[0].down('[name=showMore]').show();
+    },
     onMoreQuery: function() {
         var me = this,
         queryPanel = me.getView(),