|
@@ -27,9 +27,9 @@
|
|
|
</el-radio>
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item prop="OrderPrice" label="价格" v-if="formData.PriceMode === PriceMode.Market">
|
|
|
|
|
|
|
+ <el-form-item label="价格" v-if="formData.PriceMode === PriceMode.Market">
|
|
|
<div class="el-form-item--col">
|
|
<div class="el-form-item--col">
|
|
|
- <span>{{ marketPrice.toFixed(decimalplace) }}</span>
|
|
|
|
|
|
|
+ <span :class="lastColor">{{ marketPrice.toFixed(decimalplace) }}</span>
|
|
|
<div v-if="selectedGoods">
|
|
<div v-if="selectedGoods">
|
|
|
<div class="row-price g-price-up">
|
|
<div class="row-price g-price-up">
|
|
|
<Icon icon="Top" />
|
|
<Icon icon="Top" />
|
|
@@ -154,24 +154,20 @@ const total = computed(() => {
|
|
|
return result
|
|
return result
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const position = shallowRef<Model.TradePositionRsp[]>([]) // 持仓汇总
|
|
|
|
|
-
|
|
|
|
|
|
|
+// 持仓汇总
|
|
|
|
|
+const position = shallowRef<Model.TradePositionRsp[]>([])
|
|
|
// 买方向持仓数量
|
|
// 买方向持仓数量
|
|
|
const buyQty = computed(() => positionStore.getOrderQty(BuyOrSell.Buy, selectedGoodsId.value))
|
|
const buyQty = computed(() => positionStore.getOrderQty(BuyOrSell.Buy, selectedGoodsId.value))
|
|
|
-
|
|
|
|
|
// 卖方向持仓数量
|
|
// 卖方向持仓数量
|
|
|
const sellQty = computed(() => positionStore.getOrderQty(BuyOrSell.Sell, selectedGoodsId.value))
|
|
const sellQty = computed(() => positionStore.getOrderQty(BuyOrSell.Sell, selectedGoodsId.value))
|
|
|
-
|
|
|
|
|
// 价格类型
|
|
// 价格类型
|
|
|
const orderPriceType = computed(() => settingStore.getSettingValue('orderPriceType'))
|
|
const orderPriceType = computed(() => settingStore.getSettingValue('orderPriceType'))
|
|
|
-
|
|
|
|
|
// 买卖方向
|
|
// 买卖方向
|
|
|
const orderBuyOrSell = computed(() => settingStore.getSettingValue('orderBuyOrSell'))
|
|
const orderBuyOrSell = computed(() => settingStore.getSettingValue('orderBuyOrSell'))
|
|
|
-
|
|
|
|
|
// 是否禁用价格输入
|
|
// 是否禁用价格输入
|
|
|
const isDisabled = computed(() => [3, 4].includes(orderPriceType.value))
|
|
const isDisabled = computed(() => [3, 4].includes(orderPriceType.value))
|
|
|
-
|
|
|
|
|
-const { decimalplace = 0.0, decimalvalue = 0.0 } = selectedGoods.value ?? { }
|
|
|
|
|
|
|
+// 小数位以及步进值
|
|
|
|
|
+const { decimalplace = 0.0, decimalvalue = 0.0, lastColor } = selectedGoods.value ?? { }
|
|
|
|
|
|
|
|
const formRules: FormRules = {
|
|
const formRules: FormRules = {
|
|
|
OrderPrice: [{
|
|
OrderPrice: [{
|