Files
2025-08-25 11:20:35 +08:00

394 lines
11 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="pagesContent">
<view class="navBack">
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
订单详情
</view>
<view class="">
<view class="flex alcenter ml15 mb10" v-if="orderdata.status == 0">
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/payment_.png" mode="">
</image>
<text class="ml10 ft22 ftw600 cl-333">待付款</text>
</view>
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 1">
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/distribution.png" mode="">
</image>
<text class="ml10 ft22 ftw600 cl-333">待发货</text>
</view>
<view class="flex alcenter ml15 mb10 " v-else-if="orderdata.status == 2">
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/deliver_goods.png" mode="">
</image>
<text class="ml10 ft22 ftw600 cl-333">已发货</text>
</view>
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 3">
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
</image>
<text class="ml10 ft22 ftw600 cl-333">已完成</text>
</view>
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 4">
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
</image>
<text class="ml10 ft22 ftw600 cl-333">已取消</text>
</view>
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 5">
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
</image>
<text class="ml10 ft22 ftw600 cl-333">已退款</text>
</view>
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 26">
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
</image>
<text class="ml10 ft22 ftw600 cl-333">兑换成功</text>
</view>
</view>
<view class="content">
<!-- 地址 -->
<view class="addressbox box pt16 pb16">
<view class="flex alcenter">
<image style="width: 40rpx; height: 40rpx;margin-left: 12rpx;"
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/address.png" mode=""></image>
<text class="ft14 ftw500 cl-333" style="padding-left: 18rpx;">{{orderdata.accept_name}}</text>
<text class="ft14 ftw500 cl-333 pl20">{{orderdata.accept_mobile}}</text>
<uni-icons type="right" size="18" color="#333333" style="margin-left: auto;"></uni-icons>
</view>
<view class="ft14 ftw500 cl-999" style="margin-left: 70rpx;margin-top: 12rpx;">
{{orderdata.accept_province}}{{orderdata.accept_city}}{{orderdata.accept_exp_area}}{{orderdata.accept_address}}
</view>
</view>
<!-- 商品信息 -->
<view class="messagebox box flex">
<view class=""></view>
<image style="width: 176rpx;height: 176rpx;border-radius: 14rpx;" :src="orderdata.cimage" mode="">
</image>
<view class="ml10 flex" style="width: 456rpx; flex-direction: column;justify-content: space-around">
<view class="text-over2 ftw500 cl-333" style="font-size: 30rpx;">{{orderdata.goods_name}}</view>
<view class="" style="color: #EF1857;">
<text class="ft20 ftw500">{{orderdata.total_amount}}</text>
<text class="ft14 ftw500" style="margin-left: 12rpx;">积分</text>
</view>
</view>
</view>
<!-- 商品信息选择 -->
<view class="message_select box ">
<view class="boxitem">
<view class="ft14 ftw5000 cl-333">商品总价</view>
<view class="ft14 ftw5000 " style="color: #EF1857;">{{orderdata.total_amount}}积分</view>
</view>
<view class="boxitem">
<view class="ft14 ftw5000 cl-333">总运费</view>
<view class="ft14 ftw5000 cl-333">{{orderdata.delivery_fee == 0.00 ? '免费': orderdata.delivery_fee }}
</view>
</view>
<view class="boxitem " v-if="orderdata.express_no !==''">
<view class="ft14 ftw5000 cl-333">物流单号</view>
<view class="ft14 ftw5000 cl-333 alcenter flex" style="line-height: 30rpx;">
<view class="" style="width: 380rpx; word-wrap:break-word;text-align: right;">
{{orderdata.express_no}}
</view>
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(orderdata.express_no)">
</image>
</view>
</view>
<view class="boxitem" v-if="orderdata.order_no !==''">
<view class="ft14 ftw5000 cl-333">订单编号</view>
<view class="ft14 ftw5000 cl-333 alcenter">{{orderdata.order_no}}
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(orderdata.order_no)"></image>
</view>
</view>
<view class="boxitem">
<view class="ft14 ftw5000 cl-333">支付方式</view>
<view class="ft14 ftw5000 cl-333">积分</view>
</view>
<view class="boxitem" v-if="orderdata.addtime !==''">
<view class="ft14 ftw5000 cl-333">下单时间</view>
<view class="ft14 ftw5000 cl-333">{{orderdata.addtime}}</view>
</view>
<view class="boxitem" v-if="orderdata.addtime !==''">
<view class="ft14 ftw5000 cl-333">备注</view>
<view class="ft14 ftw5000 cl-333">{{orderdata.remark}}</view>
</view>
</view>
</view>
<view class="bottom_button ">
<view class="bottom_button" v-if="orderdata.is_pay == 1 && orderdata.status == 2">
<view class="exchange practice" style="height: 80rpx;" @click="clickexchange">联系客服</view>
<view class="exchange button" @click="queren">确认收货</view>
</view>
<view class="bottom_button" v-else-if="orderdata.is_pay == 0">
<view class="exchange practice" style="height: 80rpx;" @click="clickexchange">联系客服</view>
<view class="exchange button" @click="getdeliveryOrder">立即兑换</view>
</view>
<view class="practices" @click="clickexchange" v-else-if="orderdata.is_pay == 1">联系客服</view>
</view>
<uni-popup type="center" ref="pointsyes">
<view class="pointsyesbox">
<view class="ft16" style="margin-top: 30rpx;">
<text>客服电话:</text>
<text>{{serviceInfo.service_mobile}}</text>
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(serviceInfo.service_mobile)">
</image>
</view>
<view class="button" style="margin-top: 92rpx;padding: 20rpx 0;" @click="navorder">确定</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
remark: "",
id: "",
orderdata: {},
serviceInfo: {}
}
},
onLoad(e) {
console.log(e);
this.id = e.id
this.getorderinfo()
this.getserviceInfo()
},
methods: {
navBack() {
uni.navigateBack(1);
},
//获取订单详情
getorderinfo() {
this.$httpRequest({
url: '/api/delivery/order/info',
methods: "POST",
data: {
order_id: this.id,
},
}).then(res => {
if (res.code == 1) {
console.log(res);
this.orderdata = res.data.info
}
}).catch(err => {
})
},
//支付订单
getdeliveryOrder() {
this.$httpRequest({
url: '/api/pay/deliveryOrder',
methods: "POST",
data: {
order_id: this.id,
},
}).then(res => {
if (res.code == 1) {
uni.showToast({
title: "商品兑换成功",
icon: 'none',
duration: 3000
})
this.getorderinfo()
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 3000
})
}
}).catch(err => {
})
},
getserviceInfo() { //app信息拿取电话
this.$httpRequest({
url: "/api/user/serviceInfo",
method: "GET"
}).then(res => {
this.serviceInfo = res.data;
})
},
queren() {
this.$httpRequest({
url: "/api/delivery/order/receive",
method: "POST",
data: {
order_id: this.id,
},
}).then(res => {
if (res.code == 1) {
uni.showToast({
title: "已确认收货",
icon: 'none',
duration: 3000
})
this.getorderinfo()
}
})
},
clickexchange() {
this.$refs.pointsyes.open()
},
navorder() {
this.$refs.pointsyes.close()
},
navaddress() {
uni.navigateTo({ //订单
url: '/pagesA/integral/address'
})
},
copy(value) {
uni.setClipboardData({
data: value, //要被复制的内容
});
}
}
}
</script>
<style scoped>
.pagesContent {
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
padding-top: 58rpx;
background-repeat: no-repeat;
background-size: 750rpx 356rpx;
/* height: 356rpx; */
background-color: #F7F8F9;
padding-bottom: 160rpx;
}
.navBack {
font-size: 32rpx;
color: #333333;
font-weight: 600;
text-align: center;
height: 120rpx;
line-height: 120rpx;
position: relative;
z-index: 1;
}
.backIcon {
position: absolute;
left: 16rpx;
top: 0rpx;
}
.content {
margin: 0 26rpx;
}
.addressbox {
height: 160rpx;
padding-right: 28rpx;
}
.messagebox {
padding: 22rpx 24rpx;
}
.message_select {}
.bottom_button {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 160rpx;
z-index: 1;
background: #ffffff;
display: flex;
justify-content: space-between;
}
.exchange {
margin: 16rpx 28rpx 0 28rpx;
line-height: 80rpx;
font-weight: 500;
font-size: 32rpx;
}
.button {
height: 80rpx;
width: 312rpx;
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
border-radius: 40rpx;
text-align: center;
color: #FFFFFF;
}
.pointsyesbox {
width: 500rpx;
height: 300rpx;
background-color: #fff;
border-radius: 24rpx;
text-align: center;
padding: 24rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.practice {
height: 80rpx;
width: 312rpx;
border-radius: 40rpx;
text-align: center;
color: #000000;
border: 2rpx solid #D8D8D8;
}
.practices {
height: 80rpx;
width: 100%;
border-radius: 40rpx;
border: 2rpx solid #D8D8D8;
text-align: center;
line-height: 80rpx;
margin: 14rpx 80rpx 0 80rpx;
}
.boxitem {
display: flex;
height: 120rpx;
line-height: 120rpx;
justify-content: space-between;
padding: 0 30rpx;
border-bottom: 2rpx solid #F7F8F9;
}
.box {
margin-bottom: 24rpx;
}
</style>