index.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <!-- 重新提交现货合同-->
  3. <a-modal class="modify-custom"
  4. title="重新提交现货合同"
  5. v-model:visible="visible"
  6. @cancel="cancel"
  7. width="890px">
  8. <template #footer>
  9. <a-button key="submit"
  10. type="primary"
  11. :loading="loading"
  12. @click="submit">完成</a-button>
  13. </template>
  14. </a-modal>
  15. </template>
  16. <script lang="ts">
  17. import { defineComponent, ref } from 'vue';
  18. import { closeModal } from '@/common/setup/modal/index';
  19. import {getBizTypeName, getContractTypeName} from "@/views/information/spot-contract/setup";
  20. export default defineComponent({
  21. name: 'resubmit-spot-contract',
  22. components: {},
  23. setup() {
  24. const { visible, cancel } = closeModal('spot_contract_btn_resubmit');
  25. const loading = ref<boolean>(false);
  26. function submit() {
  27. loading.value = true;
  28. setTimeout(() => {
  29. loading.value = false;
  30. cancel();
  31. }, 2000);
  32. }
  33. return {
  34. visible,
  35. cancel,
  36. submit,
  37. loading,
  38. getContractTypeName,
  39. getBizTypeName,
  40. };
  41. },
  42. });
  43. </script>
  44. <style lang="less">
  45. .modify-custom {
  46. }
  47. </style
  48. >;