Commit ccf1f733 by 李伟康

```

fix(delivery-management): 修复交付流程中的样式和逻辑问题

- 修复 CustomerInfo 组件中导航栏定位问题,增加 top: 0 样式
- 在 Step2 组件中请求失败时隐藏 loading 提示
- 修正 Step3 组件类名错误,从 step-2 改为 step-3
- 更新提车时间字段展示为 pickUpTime
- 优化 DeliverySteps 步骤切换动画与视图控制逻辑
- 增加 refresh 方法以刷新订单详情并触发列表更新事件
- 监听 refreshDeliveryList 事件以重新加载交付管理列表数据
```
1 parent 300a2193
......@@ -377,6 +377,7 @@ export default {
animation: left-in 0.25s forwards;
.nav-bar {
width: 100%;
top: 0;
height: toRpx(96);
z-index: 9;
text-align: center;
......
......@@ -130,6 +130,7 @@ export default {
}
})
} catch (error) {
uni.hideLoading()
return uni.showToast({
title: error,
icon: 'none'
......@@ -174,6 +175,8 @@ export default {
<style scoped lang="scss">
.step-2 {
position: relative;
z-index: 2;
margin: 0 toRpx(48);
.box {
border-radius: toRpx(16);
......
<template>
<view class="step-2">
<view class="step-3">
<view class="upload-box box">
<view class="title">
交付照片
......@@ -30,7 +30,7 @@
<view class="sprite-icon icon-delivery-step-2"></view>
<view class="info">
客户提车确认
<view class="des">提车时间:{{detail.scheduledTime}}</view>
<view class="des">提车时间:{{detail.pickUpTime}}</view>
</view>
<view class="btn flex">已提车</view>
</view>
......@@ -67,7 +67,7 @@ export default {
</script>
<style scoped lang="scss">
.step-2 {
.step-3 {
margin: 0 toRpx(48);
.box {
border-radius: toRpx(16);
......
......@@ -7,7 +7,9 @@
<view class="step-component">
<template v-for="(i,index) in stepList">
<view
:class="['step-view',{showView: index + 1 == step}]"
:class="['step-view',
{'animation-view': viewClass(index) && !viewComplete[index + 1]},
{'show-view':index + 1 == step}]"
:key="index"
>
<component
......@@ -36,16 +38,16 @@ export default {
Step2,
Step3
},
props:{
detail:{
props: {
detail: {
type: Object,
default: () => {
return {}
}
},
},
watch:{
detail:{
watch: {
detail: {
handler (val) {
this.step = Number(val.orderStatus) + 1
},
......@@ -61,15 +63,26 @@ export default {
'交付中',
'交付完成'
],
viewComplete: {
1: false,
2: false,
3: false
}
}
},
mounted () {
},
methods: {
comfirm (step) {
const {id} = this.detail
const { id } = this.detail
this.step = step + 1
if(this.step ==3) this.$emit('refresh',id)
if (this.step == 3) this.$emit('refresh', id)
},
viewClass (index) {
setTimeout(() => {
this.viewComplete[this.step] = true
}, 1e3)
return index + 1 == this.step
}
}
}
......@@ -91,11 +104,15 @@ export default {
left: 0;
visibility: hidden;
}
.showView {
.animation-view {
position: absolute;
z-index: 1;
visibility: visible;
animation: to-right 0.25s forwards;
animation: to-right 0.15s forwards;
}
.show-view {
z-index: 1;
visibility: visible;
}
@keyframes to-right {
0% {
......
......@@ -14,7 +14,7 @@
<delivery-steps
:detail="detail"
@openError="openError"
@refresh="getDeliveryOrderDetail"
@refresh="refresh"
></delivery-steps>
</view>
<NoticePopup
......@@ -116,6 +116,10 @@ export default {
if (this.detail.orderStatus != 2) this.$refs.backNotice.open()
else uni.navigateBack()
},
refresh(id){
this.getDeliveryOrderDetail(id)
uni.$emit('refreshDeliveryList')
}
}
}
</script>
......
......@@ -187,6 +187,9 @@ export default {
uni.$track.add({
eventCode: 'app_delivery_management'
})
uni.$on('refreshDeliveryList', () => {
this.search()
})
},
methods: {
async getDeliveryOrderPageList (currentPage, pageSize) {
......@@ -227,7 +230,7 @@ export default {
tabBarClick (index) {
if (this.tabIndex == index) return
this.tabIndex = index
this.$refs.paging?.reload()
this.search()
},
search () {
this.getDeliveryOrderListCount()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!