72 lines
3.0 KiB
Plaintext
72 lines
3.0 KiB
Plaintext
@model client_variety_marginrate
|
|
@{
|
|
ViewBag.Title = "预付金率 | 编辑";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
}
|
|
@section CSS{
|
|
<link href="~/Statics/libs/datetime/flatpickr/flatpickr.min.css" rel="stylesheet" />
|
|
}
|
|
@section JS{
|
|
<script type="text/javascript">
|
|
function checkSubmitData() {
|
|
if (!$("#VarietyId").val()) {
|
|
main.message("标的品种不能为空");
|
|
return false;
|
|
}
|
|
if (!$("#ValueDate").val()) {
|
|
main.message("生效日期不能为空");
|
|
return false;
|
|
}
|
|
var pass = $('#MarginRateEditForm').valid();
|
|
return pass;
|
|
}
|
|
|
|
function saveCurrency() {
|
|
if (!checkSubmitData()) return false;
|
|
var data = $("#MarginRateEditForm").serialize();
|
|
main.post("/MarginRate/MarginRateEditJson", data).done(function (res) {
|
|
window.parent.reload();
|
|
layer.closeMe();
|
|
});
|
|
}
|
|
|
|
$(function () {
|
|
$(".datepicker").datepicker({ changeMonth: true, changeYear: true, showButtonPanel: true, showOtherMonths: true, selectOtherMonths: true });
|
|
const fp = flatpickr(".form_datetime", {
|
|
enableTime: true, dateFormat: "Y-m-d H:i",
|
|
allowInput: true, time_24hr: true
|
|
});
|
|
})
|
|
</script>
|
|
<script src="~/Statics/libs/datetime/flatpickr/flatpickr.min.js?v=@(HtmlUtil.JsVersion)"></script>
|
|
}
|
|
|
|
|
|
<form id="MarginRateEditForm" method="post" autocomplete="off">
|
|
<div class="form-layout">
|
|
@Html.HiddenFor(model => model.id)
|
|
@Html.HiddenFor(model => model.EncryptId)
|
|
@Html.MyDropdownFor(model => model.ClientId, ClientDataModel.GetAllClient())
|
|
@Html.MyDropdownFor(model => model.VarietyId, varietyController.GetAllvarietyNameCode())
|
|
<div id="ValueDateDiv" class="form-group col-md-6">
|
|
<label class="formlabel">生效日期:</label>
|
|
<input class="search-input datepicker" id="ValueDate" name="ValueDate" value="@(Model.id == 0 ? "" : Model.ValueDate.ToString("yyyy-MM-dd"))" type="text" autocomplete="off" required="required">
|
|
<span style="color:red">*</span>
|
|
</div>
|
|
<div id="highMarginRateDiv" class="form-group col-md-6">
|
|
<label class="formlabel">PFE系数</label>
|
|
<input type="text" name="HighMarginRate" id="HighMarginRate" value="@(Model.HighMarginRate * 100)" class="text-box" />
|
|
<span>%</span>
|
|
</div>
|
|
<div id="highMarginRateDiv" class="form-group col-md-6">
|
|
<label class="formlabel">VR系数</label>
|
|
<input type="text" name="LowMarginRate" id="LowMarginRate" value="@(Model.LowMarginRate * 100)" class="text-box" />
|
|
<span>%</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-buttons">
|
|
@MyControls.Btn("保存", "saveCurrency()")
|
|
@MyControls.Btn("关闭", "layer.closeMe()")
|
|
</div>
|
|
</form>
|