+160
-50
@@ -61,7 +61,7 @@
|
||||
v-if="order.experienceOrderInfo"
|
||||
class="shop-info flex jc-between ai-center"
|
||||
style="padding-bottom: 0"
|
||||
@click.stop="goStore(order)"
|
||||
@click.stop="goStore(orderListIndex)"
|
||||
>
|
||||
<view class="flex ai-center">
|
||||
<image
|
||||
@@ -79,7 +79,7 @@
|
||||
v-if="order.merName && !order.experienceOrderInfo"
|
||||
class="shop-info flex jc-between ai-center"
|
||||
style="padding-bottom: 0"
|
||||
@click="goStore(order)"
|
||||
@click="goStore(orderListIndex)"
|
||||
>
|
||||
<view class="flex ai-center">
|
||||
<image
|
||||
@@ -133,7 +133,7 @@
|
||||
class="font-color-white statusTag v12-primary"
|
||||
>{{ (order.isGiftCardSend || order.isGiftCardReceive) ? '礼包' : (getStatus(order) || (order._status && order._status._title) || '已完成') }}</view>
|
||||
</view>
|
||||
<view @click="goOrderDetails(order)">
|
||||
<view @click="goOrderDetails(orderListIndex)">
|
||||
<view
|
||||
v-if="order.isGiftCardReceiveBlind === 1"
|
||||
class="item-info acea-row row-between row-top"
|
||||
@@ -334,17 +334,17 @@
|
||||
<view
|
||||
v-if="order.experienceOrderStatus === 0 || order.experienceOrderStatus === 1"
|
||||
class="bnt service"
|
||||
@click.stop="goRoom(order)"
|
||||
@click.stop="goRoom(orderListIndex)"
|
||||
>联系商家</view>
|
||||
<view
|
||||
v-if="order.experienceOrderStatus === 0"
|
||||
class="bnt v12-primary v12-white-text v12-primary-border v12-radius-40"
|
||||
@click.stop="goOrderDetails(order)"
|
||||
@click.stop="goOrderDetails(orderListIndex)"
|
||||
>去使用</view>
|
||||
<view
|
||||
v-if="order.experienceOrderStatus === 1 || order.experienceOrderStatus === 2"
|
||||
class="bnt service"
|
||||
@click.stop="delOrder(order)"
|
||||
@click.stop="delOrder(orderListIndex)"
|
||||
>删除订单</view>
|
||||
</view>
|
||||
<view
|
||||
@@ -358,18 +358,18 @@
|
||||
>
|
||||
<text
|
||||
class="btn-more v12-font-28 v12-font-bold"
|
||||
@click.stop="tapShowMore(order, orderListIndex)"
|
||||
@click.stop="tapShowMore(orderListIndex)"
|
||||
>更多</text>
|
||||
<view class="group-float" v-show="order.showMore">
|
||||
<view
|
||||
v-if="order.merName && order.isGiftCardReceiveBlind === 0"
|
||||
class="btn btn-service flex jc-center ai-center v12-font-24"
|
||||
@click="goRoom(order)"
|
||||
@click="goRoom(orderListIndex)"
|
||||
>联系商家</view>
|
||||
<view
|
||||
v-if="order.isTravelGroup === 0 && order.refundSystemStatus !== 2"
|
||||
class="btn flex jc-center ai-center v12-font-24"
|
||||
@click="goRefund(order)"
|
||||
@click="goRefund(orderListIndex)"
|
||||
>申请退款</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -378,7 +378,7 @@
|
||||
<view
|
||||
v-if="order.isDrawOrder > 0"
|
||||
class="bnt service"
|
||||
@click.stop="callMerPhone(order)"
|
||||
@click.stop="callMerPhone(orderListIndex)"
|
||||
>联系客服
|
||||
</view>
|
||||
<view>
|
||||
@@ -389,18 +389,18 @@
|
||||
parseInt(order._status._type) !== 9
|
||||
"
|
||||
class="bnt service"
|
||||
@click="goRoom(order)"
|
||||
@click="goRoom(orderListIndex)"
|
||||
>联系商家</view>
|
||||
</view>
|
||||
<view class="v12-justify-between">
|
||||
<view
|
||||
class="bnt service"
|
||||
@click="goOrderDetails(order)"
|
||||
@click="goOrderDetails(orderListIndex)"
|
||||
v-if="[-1, -2, -3].includes(parseInt(order._status._type))"
|
||||
>查看详情</view>
|
||||
<view
|
||||
class="bnt service"
|
||||
@click="delOrder(order)"
|
||||
@click="delOrder(orderListIndex)"
|
||||
v-if="[9].includes(parseInt(order._status._type))"
|
||||
>删除订单</view>
|
||||
</view>
|
||||
@@ -411,61 +411,61 @@
|
||||
<template v-if="parseInt(order._status._type) === 0">
|
||||
<view
|
||||
class="bnt cancelBnt v12-dark-text v12-dark-border"
|
||||
@click="cancelOrder(order)"
|
||||
@click="cancelOrder(orderListIndex)"
|
||||
>取消订单</view>
|
||||
<view
|
||||
v-if="order.isTravelGroup === 0 && order.isDrawOrder === 0"
|
||||
class="bnt cancelBnt v12-dark-text v12-dark-border"
|
||||
@click="addressTap(order)"
|
||||
@click="addressTap(orderListIndex)"
|
||||
>修改地址</view>
|
||||
<view
|
||||
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
|
||||
@click="subscribePay(order)"
|
||||
@click="subscribePay(orderListIndex)"
|
||||
>立即付款</view>
|
||||
</template>
|
||||
<template v-if="parseInt(order._status._type) === 1 && order.isTickets === 0">
|
||||
<view
|
||||
v-if="order.isTravelGroup === 1"
|
||||
class="bnt service"
|
||||
@click="editTime(order)"
|
||||
@click="editTime(orderListIndex)"
|
||||
>{{ '修改时间' }}</view>
|
||||
<view
|
||||
v-if="order.isTravelGroup === 1"
|
||||
class="bnt service"
|
||||
@click="applyRefund(order)"
|
||||
@click="applyRefund(orderListIndex)"
|
||||
>{{ '申请退款' }}</view>
|
||||
<view
|
||||
v-if="canShowModifyAddress(order) && order.isDrawOrder === 0"
|
||||
class="bnt service"
|
||||
@click="addressTap(order)"
|
||||
@click="addressTap(orderListIndex)"
|
||||
>修改地址</view>
|
||||
<view
|
||||
class="bnt service"
|
||||
:class="{'v12-primary-text v12-primary-border': order.isTravelGroup === 1}"
|
||||
@click="goOrderDetails(order)"
|
||||
@click="goOrderDetails(orderListIndex)"
|
||||
>{{ order.isTravelGroup === 0 ? '查看详情' : '查看券码' }}</view>
|
||||
</template>
|
||||
<template v-if="parseInt(order._status._type) === 1 && order.isTickets === 1">
|
||||
<view
|
||||
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
|
||||
@click="goOrderDetails(order)"
|
||||
@click="goOrderDetails(orderListIndex)"
|
||||
>立即核销</view>
|
||||
</template>
|
||||
<template v-if="parseInt(order._status._type) === 2 && order.isTickets === 0 && order.isTravelGroup === 1">
|
||||
<view
|
||||
v-if="order.isTravelGroup === 1"
|
||||
class="bnt service"
|
||||
@click="editTime(order)"
|
||||
@click="editTime(orderListIndex)"
|
||||
>{{ '修改时间' }}</view>
|
||||
<view
|
||||
v-if="order.isTravelGroup === 1"
|
||||
class="bnt service"
|
||||
@click="applyRefund(order)"
|
||||
@click="applyRefund(orderListIndex)"
|
||||
>{{ '申请退款' }}</view>
|
||||
<view
|
||||
class="bnt service"
|
||||
:class="{'v12-primary-text v12-primary-border': order.isTravelGroup === 1}"
|
||||
@click="goOrderDetails(order)"
|
||||
@click="goOrderDetails(orderListIndex)"
|
||||
>{{ order.isTravelGroup === 0 ? '查看详情' : '查看券码' }}</view>
|
||||
</template>
|
||||
<template v-if="parseInt(order._status._type) === 2 && order.isTickets === 0 && order.isTravelGroup === 0">
|
||||
@@ -477,23 +477,23 @@
|
||||
</view>
|
||||
<view
|
||||
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
|
||||
@click="takeOrder(order)"
|
||||
@click="takeOrder(orderListIndex)"
|
||||
>确认收货</view>
|
||||
</template>
|
||||
<template v-if="parseInt(order._status._type) === 3 && order.isTravelGroup === 0">
|
||||
<view
|
||||
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
|
||||
@click="goOrderDetails(order)"
|
||||
@click="goOrderDetails(orderListIndex)"
|
||||
>去评价</view>
|
||||
</template>
|
||||
<template v-if="parseInt(order._status._type) === 3 && order.isTravelGroup === 1">
|
||||
<view
|
||||
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
|
||||
@click="goOrderDetails(order)"
|
||||
@click="goOrderDetails(orderListIndex)"
|
||||
>去评价</view>
|
||||
</template>
|
||||
<template v-if="parseInt(order._status._type) === 4">
|
||||
<view class="bnt service" @click="goOrderDetails(order)">查看订单</view>
|
||||
<view class="bnt service" @click="goOrderDetails(orderListIndex)">查看订单</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
@@ -505,7 +505,7 @@
|
||||
<view
|
||||
v-if="order.merName && order.isGiftCardReceiveBlind === 0"
|
||||
class="bnt btn-service flex jc-center ai-center v12-font-24"
|
||||
@click="goRoom(order)"
|
||||
@click="goRoom(orderListIndex)"
|
||||
>联系商家
|
||||
</view>
|
||||
<view class="v12-align-center">
|
||||
@@ -519,14 +519,14 @@
|
||||
"
|
||||
open-type="share"
|
||||
class="gift-btn service v12-primary-text v12-primary-border"
|
||||
@click="shareGift(order)"
|
||||
@click="shareGift(orderListIndex)"
|
||||
>送给朋友</button>
|
||||
<button
|
||||
v-if="Number(order.status) === 0"
|
||||
class="gift-btn service v12-primary-text v12-primary-border"
|
||||
@click="subscribePay(order)"
|
||||
@click="subscribePay(orderListIndex)"
|
||||
>立即支付</button>
|
||||
<view class="bnt service" @click="goOrderDetails(order)">查看详情</view>
|
||||
<view class="bnt service" @click="goOrderDetails(orderListIndex)">查看详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -930,12 +930,28 @@ export default {
|
||||
uni.hideLoading();
|
||||
})
|
||||
},
|
||||
editTime(order) {
|
||||
editTime(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.showDatePicker = true
|
||||
this.travelGroupOrderInfo = order.travelGroupOrderInfo
|
||||
this.orderInfo = order
|
||||
},
|
||||
applyRefund(order) {
|
||||
applyRefund(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// 这里可以添加申请退款的逻辑,比如跳转到退款页面
|
||||
uni.navigateTo({
|
||||
url: '/pkg_product/views/sojoumOrderRefund?id=' + order.orderId
|
||||
@@ -951,8 +967,16 @@ export default {
|
||||
}
|
||||
return timeMap[type]
|
||||
},
|
||||
shareGift(item) {
|
||||
this.giftItem = item
|
||||
shareGift(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.giftItem = order
|
||||
},
|
||||
getGiftTips(giftCardInfo) {
|
||||
// giftCardStatus int 礼品卡状态 0-未领取 1-已领取 2-已失效
|
||||
@@ -983,12 +1007,30 @@ export default {
|
||||
})
|
||||
this.$forceUpdate()
|
||||
},
|
||||
delOrder(order) {
|
||||
getOrderByIndex(orderOrIndex) {
|
||||
if (typeof orderOrIndex === 'number') {
|
||||
return this.orderList[orderOrIndex]
|
||||
}
|
||||
if (typeof orderOrIndex === 'string' && /^\d+$/.test(orderOrIndex)) {
|
||||
return this.orderList[Number(orderOrIndex)]
|
||||
}
|
||||
return orderOrIndex
|
||||
},
|
||||
delOrder(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
delOrderHandle(order.orderId).then(() => {
|
||||
this.changeType()
|
||||
})
|
||||
},
|
||||
goStore(order) {
|
||||
goStore(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
return
|
||||
}
|
||||
@@ -1070,14 +1112,30 @@ export default {
|
||||
this.toYuePay(payPwd)
|
||||
this.isShowPayPwdPop = false
|
||||
},
|
||||
subscribePay(order) {
|
||||
subscribePay(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.orderInfo = order
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: settings.SubscribeMessageTmplIds,
|
||||
complete: () => this.pay = true
|
||||
})
|
||||
},
|
||||
addressTap(order) {
|
||||
addressTap(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this._orderId = order.orderId
|
||||
uni.setStorageSync('updateOrderSourceAddress', {
|
||||
id: order.addressId || order.userAddressId || '',
|
||||
@@ -1095,7 +1153,8 @@ export default {
|
||||
force2Decimal(v) {
|
||||
return this.$force2Decimal(v)
|
||||
},
|
||||
callMerPhone(order) {
|
||||
callMerPhone(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
const phone = String((order && order.merPhone) || '').trim()
|
||||
if (!phone) {
|
||||
uni.showToast({
|
||||
@@ -1108,10 +1167,17 @@ export default {
|
||||
phoneNumber: phone
|
||||
})
|
||||
},
|
||||
goRoom(order) {
|
||||
console.log(order);
|
||||
goRoom(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (order.experienceOrderInfo) {
|
||||
const phone = order.merchantPhone || order.merPhone || order.experienceOrderInfo.phone || order.companyTel;
|
||||
const phone = order.merchantPhone || order.merPhone || order.experienceOrderInfo.phone || order.companyTel
|
||||
if (phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
@@ -1142,7 +1208,15 @@ export default {
|
||||
url: `/pkg_common/views/room?id=${order.merId}&name=${order.merName}¶ms=${JSON.stringify(params)}`
|
||||
})
|
||||
},
|
||||
goRefund(order) {
|
||||
goRefund(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// fix bug#1631
|
||||
if (this.type === 4 || parseInt(order._status._type) === 3) {
|
||||
// 打开售后的目的就是开启已完成/待评价订单的退款功能,确认打开售后之后,小程序用户再点击申请退款,就可以进入退款申请填写页面,正常走退款流程,提交退款申请以后,订单状态变为退款中
|
||||
@@ -1164,7 +1238,15 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
goLogistics(order) {
|
||||
goLogistics(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$yrouter.push({
|
||||
path: "/pagesOrder/order/Logistics/index",
|
||||
query: {
|
||||
@@ -1172,7 +1254,15 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
goOrderDetails(order) {
|
||||
goOrderDetails(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (order.experienceOrderInfo) {
|
||||
this.$yrouter.push({
|
||||
path: "/pkg_product/views/experienceCouponOrderDetail",
|
||||
@@ -1238,7 +1328,15 @@ export default {
|
||||
this.orderData = res.data
|
||||
})
|
||||
},
|
||||
takeOrder(order) {
|
||||
takeOrder(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
const that = this
|
||||
uni.showModal({
|
||||
title: '是否确认收货?',
|
||||
@@ -1369,7 +1467,11 @@ export default {
|
||||
uni.hideLoading()
|
||||
});
|
||||
},
|
||||
tapShowMore(order, index) {
|
||||
tapShowMore(index) {
|
||||
const order = this.getOrderByIndex(index)
|
||||
if (!order) {
|
||||
return
|
||||
}
|
||||
order.showMore = !order.showMore;
|
||||
this.$set(this.orderList, index, order);
|
||||
},
|
||||
@@ -1409,7 +1511,15 @@ export default {
|
||||
}
|
||||
return status
|
||||
},
|
||||
cancelOrder(order) {
|
||||
cancelOrder(orderOrIndex) {
|
||||
const order = this.getOrderByIndex(orderOrIndex)
|
||||
if (!order) {
|
||||
uni.showToast({
|
||||
title: '订单信息异常',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
cancelOrderHandle(order.orderId).then(() => {
|
||||
this.getOrderData();
|
||||
this.orderList.splice(this.orderList.indexOf(order), 1)
|
||||
|
||||
Reference in New Issue
Block a user