Handy_Cao 1 天之前
父節點
當前提交
806cf5f5ce

+ 6 - 5
src/packages/digital/views/listing/goods/detail/index.vue

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

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

@@ -35,7 +35,7 @@
                         </td>
                         <td>
                             <span class="text-small">{{ `${t('order.goodsorder.orderqty')}(${item.basecurrencycode})` }}</span>
-                            <span>{{ item.ordervolume }}</span>
+                            <span>{{ item.ordervolume-item.tradevolume }}</span>
                         </td>
                     </tr>
                     <!-- <tr>

+ 1 - 1
src/packages/digital/views/spot/detail/index.vue

@@ -59,7 +59,7 @@
                 <spot-statement :params="{ digitalaccountid }" v-if="activeTab === 6" />
             </Tab>
         </Tabs>
-        <ActionSheet v-model:show="showSheet" title="请选择">
+        <ActionSheet v-model:show="showSheet" :title="t('common.choice')">
             <CellGroup style="min-height: 200px;">
                 <template v-for="(item, index) in quotes" :key="index">
                     <Cell :title="item.goodsname" :value="item.goodscode" :border="false" is-link clickable