/*
 *@description:跳转详情
 *@author: hudw
 *@date: 2023-04-10 16:03:23

*/

<template>

    <orderView v-if="!componentName" ref="orderView" :showHeader="false" :st="1" :record="mainCurrent"></orderView>
    <component v-else ref="orderView" :is="componentName" />

</template>
<script>
import orderView from '@/blocks/components/orderView/index.orderView.vue';
import toPickUpGoods from '@/views/TMS/transportation/toPickUpGoods/index.vue';
import toDelivery from '@/views/TMS/transportation/toDelivery/index.vue';
import toRceiptNote from '@/views/TMS/transportation/toRceiptNote/index.vue';
import planOrder from '@/views/TMS/transportationPlan/planOrder';

let pl = {
  100: {
    name: 'toPickUpGoods',
    title: '未及时提货',
  },
  101: {
    name: 'toDelivery',
    title: '未及时送达',
  },
  102: {
    name: 'toRceiptNote',
    title: '未及时纸质回单',
  },
  planOrder: {
    name: 'planOrder',
    title: '运输计划单',
  },

};
export default {
  components: {
    orderView,
    toPickUpGoods,
    toDelivery,
    toRceiptNote,
    planOrder,
  },
  data() {
    let ms = pl[this.$route.query.messageType];
    const componentName = ms?.name ?? null;
    if (ms) {
      this.$route.meta.title = ms.title;
    }
    return {
      componentName,
    };
  },
  mounted() {
    if (!this.componentName) {
      this.$refs?.orderView?.getView(this.$route.query.shipbillId);
    }
  },
  computed: {
    mainCurrent() {
      return this.$route.query;
    },
  },

  methods: {},
};
</script>
<style lang='less'>
</style>