73 lines
2.5 KiB
Plaintext
73 lines
2.5 KiB
Plaintext
@model trade_confirm_rule
|
|
@{
|
|
ViewBag.Title = "限额设置";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
}
|
|
@section CSS{
|
|
<style>
|
|
/*#TargetType, #ScopeType, #TimeType, #ValidState{
|
|
width: 295px;
|
|
}*/
|
|
|
|
#TargetType_chosen, #ScopeType_chosen, #TimeType_chosen, #ValidState_chosen {
|
|
height: 34px;
|
|
}
|
|
</style>
|
|
}
|
|
@section JS
|
|
{
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
});
|
|
|
|
function checkSubmitData() {
|
|
var pass = $('#tradeConfirmRuleEditForm').valid();
|
|
|
|
return pass;
|
|
}
|
|
|
|
function saveTradeConfirmRule() {
|
|
if (!checkSubmitData()) return false;
|
|
|
|
if (!$("#UpLimit").val() && !$("#DownLimit").val()) {
|
|
main.message("上限额度和下限额度不能同时为空");
|
|
return false;
|
|
}
|
|
|
|
var data = $("#tradeConfirmRuleEditForm").serialize();
|
|
main.post("/trade/tradeConfirmRuleEditJson", data).done(function (res) {
|
|
window.parent.showmiddlemessage("限额设置成功");
|
|
try { if (window.parent) window.parent.reloadTradeConfirmRules(); }
|
|
catch (e) { }
|
|
closeTradeConfirmRuleEditWindow();
|
|
});
|
|
}
|
|
|
|
function closeTradeConfirmRuleEditWindow() {
|
|
try { window.parent.layer.closeAll(); } catch (e) { }
|
|
}
|
|
</script>
|
|
|
|
|
|
}
|
|
|
|
@using (Html.BeginForm("tradeConfirmRuleEdit", "trade_confirm_rule", FormMethod.Post, new { id = "tradeConfirmRuleEditForm" }))
|
|
{
|
|
<div class="yc-panel" style="margin:0px auto;margin-top:10px;">
|
|
<fieldset>
|
|
<legend>限额设置</legend>
|
|
@Html.HiddenFor(model => model.id)
|
|
@Html.MyTextFor(model => model.Name, true)
|
|
@Html.MyDropdownFor1(model => model.TargetType, tradeController.GetLimitTargetTypes(), null, "", false)
|
|
@Html.MyDropdownFor1(model => model.ScopeType, tradeController.GetLimitScopeTypes(),null, "", false)
|
|
@Html.MyDropdownFor1(model => model.TimeType, tradeController.GetLimitTimeTypes(), null, "", false)
|
|
@Html.MyDecimalFor(model => model.UpLimit)
|
|
@Html.MyDecimalFor(model => model.DownLimit)
|
|
@Html.MyDropdownFor1(model => model.ValidState, ConsGlobal.ValidStates(), null, "", false)
|
|
</fieldset>
|
|
</div>
|
|
<div style="margin:0px auto;padding:10px;">
|
|
@MyControls.Btn("保存", "saveTradeConfirmRule()")
|
|
@MyControls.Btn("关闭", "closeTradeConfirmRuleEditWindow()")
|
|
</div>
|
|
} |