完善小程序订单功能
This commit is contained in:
@ -47,30 +47,12 @@
|
||||
<text style="color: #606266;" v-if="item.order_status == 4">退款成功</text>
|
||||
</view>
|
||||
</view>
|
||||
<!--多个商品显示-->
|
||||
<!-- <view class="product-list pr" v-if="item.product.length > 1" @click="gotoOrder(item.order_id)">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="list d-s-c pr100">
|
||||
<view class="cover mr10" v-for="(img, num) in item.product" :key="num" style="width: 200rpx; height: 200rxpx;">
|
||||
<image :src="img.image.file_path" mode="aspectFill" style="width: 200rpx; height: 200rxpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="total-count">
|
||||
<view class="left-shadow"></view>
|
||||
<view class="price f22 theme-price">
|
||||
¥
|
||||
<text class="f40 theme-price">{{ item.pay_price }}</text>
|
||||
</view>
|
||||
<view class="count">共{{ item.product.length }}件</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!--一个商品显示-->
|
||||
<view class="one-product d-s-c" @click="gotoOrder(item.order_id)">
|
||||
<view class="one-product d-s-c" @click="gotoOrder(item.id)">
|
||||
<image :src="item.image" mode="aspectFill" style="width: 200rpx; height: 200rpx; border-radius: 10rpx;"></image>
|
||||
<view class="flex-1">
|
||||
<view class="pro-info cg-info2">订单号:{{ item.order_sn }}</view>
|
||||
<view class="pro-info cg-info3">活动日期:{{ item.trade[0].day_title }}</view>
|
||||
<view class="pro-info cg-info3">预约时间:{{ item.trade[0].day_title }}</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="total-count">
|
||||
@ -86,39 +68,7 @@
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="order-bts presale" v-if="item.order_source==80">
|
||||
<view class="d-b-c line-h-50 f24 gray9">
|
||||
<view>定金</view>
|
||||
<view>
|
||||
<text>{{item.advance.pay_status.value == 20?'已支付':'待支付'}}</text>¥{{item.advance.pay_price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-b-c line-h-50 f24 gray9">
|
||||
<view>尾款</view>
|
||||
<view>
|
||||
<text>{{item.advance.pay_status.value == 20&&item.pay_status.value == 20?'已支付':'待支付'}}</text>
|
||||
¥{{item.pay_price}}
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="item.order_status.value==10">
|
||||
<view class="d-e-c line-h-50 f24 gray9"
|
||||
v-if="item.advance&&item.advance.pay_status.value==20">
|
||||
<view v-if="nowOverTime(item.advance.end_time)&&item.pay_end_time_format">
|
||||
尾款支付截止时间:<text class="redF11">{{item.pay_end_time_format}}</text>
|
||||
</view>
|
||||
<view v-else-if="item.advance.end_time_text">
|
||||
尾款支付时间:<text class="redF11">{{item.advance.end_time_text}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template>
|
||||
<view class="d-e-c line-h-50 f24 gray9"
|
||||
v-if="item.advance.pay_status.value == 10&&item.advance.order_status==10">
|
||||
<view
|
||||
v-if="!nowOverTime(item.advance.pay_end_time)&&!nowOverTime(item.advance.end_time)">
|
||||
定金支付截止时间: <text class="redF11">{{countDown(item.advance.pay_end_time)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template v-if="item.order_status.value != 21">
|
||||
<view class="d-e-c">
|
||||
<!-- 订单付款 -->
|
||||
@ -167,25 +117,17 @@
|
||||
<view class="order-bts" v-else>
|
||||
<block>
|
||||
<!-- 未支付取消订单 -->
|
||||
<button @click="showCancleOrderPopup(item.order_id)" class="theme-borderbtn cancel-btn"
|
||||
<button @click="showCancleOrderPopup(item.id)" class="theme-borderbtn cancel-btn"
|
||||
v-if="item.order_status == 0">取消订单</button>
|
||||
<!-- 订单付款 -->
|
||||
<block v-if="item.order_status == 0">
|
||||
<button class="theme-btn pay-btn" @click="onPayOrder(item.order_id)">去支付</button>
|
||||
<button class="theme-btn pay-btn" @click="onPayOrder(item.ground_id, item.id)">去支付</button>
|
||||
</block>
|
||||
|
||||
<block v-if="item.order_status >= 2">
|
||||
<button class="theme-btn del-btn" @click="onDelOrder(item.order_id)">删除订单</button>
|
||||
<button class="theme-btn del-btn" @click="onDelOrder(item.id)">删除订单</button>
|
||||
</block>
|
||||
</block>
|
||||
<text v-if="item.order_status.value == 21" class="count">取消申请中</text>
|
||||
<!-- 订单评价 -->
|
||||
<button class="theme-btn" v-if="item.order_status.value == 30 && item.is_comment == 0"
|
||||
@click="gotoEvaluate(item.order_id)">评价</button>
|
||||
<template v-if="item.assemble_status == 10 && item.order_source == 30">
|
||||
<button class="theme-btn"
|
||||
@click="gotoAssembleShare(item.product[0].bill_source_id)">邀请好友拼单</button>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class="d-c-c p30" v-if="listData.length == 0 && !loading">
|
||||
@ -480,7 +422,7 @@
|
||||
|
||||
/*跳转页面*/
|
||||
gotoOrder(e) {
|
||||
this.gotoPage('/pages/order/cg-order-detail?order_id=' + e);
|
||||
this.gotoPage(`/pages/order/cg-order-detail?order_id=${e}&ballType=${this.ballType}`);
|
||||
},
|
||||
|
||||
/*隐藏支付方式*/
|
||||
@ -509,48 +451,18 @@
|
||||
depositPay(e) {
|
||||
this.gotoPage('/pages/order/confirm-order?order_type=retainage&order_id=' + e)
|
||||
},
|
||||
/*支付方式选择*/
|
||||
onPayOrder(orderId) {
|
||||
|
||||
// 跳转支付页面
|
||||
onPayOrder(groundId = 0, orderId = 0) {
|
||||
let self = this;
|
||||
self.gotoPage('/pages/order/cashier?order_id=' + orderId)
|
||||
if (self.ballType == 1) {
|
||||
// 网球场
|
||||
self.gotoPage(`/bundle/reserve/confirm?orderId=${orderId}&venueId=${groundId}&typeId=1`);
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
/*确认收货*/
|
||||
orderReceipt(order_id) {
|
||||
let self = this;
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要收货吗?',
|
||||
success: function(o) {
|
||||
if (o.confirm) {
|
||||
uni.showLoading({
|
||||
title: '正在处理'
|
||||
});
|
||||
self._post(
|
||||
'user.order/receipt', {
|
||||
order_id: order_id
|
||||
},
|
||||
function(res) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 2000,
|
||||
icon: 'success'
|
||||
});
|
||||
self.listData = [];
|
||||
self.getData();
|
||||
}
|
||||
);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '取消收货',
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
cancelAdvance(e) {
|
||||
let self = this;
|
||||
let order_id = e;
|
||||
@ -594,11 +506,12 @@
|
||||
uni.showLoading({
|
||||
title: '正在处理'
|
||||
});
|
||||
self._get(
|
||||
'user.order/cancel', {
|
||||
self._post(
|
||||
'order.groundOrder/cancelGroundOrder', {
|
||||
order_id: self.order_id
|
||||
},
|
||||
function(res) {
|
||||
this.cancelOrderPopup = false;
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
@ -617,54 +530,42 @@
|
||||
return now >= time
|
||||
|
||||
},
|
||||
/*去评论*/
|
||||
gotoEvaluate(e) {
|
||||
this.gotoPage('/pages/order/evaluate/evaluate?order_id=' + e);
|
||||
|
||||
// 删除订单
|
||||
onDelOrder(order_id) {
|
||||
this.delOrderPopup = true;
|
||||
this.order_id = order_id;
|
||||
},
|
||||
|
||||
/*核销码*/
|
||||
onQRCode(e) {
|
||||
delOrder() {
|
||||
let self = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
title: '正在处理'
|
||||
});
|
||||
let order_id = e;
|
||||
self._get(
|
||||
'user.order/qrcode', {
|
||||
order_id: order_id,
|
||||
source: self.getPlatform()
|
||||
self._post(
|
||||
'order.groundOrder/delGroundOrder',
|
||||
{
|
||||
order_id: self.order_id
|
||||
},
|
||||
function(res) {
|
||||
self.delOrderPopup = false;
|
||||
|
||||
uni.hideLoading();
|
||||
self.isCodeImg = true;
|
||||
self.codeImg = res.data.qrcode;
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
duration: 2000,
|
||||
icon: 'success'
|
||||
});
|
||||
self.listData = [];
|
||||
self.getData();
|
||||
}
|
||||
);
|
||||
},
|
||||
/*关闭核销二维码*/
|
||||
hideCodePopupFunc() {
|
||||
this.isCodeImg = false;
|
||||
},
|
||||
|
||||
/*分享拼团*/
|
||||
gotoAssembleShare(e) {
|
||||
let url = '/pages/plus/assemble/fight-group-detail/fight-group-detail?assemble_bill_id=' + e;
|
||||
this.gotoPage(url);
|
||||
},
|
||||
|
||||
// 删除订单
|
||||
onDelOrder() {
|
||||
uni.showToast({
|
||||
title: '该功能正在开发中,敬请期待',
|
||||
duration: 2000,
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
|
||||
// 跳转场馆
|
||||
toGround(ground_id) {
|
||||
uni.navigateTo({
|
||||
url: `/bundle/reserve/details?id=${id}&typeId=${this.ballType}`
|
||||
url: `/bundle/reserve/details?id=${ground_id}&typeId=${this.ballType}`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user