huangbin 4 سال پیش
والد
کامیت
bb826bfc92
1فایلهای تغییر یافته به همراه14 افزوده شده و 10 حذف شده
  1. 14 10
      src/views/market/spot_trade/components/post_buying/setup.ts

+ 14 - 10
src/views/market/spot_trade/components/post_buying/setup.ts

@@ -78,17 +78,21 @@ export function handleNumAndPrice(enumName: EnumRouterName, selectedRow: WrOrder
     //  摘牌金额
     function getMoney() {
         let result = 0
-        if (isFloat()) {
-            const goodsPrice = getGoodsPrice()
-            if (goodsPrice.value && goodsPrice.value !== '--') {   // 有实时行情价格
-                // 估算总价=挂牌基差+期货合约价;
-                const predictTotal = formState.PriceMove + (goodsPrice.value as number);
-                // 估算总额=估算总价*摘牌数量;
-                result = predictTotal * formState.OrderQty
+        if (formState.OrderQty) {
+            if (isFloat()) {
+                const goodsPrice = getGoodsPrice()
+                if (goodsPrice.value && goodsPrice.value !== '--') {   // 有实时行情价格
+                    // 估算总价=挂牌基差+期货合约价;
+                    const predictTotal = formState.PriceMove + (goodsPrice.value as number);
+                    // 估算总额=估算总价*摘牌数量;
+                    result = predictTotal * formState.OrderQty
+                }
+            } else {
+                // 摘牌金额=挂牌价格*摘牌数量
+                if (formState.FixedPrice) {
+                    result = formState.OrderQty * formState.FixedPrice
+                }
             }
-        } else {
-            // 摘牌金额=挂牌价格*摘牌数量
-            result = formState.OrderQty * formState.FixedPrice
         }
         return Number(result.toFixed(2))
     }