<template>
  <!-- 定投价查询 -->
  <div class="platinum_fixed_investment_price_query_tab">
    <Filter @search="updateColumn" />
    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList">
      <!-- 商品名称 - 商品代码-->
      <template #goodsid="{ record }">
        <a>{{ record.goodsname + "-" +  record.goodscode }}</a>
      </template>
    </a-table>
  </div>
</template>

<script lang="ts">
import { EnumRouterName } from '@/common/constants/enumRouterName';
import { ComposeTableParam, defineComponent, handleComposeTable, queryTableList } from '@/common/export/commonTable';
import { queryReckonPriceLog } from '@/services/go/ermcp/qhj';
import { QhjReckonPriceLog } from '@/services/go/ermcp/qhj/interface';
import Filter from '../../compoments/filter/index.vue';

export default defineComponent({
  name: 'platinum_fixed_investment_price_query_tab',
  components: { Filter },
  setup() {
    // 表格列表数据
    const { loading, tableList, queryTable } = queryTableList<QhjReckonPriceLog>();
    const queryTableAction = () => {
      queryTable(queryReckonPriceLog);
    };
    // 表格通用逻辑
    const param: ComposeTableParam = {
      queryFn: queryTableAction,
      tableName: 'table_pcweb_qhj_fixed_investment_price_query',
    };

    return {
      ...handleComposeTable<QhjReckonPriceLog>(param),
      loading,
      tableList,
    };
  },
});
</script>