huangbin 4 vuotta sitten
vanhempi
commit
238915a0b7

+ 5 - 14
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-market/index.vue

@@ -14,7 +14,7 @@
     <!-- ,  -->
     <!-- 额外的展开行 -->
     <template #expandedRowRender="{ record }">
-      <BtnList :btnList="btnList"
+      <BtnList :btnList="btnListData"
                :record="record"
                class="btn-list-sticky"
                @click="openComponent" />
@@ -27,7 +27,6 @@
              v-if="componentId"
              :selectedRow="selectedRow"
              :buyOrSell="BuyOrSell.buy"
-             :enumName="enumName"
              :parantSelectedRow="parantSelectedRow"
              @cancel="closeComponent"></component>
 </template>
@@ -51,14 +50,6 @@ export default defineComponent({
     emits: ['cancel', 'openComponent'],
     name: 'warehouse_receipt_trade_price_delisting_buy',
     props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        btnList: {
-            default: [],
-            type: Array as PropType<BtnListType[]>,
-        },
         parantSelectedRow: {
             type: Object as PropType<WrOrderQuote>,
             default: {},
@@ -66,13 +57,13 @@ export default defineComponent({
     },
     components: {
         BtnList,
-        [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
+        Delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
     },
     setup(props, context) {
         const isBottom = getShowBottomValue();
-        console.log(isBottom.value, 'isBottom');
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
+        const btnListData: BtnListType[] = [{ lable: '摘牌', code: 'Delisting', className: 'operBtn' }];
         // 获取列表数据
         const queryTableAction = () => {
             const param: WrTradeOrderDetailReq = {
@@ -84,7 +75,7 @@ export default defineComponent({
         // 表格通用逻辑
         const param: ComposeTableParam = {
             queryFn: queryTableAction,
-            menuType: props.enumName,
+            menuType: EnumRouterName.warehouse_receipt_trade_price,
             tableName: 'table_pcweb_spot_trade_warehouse_price_trading_hall_buy',
             tableFilterKey: [],
             isDetail: false,
@@ -104,9 +95,9 @@ export default defineComponent({
             BuyOrSell,
             loading,
             tableList,
-            enumName: props.enumName,
             expandIcon,
             handleColumn,
+            btnListData,
         };
     },
 });

+ 4 - 24
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/index.vue

@@ -53,20 +53,16 @@
 
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { defineAsyncComponent, defineComponent, BtnList, ModalEnum } from '@/common/export/commonTable';
+import { defineAsyncComponent, defineComponent, BtnList } from '@/common/export/commonTable';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { LeftOutlined } from '@ant-design/icons-vue';
-import { handleFinacing, handleIs, setGoodsPrice } from './setup';
 import Buy from '../buy-market/index.vue';
 import Sell from '../sell-market/index.vue';
-import { LineChartOutlined, DownOutlined } from '@ant-design/icons-vue';
 import { handleModalComponent } from '@/common/setup/asyncComponent';
 import { onMounted, PropType, ref } from 'vue';
-import { handleSpotBtnList } from '../../../setup';
-import { addSubscribeQuotation, removeSubscribeQuotation } from '@/services/socket/quota';
+
 import Bus from '@/utils/eventBus/index';
-import { getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
 import TimerUtils from '@/utils/timer/timerUtil';
 import { BtnListType } from '@/common/components/btnList/interface';
 import moment, { Moment } from 'moment';
@@ -79,27 +75,20 @@ export default defineComponent({
             type: Object as PropType<WrOrderQuote>,
             default: {},
         },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
     },
     components: {
         Buy,
         Sell,
         BtnList,
         LeftOutlined,
-        DownOutlined,
-        LineChartOutlined,
         Listing: defineAsyncComponent(() => import('../listing/index.vue')),
         Detail: defineAsyncComponent(() => import('../detail/index.vue')),
-        // [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../detail/index.vue')),
-        // [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../post_buying/index.vue')),
     },
     setup(props, context) {
         const time = ref<Moment>(moment(props.selectedRow.deliverymonth)); // string 交收月
         const loading = ref<boolean>(false);
         const { visible, cancel } = _closeModal(context);
+
         const btnListData: BtnListType[] = [
             { lable: '挂牌求购', code: 'Listing', className: 'operBtn' },
             { lable: '详情', code: 'Detail', className: 'btnDeafault' },
@@ -116,15 +105,7 @@ export default defineComponent({
             sellRef.value?.queryTableAction();
         };
         const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
-        function timeChange() {
-            TimerUtils.setTimeout(
-                () => {
-                    queryFn();
-                },
-                200,
-                'debounce'
-            );
-        }
+
         TimerUtils.setInterval(
             () => {
                 queryFn();
@@ -143,7 +124,6 @@ export default defineComponent({
             componentId,
             closeComponent,
             openComponent,
-            timeChange,
             btnListData,
         };
     },

+ 4 - 17
src/views/market/spot_trade/spot_trade_order_transaction/components/sell-market/index.vue

@@ -13,7 +13,7 @@
            :data-source="tableList">
     <!-- 额外的展开行 -->
     <template #expandedRowRender="{ record }">
-      <BtnList :btnList="btnList"
+      <BtnList :btnList="btnListData"
                :record="record"
                @click="openComponent" />
     </template>
@@ -24,7 +24,6 @@
   <component :is="componentId"
              v-if="componentId"
              :selectedRow="selectedRow"
-             :enumName="enumName"
              :buyOrSell="BuyOrSell.sell"
              :parantSelectedRow="parantSelectedRow"
              @cancel="closeComponent"></component>
@@ -49,33 +48,21 @@ export default defineComponent({
     emits: ['cancel', 'openComponent'],
     name: 'warehouse_receipt_trade_price_delisting_sell',
     props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        btnList: {
-            default: [],
-            type: Array as PropType<BtnListType[]>,
-        },
         parantSelectedRow: {
             type: Object as PropType<WrOrderQuote>,
             default: {},
         },
-        time: {
-            type: Object as PropType<Moment>,
-            default: moment(),
-        },
     },
     components: {
         BtnList,
-        [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
+        Delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
     },
     setup(props, context) {
         const isBottom = getShowBottomValue();
         console.log(isBottom.value, 'isBottom');
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
-
+        const btnListData: BtnListType[] = [{ lable: '摘牌', code: 'Delisting', className: 'operBtn' }];
         // 获取列表数据
         const queryTableAction = () => {
             const param: WrTradeOrderDetailReq = {
@@ -109,9 +96,9 @@ export default defineComponent({
             loading,
             tableList,
             BuyOrSell,
-            enumName: props.enumName,
             expandIcon,
             handleColumn,
+            btnListData,
         };
     },
 });