<template>
  <!-- 过滤客户资料表格 -->
  <Filter @update="update"
          :showUser="false">
    <a-select label-in-value
              class="conditionSelect ml10"
              style="width: 120px"
              v-model:value="selectedDG"
              @change="DGChange"
              placeholder="全部现货品种">
      <a-select-option v-for="item in DGList"
                       :key="item.data.deliverygoodsname">
        {{item.data.deliverygoodsname}}
      </a-select-option>
    </a-select>
    <a-select label-in-value
              class="conditionSelect ml10"
              style="width: 120px"
              v-model:value="selectedGM"
              @change="GBOrGMChange"
              placeholder="全部品类">
      <a-select-option v-for="item in gmlist"
                       :key="item.wrstandardname">
        {{item.wrstandardname}}
      </a-select-option>
    </a-select>
    <a-button class="selectBtn">查询</a-button>
    <a-button class="selectBtn"
              @click="reset">重置</a-button>
  </Filter>
</template>

<script lang="ts">
import FilterOption from '@/common/components/filter/index.vue';
import { defineComponent } from 'vue';
import { ref } from 'vue';
import { handleFilter, SelectList } from '@/common/setup/filter';
import { handlerManagerList } from '@/common/setup/user';
import { QueryMiddleGoodsDetail } from '@/services/go/ermcp/goodsInfo';
import { SelectOption } from '@/common/setup/filter/interface';
import Filter from '../../../components/filter/index.vue';
import { TypeAndTime } from '@/views/report/interface';
import { handleDG } from '@/views/report/setup';

export default defineComponent({
    name: 'inventory-filter-table',
    components: { FilterOption, Filter },
    setup(props, context) {
        function update(value: TypeAndTime) {
            context.emit('update', value);
        }
        const { DGList, gblist, gmlist, selectedDG, selectedGB, selectedGM, DGChange, GBOrGMChange, reset } = handleDG(context);
        return {
            DGList,
            gblist,
            gmlist,
            DGChange,
            GBOrGMChange,
            reset,
            selectedDG,
            selectedGB,
            selectedGM,
            update,
        };
    },
});
</script>

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

