<template>
  <div>
    <ImportDialog
      :tablename="tablename"
      :main-table="mainTable"
      :title="title"
      :visible="visible"
      :main-id="mainId"
      :gift-type="giftType"
      :is-group="isGroup"
      :custom-import="customImport"
      :father-method="fatherClose"
      @closeDialog="fatherClose"
      @changeGiftGoods="changeGiftGoods($event)"
    />
  </div>
</template>
<script>


  import ImportDialog from '../customizedContent/ImportDialog';

  export default {
    components: { ImportDialog },
    props: {
      visible: { // 获取ID用于多选
        type: Boolean,
        default: false
      },
      pageMsgId: { // 活动明细id
        type: String,
        default: ''
      },
      type: { // 参与商品或者排除商品
        type: String,
        default: ''
      },
      giftType: { // 赠送方式
        type: String, 
        default: ''
      },
      isGroup: { // 是否分组
        type: Boolean, 
        default: false
      },
    },
    data() {
      return {
        tablename: 'T_OMSACTIVESKU',
        mainTable: 'T_V_OMSACTIVE',
        mainId: this.pageMsgId,
        title: '赠送商品',
        customImport: true,
      };
    },
    methods: {
      fatherClose() {
        this.$emit('closeActionDialog', true);
      },
      changeGiftGoods(value) {
        this.$emit('changeGiftGoods', value);
      }
    }
  };
</script>
