Commit 7a13d84b by 李伟康

替换油卡积分

1 parent 0a5cc243
......@@ -470,7 +470,7 @@ export default {
oilList.push({
oilCouponId: o.oilCouponId,
amount: o.amount,
faceValue: o.faceValue,
salesPrice: o.salesPrice,
aliasName: o.aliasName
})
})
......@@ -613,7 +613,7 @@ export default {
setRowTotal (row, index) {
const { oilList, cashBackValue, buyValue } = row
let total = NP.plus((cashBackValue || 0), (buyValue || 0))
oilList && oilList.map(i => total += NP.times((i.amount || 0), (i.faceValue || 0)))
oilList && oilList.map(i => total += NP.times((i.amount || 0), (i.salesPrice || 0), 0.01))
row.total = total
this.totalForm.total[index] = total
this.updateView()
......@@ -641,7 +641,7 @@ export default {
const { oilList } = row
let total = 0
if (oilList && oilList.length) oilList.map(i => {
total += NP.times((i.amount || 0), (i.faceValue || 0))
total += NP.times((i.amount || 0), (i.salesPrice || 0), 0.01)
})
this.totalForm.gasService[index] = total
this.updateView()
......@@ -673,7 +673,7 @@ export default {
},
filterData (list, name) {
return list?.map(i => {
return name == 'oilList' ? `${i.aliasName}*${i.amount} (${NP.times(i.amount, i.faceValue)}积分)` : `${i.couponName}*${i.amount}`
return name == 'oilList' ? `${i.aliasName}*${i.amount} (${NP.times(i.amount, i.salesPrice,0.01)}积分)` : `${i.couponName}*${i.amount}`
}) || []
},
splitArray (arr, size) {
......
......@@ -147,7 +147,7 @@ export default {
formatter: cell => {
const { oilList, cashBackValue, buyValue } = cell
let total = NP.plus((cashBackValue || 0), (buyValue || 0))
oilList && oilList.map(i => total += NP.times(i.amount, i.faceValue))
oilList && oilList.map(i => total += NP.times(i.amount, i.salesPrice, 0.01))
return total
}
},
......@@ -170,7 +170,7 @@ export default {
},
filterData (list, name) {
return list?.map(i => {
return name == 'oilList' ? `${i.aliasName}*${i.amount} (${NP.times(i.amount, i.faceValue)}积分)` : `${i.couponName}*${i.amount}`
return name == 'oilList' ? `${i.aliasName}*${i.amount} (${NP.times(i.amount, i.salesPrice, 0.01)}积分)` : `${i.couponName}*${i.amount}`
}) || []
},
}
......
......@@ -77,7 +77,7 @@ export default {
return {
oilCouponId: e.oilCouponId,
amount: e.amount,
faceValue: e.faceValue,
salesPrice: e.salesPrice,
aliasName: e.aliasName
}
}) || [],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!