index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <!-- 撤销款项登记-->
  3. <a-modal class="add-custom custom-detail"
  4. title="撤销款项登记"
  5. v-model:visible="visible"
  6. centered
  7. :maskClosable="maskClosableFlag"
  8. @cancel="cancel"
  9. width="890px">
  10. <template #footer>
  11. <a-button key="submit"
  12. type="primary"
  13. :loading="loading"
  14. @click="submit">关闭
  15. </a-button>
  16. <a-button key="submit"
  17. type="primary"
  18. :loading="loading"
  19. @click="back">撤销
  20. </a-button>
  21. </template>
  22. </a-modal>
  23. </template>
  24. <script lang="ts">
  25. import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
  26. import { closeModal } from '@/common/setup/modal/index';
  27. import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
  28. import { mergeObj } from '@/utils/objHandle';
  29. import { getStatusName } from '@/common/constants/enumsName';
  30. import { formatValue, formatTime } from '@/common/methods';
  31. import {Modal} from "ant-design-vue";
  32. import {ContractOperateApplyReq} from "@/services/proto/contract/interface";
  33. import Long from "long";
  34. import {financeControl} from "@/views/manage/finance-review/components/setup";
  35. import {QryBussinessKxRsp} from "@/services/go/ermcp/finance-review/interface";
  36. export default defineComponent({
  37. name: 'finance_review_funds_cancel',
  38. components: {},
  39. props: {
  40. selectedRow: {
  41. type: Object as PropType<QryBussinessKxRsp>,
  42. default: {},
  43. },
  44. },
  45. setup(props, context) {
  46. const { visible, cancel } = closeModal('finance_review_funds_cancel');
  47. const loading = ref<boolean>(false);
  48. const maskClosableFlag = ref<boolean>(false);
  49. function submit() {
  50. loading.value = true;
  51. setTimeout(() => {
  52. loading.value = false;
  53. cancel();
  54. }, 200);
  55. }
  56. function back(){
  57. Modal.confirm({
  58. title: '是否确认撤销',
  59. okText: '确认撤销',
  60. cancelText: '取消',
  61. onOk() {
  62. const param: ContractOperateApplyReq = {
  63. OperateApplyID: Long.fromString(props.selectedRow.operateapplyid),
  64. OperateType: 4,
  65. }
  66. financeControl(param, loading)
  67. .then(res => {
  68. context.emit('refresh');
  69. cancel()
  70. })
  71. .catch(err => {
  72. })
  73. },
  74. onCancel() {
  75. console.log('Cancel');
  76. },
  77. });
  78. }
  79. return {
  80. visible,
  81. cancel,
  82. submit,
  83. loading,
  84. formatValue,
  85. getStatusName,
  86. maskClosableFlag,
  87. back,
  88. };
  89. },
  90. });
  91. </script>
  92. <style lang="less">
  93. .finance_review_funds_cancel {
  94. .ant-form.inlineForm {
  95. margin-top: 20px;
  96. }
  97. }
  98. </style>;