<template>
    <Input :size="size" :value="value" :paymentState="paymentState" :vendorCode="vendorCode" @input="handleInput" icon="log-in" @click.native="showvendorInfoForm" readonly></Input>
</template>
<script>
/**
 *编辑供应商信息
 */
import VendorInfoForm from "./VendorInfoForm";
import Server from "./server.js";
const server = new Server();
export default {
    name: "VendorInfo",
    components: {
        VendorInfoForm
    },
    props: {
        size: {
            type: String,
            default() {
                return "";
            }
        },
        value: {
            type: String,
            default() {
                return "";
            }
        },
        // 根据付款状态值判断供应商信息能否保存
        paymentState: {
            type: String,
            default() {
                return "";
            }
        },
        // 根据vendorCode来请求接口获取供应商信息明细
        vendorCode: {
            type: String,
            default() {
                return "";
            }
        }
    },
    data() {
        return {};
    },
    computed: {},
    created: function() {},
    beforeMount: function() {},
    mounted: function() {},
    beforeDestroy: function() {},
    destroyed: function() {},
    methods: {
        showvendorInfoForm() {
            new this.$pageModal(
                VendorInfoForm,
                {
                    props: {
                        paymentState: this.paymentState,
                        vendorCode: this.vendorCode
                    }
                },
                data => {
                    if (data) {
                        this.$emit("handleClick", data);
                    }
                }
            );
        }
    },
    watch: {},
    directives: {}
};
</script>
<style lang="less" scoped>
</style>