hy il y a 7 ans
Parent
commit
1f518c4295
48 fichiers modifiés avec 311 ajouts et 148 suppressions
  1. 17 2
      frontend/saas-web/app/util/BaseUtil.js
  2. 3 3
      frontend/saas-web/app/util/Errors.js
  3. 2 2
      frontend/saas-web/app/util/FormUtil.js
  4. 2 2
      frontend/saas-web/app/view/auth/LoginController.js
  5. 22 22
      frontend/saas-web/app/view/core/base/GridPanel.js
  6. 3 1
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  7. 51 0
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.scss
  8. 2 3
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  9. 3 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  10. 1 0
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  11. 2 2
      frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js
  12. 2 2
      frontend/saas-web/app/view/core/form/DataMultiCombo.js
  13. 10 10
      frontend/saas-web/app/view/core/form/FormPanelController.js
  14. 2 2
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  15. 8 8
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  16. 2 2
      frontend/saas-web/app/view/core/report/ReportPanel.js
  17. 4 4
      frontend/saas-web/app/view/document/bom/FormController.js
  18. 4 4
      frontend/saas-web/app/view/document/customer/FormController.js
  19. 6 5
      frontend/saas-web/app/view/document/kind/ChildForm.js
  20. 4 4
      frontend/saas-web/app/view/document/kind/Kind.js
  21. 3 2
      frontend/saas-web/app/view/document/kind/KindController.js
  22. 4 4
      frontend/saas-web/app/view/document/product/FormController.js
  23. 4 4
      frontend/saas-web/app/view/document/vendor/FormController.js
  24. 50 0
      frontend/saas-web/app/view/main/Main.scss
  25. 1 1
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  26. 1 1
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  27. 3 3
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  28. 3 3
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  29. 2 2
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  30. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  31. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  32. 4 4
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  33. 2 2
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  34. 1 1
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  35. 4 4
      frontend/saas-web/app/view/sys/account/DataList.js
  36. 4 4
      frontend/saas-web/app/view/sys/baseconfig/FormPanelController.js
  37. 6 6
      frontend/saas-web/app/view/sys/config/FormPanel.js
  38. 4 4
      frontend/saas-web/app/view/sys/config/FormPanelController.js
  39. 1 1
      frontend/saas-web/app/view/sys/feedback/FormPanelController.js
  40. 4 4
      frontend/saas-web/app/view/sys/finish/DataList.js
  41. 6 6
      frontend/saas-web/app/view/sys/maxnumbers/DataList.js
  42. 10 3
      frontend/saas-web/app/view/sys/power/FormPanelController.js
  43. 34 0
      frontend/saas-web/app/view/sys/power/GroupGrid.js
  44. 1 1
      frontend/saas-web/app/view/sys/power/OtherField.js
  45. 4 4
      frontend/saas-web/app/view/sys/power/TreePanel.js
  46. 2 2
      frontend/saas-web/app/view/viewport/ViewportController.js
  47. BIN
      frontend/saas-web/resources/images/default/toast_close.png
  48. BIN
      frontend/saas-web/resources/images/default/toast_over.png

+ 17 - 2
frontend/saas-web/app/util/BaseUtil.js

@@ -54,13 +54,28 @@ Ext.define('saas.util.BaseUtil', {
          * @param title: 标题
          * 
          */
-        showToast: function (content, title) {
+        showSuccessToast: function (content, title) {
             Ext.toast({
+                cls:'x-toast-success',
                 html: content,
                 title: title,
                 closable: false,
                 align: 't',
-                slideDUration: 400,
+                autoCloseDelay:3000,
+                autoClose:true,
+                maxWidth: 400
+            });
+        },
+
+        showErrorToast: function (content, title) {
+            Ext.toast({
+                cls:'x-toast-error',
+                html: content,
+                title: title,
+                closable: false,
+                align: 't',
+                autoCloseDelay:3000,
+                autoClose:true,
                 maxWidth: 400
             });
         },

+ 3 - 3
frontend/saas-web/app/util/Errors.js

@@ -42,16 +42,16 @@ Ext.define('saas.util.Errors', {
                 if (error.code === -32096) {    // READONLY_SESSION
                     // The session is read-only (demo version), let's display a temporary message
                     // and return false since this exception should not be considered as an error.
-                    saas.util.BaseUtil.showToast(error.message);
+                    saas.util.BaseUtil.showErrorToast(error.message);
                     return false;
                 }
                 if (error.code === -32001 && form) {
                     form.setErrors(this.toForm(error));
                 } else {
-                    saas.util.BaseUtil.showToast(error.name + ' Error:' + error.message);
+                    saas.util.BaseUtil.showErrorToast(error.name + ' 错误信息:' + error.message);
                 }
             } else if (Ext.isString(error)) {
-                saas.util.BaseUtil.showToast('Error:' + error);
+                saas.util.BaseUtil.showErrorToast('错误信息:' + error);
             }
 
             return true;

+ 2 - 2
frontend/saas-web/app/util/FormUtil.js

@@ -174,7 +174,7 @@ Ext.define('saas.util.FormUtil', {
                 me.loadData(form);
             })
             .catch(function(response) {
-                saas.util.BaseUtil.showToast('错误:' + response.message);
+                saas.util.BaseUtil.showErrorToast('加载数据错误:' + response.message);
                 console.error(response);
             });
 
@@ -266,7 +266,7 @@ Ext.define('saas.util.FormUtil', {
                         form.initFormData(formData);
                     }
                 }).catch(function(res) {
-                    saas.util.BaseUtil.showToast(res.message);
+                    saas.util.BaseUtil.showErrorToast(res.message);
                     form.setLoading(false);
                 })
             }

+ 2 - 2
frontend/saas-web/app/view/auth/LoginController.js

@@ -39,7 +39,7 @@ Ext.define('saas.view.auth.LoginController', {
             })
             .catch(function(error) {
                 view.isMasked() && view.unmask();
-                saas.util.BaseUtil.showToast(error.message);
+                saas.util.BaseUtil.showErrorToast(error.message);
             });
     },
 
@@ -61,7 +61,7 @@ Ext.define('saas.view.auth.LoginController', {
 				me.fireEvent('login', newSession);
             })
             .catch(function(error) {
-                saas.util.BaseUtil.showToast(error.message);
+                saas.util.BaseUtil.showErrorToast(error.message);
             })
             .then(function() {
                 view.isMasked() && view.unmask();

+ 22 - 22
frontend/saas-web/app/view/core/base/GridPanel.js

@@ -37,6 +37,18 @@ Ext.define('saas.view.core.base.GridPanel', {
                         type: 'json',
                         rootProperty: 'data.list',
                         totalProperty: 'data.total',
+                    },
+                    listeners: {
+                        exception: function(proxy, response, operation, eOpts) {
+                            if(operation.success) {
+                                if(response.timedout) {
+                                    saas.util.BaseUtil.showErrorToast('请求超时');
+                                }
+                            }else {
+                                console.error('exception: ', response.responseJson);
+                                saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                            }
+                        }
                     }
                 },
                 listeners: {
@@ -82,21 +94,9 @@ Ext.define('saas.view.core.base.GridPanel', {
                     }, {
                         text: '导入',
                         handler: me.onImport,
-                        menu: {
-                            cls:'x-query-menu',
-                            width: 80,
-                            items: [{
-                                text:'导出',
-                                handler:function(){
-                                    me.onExport(this)
-                                }
-                            }],
-                            listeners: {
-                                'mouseleave':function(enu){
-                                    this.hide();
-                                } 
-                            }
-                        }
+                    },{
+                        text:'导出',
+                        handler:me.onExport
                     },{
                         text: '禁用',
                         handler: function(){
@@ -132,7 +132,7 @@ Ext.define('saas.view.core.base.GridPanel', {
                                     }
                                 });
                             }else {
-                                saas.util.BaseUtil.showToast('请至少选择一条明细');
+                                saas.util.BaseUtil.showErrorToast('请至少选择一条明细');
                             }
                         }
                     }, {
@@ -160,7 +160,7 @@ Ext.define('saas.view.core.base.GridPanel', {
         var grid = this;
         var data = grid.getGridSelected(type);
         if(!data){
-            saas.util.BaseUtil.showToast('请勾选符合条件的行进行操作。');
+            saas.util.BaseUtil.showErrorToast('请勾选符合条件的行进行操作。');
             return false;
         }
         if(data&&data.length>0){
@@ -172,15 +172,15 @@ Ext.define('saas.view.core.base.GridPanel', {
                     async:false
                 })
                 .then(function() {
-                    saas.util.BaseUtil.showToast('操作成功');
+                    saas.util.BaseUtil.showSuccessToast('操作成功');
                     grid.store.load();
                 })
                 .catch(function(res) {
                     console.error(res);
-                    saas.util.BaseUtil.showToast('操作失败: ' + res.message);
+                    saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
                 });
         }else{
-            saas.util.BaseUtil.showToast('请勾选至少一条明细。');
+            saas.util.BaseUtil.showErrorToast('请勾选至少一条明</br>细。');
         }
     },
 
@@ -215,13 +215,13 @@ Ext.define('saas.view.core.base.GridPanel', {
                             .then(function(localJson) {
                                 if(localJson.success){
                                     //解析参数
-                                    saas.util.BaseUtil.showToast('删除成功');
+                                    saas.util.BaseUtil.showSuccessToast('删除成功');
                                     view.ownerCt.store.load();
                                 }
                             })
                             .catch(function(res) {
                                 console.error(res);
-                                saas.util.BaseUtil.showToast('删除失败: ' + res.message);
+                                saas.util.BaseUtil.showErrorToast('删除失败: ' + res.message);
                             });
                         }
                     });

+ 3 - 1
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -74,6 +74,8 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                         handler: me.onAddClick.bind(me)
                     }])
                 },{
+                    height:32,
+                    style:'padding: 0;',
                     xtype: 'pagingtoolbar',
                     dock: 'bottom',
                     displayInfo: true,
@@ -90,7 +92,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
             gridBodyBox = grid.body.dom.getBoundingClientRect(),
             gridBodyBoxHeight = gridBodyBox.height;
 
-            var pageSize = Math.floor(gridBodyBoxHeight / 32);
+            var pageSize = Math.floor(gridBodyBoxHeight / 33);
 
             store.setPageSize(pageSize);
         },

+ 51 - 0
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.scss

@@ -1,3 +1,54 @@
 .x-window-dbfind{
     border:none;
+    .x-window-header{
+        border: none;
+        background-color: #fff;
+    }
+    .x-title-text{
+        padding-left: 7px;
+        font-weight: 550;
+        color: #35baf6;
+    }
+    .x-tbar-page-number .x-form-text{
+        height: 16px !important;
+        min-height: 16px;
+        padding: 0px;
+    }
+    .x-tbar-page-number{
+        width: 40px !important;
+    }
+    .x-title-text::before{
+        margin-left: -10px;
+        content: ' ';
+        display: block;
+        border-style: solid;
+        background-color: #34baf6;
+        position: fixed;
+        width: 0px;
+        margin-top: 2px;
+        height: 10px;
+    }
+    .x-tool-tool-el{
+        color:#35baf6 !important;
+    }
+    .x-window-body{
+        padding-top: 0px !important;
+    }
+    .x-toolbar-default {
+        padding: 6px 0 12px 0px;
+    }
+    .x-grid-header-ct {
+        border: 1px solid #abdaff !important;
+    }
+    .x-grid-body {
+        border-width: 1px;
+        border-color: #abdaff;
+        border-right-width: 1px !important;
+        border-left-width: 1px !important;
+        border-top-width: 0px !important;
+    }
+    .x-grid-paging-toolbar{
+        border: 1px solid #abdaff !important;
+        border-top-width: 0px !important;
+    }
 }

+ 2 - 3
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -5,8 +5,6 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     queryMode: 'local',
     displayField: 'dispaly',
     valueField: 'value',
-    triggerCls: 'x-form-search-trigger',
-    cls:'x-window-dbfind',
     minChars:1, // 设置用户输入字符多少时触发查询
     tpl: '',
     enableKeyEvents:true,
@@ -152,7 +150,8 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
             dbItem.onAddClick = me.onAddClick;
         }
 
-        var win = panel.add(Ext.create('Ext.window.Window', {   
+        var win = panel.add(Ext.create('Ext.window.Window', {  
+            cls:'x-window-dbfind', 
             trigger:f,
             belong:f.ownerCt,  
             modal:true,

+ 3 - 1
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -39,7 +39,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
             gridBodyBox = grid.body.dom.getBoundingClientRect(),
             gridBodyBoxHeight = gridBodyBox.height;
 
-            var pageSize = Math.floor(gridBodyBoxHeight / 32);
+            var pageSize = Math.floor(gridBodyBoxHeight / 33);
 
             store.setPageSize(pageSize);
         }
@@ -164,6 +164,8 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                     xtype: 'pagingtoolbar',
                     dock: 'bottom',
                     displayInfo: true,
+                    height:32,
+                    style:'padding: 0;',
                     store: me.store,
                     items:[{
                         xtype:'checkbox',

+ 1 - 0
frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js

@@ -143,6 +143,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
         var height = box.height;
         var width = box.width;
         var win = panel.add(Ext.create('Ext.window.Window', {   
+            cls:'x-window-dbfind', 
             trigger:f,
             belong:f.ownerCt,  
             modal:true,

+ 2 - 2
frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js

@@ -107,13 +107,13 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
                             })
                             .then(function(localJson) {
                                 if(localJson.success){
-                                    saas.util.BaseUtil.showToast('操作成功');
+                                    saas.util.BaseUtil.showSuccessToast('操作成功');
                                     grid.store.load();
                                 }
                             })
                             .catch(function(res) {
                                 console.error(res);
-                                saas.util.BaseUtil.showToast('操作失败: ' + res.message);
+                                saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
                             });
                         }
                     }]

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

@@ -36,12 +36,12 @@ Ext.define('saas.view.core.form.DataMultiCombo', {
                             datas.push(o);
                         });
                     }else{
-                        saas.util.BaseUtil.showToast('下拉框读取数据为空!');
+                        saas.util.BaseUtil.showErrorToast('下拉框读取数据为空!');
                     }
                     me.datas = datas;
                 },
                 failure: function (response, opts) {
-                    saas.util.BaseUtil.showToast('上传失败: ' + response.responseText);
+                    saas.util.BaseUtil.showErrorToast('上传失败: ' + response.responseText);
                 }
             });
         }

+ 10 - 10
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -95,12 +95,12 @@ Ext.define('saas.view.core.form.FormPanelController', {
                             var mainTab = Ext.getCmp('main-tab-panel');
                             mainTab.getActiveTab().close();
                             //解析参数
-                            saas.util.BaseUtil.showToast('删除成功');
+                            saas.util.BaseUtil.showSuccessToast('删除成功');
                         }
                     })
                     .catch(function(res) {
                         console.error(res);
-                        saas.util.BaseUtil.showToast('删除失败: ' + res.message);
+                        saas.util.BaseUtil.showErrorToast('删除失败: ' + res.message);
                     });
                 }
             });
@@ -113,7 +113,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
 
         var valid = form.isValid();
         if(!valid) {
-            saas.util.BaseUtil.showToast(form.invalidText);
+            saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
 
@@ -159,7 +159,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
                 var code = localJson.data.code;
                 form.initId = id;
                 saas.util.FormUtil.loadData(form);
-                saas.util.BaseUtil.showToast('保存成功');
+                saas.util.BaseUtil.showSuccessToast('保存成功');
 
                 var newId = form.xtype + '-' + id;
                 var newTitle = form._title + '(' + code + ')';
@@ -171,7 +171,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
             form.fireEvent('aftersave', false, form, res);
         });
     },
@@ -197,7 +197,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var valid = form.isValid();
 
         if(!valid) {
-            saas.util.BaseUtil.showToast(form.invalidText);
+            saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
 
@@ -252,7 +252,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
                 }
                 saas.util.FormUtil.loadData(form);
                 form.setEditable(false);
-                saas.util.BaseUtil.showToast('审核成功' + (localJson.message ? ': ' + localJson.message : ''));
+                saas.util.BaseUtil.showSuccessToast('审核成功' + (localJson.message ? ': ' + localJson.message : ''));
                 form.fireEvent('afteraudit', true, form, localJson);
             }
         })
@@ -270,7 +270,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
                 saas.util.BaseUtil.refreshTabTitle(newId, newTitle);
                 saas.util.FormUtil.loadData(form);
             }
-            saas.util.BaseUtil.showToast('审核失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('审核失败: ' + res.message);
             form.fireEvent('afteraudit', false, form, res);
         });
     },
@@ -305,13 +305,13 @@ Ext.define('saas.view.core.form.FormPanelController', {
         .then(function(localJson) {
             if(localJson.success){
                 //解析参数
-                saas.util.BaseUtil.showToast('反审核成功');
+                saas.util.BaseUtil.showSuccessToast('反审核成功');
                 saas.util.FormUtil.loadData(form);
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('反审核失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('反审核失败: ' + res.message);
         });
     },
 

+ 2 - 2
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -295,12 +295,12 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
                         store.remove(selectedRecord);
                         me.fireEvent('validChange');
                         //解析参数
-                        saas.util.BaseUtil.showToast('删除成功');
+                        saas.util.BaseUtil.showSuccessToast('删除成功');
                     })
                     .catch(function() {
                         me.fireEvent('validChange');
                         //失败
-                        saas.util.BaseUtil.showToast('删除失败');
+                        saas.util.BaseUtil.showErrorToast('删除失败');
                     });
                 }else {
                     throw new Error();

+ 8 - 8
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -81,11 +81,11 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                         exception: function(proxy, response, operation, eOpts) {
                             if(operation.success) {
                                 if(response.timedout) {
-                                    saas.util.BaseUtil.showToast('请求超时');
+                                    saas.util.BaseUtil.showErrorToast('请求超时');
                                 }
                             }else {
                                 console.error('exception: ', response.responseJson);
-                                saas.util.BaseUtil.showToast('查询失败:' + response.responseJson.message);
+                                saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
                             }
                         }
                     }
@@ -356,7 +356,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             }
         })
         .catch(function(res) {
-            saas.util.BaseUtil.showToast('导出失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('导出失败: ' + res.message);
         });
     },
     onCloseOrder:function(me){
@@ -375,7 +375,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 }
             });
         }else{
-            saas.util.BaseUtil.showToast('请勾选至少一条明细。');
+            saas.util.BaseUtil.showErrorToast('请勾选至少一条明细。');
         }
     },
     vastOperation :function(type){
@@ -391,18 +391,18 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             })
             .then(function(res) {
                 if(res.data){
-                    saas.util.BaseUtil.showToast(res.data);
+                    saas.util.BaseUtil.showSuccessToast(res.data);
                 }else{
-                    saas.util.BaseUtil.showToast('操作成功');
+                    saas.util.BaseUtil.showSuccessToast('操作成功');
                 }
                 me.getStore().loadPage(1);
             })
             .catch(function(res) {
                 console.error(res);
-                saas.util.BaseUtil.showToast('操作失败: ' + res.message);
+                saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
             });
         }else{
-            saas.util.BaseUtil.showToast('请勾选至少一条明细。');
+            saas.util.BaseUtil.showErrorToast('请勾选至少一条明细。');
         }
     },
     /** */

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

@@ -199,11 +199,11 @@ Ext.define('saas.view.core.report.ReportPanel', {
                     exception: function(proxy, response, operation, eOpts) {
                         if(operation.success) {
                             if(response.timedout) {
-                                saas.util.BaseUtil.showToast('请求超时');
+                                saas.util.BaseUtil.showErrorToast('请求超时');
                             }
                         }else {
                             console.error('exception: ', response.responseJson);
-                            saas.util.BaseUtil.showToast('请求错误:' + response.responseJson);
+                            saas.util.BaseUtil.showErrorToast('请求错误:' + response.responseJson);
                         }
                     }
                 }

+ 4 - 4
frontend/saas-web/app/view/document/bom/FormController.js

@@ -86,12 +86,12 @@ Ext.define('saas.view.document.bom.FormController', {
                 form.initId = localJson.data.id;
                 saas.util.FormUtil.loadData(form);
                 //viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('启用成功');
+                saas.util.BaseUtil.showSuccessToast('启用成功');
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('启用失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('启用失败: ' + res.message);
         });
     },
     unAudit: function() {
@@ -109,11 +109,11 @@ Ext.define('saas.view.document.bom.FormController', {
                 form.initId = localJson.data.id;
                 saas.util.FormUtil.loadData(form);
                 // viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('关闭成功');
+                saas.util.BaseUtil.showSuccessToast('关闭成功');
             }
         })
         .catch(function(res) {
-            saas.util.BaseUtil.showToast('关闭失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('关闭失败: ' + res.message);
         });
     }
 });

+ 4 - 4
frontend/saas-web/app/view/document/customer/FormController.js

@@ -28,7 +28,7 @@ Ext.define('saas.view.document.customer.FormController', {
         })
         .then(function(localJson) {
             if(localJson.success){
-                saas.util.BaseUtil.showToast('启用成功');
+                saas.util.BaseUtil.showSuccessToast('启用成功');
                 form.initId = localJson.data.id;
                 saas.util.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
@@ -36,7 +36,7 @@ Ext.define('saas.view.document.customer.FormController', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('启用失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('启用失败: ' + res.message);
         });
     },
     unAudit: function() {
@@ -54,11 +54,11 @@ Ext.define('saas.view.document.customer.FormController', {
                 form.initId = localJson.data.id;
                 saas.util.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('禁用成功');
+                saas.util.BaseUtil.showSuccessToast('禁用成功');
             }
         })
         .catch(function(res) {
-            saas.util.BaseUtil.showToast('禁用失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('禁用失败: ' + res.message);
         });
     }
 });

+ 6 - 5
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -4,6 +4,7 @@
 Ext.define('KitchenSink.view.binding.ChildForm', {
     extend: 'Ext.window.Window',
     xtype: 'document-kind-childwin',
+    cls:'x-window-dbfind',
     layout: 'fit',
     modal: true,
     width: 500,
@@ -486,14 +487,14 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                         typeof combo.setValue == 'function' && combo.setValue(params._value);
                     });
                 }
-                saas.util.BaseUtil.showToast('保存成功');
+                saas.util.BaseUtil.showSuccessToast('保存成功');
                 form.ownerCt.close();
             }
         })
         .catch(function(res) {
             me.setLoading(false);
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });
     },
     onCancel:function(){
@@ -526,7 +527,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         o = o.substring(0,o.length-1);
 
         if(o==""){
-            saas.util.BaseUtil.showToast('关联角色未选择,无法保存!')
+            saas.util.BaseUtil.showErrorToast('关联角色未选择,无法保存!')
         }
 
         var _params = {
@@ -547,7 +548,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         .then(function(localJson) {
             me.setLoading(false);
             if(localJson.success){
-                saas.util.BaseUtil.showToast('保存成功');
+                saas.util.BaseUtil.showSuccessToast('保存成功');
                 form.ownerCt._parent.store.load()
                 form.ownerCt.close();
             }
@@ -555,7 +556,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         .catch(function(res) {
             me.setLoading(false);
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });
     }
 });

+ 4 - 4
frontend/saas-web/app/view/document/kind/Kind.js

@@ -304,13 +304,13 @@ Ext.define('saas.view.document.kind.Kind', {
                         })
                         .then(function(localJson) {
                             if(localJson.success){
-                                saas.util.BaseUtil.showToast('操作成功');
+                                saas.util.BaseUtil.showSuccessToast('操作成功');
                                 grid.store.load();
                             }
                         })
                         .catch(function(res) {
                             console.error(res);
-                            saas.util.BaseUtil.showToast('操作失败: ' + res.message);
+                            saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
                         });
                     }
                 }]
@@ -364,13 +364,13 @@ Ext.define('saas.view.document.kind.Kind', {
                         })
                         .then(function(localJson) {
                             if(localJson.success){
-                                saas.util.BaseUtil.showToast('操作成功');
+                                saas.util.BaseUtil.showSuccessToast('操作成功');
                                 grid.store.load();
                             }
                         })
                         .catch(function(res) {
                             console.error(res);
-                            saas.util.BaseUtil.showToast('操作失败: ' + res.message);
+                            saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
                         });
                     }
                 }]

+ 3 - 2
frontend/saas-web/app/view/document/kind/KindController.js

@@ -31,6 +31,7 @@ Ext.define('saas.view.document.kind.KindController', {
         grid.reconfigure(store, columns);
         if(store) store.reload();
         vm.set('title', button.typeText);
+        grid.ownerCt.ownerCt.setTitle(button.typeText+'查询');
     },
     onAdd:function(b){
         var dk = b.ownerCt.ownerCt;
@@ -84,13 +85,13 @@ Ext.define('saas.view.document.kind.KindController', {
                 })
                 .then(function(localJson) {
                     if(localJson.success){
-                        saas.util.BaseUtil.showToast('删除成功');
+                        saas.util.BaseUtil.showSuccessToast('删除成功');
                         grid.store.load();
                     }
                 })
                 .catch(function(res) {
                     console.error(res);
-                    saas.util.BaseUtil.showToast('删除失败: ' + res.message);
+                    saas.util.BaseUtil.showErrorToast('删除失败: ' + res.message);
                 });
             }
         });

+ 4 - 4
frontend/saas-web/app/view/document/product/FormController.js

@@ -74,12 +74,12 @@ Ext.define('saas.view.document.product.FormController', {
                 form.initId = localJson.data.id;
                 saas.util.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('启用成功');
+                saas.util.BaseUtil.showSuccessToast('启用成功');
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('启用失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('启用失败: ' + res.message);
         });
     },
     unAudit: function() {
@@ -97,12 +97,12 @@ Ext.define('saas.view.document.product.FormController', {
                 form.initId = localJson.data.id;
                 saas.util.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('禁用成功');
+                saas.util.BaseUtil.showSuccessToast('禁用成功');
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('禁用失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('禁用失败: ' + res.message);
         });
     },
     amount_change:function() {

+ 4 - 4
frontend/saas-web/app/view/document/vendor/FormController.js

@@ -30,12 +30,12 @@ Ext.define('saas.view.document.vendor.FormController', {
                 form.initId = localJson.data.id;
                 saas.util.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('启用成功');
+                saas.util.BaseUtil.showSuccessToast('启用成功');
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('启用失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('启用失败: ' + res.message);
         });
     },
     unAudit: function() {
@@ -53,12 +53,12 @@ Ext.define('saas.view.document.vendor.FormController', {
                 form.initId = localJson.data.id;
                 saas.util.FormUtil.loadData(form);
                 viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('禁用成功');
+                saas.util.BaseUtil.showSuccessToast('禁用成功');
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('禁用失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('禁用失败: ' + res.message);
         });
     }
 });

+ 50 - 0
frontend/saas-web/app/view/main/Main.scss

@@ -314,3 +314,53 @@ body > .x-mask {
     overflow: hidden;
     white-space: nowrap;
 }
+
+.x-toast-success{
+    border-color: #adeaa4 !important;
+    border-radius: 4px !important;
+    .x-window-body{
+        background: #f3ffef !important;
+        border-color: #f3ffef !important;
+    }
+    .x-autocontainer-innerCt{
+        color: #3ec12a;
+        padding: 4px 30px 4px 46px !important;
+    }
+    .x-autocontainer-innerCt::before{
+        margin-left: -19px;
+        margin-top: 1px;
+        content: ' ';
+        width: 16px;
+        position: absolute;
+        display: block;
+        height: 16px;
+        background: url(../../../../resources/images/default/toast_over.png) 0 0 no-repeat; 
+        background-size: 16px 16px;
+        background-position: center;
+    }
+}
+
+.x-toast-error{
+    border-color: #f39d70 !important;
+    border-radius: 4px !important;
+    .x-window-body{
+        background: #fdefcd !important;
+        border-color: #fdefcd !important;
+    }
+    .x-autocontainer-innerCt{
+        color: #ea800e;
+        padding: 4px 30px 4px 46px !important;
+    }
+    .x-autocontainer-innerCt::before{
+        margin-left: -19px;
+        margin-top: 1px;
+        content: ' ';
+        width: 16px;
+        position: absolute;
+        display: block;
+        height: 16px;
+        background: url(../../../../resources/images/default/toast_close.png) 0 0 no-repeat; 
+        background-size: 16px 16px;
+        background-position: center;
+    }
+}

+ 1 - 1
frontend/saas-web/app/view/money/othreceipts/FormPanelController.js

@@ -50,7 +50,7 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
 
         var valid = form.isValid();
         if(!valid) {
-            saas.util.BaseUtil.showToast(form.invalidText);
+            saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
 

+ 1 - 1
frontend/saas-web/app/view/money/othspendings/FormPanelController.js

@@ -53,7 +53,7 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
 
         var valid = form.isValid();
         if(!valid) {
-            saas.util.BaseUtil.showToast(form.invalidText);
+            saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
 

+ 3 - 3
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -177,13 +177,13 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
         })
         .then(function(localJson) {
             if(localJson.success){
-                saas.util.BaseUtil.showToast('转单成功');
+                saas.util.BaseUtil.showSuccessToast('转单成功');
               
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('转单失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });
      },
 
@@ -196,7 +196,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
 
         var valid = form.isValid();
         if(!valid) {
-            saas.util.BaseUtil.showToast(form.invalidText);
+            saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
 

+ 3 - 3
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -168,13 +168,13 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
         })
         .then(function(localJson) {
             if(localJson.success){
-                saas.util.BaseUtil.showToast('转单成功');
+                saas.util.BaseUtil.showSuccessToast('转单成功');
               
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('转单失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });
      },
     onSave: function() {
@@ -186,7 +186,7 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
 
         var valid = form.isValid();
         if(!valid) {
-            saas.util.BaseUtil.showToast(form.invalidText);
+            saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
 

+ 2 - 2
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -75,12 +75,12 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                 saas.util.BaseUtil.openTab('purchase-purchasein-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                 });
-                saas.util.BaseUtil.showToast('转单成功');    
+                saas.util.BaseUtil.showSuccessToast('转单成功');    
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('转单失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });
      }
 });

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -393,7 +393,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         data = grid.getTrueData();
         Ext.Array.each(data,function(item){
             if(item.pd_orderprice==0){
-                saas.util.BaseUtil.showToast(item.pd_pdno+'行'+item.pd_prodcode+'物料单价为0');
+                saas.util.BaseUtil.showErrorToast(item.pd_pdno+'行'+item.pd_prodcode+'物料单价为0');
             }
         });
         return true;

+ 2 - 2
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -110,13 +110,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                 saas.util.BaseUtil.openTab('purchase-purchaseout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                 });
-                saas.util.BaseUtil.showToast('转单成功');
+                saas.util.BaseUtil.showSuccessToast('转单成功');
               
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('转单失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });
      }
 });

+ 4 - 4
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -74,13 +74,13 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                 saas.util.BaseUtil.openTab('sale-saleout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                 });
-                saas.util.BaseUtil.showToast('转单成功');  
+                saas.util.BaseUtil.showSuccessToast('转单成功');  
                 saas.util.FormUtil.loadData(form);
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('转单失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });
      },
     turnPurchase : function(){
@@ -99,13 +99,13 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                     saas.util.BaseUtil.openTab('purchase-purchase-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                         initId: intValue
                     });
-                    saas.util.BaseUtil.showToast('转单成功');
+                    saas.util.BaseUtil.showSuccessToast('转单成功');
                     saas.util.FormUtil.loadData(form);
                 }
             })
             .catch(function(res) {
                 console.error(res);
-                saas.util.BaseUtil.showToast('转单失败: ' + res.message);
+                saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
             });
     }
 });

+ 2 - 2
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -71,13 +71,13 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                 saas.util.BaseUtil.openTab('sale-salein-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                 });
-                saas.util.BaseUtil.showToast('转单成功');  
+                saas.util.BaseUtil.showSuccessToast('转单成功');  
                 saas.util.FormUtil.loadData(form);  
             }
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('转单失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });
      }
 });

+ 1 - 1
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -125,7 +125,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('获取BOM资料失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('获取BOM资料失败: ' + res.message);
         });
      }
 });

+ 4 - 4
frontend/saas-web/app/view/sys/account/DataList.js

@@ -146,7 +146,7 @@ Ext.define('saas.view.sys.account.DataList', {
         var grid = this;
         var data = grid.getGridSelected(type);
         if(!data){
-            saas.util.BaseUtil.showToast('请勾选符合条件的行进行操作。');
+            saas.util.BaseUtil.showErrorToast('请勾选符合条件的行进行操作。');
             return false;
         }
         if(data&&data.length>0){
@@ -158,14 +158,14 @@ Ext.define('saas.view.sys.account.DataList', {
                     async:false
                 })
                 .then(function() {
-                    saas.util.BaseUtil.showToast('操作成功');
+                    saas.util.BaseUtil.showSuccessToast('操作成功');
                     grid.store.load();
                 })
                 .catch(function(response) {
-                    saas.util.BaseUtil.showToast('操作失败');
+                    saas.util.BaseUtil.showErrorToast('操作失败');
                 });
         }else{
-            saas.util.BaseUtil.showToast('请勾选至少一条明细。');
+            saas.util.BaseUtil.showErrorToast('请勾选至少一条明细。');
         }
     },
 

+ 4 - 4
frontend/saas-web/app/view/sys/baseconfig/FormPanelController.js

@@ -22,12 +22,12 @@ Ext.define('saas.view.sys.baseconfig.FormPanelController', {
 
         var valid = form.isValid();
         if(!valid) {
-            saas.util.BaseUtil.showToast('表单校验有误,请检查');
+            saas.util.BaseUtil.showErrorToast('表单校验有误,请检查');
             return false;
         }
 
         if(form.getForm().wasDirty==false){
-            saas.util.BaseUtil.showToast('未修改数据,请修改后保存');
+            saas.util.BaseUtil.showErrorToast('未修改数据,请修改后保存');
             return false;
         }
         viewModel = me.getViewModel();
@@ -48,7 +48,7 @@ Ext.define('saas.view.sys.baseconfig.FormPanelController', {
         })
         .then(function(localJson) {
             if(localJson.success){
-                saas.util.BaseUtil.showToast('保存成功');
+                saas.util.BaseUtil.showSuccessToast('保存成功');
                 viewModel = form.getViewModel();
                 var url = form._readUrl;
                 saas.util.BaseUtil.request({url })
@@ -71,7 +71,7 @@ Ext.define('saas.view.sys.baseconfig.FormPanelController', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });
     }
 });

+ 6 - 6
frontend/saas-web/app/view/sys/config/FormPanel.js

@@ -188,7 +188,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
                         },
                         success: function (response, opts) {
                             form.setLoading(false);
-                            saas.util.BaseUtil.showToast('上传成功');
+                            saas.util.BaseUtil.showSuccessToast('上传成功');
                             var res = Ext.decode(response.responseText);
                             if(res.success){
                                 var data = res.data;
@@ -204,13 +204,13 @@ Ext.define('saas.view.sys.config.FormPanel', {
                                     showSignetPhoto.show();
                                 }
                             }else{
-                                saas.util.BaseUtil.showToast('上传失败: ' + res.message);
+                                saas.util.BaseUtil.showErrorToast('上传失败: ' + res.message);
                             }
                         },
                         failure: function (response, opts) {
                             form.setLoading(false);
                             var res = Ext.decode(response.responseText);
-                            saas.util.BaseUtil.showToast('上传失败: ' + res.message);
+                            saas.util.BaseUtil.showErrorToast('上传失败: ' + res.message);
                         }
                     });
                 }
@@ -315,7 +315,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
                         },
                         success: function (response, opts) {
                             form.setLoading(false);
-                            saas.util.BaseUtil.showToast('上传成功');
+                            saas.util.BaseUtil.showSuccessToast('上传成功');
                             var res = Ext.decode(response.responseText);
                             if(res.success){
                                 var data = res.data;
@@ -330,13 +330,13 @@ Ext.define('saas.view.sys.config.FormPanel', {
                                     showLogoPhoto.show();
                                 }
                             }else{
-                                saas.util.BaseUtil.showToast('上传失败: ' + res.message);
+                                saas.util.BaseUtil.showErrorToast('上传失败: ' + res.message);
                             }
                         },
                         failure: function (response, opts) {
                             form.setLoading(false);
                             var res = Ext.decode(response.responseText);
-                            saas.util.BaseUtil.showToast('上传失败: ' + res.message);
+                            saas.util.BaseUtil.showErrorToast('上传失败: ' + res.message);
                         }
                     });
                 }

+ 4 - 4
frontend/saas-web/app/view/sys/config/FormPanelController.js

@@ -19,12 +19,12 @@ Ext.define('saas.view.sys.config.FormPanelController', {
 
         var valid = form.isValid();
         if(!valid) {
-            saas.util.BaseUtil.showToast('表单校验有误,请检查');
+            saas.util.BaseUtil.showErrorToast('表单校验有误,请检查');
             return false;
         }
 
         if(form.getForm().wasDirty==false){
-            saas.util.BaseUtil.showToast('未修改数据,请修改后保存');
+            saas.util.BaseUtil.showErrorToast('未修改数据,请修改后保存');
             return false;
         }
         
@@ -39,7 +39,7 @@ Ext.define('saas.view.sys.config.FormPanelController', {
         })
         .then(function(localJson) {
             if(localJson.success){
-                saas.util.BaseUtil.showToast('保存成功');
+                saas.util.BaseUtil.showSuccessToast('保存成功');
                 viewModel = form.getViewModel();
                 var url = form._readUrl;
                 saas.util.BaseUtil.request({url })
@@ -56,7 +56,7 @@ Ext.define('saas.view.sys.config.FormPanelController', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });
     }
 

+ 1 - 1
frontend/saas-web/app/view/sys/feedback/FormPanelController.js

@@ -7,7 +7,7 @@ Ext.define('saas.view.sys.feedback.FormPanelController', {
         });
     },
     onSubmit:function(){
-        saas.util.BaseUtil.showToast('提交成功!');
+        saas.util.BaseUtil.showSuccessToast('提交成功!');
         Ext.destroy(Ext.getCmp("feedbackWin"));
     },
     onClose:function(){

+ 4 - 4
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -26,13 +26,13 @@ Ext.define('saas.view.sys.finish.DataList', {
                 })
                 .then(function(localJson) {
                     if(localJson.success){
-                        saas.util.BaseUtil.showToast('结账成功');
+                        saas.util.BaseUtil.showSuccessToast('结账成功');
                         grid.store.loadPage(1);
                     }
                 })
                 .catch(function(res) {
                     console.error(res);
-                    saas.util.BaseUtil.showToast('结账失败: ' + res.message);
+                    saas.util.BaseUtil.showErrorToast('结账失败: ' + res.message);
                 });
             }
         }
@@ -49,13 +49,13 @@ Ext.define('saas.view.sys.finish.DataList', {
                 })
                 .then(function(localJson) {
                     if(localJson.success){
-                        saas.util.BaseUtil.showToast('反结账成功');
+                        saas.util.BaseUtil.showSuccessToast('反结账成功');
                         grid.store.loadPage(1);
                     }
                 })
                 .catch(function(res) {
                     console.error(res);
-                    saas.util.BaseUtil.showToast('反结账失败: ' + res.message);
+                    saas.util.BaseUtil.showErrorToast('反结账失败: ' + res.message);
                 });
             }
         }

+ 6 - 6
frontend/saas-web/app/view/sys/maxnumbers/DataList.js

@@ -165,7 +165,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
         var grid = this;
         var data = grid.getGridSelected(type);
         if(!data){
-            saas.util.BaseUtil.showToast('请勾选符合条件的行进行操作。');
+            saas.util.BaseUtil.showErrorToast('请勾选符合条件的行进行操作。');
             return false;
         }
         if(data&&data.length>0){
@@ -177,14 +177,14 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                     async:false
                 })
                 .then(function() {
-                    saas.util.BaseUtil.showToast('操作成功');
+                    saas.util.BaseUtil.showSuccessToast('操作成功');
                     grid.store.load();
                 })
                 .catch(function(response) {
-                    saas.util.BaseUtil.showToast('操作失败');
+                    saas.util.BaseUtil.showErrorToast('操作失败');
                 });
         }else{
-            saas.util.BaseUtil.showToast('请勾选至少一条明细。');
+            saas.util.BaseUtil.showErrorToast('请勾选至少一条明细。');
         }
     },
 
@@ -228,12 +228,12 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                     .then(function(localJson) {
                         if(localJson.success){
                             //解析参数
-                            saas.util.BaseUtil.showToast('删除成功');
+                            saas.util.BaseUtil.showSuccessToast('删除成功');
                             view.ownerCt.store.load();
                         }
                     })
                     .catch(function() {
-                        saas.util.BaseUtil.showToast('删除失败');
+                        saas.util.BaseUtil.showErrorToast('删除失败');
                     });
                 }
             }

+ 10 - 3
frontend/saas-web/app/view/sys/power/FormPanelController.js

@@ -51,16 +51,16 @@ Ext.define('saas.view.sys.power.FormPanelController', {
             })
             .then(function(localJson) {
                 if(localJson.success){
-                    saas.util.BaseUtil.showToast('保存成功');
+                    saas.util.BaseUtil.showSuccessToast('保存成功');
                     viewModel.data.powergrid.load();
                 }
             })
             .catch(function(res) {
                 console.error(res);
-                saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+                saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
             });
         }else{
-            saas.util.BaseUtil.showToast('没有修改数据,请修改后保存');
+            saas.util.BaseUtil.showErrorToast('没有修改数据,请修改后保存');
         }
     },
 
@@ -94,6 +94,13 @@ Ext.define('saas.view.sys.power.FormPanelController', {
                 checked:data['audit']
             })
         }
+        if((typeof modified.update) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'update',
+                checked:data['update']
+            })
+        }
         if((typeof modified.unAudit) == 'boolean'){
             powerSetList.push({
                 groupId:groupId,

+ 34 - 0
frontend/saas-web/app/view/sys/power/GroupGrid.js

@@ -114,6 +114,38 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         doUpdateHeaderState: function(e) {
             return true;
         }
+    },{
+        header: '启用/关闭',
+        dataIndex: 'update',
+        xtype: 'checkcolumn',
+        headerCheckbox: true,
+        menuDisabled:true,
+        flex: 1.5,
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('update');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('update',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '删除',
         dataIndex: 'delete',
@@ -329,6 +361,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
                 {name: 'moduleName',type:'string'},
                 {name: 'add'},
                 {name: 'delete'},
+                {name: 'update'},
                 {name: 'audit'},
                 {name: 'unAudit'},
                 {name: 'fileExport'},
@@ -387,6 +420,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         data.query = record.get('query')==null?null:bool;
         data.delete = record.get('delete')==null?null:bool;
         data.audit = record.get('audit')==null?null:bool;
+        data.update = record.get('update')==null?null:bool;
         data.unAudit= record.get('unAudit')==null?null:bool;
         data.fileExport= record.get('fileExport')==null?null:bool;
         data.fileImport= record.get('fileImport')==null?null:bool;

+ 1 - 1
frontend/saas-web/app/view/sys/power/OtherField.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.sys.power.OtherField', {
     layout: 'column',
     defaults:{
        xtype:'checkbox',
-       columnWidth:0.5
+       columnWidth:1
     },
     initComponent:function(){
         var me=this;

+ 4 - 4
frontend/saas-web/app/view/sys/power/TreePanel.js

@@ -176,7 +176,7 @@ Ext.define('saas.view.sys.power.TreePanel', {
                 .then(function(localJson) {
                     me.setLoading(false);
                     if(localJson.success){
-                        saas.util.BaseUtil.showToast('保存成功');
+                        saas.util.BaseUtil.showSuccessToast('保存成功');
                         me._parent.setTree();
                         form.ownerCt.close();
                     }
@@ -184,7 +184,7 @@ Ext.define('saas.view.sys.power.TreePanel', {
                 .catch(function(res) {
                     me.setLoading(false);
                     console.error(res);
-                    saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+                    saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
                 });
             }
         });
@@ -204,14 +204,14 @@ Ext.define('saas.view.sys.power.TreePanel', {
         .then(function(localJson) {
             me.setLoading(false);
             if(localJson.success){
-                saas.util.BaseUtil.showToast('删除成功');
+                saas.util.BaseUtil.showSuccessToast('删除成功');
                 me.setTree();
             }
         })
         .catch(function(res) {
             me.setLoading(false);
             console.error(res);
-            saas.util.BaseUtil.showToast('删除失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('删除失败: ' + res.message);
         });
     }
 });

+ 2 - 2
frontend/saas-web/app/view/viewport/ViewportController.js

@@ -148,7 +148,7 @@ Ext.define('saas.view.viewport.ViewportController', {
 
         view.mask();
         session.logout().catch(function(error) {
-            saas.util.BaseUtil.showToast(error.message);
+            saas.util.BaseUtil.showErrorToast(error.message);
         }).then(function() {
             me.originalRoute = Ext.History.getToken();
             me.terminateSession();
@@ -170,7 +170,7 @@ Ext.define('saas.view.viewport.ViewportController', {
                     me.initiateSession(newSession);
                 })
                 .catch(function(error) {
-                    saas.util.BaseUtil.showToast(error.message);
+                    saas.util.BaseUtil.showErrorToast(error.message);
                 })
                 .then(function() {
                     view.isMasked() && view.unmask();

BIN
frontend/saas-web/resources/images/default/toast_close.png


BIN
frontend/saas-web/resources/images/default/toast_over.png