index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <!-- 修改套保品种 -->
  3. <a-modal class="commonModal modify-custom"
  4. title="修改套保品种"
  5. v-if="visible"
  6. v-model:visible="visible"
  7. centered
  8. :maskClosable="maskClosableFlag"
  9. @cancel="cancel"
  10. width="890px">
  11. <template #footer>
  12. <a-button key="submit"
  13. type="primary"
  14. :loading="loading"
  15. @click="submit">完成</a-button>
  16. </template>
  17. <a-form class="inlineForm"
  18. ref="formRef"
  19. :model="formState"
  20. :rules="rules">
  21. <fieldset class="formFieldSet">
  22. <legend>基本信息</legend>
  23. <a-row :gutter="24">
  24. <a-col :span="12">
  25. <a-form-item label="套保品种名称">
  26. <span>{{selctedMG.mg.middlegoodsname}}</span>
  27. </a-form-item>
  28. </a-col>
  29. <a-col :span="12">
  30. <a-form-item label="单位">
  31. <span>{{getGoodsUnitEnumItemName(selctedMG.mg.goodsunitid)}}</span>
  32. </a-form-item>
  33. </a-col>
  34. <a-col :span="12">
  35. <a-form-item label="当前套保比例">
  36. <span>{{(selctedMG.mg.needhedgeratio * 100).toFixed(2)}}%</span>
  37. </a-form-item>
  38. </a-col>
  39. <a-col :span="12">
  40. <a-form-item label="修改后套保比例">
  41. <a-input class="dialogInput"
  42. v-model:value="domain.wrstandardname"
  43. placeholder="请输入品类"></a-input>
  44. </a-form-item>
  45. </a-col>
  46. </a-row>
  47. </fieldset>
  48. <fieldset class="formFieldSet">
  49. <legend>其他信息</legend>
  50. <a-row :gutter="24">
  51. <a-col :span="24">
  52. <a-form-item label="备注">
  53. <span>{{selctedMG.mg.remark}}</span>
  54. </a-form-item>
  55. </a-col>
  56. </a-row>
  57. </fieldset>
  58. </a-form>
  59. </a-modal>
  60. </template>
  61. <script lang="ts">
  62. import { defineComponent, PropType, ref } from 'vue';
  63. import { closeModal } from '@/common/setup/modal/index';
  64. import { initData } from '@/common/methods/index';
  65. import { initMG } from '../../list/hedging-variety/setup';
  66. import { Ermcp3MiddleGoodsDetail2 } from '@/services/go/ermcp/goodsInfo/interface';
  67. import { getGoodsUnitEnumItemName } from '@/common/constants/enumsName';
  68. export default defineComponent({
  69. name: 'modify-custom',
  70. components: {},
  71. selctedMG: {
  72. default: initMG,
  73. type: Object as PropType<Ermcp3MiddleGoodsDetail2>,
  74. },
  75. setup() {
  76. const { visible, cancel } = closeModal('goods_info_hedge_normal_modify');
  77. const loading = ref<boolean>(false);
  78. function submit() {
  79. cancel();
  80. }
  81. initData(() => {});
  82. return {
  83. visible,
  84. cancel,
  85. submit,
  86. loading,
  87. maskClosableFlag: false,
  88. getGoodsUnitEnumItemName,
  89. };
  90. },
  91. });
  92. </script>
  93. <style lang="less">
  94. .modify-custom {
  95. .upload {
  96. display: inline-flex;
  97. .ant-btn.uploadBtn {
  98. width: 60px;
  99. height: 30px;
  100. background: @m-blue0;
  101. border: 0;
  102. padding: 0;
  103. text-align: center;
  104. font-size: 14px;
  105. color: @m-white0;
  106. .rounded-corners(3px);
  107. &:hover {
  108. background: rgba(@m-blue0, 0);
  109. color: rgba(@m-white0, 0.8);
  110. }
  111. }
  112. .look {
  113. color: @m-blue0;
  114. font-size: 14px;
  115. margin-left: 10px;
  116. cursor: pointer;
  117. }
  118. }
  119. }
  120. </style
  121. >;