<template>
  <div class="q-py-md">
    <CharteredBusOrderHeader></CharteredBusOrderHeader>
    <CharteredBusOrderList :OrderType="OrderType"></CharteredBusOrderList>
  </div>
</template>

<script lang="ts">
import { defineComponent, inject, provide, reactive, toRefs, onMounted, watch } from 'vue'
import { currentRouter } from 'src/router'
import useMetaModule from '../../module/meta/metaModule'
import { useI18n } from 'vue-i18n'
import CharteredBusOrderHeader from '../../components/CharteredBus/order/CharteredBusOrderHeader.vue'
import { DirtionmaryHelper } from 'src/config/dictionary'
import CharteredBusOrderList from '../../components/CharteredBus/order/CharteredBusOrderList.vue'

export default defineComponent({
  props:['type'],
  components: {CharteredBusOrderHeader, CharteredBusOrderList},
  setup(props) {
    let { setTitle } = useMetaModule()
    const { t } = useI18n()
    // const pageTitle = inject(DirtionmaryHelper.PAGE_TITLE_KEY) as any
    // pageTitle.value = t('v102.CharteredBus.pageTitle2')
    // setTitle(pageTitle.value)
    const search = reactive({
      OrderType: props.type,
      OrderId: '',
      OrderNo: '',
      SurName: '',
      Name: '',
      OrderStatus: 0,
      StartTime: '',
      EndTime: '',
      OrderSTime: '',
      OrderETime: '',
      ProductName: '',
      Mobile: '',//电话
    })
    // search.OrderId = currentRouter.currentRoute.value.params.orderId

    provide(DirtionmaryHelper.TICKET_ORDER_SEARCH, search)

    const data = reactive({
      OrderType: ''
    })
    watch(props, (n, o) => {
      data.OrderType = props.type
    })
    const methods = {}
    onMounted(() => {})
    return { ...toRefs(data), ...methods, search }
  }
})
</script>

<style></style>
