- 配置开启时,查看交易、审批查看、交易平仓、收益结算和平仓详情按浮动收支方向与原多空方向组合展示多空方向 - 兼容历史支付数据:支付多头展示为空头,支付空头展示为多头,收取方向保持原多空展示 - 新增浮动端方向组合及相关页面覆盖专项测试
212 lines
12 KiB
Plaintext
212 lines
12 KiB
Plaintext
@model UnwindData
|
|
@{
|
|
ViewBag.Title = "交易 | 收益结算";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
bool isUseApproval = ViewBag.isUseApproval;
|
|
bool isShowReCheckClose = ViewBag.IsShowReCheckClose;
|
|
bool hideFloatingIncomeDirection = PS.Config.ErpElement.SwapFloatingIncomeReceiveOnlyMode;
|
|
}
|
|
@section CSS{
|
|
<link rel="stylesheet" href="~/Style/Css/unwindSwapTrade.css?v=@(HtmlUtil.JsVersion)" />
|
|
}
|
|
@section JS
|
|
{
|
|
<script>
|
|
function formatDateText(value) {
|
|
return value ? value.toString().substr(0, 10) : "";
|
|
}
|
|
var model = @Json.Serialize(Model);
|
|
model.StartDate = formatDateText(model.StartDate);
|
|
model.ValueDate = formatDateText(model.ValueDate);
|
|
model.PayDate = formatDateText(model.PayDate);
|
|
model.MaxIncomeValueDate = formatDateText(model.MaxIncomeValueDate);
|
|
if (model.ValueDate && model.MaxIncomeValueDate && model.ValueDate > model.MaxIncomeValueDate) {
|
|
model.ValueDate = model.MaxIncomeValueDate;
|
|
}
|
|
var isUseApproval = "@isUseApproval"=="True";
|
|
var g_isShowReCheckClose = "@isShowReCheckClose" == "True";
|
|
</script>
|
|
<script src="~/front/calendar?v=@(HtmlUtil.JsVersion)"></script>
|
|
<script src="~/Scripts/fast/fastVue.components.js?v=@HtmlUtil.JsVersion"></script>
|
|
<script src="~/Scripts/app/tradeHelper.js?v=@HtmlUtil.JsVersion"></script>
|
|
<script src="~/front/swappriceprecision?v=@HtmlUtil.JsVersion"></script>
|
|
<script src="~/Scripts/app/swaptrade/swapPricePrecisionHelper.js?v=@HtmlUtil.JsVersion"></script>
|
|
<script src="~/Scripts/app/swaptrade/swapCalc.js?v=@HtmlUtil.JsVersion"></script>
|
|
<script src="~/Scripts/app/swaptrade/incomeSwapTrade.js?v=@HtmlUtil.JsVersion"></script>
|
|
}
|
|
<div class="pb-3" id="vueDiv">
|
|
<div class="yc-panel">
|
|
<div class="row no-gutters" style="display:block">
|
|
<div style="margin: 5px 0 0 12px">
|
|
<table class="table table-bordered" id="baseTable">
|
|
<tbody>
|
|
<tr>
|
|
<td>成交名义本金</td>
|
|
<td>{{formatAmount(deal.NotionalValue)}}</td>
|
|
<td>持仓名义本金</td>
|
|
<td>{{formatAmount(deal.PosiNotionalValue)}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>成交数量</td>
|
|
<td> {{formatQuantity(deal.NotionalQty)}}</td>
|
|
<td>持仓数量</td>
|
|
<td> {{formatQuantity(deal.PositionQty2)}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>起始日期</td>
|
|
<td> {{deal.StartDate}}</td>
|
|
<td>收益结算日期</td>
|
|
<td> <vue-datepicker ref="incomeValueDatePicker" :maxdate="maxUnwindDate" :mindate="minStartDate" :noholiday="true" v-model="deal.ValueDate" v-on:input="setValueDate" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>支付日期</td>
|
|
<td> <vue-datepicker :mindate="minStartDate" :holiday="1" v-model="deal.PayDate" /></td>
|
|
<td>年化天数</td>
|
|
<td> {{deal.AnnualDays}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>平仓总额</td>
|
|
<td> {{formatAmount(deal.SwapCloseAmount)}}</td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="yc-panel">
|
|
<div class="row no-gutters" style="display:block;">
|
|
<div class="titleDiv">
|
|
<div class="titleHead"></div>
|
|
<div class="titleLabel"><label>预付金</label></div>
|
|
</div>
|
|
<div style="margin: 5px 0 0 12px">
|
|
<table class="table table-bordered ratetable" style="width:750px;">
|
|
<tbody>
|
|
<tr>
|
|
<td width="116px">收支方向</td>
|
|
<td>利息金额</td>
|
|
<td>其他费用</td>
|
|
<td>预付金平仓盈亏</td>
|
|
</tr>
|
|
<tr v-for="item in marginList">
|
|
<td :class="item.InterestDirection==1?'swapget':'swappay'">{{item.InterestDirection==1?"收取":"支付"}}</td>
|
|
<td>
|
|
<vue-number-input v-model="item.InterestAmount" v-bind:format="inputFormatInterestAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
|
</td>
|
|
<td>
|
|
<vue-number-input v-model="item.InterestFee" v-bind:format="inputFormatInterestAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
|
</td>
|
|
<td>{{formatAmount(item.InterestClosePnL)}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="row no-gutters" style="display:block">
|
|
<div class="titleDiv">
|
|
<div class="titleHead"></div>
|
|
<div class="titleLabel"><label>利息端</label></div>
|
|
</div>
|
|
<div style="margin: 5px 0 0 12px">
|
|
<table class="table table-bordered ratetable" style="width:750px;">
|
|
<tbody>
|
|
<tr>
|
|
<td width="116px">收支方向</td>
|
|
<td>利息金额</td>
|
|
<td>其他费用</td>
|
|
<td>利息端平仓盈亏</td>
|
|
</tr>
|
|
<tr v-for="item in interestList">
|
|
<td :class="item.InterestDirection==1?'swapget':'swappay'">{{item.InterestDirection==1?"收取":"支付"}}</td>
|
|
<td>
|
|
<vue-number-input v-model="item.InterestAmount" v-bind:format="inputFormatInterestAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
|
</td>
|
|
<td>
|
|
<vue-number-input v-model="item.InterestFee" v-bind:format="inputFormatInterestAmount" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
|
</td>
|
|
<td>{{formatAmount(item.InterestClosePnL)}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="row no-gutters" style="display:block">
|
|
<div class="titleDiv">
|
|
<div class="titleHead"></div>
|
|
<div class="titleLabel"><label>浮动端</label></div>
|
|
</div>
|
|
<div style="margin: 5px 0 0 12px">
|
|
<table class="table table-bordered ratetable" id="floatTable">
|
|
<tbody>
|
|
<tr>
|
|
@if (!hideFloatingIncomeDirection)
|
|
{
|
|
<td width="116px">收支方向</td>
|
|
}
|
|
<td>多空方向</td>
|
|
<td>标的代码</td>
|
|
<td v-if="deal.StructureType!='普通收益互换'">期初标的交割全价%</td>
|
|
<td v-if="deal.StructureType!='普通收益互换'">期初标的交割净价%</td>
|
|
<td v-else>期初标的价格</td>
|
|
<td v-if="deal.StructureType!='普通收益互换'">期末标的交割全价%</td>
|
|
<td v-else>期末标的价格</td>
|
|
<td>数量</td>
|
|
<td>交易费用(平仓)</td>
|
|
<td>分红收益</td>
|
|
<td>浮动端平仓盈亏</td>
|
|
</tr>
|
|
<tr>
|
|
@if (!hideFloatingIncomeDirection)
|
|
{
|
|
<td :class="floatPosition.PayDirection==1?'swapget':'swappay'">{{floatPosition.PayDirection==1?"收取":"支付"}}</td>
|
|
}
|
|
<td>
|
|
@if (hideFloatingIncomeDirection)
|
|
{
|
|
<text>{{floatPosition.PayDirection==floatPosition.PositionType?"多头":"空头"}}</text>
|
|
}
|
|
else
|
|
{
|
|
<text>{{floatPosition.PositionType==1?"多头":"空头"}}</text>
|
|
}
|
|
</td>
|
|
<td>
|
|
{{floatPosition.UnderlyingCode}}
|
|
</td>
|
|
<td>{{priceFormat(floatPosition.PosiGrossPrice)}}</td>
|
|
<!-- 期初标的交割净价: TradingAmountNetAvg 字段名为"成交净价(期末语义)",但此处后端 InitIncome 实际装入的是期初净价(position.PosiNetNoFeePrice),值是期初值 -->
|
|
<td v-if="deal.StructureType!='普通收益互换'">{{priceFormat(floatPosition.TradingAmountNetAvg > 0 ? floatPosition.TradingAmountNetAvg : floatPosition.PosiNetPrice)}}</td>
|
|
<td>
|
|
<vue-swap-price-input class="swap-delivery-price-input-income" v-model="floatPosition.TradingAmountAvg" v-bind:format="getDeliveryPriceInputFormat()" v-on:input="changeUnderlyingPrice"></vue-swap-price-input>
|
|
<a href="javascript:void(0)" v-on:click="refreshUnderlyingPrice()">
|
|
<span title="使用系统标的价格" class="glyphicon glyphicon-refresh"></span>
|
|
</a>
|
|
</td>
|
|
<td>{{formatQuantity(floatPosition.Quantity)}}</td>
|
|
<td>
|
|
<vue-number-input v-model="floatPosition.TradingFee" v-bind:format="inputFormatInterestAmount" v-on:input="changeTradingFee"></vue-number-input>
|
|
<div class="bubble-box" style="margin-left:6px;">我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用</div>
|
|
</td>
|
|
<td> <vue-number-input v-model="floatPosition.DividendIn" v-bind:format="inputFormatDividend" v-on:input="changeTradingFee"></vue-number-input></td>
|
|
<td style="font-size:18px;">{{formatAmount(floatPosition.FloatPnlSum)}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div>
|
|
@if (isUseApproval)
|
|
{
|
|
<button class="btn btn-default swapclose" type="button" v-on:click="submitApproval('reject');">拒绝</button>
|
|
<button class="btn btn-primary swapsave" type="button" v-on:click="submitApproval('pass')">审批通过</button>
|
|
}else{
|
|
<button class="btn btn-default swapclose" type="button" onclick="layer.closeMe();">取消</button>
|
|
<button class="btn btn-primary swapsave" type="button" v-on:click="incomeTrade">{{getSumbitText()}}</button>
|
|
}
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|