<script lang="ts" setup>
import {appMerchantOrderDishListPost} from "@/service";
import dayjs from "dayjs";

const {t} = useI18n()

const {paging, dataList, loading, queryList, firstLoaded} = usePage((pageNum, pageSize) => {
  return appMerchantOrderDishListPost({
    body: {
      pageNum,
      pageSize,
      createBeginTime: dayjs().startOf('day').valueOf(),
      createEndTime: dayjs().endOf('day').valueOf(),
    }
  })
})
</script>

<template>
  <z-paging ref="paging" v-model="dataList" @query="queryList">
    <template #top>
      <navbar :title="t('navbar-reservation')"></navbar>
    </template>
    <view class="px-30rpx py-20rpx">
      <template v-for="item in dataList">
        <view class="mb-20rpx last:mb-0">
          <reservation-item :item="item" class="mb-16rpx last:mb-0rpx"></reservation-item>
        </view>
      </template>
    </view>
  </z-paging>
</template>

<style lang="scss" scoped>

</style>