Selaa lähdekoodia

BOM资料超长自动截取

zhuth 7 vuotta sitten
vanhempi
commit
b3ae4b6401
1 muutettua tiedostoa jossa 8 lisäystä ja 1 poistoa
  1. 8 1
      frontend/saas-web/app/view/document/bom/FormPanel.js

+ 8 - 1
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -161,7 +161,14 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     xtype : "numberfield",
                     decimalPrecision: 0,
                     minValue:0,
-                    maxLength: 10
+                    maxLength: 10,
+                    listeners: {
+                        change: function(f, v) {
+                            if((v+'').length > 10) {
+                                f.setValue(Number((v+'').substr(0, 10)));
+                            }
+                        }
+                    }
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');