Browse Source

【BL_2018110014】【物料资料列表单价保留4位,出货单价宽度加长】

rainco 7 years ago
parent
commit
ef66250300
1 changed files with 4 additions and 13 deletions
  1. 4 13
      frontend/saas-web/app/view/document/product/BasePanel.js

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

@@ -115,10 +115,7 @@ Ext.define('saas.view.document.product.BasePanel', {
             xtype: 'numbercolumn',
             width : 120.0,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 4, true);
             }
         },  {
             text : "最新采购价(元)", 
@@ -126,21 +123,15 @@ Ext.define('saas.view.document.product.BasePanel', {
             xtype: 'numbercolumn',
             width : 120.0,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
-                var format = '0.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 4, true);
             }
         }, {
             text : "最新出货单价(元)", 
             dataIndex : "pr_saleprice",
             xtype: 'numbercolumn',
-            width : 120.0,
+            width : 130.0,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
-                var format = '0.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 4, true);
             }
         }, {
             text : "备注",