소스 검색

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa 4 년 전
부모
커밋
d1d805f87d
19개의 변경된 파일466개의 추가작업 그리고 273개의 파일을 삭제
  1. 0 3
      src/assets/styles/index.css
  2. 0 3
      src/assets/styles/index.less
  3. 50 8
      src/common/setup/table/tableQuote.ts
  4. 3 0
      src/services/bus/goods.ts
  5. 1 1
      src/services/go/quote/index.ts
  6. 1 0
      src/services/go/wrtrade/interface.ts
  7. 41 36
      src/services/socket/quota/adapter/index.ts
  8. 3 2
      src/views/market/spot_trade/spot_trade_order_transaction/components/buy-market/index.vue
  9. 0 141
      src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/components/buy/index.vue
  10. 26 7
      src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/index.vue
  11. 3 6
      src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/index.vue
  12. 3 2
      src/views/market/spot_trade/spot_trade_order_transaction/components/detail/index.vue
  13. 10 5
      src/views/market/spot_trade/spot_trade_order_transaction/components/listing/index.vue
  14. 33 34
      src/views/market/spot_trade/spot_trade_order_transaction/components/sell-market/index.vue
  15. 110 0
      src/views/market/spot_trade/spot_trade_order_transaction/components/stock-exchange/index.vue
  16. 33 7
      src/views/market/spot_trade/spot_trade_order_transaction/setup.ts
  17. 54 5
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_basis_difference/index.vue
  18. 54 5
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_listing_transfer/index.vue
  19. 41 8
      src/views/market/spot_trade/spot_trade_reference_market/index.vue

+ 0 - 3
src/assets/styles/index.css

@@ -2403,9 +2403,6 @@ body {
   width: 100%;
   height: 100%;
 }
-.default-quote-color {
-  color: var(--m-white5);
-}
 .up-quote-color {
   color: #FF2B2B;
 }

+ 0 - 3
src/assets/styles/index.less

@@ -311,9 +311,6 @@ body {
 }
 
 // 行情涨跌颜色
-.default-quote-color {
-    color: @m-white5;
-}
 .up-quote-color {
     color: @m-red1;
 }

+ 50 - 8
src/common/setup/table/tableQuote.ts

@@ -1,3 +1,4 @@
+import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
 import { addSubscribeQuotation, removeSubscribeQuotation } from '@/services/socket/quota';
 import TimerUtils from '@/utils/timer/timerUtil';
 import { v4 } from 'uuid';
@@ -10,7 +11,7 @@ import { onBeforeUnmount, onMounted, Ref, ref, watchEffect } from "vue";
  * @param itemTableHeight 表格每一行的高度
  * @param selector 当前的滚动区域的选择器
  */
-export function handleSubcriteQuote<T extends object>(tableList: Ref<T[]>, codeKey = 'goodscode', itemTableHeight = 35, selector = '.ant-table-body') {
+export function handleSubcriteQuote<T extends object>(tableList: Ref<T[]>, codeKey = 'goodscode', itemTableHeight = 31, selector = '.ant-table-body') {
     const beforeScrollTop = ref<number>(0)
     const uuid = v4();
     onMounted(() => {
@@ -87,18 +88,59 @@ export function handleSubcriteQuote<T extends object>(tableList: Ref<T[]>, codeK
     }
 }
 
+function isPrice(price1: number | string, price2: number | string) {
+    if (price2 && price2 !== '--' && price1 && price1 !== '--') {
+        return true
+    } else {
+        return false
+    }
+}
+
 /**
  * 处理行情价格颜色
  * @param price1
  * @param price2
  * @returns
  */
-export function handleQuotePriceColor(price1: number, price2: number) {
-    if (price1 === price2) {
-        return 'default-quote-color'
-    } else if (price1 > price2) {
-        return 'up-quote-color'
-    } else {
-        return 'down-quote-color'
+export function handleQuotePriceColor(record: QueryQuoteDayRsp) {
+    const { presettle, bid } = record
+    let result = ''
+    if (isPrice(bid, presettle)) {
+        if (bid === presettle) {
+            result = ''
+        } else if (bid > presettle) {
+            result = 'up-quote-color'
+        } else {
+            result = 'down-quote-color'
+        }
+    }
+    return result
+}
+
+// 涨跌 最新价 - 昨结价
+export function quoteChange(record: QueryQuoteDayRsp, decimalplace = 2) {
+    const { presettle, last } = record
+    let result = '--'
+    if (isPrice(last, presettle)) {
+        result = (last - presettle).toFixed(decimalplace)
+    }
+    return result
+}
+
+// 幅度(最新价 - 昨结价) / 100 %
+export function quoteAmplitude(record: QueryQuoteDayRsp, decimalplace = 2) {
+    const result = quoteChange(record, decimalplace)
+    return result === '--' ? '--' : (+result / 100).toFixed(decimalplace) + '%'
+}
+
+// (最高价 - 最低价 ) / 最新价  * 100 %
+export function quoteAmplituOfVibration(record: QueryQuoteDayRsp, decimalplace = 2) {
+    const { highest, lowest, last } = record
+    let result = '--'
+    if (isPrice(highest, lowest)) {
+        if (last && (last as unknown as any) !== '--') {
+            result = ((highest - lowest) / last * 100).toFixed(decimalplace) + '%'
+        }
     }
+    return result
 }

+ 3 - 0
src/services/bus/goods.ts

@@ -28,10 +28,13 @@ export function getGoodsListByTrade(trademode: TradeMode): Ref<Goods[]> {
 export function getQutoGoodsByTradeMode(trademode: TradeMode) {
     const result = ref<QueryQuoteDayRsp[]>([])
     initData(() => {
+        // 获取市场信息
         const marketInfo = getMarketByTradeMode(trademode)
         if (marketInfo) {
+            // 过滤商品信息
             const goodsList = getGoodsList().filter(e => e.marketid === marketInfo.marketid)
             goodsList.forEach(el => {
+                // 找到行情数据
                 const quote = getQuoteDayInfoByCode(el.goodscode);
                 if (quote) {
                     Object.assign(quote, { goodsname: el.goodsname })

+ 1 - 1
src/services/go/quote/index.ts

@@ -15,7 +15,7 @@ export function QueryHistoryDatas(param: type.QueryHistoryDatas): Promise<type.Q
  * @param param QueryHistoryTikDatas
  * @returns QueryHistoryTikDatasRsp
  */
-export function QueryHistoryTikDatas(param: type.QueryHistoryTikDatas): Promise<type.QueryHistoryTikDatasRsp> {
+export function QueryHistoryTikDatas(param: type.QueryHistoryTikDatas): Promise<type.QueryHistoryTikDatasRsp[]> {
     return commonSearch_go('/Quote/QueryHistoryTikDatas', param)
 }
 

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

@@ -946,6 +946,7 @@ export interface WrTradeOrderDetailRsp {
     goodsid: number;//商品id
     orderid: string;//委托单号
     orderprice: number;//委托价格
+    orderqty: number; // 委托数量
     userid: number;//用户id
     username: string;//用户名称(已脱敏)
 }

+ 41 - 36
src/services/socket/quota/adapter/index.ts

@@ -127,42 +127,47 @@ export function parseReceivePush(quotationData: any) {
                 const decimalplace = goods.decimalplace
                 const num = Math.pow(10, decimalplace)
                 const fn = (value: number) => +(value / num).toFixed(decimalplace)
-                goodsQuoteTik.last && (goodsQuoteTik.last = fn(goodsQuoteTik.last))
-                goodsQuoteTik.settle && (goodsQuoteTik.settle = fn(goodsQuoteTik.settle))
-                goodsQuoteTik.presettle && (goodsQuoteTik.presettle = fn(goodsQuoteTik.presettle))
-                goodsQuoteTik.ask && (goodsQuoteTik.ask = fn(goodsQuoteTik.ask))
-                goodsQuoteTik.ask2 && (goodsQuoteTik.ask2 = fn(goodsQuoteTik.ask2))
-                goodsQuoteTik.ask3 && (goodsQuoteTik.ask3 = fn(goodsQuoteTik.ask3))
-                goodsQuoteTik.ask4 && (goodsQuoteTik.ask4 = fn(goodsQuoteTik.ask4))
-                goodsQuoteTik.ask5 && (goodsQuoteTik.ask5 = fn(goodsQuoteTik.ask5))
-                goodsQuoteTik.ask6 && (goodsQuoteTik.ask6 = fn(goodsQuoteTik.ask6))
-                goodsQuoteTik.ask7 && (goodsQuoteTik.ask7 = fn(goodsQuoteTik.ask7))
-                goodsQuoteTik.ask8 && (goodsQuoteTik.ask8 = fn(goodsQuoteTik.ask8))
-                goodsQuoteTik.ask9 && (goodsQuoteTik.ask9 = fn(goodsQuoteTik.ask9))
-                goodsQuoteTik.ask10 && (goodsQuoteTik.ask10 = fn(goodsQuoteTik.ask10))
-                goodsQuoteTik.bid && (goodsQuoteTik.bid = fn(goodsQuoteTik.bid))
-                goodsQuoteTik.bid2 && (goodsQuoteTik.bid2 = fn(goodsQuoteTik.bid2))
-                goodsQuoteTik.bid3 && (goodsQuoteTik.bid3 = fn(goodsQuoteTik.bid3))
-                goodsQuoteTik.bid4 && (goodsQuoteTik.bid4 = fn(goodsQuoteTik.bid4))
-                goodsQuoteTik.bid5 && (goodsQuoteTik.bid5 = fn(goodsQuoteTik.bid5))
-                goodsQuoteTik.bid6 && (goodsQuoteTik.bid6 = fn(goodsQuoteTik.bid6))
-                goodsQuoteTik.bid7 && (goodsQuoteTik.bid7 = fn(goodsQuoteTik.bid7))
-                goodsQuoteTik.bid8 && (goodsQuoteTik.bid8 = fn(goodsQuoteTik.bid8))
-                goodsQuoteTik.bid9 && (goodsQuoteTik.bid9 = fn(goodsQuoteTik.bid9))
-                goodsQuoteTik.bid10 && (goodsQuoteTik.bid10 = fn(goodsQuoteTik.bid10))
-                goodsQuoteTik.averageprice && (goodsQuoteTik.averageprice = fn(goodsQuoteTik.averageprice))
-                goodsQuoteTik.grepmarketprice && (goodsQuoteTik.grepmarketprice = fn(goodsQuoteTik.grepmarketprice))
-                goodsQuoteTik.highest && (goodsQuoteTik.highest = fn(goodsQuoteTik.highest))
-                goodsQuoteTik.iep && (goodsQuoteTik.iep = fn(goodsQuoteTik.iep))
-                goodsQuoteTik.last && (goodsQuoteTik.last = fn(goodsQuoteTik.last))
-                goodsQuoteTik.limitdown && (goodsQuoteTik.limitdown = fn(goodsQuoteTik.limitdown))
-                goodsQuoteTik.limitup && (goodsQuoteTik.limitup = fn(goodsQuoteTik.limitup))
-                goodsQuoteTik.lowest && (goodsQuoteTik.lowest = fn(goodsQuoteTik.lowest))
-                goodsQuoteTik.opened && (goodsQuoteTik.opened = fn(goodsQuoteTik.opened))
-                goodsQuoteTik.preclose && (goodsQuoteTik.preclose = fn(goodsQuoteTik.preclose))
-                goodsQuoteTik.presettle && (goodsQuoteTik.presettle = fn(goodsQuoteTik.presettle))
-                goodsQuoteTik.settle && (goodsQuoteTik.settle = fn(goodsQuoteTik.settle))
-                goodsQuoteTik.strikeprice && (goodsQuoteTik.strikeprice = fn(goodsQuoteTik.strikeprice))
+                goodsQuoteTik.decimalplace = decimalplace
+                goodsQuoteTik.last = goodsQuoteTik.last ? fn(goodsQuoteTik.last) : '--'
+                goodsQuoteTik.presettle = goodsQuoteTik.presettle ? (fn(goodsQuoteTik.presettle)) : '--'
+                goodsQuoteTik.ask = goodsQuoteTik.ask ? (fn(goodsQuoteTik.ask)) : '--'
+                goodsQuoteTik.ask2 = goodsQuoteTik.ask2 ? (fn(goodsQuoteTik.ask2)) : '--'
+                goodsQuoteTik.ask3 = goodsQuoteTik.ask3 ? (fn(goodsQuoteTik.ask3)) : '--'
+                goodsQuoteTik.ask4 = goodsQuoteTik.ask4 ? (fn(goodsQuoteTik.ask4)) : '--'
+                goodsQuoteTik.ask5 = goodsQuoteTik.ask5 ? (fn(goodsQuoteTik.ask5)) : '--'
+                goodsQuoteTik.ask6 = goodsQuoteTik.ask6 ? (fn(goodsQuoteTik.ask6)) : '--'
+                goodsQuoteTik.ask7 = goodsQuoteTik.ask7 ? (fn(goodsQuoteTik.ask7)) : '--'
+                goodsQuoteTik.ask8 = goodsQuoteTik.ask8 ? (fn(goodsQuoteTik.ask8)) : '--'
+                goodsQuoteTik.ask9 = goodsQuoteTik.ask9 ? (fn(goodsQuoteTik.ask9)) : '--'
+                goodsQuoteTik.ask10 = goodsQuoteTik.ask10 ? (fn(goodsQuoteTik.ask10)) : '--'
+                goodsQuoteTik.bid = goodsQuoteTik.bid ? (fn(goodsQuoteTik.bid)) : '--'
+                goodsQuoteTik.bid2 = goodsQuoteTik.bid2 ? (fn(goodsQuoteTik.bid2)) : '--'
+                goodsQuoteTik.bid3 = goodsQuoteTik.bid3 ? (fn(goodsQuoteTik.bid3)) : '--'
+                goodsQuoteTik.bid4 = goodsQuoteTik.bid4 ? (fn(goodsQuoteTik.bid4)) : '--'
+                goodsQuoteTik.bid5 = goodsQuoteTik.bid5 ? (fn(goodsQuoteTik.bid5)) : '--'
+                goodsQuoteTik.bid6 = goodsQuoteTik.bid6 ? (fn(goodsQuoteTik.bid6)) : '--'
+                goodsQuoteTik.bid7 = goodsQuoteTik.bid7 ? (fn(goodsQuoteTik.bid7)) : '--'
+                goodsQuoteTik.bid8 = goodsQuoteTik.bid8 ? (fn(goodsQuoteTik.bid8)) : '--'
+                goodsQuoteTik.bid9 = goodsQuoteTik.bid9 ? (fn(goodsQuoteTik.bid9)) : '--'
+                goodsQuoteTik.bid10 = goodsQuoteTik.bid10 ? (fn(goodsQuoteTik.bid10)) : '--'
+                goodsQuoteTik.averageprice = goodsQuoteTik.averageprice ? (fn(goodsQuoteTik.averageprice)) : '--'
+                goodsQuoteTik.grepmarketprice = goodsQuoteTik.grepmarketprice ? (fn(goodsQuoteTik.grepmarketprice)) : '--'
+                goodsQuoteTik.highest = goodsQuoteTik.highest ? (fn(goodsQuoteTik.highest)) : '--'
+                goodsQuoteTik.iep = goodsQuoteTik.iep ? (fn(goodsQuoteTik.iep)) : '--'
+                goodsQuoteTik.limitdown = goodsQuoteTik.limitdown ? (fn(goodsQuoteTik.limitdown)) : '--'
+                goodsQuoteTik.limitup = goodsQuoteTik.limitup ? (fn(goodsQuoteTik.limitup)) : '--'
+                goodsQuoteTik.lowest = goodsQuoteTik.lowest ? (fn(goodsQuoteTik.lowest)) : '--'
+                goodsQuoteTik.opened = goodsQuoteTik.opened ? (fn(goodsQuoteTik.opened)) : '--'
+                goodsQuoteTik.preclose = goodsQuoteTik.preclose ? (fn(goodsQuoteTik.preclose)) : '--'
+                goodsQuoteTik.settle = goodsQuoteTik.settle ? (fn(goodsQuoteTik.settle)) : '--'
+                goodsQuoteTik.strikeprice = goodsQuoteTik.strikeprice ? (fn(goodsQuoteTik.strikeprice)) : '--'
+
+                // !goodsQuoteTik.bidvolume && (goodsQuoteTik.bidvolume = '--')
+                // !goodsQuoteTik.askvolume && (goodsQuoteTik.askvolume = '--')
+                !goodsQuoteTik.lastvolume && (goodsQuoteTik.lastvolume = '--')
+                !goodsQuoteTik.holdvolume && (goodsQuoteTik.holdvolume = '--')
+                !goodsQuoteTik.holdincrement && (goodsQuoteTik.holdincrement = '--')
+                // !goodsQuoteTik.totalturnover && (goodsQuoteTik.totalturnover = '--')
 
             } else {
                 console.warn(`行情推送的商品goods:${itemQuote.goodscode}在商品列表里不存在`)

+ 3 - 2
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-market/index.vue

@@ -29,8 +29,8 @@
   <component :is="componentId"
              v-if="componentId"
              :selectedRow="selectedRow"
-             :buyOrSell="BuyOrSell.buy"
              :parantSelectedRow="parantSelectedRow"
+             :buyOrSell="BuyOrSell.buy"
              @cancel="closeComponent"></component>
 </template>
 
@@ -48,13 +48,14 @@ import { ColumnType } from '@/common/methods/table/interface';
 import { getShowBottomValue } from '@/common/config/constrolBottom';
 import { TableParam } from '@/common/setup/table/interface';
 import { handleTableEventAndData } from '@/common/setup/table/compose';
+import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 
 export default defineComponent({
     emits: ['cancel', 'openComponent'],
     name: 'warehouse_receipt_trade_price_delisting_buy',
     props: {
         parantSelectedRow: {
-            type: Object as PropType<WrOrderQuote>,
+            type: Object as PropType<QueryDeliveryRelationRsp>,
             default: {},
         },
     },

+ 0 - 141
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/components/buy/index.vue

@@ -1,141 +0,0 @@
-<template>
-    <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
-    <a-table
-        :columns="handleColumn(columns)"
-        :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']"
-        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 470px)' : 'calc(100vh - 145px)' }"
-        :pagination="false"
-        :loading="loading"
-        :expandedRowKeys="expandedRowKeys"
-        :customRow="Rowclick"
-        :expandIcon="expandIcon"
-        :expandIconAsCell="false"
-        rowKey="key"
-        :data-source="tableList"
-    >
-        <!-- ,  -->
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList
-                :btnList="btnList"
-                :record="record"
-                class="btn-list-sticky"
-                @click="openComponent"
-            />
-        </template>
-        <template #username="{text, record }">
-            <span>{{record.userid + " "}}{{text}}</span>
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :buyOrSell="BuyOrSell.buy"
-        :enumName="enumName"
-        :parantSelectedRow="parantSelectedRow"
-        @cancel="closeComponent"
-    ></component>
-</template>
-
-<script lang="ts">
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { ComposeTableParam, BtnList, defineComponent, handleComposeTable, queryTableList, ModalEnum } from '@/common/export/commonTable';
-import { _closeModal } from '@/common/setup/modal/modal';
-import { queryOrderQuoteDetail } from '@/services/go/wrtrade';
-import { QueryOrderQuoteDetailReq, WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
-import { defineAsyncComponent, PropType } from 'vue';
-import { BtnList as btnListType } from '@/common/components/btnList/interface';
-import { getBuyMarketParam } from '../../setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
-import { expandIcon } from '@/common/setup/table/clolumn';
-import { ColumnType } from '@/common/methods/table/interface';
-import { Moment } from 'moment';
-import moment from 'moment';
-import { getShowBottomValue } from '@/common/config/constrolBottom';
-
-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: {},
-        },
-        time: {
-            type: Object as PropType<Moment>,
-            default: moment(),
-        },
-    },
-    components: {
-        BtnList,
-        [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
-    },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        console.log(isBottom.value, 'isBottom');
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuoteDetail>();
-        const { wrpricetype, haswr, tableKey } = getBuyMarketParam(props.enumName);
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryOrderQuoteDetailReq = {
-                buyorsell: 0,
-                wrpricetype,
-                haswr,
-                wrfactortypeid: props.parantSelectedRow.wrfactortypeid,
-                goodsid: props.parantSelectedRow.goodsid,
-            };
-            if (!haswr) {
-                // 无仓单 需要交收月过滤数据
-                param.deliverymonth = moment(props.time).format('YYYY-MM');
-            }
-            queryTable(queryOrderQuoteDetail, param);
-        };
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: props.enumName,
-            tableName: tableKey,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        function handleColumn(columns: ColumnType[]) {
-            columns.forEach((item) => {
-                if (item.dataIndex == 'username') {
-                    delete item.width;
-                }
-            });
-            return columns;
-        }
-        function handleBtnList() {}
-        return {
-            isBottom,
-            ...handleComposeTable<WrOrderQuoteDetail>(param),
-            queryTableAction,
-            BuyOrSell,
-            loading,
-            tableList,
-            enumName: props.enumName,
-            expandIcon,
-            handleColumn,
-        };
-    },
-});
-</script>
-<style lang="less">
-.buy-sell-market {
-    .btnDeafault.ant-btn {
-        height: 28px;
-        line-height: 28px;
-    }
-}
-</style>

+ 26 - 7
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/index.vue

@@ -10,7 +10,8 @@
         <div class="name">{{selectedRow.goodscode}} {{selectedRow.goodsname}}</div>
         <div class="arrowRightIcon"></div>
       </div>
-      <div class="green bdf1 ml20">
+      <div class="green bdf1 ml20"
+           @click="changeMarketOrDetail">
         <div class="numBlock ml15">
           <div class="first">卖价</div>
           <div class="last">{{selectedRow.sellprice}}</div>
@@ -34,19 +35,23 @@
                :record="selectedRow"
                @click="openComponent" />
     </div>
-    <a-row class="buySellHall">
+    <a-row class="buySellHall"
+           v-if="showMarketOrDetail">
       <a-col :span="12">
         <Sell ref="sellRef"
-              :parantSelectedRow="selectedRow" />
+              :parantSelectedRow="deliverGoods" />
       </a-col>
       <a-col :span="12">
         <Buy ref="buyRef"
-             :parantSelectedRow="selectedRow" />
+             :parantSelectedRow="deliverGoods" />
       </a-col>
     </a-row>
+    <StockExchange :deliverGoods="deliverGoods"
+                   v-else />
     <component :is="componentId"
                v-if="componentId"
-               :selectedRow="selectedRow"
+               :selectedRow="deliverGoods"
+               :parantSelectedRow="deliverGoods"
                @cancel="closeComponent"></component>
   </div>
 </template>
@@ -66,13 +71,20 @@ import Bus from '@/utils/eventBus/index';
 import TimerUtils from '@/utils/timer/timerUtil';
 import { BtnListType } from '@/common/components/btnList/interface';
 import moment, { Moment } from 'moment';
+import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
+import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
+import StockExchange from '../stock-exchange/index.vue';
 
 export default defineComponent({
     emits: ['cancel', 'update'],
     name: 'buy-sell-market',
     props: {
         selectedRow: {
-            type: Object as PropType<WrOrderQuote>,
+            type: Object as PropType<QueryQuoteDayRsp>,
+            default: {},
+        },
+        deliverGoods: {
+            type: Object as PropType<QueryDeliveryRelationRsp>,
             default: {},
         },
     },
@@ -83,9 +95,9 @@ export default defineComponent({
         LeftOutlined,
         Listing: defineAsyncComponent(() => import('../listing/index.vue')),
         Detail: defineAsyncComponent(() => import('../detail/index.vue')),
+        StockExchange,
     },
     setup(props, context) {
-        const time = ref<Moment>(moment(props.selectedRow.deliverymonth)); // string 交收月
         const loading = ref<boolean>(false);
         const { visible, cancel } = _closeModal(context);
 
@@ -106,6 +118,11 @@ export default defineComponent({
         };
         const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
 
+        const showMarketOrDetail = ref<boolean>(true);
+        function changeMarketOrDetail() {
+            showMarketOrDetail.value = !showMarketOrDetail.value;
+        }
+
         TimerUtils.setInterval(
             () => {
                 queryFn();
@@ -125,6 +142,8 @@ export default defineComponent({
             closeComponent,
             openComponent,
             btnListData,
+            showMarketOrDetail,
+            changeMarketOrDetail,
         };
     },
 });

+ 3 - 6
src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/index.vue

@@ -130,21 +130,18 @@ import { ListingForm, TempWrOrderQuoteDetail } from './interface';
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getCanUseMoney } from '@/services/bus/account';
+import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 export default defineComponent({
     name: ModalEnum.spot_trade_warehouse_financing_delisting,
     components: { Drawer, PlusOutlined, MinusOutlined },
     emits: ['cancel', 'update'],
     props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
         selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
+            type: Object as PropType<WrOrderQuoteDetail>,
             default: {},
         },
         parantSelectedRow: {
-            type: Object as PropType<WrOrderQuote>,
+            type: Object as PropType<QueryDeliveryRelationRsp>,
             default: {},
         },
         buyOrSell: {

+ 3 - 2
src/views/market/spot_trade/spot_trade_order_transaction/components/detail/index.vue

@@ -18,14 +18,15 @@ import Drawer from '@/common/components/drawer/index.vue';
 import { WrOrderQuote } from '@/services/go/wrtrade/interface';
 
 import { _closeModal } from '@/common/setup/modal/modal';
+import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 
 export default defineComponent({
     name: 'detail',
     components: { Drawer },
     emits: ['cancel', 'update'],
     props: {
-        selectedRow: {
-            type: Object as PropType<WrOrderQuote>,
+        parantSelectedRow: {
+            type: Object as PropType<QueryDeliveryRelationRsp>,
             default: {},
         },
     },

+ 10 - 5
src/views/market/spot_trade/spot_trade_order_transaction/components/listing/index.vue

@@ -50,7 +50,7 @@
                                 :min="0"
                                 :max="99999"
                                 v-model:value="formState.num" />
-                <span class="input-enumdicname-absolute">{{selectedRow.enumdicname}}</span>
+                <span class="input-enumdicname-absolute">{{parantSelectedRow.enumdicname}}</span>
                 <!-- <div class="labelTip">({{selectedRow.minivalue}}{{selectedRow.enumdicname}}起)</div> -->
               </a-form-item>
             </a-col>
@@ -61,12 +61,12 @@
               <a-form-item>
                 <a-slider ::min="0"
                           v-model:value="formState.num"
-                          :max="selectedRow.orderqty"
+                          :max="parantSelectedRow.orderqty"
                           class="formSlider"
                           style="width: 260px" />
                 <div class="unit">
                   <span>0</span>
-                  <span>99999{{selectedRow.enumdicname}}</span>
+                  <span>99999{{parantSelectedRow.enumdicname}}</span>
                 </div>
               </a-form-item>
             </a-col>
@@ -125,13 +125,18 @@ import { FormState } from './interface';
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getCanUseMoney } from '@/services/bus/account';
+import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 export default defineComponent({
     name: ModalEnum.spot_trade_warehouse_financing_delisting,
     components: { Drawer, PlusOutlined, MinusOutlined },
     emits: ['cancel', 'update'],
     props: {
-        selectedRow: {
-            type: Object as PropType<WrOrderQuote>,
+        // selectedRow: {
+        //     type: Object as PropType<WrOrderQuote>,
+        //     default: {},
+        // },
+        parantSelectedRow: {
+            type: Object as PropType<QueryDeliveryRelationRsp>,
             default: {},
         },
     },

+ 33 - 34
src/views/market/spot_trade/spot_trade_order_transaction/components/sell-market/index.vue

@@ -1,37 +1,35 @@
 <template>
-    <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
-    <a-table
-        :columns="handleColumn(columns)"
-        :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']"
-        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 470px)' : 'calc(100vh - 145px)' }"
-        :pagination="false"
-        :loading="loading"
-        :expandedRowKeys="expandedRowKeys"
-        :customRow="Rowclick"
-        :expandIcon="expandIcon"
-        :expandIconAsCell="false"
-        rowKey="key"
-        :data-source="tableList"
-    >
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList :btnList="btnListData" :record="record" @click="openComponent" />
-        </template>
-        <template #username="{text, record }">
-            <span>{{record.userid + " " }}{{text}}</span>
-        </template>
-        <template #fixedprice="{record }">
-            <span>{{record.useorderpricerid }}</span>
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :buyOrSell="BuyOrSell.sell"
-        :parantSelectedRow="parantSelectedRow"
-        @cancel="closeComponent"
-    ></component>
+  <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
+  <a-table :columns="handleColumn(columns)"
+           :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']"
+           :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 470px)' : 'calc(100vh - 145px)' }"
+           :pagination="false"
+           :loading="loading"
+           :expandedRowKeys="expandedRowKeys"
+           :customRow="Rowclick"
+           :expandIcon="expandIcon"
+           :expandIconAsCell="false"
+           rowKey="key"
+           :data-source="tableList">
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnListData"
+               :record="record"
+               @click="openComponent" />
+    </template>
+    <template #username="{text, record }">
+      <span>{{record.userid + " " }}{{text}}</span>
+    </template>
+    <template #fixedprice="{record }">
+      <span>{{record.useorderpricerid }}</span>
+    </template>
+  </a-table>
+  <component :is="componentId"
+             v-if="componentId"
+             :selectedRow="selectedRow"
+             :parantSelectedRow="parantSelectedRow"
+             :buyOrSell="BuyOrSell.sell"
+             @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -47,13 +45,14 @@ import { ColumnType } from '@/common/methods/table/interface';
 import { getShowBottomValue } from '@/common/config/constrolBottom';
 import { TableParam } from '@/common/setup/table/interface';
 import { handleTableEventAndData } from '@/common/setup/table/compose';
+import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 
 export default defineComponent({
     emits: ['cancel', 'openComponent'],
     name: 'warehouse_receipt_trade_price_delisting_sell',
     props: {
         parantSelectedRow: {
-            type: Object as PropType<WrOrderQuote>,
+            type: Object as PropType<QueryDeliveryRelationRsp>,
             default: {},
         },
     },

+ 110 - 0
src/views/market/spot_trade/spot_trade_order_transaction/components/stock-exchange/index.vue

@@ -0,0 +1,110 @@
+<template>
+  <!-- 成交明细  -->
+  <a-row>
+    <a-col :span="8">
+      <a-table :columns="columnsList"
+               class="srcollYTable"
+               :pagination="false"
+               :loading="loading"
+               rowKey="key"
+               ref="tableRef"
+               :data-source="tableList[0]">
+      </a-table>
+    </a-col>
+    <a-col :span="8">
+      <a-table :columns="columnsList"
+               class="srcollYTable"
+               :pagination="false"
+               :loading="loading"
+               rowKey="key"
+               ref="tableRef"
+               :data-source="tableList[1]">
+      </a-table>
+    </a-col>
+    <a-col :span="8">
+      <a-table :columns="columnsList"
+               class="srcollYTable"
+               :pagination="false"
+               :loading="loading"
+               rowKey="key"
+               ref="tableRef"
+               :data-source="tableList[2]">
+      </a-table>
+    </a-col>
+  </a-row>
+</template>
+
+<script lang="ts">
+import { defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
+import { _closeModal } from '@/common/setup/modal/modal';
+import { PropType, ref } from 'vue';
+
+import { QueryHistoryTikDatasRsp, QueryQuoteDayRsp } from '@/services/go/quote/interface';
+import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
+import { QueryHistoryTikDatas } from '@/services/go/quote';
+
+const columnsList = [
+    { title: '时间', key: 'TS', dataIndex: 'TS', align: 'center' },
+    { title: '成交价', key: 'Vol', dataIndex: 'Vol', align: 'center' },
+    { title: '成交量', key: 'PE', dataIndex: 'PE', align: 'center' },
+];
+
+export default defineComponent({
+    emits: ['cancel', 'update'],
+    name: 'stock-exchange',
+    props: {
+        deliverGoods: {
+            type: Object as PropType<QueryDeliveryRelationRsp>,
+            default: {},
+        },
+    },
+
+    setup(props, context) {
+        const loading = ref<boolean>(false);
+        const { visible, cancel } = _closeModal(context);
+        const param = {
+            goodsCode: props.deliverGoods.goodscode,
+        };
+        const tableList = ref<QueryHistoryTikDatasRsp[][]>([]);
+        QueryHistoryTikDatas(param).then((res) => {
+            tableList.value = getHisList(res);
+        });
+        function getHisList(list: QueryHistoryTikDatasRsp[]) {
+            const len = list.length;
+            const result: QueryHistoryTikDatasRsp[][] = [[], [], []];
+            if (len) {
+                if (len === 1) {
+                    result[1] = list;
+                } else if (len === 2) {
+                    result[1].push(list[0]);
+                    result[2].push(list[1]);
+                } else {
+                    const temp = Math.floor(len / 3);
+                    result[1] = list.slice(0, temp);
+                    result[2] = list.slice(temp, 2 * temp);
+                    result[3] = list.slice(temp * 2, temp * 3);
+                    const last = len - temp;
+                    if (last) {
+                        if (last === 1) {
+                            result[0].push(list[len - 1]);
+                        } else {
+                            result[0].push(list[len - 2]);
+                            result[1].push(list[len - 1]);
+                        }
+                    }
+                }
+            }
+            return result;
+        }
+        return {
+            cancel,
+            visible,
+            tableList,
+            columnsList,
+            loading,
+        };
+    },
+});
+</script>
+<style lang="less">
+</style>

+ 33 - 7
src/views/market/spot_trade/spot_trade_order_transaction/setup.ts

@@ -1,23 +1,35 @@
 import { TradeMode } from "@/common/constants/enumCommon"
 import { initData } from "@/common/methods"
+import { getQuoteDayInfoByCode } from "@/services/bus/goods"
 import { getMarketByTradeMode } from "@/services/bus/market"
 import { queryDeliveryRelation } from "@/services/go/delivery"
 import { QueryDeliveryRelationRsp } from "@/services/go/delivery/interface"
+import { QueryQuoteDayRsp } from "@/services/go/quote/interface"
 import { ref } from "vue"
 
 // 获取交个商品
 const allDeliverGoods = ref<QueryDeliveryRelationRsp[]>([])
+// 行情商品
+const goodsList = ref<QueryQuoteDayRsp[]>([])
 type deliverytype = 1 | 2 | 3 | 4
 // 1和3是订单交易 挂牌转让
 // 2和4是基差点价
 export function handleDeliveryRelation(param: deliverytype[]) {
-    const deliverGoods = ref<any[]>([])
     // 查询交割商品
+    const deliverGoods = ref<any[]>([])
     function queryAction() {
         const marketid = getMarketByTradeMode(TradeMode.ListingAndSelection)!.marketid
         queryDeliveryRelation({ marketid }).then(res => {
             allDeliverGoods.value = res
             deliverGoods.value = getDeliverGoods()
+            res.forEach(el => {
+                // 找到行情数据
+                const quote = getQuoteDayInfoByCode(el.goodscode);
+                if (quote) {
+                    Object.assign(quote, { goodsname: el.goodsname, deliverytype: el.deliverytype })
+                    goodsList.value.push(quote)
+                }
+            })
         })
     }
     function getDeliverGoods() {
@@ -36,12 +48,19 @@ export function handleDeliveryRelation(param: deliverytype[]) {
     function updateGeliverGoods() {
         queryAction()
     }
-
-    return { deliverGoods, updateGeliverGoods }
+    // 获取对应的行情
+    function getQuoteList() {
+        return goodsList.value.filter(e => param.includes((e as unknown as any).deliverytype))
+    }
+    // 通过goodscode 查找交割商品
+    function findDeilverGoodsByGoodsCode(goodscode: string) {
+        return allDeliverGoods.value.find(e => e.goodscode === goodscode)!
+    }
+    return { deliverGoods, updateGeliverGoods, getQuoteList, findDeilverGoodsByGoodsCode }
 }
 
 export const columnsList = [
-    { title: '序号', key: 'orderid' },
+    { title: '序号', key: 'index', width: 80 },
     { title: '代码', key: 'goodscode' },
     { title: '名称', key: 'goodsname' },
     { title: '买价', key: 'bid' },
@@ -49,10 +68,17 @@ export const columnsList = [
     { title: '卖价', key: 'ask' },
     { title: '卖量', key: 'askvolume' },
     { title: '最新价', key: 'last' },
-    { title: '涨跌', key: 'goodscode' },
-    { title: '幅度', key: 'goodscode' },
-    { title: '开', key: 'opened' },
+    { title: '涨跌', key: 'change' }, // 最新价 - 昨结价
+    { title: '幅度', key: 'amplitude' }, // (最新价 - 昨结价) / 100 %
+    { title: '开盘价', key: 'opened' },
     { title: '昨收价', key: 'preclose' },
+    { title: '昨结价', key: 'presettle' },
     { title: '最低价', key: 'lowest' },
     { title: '最高价', key: 'highest' },
+    // { title: '振幅', key: 'vibration' }, // (最高价 - 最低价 ) / 最新价  * 100 %
+    // { title: '总量', key: 'totalvolume' },
+    // { title: '现量', key: 'lastvolume' },
+    // { title: '持仓量', key: 'holdvolume' },
+    // { title: '日增', key: 'holdincrement' },
+    // { title: '金额', key: 'totalturnover' },
 ];

+ 54 - 5
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_basis_difference/index.vue

@@ -5,10 +5,51 @@
              class="srcollYTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 479px)' }"
              :pagination="false"
+             :loading="loading"
              :expandedRowKeys="expandedRowKeys"
              :customRow="Rowclick"
-             rowKey="key"
-             :data-source="deliverGoods"></a-table>
+             rowKey="goodscode"
+             ref="tableRef"
+             :data-source="getQuoteList()">
+      <template #totalturnover="{ text }">
+        <span>{{changeUnit(text)}}</span>
+      </template>
+      <!-- 涨跌 -->
+      <template #change="{ record }">
+        <span>{{quoteChange(record, record.decimalplace)}}</span>
+      </template>
+      <!-- 幅度 -->
+      <template #amplitude="{ record }">
+        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+      </template>
+      <!-- 振幅 -->
+      <template #vibration="{ record }">
+        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+      </template>
+      <template #index="{ index }">
+        <span>{{index + 1}}</span>
+      </template>
+      <!-- 买价 -->
+      <template #bid="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 卖价 -->
+      <template #ask="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最新价 -->
+      <template #last="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最低价 -->
+      <template #lowest="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最高价 -->
+      <template #highest="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+    </a-table>
     <!-- 右键 -->
     <contextMenu :contextMenu="contextMenu"
                  @cancel="closeContext"
@@ -16,6 +57,7 @@
     <component :is="componentId"
                v-if="componentId"
                :selectedRow="selectedRow"
+               :deliverGoods="findDeilverGoodsByGoodsCode(selectedRow.goodscode)"
                @cancel="closeComponent"></component>
   </div>
 </template>
@@ -26,13 +68,14 @@ import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/exp
 
 import { handleDeliveryRelation } from '../setup';
 
-import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
+import { handleSubcriteQuote, handleQuotePriceColor, quoteChange, quoteAmplitude, quoteAmplituOfVibration } from '@/common/setup/table/tableQuote';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 import { columnsList } from '../setup';
 
 import { handleTableEventAndData } from '@/common/setup/table/compose';
 import { TableParam } from '@/common/setup/table/interface';
 import { BtnListType } from '@/common/components/btnList/interface';
+import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
 export default defineComponent({
     name: EnumRouterName.spot_trade_order_transaction_basis_difference,
     components: {
@@ -52,14 +95,20 @@ export default defineComponent({
             { lable: '详情', code: 'Detail', className: 'btnDeafault' },
             { lable: '买卖大厅', code: 'BuyAndSell', className: 'btnDeafault' },
         ];
-        const { deliverGoods } = handleDeliveryRelation([2, 4]);
+        const { deliverGoods, getQuoteList, findDeilverGoodsByGoodsCode } = handleDeliveryRelation([2, 4]);
         // 行情按需订阅
         handleSubcriteQuote<QueryDeliveryRelationRsp>(deliverGoods);
 
         return {
-            ...handleTableEventAndData(param),
+            ...handleTableEventAndData<QueryQuoteDayRsp>(param),
             deliverGoods,
             btnList,
+            handleQuotePriceColor,
+            quoteChange,
+            quoteAmplitude,
+            quoteAmplituOfVibration,
+            getQuoteList,
+            findDeilverGoodsByGoodsCode,
         };
     },
 });

+ 54 - 5
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_listing_transfer/index.vue

@@ -5,10 +5,51 @@
              class="srcollYTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 479px)' }"
              :pagination="false"
+             :loading="loading"
              :expandedRowKeys="expandedRowKeys"
              :customRow="Rowclick"
-             rowKey="key"
-             :data-source="deliverGoods"></a-table>
+             rowKey="goodscode"
+             ref="tableRef"
+             :data-source="getQuoteList()">
+      <template #totalturnover="{ text }">
+        <span>{{changeUnit(text)}}</span>
+      </template>
+      <!-- 涨跌 -->
+      <template #change="{ record }">
+        <span>{{quoteChange(record, record.decimalplace)}}</span>
+      </template>
+      <!-- 幅度 -->
+      <template #amplitude="{ record }">
+        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+      </template>
+      <!-- 振幅 -->
+      <template #vibration="{ record }">
+        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+      </template>
+      <template #index="{ index }">
+        <span>{{index + 1}}</span>
+      </template>
+      <!-- 买价 -->
+      <template #bid="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 卖价 -->
+      <template #ask="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最新价 -->
+      <template #last="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最低价 -->
+      <template #lowest="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最高价 -->
+      <template #highest="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+    </a-table>
     <!-- 右键 -->
     <contextMenu :contextMenu="contextMenu"
                  @cancel="closeContext"
@@ -16,6 +57,7 @@
     <component :is="componentId"
                v-if="componentId"
                :selectedRow="selectedRow"
+               :deliverGoods="findDeilverGoodsByGoodsCode(selectedRow.goodscode)"
                @cancel="closeComponent"></component>
   </div>
 </template>
@@ -26,13 +68,14 @@ import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/exp
 
 import { handleDeliveryRelation } from '../setup';
 
-import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
+import { handleSubcriteQuote, handleQuotePriceColor, quoteChange, quoteAmplitude, quoteAmplituOfVibration } from '@/common/setup/table/tableQuote';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 import { columnsList } from '../setup';
 
 import { handleTableEventAndData } from '@/common/setup/table/compose';
 import { TableParam } from '@/common/setup/table/interface';
 import { BtnListType } from '@/common/components/btnList/interface';
+import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
 
 export default defineComponent({
     name: EnumRouterName.spot_trade_order_transaction_listing_transfer,
@@ -53,14 +96,20 @@ export default defineComponent({
             { lable: '详情', code: 'Detail', className: 'btnDeafault' },
             { lable: '买卖大厅', code: 'BuyAndSell', className: 'btnDeafault' },
         ];
-        const { deliverGoods } = handleDeliveryRelation([1, 3]);
+        const { deliverGoods, getQuoteList, findDeilverGoodsByGoodsCode } = handleDeliveryRelation([1, 3]);
         // 行情按需订阅
         handleSubcriteQuote<QueryDeliveryRelationRsp>(deliverGoods);
 
         return {
-            ...handleTableEventAndData(param),
+            ...handleTableEventAndData<QueryQuoteDayRsp>(param),
             deliverGoods,
             btnList,
+            handleQuotePriceColor,
+            quoteChange,
+            quoteAmplitude,
+            quoteAmplituOfVibration,
+            getQuoteList,
+            findDeilverGoodsByGoodsCode,
         };
     },
 });

+ 41 - 8
src/views/market/spot_trade/spot_trade_reference_market/index.vue

@@ -14,11 +14,40 @@
       <template #totalturnover="{ text }">
         <span>{{changeUnit(text)}}</span>
       </template>
+      <!-- 涨跌 -->
+      <template #change="{ record }">
+        <span>{{quoteChange(record, record.decimalplace)}}</span>
+      </template>
+      <!-- 幅度 -->
+      <template #amplitude="{ record }">
+        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+      </template>
+      <!-- 振幅 -->
+      <template #vibration="{ record }">
+        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+      </template>
       <template #index="{ index }">
         <span>{{index + 1}}</span>
       </template>
+      <!-- 买价 -->
       <template #bid="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.preclose)">{{text}}</span>
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 卖价 -->
+      <template #ask="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最新价 -->
+      <template #last="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最低价 -->
+      <template #lowest="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
+      </template>
+      <!-- 最高价 -->
+      <template #highest="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
       </template>
     </a-table>
     <!-- 右键 -->
@@ -40,7 +69,7 @@ import { QueryOrderQuoteReq } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
 import { ref } from 'vue';
-import { handleSubcriteQuote, handleQuotePriceColor } from '@/common/setup/table/tableQuote';
+import { handleSubcriteQuote, handleQuotePriceColor, quoteChange, quoteAmplitude, quoteAmplituOfVibration } from '@/common/setup/table/tableQuote';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 import { getGoodsListByTrade, getQutoGoodsByTradeMode } from '@/services/bus/goods';
 import { TradeMode } from '@/common/constants/enumCommon';
@@ -57,17 +86,18 @@ const columnsList = [
     { title: '卖价', key: 'ask' },
     { title: '卖量', key: 'askvolume' },
     { title: '最新价', key: 'last' },
-    { title: '涨跌', key: 'change' },
-    { title: '幅度', key: 'amplitude' },
+    { title: '涨跌', key: 'change' }, // 最新价 - 昨结价
+    { title: '幅度', key: 'amplitude' }, // (最新价 - 昨结价) / 100 %
     { title: '开盘价', key: 'opened' },
     { title: '昨收价', key: 'preclose' },
+    { title: '昨结价', key: 'presettle' },
     { title: '最低价', key: 'lowest' },
     { title: '最高价', key: 'highest' },
-    { title: '振幅', key: 'goodscode' },
-    { title: '总量', key: 'goodscode' },
-    { title: '现量', key: 'goodscode' },
+    { title: '振幅', key: 'vibration' }, // (最高价 - 最低价 ) / 最新价  * 100 %
+    { title: '总量', key: 'totalvolume' },
+    { title: '现量', key: 'lastvolume' },
     { title: '持仓量', key: 'holdvolume' },
-    { title: '日增', key: 'goodscode' },
+    { title: '日增', key: 'holdincrement' },
     { title: '金额', key: 'totalturnover' },
 ];
 
@@ -115,6 +145,9 @@ export default defineComponent({
             columns,
             changeUnit,
             handleQuotePriceColor,
+            quoteChange,
+            quoteAmplitude,
+            quoteAmplituOfVibration,
         };
     },
 });