li.shaoyi hace 1 mes
padre
commit
8db72c457b
Se han modificado 45 ficheros con 104 adiciones y 69 borrados
  1. 2 2
      src/packages/digital/views/wallet/components/spot/composables.ts
  2. 33 5
      src/packages/digital/views/wallet/transfer/index.vue
  3. 1 1
      src/packages/gcszt/views/mine/Index.vue
  4. 1 1
      src/packages/gstj/views/mine/Index.vue
  5. 1 1
      src/packages/gzcj/views/mine/Index.vue
  6. 1 1
      src/packages/mobile/views/ballot/detail/components/delisting/index.vue
  7. 1 1
      src/packages/mobile/views/bank/capital/information/index.vue
  8. 4 4
      src/packages/mobile/views/goods/detail/components/listing/Index.vue
  9. 1 1
      src/packages/mobile/views/goods/trade/components/delisting/index.vue
  10. 1 1
      src/packages/mobile/views/mine/Index.vue
  11. 1 1
      src/packages/mobile/views/presale/detail/components/delisting/index.vue
  12. 4 4
      src/packages/mobile/views/pricing/trade/Index.vue
  13. 3 3
      src/packages/mobile/views/pricing/trade/prepayment/Index.vue
  14. 3 3
      src/packages/mobile/views/pricing/trade/v2/Index.vue
  15. 1 1
      src/packages/mobile/views/spot/add/components/sell/index.vue
  16. 1 1
      src/packages/mobile/views/spot/detail/components/delisting/index.vue
  17. 1 1
      src/packages/mobile/views/spot/detail/components/listing/index.vue
  18. 1 1
      src/packages/mobile/views/swap/detail/components/delisting/Index.vue
  19. 1 1
      src/packages/mobile/views/swap/detail/components/listing/Index.vue
  20. 1 1
      src/packages/mobile/views/transfer/listing/Index.vue
  21. 1 1
      src/packages/nhgj/views/mine/Index.vue
  22. 1 1
      src/packages/pc/views/footer/capital/summary/index.vue
  23. 3 3
      src/packages/pc/views/market/trade/goods/list/listing/index.vue
  24. 1 1
      src/packages/pc/views/market/trade/presell/ballot/detail/delisting/index.vue
  25. 1 1
      src/packages/pc/views/market/trade/presell/bidding/detail/delisting/index.vue
  26. 4 4
      src/packages/pc/views/market/trade/pricing/list/listing/index.vue
  27. 1 1
      src/packages/pc/views/market/trade/spot/listing/index.vue
  28. 1 1
      src/packages/pc/views/market/trade/spot/order/delisting/index.vue
  29. 1 1
      src/packages/pc/views/market/trade/spot/order/listing/index.vue
  30. 1 1
      src/packages/pc/views/market/trade/swap/detail/listing/index.vue
  31. 1 1
      src/packages/pc/views/market/trade/swap/detail/order/delisting/index.vue
  32. 1 1
      src/packages/qdhs/views/mine/Index.vue
  33. 1 1
      src/packages/qxst/views/mine/Index.vue
  34. 1 1
      src/packages/sbyj/views/mine/index.vue
  35. 1 1
      src/packages/sjgj/views/mine/index.vue
  36. 1 1
      src/packages/snhl/views/mine/index.vue
  37. 1 1
      src/packages/tc/views/mine/Index.vue
  38. 1 1
      src/packages/thj/views/mine/Index.vue
  39. 1 1
      src/packages/tjmd/views/mine/Index.vue
  40. 1 1
      src/packages/tss/views/bank/capital/index.vue
  41. 1 1
      src/packages/tss/views/mine/Index.vue
  42. 1 1
      src/packages/zrwyt/views/mine/Index.vue
  43. 1 1
      src/packages/zrwyt2/views/mine/Index.vue
  44. 12 6
      src/stores/modules/account.ts
  45. 1 0
      src/types/model/account.d.ts

+ 2 - 2
src/packages/digital/views/wallet/components/spot/composables.ts

@@ -11,8 +11,8 @@ export const useSpotAccountStore = defineStore('spotAaccount', () => {
         return dataList.value.filter((e) => currencyIds.includes(e.currencyid))
     }
 
-    const getAccountItem = (prop: Partial<Model.TaaccountDigitalsRsp>) => {
-        return dataList.value.find(item => isMatch(item, prop))
+    const getAccountItem = (props: Partial<Model.TaaccountDigitalsRsp>) => {
+        return dataList.value.find(item => isMatch(item, props))
     }
 
     // 获取可用余额

+ 33 - 5
src/packages/digital/views/wallet/transfer/index.vue

@@ -25,12 +25,15 @@
                         <app-stepper v-model="formData.Amount" :min="0" />
                     </template>
                 </Field>
-                <Cell title="可用" value="0" />
+                <Cell title="可用"
+                    :value="formatDecimal(contractAccount?.avaiableBalance ?? 0, contractAccount?.currencydecimalplace)"
+                    v-if="formData.DigitalTransferType === 3" />
+                <Cell title="可用" :value="spotBalance" v-if="formData.DigitalTransferType === 4" />
             </CellGroup>
         </Form>
         <Row class="g-layout-block g-layout-block--inset" gutter="10">
             <Col span="12">
-            <Button block>取消</Button>
+            <Button block @click="routerBack">取消</Button>
             </Col>
             <Col span="12">
             <Button type="primary" block @click="formRef?.submit">划转</Button>
@@ -40,15 +43,21 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, reactive } from 'vue'
+import { shallowRef, reactive, computed } from 'vue'
 import { FormInstance, Form, Col, Row, Button, CellGroup, Field, Cell, FieldRule } from 'vant'
 import { fullloading } from '@/utils/vant'
+import { formatDecimal } from '@/filters'
+import { useNavigation } from '@mobile/router/navigation'
 import { getCurrencyList, getDigitalCurrencyList } from '@/constants/order'
 import { DigitalAccountTransferApply } from '@/services/api/bank'
 import { useAccountStore, useUserStore } from '@/stores'
+import { useSpotAccountStore } from '../components/spot/composables'
 import AppSelect from '@mobile/components/base/select/index.vue'
 import AppStepper from '@mobile/components/base/stepper/index.vue'
 
+const { routerBack } = useNavigation()
+
+const spotAccountStore = useSpotAccountStore()
 const accountStore = useAccountStore()
 const userStore = useUserStore()
 
@@ -79,12 +88,27 @@ const currencyOptions = (() => {
 })()
 
 const formData = reactive<Partial<Proto.DigitalAccountTransferApplyReq>>({
-    AccountID: accountStore.currentAccountId,
     UserID: userStore.userInfo.userid,
     DigitalTransferType: 3,
     Amount: 1,
 })
 
+// 现货可用余额
+const spotBalance = computed(() => {
+    const item = spotAccountStore.getAccountItem({
+        currencyid: formData.CurrencyID
+    })
+
+    const balance = spotAccountStore.getAvailableBalance(item)
+
+    return formatDecimal(balance, item?.currencydecimalplace)
+})
+
+// 合约账户
+const contractAccount = computed(() => accountStore.getAccountItem({
+    currencyid: formData.CurrencyID
+}))
+
 // 表单验证规则
 const formRules: { [key: string]: FieldRule[] } = {
     CurrencyID: [{
@@ -100,9 +124,13 @@ const formRules: { [key: string]: FieldRule[] } = {
 const onSubmit = () => {
     fullloading((hideLoading) => {
         DigitalAccountTransferApply({
-            data: formData
+            data: {
+                ...formData,
+                AccountID: contractAccount.value?.accountid
+            }
         }).then(() => {
             hideLoading('提交成功', 'success')
+            routerBack()
         }).catch((err) => {
             hideLoading(err, 'fail')
         })

+ 1 - 1
src/packages/gcszt/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>{{ $t('mine.availableFunds') }}</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>{{ $t('mine.riskRate') }}</span>

+ 1 - 1
src/packages/gstj/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 1 - 1
src/packages/gzcj/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 1 - 1
src/packages/mobile/views/ballot/detail/components/delisting/index.vue

@@ -26,7 +26,7 @@
             </Field>
             <Field :label="$t('quote.ballot.avaiablefunds')">
                 <template #input>
-                    <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                    <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                 </template>
             </Field>
         </Form>

+ 1 - 1
src/packages/mobile/views/bank/capital/information/index.vue

@@ -5,7 +5,7 @@
             <Cell :title="$t('account.balance2')" :value="formatDecimal(item.balance)" />
             <Cell :title="$t('account.currentbalance')" :value="formatDecimal(item.currentbalance)" />
             <Cell :title="$t('account.netWorth')" :value="formatDecimal(item.netvalue)" />
-            <Cell :title="$t('account.availableFunds2')" :value="formatDecimal(item.avaiableMoney)" />
+            <Cell :title="$t('account.availableFunds2')" :value="formatDecimal(item.avaiableBalance)" />
             <Cell :title="$t('account.usedMargin2')" :value="formatDecimal(item.usedmargin)" />
             <Cell :title="$t('account.freezeMargin2')" :value="formatDecimal(item.freezeMargin)" />
             <Cell :title="$t('account.profitLoss')">

+ 4 - 4
src/packages/mobile/views/goods/detail/components/listing/Index.vue

@@ -51,7 +51,7 @@
                     </template>
                     <Field :label="$t('quote.avaiableMoney')">
                         <template #input>
-                            <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </template>
                     </Field>
                 </CellGroup>
@@ -146,7 +146,7 @@ const qtyStep = shallowRef(qtyStepList.value[0]) // 数量步长
 const isTrademode16 = computed(() => quote.value?.trademode === 16)
 
 const total = computed(() => {
-    const { avaiableMoney = 0 } = accountStore.currentAccount
+    const { avaiableBalance = 0 } = accountStore.currentAccount
     const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = quote.value ?? {}
 
     const result = {
@@ -159,12 +159,12 @@ const total = computed(() => {
 
     if (fixed && ratio) {
         if (marketmarginalgorithm === 1) {
-            const qty = Math.trunc(avaiableMoney / ratio)
+            const qty = Math.trunc(avaiableBalance / ratio)
             result.deposit = (formData.OrderQty ?? 0) * ratio
             result.enableQty = qty > 0 ? qty : 0
         }
         if (marketmarginalgorithm === 2) {
-            const qty = Math.trunc(avaiableMoney / fixed)
+            const qty = Math.trunc(avaiableBalance / fixed)
             result.deposit = (formData.OrderQty ?? 0) * fixed
             result.enableQty = qty > 0 ? qty : 0
         }

+ 1 - 1
src/packages/mobile/views/goods/trade/components/delisting/index.vue

@@ -46,7 +46,7 @@
                     </Field>
                     <Field label="可用资金">
                         <template #input>
-                            <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </template>
                     </Field>
                 </CellGroup>

+ 1 - 1
src/packages/mobile/views/mine/Index.vue

@@ -52,7 +52,7 @@
                     <ul>
                         <li>
                             <span>{{ $t('mine.availableFunds') }}</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>{{ $t('mine.riskRate') }}</span>

+ 1 - 1
src/packages/mobile/views/presale/detail/components/delisting/index.vue

@@ -27,7 +27,7 @@
             </Field>
             <Field :label="$t('quote.presale.avaiableMoney')">
                 <template #input>
-                    <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                    <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                 </template>
             </Field>
         </Form>

+ 4 - 4
src/packages/mobile/views/pricing/trade/Index.vue

@@ -108,7 +108,7 @@
                 </template>
                 <Field :label="$t('quote.pricing.avaiableMoney')">
                     <template #input>
-                        <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                        <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                     </template>
                 </Field> -->
             </CellGroup>
@@ -259,7 +259,7 @@ const componentMap = new Map<string, unknown>([
 // // const sp = shallowRef(false) // 止盈
 
 // const total = computed(() => {
-//     const { avaiableMoney = 0 } = accountStore.currentAccount
+//     const { avaiableBalance = 0 } = accountStore.currentAccount
 //     const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = quote.value ?? {}
 
 //     const result = {
@@ -272,12 +272,12 @@ const componentMap = new Map<string, unknown>([
 
 //     if (fixed && ratio) {
 //         if (marketmarginalgorithm === 1) {
-//             const qty = Math.trunc(avaiableMoney / ratio)
+//             const qty = Math.trunc(avaiableBalance / ratio)
 //             result.deposit = (formData.OrderQty ?? 0) * ratio
 //             result.enableQty = qty > 0 ? qty : 0
 //         }
 //         if (marketmarginalgorithm === 2) {
-//             const qty = Math.trunc(avaiableMoney / fixed)
+//             const qty = Math.trunc(avaiableBalance / fixed)
 //             result.deposit = (formData.OrderQty ?? 0) * fixed
 //             result.enableQty = qty > 0 ? qty : 0
 //         }

+ 3 - 3
src/packages/mobile/views/pricing/trade/prepayment/Index.vue

@@ -265,7 +265,7 @@ const serivcefee = computed(() => {
 
 // 预付款
 const usedMargin = computed(() => {
-    const { avaiableMoney = 0 } = accountStore.currentAccount
+    const { avaiableBalance = 0 } = accountStore.currentAccount
     const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = quote.value ?? {}
 
     // 结果集合
@@ -279,12 +279,12 @@ const usedMargin = computed(() => {
 
     if (fixed && ratio) {
         if (marketmarginalgorithm === 1) {
-            const qty = Math.trunc(avaiableMoney / ratio)
+            const qty = Math.trunc(avaiableBalance / ratio)
             result.deposit = props.orderQty * ratio
             result.enableQty = qty > 0 ? qty : 0
         }
         if (marketmarginalgorithm === 2) {
-            const qty = Math.trunc(avaiableMoney / fixed)
+            const qty = Math.trunc(avaiableBalance / fixed)
             result.deposit = props.orderQty * fixed
             result.enableQty = qty > 0 ? qty : 0
         }

+ 3 - 3
src/packages/mobile/views/pricing/trade/v2/Index.vue

@@ -202,7 +202,7 @@ const onGoodsRadioChange = (value: number) => {
 
 // 预付款
 const usedMargin = computed(() => {
-    const { avaiableMoney = 0 } = accountStore.currentAccount
+    const { avaiableBalance = 0 } = accountStore.currentAccount
     const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = quote.value ?? {}
 
     // 结果集合
@@ -217,12 +217,12 @@ const usedMargin = computed(() => {
 
     if (fixed && ratio) {
         if (marketmarginalgorithm === 1) {
-            const qty = Math.trunc(avaiableMoney / ratio)
+            const qty = Math.trunc(avaiableBalance / ratio)
             result.deposit = (orderQty.value ?? 0) * ratio
             result.enableQty = qty > 0 ? qty : 0
         }
         if (marketmarginalgorithm === 2) {
-            const qty = Math.trunc(avaiableMoney / fixed)
+            const qty = Math.trunc(avaiableBalance / fixed)
             result.deposit = (orderQty.value ?? 0) * fixed
             result.enableQty = qty > 0 ? qty : 0
         }

+ 1 - 1
src/packages/mobile/views/spot/add/components/sell/index.vue

@@ -47,7 +47,7 @@
                 </Field>
                 <Field :label="$t('quote.spot.avaiableMoney')">
                     <template #input>
-                        <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}{{ $t('quote.spot.yuan')
+                        <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}{{ $t('quote.spot.yuan')
                             }}</span>
                     </template>
                 </Field>

+ 1 - 1
src/packages/mobile/views/spot/detail/components/delisting/index.vue

@@ -49,7 +49,7 @@
             </Field>
             <Field :label="$t('quote.spot.avaiableMoney')" v-if="buyorsell === BuyOrSell.Buy">
                 <template #input>
-                    <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                    <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                 </template>
             </Field>
         </Form>

+ 1 - 1
src/packages/mobile/views/spot/detail/components/listing/index.vue

@@ -35,7 +35,7 @@
             </Field>
             <Field :label="$t('quote.spot.avaiableMoney')" v-if="buyorsell === BuyOrSell.Buy">
                 <template #input>
-                    <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                    <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                 </template>
             </Field>
         </Form>

+ 1 - 1
src/packages/mobile/views/swap/detail/components/delisting/Index.vue

@@ -84,7 +84,7 @@
             </Field>
             <Field :label="$t('quote.swap.avaiablemoney')">
                 <template #input>
-                    <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                    <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                 </template>
             </Field>
         </Form>

+ 1 - 1
src/packages/mobile/views/swap/detail/components/listing/Index.vue

@@ -77,7 +77,7 @@
             </Field>
             <Field :label="$t('quote.swap.avaiablemoney')">
                 <template #input>
-                    <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                    <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                 </template>
             </Field>
         </Form>

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

@@ -31,7 +31,7 @@
                     </Field>
                     <Field :label="$t('quote.avaiableMoney')">
                         <template #input>
-                            <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </template>
                     </Field>
                 </CellGroup>

+ 1 - 1
src/packages/nhgj/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

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

@@ -107,7 +107,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'balance', label: 'account.balance2', decimal: 2 },
     { field: 'currentbalance', label: 'account.currentbalance', decimal: 2 },
     { field: 'hazardValue', label: 'account.netWorth' },
-    { field: 'avaiableMoney', label: 'account.availableFunds2', decimal: 2 },
+    { field: 'avaiableBalance', label: 'account.availableFunds2', decimal: 2 },
     { field: 'usedmargin', label: 'account.usedMargin2', decimal: 2 },
     { field: 'freezeMargin', label: 'account.freezeMargin2', decimal: 2 },
     { field: 'profitLoss', label: 'account.profitLoss' },

+ 3 - 3
src/packages/pc/views/market/trade/goods/list/listing/index.vue

@@ -129,7 +129,7 @@ const submitRef = shallowRef()
 const isTrademode16 = computed(() => selectedGoods.value?.trademode === 16)
 
 const total = computed(() => {
-    const { avaiableMoney = 0 } = accountStore.currentAccount
+    const { avaiableBalance = 0 } = accountStore.currentAccount
     const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = selectedGoods.value ?? {}
 
     const result = {
@@ -142,12 +142,12 @@ const total = computed(() => {
 
     if (fixed && ratio) {
         if (marketmarginalgorithm === 1) {
-            const qty = Math.trunc(avaiableMoney / ratio)
+            const qty = Math.trunc(avaiableBalance / ratio)
             result.deposit = (formData.OrderQty ?? 0) * ratio
             result.enableQty = qty > 0 ? qty : 0
         }
         if (marketmarginalgorithm === 2) {
-            const qty = Math.trunc(avaiableMoney / fixed)
+            const qty = Math.trunc(avaiableBalance / fixed)
             result.deposit = (formData.OrderQty ?? 0) * fixed
             result.enableQty = qty > 0 ? qty : 0
         }

+ 1 - 1
src/packages/pc/views/market/trade/presell/ballot/detail/delisting/index.vue

@@ -16,7 +16,7 @@
                 <span>{{ deposit }}</span>
             </el-form-item>
             <el-form-item :label="t('quote.ballot.avaiablefunds')">
-                <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>
         <template #footer>

+ 1 - 1
src/packages/pc/views/market/trade/presell/bidding/detail/delisting/index.vue

@@ -17,7 +17,7 @@
                 <span>{{ deposit }}</span>
             </el-form-item>
             <el-form-item :label="t('quote.presale.avaiableMoney')">
-                <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>
         <template #footer>

+ 4 - 4
src/packages/pc/views/market/trade/pricing/list/listing/index.vue

@@ -44,7 +44,7 @@
                                 <span>{{ t('quote.pricing.enableQty') }}:{{ total.enableQty }}</span>
                                 <span>{{ t('quote.pricing.deposit') }}:{{ total.deposit.toFixed(2) }}</span>
                                 <span>{{ t('quote.pricing.avaiableMoney') }}:{{
-                                    accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                                    accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
                             </div>
                         </template>
                     </div>
@@ -155,7 +155,7 @@ const marketPrice = computed(() => {
 const isTrademode16 = computed(() => selectedGoods.value?.trademode === 16)
 
 const total = computed(() => {
-    const { avaiableMoney = 0 } = accountStore.currentAccount
+    const { avaiableBalance = 0 } = accountStore.currentAccount
     const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = selectedGoods.value ?? {}
 
     const result = {
@@ -168,12 +168,12 @@ const total = computed(() => {
 
     if (fixed && ratio) {
         if (marketmarginalgorithm === 1) {
-            const qty = Math.trunc(avaiableMoney / ratio)
+            const qty = Math.trunc(avaiableBalance / ratio)
             result.deposit = (formData.OrderQty ?? 0) * ratio
             result.enableQty = qty > 0 ? qty : 0
         }
         if (marketmarginalgorithm === 2) {
-            const qty = Math.trunc(avaiableMoney / fixed)
+            const qty = Math.trunc(avaiableBalance / fixed)
             result.deposit = (formData.OrderQty ?? 0) * fixed
             result.enableQty = qty > 0 ? qty : 0
         }

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

@@ -33,7 +33,7 @@
                 <span>{{ amount }}</span>
             </el-form-item>
             <el-form-item :label="t('quote.spot.avaiableMoney')">
-                <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>
         <template #footer>

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

@@ -28,7 +28,7 @@
                 <span>{{ amount }}</span>
             </el-form-item>
             <el-form-item :label="t('quote.spot.avaiableMoney')">
-                <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>
         <template #footer>

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

@@ -18,7 +18,7 @@
                 <span>{{ amount }}</span>
             </el-form-item>
             <el-form-item :label="t('quote.spot.avaiableMoney')">
-                <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>
         <template #footer>

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

@@ -49,7 +49,7 @@
                 <span>{{ permargin.toFixed(2) }}</span>
             </el-form-item>
             <el-form-item label="可用资金">
-                <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
             </el-form-item>
         </el-form>
         <template #footer>

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

@@ -41,7 +41,7 @@
                 <span>{{ permargin.toFixed(2) }}</span>
             </el-form-item>
             <el-form-item :label="t('quote.swap.avaiablemoney')">
-                <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                <span>{{ accountStore.currentAccount.avaiableBalance?.toFixed(2) }}</span>
             </el-form-item>
             <el-form-item v-if="priceMode != 1" prop="OrderPrice"
                 :label="selectedRow.buyorsell === 0 ? '卖出价格' : '买入价格'">

+ 1 - 1
src/packages/qdhs/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 1 - 1
src/packages/qxst/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 1 - 1
src/packages/sbyj/views/mine/index.vue

@@ -35,7 +35,7 @@
                     <ul>
                         <li>
                             <span>可用权益</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>浮动权益</span>

+ 1 - 1
src/packages/sjgj/views/mine/index.vue

@@ -35,7 +35,7 @@
                     <ul>
                         <li>
                             <span>可用权益</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                     </ul>
                 </div>

+ 1 - 1
src/packages/snhl/views/mine/index.vue

@@ -52,7 +52,7 @@
                     <ul>
                         <li>
                             <span>{{ $t('mine.availableFunds') }}</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>{{ $t('mine.riskRate') }}</span>

+ 1 - 1
src/packages/tc/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 1 - 1
src/packages/thj/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 1 - 1
src/packages/tjmd/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 1 - 1
src/packages/tss/views/bank/capital/index.vue

@@ -8,7 +8,7 @@
             <!-- <Cell :title="$t('account.balance2')" :value="currencyFormat(item.balance, item.currencyid)" />
             <Cell :title="$t('account.currentbalance')" :value="currencyFormat(item.currentbalance, item.currencyid)" /> -->
             <Cell :title="$t('account.netWorth')" :value="currencyFormat(item.netvalue, item.currencyid)" />
-            <Cell :title="$t('account.availableFunds2')" :value="currencyFormat(item.avaiableMoney, item.currencyid)" />
+            <Cell :title="$t('account.availableFunds2')" :value="currencyFormat(item.avaiableBalance, item.currencyid)" />
             <!-- <Cell :title="$t('account.usedMargin2')" :value="currencyFormat(item.usedmargin, item.currencyid)" /> -->
             <Cell :title="$t('account.freezeMargin2')" :value="currencyFormat(item.freezeMargin, item.currencyid)" />
             <Cell :title="$t('account.profitLoss')">

+ 1 - 1
src/packages/tss/views/mine/Index.vue

@@ -41,7 +41,7 @@
                         <li>
                             <span>{{ $t('mine.availableFunds') }}</span>
                             <span>
-                                {{ currencyFormat(currentAccount.avaiableMoney,
+                                {{ currencyFormat(currentAccount.avaiableBalance,
                                     currentAccount.currencyid, { showSymbol: true }) }}
                             </span>
                         </li>

+ 1 - 1
src/packages/zrwyt/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 1 - 1
src/packages/zrwyt2/views/mine/Index.vue

@@ -49,7 +49,7 @@
                     <ul>
                         <li>
                             <span>可用</span>
-                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                            <span>{{ currentAccount.avaiableBalance?.toFixed(2) }}</span>
                         </li>
                         <li>
                             <span>风险率</span>

+ 12 - 6
src/stores/modules/account.ts

@@ -1,4 +1,5 @@
 import { toRefs, computed, reactive } from 'vue'
+import { isMatch } from 'lodash'
 import { queryTaAccounts, getTodayAccountConfigInfo } from '@/services/api/account'
 import { defineStore } from '../store'
 import { useEnumStore } from './enum'
@@ -40,7 +41,7 @@ export const useAccountStore = defineStore(() => {
 
         const result: (Model.TaAccountsRsp & {
             freezeMargin: number; // 冻结资金
-            avaiableMoney: number; // 可用资金
+            avaiableBalance: number; // 可用资金
             netvalue: number; // 净值
             profitLoss: number; // 浮动盈亏
             hazardValue: number; // 风险净值
@@ -71,17 +72,17 @@ export const useAccountStore = defineStore(() => {
             const freezeMargin = item.freezemargin + item.otherfreezemargin + item.freezecharge + item.outamountfreeze
 
             // 计算可用资金
-            let avaiableMoney = 0
+            let avaiableBalance = 0
 
             // *系统参数”113“(当日浮动盈利是否可用) 0:不可用 1:可用
             const param113 = userStore.getSystemParamValue('113')
 
             if (profitLoss < 0 || param113 === '1') {
                 // 账户总浮动盈亏为负:= 期末余额+总浮动盈亏-占用-冻结资金
-                avaiableMoney = item.currentbalance + profitLoss - item.usedmargin - freezeMargin
+                avaiableBalance = item.currentbalance + profitLoss - item.usedmargin - freezeMargin
             } else {
                 // 账户总浮动盈亏为正 且 113 = 0 :=期末余额-占用-冻结资金
-                avaiableMoney = item.currentbalance - item.usedmargin - freezeMargin
+                avaiableBalance = item.currentbalance - item.usedmargin - freezeMargin
             }
 
             // 计算风险净值 = 期末余额 + 浮动盈亏(收益权) - 其他冻结 - 出金冻结
@@ -138,7 +139,7 @@ export const useAccountStore = defineStore(() => {
             result.push({
                 ...item,
                 freezeMargin,
-                avaiableMoney,
+                avaiableBalance,
                 netvalue,
                 profitLoss,
                 hazardValue,
@@ -159,6 +160,10 @@ export const useAccountStore = defineStore(() => {
         }
     })
 
+    const getAccountItem = (prop: Partial<Model.TaAccountsRsp>) => {
+        return accountComputedList.value.find(item => isMatch(item, prop))
+    }
+
     // 获取资金账户列表
     const getAccountList = async () => {
         try {
@@ -214,6 +219,7 @@ export const useAccountStore = defineStore(() => {
         accountComputedList,
         currentAccount,
         moneyChangedNotify,
-        getAccountList
+        getAccountList,
+        getAccountItem
     }
 })

+ 1 - 0
src/types/model/account.d.ts

@@ -351,6 +351,7 @@ declare global {
             creditdecrease: number; // 今日授信减少
             creditincrease: number; // 今日授信增加
             curamount: number; // 总市值(从持仓中统计)
+            currencydecimalplace: number; // 货币小数位
             currencyid: number; // 货币ID
             currentbalance: number; // 期末余额
             freezecharge: number; // 手续费冻结