237 lines
13 KiB
Plaintext
237 lines
13 KiB
Plaintext
@model UnwindData
|
|
@{
|
|
ViewBag.Title = "交易 | 交易平仓";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
bool isUseApproval = ViewBag.isUseApproval;
|
|
bool isShowReCheckClose = ViewBag.IsShowReCheckClose;
|
|
}
|
|
@section CSS{
|
|
<link rel="stylesheet" href="~/Style/Css/unwindSwapTrade.css?v=@(HtmlUtil.JsVersion)" />
|
|
}
|
|
@section JS
|
|
{
|
|
<script>
|
|
var model = @Json.Serialize(Model);
|
|
model.StartDate = model.StartDate ? model.StartDate.substr(0, 10) : "";
|
|
model.ValueDate = model.ValueDate ? model.ValueDate.substr(0, 10) : "";
|
|
model.PayDate = model.PayDate ? model.PayDate.substr(0, 10) : "";
|
|
model.UnwindDate = model.UnwindDate ? model.UnwindDate.substr(0, 10) : "";
|
|
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="~/Scripts/app/swaptrade/unwindSwapTrade.js?v=@HtmlUtil.JsVersion"></script>
|
|
}
|
|
<div class="pb-3" id="vueDiv">
|
|
<div class="yc-panel">
|
|
<div id="commomArea" class="row" style="height:157px">
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">成交名义本金</label>
|
|
<input class="text-box" v-model="deal.NotionalValue" readonly="readonly" type="text" />
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">持仓名义本金</label>
|
|
<input class="text-box" v-model="deal.PosiNotionalValue" readonly="readonly" type="text" />
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">成交数量</label>
|
|
<input class="text-box" v-model="deal.NotionalQty" readonly="readonly" type="text" />
|
|
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">持仓数量</label>
|
|
<input class="text-box" v-model="deal.PositionQty2" readonly="readonly" type="text" />
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">平仓方式</label>
|
|
<select style="height: 30px;" v-model="deal.CloseType">
|
|
<option value=1>数量</option>
|
|
<option value=2>名义本金</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-md-3" v-show="deal.CloseType==2">
|
|
<label class="formlabel">平仓类型</label>
|
|
<select style="height: 30px;" v-model="deal.CloseMethod" v-on:change="changeCloseMethod()">
|
|
<option value=1>全部平仓</option>
|
|
<option value=2>部分平仓</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-md-3" v-show="deal.CloseType==1">
|
|
<label class="formlabel">平仓数量</label>
|
|
<vue-number-input v-model="deal.CloseQty" v-on:input="changeCloseQty" v-bind:format="inputFormatTradeAmount"></vue-number-input>
|
|
</div>
|
|
<div class="form-group col-md-3" v-show="deal.CloseType==2">
|
|
<label class="formlabel">平仓比例</label>
|
|
<vue-number-input v-model="deal.ClosePercent" v-bind:format="inputFormatSwapRate" v-on:input="changeClosePercent" v-bind:disabled="deal.CloseMethod==1"></vue-number-input>
|
|
</div>
|
|
<div class="form-group col-md-3" v-show="deal.CloseType==2">
|
|
<label class="formlabel">平仓名义本金</label>
|
|
<vue-number-input v-model="deal.CloseNotionalValue" v-bind:format="inputFormatEqvNotional" v-bind:disabled="deal.CloseMethod==1" v-on:input="changeCloseNotionalValue"></vue-number-input>
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">起始日期</label>
|
|
<input class="text-box" id="startDate" readonly="readonly" type="text" v-model="deal.StartDate" />
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">事件日期</label>
|
|
<vue-datepicker :maxdate="maxUnwindDate" :mindate="minStartDate" :holiday="1" v-model="deal.ValueDate" v-on:input="setValueDate" />
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">平仓日期</label>
|
|
<vue-datepicker :mindate="minStartDate" :holiday="1" v-model="deal.UnwindDate" v-on:input="setUnwindDate" />
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">支付日期</label>
|
|
<vue-datepicker :mindate="minStartDate" :holiday="1" v-model="deal.PayDate" />
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">年化天数</label>
|
|
<input class="text-box" v-model="deal.AnnualDays" readonly="readonly" type="text" />
|
|
</div>
|
|
<div class="form-group col-md-3">
|
|
<label class="formlabel">平仓总额</label>
|
|
<input class="text-box" v-model="deal.SwapCloseAmount" readonly="readonly" type="text" />
|
|
</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:700px;">
|
|
<tbody>
|
|
<tr>
|
|
<td width="116px">收支方向</td>
|
|
<td>资金类别</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>{{item.InterestModeStr}}</td>
|
|
<td>
|
|
<vue-number-input v-model="item.InterestPrincipal" v-bind:format="inputFormatEqvNotional" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
|
</td>
|
|
<td>
|
|
<vue-number-input v-model="item.InterestAmount" v-bind:format="inputFormatEqvNotional" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
|
</td>
|
|
<td>{{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:460px;">
|
|
<tbody>
|
|
<tr>
|
|
<td width="116px">收支方向</td>
|
|
@*<td>计息基准</td>
|
|
<td>计息开始日</td>
|
|
<td>计息结算日</td>
|
|
<td>利率(年化)</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>
|
|
{{item.InterestPrincipal}}
|
|
</td>
|
|
<td>{{item.InterestStartDate}}</td>
|
|
<td>{{item.InterestEndDate}}</td>
|
|
<td>
|
|
{{item.InterestRate*100}}%
|
|
</td>*@
|
|
<td>
|
|
<vue-number-input v-model="item.InterestFee" v-bind:format="inputFormatEqvNotional" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
|
</td>
|
|
<td>
|
|
<vue-number-input v-model="item.InterestAmount" v-bind:format="inputFormatEqvNotional" v-on:input="changeInterestAmount(item)"></vue-number-input>
|
|
</td>
|
|
<td>{{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">
|
|
<tbody>
|
|
<tr>
|
|
<td width="116px">收支方向</td>
|
|
<td>多空方向</td>
|
|
<td>标的代码</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>
|
|
<td>浮动端平仓盈亏</td>
|
|
</tr>
|
|
<tr>
|
|
<td :class="floatPosition.PayDirection==1?'swapget':'swappay'">{{floatPosition.PayDirection==1?"收取":"支付"}}</td>
|
|
<td>
|
|
{{floatPosition.PositionType==1?"多头":"空头"}}
|
|
</td>
|
|
<td>
|
|
{{floatPosition.UnderlyingCode}}
|
|
</td>
|
|
<td>{{priceFormat(floatPosition.PosiGrossPrice)}}</td>
|
|
<td>
|
|
<vue-number-input v-model="floatPosition.TradingAmountAvg" v-bind:format="inputFormatEqvNotional" v-on:input="changeUnderlyingPrice" style="width:107px;"></vue-number-input>
|
|
<a href="javascript:void(0)" v-on:click="refreshUnderlyingPrice()">
|
|
<span title="使用系统标的价格" class="glyphicon glyphicon-refresh"></span>
|
|
</a>
|
|
</td>
|
|
<td>{{deal.CloseQty}}</td>
|
|
<td>
|
|
<vue-number-input v-model="floatPosition.TradingFee" v-bind:format="inputFormatEqvNotional" v-on:input="changeTradingFee"></vue-number-input>
|
|
<div class="bubble-box">我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用</div>
|
|
</td>
|
|
<td>
|
|
<vue-number-input v-model="floatPosition.TradingFeePending" v-bind:format="inputFormatEqvNotional" disabled></vue-number-input>
|
|
</td>
|
|
<td>{{floatPosition.DividendIn}}</td>
|
|
<td style="font-size:18px;">{{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="closeTrade">{{getSumbitText()}}</button>
|
|
}
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|