Browse Source

Merge remote-tracking branch 'origin/dev' into dev

rainco 7 years ago
parent
commit
7e51fb4775

+ 4 - 0
applications/commons/commons-server/pom.xml

@@ -35,6 +35,10 @@
           <groupId>com.usoftchina.saas</groupId>
           <artifactId>document-api</artifactId>
         </dependency>
+        <dependency>
+          <groupId>com.usoftchina.saas</groupId>
+          <artifactId>commons-api</artifactId>
+        </dependency>
         <!-- db -->
         <dependency>
             <groupId>mysql</groupId>

+ 3 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ConfigsServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.commons.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.cache.ConfigsCache;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.mapper.ConfigsMapper;
@@ -131,5 +132,7 @@ public class ConfigsServiceImpl implements ConfigsService{
         DocBaseDTO baseDTO = new DocBaseDTO(null, "", "Configs");
         //日志记录
         messageLogService.update(baseDTO);
+        //清除configs缓存
+        ConfigsCache.current().hdel();
     }
 }

+ 13 - 3
frontend/saas-web/app/model/report/Purchase.js

@@ -13,10 +13,15 @@ Ext.define('saas.model.report.Purchase', {
         { name: 'pd_taxtotal', type: 'float' }, // 金额
         { name: 'pd_taxtotal*pu_rate', type: 'float',
             convert: function(v, rec) {
+                var t = (rec.get('pd_taxtotal') || 0.0) ;
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['pd_taxtotal']
+            /* convert: function(v, rec) {
                 var t = (rec.get('pd_taxtotal') || 0.0) * (rec.get('pu_rate') || 1.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
-            depends: ['pu_rate', 'pd_taxtotal']
+            depends: ['pu_rate', 'pd_taxtotal'] */
          }, // 金额本位币
         { name: 'pd_taxrate', type: 'int' }, // 税率
         { name: 'pd_total-pd_taxtotal', type: 'float', // 税额
@@ -28,11 +33,16 @@ Ext.define('saas.model.report.Purchase', {
         },
         { name: 'pd_total', type: 'float' }, // 价税合计
         { name: 'pd_total*pu_rate', type: 'float',
-            convert: function(v, rec) {
+                convert: function(v, rec) {
+                    var t = (rec.get('pd_total') || 0.0);
+                    return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+                },
+                depends: ['pd_total']
+            /* convert: function(v, rec) {
                 var t = (rec.get('pd_total') || 0.0) * (rec.get('pu_rate') || 1.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
-            depends: ['pu_rate', 'pd_total'] 
+            depends: ['pu_rate', 'pd_total'] */ 
         }, // 价税合计本位币
         { name: 'pd_pdacceptqty', type: 'float' }, // 收货数量
         { name: 'pu_currency', type:'string'},//币别

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

@@ -21,10 +21,15 @@ Ext.define('saas.model.report.Sale', {
         { name: 'sd_nettotal', type: 'float' },//金额
         { name: 'sd_nettotal*sa_rate', type: 'float',
             convert: function(v, rec) {
+                var t = (rec.get('sd_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['sd_nettotal']
+            /* convert: function(v, rec) {
                 var t = (rec.get('sd_nettotal') || 0.0) * (rec.get('sa_rate') || 1.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
-            depends: ['sa_rate', 'sd_nettotal']
+            depends: ['sa_rate', 'sd_nettotal'] */
          },//金额本位币
         { name: 'sd_taxrate', type: 'float' },
         { name: 'sd_total - sd_nettotal', type: 'float',
@@ -37,10 +42,15 @@ Ext.define('saas.model.report.Sale', {
         { name: 'sd_total', type: 'float' },//价税合计
         { name: 'sd_total*sa_rate', type: 'float' ,
             convert: function(v, rec) {
+                var t = (rec.get('sd_total') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['sd_total']
+            /* convert: function(v, rec) {
                 var t = (rec.get('sd_total') || 0.0) * (rec.get('sa_rate') || 1.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
-            depends: ['sd_total', 'sa_rate']
+            depends: ['sd_total', 'sa_rate'] */
         },//价税合计本位币
         { name: 'sd_pdsendqty', type: 'float' },
         { name: 'sa_currency', type: 'string' },//币别

+ 9 - 5
frontend/saas-web/app/model/report/SaleProfit.js

@@ -28,10 +28,14 @@ Ext.define('saas.model.report.SaleProfit', {
         { name: 'pd_ordertotal', type: 'float' },//价税合计
         { name: 'pd_ordertotal*pi_rate', type: 'float' ,
             convert: function(v, rec) {
+                return Number(saas.util.BaseUtil.numberFormat((rec.get('pd_ordertotal') || 0.0), 2, false));
+            },
+            depends: ['pd_ordertotal']
+            /* convert: function(v, rec) {
                 var t = (rec.get('pd_ordertotal') || 0.0) * (rec.get('pi_rate') || 1.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
-            depends: ['pd_ordertotal', 'pi_rate']
+            depends: ['pd_ordertotal', 'pi_rate'] */
         },//价税合计本位币
         { name: 'pd_price', type: 'float' },//成本单价
         { name: 'pd_total', type: 'float' },
@@ -42,17 +46,17 @@ Ext.define('saas.model.report.SaleProfit', {
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
             depends: ['pd_sendprice', 'pi_rate','pd_taxrate','pd_price','pd_outqty']
-        },//毛利润(元) = ( (含税单价 * 汇率) / (1+税率%) - 成本单价 ) *  
+        },//毛利润(元) = ( (含税单价 * 汇率) / (1+税率%) - 成本单价 ) *  数量
         { name: 'pd_profitpresent', type: 'float',
             convert: function(v, rec) {
-                var t = (((rec.get('pd_sendprice') || 0.0) * (rec.get('pi_rate') || 1.0) / (1 + (rec.get('pd_taxrate') || 0.0)/100 )) 
+                var t = ( (((rec.get('pd_sendprice') || 0.0) * (rec.get('pi_rate') || 1.0) / (1 + (rec.get('pd_taxrate') || 0.0)/100 )) 
                 - (rec.get('pd_price') || 0.0)) 
                 /
-                (((rec.get('pd_sendprice') || 0.0) * (rec.get('pi_rate') || 1.0) / (1 + (rec.get('pd_taxrate') || 0.0)/100 )));
+                (((rec.get('pd_sendprice') || 0.0) * (rec.get('pi_rate') || 1.0) / (1 + (rec.get('pd_taxrate') || 0.0)/100 ))) ) * 100;
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
             depends: ['pd_sendprice', 'pi_rate','pd_taxrate','pd_price']
-        },//毛利润率 = (含税单价*汇率/(1+税率%) - 成本单价) / (含税单价*汇率/(1+税率%))
+        },//毛利润率 = ( (含税单价*汇率/(1+税率%) - 成本单价) / (含税单价*汇率/(1+税率%)) ) * 100
         { name: 'pd_remark', type: 'string' },
         { name: 'pi_currency', type: 'string' },
         { name: 'pi_rate', type: 'float' }

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

@@ -140,22 +140,23 @@ Ext.define('saas.view.purchase.report.Purchase', {
         text: '金额(元)',
         dataIndex: 'pd_taxtotal',
         width: 120,
+        hidden:true,
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '金额本位币(元)',
+        text: '金额(元)',
         dataIndex: 'pd_taxtotal*pu_rate',
         width: 120,
-        hidden:true,
+        //hidden:true,
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
-        summaryLabel: '金额本位币',
+        summaryLabel: '金额(本位币)',
         summaryType: 'sum',
         summaryRenderer: function(v, d, f, m) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
@@ -189,23 +190,24 @@ Ext.define('saas.view.purchase.report.Purchase', {
         dataIndex: 'pd_total',
         xtype: 'numbercolumn',
         width: 120,
+        hidden:true,
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '价税合计本位币(元)',
+        text: '价税合计(元)',
         dataIndex: 'pd_total*pu_rate',
         xtype: 'numbercolumn',
         width: 120,
-        hidden:true,
+        //hidden:true,
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
-        summaryLabel: '价税合计本位币',
+        summaryLabel: '价税合计(本位币)',
         summaryType: 'sum',
         summaryRenderer: function(v, d, f, m) {
             return saas.util.BaseUtil.numberFormat(1, 2, true);

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

@@ -141,22 +141,22 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         width: 120,
+        hidden:true,
         dataIndex: 'sd_nettotal',
         renderer : function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '金额本位币(元)',
+        text: '金额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         width: 120,
-        hidden:true,
         dataIndex: 'sd_nettotal*sa_rate',
         renderer : function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
-        summaryLabel: '金额本位币',
+        summaryLabel: '金额(本位币)',
         summaryRenderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
@@ -189,6 +189,7 @@ Ext.define('saas.view.sale.report.Sale', {
         exportFormat: 'Amount',
         dataIndex: 'sd_total',
         width: 120,
+        hidden:true,
         renderer : function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
@@ -202,7 +203,7 @@ Ext.define('saas.view.sale.report.Sale', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
-        summaryLabel: '价税合计本位币',
+        summaryLabel: '价税合计(本位币)',
         summaryRenderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }

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

@@ -153,21 +153,22 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         dataIndex: 'pd_ordertotal',
         xtype: 'numbercolumn',
         width:120,
+        hidden:true,
         renderer : function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '价税合计本位币(元)',
+        text: '价税合计(元)',
         exportFormat: 'Amount',
         dataIndex: 'pd_ordertotal*pi_rate',
         xtype: 'numbercolumn',
         width:120,
-        hidden:true,
+        //hidden:true,
         renderer : function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
-        summaryLabel: '价税合计本位币',
+        summaryLabel: '价税合计(本位币)',
         summaryRenderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }