Browse Source

界面优化:数据精度,字段调整,报表界面配置

rainco 7 years ago
parent
commit
f899bc8d92

+ 2 - 0
frontend/saas-web/app/view/document/bom/FormController.js

@@ -22,6 +22,8 @@ Ext.define('saas.view.document.bom.FormController', {
                             from:'pr_spec',to:'pr_spec'
                         },{
                             from:'pr_unit',to:'bd_unit'
+                        },{
+                            from:'id',to:'bd_sonid',ignore:true 
                         }],
                         //联想设置
                         dbtpls:[{

+ 54 - 18
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -57,12 +57,12 @@ Ext.define('saas.view.document.bom.FormPanel', {
     },{
         xtype: 'textfield',
         name: 'bo_mothername',
-        fieldLabel: 'BOM名称',
+        fieldLabel: '母件名称',
         allowBlank: false
     },{
         xtype: 'textfield',
         name: 'bo_mothercode',
-        fieldLabel: 'BOM编号',
+        fieldLabel: '母件编号',
         allowBlank: false
     },{
         xtype: 'textfield',
@@ -73,13 +73,9 @@ Ext.define('saas.view.document.bom.FormPanel', {
         name: 'bo_statuscode',
         fieldLabel: '状态码'
     },{
-        xtype : "datefield", 
-        name : "createTime", 
-        fieldLabel : "创建时间"
-    },{  
-        xtype : "datefield", 
-        name : "updateTime", 
-        fieldLabel : "更新时间"
+        xtype: 'textfield',
+        name: 'bo_version',
+        fieldLabel: '版本'
     }, {
         xtype : "detailGridField",
         detnoColumn: 'bd_detno',
@@ -101,7 +97,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
             },
             {
                 allowBlank:false,
-                text : "子件编号", 
+                text : "物料编号", 
                 dataIndex : "bd_soncode", 
                 editor : {
                     displayField : "display", 
@@ -116,8 +112,26 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     valueField : "value", 
                     xtype : "multidbfindtrigger"
                 }
-            },
-            {
+            }, {
+                allowBlank:false,
+                text : "物料ID", 
+                hidden : true, 
+                dataIndex : "bd_sonid", 
+            }, {
+                text : "物料名称", 
+                dataIndex : "pr_detail",
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+                }
+            }, {
+                text : "物料规格", 
+                dataIndex : "pr_spec",
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+                }
+            }, {
                 allowBlank:false,
                 text : "单位", 
                 editor : {
@@ -127,14 +141,20 @@ Ext.define('saas.view.document.bom.FormPanel', {
             },
             {
                 allowBlank:false,
-                text : "单位用量", 
+                text : "用量", 
+                dataIndex : "bd_baseqty",
                 editor : {
-                    xtype : "textfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 3,
+                    minValue:0
                 },
-                dataIndex : "bd_baseqty", 
-            },
-            {
-                allowBlank:false,
+                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);
+                }
+            }, {
                 text : "替代料", 
                 dataIndex : "bd_replace", 
                 editor : {
@@ -150,7 +170,23 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     valueField : "value", 
                     xtype : "multidbfindtrigger"
                 }
+            }, {
+                text : "备注", 
+                dataIndex : "bd_remark",
+                width : 250, 
+                items : null,
+                editor : {
+                    xtype : "textfield"
+                },
             }]
+    },{
+        xtype : "datefield", 
+        name : "createTime", 
+        fieldLabel : "创建时间"
+    },{  
+        xtype : "datefield", 
+        name : "updateTime", 
+        fieldLabel : "更新时间"
     }],
 
     auditTexts: {

+ 2 - 3
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -16,15 +16,14 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
     queryGridConfig: {
         idField: 'id',
         codeField: 'ft_code',
-        addTitle: '其它收入单',
+        addTitle: '资金转存',
         addXtype: 'money-fundtransfer-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/fundtransfer/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0,
-            xtype: 'hidden'
+            width: 0
         }, {
             text: '单据编号',
             dataIndex: 'ft_code',

+ 17 - 21
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -39,18 +39,11 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
          name : "or_custname", 
          fieldLabel : "客户名称"
      }, {
-        xtype : 'hidden',
-         name : 'or_bankid', 
-         fieldLabel : '账户ID'
-     }, {
-         xtype : 'hidden', 
-         name : 'or_bankcode', 
-         fieldLabel : '账户编号'
-     }, {
-         xtype : "dbfindtrigger", 
-         name : "or_bankname", 
-         fieldLabel : "账户名称"
-     }, {
+        xtype : "datefield", 
+        name : "or_date", 
+        fieldLabel : "单据日期",
+        readOnly:true
+    }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
         storeModel:'saas.model.money.Othreceipts',
@@ -63,15 +56,6 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 dataIndex : "id", 
                 xtype : "numbercolumn",
                 width:0
-            }, {
-                text : "期间", 
-                dataIndex : "ord_ym", 
-                editor : {
-                    xtype : "numberfield"
-                },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
             }, {
                 text : "收入类别", 
                 width : 200.0, 
@@ -129,6 +113,18 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
             }
         ]
     }, {
+        xtype : 'hidden',
+         name : 'or_bankid', 
+         fieldLabel : '账户ID'
+     }, {
+         xtype : 'hidden', 
+         name : 'or_bankcode', 
+         fieldLabel : '账户编号'
+     }, {
+         xtype : "dbfindtrigger", 
+         name : "or_bankname", 
+         fieldLabel : "结算账户"
+     }, {
         xtype : "numberfield", 
         name : "or_amount", 
         fieldLabel : "收款金额",

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

@@ -144,7 +144,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 allowBlank : false,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8,
+                    decimalPrecision: 3,
                     minValue:0
                 },
                 renderer : function(v) {

+ 10 - 8
frontend/saas-web/app/view/purchase/report/Purchase.js

@@ -19,14 +19,14 @@ Ext.define('saas.view.purchase.report.Purchase', {
         columnWidth: 0.5
     }],
 
-    reportColumns: [{
+    reportColumns: [
+    {
         text: 'id',
         dataIndex: 'pu_id',
         hidden: true
     }, {
         text: '采购单号',
         dataIndex: 'pu_code',
-        summaryType: 'count',
         width: 200
     }, {
         text: '供应商编号',
@@ -66,7 +66,8 @@ Ext.define('saas.view.purchase.report.Purchase', {
         dataIndex: 'pr_unit'
     }, {
         text: '采购数量',
-        dataIndex: 'pd_qty'
+        dataIndex: 'pd_qty',
+        summaryType: 'count'
     }, {
         text: '单价',
         dataIndex: 'pd_price'
@@ -75,19 +76,20 @@ Ext.define('saas.view.purchase.report.Purchase', {
         dataIndex: 'pd_taxrate'
     }, {
         text: '金额',
-        dataIndex: 'pd_total'
+        dataIndex: 'pd_total',
+        summaryType: 'count'
     }, {
         text: '不含税单价',
-        dataIndex: 'rbd_remark'
+        dataIndex: 'pd_taxprice'
     }, {
         text: '不含税金额',
-        dataIndex: 'pd_taxprice'
+        dataIndex: 'pd_taxtotal'
     }, {
         text: '收货数量',
-        dataIndex: 'pd_yqty'
+        dataIndex: 'pd_acceptqty'
     }, {
         text: '收货金额',
-        dataIndex: 'pd_total'
+        dataIndex: 'pd_accepttotal'
     }, {
         text: '备注'
     }]

+ 118 - 0
frontend/saas-web/app/view/purchase/report/PurchasePay.js

@@ -0,0 +1,118 @@
+Ext.define('saas.view.purchase.report.PurchasePay', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'purchase-report-purchasepay',
+
+    controller: 'purchase-report-purchasepay',
+    viewModel: 'purchase-report-purchasepay',
+
+    viewName: 'purchase-report-purchasepay',
+//按供应商分组 付款金额合计
+    groupField: 'pu_vendname',
+    listUrl: '/api/money/paybalance/list',
+    defaultCondition: null,
+    reportTitle: '采购付款一览表',
+
+    searchItems: [{
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        fieldLabel: '供应商编号'
+    }, {
+        xtype: 'textfield',
+        name: 'pu_vendname',
+        fieldLabel: '供应商名称'
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_date',
+        fieldLabel: '单据日期',
+        columnWidth: 0.5
+    }],
+
+    reportColumns: [
+    {
+        text: 'id',
+        dataIndex: 'pb_id',
+        hidden: true
+    }, {
+        text: '付款单号',
+        dataIndex: 'pb_code',
+        width: 200
+    }, {
+        text: '供应商编号',
+        dataIndex: 'pu_vendcode',
+        width: 200
+    }, {
+        text: '供应商名称',
+        dataIndex: 'pu_vendname',
+        width: 200
+    }, {
+        text: '录入人',
+        dataIndex: 'pb_recorder',
+        width: 200
+    }, {
+        text : "日期", 
+        dataIndex : "pb_recorddate", 
+        xtype:'datecolumn'
+    }, {
+        text: '来源单号',
+        dataIndex: 'pbd_slcode',
+        width: 200
+    }, {
+        text: '类型',
+        dataIndex: 'pbd_slkind',
+        width: 200
+    }, {//∑求和
+        text: '采购金额',
+        dataIndex: 'pbd_amount',
+        width: 200,
+        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);
+        },
+        summaryType: 'sum',
+        summaryRenderer: 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);
+        }
+    }, {//∑求和
+        text: '本次付款',
+        dataIndex: 'pbd_nowbalance',
+        width: 200,
+        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);
+        },
+        summaryType: 'sum',
+        summaryRenderer: 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);
+        }
+    }, {
+        text: '应付余额',
+        dataIndex: 'pb_pbdamount',
+        width: 200,
+        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);
+        },
+    }, {
+        text: '付款比例',
+        //本次付款/采购金额*100%
+        dataIndex: 'pb_payrate',
+        width: 200
+    }, {
+        text: '备注',
+        dataIndex: 'pd_remark',
+        width: 200
+    }]
+
+});

+ 4 - 0
frontend/saas-web/app/view/purchase/report/PurchasePayController.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.purchase.report.PurchasePayController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.purchase-report-purchasepay'
+});

+ 4 - 0
frontend/saas-web/app/view/purchase/report/PurchasePayModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.purchase.report.PurchasePayModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'viewmodel.purchase-report-purchasepay'
+});

+ 165 - 0
frontend/saas-web/app/view/sale/report/Sale.js

@@ -0,0 +1,165 @@
+Ext.define('saas.view.sale.report.Sale', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'purchase-report-sale',
+
+    controller: 'sale-report-sale',
+    viewModel: 'sale-report-sale',
+
+    viewName: 'sale-report-sale',
+
+    groupField: null,
+    listUrl: '/api/sale/sale/list',
+    defaultCondition: null,
+    reportTitle: '销售明细报表',
+
+    searchItems: [{
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        fieldLabel: '供应商编号'
+    }, {
+        xtype: 'hidden',
+        name: 'sa_custcode',
+        fieldLabel: '客户编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'sa_custname',
+        fieldLabel: '客户名称'
+    }, {
+        xtype: 'multicombo',
+        name: 'sa_sendstatuscode',
+        fieldLabel: '业务状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        datas: [
+            ["TURNOUT", "已出库"],
+            ["UNTURNOUT", "未出库"],
+            ["PARTOUT", "部分出库"],
+            ["CLOSE", "已关闭"]
+        ]
+    }],
+
+    reportColumns: [
+    {
+        text: 'id',
+        dataIndex: 'sa_id',
+        hidden: true
+    }, {
+        text: '销售单号',
+        dataIndex: 'sa_code',
+        width: 200
+    }, {
+        text: '客户编号',
+        dataIndex: 'sa_custcode',
+        width: 200
+    }, {
+        text: '客户名称',
+        dataIndex: 'sa_custname',
+        width: 200
+    }, {
+        text: '业务状态',
+        dataIndex: 'sa_status'
+    }, {
+        text: '业务员编号',
+        dataIndex: 'sa_sellercode',
+        hidden:true
+    }, {
+        text: '业务员',
+        dataIndex: 'sa_seller'
+    }, {
+        text: '单据日期',
+        xtype: 'datecolumn',
+        dataIndex: 'sa_date'
+    }, {
+        text: '序号',
+        dataIndex: 'sd_detno'
+    }, {
+        text: '物料编号',
+        dataIndex: 'sd_prodcode'
+    }, {
+        text: '物料名称',
+        dataIndex: 'pr_detail'
+    }, {
+        text: '物料规格',
+        dataIndex: 'pr_spec'
+    }, {
+        text: '品牌',
+        dataIndex: 'pr_brand'
+    }, {
+        text: '单位',
+        dataIndex: 'pr_unit'
+    }, {//∑数量
+        text: '数量',
+        dataIndex: 'sd_qty',
+        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: '单价',
+        dataIndex: 'sd_price',
+        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);
+        }
+    }, {
+        text: '税率',
+        dataIndex: 'pd_taxrate'
+    }, {//∑金额
+        text: '金额',
+        dataIndex: 'pd_total',
+        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);
+        },
+        summaryType: 'sum',
+        summaryRenderer: 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);
+        }
+    }, {//∑不含税金额
+        text: '不含税金额',
+        dataIndex: 'pd_taxprice',
+        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);
+        },
+        summaryType: 'sum',
+        summaryRenderer: 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);
+        }
+    }, {
+        text: '出货数量',
+        dataIndex: 'sd_sendqty',
+        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);
+        }
+    }, {
+        text : "备注", 
+        dataIndex : "sd_text1",
+        width : 250 
+    }]
+
+});

+ 107 - 0
frontend/saas-web/app/view/sale/report/SaleController.js

@@ -0,0 +1,107 @@
+Ext.define('saas.view.sale.report.SaleController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.sale-report-sale',
+    init: function (form) {
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'/api/document/customer/dbfind',
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        dbfinds:[
+                            {
+                                from:'id',to:'sa_custid',ignore:true
+                            },{
+                                from:'cu_code',to:'sa_custcode'
+                            },{
+                                from:'cu_name',to:'sa_custname'
+                            },{
+                                from:'ca_address',to:'sa_toplace'
+                        }],
+                        dbtpls:[{
+                            field:'cu_code',width:100
+                        },{
+                            field:'cu_name',width:100
+                        }],
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或客户名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
+                    }) ;   
+                }
+            }
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/sale/report/SaleModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sale.report.SaleModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'viewmodel.sale-report-sale'
+});

+ 113 - 0
frontend/saas-web/app/view/sale/report/SaleProfit.js

@@ -0,0 +1,113 @@
+Ext.define('saas.view.sale.report.SaleProfit', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'purchase-report-saleprofit',
+
+    controller: 'sale-report-saleprofit',
+    viewModel: 'sale-report-saleprofit',
+
+    viewName: 'sale-report-saleprofit',
+
+    groupField: null,
+    listUrl: '/api/sale/sale/list',
+    defaultCondition: null,
+    reportTitle: '销售毛利润表',
+//筛选:客户、物料、时间		
+    searchItems: [{
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        fieldLabel: '供应商编号'
+    }, {
+        xtype: 'hidden',
+        name: 'sa_custcode',
+        fieldLabel: '客户编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'sa_custname',
+        fieldLabel: '客户名称'
+    }, {
+        xtype: 'multicombo',
+        name: 'sa_sendstatuscode',
+        fieldLabel: '业务状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        datas: [
+            ["TURNOUT", "已出库"],
+            ["UNTURNOUT", "未出库"],
+            ["PARTOUT", "部分出库"],
+            ["CLOSE", "已关闭"]
+        ]
+    }],
+
+    reportColumns: [
+    {
+        text: 'id',
+        dataIndex: 'sa_id',
+        hidden: true
+    }, {
+        text: '客户编号',
+        dataIndex: 'sa_custcode',
+        width: 200
+    }, {
+        text: '客户名称',
+        dataIndex: 'sa_custname',
+        width: 200
+    }, {
+        text: '业务员编号',
+        dataIndex: 'sa_sellercode',
+        hidden:true
+    }, {
+        text: '业务员',
+        dataIndex: 'sa_seller'
+    }, {
+        text: '单据日期',
+        xtype: 'datecolumn',
+        dataIndex: 'sa_date'
+    }, {
+        text: '单据编号',
+        dataIndex: 'pd_inoutno'
+    }, {
+        text: '单据类型',
+        dataIndex: 'pd_piclass'
+    }, {
+        text: '物料类别',
+        dataIndex: 'pr_kind'
+    }, {
+        text: '物料编号',
+        dataIndex: 'pr_code'
+    }, {
+        text: '物料名称',
+        dataIndex: 'pr_detail'
+    }, {
+        text: '物料规格',
+        dataIndex: 'pr_spec'
+    }, {
+        text: '单位',
+        dataIndex: 'pr_unit'
+    }, {
+        text: '数量',
+        dataIndex: 'pd_outqty'
+    }, {
+        text: '单价',
+        dataIndex: 'pd_sendprice'
+    }, {
+        text: '税率%',
+        dataIndex: 'pd_taxrate'
+    }, {
+        text: '含税金额',
+        dataIndex: 'pd_ordertotal'
+    }, {
+        text: '成本金额',
+        dataIndex: 'pd_total'
+    }, {
+        text: '毛利润',
+        dataIndex: 'pd_profit'
+    }, {
+        text: '毛利率%',
+        dataIndex: 'pd_profitpresent'
+    }, {
+        text : "备注", 
+        dataIndex : "pd_remark",
+        width : 250 
+    }]
+
+});

+ 107 - 0
frontend/saas-web/app/view/sale/report/SaleProfitController.js

@@ -0,0 +1,107 @@
+Ext.define('saas.view.sale.report.SaleProfitController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.sale-report-saleprofit',
+    init: function (form) {
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'/api/document/customer/dbfind',
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        dbfinds:[
+                            {
+                                from:'id',to:'sa_custid',ignore:true
+                            },{
+                                from:'cu_code',to:'sa_custcode'
+                            },{
+                                from:'cu_name',to:'sa_custname'
+                            },{
+                                from:'ca_address',to:'sa_toplace'
+                        }],
+                        dbtpls:[{
+                            field:'cu_code',width:100
+                        },{
+                            field:'cu_name',width:100
+                        }],
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或客户名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
+                    }) ;   
+                }
+            }
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/sale/report/SaleProfitModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sale.report.SaleProfitModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'viewmodel.sale-report-saleprofit'
+});

+ 2 - 2
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -138,7 +138,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 hidden : true,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 2
+                    decimalPrecision: 3
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
@@ -160,7 +160,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8,
+                    decimalPrecision: 3,
                     minValue:0
                 },
                 renderer : function(v) {

+ 0 - 1
frontend/saas-web/app/view/sale/sale/FormPanelModel.js

@@ -1,5 +1,4 @@
 Ext.define('saas.view.sale.sale.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.sale-sale-formpanel',
-
 });

+ 0 - 1
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -259,7 +259,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     }, {
         xtype : "datefield", 
         name : "pi_recorddate", 
-        
         fieldLabel : "录入日期",
         readOnly:true
     }, {

+ 9 - 3
frontend/saas-web/resources/json/navigation.json

@@ -31,7 +31,9 @@
             "text": "采购明细表",
             "viewType": "purchase-report-purchase"
         }, {
-            "text": "采购付款一览表"
+            "id": "report-purchasepay",
+            "text": "采购付款一览表",
+            "viewType": "purchase-report-purchasepay"
         }]
     }]
 }, {
@@ -63,13 +65,17 @@
     }, {
         "text": "报表",
         "items": [{
-            "text": "销售明细表"
+            "id": "report-sale",
+            "text": "销售明细表",
+            "viewType": "sale-report-sale"
         }, {
             "id": "report-salein",
             "text": "销售收款一览表",
             "viewType": "sale-report-salein"
         }, {
-            "text": "销售利润表"
+            "id": "report-saleprofit",
+            "text": "销售利润表",
+            "viewType": "sale-report-saleprofit"
         }]
     }]
 }, {