| | |
| | | public decimal Xiawuzaotuifenzhong { get; set; } |
| | | public decimal Kuanggongtianshu { get; set; } |
| | | public string Iswork { get; set; } |
| | | |
| | | |
| | | public string SgninDateName { get; set; } |
| | | public string MorningInName { get; set; } |
| | | public string MorningOutName { get; set; } |
| | | public string AfternoonInName { get; set; } |
| | | public string AfternoonOutName { get; set; } |
| | | public string OvertimeInName { get; set; } |
| | | public string OvertimeOutName { get; set; } |
| | | } |
| | | |
| | | public class AdmAttendanceDtlDTOSearch : SearchEntity |
| | |
| | | Shangwuzaotuifenzhong = a.Shangwuzaotuifenzhong, |
| | | Xiawuzaotuifenzhong = a.Xiawuzaotuifenzhong, |
| | | Kuanggongtianshu = a.Kuanggongtianshu, |
| | | Iswork = a.Iswork |
| | | Iswork = a.Iswork, |
| | | SgninDateName = a.SgninDate.HasValue? a.SgninDate.Value.ToString("yyyy-MM-dd"):"", |
| | | MorningInName = a.MorningIn.HasValue ? a.MorningIn.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", |
| | | |
| | | MorningOutName = a.MorningOut.HasValue ? a.MorningOut.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", |
| | | AfternoonInName = a.AfternoonIn.HasValue ? a.AfternoonIn.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", |
| | | AfternoonOutName = a.AfternoonOut.HasValue ? a.AfternoonOut.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", |
| | | OvertimeInName = a.OvertimeIn.HasValue ? a.OvertimeIn.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", |
| | | OvertimeOutName = a.OvertimeOut.HasValue ? a.OvertimeOut.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", |
| | | }).OrderBy(x => x.SgninDate).ToList(); |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | |
| | | switch (signinType) |
| | | { |
| | | case 10: |
| | | if (signIn.MorningIn.HasValue) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "已经打上午上班,请不要重复打卡"; |
| | | return resultEntity; |
| | | } |
| | | signIn.MorningIn = DateTime.Now; |
| | | break; |
| | | case 11: |
| | |
| | | break; |
| | | |
| | | case 20: |
| | | if (signIn.AfternoonIn.HasValue) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "已经打下午上班卡,请不要重复打卡"; |
| | | return resultEntity; |
| | | } |
| | | signIn.AfternoonIn = DateTime.Now; |
| | | break; |
| | | case 21: |
| | | signIn.AfternoonOut = DateTime.Now; |
| | | break; |
| | | case 30: |
| | | if (signIn.AfternoonIn.HasValue) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "已经打加班卡,请不要重复打卡"; |
| | | return resultEntity; |
| | | } |
| | | signIn.OvertimeIn = DateTime.Now; |
| | | break; |
| | | case 31: |
| | |
| | | updatepltRole.Bufagongzi = dto.Bufagongzi; |
| | | updatepltRole.Peichang = dto.Peichang; |
| | | updatepltRole.Jiucuo = dto.Jiucuo; |
| | | updatepltRole.Yufagongziheji = dto.Yufagongziheji; |
| | | //updatepltRole.Daozhanggongzi = (updatepltRole.Daozhanggongzi ?? 0) + (updatepltRole.Jiangjin ?? 0) + (updatepltRole.Bufagongzi ?? 0) + (updatepltRole.Peichang ?? 0) + (updatepltRole.Jiucuo ?? 0); |
| | | // //updatepltRole.Yufagongziheji = (updatepltRole.Yufagongziheji ?? 0) + (updatepltRole.Jiangjin ?? 0) + (updatepltRole.Bufagongzi ?? 0) + (updatepltRole.Peichang ?? 0) + (updatepltRole.Jiucuo ?? 0); |
| | | |
| | | //var sum_f = (updatepltRole.Jibengongzi ?? 0) + (updatepltRole.Baomifei ?? 0) + (updatepltRole.Gongzuobutie ?? 0) + |
| | | // (updatepltRole.Jiabangongzi ?? 0) + (updatepltRole.Shebao ?? 0) + |
| | | // (updatepltRole.Quanqinjiang ?? 0) + (updatepltRole.Jiaotngbutie ?? 0) + (updatepltRole.Jixiaoticheng ?? 0); |
| | | |
| | | |
| | | |
| | | //decimal dianhuafei = 0; |
| | | //if ((updatepltRole.Dianhuabutie ?? 0) - (updatepltRole.Dianhuafei ?? 0) <= 0) |
| | |
| | | // dianhuafei = (updatepltRole.Dianhuafei ?? 0)-(updatepltRole.Dianhuabutie ?? 0); |
| | | //} |
| | | |
| | | |
| | | |
| | | |
| | | //var sum_k = (updatepltRole.Shebaokou ?? 0) + (updatepltRole.Geshui ?? 0) + dianhuafei + |
| | | // (updatepltRole.Queqin ?? 0) + (updatepltRole.Fakuan ?? 0); |
| | | |
| | | //updatepltRole.Daozhanggongzi = sum_f - sum_k; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ////计算预发工资 |
| | | |
| | | |
| | | //{ |
| | | // //上一次的工资 |
| | | // var bf= _context.HrSalaries.Where(c => c.Userid == user.Id && c.Islock== "Q" && c.RecStatus=="A"). |
| | |
| | | { |
| | | dto.Jiucuo = 0; |
| | | } |
| | | //if (!dto.Yufagongziheji.HasValue) |
| | | //{ |
| | | // dto.Yufagongziheji = 0; |
| | | //} |
| | | ViewData.Model = dto; |
| | | return View(); |
| | | } |
| | |
| | | private readonly IHrDeptService _hrDeptService; |
| | | private readonly ILogger<AdmAttendanceController> _logger; |
| | | private readonly IAdmAttendanceService _admAttendanceService; |
| | | private readonly IAdmAttendanceDtlService _admAttendanceDtlService; |
| | | |
| | | |
| | | |
| | | public AdmAttendanceController(ILogger<AdmAttendanceController> logger |
| | | , IAdmAttendanceService admAttendanceService |
| | | , IHrDeptService hrDeptService |
| | | , IAdmAttendanceDtlService admAttendanceDtlService |
| | | ) |
| | | { |
| | | _logger = logger; |
| | | _hrDeptService = hrDeptService; |
| | | _admAttendanceService = admAttendanceService; |
| | | |
| | | _admAttendanceDtlService = admAttendanceDtlService; |
| | | |
| | | |
| | | } |
| | | public IActionResult Index() |
| | | { |
| | |
| | | |
| | | return new JsonResult(_admAttendanceService.SearchByPaging(search)); |
| | | } |
| | | |
| | | |
| | | |
| | | public IActionResult IndexDtl(string AttendanceId) |
| | | { |
| | | List<ActionEntity> actionlist = new List<ActionEntity>(); |
| | | ActionEntity actionEntity = new ActionEntity(); |
| | | actionEntity.OpenType = 0; |
| | | actionEntity.ActionUrl = ""; |
| | | actionEntity.ActionFun = "Search"; |
| | | actionEntity.PageIco = "fa fa-search"; |
| | | actionEntity.ActionName = "查询"; |
| | | actionlist.Add(actionEntity); |
| | | |
| | | |
| | | ViewBag.AttendanceId = AttendanceId; |
| | | |
| | | |
| | | ViewBag.editBtn = false; |
| | | |
| | | ViewData["ActionInfo"] = actionlist; |
| | | |
| | | //ViewBag.dept = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); |
| | | |
| | | return View(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 列表内容 |
| | | /// </summary> |
| | | /// <param name="search"></param> |
| | | /// <returns></returns> |
| | | public IActionResult GetListDtl(AdmAttendanceDtlDTOSearch search) |
| | | { |
| | | |
| | | |
| | | return new JsonResult(_admAttendanceDtlService.SearchByPaging(search)); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | //计算当天请假 |
| | | List<DateBiJiaoDTO> qingjias = new List<DateBiJiaoDTO>(); |
| | | |
| | | var feichuqinjia = admAskLeaveDTOMin.Where(x => x.Lavetype != "4").ToList(); |
| | | var feichuqinjia = admAskLeaveDTOMin.Where(x => x.Lavetype != "4" && x.Lavetype != "7").ToList(); |
| | | foreach (var admAskLeave in feichuqinjia) |
| | | { |
| | | |
| | |
| | | //计算当天请假 |
| | | List<DateBiJiaoDTO> qingjias = new List<DateBiJiaoDTO>(); |
| | | |
| | | var feichuqinjia = admAskLeaveDTOMin.Where(x => x.Lavetype != "4").ToList(); |
| | | var feichuqinjia = admAskLeaveDTOMin.Where(x => x.Lavetype != "4" && x.Lavetype != "7").ToList(); |
| | | foreach (var admAskLeave in feichuqinjia) |
| | | { |
| | | |
| | |
| | | { 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: '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(); |
New file |
| | |
| | | @{ |
| | | 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 AttendanceId = '@Html.Raw(ViewBag.AttendanceId)'; |
| | | |
| | | //gridConfig = { multiselect: false, selectcol: "Id" }; |
| | | //shrinkToFit = false; |
| | | //footerrow = false; |
| | | |
| | | dataCol = [ |
| | | { label: '序号', name: 'Id', labtype: 'txt', hidden: true }, |
| | | { |
| | | label: '考勤日期', name: 'SgninDateName', labtype: 'txt', hidden: false, width: 80 |
| | | }, |
| | | { label: '上午上班', name: 'MorningInName', labtype: 'txt', hidden: false, width: 60 }, |
| | | { label: '上午下班', name: 'MorningOutName', labtype: 'txt', hidden: false, width: 60 }, |
| | | |
| | | { label: '下午上班', name: 'AfternoonInName', labtype: 'txt', hidden: false, width: 80 }, |
| | | { label: '下午下班', name: 'AfternoonOutName', labtype: 'txt', hidden: false, width: 60 }, |
| | | { label: '加班上班', name: 'OvertimeInName', labtype: 'txt', hidden: false, width: 60 }, |
| | | { label: '加班上班', name: 'OvertimeOutName', labtype: 'txt', hidden: false, width: 60 }, |
| | | { label: '请假', name: 'Qingjia', labtype: 'txt', hidden: false, width: 60 }, |
| | | { label: '销假', name: 'Xiaojia', labtype: 'txt', hidden: false, width: 60 }, |
| | | |
| | | |
| | | ]; |
| | | dataUrl = "/AdmAttendance/GetListDtl?AttendanceId=" + AttendanceId; |
| | | searchCol = [ |
| | | { label: '考勤日期', name: 'SgninDate', labtype: 'date', hidden: false}, |
| | | ////{ label: '工作部门', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(dept) }, |
| | | //{ label: '职工姓名', name: 'UserName', labtype: 'txt', hidden: false }, |
| | | ]; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var _afterSave = function (result) { |
| | | if (result) { |
| | | toastr.success("保存成功"); |
| | | } else { |
| | | toastr.error("保存失败"); |
| | | } |
| | | } |
| | | |
| | | var _afterDel = function (result) { |
| | | if (result) { |
| | | toastr.success("删除成功"); |
| | | } else { |
| | | /**/ |
| | | toastr.error("删除成功"); |
| | | /**/ |
| | | } |
| | | } |
| | | </script> |
| | | } |
| | |
| | | |
| | | <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">基本工资(元)<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2" grouptype="Vdata"> |
| | | <input class="form-control" label="基本工资(元)" name="Jibengongzi" id="Jibengongzi" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.JibengongziName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | <input class="form-control" label="基本工资(元)" name="Jibengongzi" id="Jibengongzi" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.JibengongziName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | |
| | | </div> |
| | | |
| | | <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">保密费(元)<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2" grouptype="Vdata"> |
| | | <input class="form-control" label="保密费(元)" name="Baomifei" id="Baomifei" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.BaomifeiName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | <input class="form-control" label="保密费(元)" name="Baomifei" id="Baomifei" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.BaomifeiName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | |
| | | </div> |
| | | |
| | |
| | | |
| | | <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">社保公司(元)<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2" grouptype="Vdata"> |
| | | <input class="form-control" label="社保公司(元)" name="Shebaodanwei" id="Shebaodanwei" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.ShebaodanweiName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | <input class="form-control" label="社保公司(元)" name="Shebaodanwei" id="Shebaodanwei" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.ShebaodanweiName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | |
| | | </div> |
| | | |
| | | <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">社保个人(元)<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2" grouptype="Vdata"> |
| | | <input class="form-control" label="社保个人(元)" name="Shebaogeren" id="Shebaogeren" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.ShebaogerenName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | <input class="form-control" label="社保个人(元)" name="Shebaogeren" id="Shebaogeren" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.ShebaogerenName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | |
| | | </div> |
| | | |
| | |
| | | |
| | | <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">全勤奖(元)<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2" grouptype="Vdata"> |
| | | <input class="form-control" label="全勤奖(元)" name="Quanqingjiang" id="Quanqingjiang" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.QuanqingjiangName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | <input class="form-control" label="全勤奖(元)" name="Quanqingjiang" id="Quanqingjiang" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.QuanqingjiangName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | |
| | | </div> |
| | | <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">交通补贴(元)<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2" grouptype="Vdata"> |
| | | <input class="form-control" label="交通补贴(元)" name="Jiaotongbutie" id="Jiaotongbutie" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.JiaotongbutieName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | <input class="form-control" label="交通补贴(元)" name="Jiaotongbutie" id="Jiaotongbutie" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.JiaotongbutieName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | |
| | | </div> |
| | | |
| | |
| | | @section headerStyle{ |
| | | <script language="javascript" type="text/javascript"> |
| | | controllist = [ |
| | | { label: '职位信息', name: 'data', labtype: 'panel',islist:'false', data: [ |
| | | { label: '职位信息(维护职位信息请同时维护职位基本工资和职位提成标准)', name: 'data', labtype: 'panel',islist:'false', data: [ |
| | | |
| | | {label:' 用户id ', name: 'Id', labtype: 'txt', addvisible: false, editvisible: false ,reg:''} |
| | | , { label: ' 职位名称 ', name: 'PostName', labtype: 'txt', addvisible: true, editvisible: true , reg:'',ismust:true } |
| | |
| | | <input class="form-control" id="Jiucuo" name="Jiucuo" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Jiucuo" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="CheckNum(this);"> |
| | | </div> |
| | | </div> |
| | | <div class="clearfix layer-area" style="padding-bottom:15px;"> |
| | | <label class="text-right col-sm-3 col-md-3 control-label">预发工资合计</label> |
| | | <div class="col-sm-9 col-md-9"> |
| | | <input class="form-control" id="Yufagongziheji" name="Yufagongziheji" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Yufagongziheji" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="CheckNum(this);"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | }); |
| | | |
| | | |
| | | var _pageSearch = function () { |
| | | $("#jqGrid").jqGrid('setGridParam', { |
| | | url: '/SalaryCheck/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 = "-"; |
| | |
| | | toastr.success("打卡成功"); |
| | | } |
| | | else { |
| | | toastr.success("打卡失败"); |
| | | toastr.success(data.Message); |
| | | } |
| | | }, |
| | | error: function () { |