From 32609928898a897f7407c240bcdc6dc4e6415f0f Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 10 八月 2021 15:30:19 +0800 Subject: [PATCH] 提交 --- zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml | 6 +++--- zhengcaioa/Services/HrSalaryService.cs | 18 +++++++++--------- zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs | 2 +- zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml | 1 + 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/zhengcaioa/Services/HrSalaryService.cs b/zhengcaioa/Services/HrSalaryService.cs index 20af5ad..f5dd65a 100644 --- a/zhengcaioa/Services/HrSalaryService.cs +++ b/zhengcaioa/Services/HrSalaryService.cs @@ -410,14 +410,14 @@ // } // ); - //int year = 0; - //int month = 0; - //if (string.IsNullOrWhiteSpace(searchEntity.YearMonth)) - //{ - // DateTime yearMonth = DateTime.Now;//.Parse(searchEntity.YearMonth + "-01"); - // year = yearMonth.Year; - // month = yearMonth.Month; - //} + int year = 0; + int month = 0; + if (!string.IsNullOrWhiteSpace(searchEntity.YearMonth)) + { + DateTime yearMonth = DateTime.Parse(searchEntity.YearMonth + "-01"); + year = yearMonth.Year; + month = yearMonth.Month; + } var query = (from a in _context.HrSalaries//.Where(x => x.RecStatus == "A") // join b in listCode.Where(x => x.CodeTable == "hr_jibengongzi" && x.CodeField == "dianhuabutie") //on a.Dianhuabutie equals b.CodeSn @@ -438,7 +438,7 @@ && (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())) - //&& (string.IsNullOrWhiteSpace(searchEntity.YearMonth) || ( a.Year == year && a.Month == month )) + && (string.IsNullOrWhiteSpace(searchEntity.YearMonth) || ( a.Year == year && a.Month == month )) select new HrSalaryDTO { Id = a.Id, diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs index 5fbfaaf..134b3ca 100644 --- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs @@ -103,7 +103,7 @@ ViewBag.GoodsStatus = _liaotianService.GetSYScode("adm_goods_manage", "goods_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); - ViewBag.Goods = _admGoodsManageService.GetList().Select(x => new { code = x.Id, label = x.GoodsName }).ToList(); + ViewBag.Goods = _admGoodsManageService.GetList().Select(x => new { code = x.Id, label = (x.GoodsName.Length>15? x.GoodsName.Substring(0, 15) : x.GoodsName) }).ToList(); ViewBag.ClassifyId = _admGoodsClassifyService.GetList().Select(x => new { code = x.Id, label = x.ClassifyName }).ToList(); diff --git a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml index bc2cd85..1daba6c 100644 --- a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml +++ b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml @@ -34,9 +34,9 @@ dataUrl = "/AdmGoodsManage/GetList"; searchCol = [ - { label: '鐗╁搧绫诲埆', name: 'ClassifyId', labtype: 'combox', hidden: false, data: JSON.parse(ClassifyId), cwidth: '5%', cccwidth: '8%' }, - { label: '鐗╁搧鍚嶇О', name: 'GoodsName', labtype: 'combox', hidden: false, data: JSON.parse(Goods), cwidth: '5%', cccwidth: '8%'}, - { label: '鐗╁搧鐘舵��', name: 'GoodsStatus', labtype: 'combox', hidden: false, data: JSON.parse(GoodsStatus), cwidth: '5%', cccwidth: '8%' }, + { label: '鐗╁搧绫诲埆', name: 'ClassifyId', labtype: 'combox', hidden: false, data: JSON.parse(ClassifyId), cwidth: '5%', cccwidth: '15%' }, + { label: '鐗╁搧鍚嶇О', name: 'GoodsName', labtype: 'combox', hidden: false, data: JSON.parse(Goods), cwidth: '5%', cccwidth: '15%'}, + { label: '鐗╁搧鐘舵��', name: 'GoodsStatus', labtype: 'combox', hidden: false, data: JSON.parse(GoodsStatus), cwidth: '5%', cccwidth: '15%' }, diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml index b4b3fe5..1cc5c36 100644 --- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml +++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml @@ -64,6 +64,7 @@ ]; dataUrl = "/SalaryCheck/GetList"; searchCol = [ + { label: '鏈堜唤', name: 'YearMonth', labtype: 'monthdate', hidden: false }, { label: '宸ュ彿', name: 'Usernumber2', labtype: 'txt', hidden: false }, { label: '宸ヤ綔閮ㄩ棬', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(dept) }, { label: '鑱屽伐濮撳悕', name: 'UserName', labtype: 'txt', hidden: false }, -- Gitblit v1.9.1