Compare commits

...

10 Commits

Author SHA1 Message Date
air
1c024d619d 【类 型】:feat
【原  因】:
【过  程】:详情框 退款cell 退款说明cell 联系客服按钮
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 23:11:27 +08:00
air
353aa1bb66 【类 型】:factor
【原  因】:详情复框 改公用组件
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 23:08:45 +08:00
air
e87be8ab3c 【类 型】:factor
【原  因】:新的样式
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 23:08:13 +08:00
air
e45f370794 【类 型】:test
【原  因】:
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 23:07:54 +08:00
air
d157f16dfb 【类 型】:test
【原  因】:
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 23:07:36 +08:00
air
4610d047e5 【类 型】:factor
【原  因】:右箭头 通过参数控制 可隐藏
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 23:07:14 +08:00
air
34ea568ea5 【类 型】:feat
【原  因】:详情复框 组件
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 23:06:28 +08:00
air
e203cd679d 【类 型】:feat
【原  因】:订单状态时间轴组件 实现
【过  程】:订单的时间列表 和 订单类型判断 实现时间轴
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 21:41:27 +08:00
air
f1406d6c42 【类 型】:feat
【原  因】:订单详情里面的 时间线组件
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-20 18:32:00 +08:00
air
b0366a6546 【类 型】:feat
【原  因】:
【过  程】:退款流程详情页面
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-16 14:48:40 +08:00
9 changed files with 420 additions and 91 deletions

33
App.vue
View File

@ -54,12 +54,12 @@
.r {
float: right;
}
.pr{
.pr {
position: relative;
}
.pa{
.pa {
position: absolute;
}
@ -70,18 +70,21 @@
.fr {
text-align: right;
}
.animation {
transition: all 0.2s ease;
transition: all 0.2s ease;
}
//
.extra-space {
height: 156rpx;
}
//
.extra-space1 {
height: 400rpx;
}
//
.extra-space2 {
height: 200rpx;
@ -91,12 +94,13 @@
weight: 40rpx;
height: 40rpx;
}
//
.numberBut {
width: 130rpx;
height: 48rpx;
}
.nullBut {
width: 159rpx;
height: 48rpx;
@ -126,6 +130,10 @@
background-color: #888;
}
.bg-mb {
background-color: $uni-text-color-disable;
}
.bg-b {
background-color: #383838;
}
@ -299,7 +307,8 @@
.fb {
font-weight: bold;
}
.fn{
.fn {
font-weight: normal;
}
@ -311,6 +320,10 @@
line-height: 1.2em;
}
.fz20 {
font-size: 20rpx;
}
.fz24 {
font-size: 24rpx;
}
@ -336,11 +349,11 @@
}
.fcb {
color: $uni-text-color-disable
color: $uni-text-color-disable;
}
.fcm {
color: $uni-color-error
color: $uni-color-error;
}
.z-top {

View File

@ -6,7 +6,7 @@
</view>
<view class="fcb fz28 flex mac">
<view class="fz28" :class="conClass">{{cellCon}}</view>
<u-icon name="arrow-right" size="28rpx"></u-icon>
<u-icon name="arrow-right" size="28rpx" v-if='isRightIcon'></u-icon>
</view>
</view>
</template>
@ -36,6 +36,11 @@
required: {
type: Boolean,
default: false
},
//
isRightIcon: {
type: Boolean,
default: true
}
},
methods: {

View File

@ -0,0 +1,82 @@
<template>
<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">{{tit}}</view>
<view class="fcb fz24 l-h-12">订单号{{order.order_sn}}</view>
</view>
<view class="m-t-24 flex msb">
<view class="flex3 ofh">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="scroll-view-item_H m-r-12" v-for="(ps,index) in order.product_snapshot" :key="index">
<u--image :src="ps.spu_photo[0]" width="147rpx" height="110rpx" radius="4rpx" />
</view>
</scroll-view>
</view>
<view class="flex1 fcb fz24 flex mr md">
{{order.total_num}}
</view>
</view>
<view class="fz28 borderBDas p-b-12 p-t-12" v-if="order!==null">
<view class="flex msb l-h-18">
<view>商品小计</view>
<view>¥{{order.total_price | formatPrice}}</view>
</view>
<view class="flex msb l-h-18">
<view>外送费</view>
<view>¥{{order.transport_price | formatPrice}}</view>
</view>
<view class="flex msb l-h-18">
<view>打包服务费</view>
<view>¥{{order.pack_price | formatPrice}}</view>
</view>
</view>
<view class="flex mr mac l-h-18 m-t-24">
<view class="fcb fz24">合计</view>
<view class="m-l-12 fz36 fb" v-if="fullPrice!==null">¥{{fullPrice | formatPrice}}</view>
</view>
</view>
</template>
<script>
import {
formatPrice
} from '@/utils/index.js'
export default {
name: "orderCon",
data() {
return {
}
},
props: {
tit: {
type: String
},
order: {
type: Object
}
},
filters: {
formatPrice, //
},
methods: {
formatPrice, //
},
computed: {
//
fullPrice() {
if (this.order) {
return this.formatPrice(Number(this.order.transport_price) + Number(this.order.pack_price) + Number(
this.order.total_price))
} else {
return 0
}
}
}
}
</script>
<style>
</style>

View File

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

View File

@ -0,0 +1,138 @@
<template>
<view>
<!-- 时间线 -->
<view class="processBox">
<!-- 背景 线 -->
<view class="flex mac processRc h0" :style="{ width: `calc(100% - ${100 / processList.length}%)` }">
<view v-for='index in processList.length-1' :key="index" class="flex1 processLine"
:class="processList[index+1] ? 'bg-m' : 'bg-mb'"></view>
</view>
<!-- 背景 -->
<view class="flex mac msb processRc h36" :style="{ width: `calc(100% - ${100 / processList.length}%)` }">
<view v-for="(item, index) in processList" :key="index" class="rad-c"
:class="[processList[index] ? 'bg-m' : 'bg-mb', index === lastNonEmptyIndex ? 'wh40' : 'wh20']">
<u-icon name="checkbox-mark" size="40rpx" color="#fff" v-if="lastNonEmptyIndex ===index"></u-icon>
</view>
</view>
</view>
<!-- 时间线描述 -->
<view class="flex m-t-12">
<template v-if='processType ==="申请中" || processType ==="已同意"'>
<view class="flex1 flex mc mac column" :class="lastNonEmptyIndex===0?'':'fcb'">
<view class="fz28">申请退款</view>
<view class="fz20">{{ formatTime(processList[0]) }}</view>
</view>
<view class="flex1 flex mc mac column" :class="lastNonEmptyIndex===1?'':'fcb'">
<view class="fz28">{{ processList[1]?'卖家已同意':'等待卖家处理' }}</view>
<view class="fz20">{{ processList[1]?formatTime(processList[1]) : '&nbsp;' }}
</view>
</view>
<view class="flex1 flex mc mac column" :class="lastNonEmptyIndex===2?'':'fcb'">
<view class="fz28">退款成功</view>
<view class="fz20">{{ processList[2]?formatTime(processList[2]) : '&nbsp;' }}
</view>
</view>
</template>
<template v-if='processType ==="主动退"'>
<view class="flex1 flex mc mac column" :class="lastNonEmptyIndex===0?'':'fcb'">
<view class="fz28">卖家取消订单</view>
<view class="fz20">{{ formatTime(processList[0]) }}</view>
</view>
<view class="flex1 flex mc mac column" :class="lastNonEmptyIndex===1?'':'fcb'">
<view class="fz28">已退款</view>
<view class="fz20">{{ processList[1]?formatTime(processList[1]) : '&nbsp;' }}
</view>
</view>
</template>
<template v-if='processType ==="拒绝退"'>
<view class="flex1 flex mc mac column" :class="lastNonEmptyIndex===0?'':'fcb'">
<view class="fz28">申请退款</view>
<view class="fz20">{{ formatTime(processList[0]) }}</view>
</view>
<view class="flex1 flex mc mac column" :class="lastNonEmptyIndex===1?'':'fcb'">
<view class="fz28">卖家拒绝退款</view>
<view class="fz20">{{ processList[1]?formatTime(processList[1]) : '&nbsp;' }}
</view>
</view>
</template>
</view>
</view>
</template>
<script>
import {
parseTime,
formatPrice
} from '@/utils/index.js'
export default {
name: "process",
data() {
return {
}
},
created() {},
props: {
processList: {
type: Array,
deep: true
},
processType: {
type: String
}
},
computed: {
//
lastNonEmptyIndex() {
//
for (let i = this.processList.length - 1; i >= 0; i--) {
//
if (this.processList[i] !== '' && this.processList[i] !== null) {
return i;
}
}
return -1; // -1
}
},
methods: {
formatTime(time) {
return parseTime(time, '{m}-{d} {h}:{i}')
}
}
}
</script>
<style lang="scss" scoped>
.processBox {
height: 60rpx;
}
.processLine {
height: 2rpx;
}
.processRc {
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.h0 {
height: 0rpx;
}
.h30 {
height: 30rpx;
}
.wh20 {
width: 20rpx;
height: 20rpx;
}
.wh40 {
width: 40rpx;
height: 40rpx;
}
</style>

View File

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

118
pages/order/refProcess.vue Normal file
View File

@ -0,0 +1,118 @@
<template>
<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 v-if="processList" :processList="processList" :processType='processType'></process>
</view>
<!-- 退款金额cell -->
<cell :cellTit='order.refund_status ==="主动退" ? "退款金额":"申请退款金额"' conClass="fcm" :cellCon="refundPrice"
:isRightIcon='false'></cell>
<!-- 退款说明cell -->
<cell cellTit="退款说明" :cellCon="refundRemark | truncate(8)" :isRightIcon='false'>
</cell>
<!-- 订单详情 -->
<orderCon tit='订单详情' :order='order'></orderCon>
<!-- 按钮 -->
<view class="m-l-24 m-r-24 m-t-24 flex mr">
<view class="nullBut border fcb rad8 fz28 flex mac mc" @click="callPhone(shopCon.tel)">
联系客服
</view>
</view>
</view>
</template>
<script>
import {
formatPrice,
truncate,
callPhone
} from '@/utils/index.js'
export default {
data() {
return {
order_sn: '', //]
}
},
onLoad(options) {
this.order_sn = options.order_sn //
},
methods: {
callPhone
},
filters: {
formatPrice, //
truncate
},
computed: {
//退
refundRemark() {
if (this.order) {
return this.order.refund_remark
} else {
return null
}
},
//退 ps:退 退 退
refundPrice() {
if (this.order) {
if (this.order.refund_price) {
return '¥' + String(this.order.refund_price)
} else {
return '¥' + String(this.order.apply_price)
}
} else {
return null
}
},
//
order() {
if (this.order_sn) {
return this.$store.state.orderList.find(item => item.order_sn === this.order_sn)
} else {
return null
}
},
//退线
processList() {
if (this.order) {
if (this.order.refund_status === '主动退') {
return [this.order.refundagree_time, this.order.refunded_time]
} else if (this.order.refund_status === '申请中' || this.order.refund_status === '已同意') {
return [this.order.refundapply_time, this.order.refundagree_time, this.order.refunded_time]
} else if (this.order.refund_status === '拒绝退') {
return [this.order.refundapply_time, this.order.rejected_time]
} else {
return null
}
} else {
return null
}
},
//线
processType() {
if (this.order) {
return this.order.refund_status
} else {
return null
}
},
//
shopCon() {
return this.$store.state.shopCon
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -7,43 +7,7 @@
</view>
</u-navbar>
<!-- 申请订单 -->
<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">申请订单</view>
<view class="fcb fz24 l-h-12">订单号{{order_sn}}</view>
</view>
<view class="m-t-24 flex msb">
<view class="flex3 ofh">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="scroll-view-item_H m-r-12" v-for="(ps,index) in order.product_snapshot"
:key="index">
<u--image :src="ps.spu_photo[0]" width="147rpx" height="110rpx" radius="4rpx" />
</view>
</scroll-view>
</view>
<view class="flex1 fcb fz24 flex mr md">
{{order.total_num}}
</view>
</view>
<view class="fz28 borderBDas p-b-12 p-t-12" v-if="order!==null">
<view class="flex msb l-h-18">
<view>商品小计</view>
<view>¥{{order.total_price | formatPrice}}</view>
</view>
<view class="flex msb l-h-18">
<view>外送费</view>
<view>¥{{order.transport_price | formatPrice}}</view>
</view>
<view class="flex msb l-h-18">
<view>打包服务费</view>
<view>¥{{order.pack_price | formatPrice}}</view>
</view>
</view>
<view class="flex mr mac l-h-18 m-t-24">
<view class="fcb fz24">合计</view>
<view class="m-l-12 fz36 fb" v-if="fullPrice!==null">¥{{fullPrice | formatPrice}}</view>
</view>
</view>
<orderCon tit='申请订单' :order='order'></orderCon>
<!-- 退款金额cell -->
<cell cellTit="申请退款金额" :required="true" @click="handledrRefund_priceShow" conClass="fcm"
:cellCon="requestRefund_price?'¥'+ requestRefund_price:''"></cell>
@ -124,7 +88,6 @@
<script>
import {
parseTime,
formatPrice,
truncate,
callPhone
@ -243,13 +206,12 @@
}
},
filters: {
parseTime, //
formatPrice, //
truncate
},
watch: {},
computed: {
//
//
order() {
if (this.order_sn) {
return this.$store.state.orderList.find(item => item.order_sn === this.order_sn)

View File

@ -9,8 +9,8 @@ import store from '../store/index.js'
* @returns {string} 截取完的内容最后加省略号
*/
export function truncate(value, length = 5) {
if (!value) return '';
return value.length > length ? value.slice(0, length) + '...' : value;
if (!value) return ''
return value.length > length ? value.slice(0, length) + '...' : value
}
/**
* Parse the time to string