|
|
|
|
@ -1,9 +1,10 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="content">
|
|
|
|
|
<view class="orderBox">
|
|
|
|
|
<view class="title">{{info.order_name}}</view>
|
|
|
|
|
|
|
|
|
|
<view class="p">下单日期:<text class="font_red">{{$u.timeFormat(info.created_at, 'yyyy年mm月dd日 hh:MM')}}</text></view>
|
|
|
|
|
<view class="title">{{info.order_name}}</view>
|
|
|
|
|
|
|
|
|
|
<view class="p">下单日期:<text class="font_red">{{$u.timeFormat(info.created_at, 'yyyy年mm月dd日 hh:MM')}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="orderBox">
|
|
|
|
|
<view class="title">订单信息</view>
|
|
|
|
|
@ -70,7 +71,9 @@
|
|
|
|
|
<view class="bottom">
|
|
|
|
|
<view class="subBtn view" v-if="info.state=='unpaid'" @click="tocancel(info.id)">取消</view>
|
|
|
|
|
<view class="subBtn pay" v-if="info.state=='unpaid'" @click="topay(info.id)">付款</view>
|
|
|
|
|
<view class="subBtn cancel" v-if="info.state!='unpaid'&&info.bookable_type=='product'&&info.items[0].state=='pending'" @click="tocancelApply(info.items[0].id)">退单</view>
|
|
|
|
|
<view class="subBtn cancel"
|
|
|
|
|
v-if="info.state!='unpaid'&&info.bookable_type=='product'&&info.items[0].state=='pending'"
|
|
|
|
|
@click="tocancelApply(info.items[0].id)">退单</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
@ -110,7 +113,7 @@
|
|
|
|
|
"confirmed": "确认有效",
|
|
|
|
|
"canceled_by_user": "用户申请取消",
|
|
|
|
|
"canceled_by_merchant": "商家标注无效单",
|
|
|
|
|
"finished": "已取消",
|
|
|
|
|
"finished": "已核销",
|
|
|
|
|
"canceled": "已取消"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -169,44 +172,44 @@
|
|
|
|
|
console.log(res);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
tocancelApply(id){
|
|
|
|
|
var that = this;
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: "确认申请退单?",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
weixin.request({
|
|
|
|
|
api: '/api/member/order-item-cancel',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data: {
|
|
|
|
|
id: id
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: res => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.status == 1) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: "已经申请退款",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
that.getOrder();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
utilFail: res => {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res
|
|
|
|
|
})
|
|
|
|
|
console.log(res);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
console.log('用户点击取消');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
tocancelApply(id) {
|
|
|
|
|
var that = this;
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: "确认申请退单?",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
weixin.request({
|
|
|
|
|
api: '/api/member/order-item-cancel',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data: {
|
|
|
|
|
id: id
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: res => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.status == 1) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: "已经申请退款",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
that.getOrder();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
utilFail: res => {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res
|
|
|
|
|
})
|
|
|
|
|
console.log(res);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
console.log('用户点击取消');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
tocancel(id) {
|
|
|
|
|
var that = this;
|
|
|
|
|
@ -312,9 +315,11 @@
|
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
|
background: #808080;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cancel{ background: #FF578A;}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cancel {
|
|
|
|
|
background: #FF578A;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|