username@email.com
2021-07-29 189cc830db4a1a7361819cd9f75d2a8323b4830a
今日开发 工作建议 其他请示
13个文件已修改
2个文件已添加
1802 ■■■■■ 已修改文件
zhengcaioa/DTO/AdmAskMarketingCostDTO.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IWfRunProcessService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/AdmAskMarketingCost.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zhengcaioaContext.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/AskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/WfRunProcessService.cs 876 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs 236 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/AskCar.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/AskGood.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/AskMarketingCost.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/AskOther.cshtml 292 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/AskSuggestion.cshtml 314 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/Askcost.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/Askovertime.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
表修改.sql 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AdmAskMarketingCostDTO.cs
@@ -21,5 +21,6 @@
        public string Content { get; set; }
        public string Tongguojujue { get; set; }
        public string Step { get; set; }
        public string ToUserId { get; set; }
    }
}
zhengcaioa/IServices/IWfRunProcessService.cs
@@ -32,5 +32,9 @@
        ResultEntity WfAskCar(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
        ResultEntity WfAskMarketingCost(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
        ResultEntity WfAskSuggestion(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
        ResultEntity WfAskOther(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
    }
}
zhengcaioa/Model/AdmAskMarketingCost.cs
@@ -18,5 +18,6 @@
        public DateTime Modifytime { get; set; }
        public string CreaterName { get; set; }
        public string Tittle { get; set; }
        public string ToUserId { get; set; }
    }
}
zhengcaioa/Model/zhengcaioaContext.cs
@@ -534,6 +534,8 @@
                entity.Property(e => e.Tittle)
                    .HasMaxLength(50)
                    .HasColumnName("tittle");
                entity.Property(e => e.ToUserId).HasMaxLength(50);
            });
            modelBuilder.Entity<AdmAttendance>(entity =>
zhengcaioa/Services/AskService.cs
@@ -281,7 +281,7 @@
                    entity.Feiyong = admAsk.Feiyong;
                    entity.Remark = admAsk.Remark;
                    entity.ToUserId = admAsk.ToUserId;
                    entity.ShenpiStatus = admAsk.ShenpiStatus;
                    entity.CreaterName = admAsk.CreaterName;
zhengcaioa/Services/WfRunProcessService.cs
@@ -4095,5 +4095,881 @@
            return result;
        }
        public ResultEntity WfAskSuggestion(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, "08").FirstOrDefault();
            if (wfRunProcessDTO != null)
            {
                version = wfRunProcessDTO.Version;
            }
            if (version == "v1")
            {
                if (step == "提交")
                {
                    //更新流程实例
                    // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "08").FirstOrDefault();
                    if (wfRunProcessDTO == null)
                    {
                        //插入流程实例
                        wfRunProcessDTO = new WfRunProcessDTO();
                        //wfRunProcessDTO.Applyno =
                        wfRunProcessDTO.Applytime = DateTime.Now;
                        wfRunProcessDTO.Applytiye = "08";
                        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/AskSuggestion?id=" + DanjuId;
                        result = this.save(wfRunProcessDTO);
                        if (result.Result == false)
                        {
                            return result;
                        }
                        //查询处理人
                        var danju = _context.AdmAskMarketingCosts.Where(x => x.RecStatus == "A" && x.Id == DanjuId).FirstOrDefault();
                        if (danju == 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 (string.IsNullOrEmpty(danju.ToUserId))
                        {
                            result.Result = false;
                            result.Message = "未找到处理人";
                            return result;
                        }
                        else
                        {
                            //插入待办
                            WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO();
                            wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id;
                            wfNeeddeelDTO.SendUserId = Userid;
                            wfNeeddeelDTO.DeelUserId = danju.ToUserId;
                            wfNeeddeelDTO.Sendtime = DateTime.Now;
                            wfNeeddeelDTO.Resivetime = DateTime.Now;
                            wfNeeddeelDTO.Step = "被建议人";
                            wfNeeddeelDTO.NeeddeelType = "1";
                            wfNeeddeelDTO.ChuliStatus = "0";
                            wfNeeddeelDTO.Deelurl = "/AdmAsk/AskSuggestion?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/AskSuggestion?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 danju = _context.AdmAskMarketingCosts.Where(x => x.RecStatus == "A" && x.Id == DanjuId).FirstOrDefault();
                        if (danju == 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 (string.IsNullOrEmpty(danju.ToUserId))
                        {
                            result.Result = false;
                            result.Message = "未找到处理人";
                            return result;
                        }
                        else
                        {
                            //插入新的待办
                            WfNeeddeelDTO wfNeeddeelDTO = new WfNeeddeelDTO();
                            wfNeeddeelDTO.RunProcessId = wfRunProcessDTO.Id;
                            wfNeeddeelDTO.SendUserId = Userid;
                            wfNeeddeelDTO.DeelUserId = danju.ToUserId;
                            wfNeeddeelDTO.Sendtime = DateTime.Now;
                            wfNeeddeelDTO.Resivetime = DateTime.Now;
                            wfNeeddeelDTO.Step = "被建议人";
                            wfNeeddeelDTO.NeeddeelType = "1";
                            wfNeeddeelDTO.ChuliStatus = "0";
                            wfNeeddeelDTO.Deelurl = "/AdmAsk/AskSuggestion?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, "08").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 admAskMarketingCost = _context.AdmAskMarketingCosts.Find(DanjuId);
                        if (wfRunProcessDTO == null)
                        {
                            result.Result = false;
                            result.Message = "未找到单据";
                            return result;
                        }
                        admAskMarketingCost.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/AskSuggestion?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 WfAskOther(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, "11").FirstOrDefault();
            if (wfRunProcessDTO != null)
            {
                version = wfRunProcessDTO.Version;
            }
            if (version == "v1")
            {
                if (step == "提交")
                {
                    //更新流程实例
                    // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "11").FirstOrDefault();
                    if (wfRunProcessDTO == null)
                    {
                        //插入流程实例
                        wfRunProcessDTO = new WfRunProcessDTO();
                        //wfRunProcessDTO.Applyno =
                        wfRunProcessDTO.Applytime = DateTime.Now;
                        wfRunProcessDTO.Applytiye = "11";
                        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/AskOther?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/AskOther?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/AskOther?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/AskOther?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, "11").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.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/AskOther?id=" + DanjuId;
                            wfNeeddeelDTO.Content = "";
                            wfNeeddeelDTO.Sort = 3;
                            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;
                            }
                        }
                    }
                    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/AskOther?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;
                        }
                    }
                }
                if (step == "总经理审批")
                {
                    //更新流程实例
                    //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "11").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 admAskMarketingCost = _context.AdmAskMarketingCosts.Find(DanjuId);
                        if (wfRunProcessDTO == null)
                        {
                            result.Result = false;
                            result.Message = "未找到单据";
                            return result;
                        }
                        admAskMarketingCost.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/AskOther?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/admin/AdmAskController.cs
@@ -9,6 +9,7 @@
using System.Linq;
using System.Threading.Tasks;
using System.Transactions;
using zhengcaioa.IService;
using zhengcaioa.Models;
namespace zhengcaioa.Controllers.admin
@@ -24,11 +25,13 @@
        private readonly IWfNeeddeelService _wfNeeddeelService;
        private readonly IAdmGoodsManageService _admGoodsManageService;
        private readonly ILiaotianService _liaotianService;
        private readonly IUserService _userService;
        public AdmAskController(ILogger<AdmAskController> logger, IAskService askService, IHrDeptService hrDeptService, IWfRunProcessService wfRunProcessService
            , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService
            , IAdmGoodsManageService admGoodsManageService
            , ILiaotianService liaotianService)
            , ILiaotianService liaotianService
            , IUserService userService)
        {
            _logger = logger;
            _hrDeptService = hrDeptService;
@@ -38,6 +41,7 @@
            _wfNeeddeelService = wfNeeddeelService;
            _admGoodsManageService = admGoodsManageService;
            _liaotianService = liaotianService;
            _userService = userService;
        }
        public IActionResult Askcost(string id = "")
@@ -608,5 +612,235 @@
            }
            return new JsonResult(resultEntity);
        }
        public IActionResult AskSuggestion(string id = "")
        {
            AdmAskMarketingCostDTO dto = new AdmAskMarketingCostDTO();
            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.GetAskMarketingCost(id);
                //dto.FeiyongName = dto.Feiyong.Value.ToString("F2");
                var wfRunProcessDTO = _wfRunProcessService.GetList(dto.Id, "08").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;
            if (string.IsNullOrEmpty(id))
            {
                ViewBag.Users = _userService.GetList().Where(x => x.Id != curentuser.Id).ToList();
            }
            else
            {
                ViewBag.Users = _userService.GetList();
            }
            ViewData.Model = dto;
            return View();
        }
        /// <summary>
        /// ä¿å­˜ç”¨è½¦ç”³è¯·
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult SaveAskSuggestion(AdmAskMarketingCostDTO 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.SaveAskMarketingCost(data);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                }
                //发起流程相关
                resultEntity = _wfRunProcessService.WfAskSuggestion(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 AskOther(string id = "")
        {
            AdmAskMarketingCostDTO dto = new AdmAskMarketingCostDTO();
            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.GetAskMarketingCost(id);
                dto.FeiyongName = dto.Feiyong.Value.ToString("F2");
                var wfRunProcessDTO = _wfRunProcessService.GetList(dto.Id, "11").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;
            ViewData.Model = dto;
            return View();
        }
        /// <summary>
        /// ä¿å­˜é”€å”®è´¹ç”¨ç”³è¯·
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult SaveOther(AdmAskMarketingCostDTO 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.SaveAskMarketingCost(data);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                }
                //发起流程相关
                resultEntity = _wfRunProcessService.WfAskMarketingCost(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/AskCar.cshtml
@@ -82,7 +82,7 @@
                                <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="4000" length="long" style="resize:none;overflow-y:hidden; height:80px;">@Model.Remark</textarea>
                                        <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;">
zhengcaioa/zhengcaioa/Views/AdmAsk/AskGood.cshtml
@@ -115,7 +115,7 @@
                                <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="4000" length="long" style="resize:none;overflow-y:hidden; height:80px;">@Model.Remark</textarea>
                                        <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>
zhengcaioa/zhengcaioa/Views/AdmAsk/AskMarketingCost.cshtml
@@ -82,7 +82,7 @@
                                <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">
                                        <textarea class="form-control bt" id="Remark" name="Remark" maxlength="4000" length="long" style="resize:none;overflow-y:hidden; height:80px;">@Model.Remark</textarea>
                                        <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>
                               
zhengcaioa/zhengcaioa/Views/AdmAsk/AskOther.cshtml
New file
@@ -0,0 +1,292 @@
@model AdmAskMarketingCostDTO;
@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>; //审批进度
}
<!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-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;">
                                    <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="Feiyong" name="Feiyong" type="text" value="@Model.FeiyongName" 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;" 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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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();
                 } else {
                     $('#tongyi').hide();
                      $('#jujue').hide();
                      $('#tijiao').hide();
                 }
            }
        })
        // ä¿å­˜
        function saveSimCost(tongyi) {
            if ($.trim($("#Remark").val()) == '') {
                toastr.warning("请示不能为空");
                return;
            }
            if ($.trim($("#Feiyong").val()) == '') {
                toastr.warning("申请费用不能为空");
                return;
            }
            $("#Tongguojujue").val(tongyi);
            $.ajax({
                type: "POST",
                url: "/AdmAsk/SaveOther",
                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() {
            parent.window._reloadPageData();
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.isRefresh = true;
            parent.layer.closeAll('loading');
            parent.layer.close(index);
            return false;
        }
    </script>
</body>
</html>
zhengcaioa/zhengcaioa/Views/AdmAsk/AskSuggestion.cshtml
New file
@@ -0,0 +1,314 @@
@model AdmAskMarketingCostDTO;
@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<PltUserDTO> Users = ViewData["Users"] as List<PltUserDTO>;
}
<!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-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;">
                                    <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="ToUserId" class="form-control" name="ToUserId" data-placeholder="选择 åºåˆ— ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in Users)
                                            {
                                                @if (!item.Id.Equals(Model.ToUserId))
                                                {
                                                    <option value="@item.Id" hassubinfo="true">
                                                        @item.UserName
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.Id" hassubinfo="true" selected="selected">
                                                        @item.UserName
                                                    </option>
                                                }
                                            }
                                        </select>
                                    </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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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();
                     $('#ToUserId').chosen();
                 } else {
                     $('#tongyi').hide();
                      $('#jujue').hide();
                      $('#tijiao').hide();
                 }
            }
        })
        // ä¿å­˜
        function saveSimCost(tongyi) {
            if ($.trim($("#ToUserId").val()) == '') {
                toastr.warning("建议人员不能为空");
                return;
            }
            if ($.trim($("#Remark").val()) == '') {
                toastr.warning("工作建议不能为空");
                return;
            }
            $("#Tongguojujue").val(tongyi);
            $.ajax({
                type: "POST",
                url: "/AdmAsk/SaveAskSuggestion",
                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() {
            parent.window._reloadPageData();
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.isRefresh = true;
            parent.layer.closeAll('loading');
            parent.layer.close(index);
            return false;
        }
    </script>
</body>
</html>
zhengcaioa/zhengcaioa/Views/AdmAsk/Askcost.cshtml
@@ -82,7 +82,7 @@
                                <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">
                                        <textarea class="form-control bt" id="Remark" name="Remark" maxlength="4000" length="long" style="resize:none;overflow-y:hidden; height:80px;">@Model.Remark</textarea>
                                        <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;">
zhengcaioa/zhengcaioa/Views/AdmAsk/Askovertime.cshtml
@@ -82,7 +82,7 @@
                                <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">
                                        <textarea class="form-control bt" id="Remark" name="Remark" maxlength="4000" length="long" style="resize:none;overflow-y:hidden; height:80px;">@Model.Remark</textarea>
                                        <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;">
±íÐÞ¸Ä.sql
@@ -1,3 +1,66 @@
USE [zhengcaioa]
GO
ALTER TABLE [dbo].[ADM_AskMarketingCost] ADD  [ToUserId] [nvarchar](50)  NULL;
GO
USE [zhengcaioa]
GO
@@ -47,7 +110,6 @@
ALTER TABLE [dbo].[ADM_AskMarketingCost] ADD  DEFAULT (getdate()) FOR [modifytime]
GO