<template>
    <j-modal
            :title="title"
            :width="width"
            :visible="visible"
            switchFullscreen
            @ok="handleOk"
            :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
            cancelText="关闭"
            @cancel="handleCancel">
        <commodity-record ref="realForm" :disabled="disableSubmit" :agreementOrderFeeId="agreementOrderFeeId"></commodity-record>
    </j-modal>
</template>

<script>
    import CommodityRecord from './commodityRecord'
    export default {
        name: 'commodityRecordModal',
        components: {
            CommodityRecord
        },
        props: {
        },
        data () {
            return {
                title:'',
                agreementOrderFeeId:'',
                width:1200,
                visible: false,
                disableSubmit: false,
            }
        },
        methods: {
            show () {
                this.visible=true
                this.$nextTick(()=>{
                    this.$refs.realForm.show();
                })
            },
            close () {
                this.$emit('close');
                this.visible = false;
            },
            handleOk () {
                this.$refs.realForm.submitForm();
            },
            handleCancel () {
                this.close()
            }
        }
    }
</script>

