|
|
@ -64,7 +64,8 @@ |
|
|
|
{{item.status=='undone'?i18n.undone:item.status=='opened'?i18n.opened:item.status=='revoked'?i18n.revoked:i18n.closed}} |
|
|
|
</view> --> |
|
|
|
<view class="title" v-show="type === 1">{{ i18n.ROE }}</view> |
|
|
|
<view class="value" v-show="type === 1" :style=" |
|
|
|
<view class="value" v-show="type === 1" |
|
|
|
:style=" |
|
|
|
getValue(item.direction=='buy' |
|
|
|
?(marketDetail.close-item.openedPrice)*item.hand/item.bondAmount:(item.openedPrice-marketDetail.close)*item.hand/item.bondAmount)>=0?'color:#00E8A2;':'color:#F4506A'"> |
|
|
|
<!-- {{getValue(item.profitAmount/item.bondAmount)}}% --> |
|
|
@ -91,7 +92,8 @@ |
|
|
|
<view class="title">{{ i18n.ROE }}</view> |
|
|
|
<view class="value"> |
|
|
|
<!-- {{item.status=='undone'?i18n.undone:item.status=='opened'?i18n.opened:item.status=='revoked'?i18n.revoked:i18n.closed}} --> |
|
|
|
<view class="value" :style="(item.profitAmount/item.bondAmount)*100>=0?'color:#00E8A2;':'color:#F4506A'"> |
|
|
|
<view class="value" |
|
|
|
:style="(item.profitAmount/item.bondAmount)*100>=0?'color:#00E8A2;':'color:#F4506A'"> |
|
|
|
{{getValue(item.profitAmount/item.bondAmount)}}% |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -160,8 +162,8 @@ |
|
|
|
|
|
|
|
<!-- 追加保证金 --> |
|
|
|
<u-modal :show="stopModalShowZui" :confirmText="i18n.Confirm" :cancelText="i18n.Cancel" :showCancelButton="true" |
|
|
|
:title="i18n.Margincall" :content='i18n.WarmTipsText' @confirm="stopConfirm" @cancel="stopModalShowZui = false" |
|
|
|
confirmColor="#00E8A2" cancelColor="#96959E"> |
|
|
|
:title="i18n.Margincall" :content='i18n.WarmTipsText' @confirm="stopConfirm" |
|
|
|
@cancel="stopModalShowZui = false" confirmColor="#00E8A2" cancelColor="#96959E"> |
|
|
|
<view class="stopModel"> |
|
|
|
<view class="title"> |
|
|
|
<text class="left">{{ i18n.AmountTrue }}</text> |
|
|
@ -293,19 +295,31 @@ |
|
|
|
// 获取百分比位数 |
|
|
|
getValue(e) { |
|
|
|
let data = e * 100 |
|
|
|
data = parseFloat(data.toPrecision(10)) |
|
|
|
data = parseFloat(data) |
|
|
|
data = String(data) |
|
|
|
if (data.indexOf(".") != -1) { |
|
|
|
return data.substring(0, data.indexOf(".") + 3); |
|
|
|
} else { |
|
|
|
return data |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取位数 |
|
|
|
getPrice(s) { |
|
|
|
var i = s; |
|
|
|
/* |
|
|
|
js 数字精度问题 |
|
|
|
*/ |
|
|
|
i = parseFloat(i.toPrecision(10)) |
|
|
|
i = parseFloat(i) |
|
|
|
i = String(i) |
|
|
|
// return i.substring(0, i.indexOf(".") + 5); |
|
|
|
if (i.indexOf(".") != -1) { |
|
|
|
return i.substring(0, i.indexOf(".") + 5); |
|
|
|
} else { |
|
|
|
return i |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
stopModalChange() { |
|
|
@ -534,6 +548,7 @@ |
|
|
|
position: absolute; |
|
|
|
right: 115rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.closeBtn { |
|
|
|
display: inline-block; |
|
|
|
// width: 98rpx; |
|
|
@ -547,6 +562,7 @@ |
|
|
|
color: rgb(0, 232, 162); |
|
|
|
margin-top: 22rpx; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .u-empty { |
|
|
|
top: 500% !important; |
|
|
|
} |
|
|
|