fix: 修复订单结算流程中提成金额判断逻辑
Web管理后台:模板中commission_amount(snake_case)与数据对象commissionAmount(camelCase)不匹配, 导致待结算按钮永远不显示,所有已完成订单直接跳到标记结算。 小程序:零提成订单缺少直接标记结算路径,调用/settle API会因状态不匹配报错。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6ba8ca733d
commit
c002bef5ab
@ -497,6 +497,7 @@ Page({
|
||||
shipped: "确认收货",
|
||||
completed: "标记完成",
|
||||
pending_settle: "待结算",
|
||||
settled: "标记结算",
|
||||
};
|
||||
wx.showModal({
|
||||
title: "确认操作",
|
||||
|
||||
@ -279,8 +279,13 @@
|
||||
<button class="action-btn pass-btn" type="primary" loading="{{actionLoading}}" bindtap="handleSimpleTransition" data-target="pending_settle">待结算</button>
|
||||
</block>
|
||||
|
||||
<!-- 已完成(无佣金)/ 待结算:结算 -->
|
||||
<block wx:elif="{{orderInfo.order_status === 'completed' || orderInfo.order_status === 'pending_settle'}}">
|
||||
<!-- 已完成(无佣金):直接标记结算 -->
|
||||
<block wx:elif="{{orderInfo.order_status === 'completed'}}">
|
||||
<button class="action-btn pass-btn" type="primary" loading="{{actionLoading}}" bindtap="handleSimpleTransition" data-target="settled">标记结算</button>
|
||||
</block>
|
||||
|
||||
<!-- 待结算:结算提成 -->
|
||||
<block wx:elif="{{orderInfo.order_status === 'pending_settle'}}">
|
||||
<button class="action-btn pass-btn" type="primary" loading="{{actionLoading}}" bindtap="handleSettle">结算提成</button>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
@ -195,11 +195,11 @@
|
||||
<button v-if="detail.order.rawStatus === 'shipped'" class="primary-btn" :disabled="detailActionBusy"
|
||||
@click="handleDetailStatusChange('completed')">标记完成
|
||||
</button>
|
||||
<button v-if="detail.order.rawStatus === 'completed' && detail.order.commission_amount > 0"
|
||||
<button v-if="detail.order.rawStatus === 'completed' && Number(detail.order.commissionAmount) > 0"
|
||||
class="primary-btn" :disabled="detailActionBusy"
|
||||
@click="handleDetailStatusChange('pending_settle')">待结算
|
||||
</button>
|
||||
<button v-if="detail.order.rawStatus === 'completed' && !(detail.order.commission_amount > 0)"
|
||||
<button v-if="detail.order.rawStatus === 'completed' && !(Number(detail.order.commissionAmount) > 0)"
|
||||
class="primary-btn" :disabled="detailActionBusy" @click="handleDetailStatusChange('settled')">标记结算
|
||||
</button>
|
||||
<button v-if="detail.order.rawStatus === 'pending_settle'" class="primary-btn"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user