Преглед изворни кода

fix: 摘牌成功 刷新数据

huangbin пре 4 година
родитељ
комит
dee803e405

+ 1 - 0
src/utils/eventBus/index.ts

@@ -2,6 +2,7 @@
 interface EnentNames {
     loadComplete: string; //加载状态名
     spotTrade: string;  // 挂牌成功,通知报价大厅更新数据
+    blocsTrade: string; // 贸易圈 挂牌成功
     moneyChangedNtf_UI: string; // /接收到资金变化通知 UI 成 使用
     financing_manager: string; // 融资摘牌
 }

+ 3 - 0
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/delisting/index.vue

@@ -179,6 +179,7 @@ import { getRules } from '@/services/bus/rules';
 import { ListingForm } from './interface';
 import { HdWRDealOrder, wrBargainApply } from '@/services/proto/warehousetrade';
 import Long from 'long';
+import Bus from '@/utils/eventBus';
 
 export default defineComponent({
     emits: ['cancel', 'update'],
@@ -294,6 +295,7 @@ export default defineComponent({
                     };
                     requestResultLoadingAndInfo(wrBargainApply, param, loading, ['议价摘牌成功', '议价摘牌失败:']).then(() => {
                         cancel(true);
+                        Bus.$emit('blocsTrade', true);
                     });
                 } else {
                     // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
@@ -334,6 +336,7 @@ export default defineComponent({
 
                     requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
                         cancel(true);
+                        Bus.$emit('blocsTrade', true);
                     });
                 }
             });

+ 3 - 0
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/index.vue

@@ -179,6 +179,7 @@ import { getRules } from '@/services/bus/rules';
 import { ListingForm } from './interface';
 import { HdWRDealOrder, wrBargainApply } from '@/services/proto/warehousetrade';
 import Long from 'long';
+import Bus from '@/utils/eventBus';
 
 export default defineComponent({
     emits: ['cancel', 'update'],
@@ -293,6 +294,7 @@ export default defineComponent({
                         ApplyRemark: '',
                     };
                     requestResultLoadingAndInfo(wrBargainApply, param, loading, ['议价摘牌成功', '议价摘牌失败:']).then(() => {
+                        Bus.$emit('spotTrade', true);
                         cancel(true);
                     });
                 } else {
@@ -334,6 +336,7 @@ export default defineComponent({
 
                     requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
                         cancel(true);
+                        Bus.$emit('blocsTrade', true);
                     });
                 }
             });

+ 4 - 0
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/index.vue

@@ -67,6 +67,7 @@ import { expandIcon } from '@/common/setup/table/clolumn';
 import { getSpotWarrantBargainColumns } from './setup';
 import { formatTime } from '@/common/methods';
 import { getUserId } from '@/services/bus/account';
+import Bus from '@/utils/eventBus';
 
 export default defineComponent({
     name: enumOrderComponents.pre_sale_warehouse_receipt_bargain,
@@ -85,6 +86,9 @@ export default defineComponent({
             };
             queryTable(queryQueryWrTradeBargainApply, param);
         };
+        Bus.$on('blocsTrade', () => {
+            queryTableAction();
+        });
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
             queryFn: queryTableAction,

+ 4 - 0
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_pending_order/index.vue

@@ -44,6 +44,7 @@ import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { getWrOrderTypeName, getOrderStatusName } from '@/common/constants/enumsName';
 import { BtnListType } from '@/common/components/btnList/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
+import Bus from '@/utils/eventBus';
 
 export default defineComponent({
     name: enumOrderComponents.pre_sale_warehouse_receipt_pending_order,
@@ -62,6 +63,9 @@ export default defineComponent({
             };
             queryTable(queryWrOrderDetail, param);
         };
+                Bus.$on('blocsTrade', () => {
+            queryTableAction();
+        });
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
             queryFn: queryTableAction,

+ 5 - 0
src/views/order/spot_warran/components/spot_warrant_bargain/index.vue

@@ -67,6 +67,7 @@ import { expandIcon } from '@/common/setup/table/clolumn';
 import { getSpotWarrantBargainColumns } from './setup';
 import { formatTime } from '@/common/methods';
 import { getUserId } from '@/services/bus/account';
+import Bus from '@/utils/eventBus';
 
 export default defineComponent({
     name: enumOrderComponents.spot_warrant_pending_order,
@@ -85,6 +86,10 @@ export default defineComponent({
             };
             queryTable(queryQueryWrTradeBargainApply, param);
         };
+        Bus.$on('blocsTrade', () => {
+            queryTableAction();
+        });
+
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
             queryFn: queryTableAction,

+ 4 - 0
src/views/order/spot_warran/components/spot_warrant_pending_order/index.vue

@@ -47,6 +47,7 @@ import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { getWrOrderTypeName, getOrderStatusName } from '@/common/constants/enumsName';
 import { BtnListType } from '@/common/components/btnList/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
+import Bus from '@/utils/eventBus';
 
 export default defineComponent({
     name: enumOrderComponents.spot_warrant_pending_order,
@@ -65,6 +66,9 @@ export default defineComponent({
             };
             queryTable(queryWrOrderDetail, param);
         };
+        Bus.$on('blocsTrade', () => {
+            queryTableAction();
+        });
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
             queryFn: queryTableAction,