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 { ...@@ -377,6 +377,7 @@ export default {
animation: left-in 0.25s forwards; animation: left-in 0.25s forwards;
.nav-bar { .nav-bar {
width: 100%; width: 100%;
top: 0;
height: toRpx(96); height: toRpx(96);
z-index: 9; z-index: 9;
text-align: center; text-align: center;
......
...@@ -130,6 +130,7 @@ export default { ...@@ -130,6 +130,7 @@ export default {
} }
}) })
} catch (error) { } catch (error) {
uni.hideLoading()
return uni.showToast({ return uni.showToast({
title: error, title: error,
icon: 'none' icon: 'none'
...@@ -174,6 +175,8 @@ export default { ...@@ -174,6 +175,8 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.step-2 { .step-2 {
position: relative;
z-index: 2;
margin: 0 toRpx(48); margin: 0 toRpx(48);
.box { .box {
border-radius: toRpx(16); border-radius: toRpx(16);
......
<template> <template>
<view class="step-2"> <view class="step-3">
<view class="upload-box box"> <view class="upload-box box">
<view class="title"> <view class="title">
交付照片 交付照片
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<view class="sprite-icon icon-delivery-step-2"></view> <view class="sprite-icon icon-delivery-step-2"></view>
<view class="info"> <view class="info">
客户提车确认 客户提车确认
<view class="des">提车时间:{{detail.scheduledTime}}</view> <view class="des">提车时间:{{detail.pickUpTime}}</view>
</view> </view>
<view class="btn flex">已提车</view> <view class="btn flex">已提车</view>
</view> </view>
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.step-2 { .step-3 {
margin: 0 toRpx(48); margin: 0 toRpx(48);
.box { .box {
border-radius: toRpx(16); border-radius: toRpx(16);
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
<view class="step-component"> <view class="step-component">
<template v-for="(i,index) in stepList"> <template v-for="(i,index) in stepList">
<view <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" :key="index"
> >
<component <component
...@@ -36,16 +38,16 @@ export default { ...@@ -36,16 +38,16 @@ export default {
Step2, Step2,
Step3 Step3
}, },
props:{ props: {
detail:{ detail: {
type: Object, type: Object,
default: () => { default: () => {
return {} return {}
} }
}, },
}, },
watch:{ watch: {
detail:{ detail: {
handler (val) { handler (val) {
this.step = Number(val.orderStatus) + 1 this.step = Number(val.orderStatus) + 1
}, },
...@@ -61,15 +63,26 @@ export default { ...@@ -61,15 +63,26 @@ export default {
'交付中', '交付中',
'交付完成' '交付完成'
], ],
viewComplete: {
1: false,
2: false,
3: false
}
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
comfirm (step) { comfirm (step) {
const {id} = this.detail const { id } = this.detail
this.step = step + 1 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 { ...@@ -91,11 +104,15 @@ export default {
left: 0; left: 0;
visibility: hidden; visibility: hidden;
} }
.showView { .animation-view {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
visibility: visible; visibility: visible;
animation: to-right 0.25s forwards; animation: to-right 0.15s forwards;
}
.show-view {
z-index: 1;
visibility: visible;
} }
@keyframes to-right { @keyframes to-right {
0% { 0% {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<delivery-steps <delivery-steps
:detail="detail" :detail="detail"
@openError="openError" @openError="openError"
@refresh="getDeliveryOrderDetail" @refresh="refresh"
></delivery-steps> ></delivery-steps>
</view> </view>
<NoticePopup <NoticePopup
...@@ -116,6 +116,10 @@ export default { ...@@ -116,6 +116,10 @@ export default {
if (this.detail.orderStatus != 2) this.$refs.backNotice.open() if (this.detail.orderStatus != 2) this.$refs.backNotice.open()
else uni.navigateBack() else uni.navigateBack()
}, },
refresh(id){
this.getDeliveryOrderDetail(id)
uni.$emit('refreshDeliveryList')
}
} }
} }
</script> </script>
......
...@@ -187,6 +187,9 @@ export default { ...@@ -187,6 +187,9 @@ export default {
uni.$track.add({ uni.$track.add({
eventCode: 'app_delivery_management' eventCode: 'app_delivery_management'
}) })
uni.$on('refreshDeliveryList', () => {
this.search()
})
}, },
methods: { methods: {
async getDeliveryOrderPageList (currentPage, pageSize) { async getDeliveryOrderPageList (currentPage, pageSize) {
...@@ -227,7 +230,7 @@ export default { ...@@ -227,7 +230,7 @@ export default {
tabBarClick (index) { tabBarClick (index) {
if (this.tabIndex == index) return if (this.tabIndex == index) return
this.tabIndex = index this.tabIndex = index
this.$refs.paging?.reload() this.search()
}, },
search () { search () {
this.getDeliveryOrderListCount() this.getDeliveryOrderListCount()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!