From 1eaeeb1efd83e7b0b04cdb1bdc1076e839bfebfe Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 17 八月 2021 17:29:37 +0800 Subject: [PATCH] 提交 --- zhengcaioa/IServices/IAdmBreakPrecedentService.cs | 3 zhengcaioa/Services/AdmBreakPrecedentService.cs | 90 +++++++++ zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexRenshi.cshtml | 80 ++++++++ zhengcaioa/Services/HrSalaryService.cs | 5 zhengcaioa/DTO/AdmBreakPrecedentDTO.cs | 3 zhengcaioa/zhengcaioa/Controllers/admin/AdmBreakPrecedentController.cs | 57 ++++++ zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml | 125 +++++++++++++ zhengcaioa/zhengcaioa/Views/User/Index.cshtml | 4 zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexGoods.cshtml | 76 ++++++++ zhengcaioa/DTO/AdmAskGoodDTO.cs | 2 zhengcaioa/DTO/HrSalaryDTO.cs | 3 zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs | 48 +++++ 12 files changed, 490 insertions(+), 6 deletions(-) diff --git a/zhengcaioa/DTO/AdmAskGoodDTO.cs b/zhengcaioa/DTO/AdmAskGoodDTO.cs index d23477c..0554e28 100644 --- a/zhengcaioa/DTO/AdmAskGoodDTO.cs +++ b/zhengcaioa/DTO/AdmAskGoodDTO.cs @@ -8,6 +8,7 @@ { public string Id { get; set; } public string GoodsId { get; set; } + public string GoodsName { get; set; } public decimal? Shuliang { get; set; } public string ShuliangName { get; set; } public string Remark { get; set; } @@ -15,6 +16,7 @@ public string RecStatus { get; set; } public string Creater { get; set; } public DateTime Createtime { get; set; } + public string CreatetimeName { get; set; } public string Modifier { get; set; } public DateTime Modifytime { get; set; } public string CreaterName { get; set; } diff --git a/zhengcaioa/DTO/AdmBreakPrecedentDTO.cs b/zhengcaioa/DTO/AdmBreakPrecedentDTO.cs index b93d761..5a5cefe 100644 --- a/zhengcaioa/DTO/AdmBreakPrecedentDTO.cs +++ b/zhengcaioa/DTO/AdmBreakPrecedentDTO.cs @@ -32,6 +32,9 @@ public string DeptId { get; set; } public string UserName { get; set; } public string BreakThing { get; set; } + public string UserId { get; set; } + public string Goods { get; set; } + } } diff --git a/zhengcaioa/DTO/HrSalaryDTO.cs b/zhengcaioa/DTO/HrSalaryDTO.cs index 8aab32d..511c2ad 100644 --- a/zhengcaioa/DTO/HrSalaryDTO.cs +++ b/zhengcaioa/DTO/HrSalaryDTO.cs @@ -170,6 +170,7 @@ public string Usernumber { get; set; } public string DeptId { get; set; } public string UserName { get; set; } - + + public string UserId { get; set; } } } diff --git a/zhengcaioa/IServices/IAdmBreakPrecedentService.cs b/zhengcaioa/IServices/IAdmBreakPrecedentService.cs index 5111a70..c788045 100644 --- a/zhengcaioa/IServices/IAdmBreakPrecedentService.cs +++ b/zhengcaioa/IServices/IAdmBreakPrecedentService.cs @@ -19,5 +19,8 @@ List<AdmBreakPrecedentDTO> GetList (string userid, DateTime datemin, DateTime datemax); + + + ResultDataEntity<AdmAskGoodDTO> SearchByPagingGoods(AdmBreakPrecedentDTOSearch searchEntity); } } diff --git a/zhengcaioa/Services/AdmBreakPrecedentService.cs b/zhengcaioa/Services/AdmBreakPrecedentService.cs index f0ce951..5c96997 100644 --- a/zhengcaioa/Services/AdmBreakPrecedentService.cs +++ b/zhengcaioa/Services/AdmBreakPrecedentService.cs @@ -133,8 +133,8 @@ && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || bbb.DeptId == searchEntity.DeptId.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.UserName) || bbb.UserName.Contains(searchEntity.UserName.Trim())) && (string.IsNullOrWhiteSpace(searchEntity.BreakThing) || a.BreakThing.Contains(searchEntity.BreakThing.Trim())) - - + && (string.IsNullOrWhiteSpace(searchEntity.UserId) || a.UserId == searchEntity.UserId.Trim()) + @@ -213,5 +213,91 @@ return result; } + + + public ResultDataEntity<AdmAskGoodDTO> SearchByPagingGoods(AdmBreakPrecedentDTOSearch searchEntity) + { + + + + ResultDataEntity<AdmAskGoodDTO> data = new ResultDataEntity<AdmAskGoodDTO>(); + List<AdmAskGoodDTO> list = new List<AdmAskGoodDTO>(); + + + + + + DateTime BreakTimestart = DateTime.Now; + DateTime BreakTimeend = DateTime.Now; + if (!string.IsNullOrWhiteSpace(searchEntity.BreakTime)) + { + string[] BreakTimes = searchEntity.BreakTime.Split("|"); + DateTime.TryParse(BreakTimes[0], out BreakTimestart); + DateTime.TryParse(BreakTimes[1], out BreakTimeend); + BreakTimeend = BreakTimeend.AddDays(1); + } + + ///AdmBreakPrecedents + var query = (from a in _context.AdmAskGoods + + + + + + join b in _context.AdmGoodsManages + on a.GoodsId equals b.Id + into bsssss + from bbb in bsssss.DefaultIfEmpty() + + join k in _context.PltUsers + on a.Creater equals k.Id + into ksssss + from kkk in ksssss.DefaultIfEmpty() + + join c in _context.HrDepts + on kkk.DeptId equals c.Id + into csssss + from ccc in csssss.DefaultIfEmpty() + + + + where a.RecStatus == "A" && a.ShenpiStatus == "A" + && (string.IsNullOrWhiteSpace(searchEntity.BreakTime) || (a.Createtime >= BreakTimestart && a.Createtime <= BreakTimeend)) + && (string.IsNullOrWhiteSpace(searchEntity.Goods) || bbb.GoodsName.Contains(searchEntity.Goods.Trim())) + && (string.IsNullOrWhiteSpace(searchEntity.UserId) || a.Creater == searchEntity.UserId.Trim()) + + + + + + select new AdmAskGoodDTO + { + Id = a.Id, + Createtime = a.Createtime, + CreatetimeName = a.Createtime.ToString("yyyy-MM-dd"), + GoodsId = a.GoodsId, + GoodsName = bbb.GoodsName, + Shuliang = a.Shuliang, + ShuliangName = a.Shuliang.HasValue? a.Shuliang.Value.ToString("F2"):"0", + + + + Creater = a.Creater, + + + RecStatus = a.RecStatus, + Modifier = a.Modifier, + Modifytime = a.Modifytime, + } + ).OrderByDescending(x => x.Createtime).ToList(); + + + + //if (searchEntity.totalrows == 0) + searchEntity.totalrows = query.Count(); + var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); + data.LoadData(searchEntity, lianlist); + return data; + } } } diff --git a/zhengcaioa/Services/HrSalaryService.cs b/zhengcaioa/Services/HrSalaryService.cs index 0f731ca..6b5c965 100644 --- a/zhengcaioa/Services/HrSalaryService.cs +++ b/zhengcaioa/Services/HrSalaryService.cs @@ -809,7 +809,10 @@ && (string.IsNullOrWhiteSpace(searchEntity.Usernumber) || f.Usernumber == searchEntity.Usernumber.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || f.DeptId == searchEntity.DeptId.Trim()) && (string.IsNullOrWhiteSpace(searchEntity.UserName) || f.UserName.Contains(searchEntity.UserName.Trim())) - select new HrSalaryDTO + + && (string.IsNullOrWhiteSpace(searchEntity.UserId) || a.Userid.Contains(searchEntity.UserId.Trim())) + + select new HrSalaryDTO { Id = a.Id, diff --git a/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs b/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs index dca6527..328529a 100644 --- a/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs @@ -310,7 +310,53 @@ return new JsonResult(_hrSalaryService.SearchByPagingFinish(search)); } - + + #endregion + + + + #region 宸ヨ祫鏌ヨ + + public IActionResult SearchIndexRenshi(string UserId) + { + 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); + ViewData["ActionInfo"] = actionlist; + + //ViewBag.dept = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); + ViewBag.stime = new DateTime(DateTime.Now.Year,1,1).ToString("yyyy-MM-dd"); + ViewBag.etime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd"); + + ViewBag.UserId = UserId; + + return View(); + } + + /// <summary> + /// 鍒楄〃鍐呭 + /// </summary> + /// <param name="search"></param> + /// <returns></returns> + public IActionResult GetSearchListRenshi(HrSalaryDTOSearch search) + { + + //鑷姩纭 + //_hrSalaryService.AutoCheck(); + + if (string.IsNullOrEmpty(search.searchDate)) + { + search.searchDate = new DateTime(DateTime.Now.Year, 1, 1).ToString("yyyy-MM-dd") + "|" + DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd"); + } + + return new JsonResult(_hrSalaryService.SearchByPagingFinish(search)); + } + #endregion } } diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmBreakPrecedentController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmBreakPrecedentController.cs index c67cb86..db54142 100644 --- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmBreakPrecedentController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmBreakPrecedentController.cs @@ -173,5 +173,62 @@ return new JsonResult(resultEntity); } + + + + public IActionResult IndexRenshi(string UserId) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + 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); + ViewData["ActionInfo"] = actionlist; + + + ViewBag.UserId = UserId; + + return View(); + + } + + public IActionResult GetListRenshi(AdmBreakPrecedentDTOSearch search) + { + //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); + return new JsonResult(_admBreakPrecedentService.SearchByPaging(search)); + } + + + public IActionResult IndexGoods(string UserId) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + 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); + ViewData["ActionInfo"] = actionlist; + + + ViewBag.UserId = UserId; + + return View(); + + } + + public IActionResult GetListGoods(AdmBreakPrecedentDTOSearch search) + { + //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); + return new JsonResult(_admBreakPrecedentService.SearchByPagingGoods(search)); + } } } diff --git a/zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexGoods.cshtml b/zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexGoods.cshtml new file mode 100644 index 0000000..aab0f84 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexGoods.cshtml @@ -0,0 +1,76 @@ +锘緻{ + ViewBag.Title = "AdmBreakPrecedent"; + Layout = "~/Views/Shared/_Layout_Search.cshtml"; +} +@section headerStyle{ + <script type="text/javascript"> + + var UserId = '@Html.Raw(ViewBag.UserId)'; + loseherght = 30; + dataCol = [ + { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, + + { + label: '鐢宠鏃堕棿', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 + //, + //formatter: function (cellvalue, options, rowObject) { + // return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/AdmBreakPrecedent/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; + //} + }, + + { label: '鐗╁搧鍚嶇О', name: 'GoodsName', labtype: 'txt', hidden: false, width: 100 }, + { label: '棰嗙敤鏁伴噺', name: 'ShuliangName', labtype: 'txt', hidden: false, width: 100 }, + + + + ]; + dataUrl = "/AdmBreakPrecedent/GetListGoods?UserId=" + UserId; + searchCol = [ + { label: '宸ヤ綔鏃堕棿', name: 'BreakTime', labtype: 'datearea', hidden: false }, + //{ label: '閮ㄩ棬', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(DeptId), cwidth: '5%', cccwidth: '8%' }, + //{ label: '鍛樺伐濮撳悕', name: 'UserName', labtype: 'txt', hidden: false }, + + { label: '鐗╁搧鍚嶇О', name: 'Goods', labtype: 'txt', hidden: false }, + + + + + + + ]; + var _pageAdd = function () { + OpenWindow("鏂板杩濈邯澶勭悊", "98%", "90%", "/AdmBreakPrecedent/Edit/"); + } + + + + + var _afterSave = function (result) { + if (result) { + toastr.success("淇濆瓨鎴愬姛"); + } else { + toastr.error("淇濆瓨澶辫触"); + } + } + + var _afterDel = function (result) { + if (result) { + toastr.success("鍒犻櫎鎴愬姛"); + } else { + /**/ + toastr.error("鍒犻櫎鎴愬姛"); + /**/ + } +} + </script> +} + +@section footerScripts{ + <script type="text/javascript"> + + + + + + </script> +} diff --git a/zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexRenshi.cshtml b/zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexRenshi.cshtml new file mode 100644 index 0000000..a5a483e --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexRenshi.cshtml @@ -0,0 +1,80 @@ +锘緻{ + ViewBag.Title = "AdmBreakPrecedent"; + Layout = "~/Views/Shared/_Layout_Search.cshtml"; +} +@section headerStyle{ + <script type="text/javascript"> + + var UserId = '@Html.Raw(ViewBag.UserId)'; + loseherght = 30; + dataCol = [ + { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, + + { + label: '澶勭綒鏃堕棿', name: 'BreakTimeName', labtype: 'txt', hidden: false, width: 100 + //, + //formatter: function (cellvalue, options, rowObject) { + // return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/AdmBreakPrecedent/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; + //} + }, + + { label: '閮ㄩ棬', name: 'DeptName', labtype: 'txt', hidden: false, width: 100 }, + { label: '鍛樺伐濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 100 }, + + { label: '杩濈邯浜嬬敱', name: 'BreakThing', labtype: 'txt', hidden: false, width: 100 }, + { label: '杩濆弽鍒跺害', name: 'BreakPrecedent', labtype: 'txt', hidden: false, width: 100 }, + + { label: '澶勭綒閲戦(鍏�)', name: 'Chufajine', labtype: 'txt', hidden: false, width: 100 }, + { label: '澶勭綒绛惧彂', name: 'QianfaUserName', labtype: 'txt', hidden: false, width: 100 }, + + ]; + dataUrl = "/AdmBreakPrecedent/GetListRenshi?UserId=" + UserId; + searchCol = [ + { label: '宸ヤ綔鏃堕棿', name: 'BreakTime', labtype: 'datearea', hidden: false }, + //{ label: '閮ㄩ棬', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(DeptId), cwidth: '5%', cccwidth: '8%' }, + //{ label: '鍛樺伐濮撳悕', name: 'UserName', labtype: 'txt', hidden: false }, + + { label: '杩濈邯浜嬬敱', name: 'BreakThing', labtype: 'txt', hidden: false }, + + + + + + + ]; + var _pageAdd = function () { + OpenWindow("鏂板杩濈邯澶勭悊", "98%", "90%", "/AdmBreakPrecedent/Edit/"); + } + + + + + var _afterSave = function (result) { + if (result) { + toastr.success("淇濆瓨鎴愬姛"); + } else { + toastr.error("淇濆瓨澶辫触"); + } + } + + var _afterDel = function (result) { + if (result) { + toastr.success("鍒犻櫎鎴愬姛"); + } else { + /**/ + toastr.error("鍒犻櫎鎴愬姛"); + /**/ + } +} + </script> +} + +@section footerScripts{ + <script type="text/javascript"> + + + + + + </script> +} diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml new file mode 100644 index 0000000..76efbf6 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml @@ -0,0 +1,125 @@ +锘緻{ + 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{ + + <style type="text/css"> + /* + .form-control { + width:100px; + }*/ + + </style> + + <script type="text/javascript"> + + @*var dept = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.dept))';*@ + + var UserId = '@Html.Raw(ViewBag.UserId)'; + + gridConfig = { multiselect: false, selectcol: "Id" }; + shrinkToFit = false; + footerrow = false; + + dataCol = [ + { label: '搴忓彿', name: 'Id', labtype: 'txt', hidden: true }, + { label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false, width: 100}, + { + label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 100, + }, + { label: '宸ヨ祫鏈堜唤', name: 'YearMonth', labtype: 'txt', hidden: false, width: 100 }, + { label: '宸ヤ綔閮ㄩ棬', name: 'DeptName', labtype: 'txt', hidden: false, width: 120 }, + { label: '鍩烘湰宸ヨ祫', name: 'Jibengongzi', labtype: 'txt', hidden: false, width: 100 }, + { label: '淇濆瘑璐�', name: 'Baomifei', labtype: 'txt', hidden: false, width: 100 }, + { label: '宸ヤ綔琛ヨ创', name: 'Gongzuobutie', labtype: 'txt', hidden: false, width: 100 }, + { label: '鍔犵彮宸ヨ祫', name: 'Jiabangongzi', labtype: 'txt', hidden: false, width: 100 }, + { label: '绀句繚', name: 'Shebao', labtype: 'txt', hidden: false, width: 100 }, + { label: '鐢佃瘽琛ヨ创', name: 'DianhuabutieChs', labtype: 'txt', hidden: false, width: 100 }, + { label: '鍏ㄥ嫟濂�', name: 'Quanqinjiang', labtype: 'txt', hidden: false, width: 100 }, + { label: '浜ら�氳ˉ璐�', name: 'Jiaotngbutie', labtype: 'txt', hidden: false, width: 100 }, + { label: '缁╂晥鎻愭垚', name: 'Jixiaoticheng', labtype: 'txt', hidden: false, width: 100 }, + { label: '濂栭噾', name: 'Jiangjin', labtype: 'txt', hidden: false, width: 100 }, + { label: '琛ュ彂宸ヨ祫', name: 'Bufagongzi', labtype: 'txt', hidden: false, width: 100 }, + { label: '鍚堣', name: 'sum_fgz', labtype: 'txt', hidden: false, width: 100 }, + + { label: '涓汉绀句繚', name: 'Shebaokou', labtype: 'txt', hidden: false, width: 100 }, + { label: '涓◣', name: 'Geshui', labtype: 'txt', hidden: false, width: 100 }, + { label: '鐢佃瘽璐�', name: 'Dianhuafei', labtype: 'txt', hidden: false, width: 100 }, + { label: '缂哄嫟', name: 'Queqin', labtype: 'txt', hidden: false, width: 100 }, + { label: '缃氭', name: 'Fakuan', labtype: 'txt', hidden: false, width: 100 }, + { label: '璧斿伩', name: 'Peichang', labtype: 'txt', hidden: false, width: 100 }, + { label: '绾犻敊', name: 'Jiucuo', labtype: 'txt', hidden: false, width: 100 }, + { label: '鍚堣', name: 'sum_kgz', labtype: 'txt', hidden: false, width: 100 }, + + { label: '鍒拌处宸ヨ祫', name: 'Daozhanggongzi', labtype: 'txt', hidden: false, width: 100 }, + { label: '棰勫彂宸ヨ祫', name: 'Yufagongzi', labtype: 'txt', hidden: false, width: 100 }, + { label: '棰勫彂宸ヨ祫鍚堣', name: 'Yufagongziheji', labtype: 'txt', hidden: false, width: 100 }, + { + label: '鐘舵��', name: 'IslockChs', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { + if (rowObject.Islock == 'S') { + return '<b style="color: red">' + cellvalue + '</b>'; + } else { + return cellvalue; + } + } + }, + ]; + dataUrl = "/SalaryCheck/GetSearchListRenshi?UserId=" + UserId; + searchCol = [ + { label: '鏃堕棿', name: 'searchDate', labtype: 'datearea', hidden: false }, + //{ label: '閮ㄩ棬', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(dept) }, + //{ label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false }, + //{ label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false }, + ]; + + $(function () { + + $("#PBSsearchDatestart").val('@ViewBag.stime'); + $("#PBSsearchDateend").val('@ViewBag.etime'); + + + $("#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 _pageEdit = function () { + var id = jQuery("#jqGrid").jqGrid('getGridParam', 'selrow'); + if (id) { + OpenWindow('宸ヨ祫鏍稿噯', '50%', '60%', '/SalaryCheck/Edit?id=' + id ); + } else { + toastr.error("璇峰厛閫変腑1鏉¤褰曪紒"); + } + }; + + var _afterSave = function (result) { + if (result) { + toastr.success("淇濆瓨鎴愬姛"); + } else { + toastr.error("淇濆瓨澶辫触"); + } + } + + var _afterDel = function (result) { + if (result) { + toastr.success("鍒犻櫎鎴愬姛"); + } else { + /**/ + toastr.error("鍒犻櫎鎴愬姛"); + /**/ + } + } + </script> +} diff --git a/zhengcaioa/zhengcaioa/Views/User/Index.cshtml b/zhengcaioa/zhengcaioa/Views/User/Index.cshtml index 62afa5a..6da5dfc 100644 --- a/zhengcaioa/zhengcaioa/Views/User/Index.cshtml +++ b/zhengcaioa/zhengcaioa/Views/User/Index.cshtml @@ -95,7 +95,9 @@ { label: '妗f鏌ヨ', name: 'Education', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { - return "<a onclick=\"javascript:void(0);\" >濂栨儵</a> <a onclick=\"javascript:void(0);\" >鐗╁搧</a> <a onclick=\"javascript:void(0);\" >钖祫</a> "; + return "<a onclick=\"OpenWindow('濂栨儵','98%','100%', '/AdmBreakPrecedent/IndexRenshi?UserId=" + rowObject.Id + "')\" >濂栨儵</a> " + + "<a onclick=\"OpenWindow('鐗╁搧','98%','100%', '/AdmBreakPrecedent/IndexGoods?UserId=" + rowObject.Id + "')\" >鐗╁搧</a> " + + "<a onclick=\"OpenWindow('钖祫','98%','100%', '/SalaryCheck/SearchIndexRenshi?UserId=" + rowObject.Id + "')\" >钖祫</a> "; } }, { -- Gitblit v1.9.1