126 lines
4.7 KiB
Plaintext
126 lines
4.7 KiB
Plaintext
@{
|
|
ViewBag.Title = "自定义限额规则";
|
|
Layout = "~/Views/Shared/_MainLayout.cshtml";
|
|
}
|
|
@section CSS{
|
|
|
|
}
|
|
@section JS{
|
|
|
|
<script type="text/javascript">
|
|
var g_grid={};
|
|
var settingStatus = '@CurUser.风险控制_限额规则维护' == "True";
|
|
$(function () {
|
|
@Html.Raw(JqGridSimple.OutGrid("/trade/tradeTradeConfirmRuleQuery"));
|
|
g_grid = jQuery('#listGrid');
|
|
function keyEnter(event) {
|
|
try {
|
|
var e = event ? event : (window.event ? window.event : null);
|
|
if (e.keyCode == 13) {
|
|
SearchClick(true);
|
|
}
|
|
} catch (e) {
|
|
|
|
}
|
|
}
|
|
document.onkeydown = keyEnter;
|
|
SetAceDropDown();
|
|
});
|
|
|
|
var colModelGrid = [{
|
|
name: 'id', label: 'id', index: 'id', width: 1, align: 'left', hidden: true
|
|
}, {
|
|
name: 'EncryptId', label: 'EncryptId', index: 'EncryptId', width: 0, align: 'left', hidden: true
|
|
}, {
|
|
name: '', label: '操作', index: '', width: 150, align: 'left', formatter: showToolName
|
|
}, {
|
|
name: 'Name', label: '限额名称', index: 'Name', width: 120
|
|
}, {
|
|
name: 'TargetType', label: '限额指标', index: 'TargetType', width: 120
|
|
}, {
|
|
name: 'ScopeType', label: '统计范围', index: 'ScopeType', width: 120
|
|
}, {
|
|
name: 'TimeType', label: '统计时间', index: 'TimeType', width: 120
|
|
}, {
|
|
name: 'UpLimit', label: '限额上限', index: 'UpLimit', width: 120
|
|
}, {
|
|
name: 'DownLimit', label: '限额下限', index: 'DownLimit', width: 120
|
|
}, {
|
|
name: 'ValidState', label: '状态', index: 'ValidState', width: 120, formatter: formatValidState
|
|
},];
|
|
|
|
function strikeFormat(cellValue, options, rowObject) {
|
|
return rowObject.trade.IsMoneynessOption == "是" ? main.formatNumber(cellValue * 100) + "%" : main.formatNumber(cellValue);
|
|
}
|
|
|
|
function gridComplete() {
|
|
main.setcolumnChooser(jQuery('#listGrid'),"@configcolumn_data.自定义限额规则" );
|
|
}
|
|
|
|
var g_curdate = new moment().format("YYYY-MM-DD");
|
|
function showToolName(cellValue, options, rowObject) {
|
|
var html = "";
|
|
if (settingStatus) {
|
|
html = html +
|
|
"<input type=\"button\" class=\"wentiEdit\" title='删除' onclick=\"deleteTradeConfirmRule('{0}')\" value=\"{1}\" />"
|
|
.template(rowObject.EncryptId, "删除");
|
|
html = html +
|
|
"<input type=\"button\" class=\"wentiEdit\" title='修改授信信息' onclick=\"setTradeConfirmRule('{0}')\" value=\"{1}\" />"
|
|
.template(rowObject.EncryptId, "修改");
|
|
}
|
|
|
|
return html;
|
|
}
|
|
|
|
function reloadTradeConfirmRules() {
|
|
//重新加载
|
|
SearchClick();
|
|
}
|
|
|
|
function SearchClick(isSearchclick) {
|
|
var listGrid = $('#listGrid');
|
|
|
|
listGrid.appendPostData({ Name: $("#Name").val() });
|
|
listGrid.appendPostData({ TargetType: $("#TargetType").val() });
|
|
listGrid.appendPostData({ ScopeType: $("#ScopeType").val() });
|
|
listGrid.appendPostData({ TimeType: $("#TimeType").val() });
|
|
|
|
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
|
|
//点击搜索时默认第一页
|
|
listGrid.jqGrid('setGridParam', {
|
|
page: 1
|
|
});
|
|
}
|
|
listGrid.trigger('reloadGrid');
|
|
}
|
|
|
|
function setTradeConfirmRule(enid) {
|
|
main.open("限额设置", "/trade/tradeConfirmRuleEdit?enid=" + enid, { area: ['1260px', '800px'] });
|
|
}
|
|
|
|
function deleteTradeConfirmRule(enid) {
|
|
main.post("/trade/deleteTradeConfirmRule", {enid : enid}).done(function (res) {
|
|
SearchClick();
|
|
});
|
|
}
|
|
|
|
function showcolumnChooser() {
|
|
main.showcolumnChooser(jQuery('#listGrid'),"@configcolumn_data.自定义限额规则" );
|
|
}
|
|
|
|
</script>
|
|
}
|
|
|
|
<div class="searchdiv">
|
|
@Html.ShortInput("Name", "限额名称")
|
|
@Html.MyAceDropdownInput2("TargetType", "限额指标", tradeController.GetLimitTargetTypes())
|
|
@Html.MyAceDropdownInput2("ScopeType", "统计范围", tradeController.GetLimitScopeTypes())
|
|
@Html.MyAceDropdownInput2("TimeType", "统计时间", tradeController.GetLimitTimeTypes())
|
|
@MyControls.SearchBtn()
|
|
@if (CurUser.风险控制_限额规则维护)
|
|
{
|
|
@MyControls.Btn("新增", "setTradeConfirmRule('')")
|
|
}
|
|
</div>
|
|
|
|
@Html.Raw(JqGridSimple.OutTable()) |