<template>
    <el-dialog :title="purchaseTitle" append-to-body :visible.sync="openShow" width="70%" @close="closeDialog">

        <avue-crud :data="data" :option="option"></avue-crud>
        <!-- <template #footer>
            <span class="dialog-footer">
                <el-button @click="closeDialog">取 消</el-button>
                <el-button type="primary" @click="submit">确 定</el-button>
            </span>
        </template> -->
    </el-dialog>
</template>
<script>
export default {
    props: {
        showDialog: {
            type: Boolean,
            default: false
        },
        purchaseTitle:{
          type:String,
          default:''
        }
    },
    data() {
        return {
            openShow:false,
            option:{
              menu:false,
              header:false,
              align: 'center',
              column:[
                {
                  label:'物品名称',
                  prop:'wupinmingcheng'
                }, {
                  label:'计划采购数量',
                  prop:'caigoushuliang'
                },{
                  label:'已入库数量',
                  prop:'yirukushuliang'
                }
              ]
            }
        }
    },
    mounted(){
        this.openShow = this.showDialog

    },
    methods:{
        closeDialog(){
            this.openShow = false
            this.$emit('closeDialog');
        }
    }
}
</script>
<style lang="scss" scoped></style>
