Commit 37d57431 by zhangxw

关联尾款切商品 定金尾款金额显示修改

1 parent 9b79a6c3
...@@ -30,6 +30,10 @@ Component({ ...@@ -30,6 +30,10 @@ Component({
popupHeight: { popupHeight: {
type: String, type: String,
value: '60%' value: '60%'
},
goodsNumber: {
type: Number,
value: 1
} }
}, },
...@@ -57,7 +61,7 @@ Component({ ...@@ -57,7 +61,7 @@ Component({
this.setData({optionList}) this.setData({optionList})
}, },
confirm() { confirm() {
let { optionList, orderInfo, pickerObj, title, isAdditionRecordOrder } = this.data let { optionList, orderInfo, pickerObj, title, isAdditionRecordOrder, goodsNumber } = this.data
let arr = optionList?.filter(v => v.active) || [] let arr = optionList?.filter(v => v.active) || []
if (!arr.length) { if (!arr.length) {
return wx.showToast({ return wx.showToast({
...@@ -71,10 +75,10 @@ Component({ ...@@ -71,10 +75,10 @@ Component({
orderInfo[pickerObj.optionName] = arr[0][pickerObj.optionName] || '' orderInfo[pickerObj.optionName] = arr[0][pickerObj.optionName] || ''
if (pickerObj.flag) { // 商品带出金额 if (pickerObj.flag) { // 商品带出金额
// 定金金额 // 定金金额
orderInfo['depositPrice'] = `¥${this.priceFilter(arr[0]?.activityPrice / 100 || 0)}` orderInfo['depositPrice'] = `¥${this.priceFilter(arr[0]?.activityPrice * goodsNumber / 100 || 0)}`
// 尾款金额 = 众筹价 - 定金金额 // 尾款金额 = 众筹价 - 定金金额
orderInfo['tailPayment'] = `¥${this.priceFilter((arr[0]?.crowdFundingPrice - arr[0]?.activityPrice) / 100 || 0)}` orderInfo['tailPayment'] = `¥${this.priceFilter((arr[0]?.crowdFundingPrice - arr[0]?.activityPrice) * goodsNumber / 100 || 0)}`
orderInfo['crowdFundingPrice'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice / 100 || 0)}` orderInfo['crowdFundingPrice'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice * goodsNumber / 100 || 0)}`
// 筛选交易流水号 补录用订单总价 关联尾款单(有定金支付时间 用尾款 没有支付时间 用订单总价) // 筛选交易流水号 补录用订单总价 关联尾款单(有定金支付时间 用尾款 没有支付时间 用订单总价)
if (isAdditionRecordOrder) { if (isAdditionRecordOrder) {
// orderInfo['tailPayment'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice / 100 || 0)}` // orderInfo['tailPayment'] = `¥${this.priceFilter(arr[0]?.crowdFundingPrice / 100 || 0)}`
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
pickerObj="{{pickerObj}}" pickerObj="{{pickerObj}}"
orderInfo="{{orderInfo}}" orderInfo="{{orderInfo}}"
isAdditionRecordOrder="{{!orderInfo.payedDate}}" isAdditionRecordOrder="{{!orderInfo.payedDate}}"
goodsNumber="{{orderInfo.goodsNumber}}"
/> />
<remark-popup wx:if="{{showRemark}}" <remark-popup wx:if="{{showRemark}}"
title="备注" title="备注"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!