index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <!-- 现货合同正常完结-->
  3. <a-modal class="commonModal custom-finish"
  4. title="现货合同正常完结"
  5. v-model:visible="visible"
  6. centered
  7. :maskClosable="false"
  8. @cancel="cancel"
  9. width="890px">
  10. <template #footer>
  11. <a-button key="submit"
  12. class="cancelBtn"
  13. @click="cancel">取消</a-button>
  14. <a-button key="submit"
  15. type="primary"
  16. :loading="loading"
  17. @click="submit">确认完结</a-button>
  18. </template>
  19. <InfoDetail :selectedRow="selectedRow"
  20. :businessManager="businessManager" />
  21. </a-modal>
  22. </template>
  23. <script lang="ts">
  24. import { defineComponent, PropType, ref } from 'vue';
  25. import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
  26. import { Modal } from 'ant-design-vue';
  27. import { SpotContractOperateReq } from '@/services/proto/spotcontract/interface';
  28. import InfoDetail from '../infoDetail/index.vue';
  29. import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
  30. import { spotContractStatus } from '@/services/proto/spotcontract';
  31. import { _closeModal } from '@/common/setup/modal/modal';
  32. export default defineComponent({
  33. name: 'spot-contract-finish',
  34. emits: ['cancel'],
  35. components: { InfoDetail },
  36. props: {
  37. selectedRow: {
  38. type: Object as PropType<Ermcp3ContractRsp>,
  39. default: {},
  40. },
  41. },
  42. setup(props, context) {
  43. const { visible, cancel } = _closeModal(context);
  44. const maskClosableFlag = ref<boolean>(false);
  45. const loading = ref<boolean>(false);
  46. function submit() {
  47. Modal.confirm({
  48. title: '是否确认完结',
  49. okText: '确认完结',
  50. cancelText: '取消',
  51. onOk() {
  52. const reqParam: SpotContractOperateReq = {
  53. SpotContractID: props.selectedRow.spotcontractid,
  54. OperateType: 6,
  55. Remark: '',
  56. };
  57. // Fixme 6/4 代码修改
  58. // 合同完结 SpotContractOperateReq operateType 操作类型-1:保存草稿(作废)2:提交申请(作废)3:审核通过4:审核拒绝(作废)5:撤回(作废)6:正常完结7:异常终止
  59. requestResultLoadingAndInfo(spotContractStatus, reqParam, loading, ['合同正常完结', '合同完结失败:']).then(() => {
  60. cancel(true);
  61. });
  62. },
  63. onCancel() {},
  64. });
  65. }
  66. return {
  67. visible,
  68. cancel,
  69. submit,
  70. loading,
  71. maskClosableFlag,
  72. };
  73. },
  74. });
  75. </script>
  76. <style lang="less">
  77. .custom-finish {
  78. .upload {
  79. .look {
  80. margin-left: 0;
  81. }
  82. }
  83. }
  84. </style>;