订单项目根据赛事类型显示费用字段
This commit is contained in:
parent
4486d2abc3
commit
99e7b89d2a
@ -46,6 +46,9 @@ Page({
|
|||||||
|
|
||||||
formatDetail(item) {
|
formatDetail(item) {
|
||||||
const statusInfo = STATUS_MAP[item.orderStatus] || { text: item.orderStatus || '-', key: 'default' };
|
const statusInfo = STATUS_MAP[item.orderStatus] || { text: item.orderStatus || '-', key: 'default' };
|
||||||
|
// ChargeMode 枚举:0=免费,1=定价,2=单价(赛事),3=单价(项目)
|
||||||
|
// 只有 3(单价项目)显示费用列
|
||||||
|
const shouldShowFee = item.chargeMode === 3;
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
statusText: statusInfo.text,
|
statusText: statusInfo.text,
|
||||||
@ -54,7 +57,8 @@ Page({
|
|||||||
actualAmount: item.actualAmount != null ? item.actualAmount : '-',
|
actualAmount: item.actualAmount != null ? item.actualAmount : '-',
|
||||||
refundAmount: item.refundAmount != null && item.refundAmount > 0 ? item.refundAmount : '',
|
refundAmount: item.refundAmount != null && item.refundAmount > 0 ? item.refundAmount : '',
|
||||||
payTimeStr: item.paymentTime ? formatTime(item.paymentTime) : '-',
|
payTimeStr: item.paymentTime ? formatTime(item.paymentTime) : '-',
|
||||||
refundTimeStr: item.refundTime ? formatTime(item.refundTime) : '-'
|
refundTimeStr: item.refundTime ? formatTime(item.refundTime) : '-',
|
||||||
|
shouldShowFee: shouldShowFee
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -65,13 +65,13 @@
|
|||||||
<view class="table-head">
|
<view class="table-head">
|
||||||
<text class="th">项目</text>
|
<text class="th">项目</text>
|
||||||
<text class="th">组别</text>
|
<text class="th">组别</text>
|
||||||
<text class="th th-right">费用(元)</text>
|
<text class="th th-right" wx:if="{{detail.shouldShowFee}}">费用(元)</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="table-body">
|
<view class="table-body">
|
||||||
<view class="tr" wx:for="{{detail.items}}" wx:key="id">
|
<view class="tr" wx:for="{{detail.items}}" wx:key="id">
|
||||||
<text class="td">{{item.projectName}}</text>
|
<text class="td">{{item.projectName}}</text>
|
||||||
<text class="td">{{item.groupName}}</text>
|
<text class="td">{{item.groupName}}</text>
|
||||||
<text class="td td-right">{{item.fee}}</text>
|
<text class="td td-right" wx:if="{{detail.shouldShowFee}}">{{item.fee}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user