Browse Source

【bug】核销单-应收冲应付-供应商未填从表2放大镜提示调整/放大镜清空值之后blur将值同步到viewModel

zhuth 7 năm trước cách đây
mục cha
commit
ec73899244

+ 4 - 6
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -255,15 +255,13 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                             var item = dbfinds[index];
                             var field = me.ownerCt.down('[name=' + item.to + ']');
                             if (field) {
-                                if (field.xtype == 'dbfindtrigger') {
+                                let xtypes = field.getXTypes().split('/');
+                                if (xtypes.indexOf('dbfindtrigger') != -1) {
                                     field.setValue(null);
                                     field.lastTriggerValue = null;
                                 } else {
-                                    if (field.xtype.indexOf('hidden') > -1) {
-                                        field.setValue(0);
-                                    } else {
-                                        field.setValue(null);
-                                    }
+                                    field.setValue(null);
+                                    field.publishState('value', null);
                                 }
                             }
                         }

+ 28 - 13
frontend/saas-web/app/view/main/Navigation.js

@@ -43,9 +43,22 @@ Ext.define('saas.view.main.Navigation', {
             singleSelect: true,
             itemSelector: '.x-navitem',
             listeners: {
-                itemmouseenter: me.showNavMenu,
-                itemmouseleave: me.hideNavMenu,
-                itemClick: me.clickNavMenu,
+                itemmouseenter: function(navView, record, navItem, index, e, eOpts) {
+                    window.clearTimeout(me.Timer);
+                    me.Timer = setTimeout(function() {
+                        me.showNavMenu(navView, record, navItem, index, e, eOpts);
+                    }, 80);
+                },
+                itemmouseleave: function(view, record, item, index, e, eOpts) {
+                    window.clearTimeout(me.Timer);
+                    me.hideNavMenu(view, record, item, index, e, eOpts);
+                },
+                itemClick: function(navView, record, navItem, index, e, eOpts) {
+                    window.clearTimeout(me.Timer);
+                    me.Timer = setTimeout(function() {
+                        me.showNavMenu(navView, record, navItem, index, e, eOpts);
+                    }, 20);
+                },
                 scope: me
             }
         });
@@ -58,10 +71,10 @@ Ext.define('saas.view.main.Navigation', {
         me.callParent();
     },
 
-    clickNavMenu: function (view, record, item, index, e, eOpts) {
-        var me = this;
-        this.showNavMenu(view, record, item, index, e, eOpts);
-    },
+    // clickNavMenu: function (view, record, item, index, e, eOpts) {
+    //     var me = this;
+    //     this.showNavMenu(view, record, item, index, e, eOpts);
+    // },
 
     showNavMenu: function (navView, record, navItem, index, e, eOpts) {
         var me = this,
@@ -200,15 +213,17 @@ Ext.define('saas.view.main.Navigation', {
 
     hideNavMenu: function (view, record, item, index, e, eOpts) {
         var recData = record.data,
-            cx = e.browserEvent.clientX,
-            cy = e.browserEvent.clientY,
-            itemBox = item.getBoundingClientRect(),
             id = recData.id,
             menuId = 'navMenu-' + id,
-            menu = Ext.getCmp(menuId);
+            menu = Ext.getCmp(menuId),
+            cx, cy, itemBox;
+
+        if (menu) {
+            cx = e.browserEvent.clientX,
+            cy = e.browserEvent.clientY,
+            itemBox = item.getBoundingClientRect();
 
-        if (cx <= itemBox.left || cy <= itemBox.top || (cy >= (itemBox.top + itemBox.height) && cx <= (itemBox.left + itemBox.width - 10))) {
-            if (menu) {
+            if (cx <= itemBox.left || cy <= itemBox.top || (cy >= (itemBox.top + itemBox.height) && cx <= (itemBox.left + itemBox.width - 10))) {
                 menu.hide();
             }
         }

+ 1 - 1
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -603,7 +603,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
                     }, {
                         xtype: 'hidden',
                         name: 'vc_vendid',
-                        fieldLabel: '供应商ID',
+                        fieldLabel: '供应商',
                         listeners: {
                             change: 'clearDetail1'
                         }

+ 0 - 12
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -623,18 +623,6 @@ Ext.define('saas.view.money.verification.FormPanelController', {
         })
         .catch(function(e) {
             form.setLoading(false);
-            // 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 + ')';
-
-            //     saas.util.BaseUtil.refreshTabTitle(newId, newTitle);
-            //     saas.util.FormUtil.loadData(form);
-            // }
             saas.util.BaseUtil.showErrorToast('审核失败: ' +  e.message);
             form.fireEvent('afteraudit', false, form);
         });