From 83c4efe25b7b5ee027a34987f8ee508a379c1d47 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期五, 10 九月 2021 15:38:12 +0800 Subject: [PATCH] 工资修改 --- zhengcaioa/Services/ProjectService.cs | 51 ++ zhengcaioa/DTO/ProjectDTO.cs | 8 zhengcaioa/Services/HrSalaryService.cs | 121 +++-- zhengcaioa/DTO/SysBaimingdanDTO.cs | 33 + zhengcaioa/zhengcaioa/Startup.cs | 1 zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml | 99 +++- zhengcaioa/DTO/HrSalaryDTO.cs | 14 zhengcaioa/zhengcaioa/Controllers/settings/SysBaimingdanController.cs | 151 +++++++ zhengcaioa/Model/zhengcaioaContext.cs | 48 ++ zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs | 5 zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs | 34 + zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs | 4 zhengcaioa/zhengcaioa/Views/SysBaimingdan/Index.cshtml | 56 ++ zhengcaioa/Services/SysBaimingdanService.cs | 178 ++++++++ zhengcaioa/zhengcaioa/Views/SalaryCheck/Employee.cshtml | 58 +- zhengcaioa/IServices/ISysBaimingdanService.cs | 20 zhengcaioa/Model/SysBaimingdan.cs | 20 zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndex.cshtml | 71 +- zhengcaioa/zhengcaioa/Views/SysBaimingdan/Edit.cshtml | 40 + zhengcaioa/zhengcaioa/Controllers/ProjectController.cs | 81 +++ zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs | 144 +++++- zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml | 14 22 files changed, 1,067 insertions(+), 184 deletions(-) diff --git a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs index df0467e..6e808e1 100644 --- a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs +++ b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs @@ -261,6 +261,10 @@ CreateMap<AdmAskJiaojieDtl, AdmAskJiaojieDtlDTO>(); CreateMap<AdmAskJiaojieDtlDTO, AdmAskJiaojieDtl>(); + CreateMap<SysBaimingdan, SysBaimingdanDTO>(); + CreateMap<SysBaimingdanDTO, SysBaimingdan>(); + + } } } diff --git a/zhengcaioa/DTO/HrSalaryDTO.cs b/zhengcaioa/DTO/HrSalaryDTO.cs index 9ab0459..af4b673 100644 --- a/zhengcaioa/DTO/HrSalaryDTO.cs +++ b/zhengcaioa/DTO/HrSalaryDTO.cs @@ -38,7 +38,7 @@ get { return ((Jibengongzi ?? 0) + (Baomifei ?? 0) + (Gongzuobutie ?? 0) + (Jiabangongzi ?? 0) + (Shebao ?? 0) + - (Dianhuabutie ?? 0) + (Quanqinjiang ?? 0) + (Jiaotngbutie ?? 0) + (Jixiaoticheng ?? 0) + (Jiangjin ?? 0) + (Bufagongzi ?? 0)); + /*(Dianhuabutie ?? 0) +*/ (Quanqinjiang ?? 0) + (Jiaotngbutie ?? 0) + (Jixiaoticheng ?? 0) + (Jiangjin ?? 0) + (Bufagongzi ?? 0)); } } @@ -53,7 +53,13 @@ { get { - return (Shebaokou ?? 0) + (Geshui ?? 0) + (Dianhuafei ?? 0) + (Queqin ?? 0) + (Fakuan ?? 0) + (Peichang ?? 0)- (Jiucuo ?? 0); + decimal dianhuafei = 0; + if((Dianhuabutie??0) - (Dianhuafei?? 0) <= 0 ) + { + dianhuafei = (Dianhuafei ?? 0) - (Dianhuabutie ?? 0) ; + } + + return (Shebaokou ?? 0) + (Geshui ?? 0) + dianhuafei + (Queqin ?? 0) + (Fakuan ?? 0) + (Peichang ?? 0)+ (Jiucuo ?? 0); } } @@ -174,5 +180,9 @@ public string UserName { get; set; } public string UserId { get; set; } + + public string YearMonth222 { get; set; } + public string searchDatestart222 { get; set; } + public string searchDateend222 { get; set; } } } diff --git a/zhengcaioa/DTO/ProjectDTO.cs b/zhengcaioa/DTO/ProjectDTO.cs index 7116042..a35fe7d 100644 --- a/zhengcaioa/DTO/ProjectDTO.cs +++ b/zhengcaioa/DTO/ProjectDTO.cs @@ -14,6 +14,7 @@ public string City { get; set; } public string AreaId { get; set; } public string Cgfs { get; set; } + public string CgfsName { get; set; } public string Number { get; set; } public string Name { get; set; } public string Drhx { get; set; } @@ -89,6 +90,11 @@ public string StartTimestar { get; set; } public string StartTimeend { get; set; } + + public string KaibiaoTimeStar { get; set; } + + public string KaibiaoTimeEnd { get; set; } + public string Sheng { get; set; } public string City { get; set; } public string AreaId { get; set; } @@ -128,7 +134,7 @@ public string Baojiachaxiaoyu { get; set; } - + public string Chuanbiaofenxi { get; set; } } } diff --git a/zhengcaioa/DTO/SysBaimingdanDTO.cs b/zhengcaioa/DTO/SysBaimingdanDTO.cs new file mode 100644 index 0000000..839c550 --- /dev/null +++ b/zhengcaioa/DTO/SysBaimingdanDTO.cs @@ -0,0 +1,33 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace DTO +{ + public class SysBaimingdanDTO + { + public string Id { get; set; } + public string BaimingdanName { get; set; } + public string PostSeq { get; set; } + public string PostType { get; set; } + public string PostTypeName { get; set; } + public string RecStatus { get; set; } + public string Creater { get; set; } + public DateTime Createtime { get; set; } + public string Modifier { get; set; } + public DateTime Modifytime { get; set; } + } + + public class SysBaimingdanDTOSearch : SearchEntity + { + public string BaimingdanName { get; set; } + + + + public string PostType { get; set; } + + + + + } +} diff --git a/zhengcaioa/IServices/ISysBaimingdanService.cs b/zhengcaioa/IServices/ISysBaimingdanService.cs new file mode 100644 index 0000000..cde2f2b --- /dev/null +++ b/zhengcaioa/IServices/ISysBaimingdanService.cs @@ -0,0 +1,20 @@ +锘縰sing DTO; +using System; +using System.Collections.Generic; +using System.Text; + +namespace IServices +{ + public interface ISysBaimingdanService + { + ResultEntity save(SysBaimingdanDTO DTO); + + SysBaimingdanDTO Get(string id); + + ResultDataEntity<SysBaimingdanDTO> SearchByPaging(SysBaimingdanDTOSearch searchEntity); + + ResultEntity ModifyStatus(string id, string userid); + + List<SysBaimingdanDTO> GetList(); + } +} diff --git a/zhengcaioa/Model/SysBaimingdan.cs b/zhengcaioa/Model/SysBaimingdan.cs new file mode 100644 index 0000000..a5339d9 --- /dev/null +++ b/zhengcaioa/Model/SysBaimingdan.cs @@ -0,0 +1,20 @@ +锘縰sing System; +using System.Collections.Generic; + +#nullable disable + +namespace zhengcaioa.Models +{ + public partial class SysBaimingdan + { + public string Id { get; set; } + public string BaimingdanName { get; set; } + public string PostSeq { get; set; } + public string PostType { get; set; } + public string RecStatus { get; set; } + public string Creater { get; set; } + public DateTime Createtime { get; set; } + public string Modifier { get; set; } + public DateTime Modifytime { get; set; } + } +} diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs index e2aed05..39503d7 100644 --- a/zhengcaioa/Model/zhengcaioaContext.cs +++ b/zhengcaioa/Model/zhengcaioaContext.cs @@ -97,6 +97,7 @@ public virtual DbSet<Projectyouxiao> Projectyouxiaos { get; set; } public virtual DbSet<Projectzhongbiao> Projectzhongbiaos { get; set; } public virtual DbSet<SysAttachment> SysAttachments { get; set; } + public virtual DbSet<SysBaimingdan> SysBaimingdans { get; set; } public virtual DbSet<SysCode> SysCodes { get; set; } public virtual DbSet<SysCodeDtl> SysCodeDtls { get; set; } public virtual DbSet<Systemsetting> Systemsettings { get; set; } @@ -5329,6 +5330,53 @@ .HasDefaultValueSql("('A')"); }); + modelBuilder.Entity<SysBaimingdan>(entity => + { + entity.ToTable("sys_baimingdan"); + + entity.Property(e => e.Id).HasMaxLength(50); + + entity.Property(e => e.BaimingdanName) + .HasMaxLength(200) + .HasColumnName("baimingdan_name"); + + entity.Property(e => e.Creater) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("creater") + .HasDefaultValueSql("('1')"); + + entity.Property(e => e.Createtime) + .HasColumnType("datetime") + .HasColumnName("createtime") + .HasDefaultValueSql("(getdate())"); + + entity.Property(e => e.Modifier) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("modifier") + .HasDefaultValueSql("('1')"); + + entity.Property(e => e.Modifytime) + .HasColumnType("datetime") + .HasColumnName("modifytime") + .HasDefaultValueSql("(getdate())"); + + entity.Property(e => e.PostSeq) + .HasMaxLength(50) + .HasColumnName("post_seq"); + + entity.Property(e => e.PostType) + .HasMaxLength(50) + .HasColumnName("post_type"); + + entity.Property(e => e.RecStatus) + .IsRequired() + .HasMaxLength(1) + .HasColumnName("rec_status") + .HasDefaultValueSql("('A')"); + }); + modelBuilder.Entity<SysCode>(entity => { entity.ToTable("sys_code"); diff --git a/zhengcaioa/Services/HrSalaryService.cs b/zhengcaioa/Services/HrSalaryService.cs index 7d5fb4a..f495e12 100644 --- a/zhengcaioa/Services/HrSalaryService.cs +++ b/zhengcaioa/Services/HrSalaryService.cs @@ -126,62 +126,89 @@ } var user = _context.PltUsers.Where(c => c.Id == updatepltRole.Userid).SingleOrDefault(); + var buchangqian = (updatepltRole.Jiangjin??0) + (updatepltRole.Bufagongzi ?? 0) + (updatepltRole.Jiucuo ?? 0) + (updatepltRole.Peichang ?? 0); + var buchanghou = (dto.Jiangjin ?? 0) + (dto.Bufagongzi ?? 0) + (dto.Jiucuo ?? 0) + (dto.Peichang ?? 0); + + + updatepltRole.Daozhanggongzi += (buchanghou - buchangqian); + if (user.advancewages.HasValue && user.advancewages.Value > 0) + { + + updatepltRole.Yufagongziheji += (buchanghou - buchangqian); + + } + updatepltRole.Jiangjin = dto.Jiangjin; updatepltRole.Bufagongzi = dto.Bufagongzi; - - var sum_f = ((updatepltRole.Jibengongzi ?? 0) + (updatepltRole.Baomifei ?? 0) + (updatepltRole.Gongzuobutie ?? 0) + - (updatepltRole.Jiabangongzi ?? 0) + (updatepltRole.Shebao ?? 0) + (updatepltRole.Dianhuabutie ?? 0) + - (updatepltRole.Quanqinjiang ?? 0) + (updatepltRole.Jiaotngbutie ?? 0) + (updatepltRole.Jixiaoticheng ?? 0) + - dto.Jiangjin + dto.Bufagongzi) + dto.Jiucuo; ; - updatepltRole.Peichang = dto.Peichang; updatepltRole.Jiucuo = dto.Jiucuo; + //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_k = (updatepltRole.Shebaokou ?? 0) + (updatepltRole.Geshui ?? 0) + (updatepltRole.Dianhuafei ?? 0) + - (updatepltRole.Queqin ?? 0) + (updatepltRole.Fakuan ?? 0) + dto.Peichang; + //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; + - //璁$畻棰勫彂宸ヨ祫 - if (user.advancewages.HasValue && user.advancewages.Value>0) - { - //涓婁竴娆$殑宸ヨ祫 - var bf= _context.HrSalaries.Where(c => c.Userid == user.Id && c.Islock== "Q" && c.RecStatus=="A"). - OrderByDescending(c=>c.Year).ThenByDescending(c=>c.Month).FirstOrDefault(); + - var pc = user.advancewages.Value; - if (sum_f - sum_k > pc) - { - updatepltRole.Daozhanggongzi = sum_f - sum_k; - updatepltRole.Yufagongzi = 0; - if(bf!=null) - { - updatepltRole.Yufagongziheji = bf.Yufagongziheji??0 - (updatepltRole.Daozhanggongzi-pc); - } - else - { - updatepltRole.Yufagongziheji = (pc - updatepltRole.Daozhanggongzi); - } - } - else - { - //棰勫彂 - updatepltRole.Daozhanggongzi = pc; - updatepltRole.Yufagongzi = pc - (sum_f - sum_k); - if (bf != null) - { - updatepltRole.Yufagongziheji =bf.Yufagongziheji??0+ updatepltRole.Yufagongzi; - } - else - { - updatepltRole.Yufagongziheji = updatepltRole.Yufagongzi; - } - } - } - else - { - updatepltRole.Daozhanggongzi = sum_f - sum_k; - } + + ////璁$畻棰勫彂宸ヨ祫 + + //{ + // //涓婁竴娆$殑宸ヨ祫 + // var bf= _context.HrSalaries.Where(c => c.Userid == user.Id && c.Islock== "Q" && c.RecStatus=="A"). + // OrderByDescending(c=>c.Year).ThenByDescending(c=>c.Month).FirstOrDefault(); + + // var pc = user.advancewages.Value; + // if (sum_f - sum_k > pc) + // { + // updatepltRole.Daozhanggongzi = sum_f - sum_k; + // updatepltRole.Yufagongzi = 0; + // if(bf!=null) + // { + // updatepltRole.Yufagongziheji = bf.Yufagongziheji??0 - (updatepltRole.Daozhanggongzi-pc); + // } + // else + // { + // updatepltRole.Yufagongziheji = (pc - updatepltRole.Daozhanggongzi); + // } + // } + // else + // { + // //棰勫彂 + // updatepltRole.Daozhanggongzi = pc; + // updatepltRole.Yufagongzi = pc - (sum_f - sum_k); + // if (bf != null) + // { + // updatepltRole.Yufagongziheji =bf.Yufagongziheji??0+ updatepltRole.Yufagongzi; + // } + // else + // { + // updatepltRole.Yufagongziheji = updatepltRole.Yufagongzi; + // } + // } + //} + //else + //{ + // updatepltRole.Daozhanggongzi = sum_f - sum_k; + //} updatepltRole.Islock = "H"; updatepltRole.Modifier = dto.Modifier; diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs index ca6e783..0c22304 100644 --- a/zhengcaioa/Services/ProjectService.cs +++ b/zhengcaioa/Services/ProjectService.cs @@ -372,6 +372,32 @@ sql.Append(" ) "); } } + if (!string.IsNullOrWhiteSpace(searchEntity.Chuanbiaofenxi)) + { + if (searchEntity.Chuanbiaofenxi == "01") + { + sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] and (b.[defen]-a.[drhx_defen]) >= 10 ) "); + sql.Append(" and exists ( select * from( select ( isnull((select COUNT(*) ProjectIdshuliang from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] group by b.ProjectId) ,0)+ "); + + sql.Append(" isnull( (select COUNT(*) ProjectIdshuliang from [Projectreason] b where a.[Id]=b.[ProjectId] group by b.ProjectId),0)+ "); + sql.Append(" isnull( (select COUNT(*) ProjectIdshuliang from [Projectyouxiao] b where a.[Id]=b.[ProjectId] group by b.ProjectId),0)+ "); + sql.Append(" isnull( ( select COUNT(*) ProjectIdshuliang from [Project] b where a.[Id]=b.[Id] and b.drhx is not null ),0)+ "); + sql.Append(" isnull( (select COUNT(*) ProjectIdshuliang from [Project] b where a.[Id]=b.[Id] and b.dshx is not null ),0) "); + sql.Append(" ) as sum_count ) a where a.sum_count <= 5 "); + sql.Append(" ) "); + } + else if (searchEntity.Chuanbiaofenxi == "02") + { + sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] and (b.[defen]-a.[drhx_defen]) >= 20 ) "); + + + } + else if (searchEntity.Chuanbiaofenxi == "03") + { + sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b where a.[Id]=b.[ProjectId] and (b.[defen]-a.[drhx_defen]) >= 10 ) "); + } + + } if (!string.IsNullOrWhiteSpace(searchEntity.Reasonname)) @@ -429,6 +455,17 @@ if (!string.IsNullOrWhiteSpace(searchEntity.StartTimestar)) { sql.Append(" and a.start_time <='" + StartTimestarend.AddDays(1).ToString("yyyy-MM-dd") + "'"); + + } + + if (!string.IsNullOrWhiteSpace(searchEntity.KaibiaoTimeStar)) + { + sql.Append(" and a.start_time >='" + searchEntity.KaibiaoTimeStar + "'"); + + } + if (!string.IsNullOrWhiteSpace(searchEntity.KaibiaoTimeEnd)) + { + sql.Append(" and a.start_time <='" + searchEntity.KaibiaoTimeEnd + "'"); } @@ -544,6 +581,20 @@ searchEntity.totalrows = query.Count(); var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); list = _mapper.Map<List<ProjectDTO>>(lianlist); + + var cgfs = GetCgfs(); + foreach(var projectDTO in list) + { + var cgf = cgfs.Where(x=>x.Id == projectDTO.Cgfs).FirstOrDefault(); + if (cgf != null) + { + projectDTO.CgfsName = cgf.Name; + } + + } + + + data.LoadData(searchEntity, list); return data; } diff --git a/zhengcaioa/Services/SysBaimingdanService.cs b/zhengcaioa/Services/SysBaimingdanService.cs new file mode 100644 index 0000000..6c32627 --- /dev/null +++ b/zhengcaioa/Services/SysBaimingdanService.cs @@ -0,0 +1,178 @@ +锘縰sing AutoMapper; +using DTO; +using IServices; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using zhengcaioa.Models; + +namespace Services +{ + public class SysBaimingdanService: ISysBaimingdanService + { + private readonly zhengcaioaContext _context; + private readonly IMapper _mapper; + public SysBaimingdanService(zhengcaioaContext context, IMapper mapper) + { + _context = context; + _mapper = mapper; + } + + + public ResultEntity save(SysBaimingdanDTO SysBaimingdanDTO) + { + ResultEntity resultEntity = new ResultEntity(); + try + { + var SysBaimingdan = _mapper.Map<SysBaimingdan>(SysBaimingdanDTO); + if (String.IsNullOrEmpty(SysBaimingdan.Id)) + { + SysBaimingdan.Id = Guid.NewGuid().ToString(); + SysBaimingdanDTO.Id = SysBaimingdan.Id; + + _context.SysBaimingdans.Add(SysBaimingdan); + } + else + { + var updatepltSysBaimingdan = _context.SysBaimingdans.Find(SysBaimingdan.Id); + updatepltSysBaimingdan.BaimingdanName = SysBaimingdan.BaimingdanName; + updatepltSysBaimingdan.PostSeq = SysBaimingdan.PostSeq; + updatepltSysBaimingdan.PostType = SysBaimingdan.PostType; + + updatepltSysBaimingdan.RecStatus = SysBaimingdan.RecStatus; + // updatepltRole.Creater = pltRole.Creater; + //updatepltRole.Createtime = pltRole.Createtime; + updatepltSysBaimingdan.Modifier = SysBaimingdan.Modifier; + updatepltSysBaimingdan.Modifytime = SysBaimingdan.Modifytime; + + } + + _context.SaveChanges(); + resultEntity.ReturnID = SysBaimingdan.Id; + resultEntity.Result = true; + } + catch (Exception ex) + { + resultEntity.Result = false; + resultEntity.Message = "淇濆瓨澶辫触锛岃鑱旂郴绠$悊鍛�"; + + } + return resultEntity; + } + + public SysBaimingdanDTO Get(string id) + { + var entity = _context.SysBaimingdans.Find(id); + + if (entity.RecStatus != "A") + { + entity = new SysBaimingdan(); + } + var SysBaimingdanDTO = _mapper.Map<SysBaimingdanDTO>(entity); + return SysBaimingdanDTO; + } + + public ResultDataEntity<SysBaimingdanDTO> SearchByPaging(SysBaimingdanDTOSearch searchEntity) + { + ResultDataEntity<SysBaimingdanDTO> data = new ResultDataEntity<SysBaimingdanDTO>(); + + var listCode = (from a in _context.SysCodeDtls + join b in _context.SysCodes + on a.CodeId equals b.Id + where a.RecStatus == "A" + && b.RecStatus == "A" + select new CodeDataEntity() + { + CodeId = b.Id, + CodeTable = b.CodeTable, + CodeField = b.CodeField, + CodeSn = a.CodeSn, + Comments = a.Comments, + Contents = a.Contents, + RecStatus = a.RecStatus, + Sort = a.Sort + } + ); + + var query = (from a in _context.SysBaimingdans//.Where(x => x.RecStatus == "A") + + + join f in listCode.Where(x => x.CodeTable == "sys_baimingdan" && x.CodeField == "post_type") + on a.PostType equals f.CodeSn + into fff + from fffffff in fff.DefaultIfEmpty() + + where a.RecStatus == "A" + && (string.IsNullOrWhiteSpace(searchEntity.BaimingdanName) || a.BaimingdanName.Contains(searchEntity.BaimingdanName.Trim())) + + && (string.IsNullOrWhiteSpace(searchEntity.PostType) || a.PostType == searchEntity.PostType.Trim()) + select new SysBaimingdanDTO + { + Id = a.Id, + BaimingdanName = a.BaimingdanName, + PostSeq = a.PostSeq, + PostType = a.PostType, + PostTypeName = fffffff.Comments, + + RecStatus = a.RecStatus, + Creater = a.Creater, + Createtime = a.Createtime, + Modifier = a.Modifier, + Modifytime = a.Modifytime, + }).OrderByDescending(x => x.Modifytime).ToList(); + + + + + + + + + //query = query.OrderByDescending(x => x.Modifytime).ToList(); + //if (searchEntity.totalrows == 0) + searchEntity.totalrows = query.Count(); + var rolelist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); + //list = _mapper.Map<List<SysBaimingdanDTO>>(rolelist); + data.LoadData(searchEntity, rolelist); + return data; + } + + public ResultEntity ModifyStatus(string id, string userid) + { + + ResultEntity result = new ResultEntity(); + result.Result = true; + + var model = _context.SysBaimingdans.Find(id); + if (model != null) + { + model.RecStatus = "D"; + model.Modifier = userid; + model.Modifytime = DateTime.Now; + _context.SaveChanges(); + } + + return result; + } + + + + /// <summary> + /// 鑾峰彇鎵�鏈夋湁鏁堥儴闂� + /// </summary> + /// <returns></returns> + public List<SysBaimingdanDTO> GetList() + { + + var listPosition = _context.SysBaimingdans.Where(r => r.RecStatus == "A").ToList(); + + var list = _mapper.Map<List<SysBaimingdanDTO>>(listPosition); + return list; + } + + + + } +} diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs index ba62186..7693c12 100644 --- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs @@ -946,7 +946,10 @@ } - + if (result == "") + { + result = "[]"; + } return result; } diff --git a/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs b/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs index aac96ad..2e21181 100644 --- a/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs @@ -70,6 +70,10 @@ public IActionResult GetList(HrSalaryDTOSearch search) { //_hrSalaryService.AutoCheck(); + if (!string.IsNullOrEmpty(search.YearMonth222)) + { + search.YearMonth = search.YearMonth222; + } return new JsonResult(_hrSalaryService.SearchSalaryByPaging(search)); } @@ -98,7 +102,7 @@ { dto.Peichang = 0; } - if (!dto.Jiucuo.HasValue) + if (!dto.Jiucuo.HasValue || dto.Jiucuo.Value == 0) { dto.Jiucuo = 0; } @@ -292,8 +296,8 @@ ViewData["ActionInfo"] = actionlist; ViewBag.dept = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); - ViewBag.stime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.ToString("yyyy-MM"); - ViewBag.etime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); + ViewBag.stime = DateTime.Now.AddMonths(-1).AddDays(1 - DateTime.Now.Day).Date.ToString("yyyy-MM"); + ViewBag.etime = DateTime.Now.AddMonths(-1).AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); return View(); } @@ -307,6 +311,14 @@ { //鑷姩纭 //_hrSalaryService.AutoCheck(); + if (!string.IsNullOrEmpty(search.searchDatestart222)) + { + search.searchDatestart = search.searchDatestart222; + } + if (!string.IsNullOrEmpty(search.searchDateend222)) + { + search.searchDateend = search.searchDateend222; + } return new JsonResult(_hrSalaryService.SearchByPagingFinish(search)); } @@ -330,8 +342,8 @@ ViewData["ActionInfo"] = actionlist; //ViewBag.dept = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); - ViewBag.stime =DateTime.Now.ToString("yyyy-MM"); - ViewBag.etime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); + ViewBag.stime =DateTime.Now.AddMonths(-1).ToString("yyyy-MM"); + ViewBag.etime = DateTime.Now.AddMonths(-1).AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); ViewBag.UserId = UserId; @@ -345,15 +357,23 @@ /// <returns></returns> public IActionResult GetSearchListRenshi(HrSalaryDTOSearch search) { + if (!string.IsNullOrEmpty(search.searchDatestart222)) + { + search.searchDatestart = search.searchDatestart222; + } + if (!string.IsNullOrEmpty(search.searchDateend222)) + { + search.searchDateend = search.searchDateend222; + } //鑷姩纭 //_hrSalaryService.AutoCheck(); - if (string.IsNullOrEmpty(search.searchDatestart)) + if (!string.IsNullOrEmpty(search.searchDatestart)) { search.searchDatestart = DateTime.Now.ToString("yyyy-MM"); } - if (string.IsNullOrEmpty(search.searchDateend)) + if (!string.IsNullOrEmpty(search.searchDateend)) { search.searchDate = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM"); } diff --git a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs index 02a69c9..c09f000 100644 --- a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs @@ -25,9 +25,11 @@ private readonly IIntentionCustomerService _intentionCustomerService; private readonly IUserService _userService; private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService; + private readonly ISysBaimingdanService _sysBaimingdanService; public ProjectController(ILogger<ProjectController> logger, IProjectService projectService, ILiaotianService liaotianService,IIntentionCustomerService intentionCustomerService, IUserService userService - , ICooperatecustomCustomerService cooperatecustomCustomerService) + , ICooperatecustomCustomerService cooperatecustomCustomerService + , ISysBaimingdanService sysBaimingdanService) { _logger = logger; _projectService = projectService; @@ -35,6 +37,7 @@ _intentionCustomerService = intentionCustomerService; _userService = userService; _cooperatecustomCustomerService = cooperatecustomCustomerService; + _sysBaimingdanService = sysBaimingdanService; } [CheckLogin] public IActionResult Index() @@ -636,5 +639,81 @@ } } + + + //鑾峰彇瀵规墜鍒嗘瀽 + public IActionResult GetProjectFenxi([FromBody] ProjectDTOSearch search) + { + ReturnMsg<List<ProjectDTO>> returnMsg = new ReturnMsg<List<ProjectDTO>>(); + returnMsg.code = 2; + + var sysBaimingdanDTOs = _sysBaimingdanService.GetList(); + if (!string.IsNullOrEmpty(search.Zhuanjia)) + { + var sss = sysBaimingdanDTOs.Where(x => x.PostType == "01" && search.Zhuanjia.Contains(x.BaimingdanName)).Count(); + if (sss > 0) + { + returnMsg.code = 2; + returnMsg.error = "璇ヤ笓瀹惰鐩存帴鑱旂郴鏀块噰鍜ㄨ"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + } + if (!string.IsNullOrEmpty(search.Names)) + { + var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.Names.Contains(x.BaimingdanName)).Count(); + if (sss > 0) + { + returnMsg.code = 11; + returnMsg.error = "璇ヤ緵搴斿晢璇风洿鎺ヨ仈绯绘斂閲囧挩璇�"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + } + if (!string.IsNullOrEmpty(search.NamesToubiao)) + { + var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.NamesToubiao.Contains(x.BaimingdanName)).Count(); + if (sss > 0) + { + returnMsg.code = 11; + returnMsg.error = "璇ヤ緵搴斿晢璇风洿鎺ヨ仈绯绘斂閲囧挩璇�"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + } + if (!string.IsNullOrEmpty(search.Reasonname)) + { + var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.Reasonname.Contains(x.BaimingdanName)).Count(); + if (sss > 0) + { + returnMsg.code = 11; + returnMsg.error = "璇ヤ緵搴斿晢璇风洿鎺ヨ仈绯绘斂閲囧挩璇�"; + returnMsg.count = 0; + return new JsonResult(returnMsg); + } + } + + + try + { + + //search.page = 1; + //search.rows = 1; + ResultDataEntity<ProjectDTO> resultDataEntity = _projectService.SearchByPaging(search); + + returnMsg.code = 1; + returnMsg.count = search.totalrows; + returnMsg.returnObj = resultDataEntity.DataList; + + } + catch (Exception ex) + { + returnMsg.code = 2; + returnMsg.error = "娌℃湁鑾峰彇鍒皌oken"; + returnMsg.count = 0; + + } + return new JsonResult(returnMsg); + } } } diff --git a/zhengcaioa/zhengcaioa/Controllers/settings/SysBaimingdanController.cs b/zhengcaioa/zhengcaioa/Controllers/settings/SysBaimingdanController.cs new file mode 100644 index 0000000..9a8c462 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Controllers/settings/SysBaimingdanController.cs @@ -0,0 +1,151 @@ +锘縰sing 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 zhengcaioa.Models; + +namespace zhengcaioa.Controllers.settings +{ + [CheckLogin] + public class SysBaimingdanController : Controller + { + private readonly ILogger<SysBaimingdanController> _logger; + private readonly ISysBaimingdanService _SysBaimingdanService; + private readonly ILiaotianService _liaotianService; + + + public SysBaimingdanController(ILogger<SysBaimingdanController> logger, ISysBaimingdanService SysBaimingdanService, ILiaotianService liaotianService) + { + _logger = logger; + _liaotianService = liaotianService; + _SysBaimingdanService = SysBaimingdanService; + } + + + public IActionResult Index() + { + 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); + ActionEntity actionEntity1 = new ActionEntity(); + actionEntity1.OpenType = 0; + actionEntity1.ActionUrl = ""; + actionEntity1.ActionFun = "Add"; + actionEntity1.PageIco = "fa fa-plus"; + actionEntity1.ActionName = "鏂板"; + actionlist.Add(actionEntity1); + ViewData["ActionInfo"] = actionlist; + ViewBag.PostType = _liaotianService.GetSYScode("sys_baimingdan", "post_type").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + return View(); + } + + + public string GetList(SysBaimingdanDTOSearch search) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); + return JsonConvert.SerializeObject(_SysBaimingdanService.SearchByPaging(search)); + } + + #region 缂栬緫 + + public ActionResult Edit() + { + + 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 = "Save"; + actionEntity.PageIco = "glyphicon glyphicon-ok"; + actionEntity.ActionName = "淇濆瓨"; + actionlist.Add(actionEntity); + ActionEntity actionEntity1 = new ActionEntity(); + actionEntity1.OpenType = 0; + actionEntity1.ActionUrl = ""; + actionEntity1.ActionFun = "Nullify"; + actionEntity1.PageIco = "fa fa-remove"; + actionEntity1.ActionName = "鍒犻櫎"; + actionlist.Add(actionEntity1); + ViewData["ActionInfo"] = actionlist; + ViewBag.PostType = _liaotianService.GetSYScode("sys_baimingdan", "post_type").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); + return View(); + } + + + + + + + + public string Get(string id = null) + { + SysBaimingdanDTO SysBaimingdanDTO = new SysBaimingdanDTO(); + if (!String.IsNullOrEmpty(id)) + { + SysBaimingdanDTO = _SysBaimingdanService.Get(id); + } + + // ViewData.Model = PltUserDTO; + return JsonConvert.SerializeObject(SysBaimingdanDTO); + } + + + /// <summary> + /// 淇濆瓨 + /// </summary> + /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param> + /// <returns></returns> + [HttpPost] + + public string Save(SysBaimingdanDTO data) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + data.RecStatus = "A"; + if (String.IsNullOrEmpty(data.Id)) + { + data.Creater = curentuser.Id; + data.Createtime = DateTime.Now; + } + data.Modifier = curentuser.Id; + data.Modifytime = DateTime.Now; + + ResultEntity resultEntity = _SysBaimingdanService.save(data); + + return JsonConvert.SerializeObject(resultEntity); + } + #endregion + + /// <summary> + /// 鍒犻櫎涓讳俊鎭� + /// </summary> + /// <param name="info">瀹炰綋</param> + /// <returns></returns> + /// + + public string Nullify(string Id = "") + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ViewData["curentuser"] = curentuser; + return JsonConvert.SerializeObject(_SysBaimingdanService.ModifyStatus(Id, curentuser.Id)); + } + + } +} diff --git a/zhengcaioa/zhengcaioa/Startup.cs b/zhengcaioa/zhengcaioa/Startup.cs index 5ead34a..3d56be9 100644 --- a/zhengcaioa/zhengcaioa/Startup.cs +++ b/zhengcaioa/zhengcaioa/Startup.cs @@ -144,6 +144,7 @@ services.AddScoped(typeof(IOrderBanciDtlService), typeof(OrderBanciDtlService)); services.AddScoped(typeof(IOrderBanciService), typeof(OrderBanciService)); services.AddScoped(typeof(IOrderBanciOrderService), typeof(OrderBanciOrderService)); + services.AddScoped(typeof(ISysBaimingdanService), typeof(SysBaimingdanService)); services.AddScoped(typeof(IAskService), typeof(AskService)); diff --git a/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs b/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs index a42d904..0b029b5 100644 --- a/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs +++ b/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs @@ -448,6 +448,10 @@ endttime = dateBiJiaoDTOs[i].EndTime; } } + if (endttime>= StratTimeWorkingEnd) + { + break; + } } if (kuanggong) { @@ -564,6 +568,10 @@ { endttime = dateBiJiaoDTOs[i].EndTime; } + } + if (endttime >= StratTimeOffworkEnd) + { + break; } } if (kuanggong) @@ -3525,32 +3533,53 @@ decimal yingnashuie3 = 0; decimal yingnashuie4 = 0; decimal yingnashuie5 = 0; - if (yingnashuie > 39250) + decimal yingnashuie6 = 0; + decimal yingnashuie7 = 0; + if (yingnashuie > 80000) { - yingnashuie1 = 4750; - yingnashuie2 = (9250 - 4750); - yingnashuie3 = (25250 - 9250); - yingnashuie4 = (39250 - 25250); - yingnashuie5 = (yingnashuie - 39250); + yingnashuie1 = 3000; + yingnashuie2 = (12000 - 3000); + yingnashuie3 = (25000 - 12000); + yingnashuie4 = (35000 - 25000); + yingnashuie5 = (55000 - 35000); + yingnashuie6 = (80000 - 55000); + yingnashuie7 = (yingnashuie - 55000); } - else if (yingnashuie > 25250) + if (yingnashuie > 55000) { - yingnashuie1 = 4750; - yingnashuie2 = (9250 - 4750); - yingnashuie3 = (25250 - 9250); - yingnashuie4 = (yingnashuie - 25250); + yingnashuie1 = 3000; + yingnashuie2 = (12000 - 3000); + yingnashuie3 = (25000 - 12000); + yingnashuie4 = (35000 - 25000); + yingnashuie5 = (55000 - 35000); + yingnashuie6 = (yingnashuie - 55000); + } + if (yingnashuie > 35000) + { + yingnashuie1 = 3000; + yingnashuie2 = (12000 - 3000); + yingnashuie3 = (25000 - 12000); + yingnashuie4 = (35000 - 25000); + yingnashuie5 = (yingnashuie - 35000); + } + else if (yingnashuie > 25000) + { + yingnashuie1 = 3000; + yingnashuie2 = (12000 - 3000); + yingnashuie3 = (25000 - 12000); + yingnashuie4 = (yingnashuie - 25000); } - else if (yingnashuie > 9250) + else if (yingnashuie > 12000) { - yingnashuie1 = 4750; - yingnashuie2 = (9250 - 4750); - yingnashuie3 = (yingnashuie - 9250); + yingnashuie1 = 3000; + yingnashuie2 = (12000 - 3000); + yingnashuie3 = (yingnashuie - 12000); } - else if (yingnashuie > 4750) + else if (yingnashuie > 3000) { - yingnashuie1 = 4750; - yingnashuie2 = (yingnashuie - 4750); + yingnashuie1 = 3000; + yingnashuie2 = (yingnashuie - 3000); } else { @@ -3558,7 +3587,7 @@ } if (yingnashuie1 > 0) { - var yingjiao1 = Math.Round(yingnashuie1 * new decimal(0.05) - 0, 2); + var yingjiao1 = Math.Round(yingnashuie1 * new decimal(0.03) - 0, 2); if (yingjiao1 > 0) { hrSalaryDTO.Geshui += yingjiao1; @@ -3567,7 +3596,7 @@ } if (yingnashuie2 > 0) { - var yingjiao2 = Math.Round(yingnashuie2 * new decimal(0.1) - 250, 2); + var yingjiao2 = Math.Round(yingnashuie2 * new decimal(0.1) - 0, 2); if (yingjiao2 > 0) { hrSalaryDTO.Geshui += yingjiao2; @@ -3575,7 +3604,7 @@ } if (yingnashuie3 > 0) { - var yingjiao3 = Math.Round(yingnashuie3 * new decimal(0.2) - 1250, 2); + var yingjiao3 = Math.Round(yingnashuie3 * new decimal(0.2) - 0, 2); if (yingjiao3 > 0) { hrSalaryDTO.Geshui += yingjiao3; @@ -3583,7 +3612,7 @@ } if (yingnashuie4 > 0) { - var yingjiao4 = Math.Round(yingnashuie4 * new decimal(0.3) - 4250, 2); + var yingjiao4 = Math.Round(yingnashuie4 * new decimal(0.25) - 0, 2); if (yingjiao4 > 0) { hrSalaryDTO.Geshui += yingjiao4; @@ -3591,14 +3620,28 @@ } if (yingnashuie5 > 0) { - var yingjiao5 = Math.Round(yingnashuie5 * new decimal(0.35) - 6750, 2); + var yingjiao5 = Math.Round(yingnashuie5 * new decimal(0.30) - 0, 2); if (yingjiao5 > 0) { hrSalaryDTO.Geshui += yingjiao5; } } - - + if (yingnashuie6 > 0) + { + var yingjiao6 = Math.Round(yingnashuie6 * new decimal(0.35) - 0, 2); + if (yingjiao6 > 0) + { + hrSalaryDTO.Geshui += yingjiao6; + } + } + if (yingnashuie7 > 0) + { + var yingjiao7 = Math.Round(yingnashuie7 * new decimal(0.45) - 0, 2); + if (yingjiao7 > 0) + { + hrSalaryDTO.Geshui += yingjiao7; + } + } } decimal geshui = hrSalaryDTO.Geshui.HasValue ? hrSalaryDTO.Geshui.Value : 0; @@ -3618,11 +3661,56 @@ hrSalaryDTO.Yufagongziheji = hrSalaryDTOlast.Yufagongziheji; } - hrSalaryDTO.Yufagongziheji += (hrSalaryDTO.Yufagongzi - hrSalaryDTO.Daozhanggongzi ); - if (hrSalaryDTO.Daozhanggongzi < hrSalaryDTO.Yufagongzi) + if (hrSalaryDTO.Yufagongziheji > 0) { - hrSalaryDTO.Daozhanggongzi = hrSalaryDTO.Yufagongzi; + if (hrSalaryDTO.Daozhanggongzi < hrSalaryDTO.Yufagongzi) + { + hrSalaryDTO.Yufagongziheji += (hrSalaryDTO.Yufagongzi - hrSalaryDTO.Daozhanggongzi); + hrSalaryDTO.Daozhanggongzi = hrSalaryDTO.Yufagongzi; + } + else if (hrSalaryDTO.Daozhanggongzi > hrSalaryDTO.Yufagongzi) + { + if(hrSalaryDTO.Yufagongziheji>= (hrSalaryDTO.Daozhanggongzi - hrSalaryDTO.Yufagongzi)) + { + hrSalaryDTO.Yufagongziheji += (hrSalaryDTO.Yufagongzi - hrSalaryDTO.Daozhanggongzi); + hrSalaryDTO.Daozhanggongzi = hrSalaryDTO.Yufagongzi; + } + else + { + hrSalaryDTO.Daozhanggongzi -= hrSalaryDTO.Yufagongziheji; + hrSalaryDTO.Yufagongziheji = 0; + } + + + } + } + else if (hrSalaryDTO.Yufagongziheji == 0) + { + hrSalaryDTO.Yufagongziheji += (hrSalaryDTO.Yufagongzi - hrSalaryDTO.Daozhanggongzi); + if (hrSalaryDTO.Daozhanggongzi < hrSalaryDTO.Yufagongzi) + { + hrSalaryDTO.Daozhanggongzi = hrSalaryDTO.Yufagongzi; + } + } + else if (hrSalaryDTO.Yufagongziheji < 0) + { + if (hrSalaryDTO.Daozhanggongzi < hrSalaryDTO.Yufagongzi) + { + if (-hrSalaryDTO.Yufagongziheji >= (hrSalaryDTO.Yufagongzi - hrSalaryDTO.Daozhanggongzi)) + { + hrSalaryDTO.Yufagongziheji += (hrSalaryDTO.Yufagongzi - hrSalaryDTO.Daozhanggongzi); + hrSalaryDTO.Daozhanggongzi = hrSalaryDTO.Yufagongzi; + } + else + { + hrSalaryDTO.Daozhanggongzi += hrSalaryDTO.Yufagongziheji; + hrSalaryDTO.Yufagongziheji = 0; + } + } + + } + } hrSalaryDTO.RecStatus = "A"; hrSalaryDTO.Islock = "D"; diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Employee.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Employee.cshtml index c1d9ded..5680d1e 100644 --- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Employee.cshtml +++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Employee.cshtml @@ -55,13 +55,13 @@ dataCol = [ { label: '搴忓彿', name: 'Id', labtype: 'txt', hidden: true }, { label: '搴忓彿', name: 'Islock', labtype: 'txt', hidden: true }, - { label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false, width: 100}, + { label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false, width: 80}, { - label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 100, + label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 60, }, - { label: '宸ヨ祫鏈堜唤', name: 'YearMonth', labtype: 'txt', hidden: false, width: 100 }, + { label: '宸ヨ祫鏈堜唤', name: 'YearMonth', labtype: 'txt', hidden: false, width: 80 }, { - label: '鐘舵��', name: 'IslockChs', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { + 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 { @@ -69,32 +69,32 @@ } } }, - { 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: 'Dianhuabutie', 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: '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: 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: '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: 100 }, - { label: '棰勫彂宸ヨ祫', name: 'Yufagongzi', labtype: 'txt', hidden: false, width: 100 }, - { label: '棰勫彂宸ヨ祫鍚堣', name: 'Yufagongziheji', labtype: 'txt', hidden: false, width: 100 }, + { 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(); @@ -128,7 +128,7 @@ var date = new Date(); var seperator1 = "-"; var year = date.getFullYear(); - var month = date.getMonth() + 1; + var month = date.getMonth(); var strDate = date.getDate(); if (month >= 1 && month <= 9) { month = "0" + month; diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml index a1916d3..395c424 100644 --- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml +++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Index.cshtml @@ -16,18 +16,18 @@ shrinkToFit = false; footerrow = false; - dataCol = [ + dataCol = [ { label: '搴忓彿', name: 'Id', labtype: 'txt', hidden: true }, - { label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false, width: 100}, + { label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false, width: 80}, { - label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 100, + label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 60, formatter: function (cellvalue, options, rowObject) { return "<a onclick=\"OpenWindow('宸ヨ祫鏍稿噯','60%','55%', '/SalaryCheck/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; } - }, - { label: '宸ヨ祫鏈堜唤', name: 'YearMonth', labtype: 'txt', hidden: false, width: 100 }, + }, + { label: '宸ヨ祫鏈堜唤', name: 'YearMonth', labtype: 'txt', hidden: false, width: 80 }, { - label: '鐘舵��', name: 'IslockChs', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { + label: '鐘舵��', name: 'IslockChs', labtype: 'txt', hidden: false, width: 60, formatter: function (cellvalue, options, rowObject) { switch (rowObject.Islock) { case 'S': return '<b style="color: red">' + cellvalue + '</b>'; @@ -45,54 +45,81 @@ //} } }, - { 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: '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: 'DianhuabutieChs', 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: 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: '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: 100 }, - { label: '棰勫彂宸ヨ祫', name: 'Yufagongzi', labtype: 'txt', hidden: false, width: 100 }, - { label: '棰勫彂宸ヨ祫鍚堣', name: 'Yufagongziheji', labtype: 'txt', hidden: false, width: 100 }, + { 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/GetList"; + dataUrl = "/SalaryCheck/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: '/SalaryCheck/GetList', postData: jsons, page: 1 + // }); //閲嶆柊杞藉叆 + // var jsons = GetSearchEnd(); + // if (jsons == false) { + // msg.info("璇峰綍鍏ユ煡璇㈡潯浠�"); + // return false; + // } + // LoadGrid(jsons); + //} $(function () { - + $("#PBSYearMonth").val(getNowFormatDate()); $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ 'overflow-x': 'scroll' }); - + jQuery("#jqGrid").jqGrid('setGroupHeaders', { - useColSpanStyle: true, + useColSpanStyle: true, groupHeaders: [ { startColumnName: 'Jibengongzi', numberOfColumns: 12, titleText: '搴斿彂宸ヨ祫' }, { startColumnName: 'Shebaokou', numberOfColumns: 8, titleText: '搴旀墸宸ヨ祫' } ] - }); - + }); + }); + 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 _pageEdit = function () { var id = jQuery("#jqGrid").jqGrid('getGridParam', 'selrow'); if (id) { diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndex.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndex.cshtml index 5bf09e8..d629a2d 100644 --- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndex.cshtml +++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndex.cshtml @@ -26,39 +26,39 @@ dataCol = [ { label: '搴忓彿', name: 'Id', labtype: 'txt', hidden: true }, - { label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false, width: 100}, + { label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false, width: 80}, { - label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 100, + label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false, width: 60, }, - { 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: 'YearMonth', labtype: 'txt', hidden: false, width: 80 }, + { 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: 'DianhuabutieChs', 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: 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: '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: 100 }, - { label: '棰勫彂宸ヨ祫', name: 'Yufagongzi', labtype: 'txt', hidden: false, width: 100 }, - { label: '棰勫彂宸ヨ祫鍚堣', name: 'Yufagongziheji', labtype: 'txt', hidden: false, width: 100 }, + { 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 }, { - label: '鐘舵��', name: 'IslockChs', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) { + 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 { @@ -67,7 +67,7 @@ } }, ]; - dataUrl = "/SalaryCheck/GetSearchList"; + dataUrl = "/SalaryCheck/GetSearchList?searchDatestart222=@ViewBag.stime&searchDateend222=@ViewBag.etime"; searchCol = [ { label: '鏃堕棿', name: 'searchDatestart', labtype: 'monthdate', hidden: false, cwidth: '5%', cccwidth: '8%' }, { label: '鍒�', name: 'searchDateend', labtype: 'monthdate', hidden: false, cwidth: '2%', cccwidth: '8%' }, @@ -76,12 +76,23 @@ { label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false }, ]; + var _pageSearch = function () { + $("#jqGrid").jqGrid('setGridParam', { + url: '/SalaryCheck/GetSearchList', postData: jsons, page: 1 + }); //閲嶆柊杞藉叆 + var jsons = GetSearchEnd(); + if (jsons == false) { + msg.info("璇峰綍鍏ユ煡璇㈡潯浠�"); + return false; + } + LoadGrid(jsons); + } + $(function () { $("#PBSsearchDatestart").val('@ViewBag.stime'); $("#PBSsearchDateend").val('@ViewBag.etime'); - $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ 'overflow-x': 'scroll' }); jQuery("#jqGrid").jqGrid('setGroupHeaders', { diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml index 0040481..2331c57 100644 --- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml +++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml @@ -69,7 +69,7 @@ } }, ]; - dataUrl = "/SalaryCheck/GetSearchListRenshi?UserId=" + UserId; + dataUrl = "/SalaryCheck/GetSearchListRenshi?UserId=" + UserId+"searchDatestart222=@ViewBag.stime&searchDateend222=@ViewBag.etime"; searchCol = [ { label: '鏃堕棿', name: 'searchDatestart', labtype: 'monthdate', hidden: false, cwidth: '5%', cccwidth: '8%' }, { label: '鍒�', name: 'searchDateend', labtype: 'monthdate', hidden: false, cwidth: '2%', cccwidth: '8%' }, @@ -77,7 +77,17 @@ //{ label: '濮撳悕', name: 'UserName', labtype: 'txt', hidden: false }, //{ label: '宸ュ彿', name: 'Usernumber', labtype: 'txt', hidden: false }, ]; - + var _pageSearch = function () { + $("#jqGrid").jqGrid('setGridParam', { + url: '/SalaryCheck/GetSearchListRenshi', postData: jsons, page: 1 + }); //閲嶆柊杞藉叆 + var jsons = GetSearchEnd(); + if (jsons == false) { + msg.info("璇峰綍鍏ユ煡璇㈡潯浠�"); + return false; + } + LoadGrid(jsons); + } $(function () { $("#PBSsearchDatestart").val('@ViewBag.stime'); diff --git a/zhengcaioa/zhengcaioa/Views/SysBaimingdan/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/SysBaimingdan/Edit.cshtml new file mode 100644 index 0000000..360a824 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/SysBaimingdan/Edit.cshtml @@ -0,0 +1,40 @@ +锘� +@{ + + ViewBag.Title = "SysBaimingdan"; + Layout = "~/Views/Shared/_Layout_DataEdit.cshtml"; +} +@section headerStyle{ + <script language="javascript" type="text/javascript"> + var PostType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.PostType))'; + controllist = [ + { label: '瑙掕壊淇℃伅', name: 'data', labtype: 'panel',islist:'false', data: [ + + {label:' 鐢ㄦ埛id ', name: 'Id', labtype: 'txt', addvisible: false, editvisible: false ,reg:''} + , { label: ' 鐧藉悕鍗曞悕绉� ', name: 'BaimingdanName', labtype: 'txt', addvisible: true, editvisible: true , reg:'',ismust:true } + , { label: ' 鐧藉悕鍗曠粍 ', name: 'PostType', labtype: 'combox', addvisible: true, editvisible: true, reg: '', ismust: true, data: JSON.parse(PostType)} + + , { label: ' 鐘舵�� ', name: 'RecStatus', labtype: 'txt', disabled:false, addvisible: false, editvisible: false ,reg:''} + + + ]} + + ]; + + + + saveurl = '/SysBaimingdan/Save'; + editurl = '/SysBaimingdan/Get/'; + nullifyurl = "/SysBaimingdan/Nullify/";//搴熷純鍙栨秷鍗曟嵁鏃剁殑url 杩斿洖json鏁版嵁 + deldtlurl = "/SysBaimingdan/NullifyDtl/";//鍒犻櫎鍗曟嵁鏄庣粏鏃舵椂閰嶇疆鐨剈rl 杩斿洖json鏁版嵁 + comments="瑙掕壊淇℃伅"; + + </script> +} + + +@section footerScripts{ + <script language="javascript" type="text/javascript"> + + </script> +} diff --git a/zhengcaioa/zhengcaioa/Views/SysBaimingdan/Index.cshtml b/zhengcaioa/zhengcaioa/Views/SysBaimingdan/Index.cshtml new file mode 100644 index 0000000..0091347 --- /dev/null +++ b/zhengcaioa/zhengcaioa/Views/SysBaimingdan/Index.cshtml @@ -0,0 +1,56 @@ +锘緻{ + ViewBag.Title = "SysBaimingdan"; + Layout = "~/Views/Shared/_Layout_Search.cshtml"; +} +@section headerStyle{ + <script type="text/javascript"> + var PostType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.PostType))'; + dataCol = [ + { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, + { + label: '鐧藉悕鍗曞悕绉�', name: 'BaimingdanName', labtype: 'txt', hidden: false, + formatter: function (cellvalue, options, rowObject) { + return "<a onclick=\"OpenWindow('" + cellvalue + "','98%','100%', '/SysBaimingdan/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>"; + } + }, + { + label: '鐧藉悕鍗曠粍', name: 'PostTypeName', labtype: 'txt', hidden: false + + }, + + { label: '鍒涘缓浜�', name: 'Creater', labtype: 'txt', hidden: true }, + { label: '鍒涘缓鏃堕棿', name: 'Createtime', labtype: 'txt', hidden: true }, + { label: '淇敼浜�', name: 'Modifier', labtype: 'txt', hidden: true }, + { label: '淇敼鏃堕棿', name: 'Modifytime', labtype: 'txt', hidden: true } + ]; + dataUrl = "/SysBaimingdan/GetList"; + searchCol = [ + { label: '鐧藉悕鍗曞悕绉�', name: 'BaimingdanName', labtype: 'txt', hidden: false }, + { label: '鐧藉悕鍗曠粍', name: 'PostType', labtype: 'combox', hidden: false, data: JSON.parse(PostType), cwidth: '5%', cccwidth: '8%' }, + + + ]; + var _pageAdd = function () { + OpenWindow("鏂板鐧藉悕鍗�", "98%", "90%", "/SysBaimingdan/Edit/"); + } + + var _afterSave = function (result) { + if (result) { + toastr.success("淇濆瓨鎴愬姛"); + } else { + toastr.error("淇濆瓨澶辫触"); + } + } + + var _afterDel = function (result) { + if (result) { + toastr.success("鍒犻櫎鎴愬姛"); + } else { + /**/ + toastr.error("鍒犻櫎鎴愬姛"); + /**/ + } +} + </script> +} + -- Gitblit v1.9.1