parent
9f2e57560d
commit
b451cc9f89
@ -1,67 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-model="state.visible" title="物流跟踪">
|
|
||||||
<div v-loading="state.loading" class="track-container">
|
|
||||||
<h3>
|
|
||||||
<span class="name">{{ state.info.companyName }}</span>
|
|
||||||
<span class="no">{{ state.info.trackingNo }}</span>
|
|
||||||
<el-button type="text" @click="$copy(`${state.info.companyName} ${state.info.trackingNo}`)">
|
|
||||||
复制
|
|
||||||
</el-button>
|
|
||||||
</h3>
|
|
||||||
<el-scrollbar max-height="50vh">
|
|
||||||
<el-timeline>
|
|
||||||
<el-timeline-item
|
|
||||||
v-for="(item, index) in state.info.logisticsDataList"
|
|
||||||
:key="index"
|
|
||||||
placement="top"
|
|
||||||
:timestamp="item.time"
|
|
||||||
>
|
|
||||||
{{ item.context }}
|
|
||||||
</el-timeline-item>
|
|
||||||
</el-timeline>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="close">关闭</el-button>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="jsx">
|
|
||||||
const store = useStore();
|
|
||||||
const opts = computed(() => store.state.order.opts);
|
|
||||||
if (!unref(opts).init) {
|
|
||||||
store.dispatch('order/load');
|
|
||||||
}
|
|
||||||
const state = reactive({
|
|
||||||
loading: false,
|
|
||||||
visible: false,
|
|
||||||
info: {
|
|
||||||
logisticsDataList: [],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const show = async (info) => {
|
|
||||||
state.visible = true;
|
|
||||||
Object.assign(state.info, info);
|
|
||||||
state.loading = false;
|
|
||||||
};
|
|
||||||
const close = () => {
|
|
||||||
state.visible = false;
|
|
||||||
};
|
|
||||||
defineExpose({
|
|
||||||
show,
|
|
||||||
close,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.track-container {
|
|
||||||
h3 {
|
|
||||||
margin-bottom: @layout-space;
|
|
||||||
.no {
|
|
||||||
margin: 0 @layout-space;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
Loading…
Reference in new issue