index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <!-- 套保计划详情-->
  3. <a-modal class="add-custom custom-detail"
  4. title="套保计划详情"
  5. v-model:visible="visible"
  6. centered
  7. @cancel="cancel"
  8. width="890px">
  9. <template #footer>
  10. <a-button key="submit"
  11. type="primary"
  12. :loading="loading"
  13. @click="submit">关闭
  14. </a-button>
  15. </template>
  16. <fieldset class="formFieldSet">
  17. <legend>基本信息</legend>
  18. <a-form class="inlineForm"
  19. :form="form"
  20. @submit="handleSearch">
  21. <a-row :gutter="24">
  22. <a-col :span="12">
  23. <a-form-item label="计划类型">
  24. <span class="white">{{ getPlanContractType(selectedRow.contracttype) }}</span>
  25. </a-form-item>
  26. </a-col>
  27. <a-col :span="12">
  28. <a-form-item label="计划名称">
  29. <span class="white">{{ formatValue(selectedRow.hedgeplanno) }}</span>
  30. </a-form-item>
  31. </a-col>
  32. </a-row>
  33. <a-row :gutter="24">
  34. <a-col :span="12">
  35. <a-form-item label="现货品种">
  36. <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
  37. </a-form-item>
  38. </a-col>
  39. <a-col :span="12">
  40. <a-form-item label="标仓系数">
  41. <span class="white">{{ formatValue(selectedRow.convertfactor) }}</span>
  42. </a-form-item>
  43. </a-col>
  44. </a-row>
  45. <a-row :gutter="24">
  46. <a-col :span="12">
  47. <a-form-item label="计划量">
  48. <span class="white">{{ formatValue(selectedRow.planqty) }}</span>
  49. </a-form-item>
  50. </a-col>
  51. <a-col :span="12">
  52. <a-form-item label="备注">
  53. <span class="white">{{ formatValue(selectedRow.remark) }}</span>
  54. </a-form-item>
  55. </a-col>
  56. </a-row>
  57. </a-form>
  58. </fieldset>
  59. <fieldset class="formFieldSet">
  60. <legend>其它信息</legend>
  61. <a-row :gutter="24">
  62. <a-col :span="12">
  63. <a-form-item label="交易用户">
  64. <span class="white">{{ formatValue(selectedRow.tradeusername) }}</span>
  65. </a-form-item>
  66. </a-col>
  67. <a-col :span="12">
  68. <a-form-item label="结算币种">
  69. <span class="white">{{ formatValue(selectedRow.currencyname) }}</span>
  70. </a-form-item>
  71. </a-col>
  72. </a-row>
  73. <a-row :gutter="24">
  74. <a-col :span="12">
  75. <a-form-item label="备注">
  76. <span class="white">{{ formatValue(selectedRow.remark) }}</span>
  77. </a-form-item>
  78. </a-col>
  79. </a-row>
  80. </fieldset>
  81. </a-modal>
  82. </template>
  83. <script lang="ts">
  84. import {defineComponent, PropType, reactive, ref, watchEffect} from 'vue';
  85. import {closeModal} from '@/common/setup/modal/index';
  86. import {QueryCustomInfoType} from '@/services/go/ermcp/customInfo/interface';
  87. import {mergeObj} from '@/utils/objHandle';
  88. import {getStatusName} from '@/views/information/custom/setup';
  89. import {Ermcp3HedgePlan} from '@/services/go/ermcp/plan/interface';
  90. import {formatValue} from '@/common/methods';
  91. import {getPlanContractType} from '@/views/business/plan/setup';
  92. import {Modal} from "ant-design-vue";
  93. export default defineComponent({
  94. name: 'plan-detail',
  95. components: {},
  96. props: {
  97. selectedRow: {
  98. type: Object as PropType<Ermcp3HedgePlan>,
  99. default: {},
  100. },
  101. },
  102. setup(props, context) {
  103. const {visible, cancel} = closeModal('detail');
  104. function submit() {
  105. context.emit('refresh')
  106. cancel()
  107. }
  108. return {
  109. visible,
  110. cancel,
  111. submit,
  112. formatValue,
  113. getPlanContractType,
  114. };
  115. },
  116. });
  117. </script>
  118. <style lang="less">
  119. .custom-detail {
  120. .ant-form.inlineForm {
  121. margin-top: 20px;
  122. }
  123. }
  124. </style>;