| | |
| | | CreateMap<AdmAskJiaojieDtl, AdmAskJiaojieDtlDTO>(); |
| | | CreateMap<AdmAskJiaojieDtlDTO, AdmAskJiaojieDtl>(); |
| | | |
| | | CreateMap<SysBaimingdan, SysBaimingdanDTO>(); |
| | | CreateMap<SysBaimingdanDTO, SysBaimingdan>(); |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | 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)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | | |
| | |
| | | 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; } |
| | | } |
| | | } |
| | |
| | | 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; } |
| | |
| | | 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; } |
| | |
| | | |
| | | public string Baojiachaxiaoyu { get; set; } |
| | | |
| | | |
| | | public string Chuanbiaofenxi { get; set; } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using 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; } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using 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(); |
| | | } |
| | | } |
New file |
| | |
| | | using 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; } |
| | | } |
| | | } |
| | |
| | | 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; } |
| | |
| | | .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"); |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | 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)) |
| | |
| | | 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 + "'"); |
| | | |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | using 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; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | if (result == "") |
| | | { |
| | | result = "[]"; |
| | | } |
| | | return result; |
| | | |
| | | } |
| | |
| | | public IActionResult GetList(HrSalaryDTOSearch search) |
| | | { |
| | | //_hrSalaryService.AutoCheck(); |
| | | if (!string.IsNullOrEmpty(search.YearMonth222)) |
| | | { |
| | | search.YearMonth = search.YearMonth222; |
| | | } |
| | | |
| | | return new JsonResult(_hrSalaryService.SearchSalaryByPaging(search)); |
| | | } |
| | |
| | | { |
| | | dto.Peichang = 0; |
| | | } |
| | | if (!dto.Jiucuo.HasValue) |
| | | if (!dto.Jiucuo.HasValue || dto.Jiucuo.Value == 0) |
| | | { |
| | | dto.Jiucuo = 0; |
| | | } |
| | |
| | | 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(); |
| | | } |
| | |
| | | { |
| | | //自动确认 |
| | | //_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)); |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | /// <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"); |
| | | } |
| | |
| | | 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; |
| | |
| | | _intentionCustomerService = intentionCustomerService; |
| | | _userService = userService; |
| | | _cooperatecustomCustomerService = cooperatecustomCustomerService; |
| | | _sysBaimingdanService = sysBaimingdanService; |
| | | } |
| | | [CheckLogin] |
| | | public IActionResult Index() |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | //获取对手分析 |
| | | 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 = "没有获取到token"; |
| | | returnMsg.count = 0; |
| | | |
| | | } |
| | | return new JsonResult(returnMsg); |
| | | } |
| | | } |
| | | } |
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 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)); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | 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)); |
| | | |
| | |
| | | endttime = dateBiJiaoDTOs[i].EndTime; |
| | | } |
| | | } |
| | | if (endttime>= StratTimeWorkingEnd) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | if (kuanggong) |
| | | { |
| | |
| | | { |
| | | endttime = dateBiJiaoDTOs[i].EndTime; |
| | | } |
| | | } |
| | | if (endttime >= StratTimeOffworkEnd) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | if (kuanggong) |
| | |
| | | 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 |
| | | { |
| | |
| | | } |
| | | 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; |
| | |
| | | } |
| | | 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; |
| | |
| | | } |
| | | 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; |
| | |
| | | } |
| | | 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; |
| | |
| | | } |
| | | 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; |
| | |
| | | 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"; |
| | |
| | | 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 { |
| | |
| | | } |
| | | } |
| | | }, |
| | | { 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(); |
| | |
| | | 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; |
| | |
| | | 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>'; |
| | |
| | | //} |
| | | } |
| | | }, |
| | | { 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) { |
| | |
| | | |
| | | 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 { |
| | |
| | | } |
| | | }, |
| | | ]; |
| | | 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%' }, |
| | |
| | | { 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', { |
| | |
| | | } |
| | | }, |
| | | ]; |
| | | 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%' }, |
| | |
| | | //{ 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'); |
New file |
| | |
| | | |
| | | @{ |
| | | |
| | | 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/";//删除单据明细时时配置的url 返回json数据 |
| | | comments="角色信息"; |
| | | |
| | | </script> |
| | | } |
| | | |
| | | |
| | | @section footerScripts{ |
| | | <script language="javascript" type="text/javascript"> |
| | | |
| | | </script> |
| | | } |
New file |
| | |
| | | @{ |
| | | 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> |
| | | } |
| | | |