Explorar o código

BOM资料超长自动截取

zhuth %!s(int64=7) %!d(string=hai) anos
pai
achega
b3ae4b6401
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  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('.');