【类 型】:feat

【原  因】:订单详情里面的 时间线组件
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
air 2025-01-20 18:32:00 +08:00
parent b0366a6546
commit f1406d6c42
6 changed files with 129 additions and 50 deletions

View File

@ -336,11 +336,11 @@
} }
.fcb { .fcb {
color: $uni-text-color-disable color: $uni-text-color-disable;
} }
.fcm { .fcm {
color: $uni-color-error color: $uni-color-error;
} }
.z-top { .z-top {

View File

@ -23,7 +23,8 @@
</view> </view>
</view> </view>
<view class="m-t-24 flex mr"> <view class="m-t-24 flex mr">
<navigator v-if="showPayButton" :url="`/pages/shop/pay?order_sn=${order.order_sn}&fullPrice=${fullPrice}`" hover-class="navigator-hover"> <navigator v-if="showPayButton" :url="`/pages/shop/pay?order_sn=${order.order_sn}&fullPrice=${fullPrice}`"
hover-class="navigator-hover">
<view class="nullBut bg-m fci rad8 fz28 flex mac mc"> <view class="nullBut bg-m fci rad8 fz28 flex mac mc">
立即支付 立即支付
</view> </view>
@ -31,14 +32,18 @@
<view v-if="showPickupNumber" class="numberBut bg-m fci rad8 fz28 fb flex mac mc m-l-24"> <view v-if="showPickupNumber" class="numberBut bg-m fci rad8 fz28 fb flex mac mc m-l-24">
{{ foodSn }} {{ foodSn }}
</view> </view>
<navigator v-if="showAfterSaleButton" class="m-l-24" :url="`/pages/order/refund?order_sn=${order.order_sn}`" hover-class="navigator-hover"> <navigator v-if="showAfterSaleButton" class="m-l-24" :url="`/pages/order/refund?order_sn=${order.order_sn}`"
hover-class="navigator-hover">
<view class="nullBut border fcb rad8 fz28 flex mac mc"> <view class="nullBut border fcb rad8 fz28 flex mac mc">
申请售后 申请售后
</view> </view>
</navigator> </navigator>
<view v-if="showRefundDetailsButton" class="nullBut border fcb rad8 fz28 flex mac mc m-l-24"> <navigator v-if="showRefundDetailsButton" class="m-l-24"
退款详情 :url="`/pages/order/refProcess?order_sn=${order.order_sn}`" hover-class="navigator-hover">
</view> <view class="nullBut border fcb rad8 fz28 flex mac mc">
退款详情
</view>
</navigator>
</view> </view>
</view> </view>
</template> </template>
@ -67,8 +72,9 @@
}, },
computed: { computed: {
// //
fullPrice(){ fullPrice() {
return this.formatPrice(Number(this.order.transport_price) + Number(this.order.pack_price) + Number(this.order.total_price)) return this.formatPrice(Number(this.order.transport_price) + Number(this.order.pack_price) + Number(this
.order.total_price))
}, },
// "" // ""
showPayButton() { showPayButton() {
@ -94,36 +100,37 @@
if (this.order.main_status === '已付款' && this.order.refund_status === '未申请') { if (this.order.main_status === '已付款' && this.order.refund_status === '未申请') {
return this.order.shipment_status; return this.order.shipment_status;
} }
switch (this.order.refund_status) { // 退退
case '申请中': if (this.order.main_status === '已退款') {
return '申请中'; return '已退款';
case '已同意':
return '商家同意退款';
case '主动退':
return '商家退单';
case '拒绝退':
return '商家拒绝退款';
default:
return '';
} }
},
// 退 // 退退
refundStatusDisplay() { if (this.order.main_status === '已付款') {
switch (this.order.refund_status) { if (this.order.refund_status === '已同意') {
case '申请中':
return '申请中';
case '已同意':
return '商家同意退款'; return '商家同意退款';
case '主动退': }
// 退退退
if (this.order.refund_status === '主动退') {
return '商家退单'; return '商家退单';
case '拒绝退': }
return '商家拒绝退款';
default:
return '';
} }
// 退
if (this.order.refund_status === '申请中') {
return '申请中';
}
if (this.order.refund_status === '拒绝退') {
return '商家拒绝退款';
}
//
return '';
}, },
}, },
methods:{ methods: {
formatPrice // formatPrice //
}, },
props: { props: {

View File

@ -0,0 +1,50 @@
<template>
<view class="processBox">
<!-- 背景 线 -->
<view class="flex mac"
style="height:0rpx; position: relative;top:50%;left:50%;transform: translate(-50%, -50%);width:66%">
<view class="bg-m flex1 processLine"></view>
<view class="bg-mg flex1 processLine"></view>
</view>
<!-- 背景 -->
<view class="flex mac"
style="height:36rpx; position: relative;top:50%;left:50%;transform: translate(-50%, -50%);width:66%">
<view class="flex1">
<view class="bg-m rad-c" style="width:18rpx;height:18rpx;"></view>
</view>
<view class="flex1 flex mse">
<view class="bg-m rad-c" style="width:18rpx;height:18rpx;"></view>
</view>
<view class="flex1 flex mr">
<view class="bg-m rad-c" style="width:38rpx;height:38rpx;"></view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "process",
data() {
return {
}
},
props: {
processList: {
type: Array,
deep: true
}
},
}
</script>
<style lang="scss" scoped>
.processBox {
height: 60rpx;
}
.processLine {
height: 2rpx;
}
</style>

View File

@ -2,8 +2,7 @@
"easycom": { "easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [ "pages": [{
{
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
@ -46,29 +45,27 @@
} }
}, },
{ {
"path" : "pages/main/login", "path": "pages/main/login",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path" : "pages/order/index", "path": "pages/order/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path" : "pages/order/refund", "path": "pages/order/refund",
"style" : "style": {
{
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path" : "pages/order/refProcess", "path": "pages/order/refProcess",
"style" : "style": {
{ "navigationStyle": "custom"
"navigationBarTitleText" : ""
} }
} }
], ],

View File

@ -1,6 +1,18 @@
<template> <template>
<view> <view>
<!-- topbar -->
<u-navbar title="退款详情" bgColor="#d43030" :titleStyle="{ color: '#FFF'}" :autoBack="true" placeholder>
<view class="u-nav-slot" slot="left">
<u-icon name="arrow-left" color="#fff" size="19"></u-icon>
</view>
</u-navbar>
<!-- 进度box -->
<view class="m-l-24 m-r-24 m-t-24 p-24 bg-w rad8 boxshadow">
<view class="m-b-24 borderBDas flex msb mub">
<view class="fb fz36 l-h-18">{{ order.refund_status !== "主动退"?"买家申请":"卖家取消订单" }}</view>
</view>
<!-- <process :processList="processList"></process> -->
</view>
</view> </view>
</template> </template>
@ -8,15 +20,28 @@
export default { export default {
data() { data() {
return { return {
order_sn: '', //
} }
}, },
onLoad(options) {
this.order_sn = options.order_sn //
},
methods: { methods: {
},
computed: {
//
order() {
if (this.order_sn) {
return this.$store.state.orderList.find(item => item.order_sn === this.order_sn)
} else {
return null
}
},
} }
} }
</script> </script>
<style> <style lang="scss" scoped>
</style> </style>

View File

@ -249,7 +249,7 @@
}, },
watch: {}, watch: {},
computed: { computed: {
// //
order() { order() {
if (this.order_sn) { if (this.order_sn) {
return this.$store.state.orderList.find(item => item.order_sn === this.order_sn) return this.$store.state.orderList.find(item => item.order_sn === this.order_sn)