Browse Source

销售-库存报表标准化

rainco 7 years ago
parent
commit
dd90ded33f

+ 1 - 2
frontend/saas-web/app/model/report/Sale.js

@@ -20,9 +20,8 @@ Ext.define('saas.model.report.Sale', {
         { name: 'sd_price', type: 'float' },
         { name: 'sd_nettotal', type: 'float' },
         { name: 'sd_taxrate', type: 'float' },
-        { name: 'sd_taxamount', type: 'float',
+        { name: 'sd_total - sd_nettotal', type: 'float',
             convert: function(v, rec) {
-                debugger;
                 var t = (rec.get('sd_total') || 0.0) - (rec.get('sd_nettotal') || 0.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },

+ 35 - 0
frontend/saas-web/app/model/report/SaleProfit.js

@@ -0,0 +1,35 @@
+Ext.define('saas.model.report.SaleProfit', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'pi_date', type: 'date' },
+        { name: 'sa_custname', type: 'string' },
+        { name: 'sa_seller', type: 'string' },
+        { name: 'pd_inoutno', type: 'string' },
+        { name: 'pr_code', type: 'string' },
+        { name: 'pr_brand', type: 'string' },
+        { name: 'pr_detail', type: 'string' },
+        { name: 'pr_orispeccode', type: 'string' },
+        { name: 'pr_spec', type: 'string' },
+        { name: 'pd_outqty', type: 'float' },
+        { name: 'pr_unit', type: 'string' },
+        { name: 'pd_netprice', type: 'float' },
+        { name: 'pd_sendprice', type: 'float' },
+        { name: 'pd_nettotal', type: 'float' },
+        { name: 'pd_taxrate', type: 'int' },
+        { name: 'pd_ordertotal-pd_nettotal', type: 'float',
+            convert: function(v, rec) {
+                var t = (rec.get('pd_ordertotal') || 0.0) - (rec.get('pd_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['pd_ordertotal', 'pd_nettotal']
+        }, 
+        { name: 'pd_ordertotal', type: 'float' },
+        { name: 'pd_price', type: 'float' },
+        { name: 'pd_total', type: 'float' },
+        { name: 'pd_profit', type: 'float' },
+        { name: 'pd_profitpresent', type: 'float' },
+        { name: 'pd_remark', type: 'string' }
+    ],
+});

+ 24 - 0
frontend/saas-web/app/model/report/SaleRec.js

@@ -0,0 +1,24 @@
+Ext.define('saas.model.report.SaleRec', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'rb_code', type: 'string' },
+        { name: 'rb_custname', type: 'string' },
+        { name: 'rb_date', type: 'date' },
+        { name: 'sd_prodcode', type: 'string' },
+        { name: 'rbd_slcode', type: 'string' },
+        { name: 'rbd_slkind', type: 'string' },
+        { name: 'pi_nettotal', type: 'float' },
+        { name: 'pi_total', type: 'float' },
+        { name: 'rbd_nowbalance', type: 'float' },
+        { name: 'rb_backrate', type: 'float' },
+        { name: 'pi_total-pi_nettotal', type: 'float',
+            convert: function(v, rec) {
+                var t = (rec.get('sd_total') || 0.0) - (rec.get('sd_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['pi_total', 'pi_nettotal']
+        },{ name: 'rb_remark', type: 'string' }
+    ],
+});

+ 4 - 9
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -189,15 +189,12 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
     initStore: function () {
         var me = this, cfg = {};
-        if(me.groupField) {
-            cfg.sorters = {
-                property: me.groupField,
-                direction: 'ASC'
-            }
+        if(me.reportModel) {
+            cfg.model = me.reportModel;
+        }else {
+            cfg.fields = me.getFields();
         }
         var store = Ext.create('Ext.data.Store', Ext.Object.merge({
-            //fields: me.getFields(),
-            model: me.reportModel,
             autoLoad: me.autoLoad,
             pageSize: 15,
             data: [],
@@ -212,8 +209,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
                     type: 'json',
                     rootProperty: me.rootProperty,
                     totalProperty: me.totalProperty,
-                    // rootProperty: 'data.list.list',
-                    // totalProperty: 'data.list.total',
                 },
                 listeners: {
                     exception: function (proxy, response, operation, eOpts) {

+ 16 - 24
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -98,14 +98,12 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 dataIndex : "id", 
                 hidden : true, 
                 xtype : "numbercolumn"
-            },
-            {
+            }, {
                 text : "关联ID", 
                 dataIndex : "bd_bomid", 
                 hidden : true,  
                 xtype : "numbercolumn"
-            },
-            {
+            }, {
                 allowBlank:false,
                 text : "物料编号", 
                 dataIndex : "bd_soncode", 
@@ -128,14 +126,13 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 text : "物料ID", 
                 hidden : true, 
                 dataIndex : "bd_sonid", 
-            },{
+            }, {
                 text: 'model映射需要',
                 dataIndex: 'productDTO',
                 hidden: true,
-            },
-            {
+            }, {
                 text : "品牌", 
-                width : 150.0, 
+                width : 100.0, 
                 dataIndex : "pr_brand",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -144,10 +141,9 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     }                     
                     return v;
                 }
-            },
-            {
-                text : "名称", 
-                width : 200.0, 
+            }, {
+                text : "物料名称", 
+                width : 150.0, 
                 dataIndex : "pr_detail",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -170,7 +166,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 }
             },{
                 text : "规格", 
-                width : 150, 
+                width : 200, 
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -179,15 +175,10 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     }                     
                     return v;
                 }
-            },{
-                text : "单位", 
-                dataIndex : "bd_unit", 
-                width : 80 
-            },
-            {
+            }, {
                 allowBlank:false,
                 text : "用量", 
-                width : 80, 
+                width : 110, 
                 dataIndex : "bd_baseqty",
                 editor : {
                     xtype : "numberfield",
@@ -196,11 +187,12 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     maxLength: 10,
                 },
                 renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 3, true);
                 }
+            }, {
+                text : "单位", 
+                dataIndex : "bd_unit", 
+                width : 65 
             }, {
                 text : "替代料", 
                 dataIndex : "bd_replace", 

+ 15 - 50
frontend/saas-web/app/view/sale/report/Sale.js

@@ -91,10 +91,7 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         width: 110,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '单位',
@@ -107,10 +104,7 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : 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: '含税单价(元)',
@@ -119,10 +113,7 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : 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: '金额(元)',
@@ -131,17 +122,12 @@ Ext.define('saas.view.sale.report.Sale', {
         width: 120,
         dataIndex: 'sd_nettotal',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '金额',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '税率(%)',
@@ -156,28 +142,15 @@ Ext.define('saas.view.sale.report.Sale', {
         text: '税额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'sd_taxamount',
+        dataIndex: 'sd_total - sd_nettotal',
         width: 120,
         renderer : function(v) {
-            v = (r.data["sd_total"]||0.0) - (r.data["sd_nettotal"]||0.0);
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
-        summaryType: 'customize_sum',
+        summaryType: 'sum',
+        summaryLabel: '税额',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        },
-        mySummaryRenderer: function(grid, column, datas) {
-            var arr = [];
-            arr = datas.map(function(d) {
-                return d['sd_taxamount'];
-            });
-            return Ext.Array.sum(arr);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '价税合计(元)',
@@ -186,17 +159,12 @@ Ext.define('saas.view.sale.report.Sale', {
         dataIndex: 'sd_total',
         width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '价税合计',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '出货数量',
@@ -205,10 +173,7 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         width: 110,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text : "备注", 

+ 54 - 67
frontend/saas-web/app/view/sale/report/SaleProfit.js

@@ -29,16 +29,17 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         fieldLabel: '时间',
         columnWidth: 0.4
     }],
-
+    reportModel: 'saas.model.report.SaleProfit',
     reportColumns: [
     {
         text: 'id',
         dataIndex: 'sa_id',
         hidden: true
     }, {
-        text: '客户编号',
-        dataIndex: 'sa_custcode',
-        width: 150
+        text: '单据日期',
+        xtype: 'datecolumn',
+        dataIndex: 'pi_date',
+        width: 110
     }, {
         text: '客户名称',
         dataIndex: 'sa_custname',
@@ -46,36 +47,27 @@ Ext.define('saas.view.sale.report.SaleProfit', {
     }, {
         text: '业务员',
         dataIndex: 'sa_seller',
-        width: 110
-    }, {
-        text: '单据日期',
-        xtype: 'datecolumn',
-        dataIndex: 'pi_date',
-        width: 110
+        width: 80
     }, {
         text: '单据编号',
         dataIndex: 'pd_inoutno',
         width: 150
     }, {
-        text: '单据类型',
+        text: '业务类型',
         dataIndex: 'pd_piclass',
-        width: 110
-    }, {
-        text: '物料类别',
-        dataIndex: 'pr_kind',
-        width: 110
+        width: 100
     }, {
         text: '物料编号',
-        width: 150,
-        dataIndex: 'pr_code'
+        dataIndex: 'pr_code',
+        width: 150
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
-        width: 200
+        width: 100
     }, {
         text: '名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -83,7 +75,7 @@ Ext.define('saas.view.sale.report.SaleProfit', {
     }, {
         text: '规格',
         dataIndex: 'pr_spec',
-        width: 150
+        width: 200
     }, {
         text: '数量',
         dataIndex: 'pd_outqty',
@@ -91,69 +83,73 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         xtype: 'numbercolumn',
         width: 110,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '单位',
         dataIndex: 'pr_unit',
-        width: 80
+        width: 65
+    }, {
+        text: '单价(元)',
+        dataIndex: 'pd_netprice',
+        exportFormat: 'Price',
+        xtype: 'numbercolumn',
+        width: 120,
+        renderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
+        }
     }, {
         text: '含税单价(元)',
         dataIndex: 'pd_sendprice',
         exportFormat: 'Price',
         xtype: 'numbercolumn',
-        width: 150,
+        width: 120,
+        renderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
+        }
+    }, {
+        text: '金额(元)',
+        dataIndex: 'pd_nettotal',
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '税率%',
+        text: '税率(%)',
         dataIndex: 'pd_taxrate',
         exportFormat: 'Integer',
         xtype: 'numbercolumn',
-        width: 90,
+        width: 80,
         renderer: function(v) {
             return Ext.util.Format.number(v, '0');
         }
     }, {
-        text: '含税金额(元)',
-        dataIndex: 'pd_ordertotal',
+        text: '税额(元)',
+        exportFormat: 'Amount',
+        dataIndex: 'pd_ordertotal - pd_nettotal',
         xtype: 'numbercolumn',
+        width:120,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '不含税单价(元)',
-        exportFormat: 'Price',
-        dataIndex: 'pd_netprice',
+        text: '价税合计(元)',
+        exportFormat: 'Amount',
+        dataIndex: 'pd_ordertotal',
         xtype: 'numbercolumn',
-        width:150,
+        width:120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '成本单价(元)',
-        dataIndex: 'pw_costprice',
+        dataIndex: 'pd_price',
         exportFormat: 'Price',
         xtype: 'numbercolumn',
-        width:140,
+        width:120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : 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: '成本金额(元)',
@@ -161,31 +157,22 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '毛利润',
+        text: '毛利润(元)',
         dataIndex: 'pd_profit',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '毛利率%',
+        text: '毛利率(%)',
         dataIndex: 'pd_profitpresent',
         xtype: 'numbercolumn',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text : "备注", 

+ 16 - 33
frontend/saas-web/app/view/sale/report/SaleRec.js

@@ -13,7 +13,7 @@ Ext.define('saas.view.sale.report.SaleRec', {
     defaultCondition: null,
     reportTitle: '销售收款报表',
     QueryWidth:0.25,
-    searchItems: [{//筛选:客户、日期	
+    searchItems: [{	
         xtype: 'customerDbfindTrigger',
         name: 'rb_custname',
         fieldLabel: '客户',
@@ -24,7 +24,7 @@ Ext.define('saas.view.sale.report.SaleRec', {
         fieldLabel: '日期',
         columnWidth: 0.5
     }],
-
+    reportModel: 'saas.model.report.SaleRec',
     reportColumns: [{
         text: 'id',
         dataIndex: 'id',
@@ -47,35 +47,29 @@ Ext.define('saas.view.sale.report.SaleRec', {
         width: 150
     }, {
         text: '业务类型',
-        dataIndex: 'rbd_slkind'
+        dataIndex: 'rbd_slkind',
+        width: 100
     }, {
         text: '金额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'pi_nettotal',
+        width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '税额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'rbd_taxamount',
+        dataIndex: 'pi_total-pi_nettotal',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '税额',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '价税合计(元)',
@@ -83,29 +77,21 @@ Ext.define('saas.view.sale.report.SaleRec', {
         exportFormat: 'Amount',
         dataIndex: 'pi_total',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '价税合计',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '收款额(元)',
+        text: '收款金额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'rbd_nowbalance',
         hidden:true,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '回款比例%',
@@ -113,10 +99,7 @@ Ext.define('saas.view.sale.report.SaleRec', {
         exportFormat: 'Number2',
         xtype: 'numbercolumn',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '备注',

+ 25 - 28
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -23,6 +23,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         xtype: 'condatefield',
         name: 'pi_date',
         fieldLabel: '日期',
+        showDetail: true,
         allowBlank: true,
         columnWidth: 0.5
     }, {
@@ -41,6 +42,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         queryMode: 'local',
         emptyText :'全部',
         editable:false,
+        showDetail: true,
         displayField: 'pi_status',
         valueField: 'pi_statuscode',
         store: Ext.create('Ext.data.ArrayStore', {
@@ -120,53 +122,48 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             text: '调拨单号',
             dataIndex: 'pi_inoutno',
             width: 150
-        },{
+        }, {
             text: '单据类型',
             dataIndex: 'pi_class',
             width: 0
-        },{
+        }, {
             text: '单据日期',
             dataIndex: 'pi_date',
             xtype:'datecolumn',
             width: 110
-        },{
+        }, {
             text: '状态',
             align: 'center',
             dataIndex: 'pi_status',
             width: 90
-        },{
+        }, {
             text: '备注',
             dataIndex: 'pi_remark',
             width: 250
         }],
-        relativeColumn: [
-            {
+        relativeColumn: [{
                 text: 'id',
                 dataIndex: 'pi_id',
                 xtype: 'numbercolumn',
                 hidden:true
-            },{
+            }, {
                 text: '调拨单号',
                 dataIndex: 'pi_inoutno',
                 width: 150
-            },{
-                text: '单据类型',
-                dataIndex: 'pi_class',
-                width: 0
-            },{
+            }, {
                 text: '单据日期',
                 dataIndex: 'pi_date',
                 xtype:'datecolumn',
                 width: 110
             },{
-                text: '状态',
+                text: '审核状态',
                 align: 'center',
                 dataIndex: 'pi_status',
-                width: 90
+                width: 80
             },{
                 text: '序号',
                 dataIndex: 'pd_pdno',
-                width: 80
+                width: 65
             },{
                 text: '物料编号',
                 dataIndex: 'pd_prodcode',
@@ -174,11 +171,11 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             },{
                 text: '品牌',
                 dataIndex: 'pr_brand',
-                width: 150
+                width: 100
             },{
-                text: '名称',
+                text: '物料名称',
                 dataIndex: 'pr_detail',
-                width: 200
+                width: 150
             },{
                 text: '型号',
                 dataIndex: 'pr_orispeccode',
@@ -186,34 +183,34 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             },{
                 text: '规格',
                 dataIndex: 'pr_spec',
-                width: 150
+                width: 200
             },{
                 text: '数量',
                 dataIndex: 'pd_outqty',
                 xtype:'numbercolumn',
                 width: 110,
                 renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 3, true);
                 }
             }, {
                 text: '单位',
                 dataIndex: 'pr_unit',
-                width: 80
+                width: 65
             }, {
-                text: '拨出仓',
+                text: '拨出仓',
                 dataIndex: 'pd_whname',
-                width: 150
+                width: 80
             },{
-                text: '拨入仓',
+                text: '拨入仓',
                 dataIndex: 'pd_inwhname',
-                width: 150
+                width: 80
             },{
                 text: '备注',
                 dataIndex: 'pd_remark',
                 width:250
             }]
+    },
+    getQueryMode: function() {
+        return 'DETAIL';
     }
 });

+ 40 - 61
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -106,62 +106,45 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         dataIndex : "id",
         hidden:true, 
         xtype : "numbercolumn", 
-    },{
+    }, {
+        text : "仓库id", 
+        dataIndex : "st_whid", 
+        xtype : "numbercolumn", 
+        hidden:true
+    }, {
+        text : "仓库编号", 
+        dataIndex : "st_whcode", 
+        hidden:true
+    }, {
+        text : "仓库", 
+        dataIndex : "st_whname", 
+        width : 80.0
+    }, {
+        text : "物料类型", 
+        dataIndex : "st_prodkind", 
+        width : 100.0
+    }, {
         text : "物料id", 
-        hidden:true,
         dataIndex : "st_prodid", 
         xtype : "numbercolumn", 
-    }, 
-    {
+        hidden:true
+    }, {
         text : "物料编号", 
         dataIndex : "st_prodcode", 
-        width : 150.0, 
-        xtype : "", 
-    }, 
-    {
+        width : 150.0,
+    }, {
+        text : "品牌", 
+        dataIndex : "pr_brand", 
+        width : 100.0
+    }, {
         text : "物料名称", 
         dataIndex : "st_proddetail", 
-        width : 200.0, 
-        xtype : "", 
-    },
-    {
+        width : 150.0
+    }, {
         text : "型号", 
         dataIndex : "st_prodorispeccode", 
-        width : 150.0, 
-        xtype : "", 
-    },
-    {
-        text : "物料类别", 
-        dataIndex : "st_prodkind", 
-        width : 100.0, 
-        xtype : "", 
-    },
-    {
-        text : "单位", 
-        dataIndex : "st_produnit", 
-        width : 75.0, 
-        xtype : "", 
-    },
-    {
-        text : "仓库id", 
-        dataIndex : "st_whid", 
-        hidden:true,
-        xtype : "numbercolumn", 
-    },
-    {
-        text : "仓库编号", 
-        dataIndex : "st_whcode", 
-        width : 0,
-        hidden:true, 
-        xtype : "", 
-    },
-    {
-        text : "仓库", 
-        dataIndex : "st_whname", 
-        width : 200.0, 
-        xtype : "", 
-    },
-    {
+        width : 200.0
+    }, {
         text : "系统库存", 
         dataIndex : "st_batchqty", 
         width : 110.0, 
@@ -172,12 +155,14 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
             var format = '0.' + xr.join('');
             return Ext.util.Format.number(v, format);
         } 
-    },
-    {
+    }, {
+        text : "单位", 
+        dataIndex : "st_produnit", 
+        width : 65.0 
+    }, {
         text : "盘点库存", 
         dataIndex : "st_actqty", 
         width : 110.0, 
-        // xtype : "numbercolumn",
         align: 'right',
         editor : {
             xtype : "numberfield",
@@ -195,23 +180,16 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
             }    
         },
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }            
     },
     {
         text : "盘盈盘亏", 
         dataIndex : "st_num", 
         width : 110.0, 
-        // xtype : "numbercolumn",
         aligin: 'right',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }  
     }],
 
@@ -516,8 +494,9 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
 
         Ext.Array.each(allData, function(item){
             var d = Object.assign({}, item.data),
-            dirty = item.dirty;
-            if(dirty){
+            dirty = item.dirty,
+            ignore = item.ignore;
+            if(dirty&&!ignore){
                 if((typeof d.id) != "number" && d.id.indexOf('-')>-1){
                     d.id = 0;
                 }

+ 42 - 94
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -149,14 +149,12 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 dataIndex : "id", 
                 xtype : "numbercolumn",
                 hidden:true
-            },
-            {
+            }, {
                 text : "mm_prodidid", 
                 dataIndex : "mm_prodid", 
                 xtype : "numbercolumn",
                 hidden:true
-            },
-            {
+            }, {
                 text : "物料编号", 
                 width : 150.0, 
                 dataIndex : "mm_prodcode", 
@@ -176,14 +174,13 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     valueField : "value", 
                     xtype : "productMultiDbfindTrigger"
                 }
-            },{
+            }, {
                 text: 'model映射需要',
                 dataIndex: 'productDTO',
                 hidden: true,
-            },
-            {
+            }, {
                 text : "品牌", 
-                width : 150.0, 
+                width : 100.0, 
                 dataIndex : "pr_brand",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -192,8 +189,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     }                     
                     return v;
                 }
-            },
-            {
+            }, {
                 text : "名称", 
                 width : 200.0, 
                 dataIndex : "pr_detail",
@@ -204,8 +200,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     }                     
                     return v;
                 }
-            },
-            {
+            }, {
                 text : "型号", 
                 width : 200.0, 
                 dataIndex : "pr_orispeccode",
@@ -218,7 +213,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 }
             },{
                 text : "规格", 
-                width : 150, 
+                width : 200, 
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -238,23 +233,22 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     minValue:0
                 },
                 renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 3, true);
                 },
                 summaryType: 'sum',
                 summaryRenderer: function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 3, true);
                 }
-            },
-            {
+            }, {
+            
+                text : "单位用量", 
+                xtype: 'numbercolumn',
+                dataIndex : "mm_oneuseqty", 
+                hidden:true
+            }, {
                 text : "单位", 
                 dataIndex : "pr_unit",
-                width : 80.0,
+                width : 65.0,
                 ignore:true,
                 renderer: function (v, m, r) {
                     if(!v){
@@ -262,67 +256,19 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     }
                     return v;
                 }
-            },{
-                text : "成本单价(元)", 
-                dataIndex : "mm_price", 
-                xtype: 'numbercolumn',
-                width : 140.0,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 4,
-                    minValue:0
-                },
-                listeners:{
-                    edit:'price_change'
-                },
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
-                }
-            },
-            {
-                text : "单位用量", 
-                xtype: 'numbercolumn',
-                dataIndex : "mm_oneuseqty", 
-                width : 110.0,
-                hidden:true,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 8,
-                    editable:false,
-                    minValue:0
-                },
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
-                },
-                summaryType: 'sum',
-                summaryRenderer: function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
-                }
-            },            
-            {
+            }, {
                 text : "仓库id",
                 dataIndex : "mm_whid",
                 xtype : "numbercolumn",
                 hidden:true
-            },
-            {
+            }, {
                 text : "仓库编号",
                 dataIndex : "mm_whcode",
                 hidden:true
-            },
-            {
+            }, {
                 text : "仓库",
                 dataIndex : "mm_whname",
-                width : 150.0,
+                width : 80.0,
                 items : null,
                 allowBlank : false,
                 editor : {
@@ -338,37 +284,39 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     valueField : "value",
                     xtype : "warehouseDbfindTrigger"
                 }
-            },{
+            }, {
+                text : "成本单价(元)", 
+                dataIndex : "mm_price", 
+                xtype: 'numbercolumn',
+                width : 120.0,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 4,
+                    minValue:0
+                },
+                listeners:{
+                    edit:'price_change'
+                },
+                renderer : function(v) {
+                    return saas.util.BaseUtil.numberFormat(v, 4, true);
+                }
+            }, {
                 text : "成本金额", 
                 xtype: 'numbercolumn',
                 dataIndex : "mm_amount", 
-                width : 110.0, 
+                width : 120.0, 
                 editor : {
                     xtype : "numberfield",
                     decimalPrecision: 2,
                     editable : false
                 },
                 renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 2, true);
                 },
                 summaryType: 'sum',
                 summaryRenderer: function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 2, true);
                 }
-            },{
-                text : "替代料",
-                dataIndex : "mm_repprodcode",
-                width : 0,
-                editor : {
-                    xtype : "textfield"
-                },
-            
             }, {
                 text : "备注",
                 dataIndex : "mm_remark",

+ 3 - 12
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -178,10 +178,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 3, true);
             },
         }, {
             text: '单位',
@@ -193,10 +190,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 4 ? 4 : 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: '金额(元)',
@@ -204,10 +198,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 2, true);
             }
         },{
             text: '备注',

+ 3 - 13
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -178,10 +178,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 3, true);
             }
         }, {
             text: '单位',
@@ -193,10 +190,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 4 ? 4 : 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: '金额(元)',
@@ -204,11 +198,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {
-                v = (r.data["pd_ordertotal"]||0.0) * (r.data["pd_inqty"]||0.0);
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 2, true);
             }
         },{
             text: '备注',

+ 12 - 28
frontend/saas-web/app/view/stock/report/DataList.js

@@ -53,11 +53,11 @@ Ext.define('saas.view.stock.report.DataList', {
     }, {
         text: '品牌',
         dataIndex: 'rc_prodBrand',
-        width: 200
+        width: 100
     }, {
         text: '名称',
         dataIndex: 'rc_prodDetail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'rc_prodOrispec',
@@ -65,18 +65,13 @@ Ext.define('saas.view.stock.report.DataList', {
     }, {
         text: '规格',
         dataIndex: 'rc_prodSpec',
-        width: 150
-    }, {
-        text: "仓库编号",
-        dataIndex: "rc_whCode",
-        width: 200,
-        hidden:true
+        width: 200
     }, {
-        text: "仓库名称",
+        text: "仓库",
         dataIndex: "rc_whName",
         hidden: true,
         toggle: true,
-        width: 110,
+        width: 80,
     }, {
         text: "数量",
         xtype: 'numbercolumn',
@@ -84,15 +79,12 @@ Ext.define('saas.view.stock.report.DataList', {
         dataIndex: "rc_number",
         width: 120,
         renderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     },{
         text: "单位",
         dataIndex: "rc_prodUnit",
-        width: 80
+        width: 65
     }, {
         text: "单价(元)",
         xtype: 'numbercolumn',
@@ -102,30 +94,22 @@ Ext.define('saas.view.stock.report.DataList', {
         dataIndex: "rc_price",
         width: 120,
         renderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : 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: "金额",
+        text: "金额(元)",
         xtype: 'numbercolumn',
         dataIndex: "rc_amount",
         exportFormat: 'Amount',
         toggle: true,
         width: 120,
         renderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '金额',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         flex: 1

+ 9 - 10
frontend/saas-web/app/view/stock/report/ProdinoutCount.js

@@ -6,13 +6,11 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
     viewModel: 'stock-report-prodinoutCount',
 
     viewName: 'stock-report-prodinoutCount',
-    //按物料分组
     groupField: null,
     listUrl: '/api/storage/report/prodinoutCount',
     defaultCondition: null,
     reportTitle: '物料收发汇总表',
     QueryWidth:0.4,
-    //筛选:仓库、物料、物料类型、时间			
     searchItems: [{		
         xtype: 'warehouseDbfindTrigger',
         name: 'wh_description',
@@ -36,11 +34,11 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
-        width: 200
+        width: 100
     }, {
         text: '名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -48,18 +46,19 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
     }, {
         text: '规格',
         dataIndex: 'pr_spec',
-        width: 150
+        width: 200
+    }, {
+        text: '物料类型',
+        dataIndex: 'pr_kind',
+        width: 100
     }, {
         text: '单位',
         dataIndex: 'pr_unit',
-        width: 80
-    },{
-        text: '物料类型',
-        dataIndex: 'pr_kind'
+        width: 65
     },{
         text: '仓库',
         dataIndex:'wh_description',
-        width: 150
+        width: 80
     }, {
         text: '期初',
         columns: [{

+ 29 - 37
frontend/saas-web/app/view/stock/report/Prodiodetail.js

@@ -6,7 +6,6 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
     viewModel: 'stock-report-prodiodetail',
 
     viewName: 'stock-report-prodiodetail',
-  //  按物料分组
     groupField: 'pd_prodcode',
     groupHeaderTpl: '物料: {[values.rows[0].data.pr_detail]}({[values.rows[0].data.pd_prodcode]})',
     listUrl: '/api/storage/report/prodioDetail',
@@ -15,7 +14,6 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
     QueryWidth:0.2,
     showMySummary: false,
 
-    //筛选:单据类型、物料、日期
     searchItems: [ {		
         xtype: 'textfield',
         name: 'pd_prodcode',
@@ -60,31 +58,32 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
         dataIndex: 'pi_inoutno',
         width: 150
     }, {
-        text: '单据类型',
+        text: '业务类型',
         dataIndex: 'pi_class',
-        width: 110
+        width: 100
     }, {
         text: '日期',
         dataIndex: 'pi_date',
-        xtype: 'datecolumn'
+        xtype: 'datecolumn',
+        width: 110
     }, {
         text: '序号',
         dataIndex: 'pd_pdno',
         exportFormat: 'Integer',
         xtype: 'numbercolumn',
-        width: 80
+        width: 65
     }, {
         text: '物料编号',
-        width: 150,
-        dataIndex: 'pd_prodcode'
+        dataIndex: 'pd_prodcode',
+        width: 150
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
-        width: 200
+        width: 100
     }, {
         text: '名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -92,66 +91,59 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
     }, {
         text: '规格',
         dataIndex: 'pr_spec',
-        width: 150
-    },{
+        width: 200
+    }, {
         text: '入库数量',
         xtype: 'numbercolumn',
         exportFormat: 'Quantity',
         dataIndex: 'inqty',
+        width: 110,
         summaryType: 'sum',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '出库数量',
         xtype: 'numbercolumn',
         exportFormat: 'Quantity',
         dataIndex: 'outqty',
+        width: 110,
         summaryType: 'sum',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '单位',
         dataIndex: 'pd_unit',
-        width: 80
+        width: 65
     }, {
         text: '成本单价(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Price',
         dataIndex: 'pd_price',
-        width: 140,
+        width: 120,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : 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: '仓库',
         dataIndex: 'pd_whname',
-        width: 150
+        width: 80
+    }, {
+        text: '往来单位',
+        dataIndex: 'bizname',
+        width: 200
     }, {
-        text: '订单号',
+        text: '关联单号',
         dataIndex: 'pd_ordercode',
         width: 150
-    },{
-        text: '备注',
-        dataIndex: 'pd_remark',
-        width: 250
     }, {
-        text: '客户/供应商编号',
-        dataIndex: 'bizcode',
-        width: 150
+        text: '物料类型',
+        dataIndex: 'pr_kind',
+        width: 100
     }, {
-        text: '客户/供应商名称',
-        dataIndex: 'bizname',
+        text: '备注',
+        dataIndex: 'pd_remark',
         width: 250
     }]