index.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <!-- 撤销款项登记-->
  3. <a-modal class="add-custom custom-detail"
  4. title="撤销款项登记"
  5. v-model:visible="visible"
  6. centered
  7. :maskClosable="false"
  8. @cancel="cancel"
  9. width="890px">
  10. <template #footer>
  11. <a-button type="primary"
  12. :loading="loading"
  13. @click="cancel">关闭
  14. </a-button>
  15. <a-button type="primary"
  16. :loading="loading"
  17. @click="back">撤销
  18. </a-button>
  19. </template>
  20. <a-form class="inlineForm">
  21. <fieldset class="formFieldSet">
  22. <legend>合同基本信息</legend>
  23. <a-row :gutter="24">
  24. <a-col :span="12">
  25. <a-form-item label="合同编号">
  26. <span
  27. class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
  28. </a-form-item>
  29. </a-col>
  30. <a-col :span="12">
  31. <a-form-item label="点价类型">
  32. <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
  33. </a-form-item>
  34. </a-col>
  35. </a-row>
  36. <a-row :gutter="24">
  37. <a-col :span="12">
  38. <a-form-item label="销售方">
  39. <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
  40. </a-form-item>
  41. </a-col>
  42. <a-col :span="12">
  43. <a-form-item label="现货品种">
  44. <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
  45. </a-form-item>
  46. </a-col>
  47. </a-row>
  48. </fieldset>
  49. <fieldset class="formFieldSet">
  50. <legend>待审核登记信息</legend>
  51. <a-row :gutter="24">
  52. <a-col :span="12">
  53. <a-form-item label="款项类型">
  54. <span
  55. class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
  56. </a-form-item>
  57. </a-col>
  58. <a-col :span="12">
  59. <a-form-item label="登记金额">
  60. <span
  61. class="white">{{(selectedRow.deductamount === undefined || selectedRow.deductamount === 0) ? formatValue(selectedRow.payamount): formatValue(selectedRow.deductamount)}}</span>
  62. </a-form-item>
  63. </a-col>
  64. </a-row>
  65. <a-row :gutter="24">
  66. <a-col :span="12">
  67. <a-form-item label="登记时间">
  68. <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
  69. </a-form-item>
  70. </a-col>
  71. <a-col :span="12">
  72. <a-form-item label="登记人">
  73. <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
  74. </a-form-item>
  75. </a-col>
  76. </a-row>
  77. </fieldset>
  78. </a-form>
  79. </a-modal>
  80. </template>
  81. <script lang="ts">
  82. import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
  83. import { closeModal } from '@/common/setup/modal/index';
  84. import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
  85. import { mergeObj } from '@/utils/objHandle';
  86. import { getStatusName } from '@/common/constants/enumsName';
  87. import { formatValue, formatTime } from '@/common/methods';
  88. import { Modal } from 'ant-design-vue';
  89. import { ContractOperateApplyReq } from '@/services/proto/contract/interface';
  90. import Long from 'long';
  91. import { financeControl } from '@/views/manage/finance-review/components/setup';
  92. import { QryBussinessKxRsp } from '@/services/go/ermcp/finance-review/interface';
  93. import { stateName } from '@/views/manage/finance-review/setup';
  94. import { getPriceTypeName } from '@/common/constants/enumsName';
  95. import { getContractTypeName } from '@/common/constants/enumsName';
  96. import { _closeModal } from '@/common/setup/modal/modal';
  97. export default defineComponent({
  98. name: 'finance_review_funds_cancel',
  99. emits: ['cancel', 'update'],
  100. props: {
  101. selectedRow: {
  102. type: Object as PropType<QryBussinessKxRsp>,
  103. default: {},
  104. },
  105. },
  106. setup(props, context) {
  107. const { visible, cancel } = _closeModal(context);
  108. const loading = ref<boolean>(false);
  109. const maskClosableFlag = ref<boolean>(false);
  110. function back() {
  111. Modal.confirm({
  112. title: '是否确认撤销',
  113. okText: '确认撤销',
  114. cancelText: '取消',
  115. onOk() {
  116. const param: ContractOperateApplyReq = {
  117. OperateApplyID: Long.fromString(props.selectedRow.operateapplyid),
  118. OperateType: 4,
  119. };
  120. financeControl(param, loading)
  121. .then((res) => {
  122. cancel(true);
  123. })
  124. .catch((err) => {});
  125. },
  126. onCancel() {},
  127. });
  128. }
  129. return {
  130. visible,
  131. cancel,
  132. loading,
  133. formatValue,
  134. getStatusName,
  135. maskClosableFlag,
  136. getPriceTypeName,
  137. getContractTypeName,
  138. back,
  139. stateName,
  140. };
  141. },
  142. });
  143. </script>
  144. <style lang="less">
  145. .finance_review_funds_cancel {
  146. .ant-form.inlineForm {
  147. margin-top: 20px;
  148. }
  149. }
  150. </style>;