|
|
@@ -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))
|
|
|
}
|