huangbin 4 年之前
父節點
當前提交
407bf7cda7
共有 15 個文件被更改,包括 538 次插入490 次删除
  1. 11 0
      src/assets/styles/mixin.less
  2. 0 1
      src/services/socket/order/index.ts
  3. 0 1
      src/services/socket/protobuf/buildReq.ts
  4. 38 37
      src/views/search/search_document_records/search_spot_warrant/search_spot_warrant_transaction_record/index.vue
  5. 79 69
      src/views/search/search_document_records_commission_record_sub/search_document_records_commodity_contract/search_document_records_done_commodity_contract_history/index.vue
  6. 76 69
      src/views/search/search_document_records_commission_record_sub/search_document_records_commodity_contract/search_document_records_done_commodity_contract_today/index.vue
  7. 9 11
      src/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/index.vue
  8. 28 41
      src/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/search_document_records_spot_warrant_history/index.vue
  9. 42 40
      src/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/search_document_records_spot_warrant_today/index.vue
  10. 6 8
      src/views/search/search_document_records_done/search_document_records_done_commodity_contract/index.vue
  11. 92 60
      src/views/search/search_document_records_done/search_document_records_done_commodity_contract/search_document_records_done_commodity_contract_history/index.vue
  12. 92 60
      src/views/search/search_document_records_done/search_document_records_done_commodity_contract/search_document_records_done_commodity_contract_today/index.vue
  13. 9 11
      src/views/search/search_document_records_done/search_document_records_done_search_spot_warrant/index.vue
  14. 28 41
      src/views/search/search_document_records_done/search_document_records_done_search_spot_warrant/search_document_records_done_search_spot_warrant_history/index.vue
  15. 28 41
      src/views/search/search_document_records_done/search_document_records_done_search_spot_warrant/search_document_records_done_search_spot_warrant_today/index.vue

+ 11 - 0
src/assets/styles/mixin.less

@@ -2493,6 +2493,7 @@ input:-internal-autofill-selected {
     height: calc(100% - 28px);
 }
 
+
 .topTableHeight40 {
     height: calc(100% - 35px);
 }
@@ -2705,6 +2706,8 @@ input:-internal-autofill-selected {
 // 上半部分表格高度
 .topTableHeight {
     .srcollYTable {
+        height: 100%;
+
         .ant-table {
             .ant-table-body {
                 min-height: calc(100vh - 378px);
@@ -2712,6 +2715,14 @@ input:-internal-autofill-selected {
                 background: @m-black2;
             }
 
+            .ant-table-content {
+                height: 100%;
+
+                .ant-table-scroll {
+                    height: 100%;
+                }
+            }
+
             .ant-table-placeholder {
                 height: calc(100vh - 378px);
 

+ 0 - 1
src/services/socket/order/index.ts

@@ -80,7 +80,6 @@ export const orderReq = (param: orderType.OrderReqType): Promise<string> => {
  */
 export const cancelOrderReq = (param: orderType.CancelOrderReq): Promise<string> => {
     return new Promise((resolve, reject) => {
-        debugger
         const params = {
             protobufName: 'CancelOrderReq',
             funCodeName: 'CancelOrderReq',

+ 0 - 1
src/services/socket/protobuf/buildReq.ts

@@ -110,7 +110,6 @@ function buildMsgHead(funCodeName: string, params: IMessageHead) {
  * @param params SoleSearchParam
  */
 function buildSoleProtoReq50(params: SoleSearchParam): Package50 {
-    debugger
     const { protobufName, funCodeName, reqParams, Header } = params;
     // // // 消息头
     // const messageHead = buildMsgHead(funCodeName, headParam);

+ 38 - 37
src/views/search/search_document_records/search_spot_warrant/search_spot_warrant_transaction_record/index.vue

@@ -1,18 +1,19 @@
 <template>
   <!-- 单据记录 现货仓单 成交记录 -->
   <div class="topTableHeight">
-    <a-table :columns="columns"
-             class="srcollYTable expandLeftTable"
-             :scroll="{ x: '100%', y:'calc(100vh - 163px)'}"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             :expandIcon="expandIcon"
-             :expandIconAsCell="false"
-             rowKey="key"
-             :data-source="tableList">
-
+    <a-table
+      :columns="columns"
+      class="srcollYTable expandLeftTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      :expandIcon="expandIcon"
+      :expandIconAsCell="false"
+      rowKey="key"
+      :data-source="tableList"
+    >
       <!-- 成交金额 -->
       <template #amount="{ record }">
         <a>{{ record.tradeqty * record.tradeprice }}</a>
@@ -39,31 +40,31 @@ import { getWrOrderTypeName } from '@/common/constants/enumsName';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 
 export default defineComponent({
-    name: EnumRouterName.search_spot_warrant_transaction_record,
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryWrSpecialMatchOrderReq = {
-                haswr: 1,
-            };
-            queryTable(queryWrTradeDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
-            recordList: getRecordItemTab(),
-        };
-        return {
-            ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
-            loading,
-            tableList,
-            expandIcon,
-            getWrOrderTypeName,
-        };
-    },
+  name: EnumRouterName.search_spot_warrant_transaction_record,
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 1,
+      };
+      queryTable(queryWrTradeDetail, param);
+    };
+    // 表格通用逻辑
+    const param: ComposeOrderTableParam = {
+      queryFn: queryTableAction,
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
+      recordList: getRecordItemTab(),
+    };
+    return {
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
+      loading,
+      tableList,
+      expandIcon,
+      getWrOrderTypeName,
+    };
+  },
 });
 </script>
 

+ 79 - 69
src/views/search/search_document_records_commission_record_sub/search_document_records_commodity_contract/search_document_records_done_commodity_contract_history/index.vue

@@ -1,87 +1,97 @@
 <template>
   <!-- 委托记录 - 商品合约 - 历史记录-->
   <div class="topTableHeight">
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
-      <!-- 类型 -->
-      <template #buildtype="{ record }">
-        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+    <a-table
+      :columns="tabColumns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      rowKey="key"
+      :data-source="tableList"
+    >
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
       </template>
-      <!-- 状态 -->
-      <template #orderstatus="{ record }">
-        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      <template #buyorsell="{ record }">
+        <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
       </template>
-
-      <template #ordertime="{ text }">
-        <a>{{ formatTime(text) }}</a>
+      <template #marketamount="{ record, text }">
+        <span>{{ isDiaoQi(record) ? '--' : text }}</span>
       </template>
     </a-table>
   </div>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
-import { BtnList, defineAsyncComponent, defineComponent, queryTableList } from '@/common/export/commonTable';
+import { TradeMode } from '@/common/constants/enumCommon';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getBuyOrSellName } from '@/common/constants/enumsName';
+import { ComposeTableParam, defineComponent, queryTableList } from '@/common/export/commonTable';
 import { formatTime } from '@/common/methods';
-import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { expandIcon } from '@/common/setup/table/clolumn';
-import { handleComposeOrderTable } from '@/common/setup/table/compose';
-import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
-import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
-import Bus from '@/utils/eventBus/index';
+import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
+import { findGoodsTradeModeById, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { useProfitloss } from '@/services/bus/holdPosition';
+import { queryHisTradeOrderDetail } from '@/services/go/ermcp/order';
+import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
+import { QueryQuoteGoodsListRsp } from '@/services/go/Tjmd/interface';
+import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { findGoodsCode, tabColumns } from '@/views/order/commodity_contract/components/commodity_contract_summary/setup';
+import moment from 'moment';
+import { ref } from 'vue';
 
 export default defineComponent({
-    name: enumOrderComponents.commodity_contract_commission,
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryTradeOrderDetail, {});
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
-            recordList: getRecordItemTab(),
-        };
-        function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
-            //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-            const arr = [3, 7];
-            if (!arr.includes(record.orderstatus)) {
-                return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
-            } else {
-                return list;
-            }
-        }
-        // 挂牌
-        Bus.$on('spotTrade', () => {
-            queryTableAction();
-        });
-        return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getBuyOrSellTypeName,
-            getOrderStatusName,
-            filterBtnList,
-        };
-    },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
+    const { subscribeAction } = handleSubcriteQuote();
+    const swapList = ref<QueryQuoteGoodsListRsp[]>([]);
+    // 获取列表数据
+    const queryTableAction = () => {
+      const startDate = moment().format("YYYY-MM-DD")
+      const endDate = moment().add(-1, 'm').format("YYYY-MM-DD")
+      queryTable(queryHisTradeOrderDetail, { startDate, endDate })
+    };
+    // 现价
+    function getLastprice(record: QueryTradePositionRsp) {
+      let result: number | string = '--';
+      const goodscode = findGoodsCode(record.goodsid, record.goodscode, swapList.value);
+      if (goodscode) {
+        result = getQuoteDayInfoByCodeFindPrice(goodscode);
+      }
+      return result;
+    }
+    function isDiaoQi(record: QueryTradePositionRsp) {
+      return findGoodsTradeModeById(record.goodsid) === TradeMode.DiaoQi;
+    }
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_pre_sale_price,
+      tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
+      tableFilterKey: [],
+      isDetail: false,
+    };
+
+    return {
+      ...handleComposeTable<QueryTradePositionRsp>(param),
+      loading,
+      tableList,
+      tabColumns,
+      formatTime,
+      getLastprice,
+      useProfitloss,
+      findGoodsCode,
+      swapList,
+      getBuyOrSellName,
+      isDiaoQi,
+      expandIcon,
+    };
+  },
 });
 </script>
-
 <style lang="less">
-</style>;
+</style>

+ 76 - 69
src/views/search/search_document_records_commission_record_sub/search_document_records_commodity_contract/search_document_records_done_commodity_contract_today/index.vue

@@ -1,87 +1,94 @@
 <template>
-    <!-- 委托记录 - 商品合约 - 当前记录-->
+  <!-- 委托记录 - 商品合约 - 当前记录-->
   <div class="topTableHeight">
-    <a-table :columns="columns"
-             class="srcollYTable"
-             :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="key"
-             :data-source="tableList">
-      <!-- 类型 -->
-      <template #buildtype="{ record }">
-        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+    <a-table
+      :columns="tabColumns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      :pagination="false"
+      :loading="loading"
+      :expandedRowKeys="expandedRowKeys"
+      :customRow="Rowclick"
+      rowKey="key"
+      :data-source="tableList"
+    >
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
       </template>
-      <!-- 状态 -->
-      <template #orderstatus="{ record }">
-        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      <template #buyorsell="{ record }">
+        <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
       </template>
-
-      <template #ordertime="{ text }">
-        <a>{{ formatTime(text) }}</a>
+      <template #marketamount="{ record, text }">
+        <span>{{ isDiaoQi(record) ? '--' : text }}</span>
       </template>
     </a-table>
   </div>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
-import { defineComponent, queryTableList } from '@/common/export/commonTable';
+import { TradeMode } from '@/common/constants/enumCommon';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getBuyOrSellName } from '@/common/constants/enumsName';
+import { ComposeTableParam, defineComponent, queryTableList } from '@/common/export/commonTable';
 import { formatTime } from '@/common/methods';
-import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { expandIcon } from '@/common/setup/table/clolumn';
-import { handleComposeOrderTable } from '@/common/setup/table/compose';
-import { ComposeOrderTableParam } from '@/common/setup/table/interface';
+import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
+import { findGoodsTradeModeById, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { useProfitloss } from '@/services/bus/holdPosition';
 import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
-import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
-import Bus from '@/utils/eventBus/index';
+import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
+import { QueryQuoteGoodsListRsp } from '@/services/go/Tjmd/interface';
+import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { findGoodsCode, tabColumns } from '@/views/order/commodity_contract/components/commodity_contract_summary/setup';
+import { ref } from 'vue';
 
 export default defineComponent({
-    name: enumOrderComponents.commodity_contract_commission,
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryTradeOrderDetail, {});
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
-            recordList: getRecordItemTab(),
-        };
-        function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
-            //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-            const arr = [3, 7];
-            if (!arr.includes(record.orderstatus)) {
-                return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
-            } else {
-                return list;
-            }
-        }
-        // 挂牌
-        Bus.$on('spotTrade', () => {
-            queryTableAction();
-        });
-        return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getBuyOrSellTypeName,
-            getOrderStatusName,
-            filterBtnList,
-        };
-    },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
+    const { subscribeAction } = handleSubcriteQuote();
+    const swapList = ref<QueryQuoteGoodsListRsp[]>([]);
+    // 获取列表数据
+    const queryTableAction = () => {
+      queryTable(queryTradeOrderDetail, {})
+    };
+    // 现价
+    function getLastprice(record: QueryTradePositionRsp) {
+      let result: number | string = '--';
+      const goodscode = findGoodsCode(record.goodsid, record.goodscode, swapList.value);
+      if (goodscode) {
+        result = getQuoteDayInfoByCodeFindPrice(goodscode);
+      }
+      return result;
+    }
+    function isDiaoQi(record: QueryTradePositionRsp) {
+      return findGoodsTradeModeById(record.goodsid) === TradeMode.DiaoQi;
+    }
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_pre_sale_price,
+      tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
+      tableFilterKey: [],
+      isDetail: false,
+    };
+
+    return {
+      ...handleComposeTable<QueryTradePositionRsp>(param),
+      loading,
+      tableList,
+      tabColumns,
+      formatTime,
+      getLastprice,
+      useProfitloss,
+      findGoodsCode,
+      swapList,
+      getBuyOrSellName,
+      isDiaoQi,
+      expandIcon,
+    };
+  },
 });
 </script>
-
 <style lang="less">
-</style>;
+</style>

+ 9 - 11
src/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/index.vue

@@ -2,26 +2,24 @@
   <!-- 仓单贸易 -->
   <div class="topTableHeight40">
     <router-view></router-view>
-    <ThridMenu :list="tabList"
-               :selectedKey="index"
-               @selectMenu="changeTab" />
+    <ThridMenu :list="tabList" :selectedKey="index" @selectMenu="changeTab" />
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
 import ThridMenu from '@/common/components/thirdMenu/index.vue';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { handleMartketThirdRouter } from '@/common/setup/matket/router';
+import { defineComponent } from 'vue';
 
 export default defineComponent({
-    name: EnumRouterName.search_document_records_spot_warrant,
-    components: {
-        ThridMenu,
-    },
-    setup() {
-        return { ...handleMartketThirdRouter(EnumRouterName.search_document_records_spot_warrant) };
-    },
+  name: EnumRouterName.search_document_records_spot_warrant,
+  components: {
+    ThridMenu,
+  },
+  setup() {
+    return { ...handleMartketThirdRouter(EnumRouterName.search_document_records_spot_warrant) };
+  },
 });
 </script>
 <style lang="less">

+ 28 - 41
src/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/search_document_records_spot_warrant_history/index.vue

@@ -3,83 +3,70 @@
   <div class="topTableHeight">
     <a-table
       :columns="columns"
-      class="srcollYTable"
-      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      class="srcollYTable expandLeftTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
       :pagination="false"
       :loading="loading"
       :expandedRowKeys="expandedRowKeys"
       :customRow="Rowclick"
+      :expandIcon="expandIcon"
+      :expandIconAsCell="false"
       rowKey="key"
       :data-source="tableList"
     >
-      <!-- 类型 -->
-      <template #buildtype="{ record }">
-        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+      <!-- 成交金额 -->
+      <template #amount="{ record }">
+        <a>{{ record.tradeqty * record.tradeprice }}</a>
       </template>
-      <!-- 状态 -->
-      <template #orderstatus="{ record }">
-        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      <template #wrtradedetailid="{ record }">
+        <span>{{ record.wrtradeorderid }}</span>
       </template>
-
-      <template #ordertime="{ text }">
-        <a>{{ formatTime(text) }}</a>
+      <template #tradetime="{ record }">
+        <span>{{ record.ordertime }}</span>
+      </template>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
       </template>
     </a-table>
   </div>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getWrOrderTypeName } from '@/common/constants/enumsName';
 import { defineComponent, queryTableList } from '@/common/export/commonTable';
-import { formatTime } from '@/common/methods';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
-import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
-import Bus from '@/utils/eventBus/index';
+import { queryWrOrderDetail } from '@/services/go/wrtrade';
+import { QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
 
 export default defineComponent({
-  name: enumOrderComponents.commodity_contract_commission,
+  name: EnumRouterName.search_spot_warrant_transaction_record,
   setup() {
     // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
     // 获取列表数据
     const queryTableAction = () => {
-      queryTable(queryTradeOrderDetail, {});
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 1,
+      };
+      queryTable(queryWrOrderDetail, param);
     };
     // 表格通用逻辑
     const param: ComposeOrderTableParam = {
       queryFn: queryTableAction,
-      tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
       recordList: getRecordItemTab(),
     };
-    function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
-      //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-      const arr = [3, 7];
-      if (!arr.includes(record.orderstatus)) {
-        return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
-      } else {
-        return list;
-      }
-    }
-    // 挂牌
-    Bus.$on('spotTrade', () => {
-      queryTableAction();
-    });
     return {
-      ...handleComposeOrderTable<WrPerformancePlan>(param),
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
       loading,
       tableList,
-      formatTime,
       expandIcon,
-      getBuyOrSellTypeName,
-      getOrderStatusName,
-      filterBtnList,
+      getWrOrderTypeName,
     };
   },
 });

+ 42 - 40
src/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/search_document_records_spot_warrant_today/index.vue

@@ -3,87 +3,89 @@
   <div class="topTableHeight">
     <a-table
       :columns="columns"
-      class="srcollYTable"
-      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      class="srcollYTable expandLeftTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
       :pagination="false"
       :loading="loading"
       :expandedRowKeys="expandedRowKeys"
       :customRow="Rowclick"
+      :expandIcon="expandIcon"
+      :expandIconAsCell="false"
       rowKey="key"
       :data-source="tableList"
     >
-      <!-- 类型 -->
-      <template #buildtype="{ record }">
-        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+      <!-- 成交金额 -->
+      <template #amount="{ record }">
+        <a>{{ record.tradeqty * record.tradeprice }}</a>
       </template>
-      <!-- 状态 -->
-      <template #orderstatus="{ record }">
-        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+
+      <template #wrtradedetailid="{ record }">
+        <span>{{ record.wrtradeorderid }}</span>
+      </template>
+      <template #tradetime="{ record }">
+        <span>{{ record.ordertime }}</span>
       </template>
 
-      <template #ordertime="{ text }">
-        <a>{{ formatTime(text) }}</a>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
       </template>
     </a-table>
   </div>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
+import { getShowBottomValue } from '@/common/config/constrolBottom';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getWrOrderTypeName } from '@/common/constants/enumsName';
 import { defineComponent, queryTableList } from '@/common/export/commonTable';
-import { formatTime } from '@/common/methods';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
-import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
-import Bus from '@/utils/eventBus/index';
+import { queryWrOrderDetail } from '@/services/go/wrtrade';
+import { QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
 
 export default defineComponent({
-  name: enumOrderComponents.commodity_contract_commission,
+  name: EnumRouterName.search_spot_warrant_transaction_record,
   setup() {
+    const isBottom = getShowBottomValue();
     // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
     // 获取列表数据
     const queryTableAction = () => {
-      queryTable(queryTradeOrderDetail, {});
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 1,
+      };
+      queryTable(queryWrOrderDetail, param);
     };
     // 表格通用逻辑
     const param: ComposeOrderTableParam = {
       queryFn: queryTableAction,
-      tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
       recordList: getRecordItemTab(),
     };
-    function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
-      //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-      const arr = [3, 7];
-      if (!arr.includes(record.orderstatus)) {
-        return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
-      } else {
-        return list;
-      }
-    }
-    // 挂牌
-    Bus.$on('spotTrade', () => {
-      queryTableAction();
-    });
     return {
-      ...handleComposeOrderTable<WrPerformancePlan>(param),
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
+      isBottom,
       loading,
       tableList,
-      formatTime,
       expandIcon,
-      getBuyOrSellTypeName,
-      getOrderStatusName,
-      filterBtnList,
+      getWrOrderTypeName,
     };
   },
 });
 </script>
 
 <style lang="less">
+/deep/.topTable {
+  .ant-table {
+    .ant-table-content {
+      height: 100%;
+      .ant-table-scroll {
+        height: 100%;
+      }
+    }
+  }
+}
 </style>;

+ 6 - 8
src/views/search/search_document_records_done/search_document_records_done_commodity_contract/index.vue

@@ -1,18 +1,16 @@
 <template>
-   <!-- 委托记录 - 商品合约 - 历史记录-->
-  <div class="topTableHeight40">
-    <router-view></router-view>
-    <ThridMenu :list="tabList"
-               :selectedKey="index"
-               @selectMenu="changeTab" />
-  </div>
+    <!-- 委托记录 - 商品合约 - 历史记录-->
+    <div class="topTableHeight40">
+        <router-view></router-view>
+        <ThridMenu :list="tabList" :selectedKey="index" @selectMenu="changeTab" />
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
 import ThridMenu from '@/common/components/thirdMenu/index.vue';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { handleMartketThirdRouter } from '@/common/setup/matket/router';
+import { defineComponent } from 'vue';
 
 export default defineComponent({
     name: EnumRouterName.search_document_records_done_commodity_contract,

+ 92 - 60
src/views/search/search_document_records_done/search_document_records_done_commodity_contract/search_document_records_done_commodity_contract_history/index.vue

@@ -2,7 +2,7 @@
   <!-- 成交记录 - 商品合约 - 历史记录-->
   <div class="topTableHeight">
     <a-table
-      :columns="columns"
+      :columns="tabColumns"
       class="srcollYTable"
       :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
       :pagination="false"
@@ -12,78 +12,110 @@
       rowKey="key"
       :data-source="tableList"
     >
-      <!-- 类型 -->
-      <template #buildtype="{ record }">
-        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
       </template>
-      <!-- 状态 -->
-      <template #orderstatus="{ record }">
-        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      <!-- 现价 -->
+      <template #lastprice="{ record }">
+        <a>{{ getLastprice(record) }}</a>
       </template>
-
-      <template #ordertime="{ text }">
-        <a>{{ formatTime(text) }}</a>
+      <!-- 均价 -->
+      <template #averageprice="{ text }">
+        <a>{{ text ? text : 0 }}</a>
+      </template>
+      <!-- 持仓盈亏 -->
+      <template #profitloss="{ record }">
+        <span>{{ record.averageprice ? useProfitloss(record) : '--' }}</span>
+      </template>
+      <template #buyorsell="{ record }">
+        <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
+      </template>
+      <template #marketamount="{ record, text }">
+        <span>{{ isDiaoQi(record) ? '--' : text }}</span>
       </template>
     </a-table>
   </div>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
-import { defineComponent, queryTableList } from '@/common/export/commonTable';
+import { TradeMode } from '@/common/constants/enumCommon';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getBuyOrSellName } from '@/common/constants/enumsName';
+import { ComposeTableParam, defineComponent, queryTableList } from '@/common/export/commonTable';
 import { formatTime } from '@/common/methods';
-import { getRecordItemTab } from '@/common/setup/order/orderData';
+import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
+import { findGoodsTradeModeById, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { useProfitloss } from '@/services/bus/holdPosition';
+import { queryHisTradeDetail } from '@/services/go/ermcp/order';
+import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
+import { QueryQuoteGoodsListRsp } from '@/services/go/Tjmd/interface';
+import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { getSwapList } from '@/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/setup';
+import { findGoodsCode, tabColumns } from '@/views/order/commodity_contract/components/commodity_contract_summary/setup';
+import { ref } from 'vue';
 import { expandIcon } from '@/common/setup/table/clolumn';
-import { handleComposeOrderTable } from '@/common/setup/table/compose';
-import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
-import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
-import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: enumOrderComponents.commodity_contract_commission,
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryTradeOrderDetail, {});
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
-            recordList: getRecordItemTab(),
-        };
-        function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
-            //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-            const arr = [3, 7];
-            if (!arr.includes(record.orderstatus)) {
-                return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
-            } else {
-                return list;
-            }
-        }
-        // 挂牌
-        Bus.$on('spotTrade', () => {
-            queryTableAction();
+  name: EnumRouterName.search_document_records_contract_summary,
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
+    const { subscribeAction } = handleSubcriteQuote();
+    const swapList = ref<QueryQuoteGoodsListRsp[]>([]);
+    // 获取列表数据
+    const queryTableAction = () => {
+      Promise.all([queryTable(queryHisTradeDetail, {}), getSwapList()]).then((res) => {
+        swapList.value = res[1];
+        tableList.value = res[0];
+        const goodsSet = new Set<string>();
+        res[0].forEach((el) => {
+          // 商品掉期取参考行情最新价,挂牌点选取自己行情的最新价
+          const goodscode = findGoodsCode(el.goodsid, el.goodscode, swapList.value);
+          if (goodscode) {
+            goodsSet.add(goodscode);
+          }
         });
-        return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getBuyOrSellTypeName,
-            getOrderStatusName,
-            filterBtnList,
-        };
-    },
+        //  行情订阅
+        subscribeAction([...goodsSet]);
+      });
+    };
+    // 现价
+    function getLastprice(record: QueryTradePositionRsp) {
+      let result: number | string = '--';
+      const goodscode = findGoodsCode(record.goodsid, record.goodscode, swapList.value);
+      if (goodscode) {
+        result = getQuoteDayInfoByCodeFindPrice(goodscode);
+      }
+      return result;
+    }
+    function isDiaoQi(record: QueryTradePositionRsp) {
+      return findGoodsTradeModeById(record.goodsid) === TradeMode.DiaoQi;
+    }
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_pre_sale_price,
+      tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
+      tableFilterKey: [],
+      isDetail: false,
+    };
+
+    return {
+      ...handleComposeTable<QueryTradePositionRsp>(param),
+      loading,
+      tableList,
+      tabColumns,
+      formatTime,
+      getLastprice,
+      useProfitloss,
+      findGoodsCode,
+      swapList,
+      getBuyOrSellName,
+      isDiaoQi,
+      expandIcon,
+    };
+  },
 });
 </script>
-
 <style lang="less">
-</style>;
+</style>

+ 92 - 60
src/views/search/search_document_records_done/search_document_records_done_commodity_contract/search_document_records_done_commodity_contract_today/index.vue

@@ -2,7 +2,7 @@
   <!-- 成交记录 - 商品合约 - 当前记录-->
   <div class="topTableHeight">
     <a-table
-      :columns="columns"
+      :columns="tabColumns"
       class="srcollYTable"
       :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
       :pagination="false"
@@ -12,78 +12,110 @@
       rowKey="key"
       :data-source="tableList"
     >
-      <!-- 类型 -->
-      <template #buildtype="{ record }">
-        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
       </template>
-      <!-- 状态 -->
-      <template #orderstatus="{ record }">
-        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      <!-- 现价 -->
+      <template #lastprice="{ record }">
+        <a>{{ getLastprice(record) }}</a>
       </template>
-
-      <template #ordertime="{ text }">
-        <a>{{ formatTime(text) }}</a>
+      <!-- 均价 -->
+      <template #averageprice="{ text }">
+        <a>{{ text ? text : 0 }}</a>
+      </template>
+      <!-- 持仓盈亏 -->
+      <template #profitloss="{ record }">
+        <span>{{ record.averageprice ? useProfitloss(record) : '--' }}</span>
+      </template>
+      <template #buyorsell="{ record }">
+        <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
+      </template>
+      <template #marketamount="{ record, text }">
+        <span>{{ isDiaoQi(record) ? '--' : text }}</span>
       </template>
     </a-table>
   </div>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
-import { defineComponent, queryTableList } from '@/common/export/commonTable';
+import { TradeMode } from '@/common/constants/enumCommon';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getBuyOrSellName } from '@/common/constants/enumsName';
+import { ComposeTableParam, defineComponent, queryTableList } from '@/common/export/commonTable';
 import { formatTime } from '@/common/methods';
-import { getRecordItemTab } from '@/common/setup/order/orderData';
+import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
+import { findGoodsTradeModeById, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { useProfitloss } from '@/services/bus/holdPosition';
+import { queryTradeDetail } from '@/services/go/ermcp/order';
+import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
+import { QueryQuoteGoodsListRsp } from '@/services/go/Tjmd/interface';
+import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { getSwapList } from '@/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/setup';
+import { findGoodsCode, tabColumns } from '@/views/order/commodity_contract/components/commodity_contract_summary/setup';
+import { ref } from 'vue';
 import { expandIcon } from '@/common/setup/table/clolumn';
-import { handleComposeOrderTable } from '@/common/setup/table/compose';
-import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
-import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
-import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: enumOrderComponents.commodity_contract_commission,
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            queryTable(queryTradeOrderDetail, {});
-        };
-        // 表格通用逻辑
-        const param: ComposeOrderTableParam = {
-            queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
-            recordList: getRecordItemTab(),
-        };
-        function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
-            //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-            const arr = [3, 7];
-            if (!arr.includes(record.orderstatus)) {
-                return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
-            } else {
-                return list;
-            }
-        }
-        // 挂牌
-        Bus.$on('spotTrade', () => {
-            queryTableAction();
+  name: EnumRouterName.search_document_records_contract_summary,
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
+    const { subscribeAction } = handleSubcriteQuote();
+    const swapList = ref<QueryQuoteGoodsListRsp[]>([]);
+    // 获取列表数据
+    const queryTableAction = () => {
+      Promise.all([queryTable(queryTradeDetail, {}), getSwapList()]).then((res) => {
+        swapList.value = res[1];
+        tableList.value = res[0];
+        const goodsSet = new Set<string>();
+        res[0].forEach((el) => {
+          // 商品掉期取参考行情最新价,挂牌点选取自己行情的最新价
+          const goodscode = findGoodsCode(el.goodsid, el.goodscode, swapList.value);
+          if (goodscode) {
+            goodsSet.add(goodscode);
+          }
         });
-        return {
-            ...handleComposeOrderTable<WrPerformancePlan>(param),
-            loading,
-            tableList,
-            formatTime,
-            expandIcon,
-            getBuyOrSellTypeName,
-            getOrderStatusName,
-            filterBtnList,
-        };
-    },
+        //  行情订阅
+        subscribeAction([...goodsSet]);
+      });
+    };
+    // 现价
+    function getLastprice(record: QueryTradePositionRsp) {
+      let result: number | string = '--';
+      const goodscode = findGoodsCode(record.goodsid, record.goodscode, swapList.value);
+      if (goodscode) {
+        result = getQuoteDayInfoByCodeFindPrice(goodscode);
+      }
+      return result;
+    }
+    function isDiaoQi(record: QueryTradePositionRsp) {
+      return findGoodsTradeModeById(record.goodsid) === TradeMode.DiaoQi;
+    }
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_pre_sale_price,
+      tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
+      tableFilterKey: [],
+      isDetail: false,
+    };
+
+    return {
+      ...handleComposeTable<QueryTradePositionRsp>(param),
+      loading,
+      tableList,
+      tabColumns,
+      formatTime,
+      getLastprice,
+      useProfitloss,
+      findGoodsCode,
+      swapList,
+      getBuyOrSellName,
+      isDiaoQi,
+      expandIcon,
+    };
+  },
 });
 </script>
-
 <style lang="less">
-</style>;
+</style>

+ 9 - 11
src/views/search/search_document_records_done/search_document_records_done_search_spot_warrant/index.vue

@@ -2,26 +2,24 @@
   <!-- 仓单贸易 -->
   <div class="topTableHeight40">
     <router-view></router-view>
-    <ThridMenu :list="tabList"
-               :selectedKey="index"
-               @selectMenu="changeTab" />
+    <ThridMenu :list="tabList" :selectedKey="index" @selectMenu="changeTab" />
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
 import ThridMenu from '@/common/components/thirdMenu/index.vue';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { handleMartketThirdRouter } from '@/common/setup/matket/router';
+import { defineComponent } from 'vue';
 
 export default defineComponent({
-    name: EnumRouterName.search_document_records_done_search_spot_warrant,
-    components: {
-        ThridMenu,
-    },
-    setup() {
-        return { ...handleMartketThirdRouter(EnumRouterName.search_document_records_done_search_spot_warrant) };
-    },
+  name: EnumRouterName.search_document_records_done_search_spot_warrant,
+  components: {
+    ThridMenu,
+  },
+  setup() {
+    return { ...handleMartketThirdRouter(EnumRouterName.search_document_records_done_search_spot_warrant) };
+  },
 });
 </script>
 <style lang="less">

+ 28 - 41
src/views/search/search_document_records_done/search_document_records_done_search_spot_warrant/search_document_records_done_search_spot_warrant_history/index.vue

@@ -3,83 +3,70 @@
   <div class="topTableHeight">
     <a-table
       :columns="columns"
-      class="srcollYTable"
-      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      class="srcollYTable expandLeftTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
       :pagination="false"
       :loading="loading"
       :expandedRowKeys="expandedRowKeys"
       :customRow="Rowclick"
+      :expandIcon="expandIcon"
+      :expandIconAsCell="false"
       rowKey="key"
       :data-source="tableList"
     >
-      <!-- 类型 -->
-      <template #buildtype="{ record }">
-        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+      <!-- 成交金额 -->
+      <template #amount="{ record }">
+        <a>{{ record.tradeqty * record.tradeprice }}</a>
       </template>
-      <!-- 状态 -->
-      <template #orderstatus="{ record }">
-        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      <template #wrtradedetailid="{ record }">
+        <span>{{ record.wrtradeorderid }}</span>
       </template>
-
-      <template #ordertime="{ text }">
-        <a>{{ formatTime(text) }}</a>
+      <template #tradetime="{ record }">
+        <span>{{ record.ordertime }}</span>
+      </template>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
       </template>
     </a-table>
   </div>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getWrOrderTypeName } from '@/common/constants/enumsName';
 import { defineComponent, queryTableList } from '@/common/export/commonTable';
-import { formatTime } from '@/common/methods';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
-import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
-import Bus from '@/utils/eventBus/index';
+import { queryWrTradeDetail } from '@/services/go/wrtrade';
+import { QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
 
 export default defineComponent({
-  name: enumOrderComponents.commodity_contract_commission,
+  name: EnumRouterName.search_spot_warrant_transaction_record,
   setup() {
     // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
     // 获取列表数据
     const queryTableAction = () => {
-      queryTable(queryTradeOrderDetail, {});
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 1,
+      };
+      queryTable(queryWrTradeDetail, param);
     };
     // 表格通用逻辑
     const param: ComposeOrderTableParam = {
       queryFn: queryTableAction,
-      tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
       recordList: getRecordItemTab(),
     };
-    function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
-      //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-      const arr = [3, 7];
-      if (!arr.includes(record.orderstatus)) {
-        return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
-      } else {
-        return list;
-      }
-    }
-    // 挂牌
-    Bus.$on('spotTrade', () => {
-      queryTableAction();
-    });
     return {
-      ...handleComposeOrderTable<WrPerformancePlan>(param),
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
       loading,
       tableList,
-      formatTime,
       expandIcon,
-      getBuyOrSellTypeName,
-      getOrderStatusName,
-      filterBtnList,
+      getWrOrderTypeName,
     };
   },
 });

+ 28 - 41
src/views/search/search_document_records_done/search_document_records_done_search_spot_warrant/search_document_records_done_search_spot_warrant_today/index.vue

@@ -3,83 +3,70 @@
   <div class="topTableHeight">
     <a-table
       :columns="columns"
-      class="srcollYTable"
-      :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+      class="srcollYTable expandLeftTable"
+      :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
       :pagination="false"
       :loading="loading"
       :expandedRowKeys="expandedRowKeys"
       :customRow="Rowclick"
+      :expandIcon="expandIcon"
+      :expandIconAsCell="false"
       rowKey="key"
       :data-source="tableList"
     >
-      <!-- 类型 -->
-      <template #buildtype="{ record }">
-        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+      <!-- 成交金额 -->
+      <template #amount="{ record }">
+        <a>{{ record.tradeqty * record.tradeprice }}</a>
       </template>
-      <!-- 状态 -->
-      <template #orderstatus="{ record }">
-        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      <template #wrtradedetailid="{ record }">
+        <span>{{ record.wrtradeorderid }}</span>
       </template>
-
-      <template #ordertime="{ text }">
-        <a>{{ formatTime(text) }}</a>
+      <template #tradetime="{ record }">
+        <span>{{ record.ordertime }}</span>
+      </template>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
       </template>
     </a-table>
   </div>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getWrOrderTypeName } from '@/common/constants/enumsName';
 import { defineComponent, queryTableList } from '@/common/export/commonTable';
-import { formatTime } from '@/common/methods';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
-import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
-import { WrPerformancePlan } from '@/services/go/wrtrade/interface';
-import Bus from '@/utils/eventBus/index';
+import { queryWrTradeDetail } from '@/services/go/wrtrade';
+import { QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
 
 export default defineComponent({
-  name: enumOrderComponents.commodity_contract_commission,
+  name: EnumRouterName.search_spot_warrant_transaction_record,
   setup() {
     // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
+    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
     // 获取列表数据
     const queryTableAction = () => {
-      queryTable(queryTradeOrderDetail, {});
+      const param: QueryWrSpecialMatchOrderReq = {
+        haswr: 1,
+      };
+      queryTable(queryWrTradeDetail, param);
     };
     // 表格通用逻辑
     const param: ComposeOrderTableParam = {
       queryFn: queryTableAction,
-      tableName: 'table_pcweb_spot_trade_bottom_commodity_contract_commission',
+      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
       recordList: getRecordItemTab(),
     };
-    function filterBtnList(list: BtnListType[], record: QueryTradeOrderDetailRsp) {
-      //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
-      const arr = [3, 7];
-      if (!arr.includes(record.orderstatus)) {
-        return list.filter((e) => e.code !== 'commodity_contract_commission_cancel_order');
-      } else {
-        return list;
-      }
-    }
-    // 挂牌
-    Bus.$on('spotTrade', () => {
-      queryTableAction();
-    });
     return {
-      ...handleComposeOrderTable<WrPerformancePlan>(param),
+      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
       loading,
       tableList,
-      formatTime,
       expandIcon,
-      getBuyOrSellTypeName,
-      getOrderStatusName,
-      filterBtnList,
+      getWrOrderTypeName,
     };
   },
 });