<template>
    <!-- 单据记录 预售仓单 订单汇总 -->
    <div class="topTableHeight">
        <a-table
            :columns="columns"
            class="srcollYTable expandLeftTable"
            :scroll="{ x: '100%', y: '190px' }"
            :pagination="false"
            :loading="loading"
            :expandedRowKeys="expandedRowKeys"
            :customRow="Rowclick"
            :expandIcon="expandIcon"
            :expandIconAsCell="false"
            rowKey="key"
            :data-source="tableList"
        ></a-table>
    </div>
</template>

<script lang="ts">
import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
import { queryTableList, BtnList, defineAsyncComponent, defineComponent, ModalEnum } from '@/common/export/commonTable';
import { queryWrPosition } from '@/services/go/wrtrade';
import { QueryWrPositionReq, WrPosition } from '@/services/go/wrtrade/interface';
import { getRecordItemTab } from '@/common/setup/order/orderData';
import { handleComposeOrderTable } from '@/common/setup/table/compose';
import { ComposeOrderTableParam } from '@/common/setup/table/interface';
import { expandIcon } from '@/common/setup/table/clolumn';
import { EnumRouterName } from '@/common/constants/enumRouterName';
export default defineComponent({
    name: EnumRouterName.search_pre_sale_warehouse_receipt_order_summary,
    setup() {
        // 表格列表数据
        const { loading, tableList, queryTable } = queryTableList<WrPosition>();
        // 获取列表数据
        const queryTableAction = () => {
            const param: QueryWrPositionReq = {
                haswr: 0,
                querytype: 2,
            };
            queryTable(queryWrPosition, param);
        };
        // 表格通用逻辑
        const param: ComposeOrderTableParam = {
            queryFn: queryTableAction,
            tableName: 'table_pcweb_spot_trade_bottom_pre_sale_order_summary',
            recordList: getRecordItemTab(),
        };
        return {
            ...handleComposeOrderTable<WrPosition>(param),
            loading,
            tableList,
            expandIcon,
        };
    },
});
</script>

<style lang="less">
</style>;
