| | |
| | | |
| | | public string Userid { get; set; } |
| | | |
| | | public string YearMonth222 { get; set; } |
| | | |
| | | public string YearMonth { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | ResultEntity ModifyStatus(string id, string userid); |
| | | |
| | | ResultDataEntity<AdmAttendanceDtlDTO> SearchByPaging(AdmAttendanceDtlDTOSearch searchEntity); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | return query; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取所有有效科目 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResultDataEntity<AdmAttendanceDtlDTO> SearchByPaging(AdmAttendanceDtlDTOSearch searchEntity) |
| | | { |
| | | ResultDataEntity<AdmAttendanceDtlDTO> data = new ResultDataEntity<AdmAttendanceDtlDTO>(); |
| | | |
| | | |
| | | var query = (from a in _context.AdmAttendanceDtls//.Where(x => x.RecStatus == "A") |
| | | |
| | | |
| | | |
| | | where a.RecStatus == "A" |
| | | && (string.IsNullOrWhiteSpace(searchEntity.AttendanceId) || a.AttendanceId == searchEntity.AttendanceId.Trim()) |
| | | && (!searchEntity.SgninDate.HasValue || a.SgninDate == searchEntity.SgninDate) |
| | | |
| | | select new AdmAttendanceDtlDTO |
| | | { |
| | | Id = a.Id, |
| | | AttendanceId = a.AttendanceId, |
| | | SgninDate = a.SgninDate, |
| | | MorningIn = a.MorningIn, |
| | | |
| | | MorningOut = a.MorningOut, |
| | | AfternoonIn = a.AfternoonIn, |
| | | AfternoonOut = a.AfternoonOut, |
| | | OvertimeIn = a.OvertimeIn, |
| | | OvertimeOut = a.OvertimeOut, |
| | | Qingjia = a.Qingjia, |
| | | Xiaojia = a.Xiaojia, |
| | | RecStatus = a.RecStatus, |
| | | Creater = a.Creater, |
| | | Createtime = a.Createtime, |
| | | Modifier = a.Modifier, |
| | | Modifytime = a.Modifytime, |
| | | |
| | | Shangwuchidaofenzhong = a.Shangwuchidaofenzhong, |
| | | Xiawuchidaofenzhong = a.Xiawuchidaofenzhong, |
| | | Shangwuzaotuifenzhong = a.Shangwuzaotuifenzhong, |
| | | Xiawuzaotuifenzhong = a.Xiawuzaotuifenzhong, |
| | | Kuanggongtianshu = a.Kuanggongtianshu, |
| | | Iswork = a.Iswork |
| | | }).OrderBy(x => x.SgninDate).ToList(); |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | var rolelist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | |
| | | data.LoadData(searchEntity, rolelist); |
| | | return data; |
| | | } |
| | | } |
| | | } |
| | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || b.DeptId == searchEntity.DeptId.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Userid) || b.DeptId == searchEntity.Userid.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.UserName) || b.UserName.Contains(searchEntity.UserName.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.YearMonth) || a.Year == DateTime.Parse(searchEntity.YearMonth.Trim()+"-01").Year) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.YearMonth) || a.Month == DateTime.Parse(searchEntity.YearMonth.Trim() + "-01").Month) |
| | | select new AdmAttendanceDTO |
| | | { |
| | | Id = a.Id, |
New file |
| | |
| | | using DTO; |
| | | using IServices; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Extensions.Logging; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using System.Transactions; |
| | | using zhengcaioa.Models; |
| | | namespace zhengcaioa.Controllers.admin |
| | | { |
| | | public class AdmAttendanceController : Controller |
| | | { |
| | | private readonly IHrDeptService _hrDeptService; |
| | | private readonly ILogger<AdmAttendanceController> _logger; |
| | | private readonly IAdmAttendanceService _admAttendanceService; |
| | | |
| | | |
| | | public AdmAttendanceController(ILogger<AdmAttendanceController> logger |
| | | , IAdmAttendanceService admAttendanceService |
| | | , IHrDeptService hrDeptService |
| | | ) |
| | | { |
| | | _logger = logger; |
| | | _hrDeptService = hrDeptService; |
| | | _admAttendanceService = admAttendanceService; |
| | | |
| | | } |
| | | public IActionResult Index() |
| | | { |
| | | 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.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 GetList(AdmAttendanceDTOSearch search) |
| | | { |
| | | //_hrSalaryService.AutoCheck(); |
| | | if (!string.IsNullOrEmpty(search.YearMonth222)) |
| | | { |
| | | search.YearMonth = search.YearMonth222; |
| | | } |
| | | |
| | | return new JsonResult(_admAttendanceService.SearchByPaging(search)); |
| | | } |
| | | } |
| | | } |
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 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 }, |
| | | |
| | | ]; |
| | | 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 >= 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> |
| | | } |
| | |
| | | |
| | | if (data.Result) { |
| | | // parent._afterSave(true); |
| | | parent.layer.msg('保存成功', { icon: 6 }); |
| | | _pageAutoClose();//自动关闭页面方法 |
| | | parent.layer.msg('成功保存', { icon: 6 }); |
| | | var Topictype = $("#Topictype").val(); |
| | | var Zhishitype = $("#Zhishitype").val(); |
| | | var Area = $("#Area").val(); |
| | | |
| | | window.location = "/ExpertTestTopic/Edit?Topictype=" + Topictype + "&Zhishitype=" + Zhishitype + "&Area=" + Area + "" |
| | | if ($.isNumber(imgLoad)) { |
| | | parent.layer.close(imgLoad); |
| | | } |
| | | } |
| | | else { |
| | | if ($.isNumber(imgLoad)) { |