Handy_Cao 2 years ago
parent
commit
9538e251e3

+ 7 - 0
src/filters/index.ts

@@ -284,4 +284,11 @@ export function versionToNumber(value: number | string) {
         return +num.join('')
         return +num.join('')
     }
     }
     return 0
     return 0
+}
+
+/**
+ * 对手方显示脱敏
+ */
+export function tmMatchAccountID(val: string | number) {
+    return val.toString().replace(/^(.{3}).*(.{2})$/, "$1****$2");
 }
 }

+ 2 - 1
src/packages/mobile/views/order/list/components/goodstrade/detail/Index.vue

@@ -14,6 +14,7 @@
                     <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
                     <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
                     <Cell title="手续费" :value="formatDecimal(selectedRow.charge)" />
                     <Cell title="手续费" :value="formatDecimal(selectedRow.charge)" />
                     <Cell title="平仓损益" :value="formatDecimal(selectedRow.closepl)" />
                     <Cell title="平仓损益" :value="formatDecimal(selectedRow.closepl)" />
+                    <Cell title="成交对手" :value="tmMatchAccountID(selectedRow.matchaccountid)" />
                     <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
                     <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
                     <Cell title="成交单号" :value="selectedRow.tradeid" />
                     <Cell title="成交单号" :value="selectedRow.tradeid" />
                 </CellGroup>
                 </CellGroup>
@@ -25,7 +26,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
 import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
 import { CellGroup, Cell } from 'vant'
-import { formatDate, formatDecimal } from '@/filters'
+import { formatDate, formatDecimal, tmMatchAccountID } from '@/filters'
 import AppModal from '@/components/base/modal/index.vue'
 import AppModal from '@/components/base/modal/index.vue'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 
 

+ 2 - 2
src/packages/mobile/views/order/list/components/pricingtrade/detail/Index.vue

@@ -14,7 +14,7 @@
                     <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
                     <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
                     <Cell title="手续费" :value="formatDecimal(selectedRow.charge)" />
                     <Cell title="手续费" :value="formatDecimal(selectedRow.charge)" />
                     <Cell title="平仓损益" :value="formatDecimal(selectedRow.closepl)" />
                     <Cell title="平仓损益" :value="formatDecimal(selectedRow.closepl)" />
-                    <!-- <Cell title="对手方" :value="selectedRow.matchaccountid" /> -->
+                    <Cell title="对手方" :value="tmMatchAccountID(selectedRow.matchaccountid)" />
                     <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
                     <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
                     <Cell title="成交单号" :value="selectedRow.tradeid" />
                     <Cell title="成交单号" :value="selectedRow.tradeid" />
                 </CellGroup>
                 </CellGroup>
@@ -26,7 +26,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
 import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
 import { CellGroup, Cell } from 'vant'
-import { formatDate, formatDecimal } from '@/filters'
+import { formatDate, formatDecimal, tmMatchAccountID } from '@/filters'
 import AppModal from '@/components/base/modal/index.vue'
 import AppModal from '@/components/base/modal/index.vue'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 
 

+ 2 - 2
src/packages/mobile/views/order/list/components/swaptrade/detail/Index.vue

@@ -14,7 +14,7 @@
                     <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
                     <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
                     <Cell title="手续费" :value="formatDecimal(selectedRow.charge)" />
                     <Cell title="手续费" :value="formatDecimal(selectedRow.charge)" />
                     <Cell title="平仓盈亏" :value="formatDecimal(selectedRow.closepl)" />
                     <Cell title="平仓盈亏" :value="formatDecimal(selectedRow.closepl)" />
-                    <Cell title="对手方" :value="selectedRow.matchaccountid" />
+                    <Cell title="对手方" :value="tmMatchAccountID(selectedRow.matchaccountid)" />
                     <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
                     <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
                     <Cell title="成交单号" :value="selectedRow.tradeid" />
                     <Cell title="成交单号" :value="selectedRow.tradeid" />
                 </CellGroup>
                 </CellGroup>
@@ -26,7 +26,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
 import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
 import { CellGroup, Cell } from 'vant'
-import { formatDate, formatDecimal } from '@/filters'
+import { formatDate, formatDecimal, tmMatchAccountID } from '@/filters'
 import AppModal from '@/components/base/modal/index.vue'
 import AppModal from '@/components/base/modal/index.vue'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 
 

+ 6 - 2
src/packages/pc/views/footer/goods/trade/index.vue

@@ -21,6 +21,10 @@
         <template #buyorsell="{ value }">
         <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
             {{ getBuyOrSellName(value) }}
         </template>
         </template>
+        <!-- 成交对手 -->
+        <template #matchaccountid="{ value }">
+            {{ tmMatchAccountID(value) }}
+        </template>
         <!-- 成交类型 -->
         <!-- 成交类型 -->
         <template #buildtype="{ value }">
         <template #buildtype="{ value }">
             {{ getBuildTypeName(value) }}
             {{ getBuildTypeName(value) }}
@@ -42,7 +46,7 @@ import { useLocalPagination } from '@/hooks/pagination'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 import { getBuyOrSellName, getBuildTypeName } from '@/constants/order'
 import { queryTradeDetail } from '@/services/api/order'
 import { queryTradeDetail } from '@/services/api/order'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppTable from '@pc/components/base/table/index.vue'
-import { formatDate } from '@/filters'
+import { formatDate, tmMatchAccountID } from '@/filters'
 import eventBus from '@/services/bus'
 import eventBus from '@/services/bus'
 
 
 const { tableList, showLoadMore, initTableData, loadMore } = useLocalPagination<Model.TradeDetailRsp>()
 const { tableList, showLoadMore, initTableData, loadMore } = useLocalPagination<Model.TradeDetailRsp>()
@@ -63,7 +67,7 @@ const tableColumns = ref<Model.TableColumn[]>([
     { prop: 'charge', label: '手续费' },
     { prop: 'charge', label: '手续费' },
     { prop: 'closepl', label: '平仓盈亏' },
     { prop: 'closepl', label: '平仓盈亏' },
     { prop: 'tradeid', label: '成交单号' },
     { prop: 'tradeid', label: '成交单号' },
-    // { prop: 'matchaccountid', label: '成交对手' },
+    { prop: 'matchaccountid', label: '成交对手' },
     { prop: 'tradetime', label: '成交时间' }
     { prop: 'tradetime', label: '成交时间' }
 ])
 ])
 
 

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

@@ -22,7 +22,7 @@
                         <slot name="headerRight"></slot> 
                         <slot name="headerRight"></slot> 
                         <el-button type="primary" @click="active = false" v-if="active">买卖大厅</el-button>
                         <el-button type="primary" @click="active = false" v-if="active">买卖大厅</el-button>
                         <el-button type="primary" @click="active = true" v-else>图表</el-button>
                         <el-button type="primary" @click="active = true" v-else>图表</el-button>
-                        <el-button type="primary" v-if="userStore.userType != 5" @click="openComponent('listing')">挂牌求购</el-button>
+                        <el-button type="primary" v-if="userStore.userType != 5" @click="openComponent('listing')">挂牌</el-button>
                     </div>
                     </div>
                 </div>
                 </div>
             </template>
             </template>

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

@@ -13,6 +13,10 @@
         <template #buyorsell="{ value }">
         <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
             {{ getBuyOrSellName(value) }}
         </template>
         </template>
+        <!-- 成交对手 -->
+        <template #matchaccountid="{ value }">
+            {{ tmMatchAccountID(value) }}
+        </template>
         <!-- 成交类型 -->
         <!-- 成交类型 -->
         <template #buildtype="{ value }">
         <template #buildtype="{ value }">
             {{ getBuildTypeName(value) }}
             {{ getBuildTypeName(value) }}
@@ -26,7 +30,7 @@
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { shallowRef } from 'vue'
-import { formatDate } from '@/filters'
+import { formatDate, tmMatchAccountID } from '@/filters'
 import { useDataFilter } from '@/hooks/datatable'
 import { useDataFilter } from '@/hooks/datatable'
 import { useRequest } from '@/hooks/request'
 import { useRequest } from '@/hooks/request'
 import { queryHisTradeDetail } from '@/services/api/order'
 import { queryHisTradeDetail } from '@/services/api/order'
@@ -53,7 +57,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'charge', label: '手续费' },
     { prop: 'charge', label: '手续费' },
     { prop: 'closepl', label: '平仓盈亏' },
     { prop: 'closepl', label: '平仓盈亏' },
     { prop: 'tradeid', label: '成交单号' },
     { prop: 'tradeid', label: '成交单号' },
-    // { prop: 'matchaccountid', label: '成交对手' },
+    { prop: 'matchaccountid', label: '成交对手' },
     { prop: 'tradetime', label: '成交时间' },
     { prop: 'tradetime', label: '成交时间' },
 ])
 ])
 
 

+ 6 - 2
src/packages/pc/views/query/trade/goods/list/index.vue

@@ -5,6 +5,10 @@
         <template #buyorsell="{ value }">
         <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
             {{ getBuyOrSellName(value) }}
         </template>
         </template>
+        <!-- 成交对手 -->
+        <template #matchaccountid="{ value }">
+            {{ tmMatchAccountID(value) }}
+        </template>
         <!-- 成交类型 -->
         <!-- 成交类型 -->
         <template #buildtype="{ value }">
         <template #buildtype="{ value }">
             {{ getBuildTypeName(value) }}
             {{ getBuildTypeName(value) }}
@@ -18,7 +22,7 @@
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { shallowRef } from 'vue'
-import { formatDate } from '@/filters'
+import { formatDate, tmMatchAccountID } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { useRequest } from '@/hooks/request'
 import { queryTradeDetail } from '@/services/api/order'
 import { queryTradeDetail } from '@/services/api/order'
 import { getBuildTypeName, getBuyOrSellName } from '@/constants/order'
 import { getBuildTypeName, getBuyOrSellName } from '@/constants/order'
@@ -40,7 +44,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'charge', label: '手续费' },
     { prop: 'charge', label: '手续费' },
     { prop: 'closepl', label: '平仓盈亏' },
     { prop: 'closepl', label: '平仓盈亏' },
     { prop: 'tradeid', label: '成交单号' },
     { prop: 'tradeid', label: '成交单号' },
-    // { prop: 'matchaccountid', label: '成交对手' },
+    { prop: 'matchaccountid', label: '成交对手' },
     { prop: 'tradetime', label: '成交时间' },
     { prop: 'tradetime', label: '成交时间' },
 ])
 ])
 </script>
 </script>

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

@@ -17,6 +17,10 @@
          <template #buyorsell="{ value }">
          <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
             {{ getBuyOrSellName(value) }}
         </template>
         </template>
+         <!-- 成交对手 -->
+         <template #matchaccountid="{ value }">
+            {{ tmMatchAccountID(value) }}
+        </template>
         <!-- 商品合约 -->
         <!-- 商品合约 -->
         <template #goodsname="{ row }">
         <template #goodsname="{ row }">
             {{ row.goodscode }}/{{ row.goodsname }}
             {{ row.goodscode }}/{{ row.goodsname }}
@@ -34,7 +38,7 @@
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { shallowRef, reactive } from 'vue'
 import { shallowRef, reactive } from 'vue'
-import { formatDate, formatDecimal } from '@/filters'
+import { formatDate, formatDecimal, tmMatchAccountID } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { useRequest } from '@/hooks/request'
 import { useDataFilter } from '@/hooks/datatable'
 import { useDataFilter } from '@/hooks/datatable'
 import { queryHisTradeDetail, } from '@/services/api/order'
 import { queryHisTradeDetail, } from '@/services/api/order'
@@ -66,6 +70,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'tradeqty', label: '成交数量' },
     { prop: 'tradeqty', label: '成交数量' },
     { prop: 'tradeamount', label: '成交金额 ' },
     { prop: 'tradeamount', label: '成交金额 ' },
     { prop: 'closepl', label: '平仓盈亏' },
     { prop: 'closepl', label: '平仓盈亏' },
+    { prop: 'matchaccountid', label: '成交对手' },
     { prop: 'tradetime', label: '成交时间' },
     { prop: 'tradetime', label: '成交时间' },
 ])
 ])
 
 

+ 6 - 1
src/packages/pc/views/query/trade/swap/list/index.vue

@@ -9,6 +9,10 @@
          <template #buyorsell="{ value }">
          <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
             {{ getBuyOrSellName(value) }}
         </template>
         </template>
+         <!-- 成交对手 -->
+         <template #matchaccountid="{ value }">
+            {{ tmMatchAccountID(value) }}
+        </template>
         <!-- 商品合约 -->
         <!-- 商品合约 -->
         <template #goodsname="{ row }">
         <template #goodsname="{ row }">
             {{ row.goodscode }}/{{ row.goodsname }}
             {{ row.goodscode }}/{{ row.goodsname }}
@@ -26,7 +30,7 @@
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { shallowRef } from 'vue'
-import { formatDate, formatDecimal } from '@/filters'
+import { formatDate, formatDecimal, tmMatchAccountID } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { useRequest } from '@/hooks/request'
 import { queryTradeDetail } from '@/services/api/order'
 import { queryTradeDetail } from '@/services/api/order'
 import { getBuildTypeName, getBuyOrSellName } from '@/constants/order'
 import { getBuildTypeName, getBuyOrSellName } from '@/constants/order'
@@ -48,6 +52,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'tradeqty', label: '成交数量' },
     { prop: 'tradeqty', label: '成交数量' },
     { prop: 'tradeamount', label: '成交金额 ' },
     { prop: 'tradeamount', label: '成交金额 ' },
     { prop: 'closepl', label: '平仓盈亏' },
     { prop: 'closepl', label: '平仓盈亏' },
+    { prop: 'matchaccountid', label: '成交对手' },
     { prop: 'tradetime', label: '成交时间' },
     { prop: 'tradetime', label: '成交时间' },
 ])
 ])
 </script>
 </script>