|
|
@@ -18,7 +18,7 @@
|
|
|
<span>{{ getBuyOrSellName(selectedRow.buyorsell) }}</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="挂牌价格">
|
|
|
- <span>{{ selectedRow.orderprice }}</span>
|
|
|
+ <span :class="quote?.lastColor">{{ selectedRow.pricemode === 3 ? (selectedRow.marketmaxsub+(quote?.last ?? 0.0)).toFixed(goods?.decimalplace ?? 2.0) : selectedRow.orderprice }}</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="卖出价格" v-if="selectedRow.pricemode === 3" prop="PriceMode">
|
|
|
<el-radio-group v-model="priceMode">
|
|
|
@@ -57,7 +57,7 @@
|
|
|
<template #footer>
|
|
|
<el-button type="info" @click="onCancel(false)">取消</el-button>
|
|
|
<el-button type="danger" :disabled="!formData.OrderQty || formData.OrderQty > selectedRow.orderqty"
|
|
|
- @click="onSubmit(EBuildType.BUILDTYPE_OPEN)">{{ selectedRow.buyorsell === 0 ? '卖出' : '买入' }}</el-button>
|
|
|
+ @click="onSubmit(EBuildType.BUILDTYPE_OPEN)">摘牌</el-button>
|
|
|
</template>
|
|
|
</app-drawer>
|
|
|
</template>
|
|
|
@@ -111,6 +111,8 @@ const qtyStep = shallowRef(qtyStepList[0])
|
|
|
const margin = shallowRef<Model.TjmdTodayAccountMarginRsp>()
|
|
|
/// 商品信息
|
|
|
const goods = computed(() => futuresStore.getGoods(props.selectedRow.goodsid) )
|
|
|
+/// 商品价格
|
|
|
+const quote = futuresStore.getGoodsQuote(props.quoteGoods?.refgoodsid ?? 0)
|
|
|
/// 默认价格为挂牌价格
|
|
|
formData.OrderPrice = props.selectedRow.orderprice ?? 0.0
|
|
|
|
|
|
@@ -136,17 +138,29 @@ const calculateDelistingAmount = () => {
|
|
|
if (margin.value?.infoc) {
|
|
|
const { MarginAlgorithm, MarketMarginValue } = margin.value?.infoc
|
|
|
const { OrderQty = 0 } = formData
|
|
|
- const { OrderPrice = 0.0 } = formData
|
|
|
const { agreeunit = 0 } = goods.value ?? {}
|
|
|
- /// 按比例
|
|
|
- if (MarginAlgorithm === 1) {
|
|
|
- /// 价格*数量*合约单位*保证金比例
|
|
|
- permargin.value = OrderPrice*OrderQty*agreeunit*MarketMarginValue
|
|
|
+ const { marketmaxsub } = props.selectedRow
|
|
|
+ if (props.selectedRow.pricemode === 3) {
|
|
|
+ if (MarginAlgorithm === 1) {
|
|
|
+ /// 价格*数量*合约单位*保证金比例
|
|
|
+ permargin.value = ((quote.value?.last ?? 0.0)+(marketmaxsub))*OrderQty*agreeunit*MarketMarginValue
|
|
|
+ } else {
|
|
|
+ /// 数量*保证金值
|
|
|
+ permargin.value = OrderQty*MarketMarginValue
|
|
|
+ }
|
|
|
+ amount.value = OrderQty*((quote.value?.last ?? 0.0)+(marketmaxsub))*agreeunit
|
|
|
} else {
|
|
|
- /// 数量*保证金值
|
|
|
- permargin.value = OrderQty*MarketMarginValue
|
|
|
+ const { OrderPrice = 0.0 } = formData
|
|
|
+ /// 按比例
|
|
|
+ if (MarginAlgorithm === 1) {
|
|
|
+ /// 价格*数量*合约单位*保证金比例
|
|
|
+ permargin.value = OrderPrice*OrderQty*agreeunit*MarketMarginValue
|
|
|
+ } else {
|
|
|
+ /// 数量*保证金值
|
|
|
+ permargin.value = OrderQty*MarketMarginValue
|
|
|
+ }
|
|
|
+ amount.value = OrderQty*OrderPrice*agreeunit
|
|
|
}
|
|
|
- amount.value = OrderQty*OrderPrice*agreeunit
|
|
|
}
|
|
|
}
|
|
|
|