li.shaoyi 2 týždňov pred
rodič
commit
ad3458b12f

+ 1 - 0
src/packages/digital/assets/themes/global/global.less

@@ -188,6 +188,7 @@
 
     &__content {
         max-height: 50vh;
+        word-break: break-all;
         overflow-y: auto;
         padding: 0 15px;
     }

+ 10 - 16
src/packages/mobile/views/bank/capital/statement/index.vue

@@ -15,7 +15,7 @@
             </template>
              <!-- 操作类型 -->
             <template #operatetypename="{ row }">
-                {{ operatetypename(row) }}
+                 {{ getEnumName(row) }}
             </template>
         </app-list>
     </app-pull-refresh>
@@ -25,6 +25,8 @@
 import { shallowRef } from 'vue'
 import { CellGroup, Field } from 'vant'
 import { formatDate } from '@/filters'
+import { getAccountBusinessCodeName } from '@/constants/bank'
+import { getOperateTypeName } from '@/constants/order'
 import { useRequest } from '@/hooks/request'
 import { queryAmountLog } from '@/services/api/bank'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
@@ -46,21 +48,6 @@ const operateTypeSearchList = [{
     value: 0
 }].concat(getOperateTypeSearchList())
 
-const operatetypename = ((row: Model.AmountLogRsp) => {
-    switch (i18n.global.locale) {
-        case "zh-CN":
-            return row.operatetypename
-        case "zh-TW":
-            return row.operatetypename_tw
-        case "en-US":
-            return row.operatetypenameen
-        case "vi":
-            return row.operatetypenamevi
-        default:
-            return row.operatetypenameth
-    }
-})
-
 const columns: Model.TableColumn[] = [
     { field: 'createtime', label: t('banksign.capital.createtime') },
     { field: 'operatetypename', label: t('banksign.capital.operatetypename') },
@@ -84,6 +71,13 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryAmountLog, {
     }
 })
 
+const getEnumName = (item: Model.AmountLogRsp) => {
+    if (item.changetypeenumcode === 'accountBusinessCode') {
+        return getAccountBusinessCodeName(item.changetypeenumvalue)
+    }
+    return getOperateTypeName(item.changetypeenumvalue)
+}
+
 // 选中资金类型
 const onConfirm = (value: number) => {
     pageIndex.value = 1

+ 12 - 18
src/packages/pc/views/footer/capital/statement/index.vue

@@ -3,7 +3,7 @@
     <app-table :data="tableList" v-model:columns="tableColumns" :loading="loading">
         <!-- 操作类型 -->
         <template #operatetypename="{ row }">
-            {{ operatetypename(row) }}
+            {{ getEnumName(row) }}
         </template>
         <!-- 委托时间 -->
         <template #createtime="{ value }">
@@ -18,39 +18,33 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { formatDate } from '@/filters'
+import { getAccountBusinessCodeName } from '@/constants/bank'
+import { getOperateTypeName } from '@/constants/order'
 import { useLocalPagination } from '@/hooks/pagination'
 import { useRequest } from '@/hooks/request'
 import { queryAmountLog } from '@/services/api/bank'
 import { i18n } from "@/stores";
 import AppTable from '@pc/components/base/table/index.vue'
 
+const { t } = i18n.global
+
 const { tableList, showLoadMore, initTableData, loadMore } = useLocalPagination<Model.AmountLogRsp>(30)
 
 const { loading } = useRequest(queryAmountLog, {
     onSuccess: (res) => initTableData(res.data)
 })
 
-const { t } = i18n.global
-
-const operatetypename = ((row: Model.AmountLogRsp) => {
-    switch (i18n.global.locale) {
-        case "zh-CN":
-            return row.operatetypename
-        case "zh-TW":
-            return row.operatetypename_tw
-        case "en-US":
-            return row.operatetypenameen
-        case "vi":
-            return row.operatetypenamevi
-        default:
-            return row.operatetypenameth
-    }
-})
-
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'accountid', label: 'banksign.capital.accountid' },
     { field: 'operatetypename', label: 'banksign.capital.operatetypename' },
     { field: 'amount', label: 'banksign.capital.amount' },
     { field: 'createtime', label: 'banksign.capital.createtime' }
 ])
+
+const getEnumName = (item: Model.AmountLogRsp) => {
+    if (item.changetypeenumcode === 'accountBusinessCode') {
+        return getAccountBusinessCodeName(item.changetypeenumvalue)
+    }
+    return getOperateTypeName(item.changetypeenumvalue)
+}
 </script>

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

@@ -53,10 +53,10 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'enableqty', label: 'position.goods.enableqty' },
     { field: 'frozenqty', label: 'position.goods.frozenqty' },
     { field: 'averageprice', label: 'position.goods.averageprice' },
-    { field: 'lastprice', label: 'position.goods.last' },
+    { field: 'lastPrice', label: 'position.goods.last' },
     { field: 'curholderamount', label: 'position.goods.curholderamount' },
     { field: 'marketValue', label: 'position.goods.marketValue' },
-    { field: 'closepl', label: 'position.goods.closepl' },
+    { field: 'profitLoss', label: 'position.goods.closepl' },
     { field: 'operate', label: 'common.operate', fixed: 'right', width: 180 },
 ])
 

+ 2 - 2
src/packages/pc/views/footer/pricing/position/index.vue

@@ -70,12 +70,12 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'goodsname', label: 'position.pricing.goodsname' },
     { field: 'buyorsell', label: 'position.pricing.buyorsell' },
     { field: 'curpositionqty', label: 'position.pricing.curpositionqty' },
-    { field: 'lastprice', label: 'position.pricing.lastprice' },
+    { field: 'lastPrice', label: 'position.pricing.lastprice' },
     { field: 'averageprice', label: 'position.pricing.averageprice' },
     { field: 'curholderamount', label: 'position.pricing.curholderamount' },
     { field: 'frozenqty', label: 'position.pricing.frozenqty' },
     { field: 'enableqty', label: 'position.pricing.enableqty' },
-    { field: 'closepl', label: 'position.pricing.closepl' },
+    { field: 'profitLoss', label: 'position.pricing.closepl' },
     { field: 'operate', label: 'common.operate', fixed: 'right', width: 140 },
 ])
 

+ 2 - 2
src/packages/pc/views/footer/swap/position/index.vue

@@ -62,12 +62,12 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'goodsname', label: 'position.swap.goodsname' },
     { field: 'buyorsell', label: 'position.swap.buyorsell' },
     { field: 'curpositionqty', label: 'position.swap.curpositionqty' },
-    { field: 'lastprice', label: 'position.swap.lastprice' },
+    { field: 'lastPrice', label: 'position.swap.lastprice' },
     { field: 'averageprice', label: 'position.swap.averageprice' },
     { field: 'frozenqty', label: 'position.swap.frozenqty' },
     { field: 'curholderamount', label: 'position.swap.curholderamount' },
     { field: 'enableqty', label: 'position.swap.enableqty' },
-    { field: 'closepl', label: 'position.swap.closepl' }
+    { field: 'profitLoss', label: 'position.swap.closepl' }
 ])
 
 const showComponent = (componentName: string, row: Model.TradePositionRsp) => {

+ 10 - 16
src/packages/pc/views/query/capital/list/index.vue

@@ -22,7 +22,7 @@
         </template>
          <!-- 操作类型 -->
          <template #operatetypename="{ row }">
-            {{ operatetypename(row) }}
+            {{ getEnumName(row) }}
         </template>
         <template #append v-if="showLoadMore">
             <el-button size="small" plain @click="loadMore">{{ t('common.loadMore') }}</el-button>
@@ -33,6 +33,8 @@
 <script lang="ts" setup>
 import { shallowRef, computed } from 'vue'
 import { formatDate } from '@/filters'
+import { getAccountBusinessCodeName } from '@/constants/bank'
+import { getOperateTypeName } from '@/constants/order'
 import { useLocalPagination } from '@/hooks/pagination'
 import { useRequest } from '@/hooks/request'
 import { queryAmountLog } from '@/services/api/bank'
@@ -51,21 +53,6 @@ const { loading, dataList, run } = useRequest(queryAmountLog, {
 
 const { t } = i18n.global
 
-const operatetypename = ((row: Model.AmountLogRsp) => {
-    switch (i18n.global.locale) {
-        case "zh-CN":
-            return row.operatetypename
-        case "zh-TW":
-            return row.operatetypename_tw
-        case "en-US":
-            return row.operatetypenameen
-        case "vi":
-            return row.operatetypenamevi
-        default:
-            return row.operatetypenameth
-    }
-})
-
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'accountid', label: 'banksign.capital.accountid' },
     { field: 'operatetypename', label: 'banksign.capital.operatetypename' },
@@ -107,6 +94,13 @@ const onSearch = (clear = false) => {
         run(qs)
     }, clear)
 }
+
+const getEnumName = (item: Model.AmountLogRsp) => {
+    if (item.changetypeenumcode === 'accountBusinessCode') {
+        return getAccountBusinessCodeName(item.changetypeenumvalue)
+    }
+    return getOperateTypeName(item.changetypeenumvalue)
+}
 </script>
 
 <style lang="less">