100 lines
3.9 KiB
Plaintext
100 lines
3.9 KiB
Plaintext
@{
|
|
ViewBag.Title = "交易日历";
|
|
Layout = "~/Views/Shared/_MainLayout.cshtml";
|
|
var pageObj = new
|
|
{
|
|
allowOption = CurUser.基础参数管理.交易日历
|
|
};
|
|
}
|
|
@section CSS{
|
|
|
|
}
|
|
@section JS{
|
|
|
|
<script type="text/javascript">
|
|
var g_grid={};
|
|
const page = @Json.Serialize(pageObj);
|
|
$(function () {
|
|
var PostData = {};
|
|
PostData.ValidState = $("#ValidState").val();
|
|
@Html.Raw(JqGridSimple.OutGrid("/calendar/calendarQuery"));
|
|
g_grid = jQuery('#listGrid');
|
|
});
|
|
|
|
var colModelGrid = [
|
|
{ name: '', label: '操作', width: 90, formatter: showToolName,sortable:false },
|
|
{ name: 'id', label: 'id', index: 'id', width: 1, hidden: true },
|
|
{ name: 'EncryptId', label: 'EncryptId', index: 'EncryptId', width: 0, hidden: true },
|
|
{ name: 'Country', label: '日历名称', index: 'Country',width:200},
|
|
{ name: 'Year', label: '年份', index: 'Year' },
|
|
{ name: 'WorkingDays', label: '交易日天数', index: 'WorkingDays',sortable:false },
|
|
{ name: 'CreateDate', label: '创建时间', index: 'CreateDate', width: 90, formatter: 'date' },
|
|
{ name: 'ValidState', label: '是否有效', index: 'ValidState', width: 80, formatter: formatValidState }
|
|
];
|
|
|
|
function showToolName(cellValue, options, rowObject) {
|
|
return "<input type=\"button\" class=\"wentiEdit\" title='查看日历' onclick=\"startcalendarView('{0}')\" value=\"{1}\" />".template(rowObject.EncryptId, "详情");
|
|
}
|
|
|
|
function startAddcalendar() {
|
|
var url = "/calendar/calendarEdit/0";
|
|
main.infopage("新增日历", url,{ area: ["450px", "50%"] });
|
|
}
|
|
|
|
function startcalendarView(id) {
|
|
var url = "/calendar/calendarYearEdit/?enid=" + id;
|
|
main.open("设置日历", url, { area: ["1000px", "80%"] });
|
|
}
|
|
|
|
function reloadcalendar() {
|
|
//重新加载
|
|
SearchClick();
|
|
}
|
|
|
|
//导入日历
|
|
function upLoadcalendar() {
|
|
var addurl = "/calendar/calendarUpload/0";
|
|
main.infopage("导入日历", addurl);
|
|
}
|
|
|
|
function SearchClick(isSearchclick) {
|
|
var listGrid = $('#listGrid');
|
|
listGrid.appendPostData({ Country: $("#Country").val() });
|
|
listGrid.appendPostData({ LargeYear: $("#LargeYear").val() });
|
|
listGrid.appendPostData({ UpdateDateStart: $("#DateFromUpdateDate").val() });
|
|
listGrid.appendPostData({ UpdateDateEnd: $("#DateToUpdateDate").val() });
|
|
listGrid.appendPostData({ ValidState: $("#ValidState").val() });
|
|
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
|
|
//点击搜索时默认第一页
|
|
listGrid.jqGrid('setGridParam', {page: 1});
|
|
}
|
|
listGrid.trigger('reloadGrid');
|
|
}
|
|
</script>
|
|
}
|
|
|
|
<div class="searchdiv">
|
|
<form class="form-inline search-form" onsubmit="SearchClick(true);return false;" autocomplete="off">
|
|
<label>日历名称</label>
|
|
<input type="text" name="Country" id="Country" />
|
|
<label>年份</label>
|
|
<input type="text" name="LargeYear" id="LargeYear" />
|
|
<label>是否有效</label>
|
|
<select class="" data-placeholder="请选择 是否有效" id="ValidState" name="ValidState">
|
|
<option value="">全部</option>
|
|
<option selected="selected" value="Valid">有效</option>
|
|
<option value="InValid">无效</option>
|
|
</select>
|
|
<button class="btn btn-primary"><span class="glyphicon glyphicon-search"></span> 查询</button>
|
|
@if (CurUser.基础参数管理.交易日历)
|
|
{
|
|
<button class="btn btn-primary " type="button" onclick="startAddcalendar();return false;">新增</button>
|
|
}
|
|
</form>
|
|
</div>
|
|
|
|
@Html.Raw(JqGridSimple.OutTable())
|
|
|
|
|
|
|