瀏覽代碼

套保品种详情

huangbin 4 年之前
父節點
當前提交
ef8ad67630

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

@@ -23,13 +23,13 @@
           <a-col :span="12">
           <a-col :span="12">
             <a-form-item label="套保品种名称"
             <a-form-item label="套保品种名称"
                          name="deliverygoodsname">
                          name="deliverygoodsname">
-              <span class="white">铜板</span>
+              <span class="white">{{selctedMG.mg.middlegoodsname}}</span>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :span="12">
           <a-col :span="12">
             <a-form-item label="套保品种单位"
             <a-form-item label="套保品种单位"
                          name="deliverygoodscode">
                          name="deliverygoodscode">
-              <span class="white"></span>
+              <span class="white">{{selctedMG.mg.enumdicname}}</span>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
@@ -66,89 +66,33 @@
           </a-col>
           </a-col>
         </a-row>
         </a-row>
         <a-row :gutter="24"
         <a-row :gutter="24"
-               class="dialogRowTitle">
-          <a-col :span="5">
-            <span class="white">
-              20-12-03 09:40
-            </span>
-          </a-col>
-          <a-col :span="5">
-            <span class="white">
-              80%
-            </span>
-          </a-col>
-          <a-col :span="5">
-            <span class="white">
-              100%
-            </span>
-          </a-col>
-          <a-col :span="5">
-            <span class="white">
-              统一修改
-            </span>
-          </a-col>
-          <a-col :span="4"
-                 class="tc">
-            <span class="white">
-              王平
-            </span>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24"
-               class="dialogRowTitle">
+               class="dialogRowTitle"
+               v-for="(item, index) in list"
+               :key="index">
           <a-col :span="5">
           <a-col :span="5">
             <span class="white">
             <span class="white">
-              20-12-03 09:40
+              {{item.updatetime}}
             </span>
             </span>
           </a-col>
           </a-col>
           <a-col :span="5">
           <a-col :span="5">
             <span class="white">
             <span class="white">
-              80%
+              {{item.beforevalue}}
             </span>
             </span>
           </a-col>
           </a-col>
           <a-col :span="5">
           <a-col :span="5">
             <span class="white">
             <span class="white">
-              100%
+              {{item.aftervalue}}
             </span>
             </span>
           </a-col>
           </a-col>
           <a-col :span="5">
           <a-col :span="5">
             <span class="white">
             <span class="white">
-              统一修改
+              {{item.logremark}}
             </span>
             </span>
           </a-col>
           </a-col>
           <a-col :span="4"
           <a-col :span="4"
                  class="tc">
                  class="tc">
             <span class="white">
             <span class="white">
-              王平
-            </span>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24"
-               class="dialogRowTitle">
-          <a-col :span="5">
-            <span class="white">
-              20-12-03 09:40
-            </span>
-          </a-col>
-          <a-col :span="5">
-            <span class="white">
-              80%
-            </span>
-          </a-col>
-          <a-col :span="5">
-            <span class="white">
-              100%
-            </span>
-          </a-col>
-          <a-col :span="5">
-            <span class="white">
-              统一修改
-            </span>
-          </a-col>
-          <a-col :span="4"
-                 class="tc">
-            <span class="white">
-              王平
+              {{item.applyname}}
             </span>
             </span>
           </a-col>
           </a-col>
         </a-row>
         </a-row>
@@ -158,11 +102,12 @@
 </template>
 </template>
 
 
 <script lang="ts">
 <script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { closeModal } from '@/common/setup/modal/index';
-import { initData } from '@/common/methods/index';
 import { initMG } from '../../list/hedging-variety/setup';
 import { initMG } from '../../list/hedging-variety/setup';
-import { Ermcp3MiddleGoodsDetail2 } from '@/services/go/ermcp/goodsInfo/interface';
+import { Ermcp3MiddleGoodsDetail2, ErmcpMiddleGoodsChangeLog } from '@/services/go/ermcp/goodsInfo/interface';
+import { QueryMiddleGoodsChange } from '@/services/go/ermcp/goodsInfo';
+import { message } from 'ant-design-vue';
 
 
 export default defineComponent({
 export default defineComponent({
     name: 'hedging-detail',
     name: 'hedging-detail',
@@ -173,20 +118,29 @@ export default defineComponent({
             type: Object as PropType<Ermcp3MiddleGoodsDetail2>,
             type: Object as PropType<Ermcp3MiddleGoodsDetail2>,
         },
         },
     },
     },
-    setup() {
+    setup(props) {
         const { visible, cancel } = closeModal('detail');
         const { visible, cancel } = closeModal('detail');
-
+        const list = ref<ErmcpMiddleGoodsChangeLog[]>([]);
         const loading = ref<boolean>(false);
         const loading = ref<boolean>(false);
         function submit() {
         function submit() {
             cancel();
             cancel();
         }
         }
-        initData(() => {});
+        watchEffect(() => {
+            if (props.selctedMG.mg.middlegoodsid && visible.value) {
+                QueryMiddleGoodsChange(props.selctedMG.mg.middlegoodsid)
+                    .then((res) => {
+                        list.value = res;
+                    })
+                    .catch((err) => message.error(err));
+            }
+        });
         return {
         return {
             visible,
             visible,
             cancel,
             cancel,
             submit,
             submit,
             loading,
             loading,
             maskClosableFlag: false,
             maskClosableFlag: false,
+            list,
         };
         };
     },
     },
 });
 });

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

@@ -134,7 +134,7 @@
         </a-collapse-panel>
         </a-collapse-panel>
       </a-collapse>
       </a-collapse>
     </div>
     </div>
-    <HedgingDetail :selectedRow="selctedMG" />
+    <HedgingDetail :selctedMG="selctedMG" />
     <HedgingModify :selctedMG="selctedMG" />
     <HedgingModify :selctedMG="selctedMG" />
 
 
   </div>
   </div>