@{
|
ViewBag.Title = "工资核准";
|
Layout = "~/Views/Shared/_Layout_Search.cshtml";
|
}
|
|
<link href="~/css/jquery-confirm.css" rel="stylesheet">
|
<script src="~/js/jquery-confirm.js" type="text/javascript"></script>
|
|
@section headerStyle{
|
|
<script type="text/javascript">
|
|
@*var dept = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.dept))';*@
|
|
//gridConfig = { multiselect: false, selectcol: "Id" };
|
//shrinkToFit = false;
|
//footerrow = false;
|
|
dataCol = [
|
{ label: '序号', name: 'Id', labtype: 'txt', hidden: true },
|
{
|
label: '姓名', name: 'UserName', labtype: 'txt', hidden: false, width: 80
|
},
|
{ label: '年', name: 'Year', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '月', name: 'Month', labtype: 'txt', hidden: false, width: 60 },
|
|
{ label: '应出勤', name: 'Yingchuqin', labtype: 'txt', hidden: false, width: 80 },
|
{ label: '放假', name: 'Offdays', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '实际出勤', name: 'Shijichuqin', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '请假', name: 'Qingjia', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '加班', name: 'Jiaban', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '销假', name: 'Xiaojia', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '迟到', name: 'Chidao', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '早退', name: 'Zaotui', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '旷工', name: 'Kuanggong', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '带薪假', name: 'Daixinjia', labtype: 'txt', hidden: false, width: 60 },
|
{
|
label: '明细', name: 'mingxi', labtype: 'txt', hidden: false, width: 60,
|
formatter: function (cellvalue, options, rowObject) {
|
return "<a onclick=\"OpenWindow('" + rowObject.UserName + "','98%','100%', '/AdmAttendance/IndexDtl?AttendanceId=" + rowObject.Id + "')\" >明细</a>";
|
}
|
},
|
|
];
|
dataUrl = "/AdmAttendance/GetList?YearMonth222=" + getNowFormatDate();
|
searchCol = [
|
{ label: '月份', name: 'YearMonth', labtype: 'monthdate', hidden: false, cwidth: '5%', cccwidth: '8%' },
|
//{ label: '工作部门', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(dept) },
|
{ label: '职工姓名', name: 'UserName', labtype: 'txt', hidden: false },
|
];
|
//var _pageSearch = function () {
|
// $("#jqGrid").jqGrid('setGridParam', {
|
// url: '/AdmAttendance/GetList', postData: jsons, page: 1
|
// }); //重新载入
|
// var jsons = GetSearchEnd();
|
// if (jsons == false) {
|
// msg.info("请录入查询条件");
|
// return false;
|
// }
|
// LoadGrid(jsons);
|
//}
|
|
$(function () {
|
$("#PBSYearMonth").val(getNowFormatDate());
|
$("#PBSYearMonth").attr("readonly", "readonly")//将input元素设置为readonly
|
//$("#jqGrid").closest(".ui-jqgrid-bdiv").css({ 'overflow-x': 'scroll' });
|
|
//jQuery("#jqGrid").jqGrid('setGroupHeaders', {
|
// useColSpanStyle: true,
|
// groupHeaders: [
|
// { startColumnName: 'Jibengongzi', numberOfColumns: 12, titleText: '应发工资' },
|
// { startColumnName: 'Shebaokou', numberOfColumns: 8, titleText: '应扣工资' }
|
// ]
|
//});
|
|
});
|
|
var _pageSearch = function () {
|
$("#jqGrid").jqGrid('setGridParam', {
|
url: '/AdmAttendance/GetList', postData: jsons, page: 1
|
}); //重新载入
|
var jsons = GetSearchEnd();
|
if (jsons == false) {
|
msg.info("请录入查询条件");
|
return false;
|
}
|
LoadGrid(jsons);
|
}
|
|
|
|
function getNowFormatDate() {
|
var date = new Date();
|
var seperator1 = "-";
|
var year = date.getFullYear();
|
var month = date.getMonth();
|
var strDate = date.getDate();
|
if (month == 0) {
|
year = year - 1;
|
month = 12;
|
}
|
if (month >= 1 && month <= 9) {
|
month = "0" + month;
|
}
|
if (strDate >= 0 && strDate <= 9) {
|
strDate = "0" + strDate;
|
}
|
var currentdate = year + seperator1 + month;//+ seperator1 + strDate;
|
return currentdate;
|
}
|
|
|
var _afterSave = function (result) {
|
if (result) {
|
toastr.success("保存成功");
|
} else {
|
toastr.error("保存失败");
|
}
|
}
|
|
var _afterDel = function (result) {
|
if (result) {
|
toastr.success("删除成功");
|
} else {
|
/**/
|
toastr.error("删除成功");
|
/**/
|
}
|
}
|
</script>
|
}
|