Files
zszq-trs/YLErpWeb/Views/ExchangeTrade/SpreadSetting.cshtml
T
2025-12-18 10:57:17 +08:00

88 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@using YLErp.Modules.SystemModule
@model XBondSpread
@{
ViewBag.Title = "偏移设置";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
}
@section CSS{
<style>
.offset-form-group { display: flex; align-items: center; gap: 8px; }
.offset-form-group .form-control { width: 120px; }
.help-block { margin-top: 5px; color: #999; }
.form-footer { text-align: center; }
</style>
}
@section JS{
<script>
$(function() {
// 保存按钮点击事件
$("#btnSave").click(function() {
var bid = $("#bid").val();
var ofr = $("#ofr").val();
// 保存到后台
$.ajax({
type: "Post",
url: "/ExchangeTrade/AjaxSaveSpreadSetting",
data: { bid, ofr },
success: function (data) {
if (!data.success){
main.alert(data.msg);
return
}
window.parent.showmiddlemessage('偏移设置成功');
// 关闭对话框
layer.closeMe();
}
});
});
// 关闭按钮点击事件
$("#btnClose").click(function() {
layer.closeMe();
});
});
</script>
}
<div class="container-fluid" style="padding: 20px;">
<div class="form-horizontal">
<!-- 净价bid偏移 -->
<div class="form-group">
<div class="offset-form-group">
<span class="control-label">净价bid偏移</span>
<input type="number" id="bid" class="form-control" value="@(Model.bid)" />
<span class="input-group-addon"> × 0.0001 (元)</span>
</div>
<div class="help-block">
例:若此处输入3;买入净价为99.8055时,偏移后为99.8052
</div>
</div>
<!-- 净价ofr偏移 -->
<div class="form-group">
<div class="offset-form-group">
<span class="control-label ">净价ofr偏移</span>
<input type="number" id="ofr" class="form-control" value="@(Model.ofr)" />
<span class="input-group-addon"> × 0.0001 (元)</span>
</div>
<div class="help-block">
例:若此处输入3;卖出净价为99.8055时,偏移后为99.8058
</div>
</div>
<div class="form-group" style="margin-top: 20px;">
<div class="help-block" style="color: #666;">保存后10分钟后生效</div>
</div>
<!-- 按钮区域 -->
<div class="form-footer">
<button id="btnSave" type="button" class="btn btn-primary" style="margin-right: 10px;">保存</button>
<button id="btnClose" type="button" class="btn btn-default">关闭</button>
</div>
</div>
</div>