li.shaoyi před 1 rokem
rodič
revize
b08a10b4bd

+ 35 - 35
package-lock.json

@@ -15,7 +15,7 @@
         "crypto-js": "^4.1.1",
         "default-passive-events": "^2.0.0",
         "echarts": "^5.4.3",
-        "element-plus": "^2.3.8",
+        "element-plus": "^2.8.1",
         "hqchart": "^1.1.12450",
         "html5-qrcode": "^2.2.5",
         "jquery": "^3.7.1",
@@ -2074,9 +2074,9 @@
       }
     },
     "node_modules/@element-plus/icons-vue": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.1.0.tgz",
-      "integrity": "sha512-PSBn3elNoanENc1vnCfh+3WA9fimRC7n+fWkf3rE5jvv+aBohNHABC/KAR5KWPecxWxDTVT1ERpRbOMRcOV/vA==",
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
+      "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
       "peerDependencies": {
         "vue": "^3.2.0"
       }
@@ -2206,26 +2206,26 @@
       }
     },
     "node_modules/@floating-ui/core": {
-      "version": "1.5.0",
-      "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz",
-      "integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==",
+      "version": "1.6.8",
+      "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz",
+      "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==",
       "dependencies": {
-        "@floating-ui/utils": "^0.1.3"
+        "@floating-ui/utils": "^0.2.8"
       }
     },
     "node_modules/@floating-ui/dom": {
-      "version": "1.5.3",
-      "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz",
-      "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==",
+      "version": "1.6.11",
+      "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz",
+      "integrity": "sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==",
       "dependencies": {
-        "@floating-ui/core": "^1.4.2",
-        "@floating-ui/utils": "^0.1.3"
+        "@floating-ui/core": "^1.6.0",
+        "@floating-ui/utils": "^0.2.8"
       }
     },
     "node_modules/@floating-ui/utils": {
-      "version": "0.1.4",
-      "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.4.tgz",
-      "integrity": "sha512-qprfWkn82Iw821mcKofJ5Pk9wgioHicxcQMxx+5zt5GSKoqdWvgG5AxVmpmUUjzTLPVSH5auBrhI93Deayn/DA=="
+      "version": "0.2.8",
+      "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz",
+      "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig=="
     },
     "node_modules/@hapi/hoek": {
       "version": "9.3.0",
@@ -2884,14 +2884,14 @@
       }
     },
     "node_modules/@types/lodash": {
-      "version": "4.14.199",
-      "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz",
-      "integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg=="
+      "version": "4.17.9",
+      "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.9.tgz",
+      "integrity": "sha512-w9iWudx1XWOHW5lQRS9iKpK/XuRhnN+0T7HvdCCd802FYkT1AMTnxndJHGrNJwRoRHkslGr4S29tjm1cT7x/7w=="
     },
     "node_modules/@types/lodash-es": {
-      "version": "4.17.9",
-      "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.9.tgz",
-      "integrity": "sha512-ZTcmhiI3NNU7dEvWLZJkzG6ao49zOIjEgIE0RgV7wbPxU0f2xT3VSAHw2gmst8swH6V0YkLRGp4qPlX/6I90MQ==",
+      "version": "4.17.12",
+      "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
+      "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
       "dependencies": {
         "@types/lodash": "*"
       }
@@ -5053,9 +5053,9 @@
       }
     },
     "node_modules/@vueuse/core/node_modules/vue-demi": {
-      "version": "0.14.6",
-      "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz",
-      "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==",
+      "version": "0.14.10",
+      "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz",
+      "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
       "hasInstallScript": true,
       "bin": {
         "vue-demi-fix": "bin/vue-demi-fix.js",
@@ -5097,9 +5097,9 @@
       }
     },
     "node_modules/@vueuse/shared/node_modules/vue-demi": {
-      "version": "0.14.6",
-      "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz",
-      "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==",
+      "version": "0.14.10",
+      "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz",
+      "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
       "hasInstallScript": true,
       "bin": {
         "vue-demi-fix": "bin/vue-demi-fix.js",
@@ -8478,9 +8478,9 @@
       }
     },
     "node_modules/dayjs": {
-      "version": "1.11.10",
-      "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
-      "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
+      "version": "1.11.13",
+      "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
+      "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
     },
     "node_modules/debug": {
       "version": "4.3.4",
@@ -9333,12 +9333,12 @@
       "dev": true
     },
     "node_modules/element-plus": {
-      "version": "2.3.14",
-      "resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.3.14.tgz",
-      "integrity": "sha512-9yvxUaU4jXf2ZNPdmIxoj/f8BG8CDcGM6oHa9JIqxLjQlfY4bpzR1E5CjNimnOX3rxO93w1TQ0jTVt0RSxh9kA==",
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.8.1.tgz",
+      "integrity": "sha512-p11/6w/O0+hGvPhiN3jrcgh+XG+eg5jZlLdQVYvcPHZYhhCh3J3YeZWW1JO/REPES1vevkboT6VAi+9wHA8Dsg==",
       "dependencies": {
         "@ctrl/tinycolor": "^3.4.1",
-        "@element-plus/icons-vue": "^2.0.6",
+        "@element-plus/icons-vue": "^2.3.1",
         "@floating-ui/dom": "^1.0.1",
         "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
         "@types/lodash": "^4.14.182",

+ 1 - 1
package.json

@@ -19,7 +19,7 @@
     "crypto-js": "^4.1.1",
     "default-passive-events": "^2.0.0",
     "echarts": "^5.4.3",
-    "element-plus": "^2.3.8",
+    "element-plus": "^2.8.1",
     "hqchart": "^1.1.12450",
     "html5-qrcode": "^2.2.5",
     "jquery": "^3.7.1",

+ 6 - 2
src/packages/pc/assets/themes/default/default.less

@@ -74,8 +74,8 @@
     &__item {
         --el-text-color-regular: #7a8a94;
 
-        &.hover,
-        &.selected {
+        &.is-hovering,
+        &.is-selected {
             color: #fff;
             background-color: #3a87f7;
         }
@@ -176,6 +176,10 @@
         }
 
         .el-select {
+            --el-fill-color-blank: var(--el-input-bg-color);
+            --el-border-color: var(--el-input-border-color);
+            --el-border-color-hover: var(--el-input-hover-border-color);
+
             width: 100%;
         }
 

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

@@ -6,128 +6,21 @@
     height: 100%;
     color: #fff;
 
-    &__header {
-        display: flex;
-        align-items: center;
-
-        >.block {
-            display: inline-flex;
-            align-items: center;
-            gap: 10px;
-            padding: 6px;
-
-            &:empty {
-                display: none;
-            }
-
-            &--right {
-                margin-left: auto;
-            }
-        }
-    }
-
-    &__container {
-        flex: 1;
-        overflow: hidden;
-    }
-
-    &__footer {
-        &:empty {
-            display: none;
-        }
-    }
-
     .el-table-v2 {
-        --el-bg-color: transparent; //表格背景颜色
+        --el-bg-color: #181e22; //表格背景颜色
         --el-table-row-hover-bg-color: #172b56; // 表格行鼠标经过背景色
         --el-table-border-color: #161a1c; // 表格边框颜色
         --el-table-border: 1px solid var(--el-table-border-color); // 表格边框
-    }
-
-    .el-table {
-        --el-table-bg-color: transparent; //表格背景颜色
-        --el-table-text-color: #e5e5e5; //表格文字颜色
-        --el-table-border-color: #161a1c; // 表格边框颜色
-        --el-table-border: 1px solid var(--el-table-border-color); // 表格边框
         --el-table-header-bg-color: #212629; // 表头背景颜色
         --el-table-header-text-color: #556772; // 表头文字颜色
-        --el-table-tr-bg-color: var(--el-table-bg-color); // 表格行背景颜色
-        --el-table-row-hover-bg-color: #172b56; // 表格行鼠标经过背景色
-        --el-table-expanded-cell-bg-color: var(--el-table-bg-color); // 展开行背景颜色
-        --el-table-current-row-bg-color: #172b56; // 当前行高亮颜色
-
-        width: 100%;
 
-        th.el-table__cell {
-            height: 30px;
+        &__header-cell {
+            justify-content: center;
             font-weight: normal;
-            padding: 4px 0;
-        }
-
-        td.el-table__cell {
-            padding: 4px 0;
-
-            .el-table__placeholder:empty {
-                display: none;
-            }
-        }
-
-        td.el-table-fixed-column {
-
-            &--left,
-            &--right {
-                --el-bg-color: #181e22; // 非全局待处理
-            }
-        }
-
-        &__expanded-cell {
-            padding: 4px !important;
-
-            &:empty {
-                display: none;
-            }
-
-            .buttonbar,
-            .app-auth {
-                position: sticky;
-                right: 5px;
-                display: table;
-                margin-left: auto;
-            }
-        }
-    }
-
-    .el-table {
-
-        &.buy,
-        &.sell {
-            --el-table-row-hover-bg-color: var(--el-table-bg-color); // 表格行鼠标经过背景色
-            --el-table-current-row-bg-color: var(--el-table-bg-color); // 当前行高亮颜色
-
-            td.el-table {
-
-                // &__cell:not(&__expanded-cell):first-child,
-                // &__cell:is(&__expand-column)+td {
-                //     background-color: var(--el-table-header-bg-color);
-                // }
-
-                &__cell:not(&__expanded-cell):first-child {
-                    background-color: var(--el-table-header-bg-color);
-                }
-
-                &__expanded-cell,
-                &__expanded-cell:hover {
-                    background-color: #000 !important;
-                }
-            }
-        }
-
-        &.buy {
-            --el-table-bg-color: #271112; //表格背景颜色
         }
 
-        &.sell {
-            --el-table-bg-color: #10251d; //表格背景颜色
+        &__row-cell {
+            justify-content: center;
         }
     }
 }

+ 26 - 43
src/packages/pc/components/base/table-v2/index.vue

@@ -2,63 +2,46 @@
   <div class="app-table-v2">
     <el-auto-resizer>
       <template #default="{ height, width }">
-        <el-table-v2 :data="tableList" :columns="createColumns(width)" :width="width" :height="height" :header-height="32"
-          :row-height="32" />
+        <el-table-v2 :data="tableList" :columns="tableColumns" :width="width" :height="height"
+          :header-height="headerHeight" :row-height="rowHeight" fixed />
       </template>
     </el-auto-resizer>
+    <slot name="footer"></slot>
   </div>
 </template>
 
 <script lang="tsx" setup>
-import { shallowRef } from 'vue'
+import { PropType, computed } from 'vue'
 import { Column } from 'element-plus'
-import { formatDate } from '@/filters'
-import { queryHisAmountLog } from '@/services/api/bank'
 
-defineProps({
-  dataList: {
+const props = defineProps({
+  data: {
     type: Array,
     required: true
+  },
+  columns: {
+    type: Array as PropType<Partial<Column>[]>,
+    default: () => ([])
+  },
+  headerHeight: {
+    type: Number,
+    default: 32
+  },
+  rowHeight: {
+    type: Number,
+    default: 34
   }
 })
 
-const tableList = shallowRef<Model.HisAmountLogRsp[]>([])
+const tableList = computed(() => props.data.map((e, i) => {
+  const obj = { id: i }
+  return { ...obj, ...e as object }
+}))
 
-queryHisAmountLog().then((res) => {
-  tableList.value = res.data
-})
-
-const createColumns = (width: number) => {
-  const columnWidth = width / 4
-  const columns: Column[] = [
-    {
-      key: 'accountid',
-      dataKey: 'accountid',
-      title: '资金账号',
-      width: columnWidth,
-    },
-    {
-      key: 'operatetypename',
-      dataKey: 'operatetypename',
-      title: '资金类型',
-      width: columnWidth
-    },
-    {
-      key: 'amount',
-      dataKey: 'amount',
-      title: '金额',
-      width: columnWidth
-    },
-    {
-      key: 'createtime',
-      dataKey: 'createtime',
-      title: '时间',
-      width: columnWidth,
-      cellRenderer: ({ cellData }) => <span>{formatDate(cellData)}</span>
-    }
-  ]
-  return columns
-}
+const tableColumns = computed(() => props.columns.map((e) => ({
+  width: 120,
+  ...e
+})))
 </script>
 
 <style lang="less">

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

@@ -68,7 +68,7 @@
 
             &--left,
             &--right {
-                --el-bg-color: #181e22; // 非全局待处理
+                background-color: #181e22; // 非全局待处理
             }
         }
 

+ 75 - 90
src/packages/pc/views/footer/pricing/detail2/index.vue

@@ -1,94 +1,30 @@
 <!-- 挂牌点价-持仓明细 按账户风控 -->
 <template>
-    <app-table :data="tableList" v-model:columns="tableColumns">
-        <!-- 商品代码/名称 -->
-        <template #goodsname="{ row }">
-            {{ row.goodsCode }}
-        </template>
-        <!-- 方向 -->
-        <template #buyorsell="{ row }">
-            {{ getBuyOrSellName(row.tHDetailEx.buyOrSell) }}
-        </template>
-        <!-- 可用数量 -->
-        <template #enableqty="{ row }">
-            {{ enableqty(row) + getGoodsUnitName(row.goodsUnitID) }}
-        </template>
-        <!-- 持仓数量 -->
-        <template #holderqty="{ row }">
-            {{ row.tHDetailEx.holderQty * row.agreeUnit + getGoodsUnitName(row.goodsUnitID) }}
-        </template>
-        <!-- 冻结数量 -->
-        <template #freezeqty="{ row }">
-            {{ row.tHDetailEx.freezeQty * row.agreeUnit + getGoodsUnitName(row.goodsUnitID) }}
-        </template>
-        <!-- 持仓价格 -->
-        <template #holderprice="{ row }">
-            {{ formatDecimal(row.tHDetailEx.holderPrice, row.decimalPlace) }}
-        </template>
-        <!-- 持仓金额 -->
-        <template #holderamount="{ row }">
-            {{ formatDecimal(row.tHDetailEx.holderAmount, row.decimalPlace) }}
-        </template>
-        <!-- 占用 -->
-        <template #usedMargin="{ row }">
-            {{ formatDecimal(row.tHDetailEx.payedDeposit + row.tHDetailEx.restockDeposit, row.decimalPlace) }}
-        </template>
-        <!-- 浮动权益-->
-        <template #profitLoss="{ row }">
-            <!-- 待优化 -->
-            <span :class="handlePriceColor(sbyjOrderStore.calcFloatpl(row))">
-                {{ formatDecimal(sbyjOrderStore.calcFloatpl(row)) }}
-            </span>
-        </template>
-        <!-- 风险率 -->
-        <!-- <template #riskRate="{ row }">
-            <span :class="row.tHDetailEx.depositRate >= row.tHDetailEx.promptDepositRate ? 'g-price-up' : ''">
-                {{ parsePercent(row.tHDetailEx.riskRate) }}
-            </span>
-        </template> -->
-        <!-- 交易时间 -->
-        <template #tradetime="{ row }">
-            {{ formatDate(row.tHDetailEx.tradeTime) }}
-        </template>
-        <!-- 成交单号 -->
-        <template #tradeid="{ row }">
-            {{ row.tHDetailEx.tradeID }}
-        </template>
-        <!-- 操作 -->
-        <template #operate="{ row }">
-            <el-button type="danger" size="small" @click="showComponent('transfer', row)">{{ t('operation.close')
-                }}</el-button>
-            <el-button type="primary" size="small" @click="showComponent('delivery', row)">{{ t('operation.delivery')
-                }}</el-button>
-        </template>
-        <template #append v-if="showLoadMore">
-            <el-button size="small" plain @click="loadMore">{{ t('common.loadMore') }}</el-button>
-        </template>
+    <app-table-v2 :data="sbyjOrderStore.orderComputedList" :columns="tableColumns">
         <template #footer>
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </template>
-    </app-table>
+    </app-table-v2>
 </template>
 
-<script lang="ts" setup>
-import { shallowRef, defineAsyncComponent, onMounted } from 'vue'
+<script lang="tsx" setup>
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { Column, TableV2FixedDir } from 'element-plus'
 import { getBuyOrSellName } from '@/constants/order'
 import { formatDecimal, formatDate, handlePriceColor } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
 import { useComponent } from '@/hooks/component'
-import { useLocalPagination } from '@/hooks/pagination'
 import { i18n } from '@/stores'
 import { useSBYJOrderStore } from '@/stores'
-import AppTable from '@pc/components/base/table/index.vue'
+import AppTableV2 from '@pc/components/base/table-v2/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['transfer', defineAsyncComponent(() => import('./components/transfer/index.vue'))],
     ['delivery', defineAsyncComponent(() => import('./components/delivery/index.vue'))],
 ])
 
-const { t } = i18n.global
-const { tableList, showLoadMore, initTableData, loadMore } = useLocalPagination<Model.SBYJMyOrderRsp>()
+const t = i18n.global.t
 const selectedRow = shallowRef<Model.SBYJMyOrderRsp>()
 
 const sbyjOrderStore = useSBYJOrderStore()
@@ -106,24 +42,73 @@ const showComponent = (componentName: string, row: Model.SBYJMyOrderRsp) => {
     openComponent(componentName)
 }
 
-const tableColumns = shallowRef<Model.TableColumn[]>([
-    { field: 'goodsname', label: 'position.goods.goodsname' },
-    { field: 'buyorsell', label: 'position.goods.buyorsell' },
-    { field: 'holderqty', label: 'position.goods.holddetail.holderqty' },
-    { field: 'freezeqty', label: 'position.goods.holddetail.freezeqty' },
-    { field: 'enableqty', label: 'position.goods.holddetail.enableqty' },
-    { field: 'holderprice', label: 'position.goods.holddetail.holderprice' },
-    { field: 'holderamount', label: 'position.goods.holddetail.holderamount' },
-    { field: 'usedMargin', label: 'position.goods.holddetail.usedMargin' },
-    { field: 'profitLoss', label: 'position.goods.holddetail.profitLoss' },
-    { field: 'tradetime', label: 'position.goods.holddetail.tradetime' },
-    { field: 'tradeid', label: 'position.goods.holddetail.tradeid' },
-    { field: 'operate', label: 'common.operate', fixed: 'right', width: 140 },
+const tableColumns = shallowRef<Partial<Column>[]>([
+    {
+        key: 'goodsCode',
+        dataKey: 'goodsCode',
+        title: t('position.goods.goodsname')
+    },
+    {
+        key: 'buyOrSell',
+        title: t('position.goods.buyorsell'),
+        cellRenderer: ({ rowData }) => <span>{getBuyOrSellName(rowData.tHDetailEx.buyOrSell)}</span>
+    },
+    {
+        key: 'holderQty',
+        title: t('position.goods.holddetail.holderqty'),
+        cellRenderer: ({ rowData }) => <span>{rowData.tHDetailEx.holderQty * rowData.agreeUnit + getGoodsUnitName(rowData.goodsUnitID)}</span>
+    },
+    {
+        key: 'freezeQty',
+        title: t('position.goods.holddetail.freezeqty'),
+        cellRenderer: ({ rowData }) => <span>{rowData.tHDetailEx.freezeQty * rowData.agreeUnit + getGoodsUnitName(rowData.goodsUnitID)}</span>
+    },
+    {
+        key: 'enableQty',
+        title: t('position.goods.holddetail.enableqty'),
+        cellRenderer: ({ rowData }) => <span>{enableqty(rowData) + getGoodsUnitName(rowData.goodsUnitID)}</span>
+    },
+    {
+        key: 'holderPrice',
+        title: t('position.goods.holddetail.holderprice'),
+        cellRenderer: ({ rowData }) => <span>{formatDecimal(rowData.tHDetailEx.holderPrice, rowData.decimalPlace)}</span>
+    },
+    {
+        key: 'holderAmount',
+        title: t('position.goods.holddetail.holderamount'),
+        cellRenderer: ({ rowData }) => <span>{formatDecimal(rowData.tHDetailEx.holderAmount, rowData.decimalPlace)}</span>
+    },
+    {
+        key: 'usedMargin',
+        title: t('position.goods.holddetail.usedMargin'),
+        cellRenderer: ({ rowData }) => <span>{formatDecimal(rowData.tHDetailEx.payedDeposit + rowData.tHDetailEx.restockDeposit, rowData.decimalPlace)}</span>
+    },
+    {
+        key: 'floatPL',
+        title: t('position.goods.holddetail.profitLoss'),
+        cellRenderer: ({ rowData }) => <span class={handlePriceColor(rowData.floatPL)}>{formatDecimal(rowData.tHDetailEx.floatPL)}</span>
+    },
+    {
+        key: 'tradeTime',
+        title: t('position.goods.holddetail.tradetime'),
+        width: 180,
+        cellRenderer: ({ rowData }) => <span>{formatDate(rowData.tHDetailEx.tradeTime)}</span>
+    },
+    {
+        key: 'tradeID',
+        dataKey: 'tHDetailEx.tradeID',
+        title: t('position.goods.holddetail.tradeid'),
+        width: 200,
+    },
+    {
+        key: 'operate',
+        title: t('common.operate'),
+        width: 140,
+        fixed: TableV2FixedDir.RIGHT,
+        cellRenderer: ({ rowData }) => <>
+            <el-button type="danger" size="small" onClick={() => showComponent('transfer', rowData)}>{t('operation.close')}</el-button>
+            <el-button type="primary" size="small" onClick={() => showComponent('delivery', rowData)}>{t('operation.delivery')}</el-button>
+        </>
+    },
 ])
-
-onMounted(() => {
-    // 待优化
-    const dataList = sbyjOrderStore.orderList.filter((e) => e.tHDetailEx.holderQty > 0)
-    initTableData(dataList)
-})
 </script>

+ 2 - 2
src/packages/tss/views/home/main/index.vue

@@ -18,13 +18,13 @@
             <Iconfont label-direction="bottom" icon="g-icon-swap--line">{{ $t('home.product') }}</Iconfont>
           </li>
           <li @click="$router.push({ name: 'pricing-list' })">
-            <Iconfont label-direction="bottom" icon="g-icon-spot--line">{{ $t('home.pricing') }}</Iconfont>
+            <Iconfont label-direction="bottom" icon="g-icon-pricing--line">{{ $t('home.pricing') }}</Iconfont>
           </li>
           <li @click="$router.push({ name: 'pricing-trade', query: {} })">
             <Iconfont label-direction="bottom" icon="g-icon-pickup--line">{{ $t('home.pickup') }}</Iconfont>
           </li>
           <li @click="openComponent('detail2')">
-            <Iconfont label-direction="bottom" icon="g-icon-pricing--line">{{ $t('home.delivery') }}</Iconfont>
+            <Iconfont label-direction="bottom" icon="g-icon-spot--line">{{ $t('home.delivery') }}</Iconfont>
           </li>
         </ul>
       </app-block>