Explorar o código

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

chenw %!s(int64=6) %!d(string=hai) anos
pai
achega
5ab35a76c9

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Profitpresent.java

@@ -106,4 +106,5 @@ public class Profitpresent {
     public void setProfitpresent(Double profitpresent) {
         this.profitpresent = profitpresent;
     }
+
 }

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

@@ -25,15 +25,16 @@
 	a.pi_custname,
 	a.cu_type,
 	a.cu_sellername,
-	  IFNULL(a.saamount,0) as saamount,
-	  IFNULL(a.netamount,0) as netamount,
-	  IFNULL(a.costamount,0) as costamount,
-	  IFNULL(SUM(a.netamount - a.costamount),0) as profit,
-	  IFNULL((SUM(a.netamount - a.costamount)/IFNULL(a.netamount,SUM(a.netamount - a.costamount))),0) as profitpresent
+	  IFNULL(a.saamount*a.pi_rate,0) as saamount,
+	  IFNULL(a.netamount*a.pi_rate,0) as netamount,
+	  IFNULL(a.costamount*a.pi_rate,0) as costamount,
+	  IFNULL(SUM(a.netamount*a.pi_rate - a.costamount*a.pi_rate),0) as profit,
+	  IFNULL((SUM(a.netamount*a.pi_rate - a.costamount*a.pi_rate)/IFNULL(a.netamount*a.pi_rate,SUM(a.netamount*a.pi_rate - a.costamount*a.pi_rate))),0) as profitpresent
 
 FROM
 	(
 		SELECT
+	        pi_rate,
 			pi_custcode,
 			pi_custname,
 	        cu_type,
@@ -66,10 +67,12 @@ prodinout.companyid= prodiodetail.companyid
 			pi_custcode,
 			pi_custname,
 	        cu_type,
-			cu_sellername
+			cu_sellername,
+	        pi_rate
 	) a
 	  where saamount + netamount + costamount != 0
 	  GROUP BY
+	        a.pi_rate,
 			a.pi_custcode,
 			a.pi_custname,
 	        a.cu_type,

+ 3 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -164,6 +164,7 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_prstatuscode;
 
+
     //private ProductDTO productDTO;
     private Long pr_id;
     private String pr_code;
@@ -197,4 +198,6 @@ public class ProdInOutList extends CommonBaseEntity{
     private Integer iodetno;
 
     private String b2bStatus;
+
+    private String apcheckStatus;
 }

+ 1 - 1
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -212,7 +212,7 @@ prodinout.creatorName creatorName,prodinout.creatorId creatorId,prodinout.create
     prodiodetail.pd_id pd_id,prodiodetail.pd_piid pd_piid,prodiodetail.pd_inoutno pd_inoutno,prodiodetail.pd_piclass pd_piclass,prodiodetail.pd_pdno pd_pdno,prodiodetail.pd_ordercode pd_ordercode,prodiodetail.pd_orderdetno pd_orderdetno,prodiodetail.pd_prodid pd_prodid,prodiodetail.pd_prodcode pd_prodcode,prodiodetail.pd_unit pd_unit,prodiodetail.pd_inqty pd_inqty,prodiodetail.pd_outqty pd_outqty,prodiodetail.pd_orderprice pd_orderprice,prodiodetail.pd_sendprice pd_sendprice,prodiodetail.pd_price pd_price,prodiodetail.pd_total pd_total,prodiodetail.pd_taxrate pd_taxrate,prodiodetail.pd_netprice pd_netprice,prodiodetail.pd_nettotal pd_nettotal,prodiodetail.pd_whid pd_whid,prodiodetail.pd_whcode pd_whcode,prodiodetail.pd_whname pd_whname,prodiodetail.pd_inwhid pd_inwhid,prodiodetail.pd_inwhcode pd_inwhcode,prodiodetail.pd_inwhname pd_inwhname,prodiodetail.pd_orderid pd_orderid,prodiodetail.pd_sdid pd_sdid,prodiodetail.pd_status pd_status,prodiodetail.pd_remark pd_remark,prodiodetail.pd_text1 pd_text1,prodiodetail.pd_text2 pd_text2,prodiodetail.pd_text3 pd_text3,
     prodiodetail.pd_text4 pd_text4,prodiodetail.pd_text5 pd_text5,prodiodetail.pd_ym pd_ym,prodiodetail.pd_yqty pd_yqty,prodiodetail.pd_ioid pd_ioid,prodiodetail.pd_ordertotal pd_ordertotal
     ,prodiodetail.pd_profit pd_profit,
-    prodiodetail.pd_profitpresent pd_profitpresent,
+    prodiodetail.pd_profitpresent pd_profitpresent,prodiodetail.apcheckStatus apcheckStatus,
   </sql>
   <sql id="Vendor_Column_List" >
     vendor.ve_id ve_id,vendor.ve_code ve_code,vendor.ve_shortname ve_shortname,vendor.ve_name ve_name,vendor.ve_uu ve_uu,vendor.ve_type ve_type,vendor.ve_begindate ve_begindate,vendor.ve_beginapamount ve_beginapamount,vendor.ve_beginprepayamount ve_beginprepayamount,vendor.ve_promisedays ve_promisedays,vendor.ve_taxrate ve_taxrate,vendor.ve_nsrzh ve_nsrzh,vendor.ve_bankaccount ve_bankaccount,vendor.ve_bankcode ve_bankcode,vendor.ve_status ve_status,vendor.ve_statuscode ve_statuscode,vendor.ve_text1 ve_text1,vendor.ve_text2 ve_text2,vendor.ve_text3 ve_text3,vendor.ve_text4 ve_text4,vendor.ve_text5 ve_text5,vendor.ve_payamount ve_payamount,vendor.ve_leftamount ve_leftamount,vendor.ve_beginym ve_beginym,vendor.ve_preamount ve_preamount,vendor.ve_remark ve_remark,vendor.ve_buyerid ve_buyerid,vendor.ve_buyercode ve_buyercode,vendor.ve_buyername ve_buyername,

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

@@ -39,13 +39,12 @@ Ext.define('saas.model.report.SaleProfit', {
         },//价税合计本位币
         { name: 'pd_price', type: 'float' },//成本单价
         { name: 'pd_total', type: 'float' },
-        { name: 'pd_profit', type: 'float' ,
+        { name: 'pd_profit', type: 'float' },
+        { name: 'pd_profit*pi_rate', 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 )) 
-                - (rec.get('pd_price') || 0.0) )*(rec.get('pd_outqty') || 0.0);
-                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+                return Number(saas.util.BaseUtil.numberFormat((rec.get('pd_profit') || 0.0), 2, false));
             },
-            depends: ['pd_sendprice', 'pi_rate','pd_taxrate','pd_price','pd_outqty']
+            depends: ['pd_profit']
         },//毛利润(元) = ( (含税单价 * 汇率) / (1+税率%) - 成本单价 ) *  数量
         { name: 'pd_profitpresent', type: 'float',
             convert: function(v, rec) {

+ 5 - 10
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -378,17 +378,12 @@ Ext.define('saas.view.core.form.FormPanel', {
         });
 
         store.removeAll();
-        if (detailData.length > 0) {
 
-            for(let j = 0; j < detailData.length; j++) {
-                let d = detailData[j];
-                let o = {};
-                o[detnoColumn] = j + 1;
-                let r = store.add(o)[0];
-                for(let k in d) {
-                    r.set(k, d[k]);
-                }
-            }
+        if (detailData.length > 0) {
+            store.loadData(detailData.map(function(d, i) {
+                d[detnoColumn] = i + 1;
+                return d;
+            }));
         }
 
         me.isValid();

+ 2 - 6
frontend/saas-web/app/view/money/report/CustomerCheck.js

@@ -154,12 +154,7 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
             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',
-        // summaryLabel: '价税合计(本位币)',
-        // summaryRenderer: function(v) {
-        //     return saas.util.BaseUtil.numberFormat(v, 2, true);
-        // }
+        }
     },{
         text: '币别',
         dataIndex: 'pi_currency',
@@ -174,6 +169,7 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
             return saas.util.BaseUtil.numberFormat(v, 4, false);
         }
     },{
+        hidden:true,
         text: '价税合计(本位币)',
         width: 140,
         xtype: 'numbercolumn',

+ 4 - 1
frontend/saas-web/app/view/money/report/PayDetail.js

@@ -74,6 +74,7 @@ Ext.define('saas.view.money.report.PayDetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
     },{
+        hidden:true,
         text: '增加应付(本位币)(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
@@ -105,6 +106,7 @@ Ext.define('saas.view.money.report.PayDetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     },{
+        hidden:true,
         text: '增加预付(本位币)(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
@@ -136,7 +138,8 @@ Ext.define('saas.view.money.report.PayDetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     },{
-        text: '应付余额(元)',
+        hidden:true,
+        text: '应付余额(本位币)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'pd_remain_cr',

+ 3 - 0
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -75,6 +75,7 @@ Ext.define('saas.view.money.report.RecDetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     },{
+        hidden:true,
         text: '增加应收(本位币)(元)',
         dataIndex: 'rd_addrec_cr',
         exportFormat: 'Amount',
@@ -106,6 +107,7 @@ Ext.define('saas.view.money.report.RecDetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     },{
+        hidden:true,
         text: '增加预收(本位币)(元)',
         dataIndex: 'rd_addpre_cr',
         exportFormat: 'Amount',
@@ -137,6 +139,7 @@ Ext.define('saas.view.money.report.RecDetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     },{
+        hidden:true,
         text: '应收余额(本位币)(元)',
         dataIndex: 'rd_remain_cr',
         exportFormat: 'Amount',

+ 1 - 0
frontend/saas-web/app/view/money/report/TotalPayDetail.js

@@ -142,6 +142,7 @@ Ext.define('saas.view.money.report.TotalPayDetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     },{
+        hidden:true,
         text: '应付余额(本位币)(元)',
         dataIndex: 'vm_amount_cr',
         exportFormat: 'Amount',

+ 1 - 0
frontend/saas-web/app/view/money/report/TotalRecDetail.js

@@ -139,6 +139,7 @@ Ext.define('saas.view.money.report.TotalRecDetail', {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
+        hidden:true,
         text: '应收余额(本位币)(元)',
         dataIndex: 'cm_amount_cr',
         exportFormat: 'Amount',

+ 2 - 6
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -158,12 +158,7 @@ Ext.define('saas.view.money.report.VendorCheck', {
             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',
-        // summaryLabel: '价税合计(本位币)',
-        // summaryRenderer: function(v) {
-        //     return saas.util.BaseUtil.numberFormat(v, 2, true);
-        // }
+        }
     },{
         text: '币别',
         dataIndex: 'pi_currency',
@@ -178,6 +173,7 @@ Ext.define('saas.view.money.report.VendorCheck', {
             return saas.util.BaseUtil.numberFormat(v, 4, false);
         }
     },{
+        hidden:true,
         text: '价税合计(本位币)',
         width: 140,
         xtype: 'numbercolumn',

+ 5 - 1
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -298,7 +298,11 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
                     text: '关联采购单号',
                     dataIndex: 'pi_pucode',
                     width: 150
-                }, {
+                },{
+                    text: "对账状态",
+                    dataIndex: "apcheckStatus",
+                    width: 100.0
+                },{
                     text: 'B2B上传状态',
                     dataIndex: 'b2bStatus',
                     textAlign: 'center',

+ 5 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -303,7 +303,11 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
                     text: '关联验收单号',
                     dataIndex: 'pi_iocode',
                     width: 150
-                }, {
+                },{
+                    text: "对账状态",
+                    dataIndex: "apcheckStatus",
+                    width: 100.0
+                },{
                     text: 'B2B上传状态',
                     dataIndex: 'b2bStatus',
                     textAlign: 'center',

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

@@ -81,14 +81,23 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         width: 120,
-        summaryType: 'sum',
-        summaryLabel: '付款金额',
         renderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
+        disableMySummary:true,
+        summaryType: 'sum',
         summaryRenderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
+    },{
+        hidden:true,
+        text: '付款金额(本位币)(元)',
+        dataIndex: 'pbd_nowbalance_cr',
+        exportFormat: 'Amount',
+        xtype: 'numbercolumn',
+        width: 120,
+        summaryType: 'sum',
+        summaryLabel: '付款金额(本位币)'
     }, {
         text: '币别',
         dataIndex: 'pi_currency',

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

@@ -193,7 +193,7 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         }
     }, {
         text: '毛利润(元)',
-        dataIndex: 'pd_profit',
+        dataIndex: 'pd_profit*pi_rate',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v) {

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

@@ -66,8 +66,22 @@ Ext.define('saas.view.sale.report.SaleRec', {
         renderer : function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
+        disableMySummary:true,
         summaryType: 'sum',
-        summaryLabel: '税额',
+        summaryRenderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        }
+    },{
+        hidden:true,
+        text: '税额(元)',
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: '(pi_total-pi_nettotal)*pi_rate',
+        renderer : function(v, m, r) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        },
+        summaryType: 'sum',
+        summaryLabel: '税额(本位币)',
         summaryRenderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
@@ -79,8 +93,22 @@ Ext.define('saas.view.sale.report.SaleRec', {
         renderer : function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
+        disableMySummary:true,
+        summaryType: 'sum',
+        summaryRenderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        }
+    },{
+        hidden:true,
+        text: '价税合计(元)',
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: 'pi_total*pi_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);
         }

+ 3 - 1
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -110,7 +110,9 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             to: 'ma_whname'
                         }],
                         aftertrigger: function (f, record) {
-                            me.getBomData(record.data.id)
+                            if(record.data.id&&record.data.id>0){
+                                me.getBomData(record.data.id)
+                            }
                         }
                     });