Browse Source

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

hy 7 years ago
parent
commit
5aac690588

+ 2 - 2
applications/money/money-server/src/main/resources/mapper/ProfitdetailMapper.xml

@@ -60,7 +60,7 @@ FROM
       </if>
     </where>
 		and	pi_id = pd_piid
-		AND pi_custid = cu_id and
+		AND pi_custid = cu_id and pi_status = '已审核' and
 prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodinout.companyid
 		GROUP BY
 			pi_custcode,
@@ -106,7 +106,7 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 			</if>
 		</where>
 		and	pi_id = pd_piid
-		AND pi_custid = cu_id and
+		AND pi_custid = cu_id and pi_status = '已审核' and
 		prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodinout.companyid
 		GROUP BY
 		pi_custcode,

+ 3 - 1
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -348,7 +348,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 me.initSummaryType(c);
                 summarys.push({
                     field: c.dataIndex,
-                    operation: c.summaryType == 'last' ? 'sum' : c.summaryType,
+                    operation: c._summaryType == 'last' ? 'sum' : c._summaryType,
                 });
             }
         })
@@ -374,6 +374,8 @@ Ext.define('saas.view.core.report.ReportPanel', {
             column.summaryType = function (records, values) {
                 return values[values.length - 1];
             }
+        }else {
+            column._summaryType = summaryType;
         }
     },
 

+ 5 - 51
frontend/saas-web/app/view/stock/report/DataList.js

@@ -47,7 +47,7 @@ Ext.define('saas.view.stock.report.DataList', {
         }
     }],
 
-    reportColumns2: [{
+    reportColumns: [{
         text: "物料编号",
         width: 200,
         dataIndex: "rc_prodCode",
@@ -68,6 +68,8 @@ Ext.define('saas.view.stock.report.DataList', {
     }, {
         text: "仓库名称",
         dataIndex: "rc_whName",
+        hidden: true,
+        toggle: true,
         width: 110,
     }, {
         text: "数量",
@@ -87,6 +89,8 @@ Ext.define('saas.view.stock.report.DataList', {
     }, {
         text: "单价",
         xtype: 'numbercolumn',
+        hidden: true,
+        toggle: true,
         align: 'end',
         dataIndex: "rc_price",
         width: 120,
@@ -117,54 +121,4 @@ Ext.define('saas.view.stock.report.DataList', {
     }, {
         flex: 1
     }],
-
-    reportColumns: [{
-        text: "物料编号",
-        width: 200,
-        dataIndex: "rc_prodCode",
-        xtype: "",
-    }, {
-        text: "物料名称",
-        width: 200,
-        dataIndex: "rc_prodDetail",
-    }, {
-        text: "物料规格",
-        dataIndex: "rc_prodSpec",
-        width: 150,
-    }, {
-        text: "数量",
-        xtype: 'numbercolumn',
-        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);
-        }
-    },{
-        text: "单位",
-        dataIndex: "rc_prodUnit",
-        width: 80,
-    }, {
-        text: "金额",
-        xtype: 'numbercolumn',
-        dataIndex: "rc_amount",
-        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);
-        },
-        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);
-        }
-    }, {
-        flex: 1
-    }]
 })

+ 13 - 6
frontend/saas-web/app/view/stock/report/DataListController.js

@@ -7,8 +7,16 @@ Ext.define('saas.view.stock.report.DataListController', {
         reportPanel = me.getView(),
         form = reportPanel.down('form'),
         grid = reportPanel.down('grid'),
-        store = grid.store,
-        columns = [];
+        columns = grid.columns,
+        toggleColumns = [],
+        store = grid.store;
+
+        for(var x = 0; x < columns.length; x++) {
+            var c = columns[x];
+            if(c.toggle) {
+                toggleColumns.push(c);
+            }
+        }
         
         var whCodeField = form.getForm().findField('wh_code');
         var con = form.items.items[3];
@@ -19,16 +27,15 @@ Ext.define('saas.view.stock.report.DataListController', {
         if(newValue) {
             con.columnWidth = 0.4;
             reportPanel.queryMode = 'DETAIL';
-            columns = reportPanel.reportColumns2;
         }else {
             con.columnWidth = 0.65;
             reportPanel.queryMode = 'MAIN';
-            columns = reportPanel.reportColumns;
         }
         
         form.updateLayout();
-        store.load(function() {
-            grid.reconfigure(store, columns);
+        toggleColumns.map(function(c) {
+            c.setHidden(!newValue);
         });
+        store.load();
     }
 });