huangbin před 4 roky
rodič
revize
9aa26455aa

+ 26 - 21
src/views/information/goods/components/hedgingDetail/index.vue

@@ -16,8 +16,8 @@
                 @click="submit">完成</a-button>
     </template>
     <a-form class="inlineForm"
-    ref="formRef">
-    <fieldset class="formFieldSet">
+            ref="formRef">
+      <fieldset class="formFieldSet">
         <legend>基本信息</legend>
         <a-row :gutter="24">
           <a-col :span="12">
@@ -36,7 +36,7 @@
       </fieldset>
       <fieldset class="formFieldSet">
         <legend>修改套保比例列表</legend>
-         <a-row :gutter="24"
+        <a-row :gutter="24"
                class="dialogRowTitle">
           <a-col :span="5">
             <span>
@@ -58,13 +58,14 @@
               备注
             </span>
           </a-col>
-          <a-col :span="4" class="tc">
+          <a-col :span="4"
+                 class="tc">
             <span>
               修改人
             </span>
           </a-col>
-         </a-row>
-         <a-row :gutter="24"
+        </a-row>
+        <a-row :gutter="24"
                class="dialogRowTitle">
           <a-col :span="5">
             <span class="white">
@@ -86,13 +87,14 @@
               统一修改
             </span>
           </a-col>
-          <a-col :span="4" class="tc">
+          <a-col :span="4"
+                 class="tc">
             <span class="white">
               王平
             </span>
           </a-col>
-         </a-row>
-         <a-row :gutter="24"
+        </a-row>
+        <a-row :gutter="24"
                class="dialogRowTitle">
           <a-col :span="5">
             <span class="white">
@@ -114,13 +116,14 @@
               统一修改
             </span>
           </a-col>
-          <a-col :span="4" class="tc">
+          <a-col :span="4"
+                 class="tc">
             <span class="white">
               王平
             </span>
           </a-col>
-         </a-row>
-         <a-row :gutter="24"
+        </a-row>
+        <a-row :gutter="24"
                class="dialogRowTitle">
           <a-col :span="5">
             <span class="white">
@@ -142,35 +145,38 @@
               统一修改
             </span>
           </a-col>
-          <a-col :span="4" class="tc">
+          <a-col :span="4"
+                 class="tc">
             <span class="white">
               王平
             </span>
           </a-col>
-         </a-row>
+        </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';
 
 export default defineComponent({
-    name: 'modify-custom',
+    name: 'hedging-detail',
     components: {},
     props: {
-        // selectedRow: {
-        //   type:
-        // }
+        selctedMG: {
+            default: initMG,
+            type: Object as PropType<Ermcp3MiddleGoodsDetail2>,
+        },
     },
     setup() {
         const { visible, cancel } = closeModal('detail');
 
         const loading = ref<boolean>(false);
-        const maskClosableFlag = ref<boolean>(false);
         function submit() {
             cancel();
         }
@@ -188,7 +194,6 @@ export default defineComponent({
 
 <style lang="less">
 .hedgingDetail {
-    
 }
 </style
 >;

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

@@ -134,7 +134,7 @@
         </a-collapse-panel>
       </a-collapse>
     </div>
-    <HedgingDetail :selctedMG="selctedMG" />
+    <HedgingDetail :selectedRow="selctedMG" />
     <HedgingModify :selctedMG="selctedMG" />
 
   </div>
@@ -146,7 +146,7 @@ import { initMG } from '@/views/information/goods/list/hedging-variety/setup';
 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';
+import HedgingDetail from '../hedgingDetail/index.vue';
 import { BtnList } from '@/common/export/table';
 import { getThirdMenuData, handleBtnList } from '@/common/setup/table/button';
 import { getGoodsUnitEnumItemName } from '@/common/constants/enumsName';

+ 134 - 130
src/views/information/goods/components/spotDetail/index.vue

@@ -1,156 +1,162 @@
 <template>
-    <!-- 现货品种详情 -->
-    <a-modal class="commonModal spot-detail"
-             title="详情"
-             v-if="visible"
-             v-model:visible="visible"
-             centered
-             :maskClosable="maskClosableFlag"
-             @cancel="cancel"
-             width="890px">
-        <template #footer>
-            <a-button key="submit"
-                      type="primary"
-                      :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="现货品种名称"
-                                     name="deliverygoodsname">
-                            <span class="white">{{ formatValue(selectedRow.data.deliverygoodsname) }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="现货品种代码"
-                                     name="deliverygoodscode">
-                            <span class="white">{{ formatValue(selectedRow.data.deliverygoodsname) }}</span>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="单位"
-                                     name="unitid">
-                            <span class="white">{{ formatValue(selectedRow.data.enumdicname) }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="状态"
-                                     name="unitid">
-                            <span class="green">{{ getValidName(selectedRow.data.isvalid) }}</span>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-                <a-row :gutter="24">
-                    <a-col :span="24">
-                        <a-form-item label="备注"
-                                     name="remark">
-                            <span class="white">{{ formatValue(selectedRow.data.remark) }}</span>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>品类信息</legend>
-                <a-row :gutter="24"
-                       class="dialogRowTitle">
-                    <a-col :span="8">
+  <!-- 现货品种详情 -->
+  <a-modal class="commonModal spot-detail"
+           title="详情"
+           v-if="visible"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :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="现货品种名称"
+                         name="deliverygoodsname">
+              <span class="white">{{ formatValue(selectedRow.data.deliverygoodsname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="现货品种代码"
+                         name="deliverygoodscode">
+              <span class="white">{{ formatValue(selectedRow.data.deliverygoodsname) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="单位"
+                         name="unitid">
+              <span class="white">{{ formatValue(selectedRow.data.enumdicname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="状态"
+                         name="unitid">
+              <span class="green">{{ getValidName(selectedRow.data.isvalid) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="备注"
+                         name="remark">
+              <span class="white">{{ formatValue(selectedRow.data.remark) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>品类信息</legend>
+        <a-row :gutter="24"
+               class="dialogRowTitle">
+          <a-col :span="8">
             <span>
               品类
             </span>
-                    </a-col>
-                    <a-col :span="8">
+          </a-col>
+          <a-col :span="8">
             <span>
               单位
             </span>
-                    </a-col>
-                    <a-col :span="8">
+          </a-col>
+          <a-col :span="8">
             <span>
               标仓系数
             </span>
-                    </a-col>
-                    <template v-for="item in selectedRow.gmlist" :key="item.wrstandardid">
-                        <a-col :span="8" class="bt1">
-                            <div class="white">{{ item.wrstandardname }}</div>
-                        </a-col>
-                        <a-col :span="8">
-                            <div class="white">{{ item.enumdicname }}</div>
-                        </a-col>
-                        <a-col :span="8">
-                            <div class="white">{{ item.convertfactor }}</div>
-                        </a-col>
-                    </template>
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>品牌信息</legend>
-                <a-row :gutter="24"
-                       class="dialogRowTitle dialogRowTitle2">
-                    <a-col :span="24">
+          </a-col>
+          <template v-for="item in selectedRow.gmlist"
+                    :key="item.wrstandardid">
+            <a-col :span="8"
+                   class="bt1">
+              <div class="white">{{ item.wrstandardname }}</div>
+            </a-col>
+            <a-col :span="8">
+              <div class="white">{{ item.enumdicname }}</div>
+            </a-col>
+            <a-col :span="8">
+              <div class="white">{{ item.convertfactor }}</div>
+            </a-col>
+          </template>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>品牌信息</legend>
+        <a-row :gutter="24"
+               class="dialogRowTitle dialogRowTitle2">
+          <a-col :span="24">
             <span>
               品牌
             </span>
-                    </a-col>
-                    <template v-for="item in selectedRow.gblist" :key="item.brandid">
-                        <a-col :span="24" class="bt1">
-                            <div class="white">{{ item.brandname }}</div>
-                        </a-col>
-                    </template>
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>套保品种信息</legend>
-                <a-row :gutter="24"
-                       class="dialogRowTitle">
-                    <a-col :span="8">
+          </a-col>
+          <template v-for="item in selectedRow.gblist"
+                    :key="item.brandid">
+            <a-col :span="24"
+                   class="bt1">
+              <div class="white">{{ item.brandname }}</div>
+            </a-col>
+          </template>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>套保品种信息</legend>
+        <a-row :gutter="24"
+               class="dialogRowTitle">
+          <a-col :span="8">
             <span>
               套保品种
             </span>
-                    </a-col>
-                    <a-col :span="8">
+          </a-col>
+          <a-col :span="8">
             <span>
               单位
             </span>
-                    </a-col>
-                    <a-col :span="8">
+          </a-col>
+          <a-col :span="8">
             <span>
               套保系数
             </span>
-                    </a-col>
-                    <template v-for="item in selectedRow.mgList" :key="item.mg.middlegoodsid">
-                        <a-col :span="8" class="bt1">
-                            <div class="white">{{ item.mg.middlegoodsname }}</div>
-                        </a-col>
-                        <a-col :span="8">
-                            <div class="white">{{ item.mg.enumdicname }}</div>
-                        </a-col>
-                        <a-col :span="8">
-                            <div class="white">{{ item.mg.needhedgeratio }}</div>
-                        </a-col>
-                    </template>
-                </a-row>
-            </fieldset>
-        </a-form>
-    </a-modal>
+          </a-col>
+          <template v-for="item in selectedRow.mgList"
+                    :key="item.mg.middlegoodsid">
+            <a-col :span="8"
+                   class="bt1">
+              <div class="white">{{ item.mg.middlegoodsname }}</div>
+            </a-col>
+            <a-col :span="8">
+              <div class="white">{{ item.mg.enumdicname }}</div>
+            </a-col>
+            <a-col :span="8">
+              <div class="white">{{ item.mg.needhedgeratio }}</div>
+            </a-col>
+          </template>
+        </a-row>
+      </fieldset>
+    </a-form>
+  </a-modal>
 </template>
 
 <script lang="ts">
-import {defineComponent, PropType, ref} from 'vue';
-import {closeModal} from '@/common/setup/modal/index';
-import {formatValue, initData} from '@/common/methods/index';
-import {ErmcpDeliveryGoodsDetailEx} from "@/services/go/ermcp/goodsInfo/interface";
-import {getValidName} from "@/views/information/goods/setup";
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { formatValue, initData } from '@/common/methods/index';
+import { ErmcpDeliveryGoodsDetailEx } from '@/services/go/ermcp/goodsInfo/interface';
+import { getValidName } from '@/views/information/goods/setup';
 
 export default defineComponent({
-    name: 'modify-custom',
+    name: 'spot-detail',
     components: {},
     props: {
         selectedRow: {
@@ -159,17 +165,15 @@ export default defineComponent({
         },
     },
     setup() {
-        const {visible, cancel} = closeModal('detail');
+        const { visible, cancel } = closeModal('detail');
 
         const loading = ref<boolean>(false);
-        const maskClosableFlag = ref<boolean>(false);
 
         function submit() {
             cancel();
         }
 
-        initData(() => {
-        });
+        initData(() => {});
         return {
             visible,
             cancel,