|
@@ -1,44 +1,53 @@
|
|
|
<template>
|
|
|
<view class="container cashier">
|
|
|
- <view class="pay-title" v-if="!showPayUnder" @click="handlePayunder">
|
|
|
- <view class="content">
|
|
|
- 因线上支付政策调整,请对每家店铺分别进行线上付款;若需要直接转账支付订单,请点击右侧箭头查看线下转账信息。
|
|
|
- <view class="content-icon"> <text class="iconfont icon-xiangyou"></text> </view>
|
|
|
+ <tui-skeleton
|
|
|
+ v-if="skeletonShow"
|
|
|
+ backgroundColor="#fafafa"
|
|
|
+ borderRadius="10rpx"
|
|
|
+ :isLoading="true"
|
|
|
+ :loadingType="5"
|
|
|
+ ></tui-skeleton>
|
|
|
+ <template v-else>
|
|
|
+ <view class="pay-title" v-if="!showPayUnder" @click="handlePayunder">
|
|
|
+ <view class="content">
|
|
|
+ 因线上支付政策调整,请对每家店铺分别进行线上付款;若需要直接转账支付订单,请点击右侧箭头查看线下转账信息。
|
|
|
+ <view class="content-icon"> <text class="iconfont icon-xiangyou"></text> </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="pay-content">
|
|
|
- <view class="pay-list" v-for="(list, index) in list" :key="index">
|
|
|
- <view class="pay-list-title">{{ list.shopName }}</view>
|
|
|
- <view class="pay-list-goods" v-for="(pros, prosIndex) in list.orderProductList" :key="prosIndex">
|
|
|
- <view class="pay-list-image"> <image :src="pros.image" class="image" mode=""></image> </view>
|
|
|
- <view class="pay-list-info">
|
|
|
- <view class="info-title">{{ pros.name }}</view>
|
|
|
- <view class="info-view" v-if="pros.productUnit != ''"> 规格:{{ pros.productUnit ? pros.productUnit : '' }} </view>
|
|
|
- <view class="info-view" v-if="pros.productCode != '' && pros.productCode != null">
|
|
|
- 商品编码:{{ pros.productCode ? pros.productCode : '' }}
|
|
|
- </view>
|
|
|
- <view class="info-price">
|
|
|
- <view class="price">¥{{ pros.price | NumFormat }}</view>
|
|
|
- <view class="count"><text class="sm">X</text> {{ pros.num }}</view>
|
|
|
+ <view class="pay-content">
|
|
|
+ <view class="pay-list" v-for="(list, index) in list" :key="index">
|
|
|
+ <view class="pay-list-title">{{ list.shopName }}</view>
|
|
|
+ <view class="pay-list-goods" v-for="(pros, prosIndex) in list.orderProductList" :key="prosIndex">
|
|
|
+ <view class="pay-list-image"> <image :src="pros.image" class="image" mode=""></image> </view>
|
|
|
+ <view class="pay-list-info">
|
|
|
+ <view class="info-title">{{ pros.name }}</view>
|
|
|
+ <view class="info-view" v-if="pros.productUnit != ''"> 规格:{{ pros.productUnit ? pros.productUnit : '' }} </view>
|
|
|
+ <view class="info-view" v-if="pros.productCode != '' && pros.productCode != null">
|
|
|
+ 商品编码:{{ pros.productCode ? pros.productCode : '' }}
|
|
|
+ </view>
|
|
|
+ <view class="info-price">
|
|
|
+ <view class="price">¥{{ pros.price | NumFormat }}</view>
|
|
|
+ <view class="count"><text class="sm">X</text> {{ pros.num }}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="pay-list-msg">
|
|
|
- <view class="list-msg" v-if="list.receiptAmount > 0"
|
|
|
- >已付:<text class="text">¥{{ list.receiptAmount | NumFormat }}</text></view
|
|
|
- >
|
|
|
- <view class="list-msg" v-if="list.eachDiscount > 0"
|
|
|
- >优惠:<text class="text">¥{{ list.eachDiscount | NumFormat }}</text></view
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view class="pay-list-btn">
|
|
|
- <view class="btn" v-if="list.receiptStatus != 3" @click="handlePayOrder(list.shopOrderId)">付款</view>
|
|
|
- <view class="list-msg" v-if="list.obligation > 0"
|
|
|
- >待付:<text class="text red">¥{{ list.obligation | NumFormat }}</text></view
|
|
|
- >
|
|
|
+ <view class="pay-list-msg">
|
|
|
+ <view class="list-msg" v-if="list.receiptAmount > 0"
|
|
|
+ >已付:<text class="text">¥{{ list.receiptAmount | NumFormat }}</text></view
|
|
|
+ >
|
|
|
+ <view class="list-msg" v-if="list.eachDiscount > 0"
|
|
|
+ >优惠:<text class="text">¥{{ list.eachDiscount | NumFormat }}</text></view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <view class="pay-list-btn">
|
|
|
+ <view class="btn" v-if="list.receiptStatus != 3" @click="handlePayOrder(list.shopOrderId)">付款</view>
|
|
|
+ <view class="list-msg" v-if="list.obligation > 0"
|
|
|
+ >待付:<text class="text red">¥{{ list.obligation | NumFormat }}</text></view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -48,6 +57,7 @@ export default {
|
|
|
return {
|
|
|
orderId: 0,
|
|
|
showPayUnder:false,
|
|
|
+ skeletonShow:true,
|
|
|
list: []
|
|
|
}
|
|
|
},
|
|
@@ -71,25 +81,26 @@ export default {
|
|
|
this.payOrderId = '#' + e.orderId + '#'
|
|
|
this.PayOrderShoporders(this.orderId)
|
|
|
},
|
|
|
- PayOrderShoporders(orderId) {
|
|
|
- this.PayService.PayOrderShoporders({ orderId: orderId })
|
|
|
- .then(response => {
|
|
|
- this.list = response.data
|
|
|
- this.PayOrderCheckoutCounter(orderId)
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- this.$util.msg(error.msg, 2000)
|
|
|
- })
|
|
|
+ async PayOrderShoporders(orderId) {
|
|
|
+ try{
|
|
|
+ const res =await this.PayService.PayOrderShoporders({ orderId: orderId })
|
|
|
+ this.list = res.data
|
|
|
+ this.PayOrderCheckoutCounter(orderId)
|
|
|
+ }catch(error){
|
|
|
+ this.$util.msg(error.msg, 2000)
|
|
|
+ }
|
|
|
},
|
|
|
- PayOrderCheckoutCounter(orderId){
|
|
|
- this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
|
|
|
- let data = response.data
|
|
|
+ async PayOrderCheckoutCounter(orderId){
|
|
|
+ try{
|
|
|
+ const res = await this.PayService.PayOrderCheckoutCounter({orderId:orderId})
|
|
|
+ const data = res.data
|
|
|
+ this.skeletonShow = false
|
|
|
if(data.discernReceipt.length>0){
|
|
|
this.showPayUnder = true
|
|
|
}
|
|
|
- }).catch(error =>{
|
|
|
+ }catch(error){
|
|
|
this.$util.msg(error.msg,2000)
|
|
|
- })
|
|
|
+ }
|
|
|
},
|
|
|
handlePayOrder(shopOrderId){
|
|
|
this.$api.navigateTo(`/pages/user/pay/card-order?shopOrderId=${shopOrderId}`)
|