<template>
  <!-- 过滤仓库信息表格 -->
  <div class="filterTable">
    <FilterOption :selectList="selectList"
                  :inputList="inputList"
                  :fixedBtnList="fixedBtnList" />
    <slot></slot>
  </div>
</template>

<script lang="ts">
import FilterOption from '@/common/components/filter/index.vue';
import { defineComponent } from 'vue';
import { handleFilter, InputList, SelectList } from '@/common/setup/filter';

export default defineComponent({
    name: 'filter-warehouse-table',
    components: { FilterOption },
    setup(props, context) {
        const select: SelectList[] = [
            {
                value: undefined,
                key: 'warehousetype',
                placeholder: '全部仓库类型',
                list: [
                    { value: 1, lable: '厂库' },
                    { value: 2, lable: '自有库' },
                    { value: 3, lable: '合作库' },
                ],
            },
        ];
        const input: InputList[] = [
            { value: '', placeholder: '模糊搜索仓库名称', key: 'nickname' },
            { value: '', placeholder: '模糊搜索仓库地址', key: 'name' },
        ];
        return {
            ...handleFilter(select, input, context),
        };
    },
});
</script>

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