export default {
    data() {
        return {
            ContractModalWidth: 50,
            ContractModalShowType: false,
            ContractModalContentShowType: false,
            ContractModalIframeUrl:
                "/widgetmodelv3/#/contract-template-create?token={token}&modulecode={modulecode}&contno={contno}",
        };
    },
    methods: {
        StartContractPrint({ modulecode = "", contno = "1" } = {}) {
            const token = this.getToken();
            this.ContractModalIframeUrl = this.ContractModalIframeUrl.replace(
                "{token}",
                token
            )
                .replace("{modulecode}", modulecode)
                .replace("{contno}", contno);
            this.ContractModalShowType = true;
            this.$nextTick(() => {
                this.ContractModalContentShowType = true;
            });
        },
        HideContractPrintModal() {
            this.ContractModalShowType = false;
            this.ContractModalContentShowType = false;
        },
    },
};
