<template>
  <div>
    <el-dialog
      append-to-body
      top="2vh"
      width="80%"
      :visible.sync="dialogVisible"
      center
      @close="handleCancel"
    >
      <div class="el-dialog-div" style="height:80vh">
        <product-list @ok="getCheckedProducts"/>
      </div>
    </el-dialog>
  </div>
</template>

<script>
    import Product from "@/views/business/product/productList";
    import ProductList from "@/views/business/stock/productList";
    export default {
      name: "chooseProduct",
      components: {ProductList, Product},
      props: {
        sellList: Array,
      },
      data() {
        return {
          dialogVisible: false,
          temp:{}
        }
      },
      methods: {
        open() {
          this.dialogVisible = true
        },
        getCheckedProducts(productList){
          console.log(productList)
          this.$emit('ok', productList)
          this.handleCancel()
        },
        handleCancel(){
          this.dialogVisible = false
        },
        submit(){

        }
      },
    }
</script>
<style scoped>

</style>
