<template>
    <div>
        <div>
            <el-table :data="pager.lists" @selection-change="handleSelectionChange">
                <el-table-column label="订单号" prop="id" show-overflow-tooltip />
                <el-table-column label="商品信息" prop="status" show-overflow-tooltip width="400">
                    <template #default="{ row }">
                        <el-image :src="row.image" class="w-16 h-16" :preview-teleported="true"></el-image>
                        <div>{{ row.store_name }}</div>
                    </template>
                </el-table-column>
                <el-table-column label="发货时间" prop="id" show-overflow-tooltip />
            </el-table>
        </div>
        <div class="flex mt-4 justify-end"  v-if="pager.lists.length<pager.count">
            <pagination v-model="pager" @change="getLists" />
        </div>
    </div>
</template>

<script lang="ts" setup name="deliverTable">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiStoreOrderLists, apiStoreOrderDelete } from '@/api/store_order'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'

// 查询条件
const queryParams = reactive({
    order_id: '',
    pay_type: ''
})

// 获取字典数据
const { dictData } = useDictData('')

// 分页相关
const { pager, getLists, resetParams, resetPage } = usePaging({
    fetchFun: apiStoreOrderLists,
    params: queryParams
})

defineExpose({
    getLists
})


</script>
