Browse Source

客户端-订单详情,未付款订单展示支付按钮

master
liutong 1 year ago
parent
commit
3d494ecd5f
  1. 67
      page_goods/orderDetail/orderDetail.vue

67
page_goods/orderDetail/orderDetail.vue

@ -428,6 +428,27 @@
</text>
</view>
</view>
<view class="order-cell">
<text class="tit">已付金额</text>
<view class="box align-right">
<text class="color-title price-font">
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
<text>{{ (orderData && orderData.pay) ? orderData.pay.received_money : '' }}</text>
</text>
</view>
</view>
<view class="order-cell">
<text class="tit">未付金额</text>
<view class="box align-right">
<text class="color-title price-font">
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
{{ (orderData && orderData.pay) ? orderData.pay.pay_money : '0.00' }}
</text>
</view>
</view>
<view v-if="!Number(orderData.sales_money)">
<view class="order-cell" v-if="orderData.order_type != 4">
<text class="tit">运费</text>
@ -535,18 +556,17 @@
</view>
<view class="order-cell">
<view class="box align-right">
<text>实付金额</text>
<text>总计金额</text>
<text class="color-base-text price-font">
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
<text class="font-size-base"
v-if="!Number(orderData.sales_money)">{{ orderData.order_money }}</text>
<text class="font-size-base"
v-else-if="Number(orderData.sales_money)">{{ orderData.sales_money }}</text>
<text class="font-size-base">{{ (orderData && orderData.pay) ? orderData.pay.total_money : '0.00' }}</text>
<!-- <text class="font-size-base" v-if="!Number(orderData.sales_money)">{{ orderData.order_money }}</text>-->
<!-- <text class="font-size-base" v-else-if="Number(orderData.sales_money)">{{ orderData.sales_money }}</text>-->
</text>
</view>
</view>
<view class="order-action fixed-bottom bottom-safe-area" v-if="orderData.action.length > 0">
<view class="order-action fixed-bottom bottom-safe-area" v-if="orderData.action.length > 0 || isOrderPayShow">
<view class="order-box-btn white"
v-if="evaluateConfig.evaluate_status == 1 && orderData.is_evaluate == 1"
@click="operation('memberOrderEvaluation')">
@ -559,6 +579,12 @@
@click="operation(operationItem.action)">
{{ operationItem.title }}
</view>
<!--是否展示自定义支付按钮-->
<view v-if="isOrderPayShow"
class="order-box-btn color-base-border color-base-text"
@click="operation('orderPay')">
支付
</view>
</view>
<view class="order-action fixed-bottom bottom-safe-area"
@ -591,6 +617,7 @@
data() {
return {
isIphoneX: false,
isOrderPayShow:false,//|,=false,order.pay/,isOrderPayShow=true
orderId: 0,
order: 0,
orderData: {
@ -621,7 +648,10 @@
if (option.order) this.order = option.order
if (option.order_id) this.orderId = option.order_id;
},
if (this.orderId){
this.getOrderData();
}
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
@ -668,6 +698,29 @@
let num = 0;
this.orderData = res.data;
this.orderData.pay = res.data.pay;
console.log('11xxx',this.orderData.action)
let _actionArr = []
this.orderData.action.forEach((v) => {
_actionArr.push(v.action)
})
this.isOrderPayShow = false;
//"orderPay"_actionArr
if (!_actionArr.includes('orderPay') && res.data.pay.pay_status == 0) {
this.isOrderPayShow = true
}
// this.isOrderPayShow = false;
// this.orderData.action.foreach((v)=>{
// console.log('vvv',v.action)
// })
let refund_order_goods_ids = [];
this.orderData.order_goods.forEach(v => {

Loading…
Cancel
Save