Browse Source

审核失败但是保存成功也需要刷新页面

zhuth 7 years ago
parent
commit
785671b192

+ 66 - 67
frontend/saas-web/app/Application.scss

@@ -1,76 +1,75 @@
-html, body {
-    height: 100%;
-    margin: 0;
-  }
-  
-  body.launching {
+html,
+body {
+  height: 100%;
+  margin: 0;
+}
+
+body.launching {
+  @include background-size(cover);
+  background-color: $auth-background-color;
+  background-image: $auth-background-image;
+  background-position: center;
+
+  &::before {
+    @include animation(rotate-animation 1s linear infinite);
+    @include transform-origin(50% 50%);
     @include background-size(cover);
-    background-color: $auth-background-color;
-    background-image: $auth-background-image;
+    background-image: url(get-resource-path('images/loading.png'));
     background-position: center;
-  
-    &::before {
-        @include animation(rotate-animation 1s linear infinite);
-        @include transform-origin(50% 50%);
-        @include background-size(cover);
-        background-image: url(get-resource-path('images/loading.png'));
-        background-position: center;
-        content: '';
-        position: absolute;
-        margin-top: -15px;
-        margin-left: -15px;
-        top: 50%;
-        left: 50%;
-        width: 41px;
-        height: 41px;
-    }
+    content: '';
+    position: absolute;
+    margin-top: -15px;
+    margin-left: -15px;
+    top: 50%;
+    left: 50%;
+    width: 41px;
+    height: 41px;
   }
+}
 
 @mixin btn-border($background-color) {
-    background-color: $background-color;
-    border-color: $background-color !important;
-  
-    .x-btn-inner-default-toolbar-small {
-      color: $lightest-color;
+  background-color: $background-color;
+  border-color: $background-color !important;
+
+  .x-btn-inner-default-toolbar-small {
+    color: $lightest-color;
+  }
+
+  &:hover {
+    background-color: transparent;
+
+    .x-btn-inner-default-toolbar-small,
+    .x-btn-inner-default-small {
+      color: $background-color;
     }
-  
-    &:hover {
-      background-color: transparent;
-  
-      .x-btn-inner-default-toolbar-small,
-      .x-btn-inner-default-small {
-        color: $background-color;
-      }
-  
-      .x-btn-icon-el-default-small,
-      .x-btn-icon-el-default-toolbar-small {
-        color: $background-color;
-      }
+
+    .x-btn-icon-el-default-small,
+    .x-btn-icon-el-default-toolbar-small {
+      color: $background-color;
     }
   }
-  
-  .x-menu-header {
-    z-index: 0 !important;
-  }
-  
-  .x-css-shadow{
-    box-shadow: none !important;
-  }
-  
-  .shadow {
-    @include box-shadow(rgba(0,0,0,0.2) 0 1px 2px);
-  }
-  
-  .x-fa {
-    display: inline-block;
-  }
-  
-  .alignRight {
-    float: right;
-  }
-  
-  .boldFont {
-    font-weight: bold;
-  }
+}
+
+.x-menu-header {
+  z-index: 0 !important;
+}
+
+.x-css-shadow {
+  box-shadow: none !important;
+}
+
+.shadow {
+  @include box-shadow(rgba(0, 0, 0, 0.2) 0 1px 2px);
+}
+
+.x-fa {
+  display: inline-block;
+}
+
+.alignRight {
+  float: right;
+}
 
-  
+.boldFont {
+  font-weight: bold;
+}

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

@@ -165,6 +165,18 @@ Ext.define('saas.view.core.form.FormPanelController', {
         })
         .catch(function(res) {
             console.error(res);
+            if(res.data) {
+                var id = localJson.data.id;
+                var code = localJson.data.code;
+                
+                form.initId = id;
+
+                var newId = form.xtype + '-' + id;
+                var newTitle = form._title + '(' + code + ')';
+
+                refreshTabTitle(newId, newTitle);
+                form.FormUtil.loadData(form);
+            }
             showToast('审核失败: ' + res.message);
         });
     },

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

@@ -128,6 +128,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入物料编号、名称或规格',
+                            width: 200,
                             xtype : "textfield", 
                             name : "search", 
                             allowBlank : true, 

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

@@ -91,14 +91,15 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         defaultCondition:"pr_statuscode='OPEN'",
                         //窗口字段设置
                         dbSearchFields:[{
-                            emptyText:'输入仓库编号或名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
-                            name : "name", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "(upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
-                            }
+                            columnWidth : 0.25
                         }],
                         //窗口列设置
                         dbColumns:[{
@@ -189,14 +190,15 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         defaultCondition:"pr_statuscode='OPEN'",
                         //窗口字段设置
                         dbSearchFields:[{
-                            emptyText:'输入仓库编号或名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
-                            name : "name", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "(upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
-                            }
+                            columnWidth : 0.25
                         }],
                         //窗口列设置
                         dbColumns:[{