<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, ref } from 'vue';
import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
import { Moment } from 'moment';
import { handleArgreementType } from '@/views/platinum/platinum_agreement/setup';

export default defineComponent({
    name: 'filter-platinum_pick_query',
    components: { FilterOption },
    setup(props, context) {
        const date = ref<Moment>();
        const { getAgreementTypeList } = handleArgreementType();
        const select = ref<SelectList[]>([
            {
                value: undefined,
                key: 'agreementtype',
                placeholder: '筛选协议类型',
                list: getAgreementTypeList(),
            },
        ]);

        const input: InputList[] = [{ value: '', key: 'agreementno', placeholder: '模糊搜索协议编号' }];
        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);

        return {
            date,
            selectList,
            inputList,
            fixedBtnList,
        };
    },
});
</script>

<style lang="less">
.filterTable {
    .commonDatePicker.ant-calendar-picker {
        display: inline-flex;
        padding-top: 9px;
        padding-bottom: 6px;
        margin-right: 10px;
        .ant-input {
            border: 0;
            background: @m-grey9;
        }
    }
}
</style>;
