浏览代码

修改套保品种

huangbin 4 年之前
父节点
当前提交
870e9cb931

+ 52 - 9
src/views/information/goods/components/hedgingModify/index.vue

@@ -1,7 +1,7 @@
 <template>
-  <!-- 修改客户资料 -->
+  <!-- 修改套保品种 -->
   <a-modal class="commonModal modify-custom"
-           title="修改"
+           title="修改套保品种"
            v-if="visible"
            v-model:visible="visible"
            centered
@@ -14,28 +14,70 @@
                 :loading="loading"
                 @click="submit">完成</a-button>
     </template>
-
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <fieldset class="formFieldSet">
+        <legend>基本信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="套保品种名称">
+              <span>{{selctedMG.mg.middlegoodsname}}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="单位">
+              <span>{{getGoodsUnitEnumItemName(selctedMG.mg.goodsunitid)}}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="当前套保比例">
+              <span>{{(selctedMG.mg.needhedgeratio * 100).toFixed(2)}}%</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="修改后套保比例">
+              <a-input class="dialogInput"
+                       v-model:value="domain.wrstandardname"
+                       placeholder="请输入品类"></a-input>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>其他信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="备注">
+              <span>{{selctedMG.mg.remark}}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+    </a-form>
   </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+import { defineComponent, PropType, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
+import { initMG } from '../../list/hedging-variety/setup';
+import { Ermcp3MiddleGoodsDetail2 } from '@/services/go/ermcp/goodsInfo/interface';
+import { getGoodsUnitEnumItemName } from '@/common/constants/enumsName';
 
 export default defineComponent({
     name: 'modify-custom',
     components: {},
-    props: {
-        // selectedRow: {
-        //   type:
-        // }
+    selctedMG: {
+        default: initMG,
+        type: Object as PropType<Ermcp3MiddleGoodsDetail2>,
     },
     setup() {
         const { visible, cancel } = closeModal('goods_info_hedge_normal_modify');
 
         const loading = ref<boolean>(false);
-        const maskClosableFlag = ref<boolean>(false);
         function submit() {
             cancel();
         }
@@ -46,6 +88,7 @@ export default defineComponent({
             submit,
             loading,
             maskClosableFlag: false,
+            getGoodsUnitEnumItemName,
         };
     },
 });

+ 6 - 4
src/views/information/goods/components/rightHedging/index.vue

@@ -10,6 +10,8 @@
           {{selctedMG.mg.middlegoodsname}}({{getGoodsUnitEnumItemName(selctedMG.mg.goodsunitid)}})
         </span>
         <span class="green ml10">{{selctedMG.mg.isvalid ? '正常' : '停用'}}</span>
+        <span>套保比例{{(selctedMG.mg.needhedgeratio * 100).toFixed(2)}}%</span>
+        <span>套利比例100%</span>
       </div>
       <div class="tltBtns">
         <template v-if="isNormal">
@@ -132,15 +134,15 @@
         </a-collapse-panel>
       </a-collapse>
     </div>
-    <HedgingDetail />
-    <HedgingModify />
+    <HedgingDetail @selctedMG="selctedMG" />
+    <HedgingModify @selctedMG="selctedMG" />
   </div>
 </template>
 
 <script lang="ts">
 import { defineComponent, PropType } from 'vue';
 import { initMG } from '@/views/information/goods/list/hedging-variety/setup';
-import { ErmcpDeliveryGoodsDetailEx } from '@/services/go/ermcp/goodsInfo/interface';
+import { Ermcp3MiddleGoodsDetail2 } from '@/services/go/ermcp/goodsInfo/interface';
 import { initData } from '@/common/methods';
 import HedgingModify from '../hedgingModify/index.vue';
 import HedgingDetail from '../spotDetail/index.vue';
@@ -153,7 +155,7 @@ export default defineComponent({
     props: {
         selctedMG: {
             default: initMG,
-            type: Object as PropType<ErmcpDeliveryGoodsDetailEx>,
+            type: Object as PropType<Ermcp3MiddleGoodsDetail2>,
         },
         isNormal: {
             default: true,