|
@@ -720,7 +720,7 @@
|
|
|
formData.priority = item.priority;
|
|
|
formData.custumerDiscount = item.discount;
|
|
|
formData.paymentTerms = item.paymentTerms;
|
|
|
- formData.currency = item.currency;
|
|
|
+ formData.currency = item.currency;
|
|
|
}
|
|
|
});
|
|
|
if (saleQuotationFormProductTable.dataSource.length > 0) {
|
|
@@ -944,7 +944,7 @@
|
|
|
//计算销售单价
|
|
|
if (prop.col.key == 'purchasePrice' || prop.col.key == 'taxRate' || prop.col.key == 'tariff' || prop.col.key == 'discount' || prop.col.key == 'grossMargin' || prop.col.key == 'customerCommision' || prop.col.key == 'intermediatorCommission') {
|
|
|
// var num =((prop.row.purchasePrice / Number(formData.exchangeRate)) *(1 + prop.row.taxRate / 100) *(1 + prop.row.tariff / 100) *(1 - prop.row.discount / 100)) /(1 - prop.row.grossMargin / 100 - prop.row.customerCommision / 100 - prop.row.intermediatorCommission / 100);
|
|
|
- var num=(prop.row.purchasePrice * Number(formData.exchangeRate)*(1 + prop.row.tariff / 100))/(1 - prop.row.grossMargin / 100 - prop.row.customerCommision / 100)*(1 + prop.row.taxRate / 100)/(1 - prop.row.discount / 100)
|
|
|
+ var num=(prop.row.purchasePrice * Number(formData.exchangeRate)*(1 + prop.row.tariff / 100))/(1 - prop.row.grossMargin / 100 - prop.row.customerCommision / 100-prop.row.intermediatorCommission / 100)*(1 + prop.row.taxRate / 100)
|
|
|
prop.row.salePrice = !isNaN(num) ? num.toFixed(2) : '';
|
|
|
if (prop.row.quantity) {
|
|
|
prop.row.taxAmount = (prop.row.salePrice * prop.row.quantity).toFixed(2); //计算金额
|
|
@@ -962,7 +962,7 @@
|
|
|
//计算毛利率/金额
|
|
|
if (prop.col.key == 'salePrice') {
|
|
|
// var num =1 - prop.row.customerCommision / 100 - prop.row.intermediatorCommission / 100-((prop.row.purchasePrice / Number(formData.exchangeRate)) *(1 + prop.row.taxRate / 100) *(1 + prop.row.tariff / 100) *(1 - prop.row.discount / 100)) /prop.row.salePrice;
|
|
|
- var num = 1-(prop.row.customerCommision / 100)-(prop.row.purchasePrice*Number(formData.exchangeRate)*(1 + prop.row.tariff / 100))/(prop.row.salePrice/((1 + prop.row.taxRate / 100)/(1 - prop.row.discount / 100)))
|
|
|
+ var num = 1-(prop.row.customerCommision / 100)-(prop.row.intermediatorCommission / 100)-(prop.row.purchasePrice*Number(formData.exchangeRate)*(1 + prop.row.tariff / 100))*(1 + prop.row.tariff / 100)/prop.row.salePrice
|
|
|
num = (Number(num) * 100).toFixed(2);
|
|
|
prop.row.grossMargin = !isNaN(num) ? num : '';
|
|
|
if (prop.row.quantity) {
|
|
@@ -982,7 +982,7 @@
|
|
|
item.customerCommision = item.customerCommision == '' || item.customerCommision === null || !item.customerCommision ? 0 : item.customerCommision;
|
|
|
item.intermediatorCommission =item.intermediatorCommission == '' || item.intermediatorCommission === null || !item.intermediatorCommission? 0: item.intermediatorCommission;
|
|
|
//汇率默认为1
|
|
|
- var num =(item.purchasePrice * Number(formData.exchangeRate)*(1 + item.tariff / 100))/(1 - item.grossMargin / 100 - item.customerCommision / 100)*(1 + item.taxRate / 100)/(1 -item.discount / 100)
|
|
|
+ var num =(item.purchasePrice * Number(formData.exchangeRate)*(1 + item.tariff / 100))/(1 - item.grossMargin / 100 - item.customerCommision / 100-item.intermediatorCommission / 100)*(1 + item.taxRate / 100)
|
|
|
item.salePrice = !isNaN(num) ? num.toFixed(2) : '';
|
|
|
if (item.quantity) {
|
|
|
item.taxAmount = (item.salePrice * item.quantity).toFixed(2);
|