li.shaoyi 2 år sedan
förälder
incheckning
1ee2f295bb
45 ändrade filer med 577 tillägg och 164 borttagningar
  1. 17 1
      public/config/router.json
  2. 10 1
      src/business/position/index.ts
  3. 1 1
      src/filters/index.ts
  4. 5 1
      src/hooks/echarts/candlestick/options.ts
  5. 2 2
      src/packages/gstj/views/home/Index.vue
  6. 2 2
      src/packages/mobile/views/home/Index.vue
  7. 1 1
      src/packages/mobile/views/market/list/Index.vue
  8. 1 1
      src/packages/mobile/views/pricing/list/Index.vue
  9. 1 1
      src/packages/mobile/views/transfer/list/Index.vue
  10. 5 7
      src/packages/pc/components/base/table/index.less
  11. 9 9
      src/packages/pc/components/base/table/index.vue
  12. 1 1
      src/packages/pc/components/layouts/footer/index.vue
  13. 15 0
      src/packages/pc/components/layouts/page/index.less
  14. 36 4
      src/packages/pc/components/layouts/page/index.vue
  15. 8 1
      src/packages/pc/components/modules/listing/index.less
  16. 15 2
      src/packages/pc/components/modules/listing/index.vue
  17. 2 2
      src/packages/pc/components/modules/quote/tik/index.vue
  18. 10 7
      src/packages/pc/views/account/address/index.vue
  19. 7 5
      src/packages/pc/views/account/receipt/index.vue
  20. 5 3
      src/packages/pc/views/account/sign/index.vue
  21. 2 0
      src/packages/pc/views/footer/capital/summary/index.vue
  22. 3 0
      src/packages/pc/views/footer/goods/order/index.vue
  23. 1 1
      src/packages/pc/views/footer/goods/position/components/delivery/index.vue
  24. 1 1
      src/packages/pc/views/footer/goods/position/components/transfer/index.vue
  25. 8 14
      src/packages/pc/views/footer/goods/position/index.vue
  26. 1 1
      src/packages/pc/views/footer/performance/components/details/index.vue
  27. 1 1
      src/packages/pc/views/market/trade/spot/index.vue
  28. 10 0
      src/packages/pc/views/query/capital/history/index.less
  29. 31 3
      src/packages/pc/views/query/capital/history/index.vue
  30. 10 0
      src/packages/pc/views/query/capital/list/index.less
  31. 36 4
      src/packages/pc/views/query/capital/list/index.vue
  32. 1 1
      src/packages/pc/views/query/order/goods/history/index.vue
  33. 1 1
      src/packages/pc/views/query/order/spot/history/index.vue
  34. 3 3
      src/packages/pc/views/query/performance/buy/all/index.vue
  35. 3 3
      src/packages/pc/views/query/performance/sell/all/index.vue
  36. 1 1
      src/packages/pc/views/query/trade/goods/history/index.vue
  37. 1 1
      src/packages/pc/views/query/trade/spot/history/index.vue
  38. 1 1
      src/packages/pc/views/system/menu/index.vue
  39. 1 1
      src/packages/pc/views/system/role/index.vue
  40. 2 2
      src/packages/qxst/views/home/Index.vue
  41. 2 2
      src/packages/sbyj/views/home/index.vue
  42. 1 1
      src/packages/sbyj/views/market/list/index.vue
  43. 11 1
      src/services/api/common/index.ts
  44. 292 0
      src/stores/modules/futures@next.ts
  45. 0 69
      src/types/model/market.d.ts

+ 17 - 1
public/config/router.json

@@ -17,7 +17,23 @@
                         "sort": 1,
                         "title": "合约汇总",
                         "code": "bottom_goods_position",
-                        "component": "views/footer/goods/position/index.vue"
+                        "component": "views/footer/goods/position/index.vue",
+                        "children": [
+                            {
+                                "authType": 3,
+                                "title": "交收",
+                                "code": "bottom_goods_position_delivery",
+                                "component": "views/footer/goods/position/components/delivery/index.vue",
+                                "className": "el-button--primary"
+                            },
+                            {
+                                "authType": 3,
+                                "title": "转让",
+                                "code": "bottom_goods_position_transfer",
+                                "component": "views/footer/goods/position/components/transfer/index.vue",
+                                "className": "el-button--danger"
+                            }
+                        ]
                     },
                     {
                         "authType": 2,

+ 10 - 1
src/business/position/index.ts

@@ -1,6 +1,7 @@
-import { computed } from 'vue'
+import { onMounted, onUnmounted, computed } from 'vue'
 import { BuyOrSell } from '@/constants/order'
 import { usePositionStore } from '@/stores'
+import quoteSocket from '@/services/websocket/quote'
 
 /**
  * 持仓业务
@@ -9,6 +10,7 @@ import { usePositionStore } from '@/stores'
  */
 export const usePosition = (tradeMode = 0) => {
     const store = usePositionStore()
+    const subscribe = quoteSocket.createSubscribe()
 
     const positionList = computed(() => store.orderPositionComputedList.filter((e) => tradeMode ? e.trademode === tradeMode : true))
 
@@ -18,6 +20,13 @@ export const usePosition = (tradeMode = 0) => {
         return item?.enableqty ?? 0
     }
 
+    onMounted(() => {
+        const goodsCodes = positionList.value.map((e) => e.goodscode)
+        subscribe.start(...goodsCodes)
+    })
+
+    onUnmounted(() => subscribe.stop())
+
     return {
         ...store.$toRefs(),
         positionList,

+ 1 - 1
src/filters/index.ts

@@ -179,7 +179,7 @@ export function formatAmount(value: number, decimal = 2) {
  */
 export function formatDate(value?: string, format = 'YYYY-MM-DD HH:mm:ss') {
     if (value) {
-        return moment(value).format(format)
+        return moment.parseZone(value).format(format)
     }
     return handleNoneValue()
 }

+ 5 - 1
src/hooks/echarts/candlestick/options.ts

@@ -89,8 +89,12 @@ export function useOptions(dataset: EchartsDataset) {
                                 case ChartCycleType.Day: {
                                     return moment(params.value).format('YYYY-MM-DD')
                                 }
+                                case ChartCycleType.Hours2:
+                                case ChartCycleType.Hours4: {
+                                    return moment(params.value).format('YYYY-MM-DD HH:00:00')
+                                }
                                 default: {
-                                    return moment(params.value).format('YYYY-MM-DD HH:mm:ss')
+                                    return moment(params.value).format('YYYY-MM-DD HH:mm:00')
                                 }
                             }
                         },

+ 2 - 2
src/packages/gstj/views/home/Index.vue

@@ -16,7 +16,7 @@
 import { shallowRef, nextTick, watch, onMounted } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { Tabbar } from '../../components/base/tabbar/types'
-import { GetAppUpdateInfo } from '@/services/api/common'
+import { getAppUpdateInfo } from '@/services/api/common'
 import { useNavigation } from '../../router/navigation'
 import { useLogin } from '@/business/login'
 import { useLoginStore } from '@/stores'
@@ -118,7 +118,7 @@ onMounted(() => {
     })
 
     // 获取应用更新信息
-    GetAppUpdateInfo().then((res) => {
+    getAppUpdateInfo().then((res) => {
       const data = JSON.parse(res)
       if (data) {
         const { LastVersionCode, ApkUrl } = data[0] as Model.AppUpdateInfo

+ 2 - 2
src/packages/mobile/views/home/Index.vue

@@ -16,7 +16,7 @@
 import { shallowRef, nextTick, watch, onMounted } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { Tabbar } from '../../components/base/tabbar/types'
-import { GetAppUpdateInfo } from '@/services/api/common'
+import { getAppUpdateInfo } from '@/services/api/common'
 import { useNavigation } from '../../router/navigation'
 import { useLogin } from '@/business/login'
 import { useLoginStore } from '@/stores'
@@ -124,7 +124,7 @@ onMounted(() => {
     })
 
     // 获取应用更新信息
-    GetAppUpdateInfo().then((res) => {
+    getAppUpdateInfo().then((res) => {
       const data = JSON.parse(res)
       if (data) {
         const { LastVersionCode, ApkUrl } = data[0] as Model.AppUpdateInfo

+ 1 - 1
src/packages/mobile/views/market/list/Index.vue

@@ -91,7 +91,7 @@ const columns: Model.TableColumn[] = [
     { prop: 'amplitude', label: '振幅' },
 ]
 
-const rowClick = (row: Model.Futures) => {
+const rowClick = (row: Model.GoodsQuote) => {
     router.push({
         name: 'market-detail',
         query: {

+ 1 - 1
src/packages/mobile/views/pricing/list/Index.vue

@@ -108,7 +108,7 @@ const columns: Model.TableColumn[] = [
     { prop: 'amplitude', label: '振幅' },
 ]
 
-const rowClick = (row: Model.Futures) => {
+const rowClick = (row: Model.GoodsQuote) => {
     router.push({
         name: 'pricing-detail',
         query: {

+ 1 - 1
src/packages/mobile/views/transfer/list/Index.vue

@@ -54,7 +54,7 @@ const columns: Model.TableColumn[] = [
     { prop: 'askvolume', label: '卖量' },
 ]
 
-const rowClick = ({ goodsid }: Model.Futures) => {
+const rowClick = ({ goodsid }: Model.GoodsQuote) => {
     router.push({
         name: 'transfer-detail2',
         query: {

+ 5 - 7
src/packages/pc/components/base/table/index.less

@@ -8,16 +8,12 @@
     &__header {
         display: flex;
         align-items: center;
-        padding: 6px;
-
-        &:empty {
-            display: none;
-        }
 
         >.block {
             display: inline-flex;
             align-items: center;
             gap: 10px;
+            padding: 6px;
 
             &:empty {
                 display: none;
@@ -35,8 +31,6 @@
     }
 
     &__footer {
-        margin-top: 20px;
-
         &:empty {
             display: none;
         }
@@ -70,6 +64,10 @@
             }
         }
 
+        td.el-table-fixed-column--right {
+            --el-bg-color: #181e22; // 非全局待处理
+        }
+
         &__expanded-cell {
             padding: 4px !important;
 

+ 9 - 9
src/packages/pc/components/base/table/index.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="app-table" v-loading="loading">
     <div class="app-table__header">
-      <div class="block block--left" v-if="$slots.header">
-        <slot name="header"></slot>
+      <div class="block block--left">
+        <slot name="headerLeft"></slot>
       </div>
-      <div class="block block--right" v-if="showToolbar">
-        <slot name="toolbar">
-          <el-button-group>
-            <el-button icon="Refresh" @click="refresh" />
-            <el-button icon="Setting" @click="showTableSetting = true" />
-          </el-button-group>
-        </slot>
+      <div class="block block--right">
+        <slot name="headerRight"></slot>
+        <el-button-group v-if="showToolbar">
+          <slot name="toolbar"></slot>
+          <el-button icon="Refresh" @click="refresh" />
+          <el-button icon="Setting" @click="showTableSetting = true" />
+        </el-button-group>
       </div>
     </div>
     <div class="app-table__container">

+ 1 - 1
src/packages/pc/components/layouts/footer/index.vue

@@ -26,7 +26,7 @@
                     </tr>
                     <!-- <tr>
                         <td>浮盈</td>
-                        <td :class="handlePriceColor(currentAccount.totalProfitLoss, 0)">{{ currentAccount.totalProfitLoss }}
+                        <td :class="handlePriceColor(currentAccount.totalProfitLoss)">{{ currentAccount.totalProfitLoss }}
                         </td>
                     </tr> -->
                 </tbody>

+ 15 - 0
src/packages/pc/components/layouts/page/index.less

@@ -3,6 +3,21 @@
     flex-direction: column;
     height: 100%;
 
+    &__statusbar {
+        display: flex;
+        align-items: center;
+        color: #fff;
+        background-color: #181e22;
+        border-top: 1px solid #363f45;
+
+        .statusbar {
+            &-right {
+                padding: 5px;
+                margin-left: auto;
+            }
+        }
+    }
+
     &__header {
         background-color: #364048;
 

+ 36 - 4
src/packages/pc/components/layouts/page/index.vue

@@ -29,28 +29,60 @@
     <div class="app-page__footer">
       <app-footer />
     </div>
+    <div class="app-page__statusbar">
+      <div class="statusbar-left">
+
+      </div>
+      <div class="statusbar-right">
+        {{ serverTime?.format('HH:mm:ss') }}
+      </div>
+    </div>
   </div>
 </template>
 
 <script lang="ts" setup>
-import { ref } from 'vue'
+import { ref, onMounted } from 'vue'
 import { RouteRecordNormalized, RouteRecordName } from 'vue-router'
+import { timerTask } from '@/utils/timer'
+import { getServerTime } from '@/services/api/common'
 import { useGlobalStore } from '@/stores'
 import AppHeader from '../header/index.vue'
 import AppFooter from '../footer/index.vue'
 import AppNavbar from '../navbar/index.vue'
 import AppSidebar from '../sidebar/index.vue'
+import moment, { Moment } from 'moment'
 
 const globalStore = useGlobalStore()
-const isCollapse = ref(globalStore.isMobile);
+const isCollapse = ref(globalStore.isMobile)
+const serverTime = ref<Moment>()
 
 // 手动给组件添加 name 属性,处理缓存 exclude 无效的问题
 const handleComponent = (component: Record<'type', { name: RouteRecordName | undefined }>, route: RouteRecordNormalized) => {
   if (component) {
-    component.type.name = route.name;
+    component.type.name = route.name
   }
-  return component;
+  return component
 }
+
+// 刷新服务器时间
+const refreshServerTime = () => {
+  getServerTime().then((res) => {
+    serverTime.value = moment.parseZone(res.data)
+    const timer = timerTask.setInterval(() => {
+      serverTime.value = moment(serverTime.value).add(1000, 'ms')
+    }, 1000)
+    // 每5分钟同步一次服务器时间
+    timerTask.setTimeout(() => {
+      timer.clear()
+      refreshServerTime()
+    }, 5 * 60 * 1000)
+  })
+}
+
+onMounted(() => {
+  serverTime.value = moment(new Date())
+  refreshServerTime()
+})
 </script>
 
 <style lang="less">

+ 8 - 1
src/packages/pc/components/modules/listing/index.less

@@ -17,7 +17,7 @@
     }
 
     &__form {
-        width: 260px;
+        width: 300px;
         padding: 10px;
         border-left: 1px solid #363f45;
 
@@ -26,6 +26,13 @@
             margin-bottom: 15px;
         }
 
+        .row-price {
+            display: flex;
+            align-items: center;
+            font-size: 12px;
+            line-height: normal;
+        }
+
         .footer-btnbar {
             display: flex;
             justify-content: center;

+ 15 - 2
src/packages/pc/components/modules/listing/index.vue

@@ -20,8 +20,20 @@
                     </el-radio-group>
                 </el-form-item>
                 <el-form-item prop="OrderPrice" label="价格">
-                    <el-input-number placeholder="请输入" :min="0" :step="priceStep" :precision="quote?.decimalplace"
-                        v-model="formData.OrderPrice" />
+                    <div class="el-form-item--col">
+                        <el-input-number placeholder="请输入" :min="0" :step="priceStep" :precision="quote?.decimalplace"
+                            v-model="formData.OrderPrice" />
+                        <div v-if="quote">
+                            <div class="row-price g-price-up">
+                                <Icon icon="Top" />
+                                <span>{{ quote.limitup }}</span>
+                            </div>
+                            <div class="row-price g-price-down">
+                                <Icon icon="Bottom" />
+                                <span>{{ quote.limitdown }}</span>
+                            </div>
+                        </div>
+                    </div>
                 </el-form-item>
                 <el-form-item prop="OrderQty" label="数量">
                     <div class="g-qty-group">
@@ -68,6 +80,7 @@ import { useOrder } from '@/business/trade'
 import { usePosition } from '@/business/position'
 import { useGoodsStore, useFuturesStore } from '@/stores'
 import Forex from '@pc/components/modules/quote/forex/index.vue'
+import Icon from '@pc/components/base/icon/index.vue'
 
 const goodsStore = useGoodsStore()
 const futuresStore = useFuturesStore()

+ 2 - 2
src/packages/pc/components/modules/quote/tik/index.vue

@@ -39,7 +39,7 @@ const { run: getHistoryTikDatas } = useRequest(queryHistoryTikDatas, {
     manual: true,
     params: {
         goodsCode: props.goodsCode,
-        count: 10
+        count: 20
     },
     onSuccess: (res) => {
         dataList.value = res.data
@@ -65,7 +65,7 @@ watch(() => quote.value, (q) => {
     const { last = 0, lasttime = '', lastvolume = 0 } = q
     if (last && lastvolume) {
         const list = dataList.value
-        if (list.length > 9) {
+        if (list.length > 19) {
             // 移除列表最后一条记录
             list.pop()
         }

+ 10 - 7
src/packages/pc/views/account/address/index.vue

@@ -2,7 +2,7 @@
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
         :expand-row-keys="expandKeys" @row-click="rowClick">
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons" />
         </template>
         <!-- 证件类型 -->
@@ -18,10 +18,11 @@
             {{ value ? '是' : '否' }}
         </template>
         <!-- 操作 -->
-    <template #expand="{ row }">
+        <template #expand="{ row }">
             <div class="buttonbar">
                 <el-button type="primary" size="small" @click="openComponent('edit')">编辑</el-button>
-                <el-button type="success" size="small" v-if="row?.isdefault === 0" @click="openComponent('default')">设置默认</el-button>
+                <el-button type="success" size="small" v-if="row?.isdefault === 0"
+                    @click="openComponent('default')">设置默认</el-button>
                 <el-button type="danger" size="small" @click="openComponent('delete')">删除</el-button>
             </div>
         </template>
@@ -65,9 +66,11 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 ])
 
 filterOptons.buttonList = [
-    { lable: '新增地址', className: 'el-button--primary', onClick: () => {
-        selectedRow.value = undefined
-        openComponent('edit') 
-    }},
+    {
+        lable: '新增地址', className: 'el-button--primary', onClick: () => {
+            selectedRow.value = undefined
+            openComponent('edit')
+        }
+    },
 ]
 </script>

+ 7 - 5
src/packages/pc/views/account/receipt/index.vue

@@ -2,7 +2,7 @@
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
         :expand-row-keys="expandKeys" @row-click="rowClick">
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons" />
         </template>
         <!-- 发票类型 -->
@@ -56,9 +56,11 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 ])
 
 filterOptons.buttonList = [
-    { lable: '新增发票', className: 'el-button--primary', onClick: () => { 
-        selectedRow.value = undefined
-        openComponent('new') 
-    } },
+    {
+        lable: '新增发票', className: 'el-button--primary', onClick: () => {
+            selectedRow.value = undefined
+            openComponent('new')
+        }
+    },
 ]
 </script>

+ 5 - 3
src/packages/pc/views/account/sign/index.vue

@@ -2,10 +2,12 @@
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
         :expand-row-keys="expandKeys" @row-click="rowClick">
-        <template #header>
-            <el-button type="primary" v-if="authStatus === AuthStatus.Certified && ![SignStatus.Audit, SignStatus.Signed].includes(signStatus)"
+        <template #headerLeft>
+            <el-button type="primary"
+                v-if="authStatus === AuthStatus.Certified && ![SignStatus.Audit, SignStatus.Signed].includes(signStatus)"
                 @click="openComponent('sign')">添加签约账户</el-button>
-            <el-button type="warning" v-if="authStatus === AuthStatus.Uncertified" @click="openComponent('certification')">实名认证</el-button>
+            <el-button type="warning" v-if="authStatus === AuthStatus.Uncertified"
+                @click="openComponent('certification')">实名认证</el-button>
         </template>
         <!-- 证件类型 -->
         <template #cardtype="{ value }">

+ 2 - 0
src/packages/pc/views/footer/capital/summary/index.vue

@@ -51,6 +51,8 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'freezeMargin', label: '冻结资金', decimal: 2 },
     { prop: 'inamount', label: '今日入金', decimal: 2 },
     { prop: 'outamount', label: '今日出金', decimal: 2 },
+    { prop: 'closepl', label: '今日损益', decimal: 2 },
+    { prop: 'paycharge', label: '今日手续费支出', decimal: 2, width: 160 },
     { prop: 'tradestatus', label: '状态' },
 ])
 

+ 3 - 0
src/packages/pc/views/footer/goods/order/index.vue

@@ -22,6 +22,9 @@
             </div>
         </template>
         <template #footer>
+            <div v-if="false">
+                <el-button type="danger" size="small">一键撤单</el-button>
+            </div>
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </template>

+ 1 - 1
src/packages/pc/views/footer/goods/position/components/delivery/index.vue

@@ -27,7 +27,7 @@
                 <span>{{ selectedRow.matchname }}</span>
             </el-form-item>
             <el-form-item label="参考损益">
-                <span :class="handlePriceColor(closepl, 0)">{{ formatDecimal(closepl) }}</span>
+                <span :class="handlePriceColor(closepl)">{{ formatDecimal(closepl) }}</span>
             </el-form-item>
             <el-form-item prop="DeliveryLot" label="交收数量">
                 <el-input-number placeholder="请输入数量" v-model="formData.DeliveryLot" :precision="0"

+ 1 - 1
src/packages/pc/views/footer/goods/position/components/transfer/index.vue

@@ -25,7 +25,7 @@
                 <span>{{ formatDecimal(selectedRow.averageprice) }}</span>
             </el-form-item>
             <el-form-item label="参考损益">
-                <span :class="handlePriceColor(closepl, 0)">{{ formatDecimal(closepl) }}</span>
+                <span :class="handlePriceColor(closepl)">{{ formatDecimal(closepl) }}</span>
             </el-form-item>
             <el-form-item prop="OrderQty" label="转让数量">
                 <div class="g-qty-group">

+ 8 - 14
src/packages/pc/views/footer/goods/position/index.vue

@@ -1,7 +1,6 @@
 <!-- 商品订单-合约汇总 -->
 <template>
-    <app-table :data="positionList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
-        :expand-row-keys="expandKeys" @row-click="rowClick">
+    <app-table :data="positionList" v-model:columns="tableColumns" :loading="loading" @row-click="showComponent">
         <!-- 挂牌类型 -->
         <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
@@ -16,12 +15,9 @@
         <template #closepl="{ row }">
             <span :class="row.closeplColor">{{ row.closepl?.toFixed(2) }}</span>
         </template>
-        <!-- 展开行 -->
-        <template #expand="{ row }">
-            <div class="buttonbar">
-                <el-button type="primary" size="small" @click="showComponent('delivery', row)">交收</el-button>
-                <el-button type="danger" size="small" @click="showComponent('transfer', row)">转让</el-button>
-            </div>
+        <!-- 操作 -->
+        <template #operate="{ row }">
+            <el-button type="primary" size="small" @click="showComponent(row)">转让</el-button>
         </template>
         <template #footer>
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
@@ -34,7 +30,6 @@
 import { shallowRef, defineAsyncComponent } from 'vue'
 import { getBuyOrSellName } from '@/constants/order'
 import { useComponent } from '@/hooks/component'
-import { useComposeTable } from '@pc/components/base/table'
 import { usePosition } from '@/business/position'
 import AppTable from '@pc/components/base/table/index.vue'
 import { handleNumberValue } from '@/filters'
@@ -45,11 +40,9 @@ const componentMap = new Map<string, unknown>([
 ])
 
 const { positionList, loading } = usePosition(50)
-
+const selectedRow = shallowRef<Model.TradePositionRsp>()
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
 
-const { rowKey, expandKeys, selectedRow, rowClick } = useComposeTable<Model.TradePositionRsp>({ rowKey: 'pkid' })
-
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'goodsname', label: '订单合约' },
     { prop: 'buyorsell', label: '方向' },
@@ -61,10 +54,11 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'curholderamount', label: '持仓金额' },
     { prop: 'usedmargin', label: '占用保证金' },
     { prop: 'closepl', label: '浮动盈亏' },
+    { prop: 'operate', label: '操作', fixed: 'right', width: 80 },
 ])
 
-const showComponent = (componentName: string, row: Model.TradePositionRsp) => {
+const showComponent = (row: Model.TradePositionRsp) => {
     selectedRow.value = row
-    openComponent(componentName)
+    openComponent('transfer')
 }
 </script>

+ 1 - 1
src/packages/pc/views/footer/performance/components/details/index.vue

@@ -52,7 +52,7 @@
             </template>
         </app-table-details>
         <app-table :data="dataList" :columns="tableColumns" :show-toolbar="false" :row-style="rowStyle" border>
-            <template #header>
+            <template #headerLeft>
                 <h3 class="g-details__title">步骤列表</h3>
             </template>
             <!-- 步骤值 -->

+ 1 - 1
src/packages/pc/views/market/trade/spot/index.vue

@@ -1,7 +1,7 @@
 <!-- 交易市场-仓单交易 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" @row-click="onRowClick" showIndex>
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons" />
         </template>
         <template #footer>

+ 10 - 0
src/packages/pc/views/query/capital/history/index.less

@@ -0,0 +1,10 @@
+.query-capital {
+    &__total {
+        display: flex;
+        color: #fff;
+
+        li {
+            padding: 5px;
+        }
+    }
+}

+ 31 - 3
src/packages/pc/views/query/capital/history/index.vue

@@ -1,7 +1,7 @@
 <!-- 资金流水-历史记录 -->
 <template>
-    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
-        <template #header>
+    <app-table class="query-capital" :data="dataList" v-model:columns="tableColumns" :loading="loading">
+        <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
                     <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"
@@ -9,6 +9,18 @@
                 </template>
             </app-filter>
         </template>
+        <template #headerRight>
+            <ul class="query-capital__total">
+                <li>
+                    <span>手续费汇总:</span>
+                    <span>{{ feeTotal.toFixed(2) }}</span>
+                </li>
+                <li>
+                    <span>盈亏汇总:</span>
+                    <span>{{ plTotal.toFixed(2) }}</span>
+                </li>
+            </ul>
+        </template>
         <!-- 委托时间 -->
         <template #createtime="{ value }">
             {{ formatDate(value) }}
@@ -17,7 +29,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
+import { shallowRef, computed } from 'vue'
 import { formatDate } from '@/filters'
 import { useDataFilter } from '@/hooks/datatable'
 import { useRequest } from '@/hooks/request'
@@ -52,4 +64,20 @@ const onSearch = (clear = false) => {
         run(qs)
     }, clear)
 }
+
+// 手续费汇总
+const feeTotal = computed(() => dataList.value.reduce((pre, cur) => {
+    if (cur.operatetype === 207) {
+        pre += cur.amount
+    }
+    return pre
+}, 0))
+
+// 盈亏汇总
+const plTotal = computed(() => dataList.value.reduce((pre, cur) => {
+    if (cur.operatetype === 209) {
+        pre += cur.amount
+    }
+    return pre
+}, 0))
 </script>

+ 10 - 0
src/packages/pc/views/query/capital/list/index.less

@@ -0,0 +1,10 @@
+.query-capital {
+    &__total {
+        display: flex;
+        color: #fff;
+
+        li {
+            padding: 5px;
+        }
+    }
+}

+ 36 - 4
src/packages/pc/views/query/capital/list/index.vue

@@ -1,6 +1,18 @@
 <!-- 资金流水-当前记录 -->
 <template>
-    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+    <app-table class="query-capital" :data="dataList" v-model:columns="tableColumns" :loading="loading">
+        <template #headerRight>
+            <ul class="query-capital__total">
+                <li>
+                    <span>手续费汇总:</span>
+                    <span>{{ feeTotal.toFixed(2) }}</span>
+                </li>
+                <li>
+                    <span>盈亏汇总:</span>
+                    <span>{{ plTotal.toFixed(2) }}</span>
+                </li>
+            </ul>
+        </template>
         <!-- 委托时间 -->
         <template #createtime="{ value }">
             {{ formatDate(value) }}
@@ -9,13 +21,13 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
+import { shallowRef, computed } from 'vue'
 import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { queryAmountLog } from '@/services/api/bank'
 import AppTable from '@pc/components/base/table/index.vue'
 
-const { loading, dataList } = useRequest(queryAmountLog, {})
+const { loading, dataList } = useRequest(queryAmountLog)
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'accountid', label: '资金账号' },
@@ -23,4 +35,24 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'amount', label: '金额' },
     { prop: 'createtime', label: '时间' }
 ])
-</script>
+
+// 手续费汇总
+const feeTotal = computed(() => dataList.value.reduce((pre, cur) => {
+    if (cur.operatetype === 207) {
+        pre += cur.amount
+    }
+    return pre
+}, 0))
+
+// 盈亏汇总
+const plTotal = computed(() => dataList.value.reduce((pre, cur) => {
+    if (cur.operatetype === 209) {
+        pre += cur.amount
+    }
+    return pre
+}, 0))
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 1 - 1
src/packages/pc/views/query/order/goods/history/index.vue

@@ -1,7 +1,7 @@
 <!-- 委托记录-商品合约-历史记录 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
                     <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"

+ 1 - 1
src/packages/pc/views/query/order/spot/history/index.vue

@@ -1,7 +1,7 @@
 <!-- 委托记录-现货仓单-历史记录 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
                     <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"

+ 3 - 3
src/packages/pc/views/query/performance/buy/all/index.vue

@@ -1,7 +1,7 @@
 <!-- 资金流水-买履约-全部 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
                     <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"
@@ -9,8 +9,8 @@
                 </template>
             </app-filter>
         </template>
-         <!-- 履约状态 -->
-         <template #performancestatus="{ value }">
+        <!-- 履约状态 -->
+        <template #performancestatus="{ value }">
             {{ getPerformanceStatusName(value) }}
         </template>
         <!-- 履约类型 -->

+ 3 - 3
src/packages/pc/views/query/performance/sell/all/index.vue

@@ -1,7 +1,7 @@
 <!-- 资金流水-卖履约-全部 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
                     <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"
@@ -9,8 +9,8 @@
                 </template>
             </app-filter>
         </template>
-         <!-- 履约状态 -->
-         <template #performancestatus="{ value }">
+        <!-- 履约状态 -->
+        <template #performancestatus="{ value }">
             {{ getPerformanceStatusName(value) }}
         </template>
         <!-- 履约类型 -->

+ 1 - 1
src/packages/pc/views/query/trade/goods/history/index.vue

@@ -1,7 +1,7 @@
 <!-- 成交记录-商品合约-历史记录 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
                     <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"

+ 1 - 1
src/packages/pc/views/query/trade/spot/history/index.vue

@@ -1,7 +1,7 @@
 <!-- 成交记录-现货仓单-当前记录 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
-        <template #header>
+        <template #headerLeft>
             <app-filter :options="filterOptons">
                 <template #before>
                     <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"

+ 1 - 1
src/packages/pc/views/system/menu/index.vue

@@ -1,7 +1,7 @@
 <template>
     <app-view class="system-menu">
         <app-table ref="tableRef" :data="dataList" v-model:columns="columns" row-key="code" :selection="false">
-            <template #header>
+            <template #headerLeft>
                 <app-action-menu :menus="getActionMenus('system_menu_add')" @click="openComponent" />
                 <el-button type="primary" :icon="isRowExpansion ? 'FolderOpened' : 'Folder'" @click="tableExpandAll">
                     <span v-if="isRowExpansion">全部收起</span>

+ 1 - 1
src/packages/pc/views/system/role/index.vue

@@ -1,7 +1,7 @@
 <template>
     <app-view class="system-role">
         <app-table :data="dataList" v-model:columns="columns">
-            <template #header>
+            <template #headerLeft>
                 <app-action-menu :menus="getActionMenus('system_role_add', 'system_role_delete')" @click="openComponent" />
             </template>
             <template #operate="{ row }">

+ 2 - 2
src/packages/qxst/views/home/Index.vue

@@ -16,7 +16,7 @@
 import { shallowRef, nextTick, watch, onMounted } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { Tabbar } from '../../components/base/tabbar/types'
-import { GetAppUpdateInfo } from '@/services/api/common'
+import { getAppUpdateInfo } from '@/services/api/common'
 import { useNavigation } from '../../router/navigation'
 import { useLogin } from '@/business/login'
 import { useLoginStore } from '@/stores'
@@ -112,7 +112,7 @@ onMounted(() => {
     })
 
     // 获取应用更新信息
-    GetAppUpdateInfo().then((res) => {
+    getAppUpdateInfo().then((res) => {
       const data = JSON.parse(res)
       if (data) {
         const { LastVersionCode, ApkUrl } = data[0] as Model.AppUpdateInfo

+ 2 - 2
src/packages/sbyj/views/home/index.vue

@@ -16,7 +16,7 @@
 import { shallowRef, nextTick, watch, onMounted } from 'vue'
 import { fullloading, dialog } from '@/utils/vant'
 import { Tabbar } from '@/packages/sbyj/components/base/tabbar/types'
-import { GetAppUpdateInfo } from '@/services/api/common'
+import { getAppUpdateInfo } from '@/services/api/common'
 import { useNavigation } from '@/packages/sbyj/router/navigation'
 import { useLogin } from '@/business/login'
 import { useLoginStore } from '@/stores'
@@ -118,7 +118,7 @@ onMounted(() => {
     })
 
     // 获取应用更新信息
-    GetAppUpdateInfo().then((res) => {
+    getAppUpdateInfo().then((res) => {
       const data = JSON.parse(res)
       if (data) {
         const { LastVersionCode, ApkUrl } = data[0] as Model.AppUpdateInfo

+ 1 - 1
src/packages/sbyj/views/market/list/index.vue

@@ -73,7 +73,7 @@ const { dataList: srcTouristQuoteDayList, run: getTouristQuoteDay } = useRequest
 
 // 构建显示使用游客商品(包括交易与参考行情)
 const touristQuoteDayList = computed(() => {
-    const arr: Partial<Model.Futures>[] = []
+    const arr: Partial<Model.GoodsQuote>[] = []
     touristGoodsList.value.forEach((item) => {
         const t = srcTouristQuoteDayList.value.find((r) => r.goodscode === item.goodscode)
         if (t) {

+ 11 - 1
src/services/api/common/index.ts

@@ -15,9 +15,19 @@ const loginStore = useLoginStore()
 // }
 
 /**
+ * 获取服务器时间
+ */
+export function getServerTime(config: RequestConfig = {}) {
+    return http.commonRequest<string>({
+        url: '/Common/GetServerTime',
+        params: config.data,
+    })
+}
+
+/**
  * 获取应用更新信息
  */
-export function GetAppUpdateInfo(config: RequestConfig = {}) {
+export function getAppUpdateInfo(config: RequestConfig = {}) {
     return http.request<string>({
         url: service.getConfig('androidUpdateUrl'),
         params: config.data,

+ 292 - 0
src/stores/modules/futures@next.ts

@@ -0,0 +1,292 @@
+import { reactive, computed, toRefs } from 'vue'
+import { handlePriceColor } from '@/filters'
+import { queryErmcpGoods, queryQuoteDay } from '@/services/api/goods'
+import { defineStore } from '../store'
+import { timerTask } from '@/utils/timer'
+import eventBus from '@/services/bus'
+import moment from 'moment'
+
+/**
+ * 期货存储对象
+ * @returns 
+ */
+export const useFuturesStore = defineStore(() => {
+    const state = reactive({
+        loading: false,
+        goodsList: <Model.GoodsRsp[]>[], // 商品列表
+        quotes: <Partial<Model.QuoteDayRsp>[]>[], // 行情数据
+        goodsQuoteList: <Model.GoodsQuote[]>[], // 商品行情列表
+    })
+
+    // 获取商品列表
+    const getGoodsList = () => {
+        timerTask.clearTimeout('quoteDay')
+        queryErmcpGoods().then((res) => {
+            state.goodsList = res.data
+            const codes = res.data.map((e) => e.goodscode)
+            if (codes.length) {
+                getQuoteDay(codes)
+            }
+        })
+        // 获取商品盘面信息
+        const getQuoteDay = (codes: string[]) => {
+            state.loading = true
+            queryQuoteDay({
+                data: {
+                    goodsCodes: codes.join(',')
+                }
+            }).then((res) => {
+                state.goodsList.forEach((e) => {
+                    const quoteDay = res.data.find((q) => q.goodscode === e.goodscode)
+                    const item: Model.GoodsQuote = {
+                        goodsid: e.goodsid,
+                        goodscode: e.goodscode,
+                        goodsname: e.goodsname,
+                        goodsgroupid: e.goodsgroupid,
+                        goodunitid: e.goodunitid,
+                        marketid: e.marketid,
+                        trademode: e.trademode,
+                        agreeunit: e.agreeunit,
+                        decimalplace: e.decimalplace,
+                        quoteminunit: e.quoteminunit,
+                        quotegear: e.quotegear,
+                        last: quoteDay?.last ?? 0,
+                        lasttime: quoteDay?.lasttime ?? '',
+                        bid: quoteDay?.bid ?? 0,
+                        bid2: quoteDay?.bid2 ?? 0,
+                        bid3: quoteDay?.bid3 ?? 0,
+                        bid4: quoteDay?.bid4 ?? 0,
+                        bid5: quoteDay?.bid5 ?? 0,
+                        bidvolume: quoteDay?.bidvolume ?? 0,
+                        bidvolume2: quoteDay?.bidvolume2 ?? 0,
+                        bidvolume3: quoteDay?.bidvolume3 ?? 0,
+                        bidvolume4: quoteDay?.bidvolume4 ?? 0,
+                        bidvolume5: quoteDay?.bidvolume5 ?? 0,
+                        ask: quoteDay?.ask ?? 0,
+                        ask2: quoteDay?.ask2 ?? 0,
+                        ask3: quoteDay?.ask3 ?? 0,
+                        ask4: quoteDay?.ask4 ?? 0,
+                        ask5: quoteDay?.ask5 ?? 0,
+                        askvolume: quoteDay?.askvolume ?? 0,
+                        askvolume2: quoteDay?.askvolume2 ?? 0,
+                        askvolume3: quoteDay?.askvolume3 ?? 0,
+                        askvolume4: quoteDay?.askvolume4 ?? 0,
+                        askvolume5: quoteDay?.askvolume5 ?? 0,
+                        lastvolume: quoteDay?.lastvolume ?? 0,
+                        presettle: quoteDay?.presettle ?? 0,
+                        opened: quoteDay?.opened ?? 0,
+                        highest: quoteDay?.highest ?? 0,
+                        lowest: quoteDay?.lowest ?? 0,
+                        limitup: quoteDay?.limitup ?? 0,
+                        limitdown: quoteDay?.limitdown ?? 0,
+                        averageprice: quoteDay?.averageprice ?? 0,
+                        rise: 0,
+                        change: 0,
+                        amplitude: 0,
+                        bidColor: '',
+                        bid2Color: '',
+                        bid3Color: '',
+                        bid4Color: '',
+                        bid5Color: '',
+                        askColor: '',
+                        ask2Color: '',
+                        ask3Color: '',
+                        ask4Color: '',
+                        ask5Color: '',
+                        lastColor: '',
+                        averagepriceColor: '',
+                        openedColor: '',
+                        highestColor: '',
+                        lowestColor: '',
+                    }
+                    if (!updateGoodsQuote(item)) {
+                        // 未完成-待处理计算和涨跌颜色
+                        state.goodsQuoteList.push(item)
+                    }
+                })
+            }).finally(() => {
+                state.loading = false
+                // 每5分钟获取一次盘面
+                timerTask.setTimeout(() => getQuoteDay(codes), 5 * 60 * 1000, 'quoteDay')
+            })
+        }
+    }
+
+    // 通过 goodscode 获取实时盘面
+    const getGoodsQuote = (code: string | number) => {
+        return computed(() => state.goodsQuoteList.find((e) => e.goodscode === code || e.goodsid === code))
+    }
+
+    // 通过 goodscode 获取实时行情报价
+    const getQuotePrice = (goodsCode: string) => {
+        return computed(() => {
+            const quote = getGoodsQuote(goodsCode)
+            return quote.value?.last ?? 0
+        })
+    }
+
+    // 通过 goodscode 获取实时行情
+    const getQuote = (goodsCode: string) => {
+        return computed(() => {
+            const quote = state.quotes.find((e) => e.goodscode === goodsCode)
+            return {
+                ...quote
+            }
+        })
+    }
+
+    // 获取商品名称
+    const getGoodsName = (code: string | number) => {
+        const quote = state.goodsList.find((e) => e.goodscode === code || e.goodsid === code)
+        return quote?.goodsname ?? ''
+    }
+
+    // 获取商品市场ID
+    const getGoodsMarket = (code: string | number) => {
+        const quote = state.goodsList.find((e) => e.goodscode === code || e.goodsid === code)
+        return quote?.marketid ?? 0
+    }
+
+    // 接收行情推送通知
+    const quotePushNotify = eventBus.$on('QuotePushNotify', (res) => {
+        const data = res as Proto.Quote[]
+        data.forEach((item) => {
+            const quote = handleQuote(item)
+            const index = state.quotes.findIndex((e) => e.goodscode === item.goodscode)
+            if (index > -1) {
+                state.quotes[index] = quote
+            } else {
+                state.quotes.push(quote)
+            }
+            if (!state.loading) {
+                updateGoodsQuote(quote)
+            }
+        })
+    })
+
+    // 更新商品数据
+    const updateGoodsQuote = (quote: Partial<Model.QuoteDayRsp>) => {
+        const goods = state.goodsQuoteList.find((e) => e.goodscode === quote.goodscode)
+        if (goods) {
+            // 更新对象属性
+            Object.entries(quote).forEach(([key, value]) => {
+                if (value !== undefined) {
+                    type TKey = keyof Model.GoodsQuote
+                    (<K extends TKey>(prop: K, value: Model.GoodsQuote[K]) => {
+                        goods[prop] = value
+                    })(key as TKey, value)
+                }
+            })
+
+            // 处理最高最低价
+            if (goods.last) {
+                if (goods.last > goods.highest) {
+                    goods.highest = goods.last
+                }
+                if (goods.last < goods.lowest) {
+                    goods.lowest = goods.last
+                }
+            }
+
+            goods.rise = goods.last ? goods.last - goods.presettle : 0   // 涨跌额/涨跌: 最新价 - 昨结价
+            goods.change = goods.presettle ? goods.rise / goods.presettle : 0 // 涨跌幅/幅度: (最新价 - 昨结价) / 昨结价
+            goods.amplitude = goods.presettle ? (goods.highest - goods.lowest) / goods.presettle : 0 // 振幅: (最高价 - 最低价 ) / 最新价
+
+            // 处理行情价格颜色
+            const handleColor = (value: number) => handlePriceColor(value, goods.presettle)
+
+            goods.bidColor = handleColor(goods.bid)
+            goods.bid2Color = handleColor(goods.bid2)
+            goods.bid3Color = handleColor(goods.bid3)
+            goods.bid4Color = handleColor(goods.bid4)
+            goods.bid5Color = handleColor(goods.bid5)
+            goods.askColor = handleColor(goods.ask)
+            goods.ask2Color = handleColor(goods.ask2)
+            goods.ask3Color = handleColor(goods.ask3)
+            goods.ask4Color = handleColor(goods.ask4)
+            goods.ask5Color = handleColor(goods.ask5)
+            goods.lastColor = handleColor(goods.last)
+            goods.averagepriceColor = handleColor(goods.averageprice)
+            goods.openedColor = handleColor(goods.opened)
+            goods.highestColor = handleColor(goods.highest)
+            goods.lowestColor = handleColor(goods.lowest)
+            return true
+        }
+        return false
+    }
+
+    // 处理行情数据
+    const handleQuote = (quote: Proto.Quote): Partial<Model.QuoteDayRsp> => {
+        const goods = state.goodsList.find((e) => e.goodscode.toUpperCase() === quote.goodscode?.toUpperCase())
+        // 处理报价小数位
+        const handleDeimalplace = (value?: number) => {
+            if (goods && value) {
+                const decimal = Math.pow(10, goods.decimalplace)
+                return value / decimal
+            }
+            return value
+        }
+        return {
+            goodscode: quote.goodscode,
+            last: handleDeimalplace(quote.last),
+            lasttime: (quote.date && quote.time) ? moment(quote.date + quote.time, 'YYYYMMDDHHmmss').format('YYYY-MM-DD HH:mm:ss') : undefined,
+            ask: handleDeimalplace(quote.ask),
+            ask2: handleDeimalplace(quote.ask2),
+            ask3: handleDeimalplace(quote.ask3),
+            ask4: handleDeimalplace(quote.ask4),
+            ask5: handleDeimalplace(quote.ask5),
+            askvolume: quote.askvolume,
+            askvolume2: quote.askvolume2,
+            askvolume3: quote.askvolume3,
+            askvolume4: quote.askvolume4,
+            askvolume5: quote.askvolume5,
+            bid: handleDeimalplace(quote.bid),
+            bid2: handleDeimalplace(quote.bid2),
+            bid3: handleDeimalplace(quote.bid3),
+            bid4: handleDeimalplace(quote.bid4),
+            bid5: handleDeimalplace(quote.bid5),
+            bidvolume: quote.bidvolume,
+            bidvolume2: quote.bidvolume2,
+            bidvolume3: quote.bidvolume3,
+            bidvolume4: quote.bidvolume4,
+            bidvolume5: quote.bidvolume5,
+            calloptionpremiums: quote.calloptionpremiums,
+            calloptionpremiums2: quote.calloptionpremiums2,
+            calloptionpremiums3: quote.calloptionpremiums3,
+            calloptionpremiums4: quote.calloptionpremiums4,
+            calloptionpremiums5: quote.calloptionpremiums5,
+            exchangecode: quote.exchangecode,
+            exchangedate: quote.exchangedate,
+            highest: handleDeimalplace(quote.highest),
+            holdvolume: quote.holdvolume,
+            inventory: quote.inventory,
+            lastvolume: quote.lastvolume,
+            limitdown: handleDeimalplace(quote.limitlow),
+            limitup: handleDeimalplace(quote.limithigh),
+            lowest: handleDeimalplace(quote.lowest),
+            opened: handleDeimalplace(quote.opened),
+            preclose: handleDeimalplace(quote.preclose),
+            preholdvolume: quote.preholdvolume,
+            presettle: handleDeimalplace(quote.presettle),
+            putoptionpremiums: handleDeimalplace(quote.putoptionpremiums),
+            putoptionpremiums2: handleDeimalplace(quote.putoptionpremiums2),
+            putoptionpremiums3: handleDeimalplace(quote.putoptionpremiums3),
+            putoptionpremiums4: handleDeimalplace(quote.putoptionpremiums4),
+            putoptionpremiums5: handleDeimalplace(quote.putoptionpremiums5),
+            settle: handleDeimalplace(quote.settle),
+            totalturnover: handleDeimalplace(quote.totalturnover),
+            totalvolume: quote.totalvolume,
+        }
+    }
+
+    return {
+        ...toRefs(state),
+        getQuote,
+        getQuotePrice,
+        getGoodsList,
+        getGoodsQuote,
+        getGoodsName,
+        getGoodsMarket,
+        quotePushNotify,
+    }
+})

+ 0 - 69
src/types/model/market.d.ts

@@ -126,73 +126,4 @@ declare namespace Model {
         quoteminunit: number;//行情最小变动单位 [整数,报价小数位一起使用]
         quotegear: number;//行情档位
     }
-
-    /** 期货行情 */
-    interface Futures {
-        agreeunit: number;//合约单位
-        averageprice: number; // 均价
-        marketid: number; // 所属市场ID
-        goodsgroupid: number; // 所属商品组ID
-        goodsid: number; // 商品ID 
-        goodscode: string; // 商品代码
-        goodsname: string; // 商品名称
-        goodunitid: number;//报价单位ID
-        decimalplace: number;//报价小数位
-        last: number; // 最新价
-        lasttime: string; // 行情时间(只有现价变化行情时间才变化)
-        rise: number; // 涨跌
-        change: number; // 涨跌幅
-        amplitude: number; // 振幅
-        bid: number; // 买价
-        bid2: number; // 买2
-        bid3: number; // 买3
-        bid4: number; // 买4
-        bid5: number; // 买5
-        ask: number; // 卖价
-        ask2: number; // 卖2
-        ask3: number; // 卖3
-        ask4: number; // 卖4
-        ask5: number; // 卖5
-        bidvolume: number; // 买量
-        bidvolume2: number; // 买量2
-        bidvolume3: number; // 买量3
-        bidvolume4: number; // 买量4
-        bidvolume5: number; // 买量5
-        askvolume: number; // 卖量
-        askvolume2: number; // 卖量2
-        askvolume3: number; // 卖量3
-        askvolume4: number; // 卖量4
-        askvolume5: number; // 卖量5
-        totalvolume: number; // 总量
-        lastvolume: number; // 现量
-        holdvolume: number; // 持仓量
-        holdincrement: number; // 日增
-        presettle: number; // 昨结价
-        preclose: number; // 昨收
-        totalturnover: number; // 金额
-        opened: number; // 开盘
-        highest: number; // 最高
-        lowest: number; // 最低
-        averagepriceColor: string; // 均价颜色
-        bidColor: string;// 买价颜色
-        bid2Color: string;// 买价颜色
-        bid3Color: string;// 买价颜色
-        bid4Color: string;// 买价颜色
-        bid5Color: string;// 买价颜色
-        askColor: string;// 卖价颜色
-        ask2Color: string;// 卖价颜色
-        ask3Color: string;// 卖价颜色
-        ask4Color: string;// 卖价颜色
-        ask5Color: string;// 卖价颜色
-        lastColor: string;// 最新价颜色
-        openedColor: string;// 开盘颜色
-        highestColor: string;// 最高颜色
-        lowestColor: string;// 最低颜色
-        settle: number; // 结算价
-        limitdown: number; // 跌停价
-        limitup: number; // 涨停价
-        quoteminunit: number;//行情最小变动单位 [整数,报价小数位一起使用]
-        trademode: number;
-        quotegear: number;//行情档位
-    }
 }