|
|
@@ -102,11 +102,13 @@ export function handleNumAndPrice() {
|
|
|
let result = 0
|
|
|
if (isFloat()) {
|
|
|
if (hasRules()) {
|
|
|
- const goodsCode = goodsList.value.find(e => e.goodsid === formState.goodsid)?.goodscode as string
|
|
|
- const goodsPrice = getQuoteDayInfoByCodeFindPrice(goodsCode);
|
|
|
- if (goodsPrice && goodsPrice !== '--') {
|
|
|
- // 浮动价挂牌金额=(基差价格+期货合约最新价)*挂牌数量
|
|
|
- result = (formState.PriceMove + (goodsPrice as number)) * formState.OrderQty
|
|
|
+ const goods = goodsList.value.find(e => e.goodsid === formState.goodsid);
|
|
|
+ if (goods) {
|
|
|
+ const goodsPrice = getQuoteDayInfoByCodeFindPrice(goods.goodscode);
|
|
|
+ if (goodsPrice && goodsPrice !== '--') {
|
|
|
+ // 浮动价挂牌金额=(基差价格+期货合约最新价)*挂牌数量
|
|
|
+ result = (formState.PriceMove + (goodsPrice as number)) * formState.OrderQty
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} else {
|