Forráskód Böngészése

修改 查询 委托单 现货仓单

huangbin 4 éve
szülő
commit
700495d538

+ 1 - 1
src/router/index.ts

@@ -2005,7 +2005,7 @@ const routes: Array<RouteRecordRaw> = [
                             {
                                 path: '/search_document_records_spot_warrant_history',
                                 name: 'search_document_records_spot_warrant_history',
-                                component: () => import('@/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/search_document_records_spot_warrant_today/index.vue'),
+                                component: () => import('@/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/search_document_records_spot_warrant_history/index.vue'),
                                 meta: {
                                     requireAuth: true,
                                 },

+ 2 - 0
src/services/go/wrtrade/interface.ts

@@ -88,6 +88,8 @@ export interface QueryWrOrderDetailReq {
     userid?: number//        用户id
     marketid?: number//     仓单贸易市场id
     haswr: 0 | 1//         是否有仓单 0-没有 1-有(仓单贸易填1,仓单预售填0)
+    begindate?: string // 开始交易日(yyyymmdd)
+    enddate?: string // 结束交易日(yyyymmdd)
 }
 
 /**

+ 42 - 25
src/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/search_document_records_spot_warrant_history/index.vue

@@ -1,10 +1,10 @@
 <template>
-  <!-- 委托记录 - 现货仓单 - 历史记录-->
-  <div class="topTableHeight">
+  <!-- 委托记录 - 现货仓单 - 当前记录  -->
+  <section class="topTableHeight">
     <a-table
-      :columns="columns"
-      class="srcollYTable expandLeftTable"
-      :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
+      :columns="tableColumns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: '190px' }"
       :pagination="false"
       :loading="loading"
       :expandedRowKeys="expandedRowKeys"
@@ -14,59 +14,76 @@
       rowKey="key"
       :data-source="tableList"
     >
-      <!-- 成交金额 -->
-      <template #amount="{ record }">
-        <a>{{ record.tradeqty * record.tradeprice }}</a>
-      </template>
-      <template #wrtradedetailid="{ record }">
-        <span>{{ record.wrtradeorderid }}</span>
-      </template>
-      <template #tradetime="{ record }">
-        <span>{{ record.ordertime }}</span>
+      <!--  委托状态-->
+      <template #wrtradeorderstatus="{ record }">
+        <a>{{ getOrderStatusName(record.wrtradeorderstatus) }}</a>
       </template>
       <!-- 挂牌类型 -->
       <template #wrtradetype="{ record }">
         <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
       </template>
+      <!-- 挂牌方式 -->
+      <template #wrpricetype="{ record }">
+        <span>{{ getWrPriceType(record) }}</span>
+      </template>
+      <!-- 价格/基差 -->
+      <template #futushow="{ record }">
+        <span>{{ showPriceOrMove(record) }}</span>
+      </template>
+      <!-- 挂牌价格 -->
     </a-table>
-  </div>
+  </section>
 </template>
 
 <script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { getWrOrderTypeName } from '@/common/constants/enumsName';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+import { getOrderStatusName, getWrOrderTypeName } from '@/common/constants/enumsName';
 import { defineComponent, queryTableList } from '@/common/export/commonTable';
 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 { queryWrOrderDetail } from '@/services/go/wrtrade';
-import { QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
+import { QueryWrOrderDetailReq, WrOrderDetail } from '@/services/go/wrtrade/interface';
+import Bus from '@/utils/eventBus';
+import { useOrderWarrant } from '@/views/order/setup';
+import moment from 'moment';
 
 export default defineComponent({
-  name: EnumRouterName.search_spot_warrant_transaction_record,
+  name: enumOrderComponents.spot_warrant_pending_order,
   setup() {
     // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
+    const { loading, tableList, queryTable } = queryTableList<WrOrderDetail>();
     // 获取列表数据
     const queryTableAction = () => {
-      const param: QueryWrSpecialMatchOrderReq = {
+      const param: QueryWrOrderDetailReq = {
+        enddate: moment().format("YYYYMMDD"),
+        begindate: moment().subtract(2, 'months').startOf('month').format("YYYYMMDD"),
         haswr: 1,
-      };
+      }
       queryTable(queryWrOrderDetail, param);
     };
+    Bus.$on('blocsTrade', () => {
+      queryTableAction();
+    });
+
+    const { tableColumns, getWrPriceType, isShowBarginBtn, showPriceOrMove } = useOrderWarrant(1);
     // 表格通用逻辑
     const param: ComposeOrderTableParam = {
       queryFn: queryTableAction,
-      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
       recordList: getRecordItemTab(),
+      isDetail: true,
     };
     return {
-      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
+      ...handleComposeOrderTable<WrOrderDetail>(param),
       loading,
       tableList,
-      expandIcon,
+      getOrderStatusName,
       getWrOrderTypeName,
+      expandIcon,
+      tableColumns,
+      getWrPriceType,
+      showPriceOrMove,
     };
   },
 });

+ 38 - 39
src/views/search/search_document_records_commission_record_sub/search_document_records_spot_warrant/search_document_records_spot_warrant_today/index.vue

@@ -1,10 +1,10 @@
 <template>
-  <!-- 委托记录 - 现货仓单 - 当前记录-->
-  <div class="topTableHeight">
+  <!-- 委托记录 - 现货仓单 - 当前记录  -->
+  <section class="topTableHeight">
     <a-table
-      :columns="columns"
-      class="srcollYTable expandLeftTable"
-      :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
+      :columns="tableColumns"
+      class="srcollYTable"
+      :scroll="{ x: '100%', y: '190px' }"
       :pagination="false"
       :loading="loading"
       :expandedRowKeys="expandedRowKeys"
@@ -14,78 +14,77 @@
       rowKey="key"
       :data-source="tableList"
     >
-      <!-- 成交金额 -->
-      <template #amount="{ record }">
-        <a>{{ record.tradeqty * record.tradeprice }}</a>
+      <!--  委托状态-->
+      <template #wrtradeorderstatus="{ record }">
+        <a>{{ getOrderStatusName(record.wrtradeorderstatus) }}</a>
       </template>
-
-      <template #wrtradedetailid="{ record }">
-        <span>{{ record.wrtradeorderid }}</span>
-      </template>
-      <template #tradetime="{ record }">
-        <span>{{ record.ordertime }}</span>
-      </template>
-
       <!-- 挂牌类型 -->
       <template #wrtradetype="{ record }">
         <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
       </template>
+      <!-- 挂牌方式 -->
+      <template #wrpricetype="{ record }">
+        <span>{{ getWrPriceType(record) }}</span>
+      </template>
+      <!-- 价格/基差 -->
+      <template #futushow="{ record }">
+        <span>{{ showPriceOrMove(record) }}</span>
+      </template>
+      <!-- 挂牌价格 -->
     </a-table>
-  </div>
+  </section>
 </template>
 
 <script lang="ts">
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { getWrOrderTypeName } from '@/common/constants/enumsName';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+import { getOrderStatusName, getWrOrderTypeName } from '@/common/constants/enumsName';
 import { defineComponent, queryTableList } from '@/common/export/commonTable';
 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 { queryWrOrderDetail } from '@/services/go/wrtrade';
-import { QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
+import { QueryWrOrderDetailReq, WrOrderDetail } from '@/services/go/wrtrade/interface';
+import Bus from '@/utils/eventBus';
+import { useOrderWarrant } from '@/views/order/setup';
 
 export default defineComponent({
-  name: EnumRouterName.search_spot_warrant_transaction_record,
+  name: enumOrderComponents.spot_warrant_pending_order,
   setup() {
-    const isBottom = getShowBottomValue();
     // 表格列表数据
-    const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
+    const { loading, tableList, queryTable } = queryTableList<WrOrderDetail>();
     // 获取列表数据
     const queryTableAction = () => {
-      const param: QueryWrSpecialMatchOrderReq = {
+      const param: QueryWrOrderDetailReq = {
         haswr: 1,
       };
       queryTable(queryWrOrderDetail, param);
     };
+    Bus.$on('blocsTrade', () => {
+      queryTableAction();
+    });
+
+    const { tableColumns, getWrPriceType, isShowBarginBtn, showPriceOrMove } = useOrderWarrant(1);
     // 表格通用逻辑
     const param: ComposeOrderTableParam = {
       queryFn: queryTableAction,
-      tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
       recordList: getRecordItemTab(),
+      isDetail: true,
     };
     return {
-      ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
-      isBottom,
+      ...handleComposeOrderTable<WrOrderDetail>(param),
       loading,
       tableList,
-      expandIcon,
+      getOrderStatusName,
       getWrOrderTypeName,
+      expandIcon,
+      tableColumns,
+      getWrPriceType,
+      showPriceOrMove,
     };
   },
 });
 </script>
 
 <style lang="less">
-/deep/.topTable {
-  .ant-table {
-    .ant-table-content {
-      height: 100%;
-      .ant-table-scroll {
-        height: 100%;
-      }
-    }
-  }
-}
 </style>;