<template>
  <div class="fix-height-subpage column no-wrap q-pa-md">
    <trip-order-header></trip-order-header>
    <trip-order-list></trip-order-list>
  </div>
</template>

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

export default defineComponent({
  components: {TripOrderHeader, TripOrderList},
  setup(props) {
    let { setTitle } = useMetaModule()
    const { t } = useI18n()
    const pageTitle = inject(DirtionmaryHelper.PAGE_TITLE_KEY) as any
    pageTitle.value = t('v102.to.pageTitle')
    setTitle(pageTitle.value)
    let CustomerId
    if (Store.state && Store.state.user?.userDetail) {
      CustomerId = Store.state.user?.userDetail?.customerId
    }
    const search = reactive({
      orderType: -1,//1跟团订单
      queryDays: 10,//10天内
      orderState: 2,//订单状态
      CustomerId: CustomerId,//用户id
    })
    // search.OrderId = currentRouter.currentRoute.value.params.orderId

    provide(DirtionmaryHelper.TICKET_ORDER_SEARCH, search)
    const menu = inject(DirtionmaryHelper.MENU_KEYS) as any
    menu.value = 18

    const data = reactive({})
    const methods = {}
    onMounted(() => {})
    return { ...toRefs(data), ...methods, search }
  }
})
</script>

<style></style>
