@{
|
ViewBag.Title = "工资核对";
|
Layout = "~/Views/Shared/_Layout_Search.cshtml";
|
|
PltUser Employee = ViewData["Employee"] as PltUser;
|
}
|
|
<link href="~/css/jquery-confirm.css" rel="stylesheet">
|
@*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
|
<link href="~/js/plugins/layer/laydate/theme/default/laydate.css" rel="stylesheet">
|
<script src="~/js/jquery-confirm.js" type="text/javascript"></script>
|
<script src="~/js/plugins/layer/laydate/laydate5.js" type="text/javascript"></script>
|
<style>
|
/* .laydate_table {
|
display: none;
|
}*/
|
|
.col-base {
|
line-height: 35px;
|
|
}
|
/*
|
#laydate_hms {
|
display: none !important;
|
}*/
|
</style>
|
|
@section headerStyle{
|
|
<table style="line-height:35px;margin-top:15px">
|
<tr>
|
<td width="100"></td>
|
<td width="200">姓名:@Employee.UserName</td>
|
<td width="200">工号:@Employee.Usernumber</td>
|
<td >工资月份:</td>
|
<td width="180">
|
<input id="acTime" style="width:150px" class="layui-input" placeholder="yyyy-MM" type="text" />
|
</td>
|
<td>
|
<a class="btn btn-default btn-outline" href="#" onclick="doSearch()">
|
<i class="fa fa-search"></i> <span class="bold">查询</span>
|
</a>
|
</td>
|
<td></td>
|
</tr>
|
</table>
|
|
<script type="text/javascript">
|
|
|
gridConfig = { multiselect: false, selectcol: "Id" };
|
shrinkToFit = false;
|
footerrow = false;
|
|
dataCol = [
|
{ label: '序号', name: 'Id', labtype: 'txt', hidden: true },
|
{ label: '序号', name: 'Islock', labtype: 'txt', hidden: true },
|
{ label: '工号', name: 'Usernumber', labtype: 'txt', hidden: false, width: 80},
|
{
|
label: '姓名', name: 'UserName', labtype: 'txt', hidden: false, width: 60,
|
},
|
{ label: '工资月份', name: 'YearMonth', labtype: 'txt', hidden: false, width: 80 },
|
{
|
label: '状态', name: 'IslockChs', labtype: 'txt', hidden: false, width: 60, formatter: function (cellvalue, options, rowObject) {
|
if (rowObject.Islock == 'S') {
|
return '<b style="color: red">' + cellvalue + '</b>';
|
} else {
|
return cellvalue;
|
}
|
}
|
},
|
{ label: '工作部门', name: 'DeptName', labtype: 'txt', hidden: false, width: 80 },
|
{ label: '基本工资', name: 'Jibengongzi', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '保密费', name: 'Baomifei', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '工作补贴', name: 'Gongzuobutie', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '加班工资', name: 'Jiabangongzi', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '社保', name: 'Shebao', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '电话补贴', name: 'Dianhuabutie', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '全勤奖', name: 'Quanqinjiang', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '交通补贴', name: 'Jiaotngbutie', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '绩效提成', name: 'Jixiaoticheng', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '奖金', name: 'Jiangjin', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '补发工资', name: 'Bufagongzi', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '合计', name: 'sum_fgz', labtype: 'txt', hidden: false, width: 60 },
|
|
{ label: '社保', name: 'Shebaokou', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '个税', name: 'Geshui', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '电话费', name: 'Dianhuafei', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '缺勤', name: 'Queqin', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '罚款', name: 'Fakuan', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '赔偿', name: 'Peichang', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '纠错', name: 'Jiucuo', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '合计', name: 'sum_kgz', labtype: 'txt', hidden: false, width: 60 },
|
|
{ label: '到账工资', name: 'Daozhanggongzi', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '预发工资', name: 'Yufagongzi', labtype: 'txt', hidden: false, width: 60 },
|
{ label: '预发工资合计', name: 'Yufagongziheji', labtype: 'txt', hidden: false, width: 60 },
|
|
];
|
dataUrl = "/SalaryCheck/EmployeeSalary?month=" + getNowFormatDate();
|
searchCol = [];
|
|
$(function () {
|
|
laydate.render({
|
elem: '#acTime'
|
, type: 'month'
|
, value: getNowFormatDate()
|
});
|
|
$("#jqGridPager").hide();//隐藏div
|
|
$("#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: '应扣工资' }
|
]
|
});
|
jQuery("#jqGrid").jqGrid('setGridHeight', 150);
|
|
});
|
|
|
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;
|
}
|
|
|
function doSearch() {
|
|
// $("#jqGrid").trigger('reloadGrid');
|
$("#jqGrid").jqGrid('setGridParam', {
|
url: "/SalaryCheck/EmployeeSalary?month=" + $('#acTime').val()
|
}).trigger("reloadGrid");
|
|
}
|
|
|
function doQr() {
|
var dt = $("#jqGrid").getDataIDs();
|
if (dt.length > 0) {
|
var lk = $("#jqGrid").getCell(dt, "Islock");
|
if (lk == "Q") {
|
toastr.error("错误提示:此月份已经进行过确认操作!");
|
}
|
else {
|
$.ajax({
|
type: "POST",
|
url: "/SalaryCheck/SalaryCheckOk?id=" + dt,
|
dataType: "json",
|
global: false,
|
success: function (data) {
|
|
if (data.Result) {
|
parent.layer.msg('设置成功', { icon: 6 });
|
doSearch();
|
}
|
else {
|
// toastr.error("失败");
|
parent.layer.msg(data.Message, { icon: 5 });
|
}
|
|
},
|
error: function () {
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
}
|
}
|
else {
|
parent.layer.msg('无内容可操作', { icon: 5 });
|
}
|
}
|
|
|
function doSs() {
|
var dt = $("#jqGrid").getDataIDs();
|
if (dt.length > 0) {
|
var lk = $("#jqGrid").getCell(dt, "Islock");
|
if (lk == "Q") {
|
toastr.error("错误提示:此月份已完成确认,不能申诉!");
|
}
|
else {
|
OpenWindow('申诉', '80%', '80%', '/SalaryCheck/Appeal?salaryId=' + dt);
|
}
|
}
|
else {
|
parent.layer.msg('无内容可操作', { icon: 5 });
|
}
|
}
|
|
</script>
|
|
}
|
<div id="btnView" style="margin-top:15px;text-align:center">
|
<table style="line-height:35px;width:100%">
|
<tr>
|
<td width="40%"></td>
|
<td width="150">
|
<a class="btn btn-default btn-outline" href="#" onclick="doQr()">
|
<i class="fa fa-save"></i> <span class="bold">确认</span>
|
</a>
|
</td>
|
<td width="150">
|
<a class="btn btn-default btn-outline" href="#" onclick="doSs()">
|
<i class="fa fa-question"></i> <span class="bold">申诉</span>
|
</a>
|
</td>
|
<td width="40%"></td>
|
</tr>
|
</table>
|
</div>
|