Handy_Cao 6 часов назад
Родитель
Сommit
537b8d71e4

+ 2 - 1
src/packages/digital/views/listing/goods/detail/index.vue

@@ -181,6 +181,7 @@ const calculations = computed(() => {
 
     // 可用余额
     const maxBalance = spotAccountStore.getAvailableBalance(quoteAccount.value)
+
     // 买预估手续费
     const buyEstimatedFee = (buyFeeValue.FeeAlgorithm === 2 ? amount : estimatedAmount) * buyFeeValue.feeValue
     // 可买数量
@@ -189,7 +190,7 @@ const calculations = computed(() => {
     // 卖预估手续费
     const sellEstimatedFee = (sellFeeValue.FeeAlgorithm === 2 ? amount : estimatedAmount) * sellFeeValue.feeValue
     // 可卖数量
-    const maxSellQty = (price && maxBalance>sellEstimatedFee) ? (maxBalance - sellEstimatedFee) / (price * agreeunit) : 0  
+    const maxSellQty = spotAccountStore.getAvailableBalance(baseAccount.value)
     // 可获金额
     const maxAmount = price * maxSellQty * agreeunit
     

+ 2 - 1
src/packages/digital/views/spot/components/order/cancel/index.vue

@@ -11,6 +11,7 @@ import { fullloading } from '@/utils/vant'
 import { handleRequestBigNumber } from '@/filters'
 import { EOperateType } from '@/constants/client'
 import { cancelOrder } from '@/services/api/trade'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     selectedRow: {
@@ -20,7 +21,7 @@ const props = defineProps({
 })
 
 const emit = defineEmits(['closed'])
-
+const { global: { t } } = i18n
 const showDialog = shallowRef(false)
 const refresh = shallowRef(false) // 是否刷新父组件数据
 

+ 2 - 2
src/packages/digital/views/spot/components/order/index.vue

@@ -67,7 +67,7 @@ import { useComponent } from '@/hooks/component'
 import { useRequest } from '@/hooks/request'
 import { getBuyOrSellName, getOrderStatusName } from '@/constants/order'
 import { queryDigitalTradeOrderDetails } from '@/services/api/digital'
-import { useFuturesStore } from '@/stores'
+import { i18n, useFuturesStore } from '@/stores'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import AppDatePicker from '@mobile/components/base/datepicker/index.vue'
 
@@ -88,7 +88,7 @@ const componentMap = new Map<string, unknown>([
 
 const futuresStore = useFuturesStore()
 const selectedRow = shallowRef<Model.DigitalTradeOrderDetailsRsp>()
-
+const { global: { t } } = i18n
 const pullRefreshRef = shallowRef()
 const dataList = shallowRef<Model.DigitalTradeOrderDetailsRsp[]>([])
 const dateValue = shallowRef(props.params.tradedate?.split('-') ?? [])