|
|
@@ -77,18 +77,24 @@
|
|
|
<view class="goods-title-row">
|
|
|
<text class="goods-name">共 {{ info.goodsNum || 1 }} 件商品</text>
|
|
|
</view>
|
|
|
- <text class="goods-price">¥{{ totalPrice }}</text>
|
|
|
+ <text class="goods-price">¥{{ displayActPrice }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 合计(左)+ 操作按钮(右)同一行 -->
|
|
|
+ <!-- 合计(左)+ 操作按钮(右)同一行;金额对齐 ghs 列表:原价 vs actPrice-隔天退款 -->
|
|
|
<view class="card-footer">
|
|
|
- <text class="footer-text">
|
|
|
- 共{{ info.goodsNum || goodsCount }}件商品 合计:
|
|
|
- <text class="footer-price">¥{{ totalPrice }}</text>
|
|
|
- </text>
|
|
|
+ <view class="footer-text">
|
|
|
+ <text>共{{ info.goodsNum || goodsCount }}件,</text>
|
|
|
+ <block v-if="Number(info.orderPrice) == displayActPrice">
|
|
|
+ <text class="footer-price">¥{{ displayActPrice }}</text>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <text class="footer-price-original">¥{{ orderOriginPrice }}</text>
|
|
|
+ <text class="footer-price footer-price--discount">¥{{ displayActPrice }}</text>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
<!-- 待付款:立即付款;待配送:联系客服 -->
|
|
|
<view v-if="showActionBar" class="card-actions" @click.stop>
|
|
|
<view
|
|
|
@@ -216,12 +222,23 @@ export default {
|
|
|
}
|
|
|
return Number(this.info.goodsNum) || 1;
|
|
|
},
|
|
|
- /** 订单合计金额 */
|
|
|
+ /**
|
|
|
+ * 列表展示价:actPrice - 封账后退款(nextDayTkPrice)
|
|
|
+ * 与 ghsApp OrderItem、详情「最终金额」一致
|
|
|
+ */
|
|
|
+ displayActPrice() {
|
|
|
+ const act = Number(this.info.actPrice) || 0
|
|
|
+ const next = Number(this.info.nextDayTkPrice) || 0
|
|
|
+ const pay = act - next
|
|
|
+ return parseFloat((pay > 0 ? pay : 0).toFixed(2))
|
|
|
+ },
|
|
|
+ /** 商品原价 orderPrice,用于与展示价对比划线 */
|
|
|
+ orderOriginPrice() {
|
|
|
+ return this.info.orderPrice ? parseFloat(this.info.orderPrice) : 0
|
|
|
+ },
|
|
|
+ /** 兼容旧引用:等同展示价 */
|
|
|
totalPrice() {
|
|
|
- const price = this.info.actPrice != null && this.info.actPrice !== ''
|
|
|
- ? this.info.actPrice
|
|
|
- : this.info.orderPrice;
|
|
|
- return price ? parseFloat(price) : 0;
|
|
|
+ return this.displayActPrice
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -531,9 +548,12 @@ export default {
|
|
|
}
|
|
|
|
|
|
.footer-text {
|
|
|
+ display: flex;
|
|
|
flex: 1;
|
|
|
min-width: 0;
|
|
|
margin-right: 16upx;
|
|
|
+ align-items: baseline;
|
|
|
+ flex-wrap: wrap;
|
|
|
font-size: 26upx;
|
|
|
color: $fontColor2;
|
|
|
}
|
|
|
@@ -545,6 +565,18 @@ export default {
|
|
|
color: $redColor;
|
|
|
}
|
|
|
|
|
|
+/* 有优惠/隔天退款时:原价划线 + 展示价 */
|
|
|
+.footer-price-original {
|
|
|
+ margin-left: 4upx;
|
|
|
+ font-size: 26upx;
|
|
|
+ color: #847676;
|
|
|
+ text-decoration: line-through;
|
|
|
+}
|
|
|
+
|
|
|
+.footer-price--discount {
|
|
|
+ margin-left: 10upx;
|
|
|
+}
|
|
|
+
|
|
|
/* 操作按钮靠右:主按钮实心绿、次按钮描边 */
|
|
|
.card-actions {
|
|
|
display: flex;
|