Files
zszq-trs/YLErpWeb/Views/SwapTrade2/SwapflowList.cshtml
T
2024-05-09 14:06:26 +08:00

217 lines
11 KiB
Plaintext

@{
ViewBag.Title = "互换清算-成交簿记";
Layout = "~/Views/Shared/_MainLayout.cshtml";
var valueDate = valuedateBLL.ValueDate.ToSqlDate();
var afterDate = valuedateBLL.GetNonHoliday(valuedateBLL.ValueDate.AddDays(1)).ToSqlDate();
var pageObj = new
{
IsUseDisplayNotional = false,
valueDate = valueDate,
afterDate = @afterDate,
canEdit = CurUser.结算管理_成交簿记流水编辑,
canDelete = CurUser.结算管理_成交簿记流水删除
};
}
@section CSS{
<link rel="stylesheet" href="~/Style/Css/step.css?v=@(HtmlUtil.JsVersion)" />
<style>
.layui-progress {
position: relative;
height: 6px;
border-radius: 20px;
background-color: #eee;
}
.layui-progress-bar {
position: absolute;
left: 0;
top: 0;
width: 0;
max-width: 100%;
height: 6px;
border-radius: 20px;
text-align: right;
background-color: #5FB878;
transition: all .3s;
-webkit-transition: all .3s;
}
.layui-progress-big, .layui-progress-big .layui-progress-bar {
height: 18px;
line-height: 18px;
}
.layui-progress-text {
position: relative;
top: -20px;
line-height: 18px;
font-size: 12px;
color: #666;
}
.bootstrap-select{
width:140px !important;
}
</style>
}
@section JS{
<script>
const page = @Json.Serialize(pageObj);
</script>
<script src="~/statics/libs/signalr/dist/browser/signalr.min.js"></script>
<script src="~/front/calendar?v=@(HtmlUtil.JsVersion)"></script>
<script src="@HtmlUtil.BasicDataJs("客户")"></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/trade/tradeUpload.js?v=2"></script>
<script src="~/Scripts/app/swaptrade/step.js?v=@HtmlUtil.JsVersion"></script>
<script src="~/Scripts/app/swaptrade/SwapflowList.js?v=@HtmlUtil.JsVersion"></script>
}
<div id="flowBook">
<div class="searchdiv">
<div id="steps"></div>
</div>
<div class="searchdiv">
<div style="display:flex;height:40px;">
<a v-on:click="refreshTradeFlow(false)" href="#" style="margin-left:30px;"><span class="glyphicon glyphicon-refresh" v-show="step==1">刷新交易端流水</span></a>
@if (CurUser.结算管理_成交簿记流水新增)
{
<button class="btn btn-primary" v-on:click="addNew" style="margin-left:30px;" v-show="step==1">添加流水</button>
<button class="btn btn-primary" v-on:click="showImportSwapflow" style="margin-left:30px;" v-show="step==1">导入流水</button>
}
<button class="btn btn-primary" v-on:click="getList"><span class="glyphicon glyphicon-search"></span>查询</button>
@*<button class="btn btn-primary" v-on:click="summaryStep" style="margin-left:30px;" v-show="step==1">汇总</button>*@
<div style="position:absolute;right:17px;">
@Html.MyAceDropdownInput("SearchClientId", "客户名称", ClientDataModel.GetAllOpenClient(),multiple:false,appendEmptyAll:false)
<label>标的代码</label>
<select class="" data-placeholder="请选择 标的代码" id="UnderlyingCode" name="UnderlyingCode" data-actions-box="true" data-live-search="true" style="width:180px;"></select>
<label style="margin-left:10px;">清算日期</label>
<vue-datepicker :holiday="1" v-model="tradeDate" id="tradeDate" ></vue-datepicker>
@if (CurUser.结算管理_成交簿记流水重置)
{
<button class="btn btn-primary" id="resetBtn" style="margin-left:16px;">重置</button>
}
@if (CurUser.结算管理_成交簿记流水簿记)
{
<button class="btn btn-primary" id="combookingBtn" style="margin-left:16px;">确定簿记</button>
}
</div>
@* <button class="btn btn-primary" v-on:click="unwindStep" style="margin-left:30px;" v-show="step==2">执行开平仓事件</button>
<button class="btn btn-primary" v-on:click="composeUnwindStep" style="margin-left:30px;" v-show="step==3">合成持仓</button>*@
</div>
</div>
<div id="tableContent" class="yc-panel my-0 p-0">
@Html.Raw(JqGridSimple.OutTable())
</div>
<div class="modal" id="flowAssetBookModal" aria-hidden="true">
<div class="modal-dialog" style="max-width:400px;">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
成交流水
</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label class="formlabel ">交易时间</label>
<vue-datepicker :maxdate="maxTradeDate" :holiday="1" v-model="swapflow.OccurTime"></vue-datepicker>
<span style="color:red">*</span>
</div>
<div class="form-group">
<label class="formlabel ">交易对手方</label>
<input type="text" name="ClientId" id="ClientId" v-model="swapflow.ClientId" class="text-box" />
<span style="color:red">*</span>
</div>
<div class="form-group">
<label class="formlabel ">买卖方向</label>
<select v-model="swapflow.BsType">
<option value=1>买</option>
<option value=2>卖</option>
</select>
</div>
<div class="form-group">
<label class="formlabel ">标的代码</label>
<vue-underlying id="swapflow.UnderlyingCode" v-model="swapflow.UnderlyingCode" v-on:change="setUnderlyingCode"></vue-underlying>
<span style="color:red">*</span>
</div>
<div class="form-group">
<label class="formlabel ">成交数量</label>
<vue-number-input v-model="swapflow.TradingQty" v-bind:format="inputFormatTradeAmount"></vue-number-input>
</div>
<div class="form-group">
<label class="formlabel ">成交金额</label>
<vue-number-input v-model="swapflow.TradingAmount" v-bind:format="inputFormatTradePrice"></vue-number-input>
</div>
<div class="form-group">
<label class="formlabel ">交易费用</label>
<vue-number-input v-model="swapflow.TradingFee" v-bind:format="inputFormatTradePrice"></vue-number-input>
</div>
<div class="form-group">
<label class="formlabel ">成交均价</label>
<vue-number-input v-model="swapflow.TradingAmountAvg" v-bind:format="inputFormatTradePrice"></vue-number-input>
</div>
@*<div class="form-group">
<label class="formlabel ">成交均价含费</label>
<vue-number-input v-model="swapflow.TradingAmountFeeAvg" v-bind:format="inputFormatTradePrice"></vue-number-input>
</div>*@
<div class="form-group">
<label class="formlabel ">成交收益率</label>
<vue-number-input v-model="swapflow.ytm" v-bind:format="inputFormatMarginRate"></vue-number-input>
</div>
<div class="form-group">
<label class="formlabel ">成交净价</label>
<vue-number-input v-model="swapflow.TradingAmountNet" v-bind:format="inputFormatTradePrice"></vue-number-input>
</div>
@* <div class="form-group">
<label class="formlabel ">成交净价含费</label>
<vue-number-input v-model="swapflow.TradingAmountNetFee" v-bind:format="inputFormatTradePrice"></vue-number-input>
</div>*@
<div class="form-group">
<label class="formlabel ">清算日期</label>
<vue-datepicker :holiday="1" v-model="swapflow.SettleDate"></vue-datepicker>
<span style="color:red">*</span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" v-on:click="saveSwapflow">保存</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
<div id="importSwapFlow" style="display:none;">
<form id="tradeUploadForm" method="post" class="yc-panel" onsubmit="return false;" style="padding-bottom:30px;">
<h4 class="mb-4">成交流水导入</h4>
<div class="mb-4">
<input type="file" id="openFile" name="file" accept=".xlsx" />
<button type="button" class="btn btn-primary" v-on:click="importSwapflow">导入</button>
</div>
<div class="mb-4">
<label>说明:只支持导入.xlsx文件</label>
</div>
</form>
<div class="yc-panel">
<h4 class="mb-3">成交流水导入模板下载</h4>
<div class="mb-4">
<a class="btn btn-link" href="/App_Docs/导入模板/互换成交流水导入模板.xlsx" target="_blank">
成交流水导入模板下载
</a>
</div>
</div>
</div>
</div>
<div id="progressBar" style="padding: 20px;display:none">
<div class="layui-progress layui-progress-big" lay-showpercent="true">
<div class="layui-progress-bar" lay-percent="0%">
<span class="layui-progress-text"></span>
</div>
</div>
</div>
<div id="combookingMsg" style="padding: 20px;display:none">
<div id="msg"></div>
</div>