<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-spot-contract-table',
    components: { FilterOption },
    setup(props, context) {
        const select: SelectList[] = [
            {
                value: undefined,
                key: 'contracttype',
                placeholder: '全部合同类型',
                list: [
                    { value: 1, lable: '采购' },
                    { value: -1, lable: '销售' },
                ],
            },
            {
                value: undefined,
                key: 'pricetype',
                placeholder: '全部定价类型',
                list: [
                    { value: 1, lable: '一口价' },
                    { value: 2, lable: '点价' },
                    { value: 3, lable: '暂定价' },
                ],
            },
        ];
        const input: InputList[] = [
            { value: '', placeholder: '模糊搜索合同编号', key: 'contractno' },
            { value: '', placeholder: '模糊搜索对手方', key: 'negative' },
        ];
        return {
            ...handleFilter(select, input, context),
        };
    },
});
</script>

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