<template>
  <!-- 新增现货合同 -->
  <a-modal class="commonModal add-spot-contract"
           title="新增现货合同"
           v-model:visible="visible"
           centered
           :maskClosable="maskClosableFlag"
           @cancel="cancel"
           width="890px">
    <template #footer>
      <a-button key="submit"
                class="cancelBtn"
                @click="submit(1)">保存草稿</a-button>
      <a-button key="submit"
                type="primary"
                :loading="loading"
                @click="submit(2)">提交审核</a-button>
    </template>

  </a-modal>
</template>

<script lang="ts">
import { defineComponent, PropType, ref, toRaw, watchEffect } from 'vue';
import { closeModal } from '@/common/setup/modal/index';
import { initData } from '@/common/methods';

import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';

export default defineComponent({
    name: 'add-spot-contract',
    components: {},
    props: {
        selectedRow: {
            type: Object as PropType<Ermcp3ContractRsp>,
            default: {},
        },
    },
    setup(props, context) {
        const { visible, cancel } = closeModal('inventory_current_add');

        const loading = ref<boolean>(false);
        function submit(OperateType: 1 | 2) {
            cancel();
        }

        initData(() => {});
        return {
            visible,
            cancel,
            submit,
            loading,
            maskClosableFlag: false,
        };
    },
});
</script>

<style lang="less">
.add-spot-contract {
}
</style>;
