zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -242,7 +242,12 @@ CreateMap<AdmAskMarketingCost, AdmAskMarketingCostDTO>(); CreateMap<AdmAskMarketingCostDTO, AdmAskMarketingCost>(); CreateMap<AdmAskYouHui, AdmAskYouHuiDTO>(); CreateMap<AdmAskYouHuiDTO, AdmAskYouHui>(); CreateMap<AdmAskBaiFang, AdmAskBaiFangDTO>(); CreateMap<AdmAskBaiFangDTO, AdmAskBaiFang>(); } } zhengcaioa/DTO/AdmAskBaiFangDTO.cs
New file @@ -0,0 +1,28 @@ using System; using System.Collections.Generic; using System.Text; namespace DTO { public class AdmAskBaiFangDTO { public string Id { get; set; } public string CustomerId { get; set; } public string VisType { get; set; } public string Jtype { get; set; } public DateTime? BaiFangtime { get; set; } public string BaiFangtimeName { get; set; } public string Remark { get; set; } public string ShenpiStatus { 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 string CreaterName { get; set; } public string Tittle { get; set; } public string Content { get; set; } public string Tongguojujue { get; set; } public string Step { get; set; } } } zhengcaioa/DTO/AdmAskYouHuiDTO.cs
New file @@ -0,0 +1,28 @@ using System; using System.Collections.Generic; using System.Text; namespace DTO { public class AdmAskYouHuiDTO { public string Id { get; set; } public string CustomerId { get; set; } public string OrderType { get; set; } public string Youhuistandard { get; set; } public decimal? YouHui { get; set; } public string YouHuiName { get; set; } public string Remark { get; set; } public string ShenpiStatus { 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 string CreaterName { get; set; } public string Tittle { get; set; } public string Content { get; set; } public string Tongguojujue { get; set; } public string Step { get; set; } } } zhengcaioa/IServices/IAskService.cs
@@ -30,5 +30,16 @@ //éå®è´¹ç¨ç³è¯· ResultEntity SaveAskMarketingCost(AdmAskMarketingCostDTO admAsk); AdmAskMarketingCostDTO GetAskMarketingCost(string Id); //伿 ç³è¯· ResultEntity SaveAskYouHui(AdmAskYouHuiDTO admAsk); AdmAskYouHuiDTO GetAskYouHui(string Id); List<AdmAskYouHuiDTO> GetAskYouHuiList(string CustomerId, string OrderType); //访é®è¯·ç¤º ResultEntity SaveAskBaiFang(AdmAskBaiFangDTO admAsk); AdmAskBaiFangDTO GetAskBaiFang(string Id); } } zhengcaioa/IServices/IWfRunProcessService.cs
@@ -38,5 +38,9 @@ ResultEntity WfAskOther(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version); ResultEntity WfAskPunishAppeal(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version); ResultEntity WfAskYouHui(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version); ResultEntity WfAskBaiFang(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version); } } zhengcaioa/Model/AdmAskBaiFang.cs
New file @@ -0,0 +1,25 @@ using System; using System.Collections.Generic; #nullable disable namespace zhengcaioa.Models { public partial class AdmAskBaiFang { public string Id { get; set; } public string CustomerId { get; set; } public string VisType { get; set; } public string Jtype { get; set; } public DateTime? BaiFangtime { get; set; } public string Remark { get; set; } public string ShenpiStatus { 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 string CreaterName { get; set; } public string Tittle { get; set; } } } zhengcaioa/Model/AdmAskYouHui.cs
New file @@ -0,0 +1,25 @@ using System; using System.Collections.Generic; #nullable disable namespace zhengcaioa.Models { public partial class AdmAskYouHui { public string Id { get; set; } public string CustomerId { get; set; } public string OrderType { get; set; } public string Youhuistandard { get; set; } public decimal? YouHui { get; set; } public string Remark { get; set; } public string ShenpiStatus { 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 string CreaterName { get; set; } public string Tittle { get; set; } } } zhengcaioa/Model/zhengcaioaContext.cs
@@ -24,6 +24,7 @@ public virtual DbSet<HrSalaryAppeal> HrSalaryAppeal { get; set; } public virtual DbSet<SimCostYearView> SimCostYearView { get; set; } public virtual DbSet<AdmAskBaiFang> AdmAskBaiFangs { get; set; } public virtual DbSet<AdmAskCar> AdmAskCars { get; set; } public virtual DbSet<AdmAskcost> AdmAskcosts { get; set; } public virtual DbSet<AdmAskGood> AdmAskGoods { get; set; } @@ -31,6 +32,7 @@ public virtual DbSet<AdmAskLeaveOff> AdmAskLeaveOffs { get; set; } public virtual DbSet<AdmAskMarketingCost> AdmAskMarketingCosts { get; set; } public virtual DbSet<AdmAskovertime> AdmAskovertimes { get; set; } public virtual DbSet<AdmAskYouHui> AdmAskYouHuis { get; set; } public virtual DbSet<AdmAttendance> AdmAttendances { get; set; } public virtual DbSet<AdmAttendanceDtl> AdmAttendanceDtls { get; set; } public virtual DbSet<AdmAttendanceRule> AdmAttendanceRules { get; set; } @@ -122,6 +124,64 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.HasAnnotation("Relational:Collation", "Chinese_PRC_CI_AS"); modelBuilder.Entity<AdmAskBaiFang>(entity => { entity.ToTable("ADM_AskBaiFang"); entity.Property(e => e.Id).HasMaxLength(50); entity.Property(e => e.BaiFangtime).HasColumnType("datetime"); entity.Property(e => e.Creater) .IsRequired() .HasMaxLength(50) .HasColumnName("creater") .HasDefaultValueSql("('1')"); entity.Property(e => e.CreaterName) .HasMaxLength(50) .HasColumnName("createrName"); entity.Property(e => e.Createtime) .HasColumnType("datetime") .HasColumnName("createtime") .HasDefaultValueSql("(getdate())"); entity.Property(e => e.CustomerId).HasMaxLength(500); entity.Property(e => e.Jtype).HasMaxLength(50); 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.RecStatus) .IsRequired() .HasMaxLength(1) .HasColumnName("rec_status") .HasDefaultValueSql("('A')"); entity.Property(e => e.Remark).HasMaxLength(500); entity.Property(e => e.ShenpiStatus) .HasMaxLength(1) .HasColumnName("shenpi_status") .HasDefaultValueSql("('D')"); entity.Property(e => e.Tittle) .HasMaxLength(50) .HasColumnName("tittle"); entity.Property(e => e.VisType).HasMaxLength(50); }); modelBuilder.Entity<AdmAskCar>(entity => { @@ -482,6 +542,66 @@ .HasColumnName("tittle"); }); modelBuilder.Entity<AdmAskYouHui>(entity => { entity.ToTable("ADM_AskYouHui"); entity.Property(e => e.Id).HasMaxLength(50); entity.Property(e => e.Creater) .IsRequired() .HasMaxLength(50) .HasColumnName("creater") .HasDefaultValueSql("('1')"); entity.Property(e => e.CreaterName) .HasMaxLength(50) .HasColumnName("createrName"); entity.Property(e => e.Createtime) .HasColumnType("datetime") .HasColumnName("createtime") .HasDefaultValueSql("(getdate())"); entity.Property(e => e.CustomerId).HasMaxLength(50); 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.OrderType).HasMaxLength(50); entity.Property(e => e.RecStatus) .IsRequired() .HasMaxLength(1) .HasColumnName("rec_status") .HasDefaultValueSql("('A')"); entity.Property(e => e.Remark).HasMaxLength(500); entity.Property(e => e.ShenpiStatus) .HasMaxLength(1) .HasColumnName("shenpi_status") .HasDefaultValueSql("('D')"); entity.Property(e => e.Tittle) .HasMaxLength(50) .HasColumnName("tittle"); entity.Property(e => e.YouHui) .HasColumnType("money") .HasDefaultValueSql("((0))"); entity.Property(e => e.Youhuistandard).HasMaxLength(50); }); modelBuilder.Entity<AdmAskMarketingCost>(entity => { entity.ToTable("ADM_AskMarketingCost"); zhengcaioa/Services/AskService.cs
@@ -319,5 +319,136 @@ } #endregion #region 伿 ç³è¯· public ResultEntity SaveAskYouHui(AdmAskYouHuiDTO admAsk) { ResultEntity resultEntity = new ResultEntity(); try { AdmAskYouHui ask = _mapper.Map<AdmAskYouHui>(admAsk); if (string.IsNullOrEmpty(admAsk.Id)) { ask.Id = Guid.NewGuid().ToString(); admAsk.Id = ask.Id; _context.AdmAskYouHuis.Add(ask); } else { var entity = _context.AdmAskYouHuis.Find(admAsk.Id); entity.CustomerId = admAsk.CustomerId; entity.OrderType = admAsk.OrderType; entity.Youhuistandard = admAsk.Youhuistandard; entity.YouHui = admAsk.YouHui; entity.Remark = admAsk.Remark; entity.ShenpiStatus = admAsk.ShenpiStatus; entity.CreaterName = admAsk.CreaterName; entity.Tittle = admAsk.Tittle; entity.Modifier = admAsk.Modifier; entity.Modifytime = DateTime.Now; } _context.SaveChanges(); resultEntity.ReturnID = ask.Id; resultEntity.Result = true; } catch (Exception ex) { resultEntity.Result = false; resultEntity.Message = "ä¿å失败ï¼è¯·è系管çå"; ex.Message.ToString(); } return resultEntity; } public AdmAskYouHuiDTO GetAskYouHui(string Id) { var entity = _context.AdmAskYouHuis.Where(e => e.RecStatus == "A" && e.Id == Id).FirstOrDefault(); if (entity == null) { entity = new AdmAskYouHui(); } var leaveDTO = _mapper.Map<AdmAskYouHuiDTO>(entity); return leaveDTO; } public List<AdmAskYouHuiDTO> GetAskYouHuiList(string CustomerId, string OrderType) { var entity = _context.AdmAskYouHuis.Where(e => e.RecStatus == "A" && e.ShenpiStatus == "A" && e.CustomerId == CustomerId && e.OrderType == OrderType && e.Createtime >= DateTime.Now.Date.AddDays(-8)).OrderByDescending(x=>x.Createtime).ToList(); var leaveDTO = _mapper.Map<List<AdmAskYouHuiDTO>>(entity); return leaveDTO; } #endregion #region 访é®è¯·ç¤º public ResultEntity SaveAskBaiFang(AdmAskBaiFangDTO admAsk) { ResultEntity resultEntity = new ResultEntity(); try { AdmAskBaiFang ask = _mapper.Map<AdmAskBaiFang>(admAsk); if (string.IsNullOrEmpty(admAsk.Id)) { ask.Id = Guid.NewGuid().ToString(); admAsk.Id = ask.Id; _context.AdmAskBaiFangs.Add(ask); } else { var entity = _context.AdmAskBaiFangs.Find(admAsk.Id); entity.CustomerId = admAsk.CustomerId; entity.VisType = admAsk.VisType; entity.Jtype = admAsk.Jtype; entity.BaiFangtime = admAsk.BaiFangtime; entity.Remark = admAsk.Remark; entity.ShenpiStatus = admAsk.ShenpiStatus; entity.CreaterName = admAsk.CreaterName; entity.Tittle = admAsk.Tittle; entity.Modifier = admAsk.Modifier; entity.Modifytime = DateTime.Now; } _context.SaveChanges(); resultEntity.ReturnID = ask.Id; resultEntity.Result = true; } catch (Exception ex) { resultEntity.Result = false; resultEntity.Message = "ä¿å失败ï¼è¯·è系管çå"; ex.Message.ToString(); } return resultEntity; } public AdmAskBaiFangDTO GetAskBaiFang(string Id) { var entity = _context.AdmAskBaiFangs.Where(e => e.RecStatus == "A" && e.Id == Id).FirstOrDefault(); if (entity == null) { entity = new AdmAskBaiFang(); } var leaveDTO = _mapper.Map<AdmAskBaiFangDTO>(entity); return leaveDTO; } #endregion } } zhengcaioa/Services/WfRunProcessService.cs
@@ -5320,5 +5320,703 @@ return result; } public ResultEntity WfAskYouHui(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version) { ResultEntity result = new ResultEntity(); result.Result = true; WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "12").FirstOrDefault(); if (wfRunProcessDTO != null) { version = wfRunProcessDTO.Version; } if (version == "v1") { if (step == "æäº¤") { //æ´æ°æµç¨å®ä¾ // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "12").FirstOrDefault(); if (wfRunProcessDTO == null) { //æå ¥æµç¨å®ä¾ wfRunProcessDTO = new WfRunProcessDTO(); //wfRunProcessDTO.Applyno = wfRunProcessDTO.Applytime = DateTime.Now; wfRunProcessDTO.Applytiye = "12"; wfRunProcessDTO.DanjuId = DanjuId; wfRunProcessDTO.Content = title; wfRunProcessDTO.Step = "æ»ç»ç审æ¹"; wfRunProcessDTO.ShenpiStatus = "D"; wfRunProcessDTO.Version = version; wfRunProcessDTO.RecStatus = "A"; wfRunProcessDTO.Creater = Userid; wfRunProcessDTO.Createtime = DateTime.Now; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; wfRunProcessDTO.Deelurl = "/AdmAsk/AskYouHui?id=" + DanjuId; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "æ»ç»ç").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥å¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æ»ç»ç审æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/AdmAsk/AskYouHui?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } //æå ¥æ°çå·²å WfHistory wfHistoryDTO1 = new WfHistory(); wfHistoryDTO1.Id = Guid.NewGuid().ToString(); wfHistoryDTO1.RunProcessId = wfRunProcessDTO.Id; wfHistoryDTO1.SendUserId = Userid; wfHistoryDTO1.DeelUserId = wfRunProcessDTO.Creater; wfHistoryDTO1.Sendtime = DateTime.Now; wfHistoryDTO1.Resivetime = DateTime.Now; wfHistoryDTO1.Step = "æäº¤"; wfHistoryDTO1.NeeddeelType = "1"; wfHistoryDTO1.ChuliStatus = "2"; wfHistoryDTO1.Deelurl = "/AdmAsk/AskYouHui?id=" + DanjuId; wfHistoryDTO1.Content = ""; wfHistoryDTO1.Sort = 1; wfHistoryDTO1.RecStatus = "A"; wfHistoryDTO1.Creater = Userid; wfHistoryDTO1.Createtime = DateTime.Now; wfHistoryDTO1.Modifier = Userid; wfHistoryDTO1.Modifytime = wfHistoryDTO1.Createtime; _context.WfHistories.Add(wfHistoryDTO1); _context.SaveChanges(); } else { wfRunProcessDTO.Step = "æ»ç»ç审æ¹"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æäº¤"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "æ»ç»ç").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æ»ç»ç审æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/AdmAsk/AskYouHui?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 2; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } } if (step == "æ»ç»ç审æ¹") { //æ´æ°æµç¨å®ä¾ //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "12").FirstOrDefault(); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°æµç¨å®ä¾"; return result; } if (wfRunProcessDTO.Step != "æ»ç»ç审æ¹") { result.Result = false; result.Message = "å½åæ¥éª¤å·²ç»å¤ç"; return result; } if (tongguojujue == "A") { wfRunProcessDTO.Step = "å®ç»"; wfRunProcessDTO.ShenpiStatus = "A"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°åæ® var admAskYouHui = _context.AdmAskYouHuis.Find(DanjuId); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°åæ®"; return result; } admAskYouHui.ShenpiStatus = "A"; _context.SaveChanges(); List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æ»ç»ç审æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { // _wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); } else { wfRunProcessDTO.Step = "æäº¤"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æ»ç»ç审æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "1"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = wfRunProcessDTO.Creater; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æäº¤"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/AdmAsk/AskYouHui?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } } return result; } public ResultEntity WfAskBaiFang(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version) { ResultEntity result = new ResultEntity(); result.Result = true; WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "13").FirstOrDefault(); if (wfRunProcessDTO != null) { version = wfRunProcessDTO.Version; } if (version == "v1") { if (step == "æäº¤") { //æ´æ°æµç¨å®ä¾ // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "13").FirstOrDefault(); if (wfRunProcessDTO == null) { //æå ¥æµç¨å®ä¾ wfRunProcessDTO = new WfRunProcessDTO(); //wfRunProcessDTO.Applyno = wfRunProcessDTO.Applytime = DateTime.Now; wfRunProcessDTO.Applytiye = "13"; wfRunProcessDTO.DanjuId = DanjuId; wfRunProcessDTO.Content = title; wfRunProcessDTO.Step = "æ»ç»ç审æ¹"; wfRunProcessDTO.ShenpiStatus = "D"; wfRunProcessDTO.Version = version; wfRunProcessDTO.RecStatus = "A"; wfRunProcessDTO.Creater = Userid; wfRunProcessDTO.Createtime = DateTime.Now; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; wfRunProcessDTO.Deelurl = "/AdmAsk/AskBaiFang?id=" + DanjuId; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "æ»ç»ç").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥å¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æ»ç»ç审æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/AdmAsk/AskBaiFang?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } //æå ¥æ°çå·²å WfHistory wfHistoryDTO1 = new WfHistory(); wfHistoryDTO1.Id = Guid.NewGuid().ToString(); wfHistoryDTO1.RunProcessId = wfRunProcessDTO.Id; wfHistoryDTO1.SendUserId = Userid; wfHistoryDTO1.DeelUserId = wfRunProcessDTO.Creater; wfHistoryDTO1.Sendtime = DateTime.Now; wfHistoryDTO1.Resivetime = DateTime.Now; wfHistoryDTO1.Step = "æäº¤"; wfHistoryDTO1.NeeddeelType = "1"; wfHistoryDTO1.ChuliStatus = "2"; wfHistoryDTO1.Deelurl = "/AdmAsk/AskBaiFang?id=" + DanjuId; wfHistoryDTO1.Content = ""; wfHistoryDTO1.Sort = 1; wfHistoryDTO1.RecStatus = "A"; wfHistoryDTO1.Creater = Userid; wfHistoryDTO1.Createtime = DateTime.Now; wfHistoryDTO1.Modifier = Userid; wfHistoryDTO1.Modifytime = wfHistoryDTO1.Createtime; _context.WfHistories.Add(wfHistoryDTO1); _context.SaveChanges(); } else { wfRunProcessDTO.Step = "æ»ç»ç审æ¹"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æäº¤"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æ¥è¯¢å¤ç人 var hrPositions = _context.PltRoles.Where(x => x.RecStatus == "A" && x.RoleName == "æ»ç»ç").FirstOrDefault(); if (hrPositions == null) { result.Result = false; result.Message = "æªæ¾å°èä½"; return result; } var pltUsers = (from a in _context.PltUsers.Where(x => x.RecStatus == "A" && x.Zhiwustatus == "A") join b in _context.PltUserRoles.Where(x => x.RecStatus == "A" && x.RoleId == hrPositions.Id) on a.Id equals b.UserId select a ).ToList(); if (pltUsers == null || pltUsers.Count == 0) { result.Result = false; result.Message = "æªæ¾å°å¤ç人"; return result; } foreach (var pltUser in pltUsers) { //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = pltUser.Id; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æ»ç»ç审æ¹"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/AdmAsk/AskBaiFang?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 2; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } } if (step == "æ»ç»ç审æ¹") { //æ´æ°æµç¨å®ä¾ //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "13").FirstOrDefault(); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°æµç¨å®ä¾"; return result; } if (wfRunProcessDTO.Step != "æ»ç»ç审æ¹") { result.Result = false; result.Message = "å½åæ¥éª¤å·²ç»å¤ç"; return result; } if (tongguojujue == "A") { wfRunProcessDTO.Step = "å®ç»"; wfRunProcessDTO.ShenpiStatus = "A"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°åæ® var admAskBaiFang = _context.AdmAskBaiFangs.Find(DanjuId); if (wfRunProcessDTO == null) { result.Result = false; result.Message = "æªæ¾å°åæ®"; return result; } admAskBaiFang.ShenpiStatus = "A"; _context.SaveChanges(); List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æ»ç»ç审æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "2"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { // _wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); } else { wfRunProcessDTO.Step = "æäº¤"; wfRunProcessDTO.Modifier = Userid; wfRunProcessDTO.Modifytime = DateTime.Now; result = this.save(wfRunProcessDTO); if (result.Result == false) { return result; } //æ´æ°å¾ å List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "æ»ç»ç审æ¹"); var wfHistoryDTOs = _mapper.Map<List<WfHistoryDTO>>(wfNeeddeelDTOs); var wfHistoryDTO = wfHistoryDTOs.Where(x => x.DeelUserId == Userid).FirstOrDefault(); if (wfHistoryDTO == null) { result.Result = false; result.Message = "æªæ¾å°ä»£å"; return result; } wfHistoryDTO.Content = Content; wfHistoryDTO.ChuliStatus = "1"; wfHistoryDTO.Modifier = Userid; wfHistoryDTO.Modifytime = DateTime.Now; var wfHistories = _mapper.Map<List<WfHistory>>(wfHistoryDTOs); foreach (var wfHistory in wfHistories) { _context.WfHistories.Add(wfHistory); } var wfNeeddeels = _mapper.Map<List<WfNeeddeel>>(wfNeeddeelDTOs); foreach (var wfNeeddeel in wfNeeddeels) { //_wfNeeddeelService.ModifyStatus(wfNeeddeel.Id, Userid); _context.WfNeeddeels.Remove(wfNeeddeel); } _context.SaveChanges(); //æå ¥æ°çå¾ å WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO(); wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id; wfNeeddeelDTO.SendUserId = Userid; wfNeeddeelDTO.DeelUserId = wfRunProcessDTO.Creater; wfNeeddeelDTO.Sendtime = DateTime.Now; wfNeeddeelDTO.Resivetime = DateTime.Now; wfNeeddeelDTO.Step = "æäº¤"; wfNeeddeelDTO.NeeddeelType = "1"; wfNeeddeelDTO.ChuliStatus = "0"; wfNeeddeelDTO.Deelurl = "/AdmAsk/AskBaiFang?id=" + DanjuId; wfNeeddeelDTO.Content = ""; wfNeeddeelDTO.Sort = 1; wfNeeddeelDTO.RecStatus = "A"; wfNeeddeelDTO.Creater = Userid; wfNeeddeelDTO.Createtime = DateTime.Now; wfNeeddeelDTO.Modifier = Userid; wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime; result = _wfNeeddeelService.save(wfNeeddeelDTO); if (result.Result == false) { return result; } } } } return result; } } } zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
@@ -40,13 +40,15 @@ private readonly IFiMemberService _fiMemberService; private readonly IConfiguration _configuration; private readonly IHttpClientFactory _clientFactory; private readonly IAskService _askService; public CooperOrderController(ILogger<CooperOrderController> logger, ILiaotianService liaotianService, IUserService userService, ICooperOrderService cooperOrderService , ICooperatecustomCustomerService cooperatecustomCustomerService, IProjectService projectService, IPltPageService pltPageService, IFiBookService fiBookService , IFiServiceService fiServiceService, IFiMemberService fiMemberService , IConfiguration configuration , IHttpClientFactory clientFactory) , IHttpClientFactory clientFactory , IAskService askService) { _logger = logger; _liaotianService = liaotianService; @@ -60,6 +62,7 @@ _fiMemberService = fiMemberService; _configuration = configuration; _clientFactory = clientFactory; _askService = askService; } [CheckLogin] @@ -405,12 +408,14 @@ { dto = _cooperOrderService.Get(id); ViewBag.ShouliStatus = ShouliStatus; //ViewBag.YouHuiList = _askService.GetAskYouHuiList(dto.Khdw, dto.OrderType); } else { dto.XdTime = DateTime.Now; dto.OrderNum = 1; ViewBag.ShouliStatus = "1"; //ViewBag.YouHuiList = new List<AdmAskYouHuiDTO>(); } @@ -534,14 +539,49 @@ } data.ShouliStatus = "1"; data.Modifier = curentuser.Id; data.Modifytime = DateTime.Now; resultEntity = _cooperOrderService.save(data); var youHuiDTOs = _askService.GetAskYouHuiList(data.Khdw, data.OrderType).FirstOrDefault(); if (youHuiDTOs != null) { data.Youhuier = youHuiDTOs.Id; if(youHuiDTOs.Youhuistandard == "01") { data.Youhui = youHuiDTOs.YouHui.Value; if(data.Money.Value < data.Youhui.Value) { data.Money = 0; } else { data.Money = data.Money.Value - data.Youhui.Value; } } else if (youHuiDTOs.Youhuistandard == "02") { if (youHuiDTOs.YouHui.Value >= 100) { data.Youhui = data.Money.Value; data.Money = 0; } else { data.Youhui =Math.Round(data.Money.Value * youHuiDTOs.YouHui.Value * new decimal(0.01),2); data.Money = data.Money.Value - data.Youhui.Value; } } } data.ShouliStatus = "1"; data.Modifier = curentuser.Id; data.Modifytime = DateTime.Now; resultEntity = _cooperOrderService.save(data); // scope.Complete(); //} return new JsonResult(resultEntity); } @@ -847,7 +887,7 @@ result = JsonConvert.SerializeObject(shi); } if (OrderType == "08" || OrderType == "10") if (OrderType == "08" || OrderType == "10" || OrderType == "11") { result = "[]"; zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
@@ -27,13 +27,17 @@ private readonly ILiaotianService _liaotianService; private readonly IUserService _userService; private readonly IAdmBreakPrecedentService _aAdmBreakPrecedentService; private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService; private readonly IIntentionCustomerService _intentionCustomerService; public AdmAskController(ILogger<AdmAskController> logger, IAskService askService, IHrDeptService hrDeptService, IWfRunProcessService wfRunProcessService , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService , IAdmGoodsManageService admGoodsManageService , ILiaotianService liaotianService , IUserService userService , IAdmBreakPrecedentService aAdmBreakPrecedentService) , IAdmBreakPrecedentService aAdmBreakPrecedentService , ICooperatecustomCustomerService cooperatecustomCustomerService , IIntentionCustomerService intentionCustomerService) { _logger = logger; _hrDeptService = hrDeptService; @@ -45,6 +49,8 @@ _liaotianService = liaotianService; _userService = userService; _aAdmBreakPrecedentService = aAdmBreakPrecedentService; _cooperatecustomCustomerService = cooperatecustomCustomerService; _intentionCustomerService = intentionCustomerService; } public IActionResult Askcost(string id = "") @@ -966,5 +972,236 @@ } return new JsonResult(resultEntity); } public IActionResult AskYouHui(string id = "") { AdmAskYouHuiDTO dto = new AdmAskYouHuiDTO(); var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); //æµç¨ç¸å ³ string shifoubiaoji = "A"; string sifoudangqian = "A"; string dangqianbuzhou = "æäº¤"; var lishiyijian = new List<WfHistoryDTO>(); if (string.IsNullOrEmpty(id)) { dto.CreaterName = curentuser.UserName; dto.Tittle = "伿 ç³è¯·ï¼" + curentuser.UserName + "ï¼"; } else if (dto != null) { dto = _askService.GetAskYouHui(id); dto.YouHuiName = dto.YouHui.Value.ToString("F2"); var wfRunProcessDTO = _wfRunProcessService.GetList(dto.Id, "12").FirstOrDefault(); if (wfRunProcessDTO == null) { shifoubiaoji = "D"; sifoudangqian = "D"; } else { dangqianbuzhou = wfRunProcessDTO.Step; //æ¥è¯¢å®¡æ¹è¿åº¦ lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id); if (wfRunProcessDTO.Step != "æäº¤") { shifoubiaoji = "D"; } //æ¥è¯¢å¾ å var chaxundaiban = _wfNeeddeelService.GetListTracking(wfRunProcessDTO.Id, wfRunProcessDTO.Step).Where(x => x.DeelUserId == curentuser.Id).ToList(); if (chaxundaiban != null && chaxundaiban.Count > 0) { sifoudangqian = "A"; } else { sifoudangqian = "D"; } } } ViewBag.shifoubiaoji = shifoubiaoji; ViewBag.sifoudangqian = sifoudangqian; ViewBag.lishiyijian = lishiyijian; ViewBag.dangqianbuzhou = dangqianbuzhou; ViewBag.jtype = _liaotianService.GetSYScode("CooperVisit", "jtype"); ViewBag.standard = _liaotianService.GetSYScode("fi_piecerate", "standard"); ViewBag.CooperatecustomCustomerDTOs = _cooperatecustomCustomerService.GetList(); ViewData.Model = dto; return View(); } /// <summary> /// ä¿åéå®è´¹ç¨ç³è¯· /// </summary> /// <param name="data"></param> /// <returns></returns> [HttpPost] public IActionResult SaveYouHui(AdmAskYouHuiDTO data) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ResultEntity resultEntity = new ResultEntity(); using (TransactionScope scope = new TransactionScope()) { if (data.Step == "æäº¤") { data.ShenpiStatus = "D"; data.RecStatus = "A"; data.Creater = curentuser.Id; data.Createtime = DateTime.Now; data.Modifier = data.Creater; data.Modifytime = data.Createtime; resultEntity = _askService.SaveAskYouHui(data); if (!resultEntity.Result) { return new JsonResult(resultEntity); } } //åèµ·æµç¨ç¸å ³ resultEntity = _wfRunProcessService.WfAskYouHui(data.Id, data.Step, data.Tongguojujue, curentuser.Id, data.Content, data.Tittle, "v1"); if (!resultEntity.Result) { return new JsonResult(resultEntity); } scope.Complete(); } return new JsonResult(resultEntity); } public IActionResult AskBaiFang(string id = "") { AdmAskBaiFangDTO dto = new AdmAskBaiFangDTO(); var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); //æµç¨ç¸å ³ string shifoubiaoji = "A"; string sifoudangqian = "A"; string dangqianbuzhou = "æäº¤"; var lishiyijian = new List<WfHistoryDTO>(); if (string.IsNullOrEmpty(id)) { dto.CreaterName = curentuser.UserName; dto.Tittle = "访é®è¯·ç¤ºï¼" + curentuser.UserName + "ï¼"; } else if (dto != null) { dto = _askService.GetAskBaiFang(id); dto.BaiFangtimeName = dto.BaiFangtime.Value.ToString("yyyy-MM-dd"); var wfRunProcessDTO = _wfRunProcessService.GetList(dto.Id, "13").FirstOrDefault(); if (wfRunProcessDTO == null) { shifoubiaoji = "D"; sifoudangqian = "D"; } else { dangqianbuzhou = wfRunProcessDTO.Step; //æ¥è¯¢å®¡æ¹è¿åº¦ lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id); if (wfRunProcessDTO.Step != "æäº¤") { shifoubiaoji = "D"; } //æ¥è¯¢å¾ å var chaxundaiban = _wfNeeddeelService.GetListTracking(wfRunProcessDTO.Id, wfRunProcessDTO.Step).Where(x => x.DeelUserId == curentuser.Id).ToList(); if (chaxundaiban != null && chaxundaiban.Count > 0) { sifoudangqian = "A"; } else { sifoudangqian = "D"; } } } ViewBag.shifoubiaoji = shifoubiaoji; ViewBag.sifoudangqian = sifoudangqian; ViewBag.lishiyijian = lishiyijian; ViewBag.dangqianbuzhou = dangqianbuzhou; ViewBag.jtype = _liaotianService.GetSYScode("CooperVisit", "jtype"); ViewBag.visType = _liaotianService.GetSYScode("CooperVisit", "visType"); //var cooperatecustomCustomerDTOs = _cooperatecustomCustomerService.GetList(); //var intentionCustomerDTOs = _intentionCustomerService.GetList(); //ViewBag.CooperatecustomCustomerDTOs = ViewData.Model = dto; return View(); } /// <summary> /// ä¿åéå®è´¹ç¨ç³è¯· /// </summary> /// <param name="data"></param> /// <returns></returns> [HttpPost] public IActionResult SaveBaiFang(AdmAskBaiFangDTO data) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ResultEntity resultEntity = new ResultEntity(); using (TransactionScope scope = new TransactionScope()) { if (data.Step == "æäº¤") { data.ShenpiStatus = "D"; data.RecStatus = "A"; data.Creater = curentuser.Id; data.Createtime = DateTime.Now; data.Modifier = data.Creater; data.Modifytime = data.Createtime; resultEntity = _askService.SaveAskBaiFang(data); if (!resultEntity.Result) { return new JsonResult(resultEntity); } } //åèµ·æµç¨ç¸å ³ resultEntity = _wfRunProcessService.WfAskBaiFang(data.Id, data.Step, data.Tongguojujue, curentuser.Id, data.Content, data.Tittle, "v1"); if (!resultEntity.Result) { return new JsonResult(resultEntity); } scope.Complete(); } return new JsonResult(resultEntity); } } } zhengcaioa/zhengcaioa/Views/AdmAsk/AskBaiFang.cshtml
New file @@ -0,0 +1,394 @@ @model AdmAskBaiFangDTO; @using DTO; @using zhengcaioa.Models; @{ Layout = null; //æµç¨ç¸å ³ string shifoubiaoji = ViewBag.shifoubiaoji as string; string sifoudangqian = ViewBag.sifoudangqian as string; string dangqianbuzhou = ViewBag.dangqianbuzhou as string; List<WfHistoryDTO> lishiyijian = ViewData["lishiyijian"] as List<WfHistoryDTO>; //审æ¹è¿åº¦ List<SysCodeDtl> jtype = ViewData["jtype"] as List<SysCodeDtl>; List<SysCodeDtl> visType = ViewData["visType"] as List<SysCodeDtl>; } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="description" content=""> <meta name="author" content="ThemeBucket"> <link href="~/css/bootstrap.min.css" rel="stylesheet"> <link href="~/css/font-awesome.min.css" rel="stylesheet"> <link href="~/css/animate.min.css" rel="stylesheet"> <link href="~/css/style.min.css" rel="stylesheet"> <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet"> <link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet"> <link href="~/css/style.min.css" rel="stylesheet"> <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" /> <!-- jqgrid--> <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script> <script src="~/js/bootstrap.min.js"></script> <!--容å¨--> <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script> <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script> <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script> <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script> <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script> <script src="~/js/TUJS.js"></script> <style type="text/css"> div.clearfix > label { padding-top: 8px; } .col-md-1.control-label { padding-right: 0px; font-weight: 400; } </style> </head> <body class="gray-bg" style="overflow:auto"> <form id="fm" method="post"> <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;"> <div class="row"> <div class="col-sm-12"> <div class="ibox float-e-margins"> <div id="div_content" class="ibox-content" style="background-color:white;"> <div class="row"> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">åæ®åç§°<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <input type="text" class="form-control" value="@Model.Tittle" name="tittle" id="tittle" validate="RequiredField" autocomplete="off" readonly="readonly"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">ç³è¯·äºº<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <input type="text" class="form-control" value="@Model.CreaterName" name="createrName" id="createrName" validate="RequiredField" autocomplete="off" readonly="readonly"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">è®¿é®æ¶é´<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <input type="text" class="layui-input layer-date ldate form-control" value="@Model.BaiFangtimeName" name="BaiFangtime" id="BaiFangtime" readonly="readonly"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">客æ·åä½<i class="red">*</i></label> <div class="col-sm-6 col-md-6"> <input type="text" class="form-control" value="@Model.CustomerId" name="CustomerId" id="CustomerId" maxlength="500"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">è®¿é®æ¹å¼<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <select id="VisType" class="form-control" name="VisType" data-placeholder="éæ© åºå ..."> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in visType) { @if (!item.CodeSn.Equals(Model.VisType)) { <option value="@item.CodeSn" hassubinfo="true"> @item.Comments </option> } else { <option value="@item.CodeSn" hassubinfo="true" selected="selected"> @item.Comments </option> } } </select> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">ä¸å¡ç±»å</label> <div class="col-sm-2 col-md-2"> <select id="Jtype" class="form-control" name="Jtype" data-placeholder="éæ© åºå ..."> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in jtype) { @if (!item.CodeSn.Equals(Model.Jtype)) { <option value="@item.CodeSn" hassubinfo="true"> @item.Comments </option> } else { <option value="@item.CodeSn" hassubinfo="true" selected="selected"> @item.Comments </option> } } </select> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">ç³è¯·è¯´æ</label> <div class="col-sm-6 col-md-6"> <textarea class="form-control bt" id="Remark" name="Remark" maxlength="500" length="long" style="resize:none;overflow-y:hidden; height:80px;">@Model.Remark</textarea> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;" id="shenpiyijian"> <label class="text-right col-sm-1 col-md-1 control-label">å®¡æ¹æè§</label> <div class="col-sm-6 col-md-6"> <textarea class="form-control data" id="Content" name="Content" style="resize:none;overflow-y:hidden; height:80px;" maxlength="500"></textarea> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">审æ¹è¿åº¦</label> <div class="col-sm-6 col-md-6"> <table> @if (lishiyijian.Count > 0) { <tr> <td style="border:1px solid #ccc;width:150px;">æ¥éª¤ </td> <td style="border:1px solid #ccc;width:150px;"> æ¹å¤ç¶æ</td> <td style="border:1px solid #ccc;width:150px;">æ¹å¤æ¶é´</td> <td style="border:1px solid #ccc;width:300px;"> å®¡æ¹æè§</td> <td style="border:1px solid #ccc;width:100px;"> æ¹å¤äºº</td> </tr> } @foreach (var wfHistory in lishiyijian) { <tr> <td style="border:1px solid #ccc;width:150px;">@wfHistory.Step</td> <td style="border:1px solid #ccc;width:150px;">@wfHistory.ChuliStatusName</td> <td style="border:1px solid #ccc;width:150px;">@wfHistory.ModifytimeName</td> <td style="border:1px solid #ccc;width:300px;">@wfHistory.Content</td> <td style="border:1px solid #ccc;width:100px;">@wfHistory.DeelUserIdName</td> </tr> } </table> </div> </div> <div class="clearfix layer-area" style="padding-bottom:60px;"> </div> </div> </div> </div> </div> </div> </div> <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px "> <div class="" style="float:right;" data-bootstro-width="500px"> <a class="btn btn-success" href="javascript:void(0)" onclick="_pageAutoClose();" style="margin-left:4px; border-radius:4px;"> <i class="glyphicon glyphicon-remove"></i> <span class="bold">åæ¶</span> </a> <a class="btn btn-success" id="tijiao" href="javascript:void(0)" onclick="saveSimCost('');" style="margin-left:4px; border-radius:4px;"> <i class="glyphicon glyphicon-ok"></i> <span class="bold">æäº¤</span> </a> <a class="btn btn-success" id="tongyi" href="javascript:void(0)" onclick="saveSimCost('A');" style="margin-left:4px; border-radius:4px;"> <span class="bold">åæ</span> </a> <a class="btn btn-success" id="jujue" href="javascript:void(0)" onclick="saveSimCost('D');" style="margin-left:4px; border-radius:4px;"> <span class="bold">æç»</span> </a> <input type="hidden" id="id" name="id" value="@Model.Id" /> <input type="hidden" id="Tongguojujue" name="Tongguojujue" value="" /> <input type="hidden" id="Step" name="Step" value="@dangqianbuzhou" /> </div> </div> </form> <script type="text/javascript"> var hh = document.body.clientHeight - $("#top").height() * 2 - 50; $("#div_content").height(hh); toastr.options = { "closeButton": true, "debug": false, "progressBar": true, "positionClass": "toast-bottom-right", "onclick": null, "showDuration": "300", "hideDuration": "600", "timeOut": "4500", "extendedTimeOut": "600", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" }; $(function () { if ("@shifoubiaoji" != "A") { $("input").attr('readonly', true); $("textarea").attr('readonly', true); $(':radio').attr('disabled', true); $(':checkbox').attr('disabled', true); $(':button').attr('disabled', true); //$('a').removeAttr('onclick'); $('select').attr('disabled', true); $("#fileUp").attr('disabled', true); $('.fujianshanchu').removeAttr('onclick'); if ("@sifoudangqian" == "A") { $("#Content").attr('readonly', false); $('#tijiao').hide(); } else { $('#tongyi').hide(); $('#jujue').hide(); $('#tijiao').hide(); $('#shenpiyijian').hide(); } } else { //审æ¹ç¸å ³ $('#shenpiyijian').hide(); if ("@sifoudangqian" == "A") { $('#tongyi').hide(); $('#jujue').hide(); //$('#CustomerId').chosen(); $(".ldate").each(function (el) { laydate({ elem: "#" + $(this).attr('id'), //对åºid format: 'YYYY-MM-DD', //æ¥ææ ¼å¼ // åé符å¯ä»¥ä»»æå®ä¹ï¼è¯¥ä¾åè¡¨ç¤ºåªæ¾ç¤ºå¹´æ min: '2021-01-01', //è®¾å®æå°æ¥æä¸ºå½åæ¥æ max: '2099-06-16', //æå¤§æ¥æ type: 'datetime', festival: false, //æ¾ç¤ºèæ¥ istime: true,  //æ¯å¦æ¾ç¤ºæ¶åç§ istoday: true, //æ¯å¦æ¯ä»å¤© choose: function (datas) { //éæ©æ¥æå®æ¯çåè° // console.log("234234234234324"); // end.min = datas; //å¼å§æ¥é好åï¼éç½®ç»ææ¥çæå°æ¥æ // end.start = datas //å°ç»ææ¥çåå§å¼è®¾å®ä¸ºå¼å§æ¥ checktime(); } }); }); } else { $('#tongyi').hide(); $('#jujue').hide(); $('#tijiao').hide(); } } }) // ä¿å function saveSimCost(tongyi) { if ($.trim($("#BaiFangtime").val()) == '') { toastr.warning("è®¿é®æ¶é´ä¸è½ä¸ºç©º"); return; } if ($.trim($("#CustomerId").val()) == '') { toastr.warning("客æ·åä½ä¸è½ä¸ºç©º"); return; } if ($.trim($("#VisType").val()) == '') { toastr.warning("è®¿é®æ¹å¼ä¸è½ä¸ºç©º"); return; } $("#Tongguojujue").val(tongyi); $.ajax({ type: "POST", url: "/AdmAsk/SaveBaiFang", dataType: "json", global: false, data: $('#fm').serialize(), success: function (data) { if (data.Result) { parent.layer.msg('æäº¤æå', { icon: 6 }); try { _pageAutoClose();//èªå¨å ³é页颿¹æ³ } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } else { parent.layer.msg(data.Message, { icon: 5 }); } }, error: function () { parent.layer.msg('失败', { icon: 5 }); } }); } function _pageAutoClose() { try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> </html> zhengcaioa/zhengcaioa/Views/AdmAsk/AskCar.cshtml
@@ -307,12 +307,20 @@ function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> zhengcaioa/zhengcaioa/Views/AdmAsk/AskGood.cshtml
@@ -306,12 +306,20 @@ function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> zhengcaioa/zhengcaioa/Views/AdmAsk/AskMarketingCost.cshtml
@@ -280,12 +280,20 @@ function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> zhengcaioa/zhengcaioa/Views/AdmAsk/AskOther.cshtml
@@ -280,12 +280,20 @@ function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> zhengcaioa/zhengcaioa/Views/AdmAsk/AskPunishAppeal.cshtml
@@ -437,12 +437,20 @@ getBreakPrecedent(); function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> zhengcaioa/zhengcaioa/Views/AdmAsk/AskSuggestion.cshtml
@@ -302,12 +302,20 @@ function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> zhengcaioa/zhengcaioa/Views/AdmAsk/AskYouHui.cshtml
New file @@ -0,0 +1,393 @@ @model AdmAskYouHuiDTO; @using DTO; @using zhengcaioa.Models; @{ Layout = null; //æµç¨ç¸å ³ string shifoubiaoji = ViewBag.shifoubiaoji as string; string sifoudangqian = ViewBag.sifoudangqian as string; string dangqianbuzhou = ViewBag.dangqianbuzhou as string; List<WfHistoryDTO> lishiyijian = ViewData["lishiyijian"] as List<WfHistoryDTO>; //审æ¹è¿åº¦ List<SysCodeDtl> jtype = ViewData["jtype"] as List<SysCodeDtl>; List<SysCodeDtl> standard = ViewData["standard"] as List<SysCodeDtl>; List<CooperatecustomCustomerDTO> CooperatecustomCustomerDTOs = ViewData["CooperatecustomCustomerDTOs"] as List<CooperatecustomCustomerDTO>; } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="description" content=""> <meta name="author" content="ThemeBucket"> <link href="~/css/bootstrap.min.css" rel="stylesheet"> <link href="~/css/font-awesome.min.css" rel="stylesheet"> <link href="~/css/animate.min.css" rel="stylesheet"> <link href="~/css/style.min.css" rel="stylesheet"> <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet"> <link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet"> <link href="~/css/style.min.css" rel="stylesheet"> <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" /> <!-- jqgrid--> <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script> <script src="~/js/bootstrap.min.js"></script> <!--容å¨--> <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script> <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script> <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script> <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script> <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script> <script src="~/js/TUJS.js"></script> <style type="text/css"> div.clearfix > label { padding-top: 8px; } .col-md-1.control-label { padding-right: 0px; font-weight: 400; } </style> </head> <body class="gray-bg" style="overflow:auto"> <form id="fm" method="post"> <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;"> <div class="row"> <div class="col-sm-12"> <div class="ibox float-e-margins"> <div id="div_content" class="ibox-content" style="background-color:white;"> <div class="row"> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">åæ®åç§°<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <input type="text" class="form-control" value="@Model.Tittle" name="tittle" id="tittle" validate="RequiredField" autocomplete="off" readonly="readonly"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">ç³è¯·äºº<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <input type="text" class="form-control" value="@Model.CreaterName" name="createrName" id="createrName" validate="RequiredField" autocomplete="off" readonly="readonly"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">åä½å®¢æ·<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <select id="CustomerId" class="form-control" name="CustomerId" data-placeholder="éæ© åºå ..."> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in CooperatecustomCustomerDTOs) { @if (!item.Id.Equals(Model.CustomerId)) { <option value="@item.Id" hassubinfo="true"> @item.Name </option> } else { <option value="@item.Id" hassubinfo="true" selected="selected"> @item.Name </option> } } </select> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">订åç±»å<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <select id="OrderType" class="form-control" name="OrderType" data-placeholder="éæ© åºå ..."> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in jtype) { @if (!item.CodeSn.Equals(Model.OrderType)) { <option value="@item.CodeSn" hassubinfo="true"> @item.Comments </option> } else { <option value="@item.CodeSn" hassubinfo="true" selected="selected"> @item.Comments </option> } } </select> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">伿 æ å<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <select id="Youhuistandard" class="form-control" name="Youhuistandard" data-placeholder="éæ© åºå ..."> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in standard) { @if (!item.CodeSn.Equals(Model.Youhuistandard)) { <option value="@item.CodeSn" hassubinfo="true"> @item.Comments </option> } else { <option value="@item.CodeSn" hassubinfo="true" selected="selected"> @item.Comments </option> } } </select> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">伿 <i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <input class="form-control" id="YouHui" name="YouHui" type="text" value="@Model.YouHuiName" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">ç³è¯·è¯´æ</label> <div class="col-sm-6 col-md-6"> <textarea class="form-control bt" id="Remark" name="Remark" maxlength="500" length="long" style="resize:none;overflow-y:hidden; height:80px;">@Model.Remark</textarea> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;" id="shenpiyijian"> <label class="text-right col-sm-1 col-md-1 control-label">å®¡æ¹æè§</label> <div class="col-sm-6 col-md-6"> <textarea class="form-control data" id="Content" name="Content" style="resize:none;overflow-y:hidden; height:80px;" maxlength="500"></textarea> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">审æ¹è¿åº¦</label> <div class="col-sm-6 col-md-6"> <table> @if (lishiyijian.Count > 0) { <tr> <td style="border:1px solid #ccc;width:150px;">æ¥éª¤ </td> <td style="border:1px solid #ccc;width:150px;"> æ¹å¤ç¶æ</td> <td style="border:1px solid #ccc;width:150px;">æ¹å¤æ¶é´</td> <td style="border:1px solid #ccc;width:300px;"> å®¡æ¹æè§</td> <td style="border:1px solid #ccc;width:100px;"> æ¹å¤äºº</td> </tr> } @foreach (var wfHistory in lishiyijian) { <tr> <td style="border:1px solid #ccc;width:150px;">@wfHistory.Step</td> <td style="border:1px solid #ccc;width:150px;">@wfHistory.ChuliStatusName</td> <td style="border:1px solid #ccc;width:150px;">@wfHistory.ModifytimeName</td> <td style="border:1px solid #ccc;width:300px;">@wfHistory.Content</td> <td style="border:1px solid #ccc;width:100px;">@wfHistory.DeelUserIdName</td> </tr> } </table> </div> </div> <div class="clearfix layer-area" style="padding-bottom:60px;"> </div> </div> </div> </div> </div> </div> </div> <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px "> <div class="" style="float:right;" data-bootstro-width="500px"> <a class="btn btn-success" href="javascript:void(0)" onclick="_pageAutoClose();" style="margin-left:4px; border-radius:4px;"> <i class="glyphicon glyphicon-remove"></i> <span class="bold">åæ¶</span> </a> <a class="btn btn-success" id="tijiao" href="javascript:void(0)" onclick="saveSimCost('');" style="margin-left:4px; border-radius:4px;"> <i class="glyphicon glyphicon-ok"></i> <span class="bold">æäº¤</span> </a> <a class="btn btn-success" id="tongyi" href="javascript:void(0)" onclick="saveSimCost('A');" style="margin-left:4px; border-radius:4px;"> <span class="bold">åæ</span> </a> <a class="btn btn-success" id="jujue" href="javascript:void(0)" onclick="saveSimCost('D');" style="margin-left:4px; border-radius:4px;"> <span class="bold">æç»</span> </a> <input type="hidden" id="id" name="id" value="@Model.Id" /> <input type="hidden" id="Tongguojujue" name="Tongguojujue" value="" /> <input type="hidden" id="Step" name="Step" value="@dangqianbuzhou" /> </div> </div> </form> <script type="text/javascript"> var hh = document.body.clientHeight - $("#top").height() * 2 - 50; $("#div_content").height(hh); toastr.options = { "closeButton": true, "debug": false, "progressBar": true, "positionClass": "toast-bottom-right", "onclick": null, "showDuration": "300", "hideDuration": "600", "timeOut": "4500", "extendedTimeOut": "600", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" }; $(function () { if ("@shifoubiaoji" != "A") { $("input").attr('readonly', true); $("textarea").attr('readonly', true); $(':radio').attr('disabled', true); $(':checkbox').attr('disabled', true); $(':button').attr('disabled', true); //$('a').removeAttr('onclick'); $('select').attr('disabled', true); $("#fileUp").attr('disabled', true); $('.fujianshanchu').removeAttr('onclick'); if ("@sifoudangqian" == "A") { $("#Content").attr('readonly', false); $('#tijiao').hide(); } else { $('#tongyi').hide(); $('#jujue').hide(); $('#tijiao').hide(); $('#shenpiyijian').hide(); } } else { //审æ¹ç¸å ³ $('#shenpiyijian').hide(); if ("@sifoudangqian" == "A") { $('#tongyi').hide(); $('#jujue').hide(); $('#CustomerId').chosen(); } else { $('#tongyi').hide(); $('#jujue').hide(); $('#tijiao').hide(); } } }) // ä¿å function saveSimCost(tongyi) { if ($.trim($("#CustomerId").val()) == '') { toastr.warning("åä½å®¢æ·ä¸è½ä¸ºç©º"); return; } if ($.trim($("#OrderType").val()) == '') { toastr.warning("订åç±»åä¸è½ä¸ºç©º"); return; } if ($.trim($("#Youhuistandard").val()) == '') { toastr.warning("伿 æ åä¸è½ä¸ºç©º"); return; } if ($.trim($("#YouHui").val()) == '') { toastr.warning("伿 ä¸è½ä¸ºç©º"); return; } $("#Tongguojujue").val(tongyi); $.ajax({ type: "POST", url: "/AdmAsk/SaveYouHui", dataType: "json", global: false, data: $('#fm').serialize(), success: function (data) { if (data.Result) { parent.layer.msg('æäº¤æå', { icon: 6 }); try { _pageAutoClose();//èªå¨å ³é页颿¹æ³ } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } else { parent.layer.msg(data.Message, { icon: 5 }); } }, error: function () { parent.layer.msg('失败', { icon: 5 }); } }); } function _pageAutoClose() { try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> </html> zhengcaioa/zhengcaioa/Views/AdmAsk/Askcost.cshtml
@@ -277,12 +277,20 @@ function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> zhengcaioa/zhengcaioa/Views/AdmAsk/Askovertime.cshtml
@@ -311,12 +311,20 @@ function _pageAutoClose() { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; try { parent.window._reloadPageData(); var index = parent.layer.getFrameIndex(window.name); parent.layer.isRefresh = true; parent.layer.closeAll('loading'); parent.layer.close(index); return false; } catch (err) { var pathname = window.location.pathname; var search = window.location.search; parent._CloseTab1(pathname + search); } } </script> </body> zhengcaioa/zhengcaioa/Views/CooperOrder/Edit.cshtml
@@ -12,9 +12,11 @@ string ShouliStatus = ViewData["ShouliStatus"] as string; //åçåä¸å 许ç¼è¾ //List<SysCodeDtl> YouHuiList = ViewData["YouHuiList"] as List<SysCodeDtl>; //伿 å表 } @{ Layout = null; Layout = null; } <!DOCTYPE html> @@ -103,7 +105,7 @@ <div class="row"> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">订åå·</label> <div class="col-sm-2 col-md-2"> @@ -189,30 +191,30 @@ </div> @*<label class="text-right col-sm-1 col-md-1 control-label">项ç®<i class="red">*</i></label> <div class="col-sm-2 col-md-2"> <select id="OrderPro" class="form-control" name="OrderPro" data-placeholder="éæ© åºå ..."> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in project) { @if (!item.Id.Equals(Model.OrderPro)) <div class="col-sm-2 col-md-2"> <select id="OrderPro" class="form-control" name="OrderPro" data-placeholder="éæ© åºå ..."> <option value="" hassubinfo="true">è¯·éæ©</option> @foreach (var item in project) { <option value="@item.Id" hassubinfo="true"> @item.Name </option> @if (!item.Id.Equals(Model.OrderPro)) { <option value="@item.Id" hassubinfo="true"> @item.Name </option> } else { <option value="@item.Id" hassubinfo="true" selected="selected"> @item.Name </option> } } else { <option value="@item.Id" hassubinfo="true" selected="selected"> @item.Name </option> } } } </select> </select> </div>*@ </div>*@ @@ -226,19 +228,19 @@ <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">è®¢åæ°é<i class="red">*</i></label> <div class="col-sm-2 col-md-2" grouptype="Vdata"> <input class="form-control" label="客æ·åç§°" name="OrderNum" id="OrderNum" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.OrderNum" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" > <input class="form-control" label="客æ·åç§°" name="OrderNum" id="OrderNum" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.OrderNum" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">åä»·<i class="red">*</i></label> <div class="col-sm-2 col-md-2" grouptype="Vdata"> <input class="form-control" label="客æ·åç§°" name="Price" id="Price" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.Price" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> <input class="form-control" label="客æ·åç§°" name="Price" id="Price" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.Price" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">éé¢<i class="red">*</i></label> <div class="col-sm-2 col-md-2" grouptype="Vdata"> <input class="form-control" label="客æ·åç§°" name="Money" id="Money" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.Money" oninput="if(value.length>8)value=value.slice(0,18)" readonly="readonly"> <input class="form-control" label="客æ·åç§°" name="Money" id="Money" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.Money" oninput="if(value.length>8)value=value.slice(0,18)" readonly="readonly"> </div> @@ -279,7 +281,15 @@ </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <div class="col-sm-1 col-md-1"> </div> <div class="col-sm-8 col-md-8" style="color:red;"> ç³»ç»èªå¨æ ¹æ®8天å ç³è¯·ç伿 项ç®è®¡ç®ä¼æ éé¢ </div> </div> </div> zhengcaioa/zhengcaioa/Views/CooperOrder/Index.cshtml
@@ -166,23 +166,24 @@ }, { label: '伿 /å ', name: 'Youhui', labtype: 'txt', hidden: youhuibool, width: 60, formatter: function (cellvalue, options, rowObject) { if (rowObject.YouhuiStatus == null || rowObject.YouhuiStatus == 'null' || rowObject.YouhuiStatus == '') { if (rowObject.ShouliStatus == '1' || rowObject.ChedanStatus == 'A' ) { if (rowObject.ChedanStatus == 'A') { return cellvalue; } else { return ""; } //formatter: function (cellvalue, options, rowObject) { // if (rowObject.YouhuiStatus == null || rowObject.YouhuiStatus == 'null' || rowObject.YouhuiStatus == '') { // if (rowObject.ShouliStatus == '1' || rowObject.ChedanStatus == 'A' ) { // if (rowObject.ChedanStatus == 'A') { // return cellvalue; // } else { // return ""; // } } else { return "<a onclick=\"youhui('" + rowObject.Id + "')\" >伿 </a>"; } // } else { // return "<a onclick=\"youhui('" + rowObject.Id + "')\" >伿 </a>"; // } } else { return cellvalue; } } }, // } else { // return cellvalue; // } //} }, { label: 'æå°', name: 'OrderType', labtype: 'txt', hidden: false, width: 60, formatter: function (cellvalue, options, rowObject) { ±íÐÞ¸Ä.sql
@@ -1,3 +1,298 @@ USE [zhengcaioa] GO /****** Object: Table [dbo].[ADM_AskBaiFang] Script Date: 2021/7/30 9:03:25 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ADM_AskBaiFang]( [Id] [nvarchar](50) NOT NULL, [CustomerId] [nvarchar](50) NULL, [VisType] [nvarchar](50) NULL, [Jtype] [nvarchar](50) NULL, [BaiFangtime] [datetime] NULL, [Remark] [nvarchar](500) NULL, [shenpi_status] [nvarchar](1) NULL, [rec_status] [nvarchar](1) NOT NULL, [creater] [nvarchar](50) NOT NULL, [createtime] [datetime] NOT NULL, [modifier] [nvarchar](50) NOT NULL, [modifytime] [datetime] NOT NULL, [createrName] [nvarchar](50) NULL, [tittle] [nvarchar](50) NULL, CONSTRAINT [PK__AskBaiFang __3214EC077AC5FA48] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 100) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[ADM_AskBaiFang] ADD DEFAULT ('D') FOR [shenpi_status] GO ALTER TABLE [dbo].[ADM_AskBaiFang] ADD DEFAULT ('A') FOR [rec_status] GO ALTER TABLE [dbo].[ADM_AskBaiFang] ADD DEFAULT ('1') FOR [creater] GO ALTER TABLE [dbo].[ADM_AskBaiFang] ADD DEFAULT (getdate()) FOR [createtime] GO ALTER TABLE [dbo].[ADM_AskBaiFang] ADD DEFAULT ('1') FOR [modifier] GO ALTER TABLE [dbo].[ADM_AskBaiFang] ADD DEFAULT (getdate()) FOR [modifytime] GO USE [zhengcaioa] GO /****** Object: Table [dbo].[ADM_AskYouHui] Script Date: 2021/7/30 9:03:25 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ADM_AskYouHui]( [Id] [nvarchar](50) NOT NULL, [CustomerId] [nvarchar](50) NULL, [OrderType] [nvarchar](50) NULL, [Youhuistandard] [nvarchar](50) NULL, [YouHui] [money] NULL, [Remark] [nvarchar](500) NULL, [shenpi_status] [nvarchar](1) NULL, [rec_status] [nvarchar](1) NOT NULL, [creater] [nvarchar](50) NOT NULL, [createtime] [datetime] NOT NULL, [modifier] [nvarchar](50) NOT NULL, [modifytime] [datetime] NOT NULL, [createrName] [nvarchar](50) NULL, [tittle] [nvarchar](50) NULL, CONSTRAINT [PK__AskYouHui __3214EC077AC5FA48] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 100) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[ADM_AskYouHui] ADD DEFAULT ((0)) FOR [YouHui] GO ALTER TABLE [dbo].[ADM_AskYouHui] ADD DEFAULT ('D') FOR [shenpi_status] GO ALTER TABLE [dbo].[ADM_AskYouHui] ADD DEFAULT ('A') FOR [rec_status] GO ALTER TABLE [dbo].[ADM_AskYouHui] ADD DEFAULT ('1') FOR [creater] GO ALTER TABLE [dbo].[ADM_AskYouHui] ADD DEFAULT (getdate()) FOR [createtime] GO ALTER TABLE [dbo].[ADM_AskYouHui] ADD DEFAULT ('1') FOR [modifier] GO ALTER TABLE [dbo].[ADM_AskYouHui] ADD DEFAULT (getdate()) FOR [modifytime] GO USE [zhengcaioa] GO