1
This commit is contained in:
@@ -1329,29 +1329,25 @@ export default {
|
||||
// 数量(固定为1)
|
||||
const quantity = '1'
|
||||
|
||||
// 姓名(下单人)
|
||||
const buyer = row.buyer || ''
|
||||
|
||||
// 地址
|
||||
const address = row.address || ''
|
||||
|
||||
// 售价(京粉实际价格,如果没有则用付款金额-后返金额)
|
||||
let sellingPrice = row.jingfenActualPrice
|
||||
if (!sellingPrice || sellingPrice === 0) {
|
||||
const payment = row.paymentAmount || 0
|
||||
const rebate = row.rebateAmount || 0
|
||||
sellingPrice = payment - rebate
|
||||
// 姓名(从地址中提取,地址格式通常是"姓名 电话 详细地址")
|
||||
let buyer = ''
|
||||
if (address) {
|
||||
// 提取地址中的第一个词作为姓名
|
||||
const addressParts = address.trim().split(/\s+/)
|
||||
if (addressParts.length > 0) {
|
||||
buyer = addressParts[0]
|
||||
}
|
||||
}
|
||||
const sellingPriceStr = (sellingPrice && sellingPrice > 0)
|
||||
? sellingPrice.toFixed(2) : ''
|
||||
|
||||
// 成本(售价 - 利润,利润是后返金额)
|
||||
// 售价(固定为0)
|
||||
const sellingPriceStr = '0'
|
||||
|
||||
// 成本(售价 - 利润,售价是0)
|
||||
const rebate = row.rebateAmount || 0
|
||||
let cost = null
|
||||
if (sellingPrice && sellingPrice > 0 && rebate > 0) {
|
||||
cost = sellingPrice - rebate
|
||||
}
|
||||
const costStr = (cost && cost > 0) ? cost.toFixed(2) : ''
|
||||
const costStr = '' // 售价是0,成本也设为空
|
||||
|
||||
// 利润(后返金额)
|
||||
const profitStr = (rebate > 0) ? rebate.toFixed(2) : ''
|
||||
|
||||
Reference in New Issue
Block a user