54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
@model Currency
|
|
@{
|
|
ViewBag.Title = "设置币种 | 编辑";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
}
|
|
@if (!string.IsNullOrWhiteSpace(Model.CurrencyCode))
|
|
{
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#CurrencyCode").prop("readOnly", true);
|
|
})
|
|
</script>
|
|
}
|
|
<script type="text/javascript">
|
|
function checkSubmitData() {
|
|
var pass = $('#currencyEditForm').valid();
|
|
return pass;
|
|
}
|
|
|
|
function saveCurrency() {
|
|
if (!checkSubmitData()) return false;
|
|
var data = $("#currencyEditForm").serialize();
|
|
main.post("/Currency/currencyEditJson", data).done(function (res) {
|
|
window.parent.reload();
|
|
layer.closeMe();
|
|
});
|
|
}
|
|
|
|
$(function () {
|
|
$("#StartDate").datepicker({
|
|
minDate: '2010-01-01',
|
|
changeMonth: true, changeYear: true, showButtonPanel: true, showOtherMonths: true, selectOtherMonths: true
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<form id="currencyEditForm" method="post" autocomplete="off">
|
|
<div class="form-layout">
|
|
@Html.MyTextFor(model => model.CurrencyCode)
|
|
@Html.MyTextFor(model => model.CurrencyName)
|
|
@Html.MyTextFor(model => model.CurrencyUnit)
|
|
@Html.MyTextFor(model => model.CurrencySymbol)
|
|
<div class="form-group col-md-6">
|
|
<label class="formlabel">生效日期</label>
|
|
<input id="StartDate" class="text-box datepicker" type="text" value="@(Model.StartDate.OtcFormatDate())" name="StartDate">
|
|
</div>
|
|
</div>
|
|
<div class="form-buttons">
|
|
@MyControls.Btn("保存", "saveCurrency()")
|
|
@MyControls.Btn("关闭", "layer.closeMe()")
|
|
</div>
|
|
</form>
|
|
|