|
@@ -532,7 +532,7 @@
|
|
|
item.sourceType = 'Quo'+item.childId
|
|
|
item.taxPrice = item.salePrice
|
|
|
if(formData.doubleDiscount&&formData.doubleDiscount!==''){
|
|
|
- item.discountedPrice = (Number(item.taxPrice) *(1-Number(item.discount)/100))
|
|
|
+ item.discountedPrice = (Number(item.taxPrice) *(Number(item.discount)/100))
|
|
|
}else{
|
|
|
item.discountedPrice = Number(item.taxPrice)
|
|
|
}
|
|
@@ -546,6 +546,7 @@
|
|
|
SaleOrderFormShipFormProductTable.dataSource=arrProduct
|
|
|
formData.sourceCode =data[0].billCode
|
|
|
formData.convertedAmount=allDiscountPrice
|
|
|
+ formData.convertedAmount = Number(formData.convertedAmount).toFixed(2)
|
|
|
if(!formData.sourceCode2&&formData.sourceCode2==''){
|
|
|
formData.project = data[0].quotationProject
|
|
|
formData.projectName = data[0].quotationProjectName
|
|
@@ -564,16 +565,20 @@
|
|
|
}
|
|
|
function changeDiscount(){
|
|
|
var detail =[...SaleOrderFormShipFormProductTable.dataSource]
|
|
|
+ var num = 0
|
|
|
detail.map(item=>{
|
|
|
if(formData.doubleDiscount&&formData.doubleDiscount!==''){
|
|
|
- item.discountedPrice = ((Number(item.taxPrice) *(1-Number(formData.doubleDiscount)/100))).toFixed(2)
|
|
|
+ item.discountedPrice = ((Number(item.taxPrice) *(Number(formData.doubleDiscount)/100))).toFixed(2)
|
|
|
}else{
|
|
|
item.discountedPrice = Number(item.taxPrice)
|
|
|
}
|
|
|
item.discountedAmount =Number(item.discountedPrice) *Number(item.quantity)
|
|
|
item.discountedAmount = (item.discountedAmount).toFixed(2)
|
|
|
+ num=num+Number(item.discountedAmount)
|
|
|
})
|
|
|
- SaleOrderFormShipFormProductTable.dataSource=detail
|
|
|
+ SaleOrderFormShipFormProductTable.dataSource=detail
|
|
|
+ formData.convertedAmount=num
|
|
|
+ formData.convertedAmount = Number(formData.convertedAmount).toFixed(2)
|
|
|
}
|
|
|
function addContract(data){
|
|
|
var allDiscountPrice = 0
|
|
@@ -597,6 +602,7 @@
|
|
|
SaleOrderFormShipFormProductTable.dataSource=arrProduct
|
|
|
formData.sourceCode2 =data[0].billCode
|
|
|
formData.convertedAmount=allDiscountPrice
|
|
|
+ formData.convertedAmount = Number(formData.convertedAmount).toFixed(2)
|
|
|
if(!formData.sourceCode&&formData.sourceCode==''){
|
|
|
formData.project = data[0].quotationProject
|
|
|
formData.projectName = data[0].quotationProjectName
|
|
@@ -658,6 +664,7 @@
|
|
|
allAmount = allAmount+Number(item.discountedAmount)
|
|
|
})
|
|
|
formData.convertedAmount=allAmount
|
|
|
+ formData.convertedAmount = Number(formData.convertedAmount).toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
/**
|