emis-app/components/buns-locus-pos/buns-locus-pos.vue
2024-05-23 15:21:41 +08:00

82 lines
1.5 KiB
Vue

<template>
<view>
<u-steps direction="column" activeColor="#969799">
<u-steps-item v-for="(item, index) in filDataList"
>
<template v-slot:icon>
<u-image width="60" height="60" :src="getCdnUrl(`${current == index + 1?'post/hwu-check.png':'post/hwu-un.png'}`)"></u-image>
</template>
<template v-slot:title>
<view class="clr-sub pl-20">
{{item.time}}
</view>
</template>
<template v-slot:desc>
<view class="kydec mt-10 pl-20">
{{item.content}}
</view>
</template>
</u-steps-item>
</u-steps>
<tpx-empty v-if="filDataList.length == 0" size="sm"></tpx-empty>
</view>
</template>
<script>
import * as apiService from "@/common/api"
export default {
// computed: {
// filDataList() {
// return []
// },
// },
props: {
list: {
default () {
return []
}
},
billCode: {
default () {
return ''
}
},
current: {
default () {
return 1
}
}
},
data() {
return {
filDataList: this.list
}
},
created() {
this.initData()
},
onHide() {
},
unmounted() {},
methods: {
async initData(){
if(this.billCode) {
const res = await apiService.queryWaybillTraceInfo({trackingNo: this.billCode})
this.filDataList = res?.data?.[0]?.steps || []
}
}
}
}
</script>
<style scoped lang="scss">
.kydec{
padding: 20rpx;
background: #F6F6F6;
border-radius: 20rpx;
word-wrap: break-word;
width: 580rpx;
}
</style>