Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

zhuth 7 years ago
parent
commit
cf9c607302

+ 16 - 4
frontend/saas-web/app/view/purchase/report/Purchase.js

@@ -71,16 +71,28 @@ Ext.define('saas.view.purchase.report.Purchase', {
         dataIndex: 'pd_prodcode'
     }, {
         text: '物料名称',
-        dataIndex: 'pr_detail'
+        dataIndex: 'pr_detail', 
+        renderer: function (v, m, r) {
+            return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+        }
     }, {
         text: '物料规格',
-        dataIndex: 'pr_spec'
+        dataIndex: 'pr_spec', 
+        renderer: function (v, m, r) {
+            return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+        }
     }, {
         text: '品牌',
-        dataIndex: 'pr_brand'
+        dataIndex: 'pr_brand', 
+        renderer: function (v, m, r) {
+            return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+        }
     }, {
         text: '单位',
-        dataIndex: 'pr_unit'
+        dataIndex: 'pr_unit', 
+        renderer: function (v, m, r) {
+            return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+        }
     }, {
         text: '采购数量',
         dataIndex: 'pd_qty',

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

@@ -8,7 +8,7 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
     viewName: 'purchase-report-purchasepay',
 //按供应商分组 付款金额合计
     groupField: 'pu_vendname',
-    listUrl: '/api/money/paybalance/list',
+    listUrl: '/api/purchase/report/purchasePay',
     defaultCondition: null,
     reportTitle: '采购付款一览表',
     QueryWidth:0.25,

+ 17 - 5
frontend/saas-web/app/view/sale/report/Sale.js

@@ -7,7 +7,7 @@ Ext.define('saas.view.sale.report.Sale', {
 
     viewName: 'sale-report-sale',
 
-    groupField: 'sa_custcode',
+    groupField: null,
     listUrl: '/api/sale/sale/list',
     defaultCondition: null,
     reportTitle: '销售明细报表',
@@ -78,16 +78,28 @@ Ext.define('saas.view.sale.report.Sale', {
     }, {
         text: '物料名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 200, 
+        renderer: function (v, m, r) {
+            return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+        }
     }, {
         text: '物料规格',
-        dataIndex: 'pr_spec'
+        dataIndex: 'pr_spec', 
+        renderer: function (v, m, r) {
+            return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+        }
     }, {
         text: '品牌',
-        dataIndex: 'pr_brand'
+        dataIndex: 'pr_brand', 
+        renderer: function (v, m, r) {
+            return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+        }
     }, {
         text: '单位',
-        dataIndex: 'pr_unit'
+        dataIndex: 'pr_unit', 
+        renderer: function (v, m, r) {
+            return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+        }
     }, {//∑数量
         text: '数量',
         dataIndex: 'sd_qty',

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

@@ -13,13 +13,13 @@ Ext.define('saas.view.sale.report.SaleController', {
                         defaultCondition:"cu_statuscode='OPEN'",
                         dbfinds:[
                             {
-                                from:'id',to:'sa_custid',ignore:true
+                                from:'id',to:'id',ignore:true
                             },{
-                                from:'cu_code',to:'sa_custcode'
+                                from:'cu_code',to:'cu_code'
                             },{
                                 from:'cu_name',to:'sa_custname'
                             },{
-                                from:'ca_address',to:'sa_toplace'
+                                from:'ca_address',to:'ca_address'
                         }],
                         dbtpls:[{
                             field:'cu_code',width:100

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

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

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

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

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

@@ -8,7 +8,7 @@ Ext.define('saas.view.sale.report.SaleProfit', {
     viewName: 'sale-report-saleprofit',
 
     groupField: null,
-    listUrl: '/api/sale/sale/list',
+    listUrl: '/api/sale/report/saleProfit',
     defaultCondition: null,
     reportTitle: '销售毛利润表',
 //筛选:客户、物料、时间	
@@ -25,7 +25,7 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         columnWidth: 0.2
     }, {
         xtype: 'condatefield',
-        name: 'sa_custname',
+        name: 'sa_date',
         fieldLabel: '时间',
         columnWidth: 0.5
     }],

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

@@ -13,13 +13,13 @@ Ext.define('saas.view.sale.report.SaleProfitController', {
                         defaultCondition:"cu_statuscode='OPEN'",
                         dbfinds:[
                             {
-                                from:'id',to:'sa_custid',ignore:true
+                                from:'id',to:'id',ignore:true
                             },{
                                 from:'cu_code',to:'sa_custcode'
                             },{
                                 from:'cu_name',to:'sa_custname'
                             },{
-                                from:'ca_address',to:'sa_toplace'
+                                from:'ca_address',to:'ca_address'
                         }],
                         dbtpls:[{
                             field:'cu_code',width:100

+ 6 - 6
frontend/saas-web/app/view/sale/report/SaleIn.js → frontend/saas-web/app/view/sale/report/SaleRec.js

@@ -1,14 +1,14 @@
-Ext.define('saas.view.sale.report.SaleIn', {
+Ext.define('saas.view.sale.report.SaleRec', {
     extend: 'saas.view.core.report.ReportPanel',
-    xtype: 'sale-report-salein',
+    xtype: 'sale-report-salerec',
 
-    controller: 'sale-report-salein',
-    viewModel: 'sale-report-salein',
+    controller: 'sale-report-salerec',
+    viewModel: 'sale-report-salerec',
 
-    viewName: 'sale-report-salein',
+    viewName: 'sale-report-salerec',
 
     groupField: 'rb_custname',
-    listUrl: '/api/money/recbalance/list',
+    listUrl: '/api/sale/report/saleRec',
     defaultCondition: null,
     reportTitle: '销售收款报表',
     QueryWidth:0.25,

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

@@ -0,0 +1,107 @@
+Ext.define('saas.view.sale.report.SaleRecController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.sale-report-salerec',
+    init: function (form) {
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=rb_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:'id',ignore:true
+                            },{
+                                from:'cu_code',to:'cu_code'
+                            },{
+                                from:'cu_name',to:'rb_custname'
+                            },{
+                                from:'ca_address',to:'ca_address'
+                        }],
+                        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/SaleRecModel.js

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

+ 2 - 2
frontend/saas-web/resources/json/navigation.json

@@ -69,9 +69,9 @@
             "text": "销售明细表",
             "viewType": "sale-report-sale"
         }, {
-            "id": "report-salein",
+            "id": "report-salerec",
             "text": "销售收款一览表",
-            "viewType": "sale-report-salein"
+            "viewType": "sale-report-salerec"
         }, {
             "id": "report-saleprofit",
             "text": "销售利润表",