97 lines
3.2 KiB
Plaintext
97 lines
3.2 KiB
Plaintext
@{
|
|
Layout = "~/Views/Shared/_MainLayout.cshtml";
|
|
}
|
|
|
|
@section JS{
|
|
|
|
<script type="text/javascript">
|
|
var g_grid = {};
|
|
$(function () {
|
|
var PostData = {};
|
|
$(".datepicker").datepicker({ changeMonth: true, changeYear: true, showButtonPanel: true, showOtherMonths: true, selectOtherMonths: true });
|
|
@Html.Raw(JqGridSimple.OutGrid("/Departments/DepartmentQuery"));
|
|
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;
|
|
try {
|
|
SetAceDropDown();
|
|
} catch (e) {
|
|
|
|
}
|
|
function AfterInsertRow(rowid, aData) {
|
|
}
|
|
});
|
|
|
|
|
|
var colModelGrid = [{
|
|
name: 'id', label: 'id', index: 'id', width: 1, align: 'left', hidden: true
|
|
} ,{
|
|
name: 'PId', label: 'PId', index: 'PId', align: 'left', hidden: true
|
|
}, {
|
|
name: 'AllDepName', label: '部门名字', index: 'AllDepName', width: 250, align: 'left'
|
|
}, {
|
|
name: 'DepartmentType', label: '部门类型', index: 'DepartmentType', width: 150, align: 'left'
|
|
}
|
|
, {
|
|
name: '', label: '操作', index: '', width: 110, align: 'left', formatter: showDepGangWei
|
|
}];
|
|
|
|
function reloadDepartMent() {
|
|
//重新加载
|
|
SearchClick();
|
|
$('#modal-editGangWei').modal('hide');
|
|
}
|
|
|
|
function showToolName(cellValue, options, rowObject) {
|
|
|
|
var html = "<a href=\"javascript:void(0)\" title='新增部门岗位信息' onclick=\"startAddGangWei({0})\">{1}</a> ".template(rowObject.Id, "新增部门岗位");
|
|
return html;
|
|
}
|
|
|
|
function startAddGangWei(id) {
|
|
$("#iframeeditGangWei").attr("src", "/project/{0}/GangWei/GangWeiEdit/0".template(id));
|
|
$('#modal-editGangWei').modal('show');
|
|
}
|
|
|
|
function startAddGangWei(id) {
|
|
$("#iframeeditGangWei").attr("src", "/project/{0}/GangWei/GangWeiEdit/0".template(id));
|
|
$('#modal-editGangWei').modal('show');
|
|
}
|
|
|
|
function SearchClick(isSearchclick) {
|
|
var listGrid = $('#listGrid');
|
|
|
|
listGrid.appendPostData({ Name: $("#Name").val() });
|
|
|
|
listGrid.appendPostData({ DepartmentType: $("#DepartmentType").val() });
|
|
|
|
|
|
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
|
|
//点击搜索时默认第一页
|
|
listGrid.jqGrid('setGridParam', {
|
|
page: 1
|
|
});
|
|
}
|
|
listGrid.trigger('reloadGrid');
|
|
}
|
|
</script>
|
|
}
|
|
|
|
<div class="searchdiv">
|
|
@Html.ShortInput("Name", "部门名字")
|
|
|
|
@Html.MyAceDropdownInput2("DepartmentType", "部门类型:", GlobalData.DeparttypeListItems())
|
|
@MyControls.SearchBtn()
|
|
</div>
|
|
@Html.Raw(JqGridSimple.OutTable())
|