username@email.com
2022-12-16 6108fe7c4f3a329e8d309d00ee0b1761b8c5ad8f
请示批复”里增加“招标信息网”的试用权限
16个文件已修改
6个文件已添加
1799 ■■■■■ 已修改文件
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Crawler/sichuan/CcgpSichuanoperation.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AdmAskzczbwsyDTO.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AdmAskzczbwsydtlDTO.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/CooperatecustomCustomerDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/IntentionCustomerDTO.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IAskService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IWfRunProcessService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/AdmAskzczbwsy.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/AdmAskzczbwsydtl.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/IntentionCustomer.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zhengcaioaContext.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/AskService.cs 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/CooperatecustomCustomerService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/IntentionCustomerService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/WfRunProcessService.cs 351 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs 276 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/AskZBXXW.cshtml 455 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelect.cshtml 295 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/appsettings.Development.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/appsettings.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -331,6 +331,12 @@
            CreateMap<AdmPhoneMessage, AdmPhoneMessageDTO>();
            CreateMap<AdmPhoneMessageDTO, AdmPhoneMessage>();
            CreateMap<AdmAskzczbwsy, AdmAskzczbwsyDTO>();
            CreateMap<AdmAskzczbwsyDTO, AdmAskzczbwsy>();
            CreateMap<AdmAskzczbwsydtl, AdmAskzczbwsydtlDTO>();
            CreateMap<AdmAskzczbwsydtlDTO, AdmAskzczbwsydtl>();
        }
    }
}
zhengcaioa/Crawler/sichuan/CcgpSichuanoperation.cs
@@ -672,8 +672,8 @@
                                                {
                                                    if (td[i].TextContent.IndexOf("项目编号:") >= 0)
                                                    {
                                                        OpenTenderCode = td[i].TextContent.Replace("项目编号:", "").Replace("/", "").Trim();
                                                        if (string.IsNullOrEmpty(OpenTenderCode))
                                                            OpenTenderCode = td[i].TextContent.Replace("项目编号:", "").Replace("/", "").Trim();
                                                    }
                                                    if (td[i].TextContent.IndexOf("预算金额:") >= 0)
@@ -988,8 +988,8 @@
                                                {
                                                    if (td[i].TextContent.IndexOf("项目编号:") >= 0)
                                                    {
                                                        OpenTenderCode = td[i].TextContent.Replace("项目编号:", "").Replace("一、", "").Trim();
                                                        if (string.IsNullOrEmpty(OpenTenderCode))
                                                            OpenTenderCode = td[i].TextContent.Replace("项目编号:", "").Replace("一、", "").Trim();
                                                        if (OpenTenderCode.IndexOf("(招标文件编号") >= 0)
                                                        {
@@ -1036,8 +1036,8 @@
                                                {
                                                    if (td[i].TextContent.IndexOf("项目编号:") >= 0)
                                                    {
                                                        OpenTenderCode = td[i].TextContent.Replace("项目编号:", "").Replace("一、", "").Trim();
                                                        if (string.IsNullOrEmpty(OpenTenderCode))
                                                            OpenTenderCode = td[i].TextContent.Replace("项目编号:", "").Replace("一、", "").Trim();
                                                        if (OpenTenderCode.IndexOf("(招标文件编号") >= 0)
                                                        {
@@ -1355,8 +1355,8 @@
                                                {
                                                    if (td[i].TextContent.IndexOf("原公告的采购项目编号:") >= 0)
                                                    {
                                                        OpenTenderCode = td[i].TextContent.Replace("原公告的采购项目编号:", "").Trim();
                                                        if (string.IsNullOrEmpty(OpenTenderCode))
                                                            OpenTenderCode = td[i].TextContent.Replace("原公告的采购项目编号:", "").Trim();
                                                    }
                                                    if (td[i].TextContent.IndexOf("预算金额:") >= 0)
@@ -1670,8 +1670,8 @@
                                                {
                                                    if (td[i].TextContent.IndexOf("采购项目编号:") >= 0)
                                                    {
                                                        OpenTenderCode = td[i].TextContent.Replace("采购项目编号:", "").Trim();
                                                        if (string.IsNullOrEmpty(OpenTenderCode))
                                                            OpenTenderCode = td[i].TextContent.Replace("采购项目编号:", "").Trim();
                                                    }
                                                    if (td[i].TextContent.IndexOf("预算金额:") >= 0)
zhengcaioa/DTO/AdmAskzczbwsyDTO.cs
New file
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DTO
{
    public class AdmAskzczbwsyDTO
    {
        public string Id { get; set; }
        public string Shiyongstandard { 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; }
        public List<AdmAskzczbwsydtlDTO> admAskzczbwsydtlDTOs { get; set; }
        public string[] CustomerId { get; set; }
        public string[] Customername { get; set; }
        public string[] Phone { get; set; }
        public string[] Customertype { get; set; }
    }
}
zhengcaioa/DTO/AdmAskzczbwsydtlDTO.cs
New file
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DTO
{
    public class AdmAskzczbwsydtlDTO
    {
        public string Id { get; set; }
        public string AskzczbwsyId { get; set; }
        public string CustomerId { get; set; }
        public string Customername { get; set; }
        public string Phone { get; set; }
        public string Customertype { get; set; }
    }
}
zhengcaioa/DTO/CooperatecustomCustomerDTO.cs
@@ -79,6 +79,8 @@
        public string Zhiwu { get; set; }
        public string Customertype { get; set; }
    }
    public class CooperatecustomCustomerDTOSearch : SearchEntity
zhengcaioa/DTO/IntentionCustomerDTO.cs
@@ -62,6 +62,8 @@
        public string Shifoutianjiaweixin { get; set; }
        public string Weixiner { get; set; }
        public DateTime? Weixintime { get; set; }
        public string HuiyuanId { get; set; }
        public string Customertype { get; set; }
    }
    public class IntentionCustomerDTOSearch : SearchEntity
@@ -90,5 +92,8 @@
        public string ShifouDianhua { get; set; }
        public string Customertype { get; set; }
    }
}
zhengcaioa/IServices/IAskService.cs
@@ -59,5 +59,11 @@
        ResultEntity SaveAskJiaojieDtl(AdmAskJiaojieDtlDTO admAsk);
        List<AdmAskJiaojieDtlDTO> GetAskJiaojieDtls(string JiaojieId);
        AdmAskJiaojieDtlDTO GetAskJiaojieDtl(string Id);
        //招标信息网试用申请
        ResultEntity SaveAskZBXXW(AdmAskzczbwsyDTO admAsk);
        AdmAskzczbwsyDTO GetAskZBXXW(string Id);
    }
}
zhengcaioa/IServices/IWfRunProcessService.cs
@@ -50,5 +50,7 @@
        ResultEntity WfAskJiaojie(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
        ResultEntity WfCustomerRefund(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
        ResultEntity WfAskZBXXW(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
    }
}
zhengcaioa/Model/AdmAskzczbwsy.cs
New file
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace zhengcaioa.Models
{
    public partial class AdmAskzczbwsy
    {
        public string Id { get; set; }
        public string Shiyongstandard { 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/AdmAskzczbwsydtl.cs
New file
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace zhengcaioa.Models
{
    public partial class AdmAskzczbwsydtl
    {
        public string Id { get; set; }
        public string AskzczbwsyId { get; set; }
        public string CustomerId { get; set; }
        public string Customername { get; set; }
        public string Phone { get; set; }
        public string Customertype { get; set; }
    }
}
zhengcaioa/Model/IntentionCustomer.cs
@@ -49,5 +49,6 @@
        public string Shifoutianjiaweixin { get; set; }
        public string Weixiner { get; set; }
        public DateTime? Weixintime { get; set; }
        public string HuiyuanId { get; set; }
    }
}
zhengcaioa/Model/zhengcaioaContext.cs
@@ -37,6 +37,8 @@
        public virtual DbSet<AdmAskMarketingCost> AdmAskMarketingCosts { get; set; }
        public virtual DbSet<AdmAskovertime> AdmAskovertimes { get; set; }
        public virtual DbSet<AdmAskYouHui> AdmAskYouHuis { get; set; }
        public virtual DbSet<AdmAskzczbwsy> AdmAskzczbwsies { get; set; }
        public virtual DbSet<AdmAskzczbwsydtl> AdmAskzczbwsydtls { get; set; }
        public virtual DbSet<AdmAttendance> AdmAttendances { get; set; }
        public virtual DbSet<AdmAttendanceDtl> AdmAttendanceDtls { get; set; }
        public virtual DbSet<AdmAttendanceRule> AdmAttendanceRules { get; set; }
@@ -854,6 +856,81 @@
                    .HasDefaultValueSql("((0))");
                entity.Property(e => e.Youhuistandard).HasMaxLength(50);
            });
            modelBuilder.Entity<AdmAskzczbwsy>(entity =>
            {
                entity.ToTable("ADM_Askzczbwsy");
                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.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.Shiyongstandard)
                    .HasMaxLength(50)
                    .HasColumnName("shiyongstandard");
                entity.Property(e => e.Tittle)
                    .HasMaxLength(50)
                    .HasColumnName("tittle");
            });
            modelBuilder.Entity<AdmAskzczbwsydtl>(entity =>
            {
                entity.ToTable("ADM_Askzczbwsydtl");
                entity.Property(e => e.Id).HasMaxLength(50);
                entity.Property(e => e.AskzczbwsyId)
                    .IsRequired()
                    .HasMaxLength(50);
                entity.Property(e => e.CustomerId).HasMaxLength(50);
                entity.Property(e => e.Customertype).HasMaxLength(50);
                entity.Property(e => e.Customername).HasMaxLength(500);
                entity.Property(e => e.Phone)
                    .HasMaxLength(500)
                    .HasColumnName("phone");
            });
            modelBuilder.Entity<AdmAskMarketingCost>(entity =>
@@ -4018,6 +4095,10 @@
                    .HasColumnName("khlx")
                    .HasComment("客户类型");
                entity.Property(e => e.HuiyuanId)
                   .HasMaxLength(50)
                   .HasColumnName("huiyuanId");
                entity.Property(e => e.Khly)
                    .HasMaxLength(50)
                    .HasColumnName("khly")
zhengcaioa/Services/AskService.cs
@@ -769,5 +769,102 @@
        #endregion
        #region 招标信息网的试用申请
        public ResultEntity SaveAskZBXXW(AdmAskzczbwsyDTO admAsk)
        {
            ResultEntity resultEntity = new ResultEntity();
            try
            {
                AdmAskzczbwsy ask = _mapper.Map<AdmAskzczbwsy>(admAsk);
                if (string.IsNullOrEmpty(admAsk.Id))
                {
                    ask.Id = Guid.NewGuid().ToString();
                    admAsk.Id = ask.Id;
                    _context.AdmAskzczbwsies.Add(ask);
                }
                else
                {
                    var entity = _context.AdmAskzczbwsies.Find(admAsk.Id);
                    entity.Shiyongstandard = admAsk.Shiyongstandard;
                    entity.Remark = admAsk.Remark;
                    entity.ShenpiStatus = admAsk.ShenpiStatus;
                    entity.CreaterName = admAsk.CreaterName;
                    entity.Tittle = admAsk.Tittle;
                    entity.Modifier = admAsk.Modifier;
                    entity.Modifytime = DateTime.Now;
                    var admAskzczbwsydtlsmove = _context.AdmAskzczbwsydtls.Where(x => x.AskzczbwsyId == admAsk.Id).ToList();
                    if (admAskzczbwsydtlsmove != null && admAskzczbwsydtlsmove.Count > 0)
                    {
                        foreach (var admAskzczbwsydtl in admAskzczbwsydtlsmove)
                        {
                            _context.AdmAskzczbwsydtls.Remove(admAskzczbwsydtl);
                        }
                    }
                }
                var CustomerId = admAsk.CustomerId;
                if (CustomerId != null && CustomerId.Length > 0)
                {
                    for (int i = 0; i < CustomerId.Length; i++)
                    {
                        AdmAskzczbwsydtl admAskzczbwsydtl = new AdmAskzczbwsydtl();
                            admAskzczbwsydtl.Id = Guid.NewGuid().ToString();
                        admAskzczbwsydtl.CustomerId = admAsk.CustomerId[i];
                        admAskzczbwsydtl.Customername = admAsk.Customername[i];
                        admAskzczbwsydtl.AskzczbwsyId = admAsk.Id;
                        admAskzczbwsydtl.Phone = admAsk.Phone[i];
                        admAskzczbwsydtl.Customertype = admAsk.Customertype[i];
                        _context.AdmAskzczbwsydtls.Add(admAskzczbwsydtl);
                    }
                }
                _context.SaveChanges();
                resultEntity.ReturnID = ask.Id;
                resultEntity.Result = true;
            }
            catch (Exception ex)
            {
                resultEntity.Result = false;
                resultEntity.Message = "保存失败,请联系管理员";
                ex.Message.ToString();
            }
            return resultEntity;
        }
        public AdmAskzczbwsyDTO GetAskZBXXW(string Id)
        {
            var entity = _context.AdmAskzczbwsies.Where(e => e.RecStatus == "A" && e.Id == Id).FirstOrDefault();
            if (entity == null)
            {
                entity = new AdmAskzczbwsy();
            }
            var leaveDTO = _mapper.Map<AdmAskzczbwsyDTO>(entity);
            var entitys = _context.AdmAskzczbwsydtls.Where(e =>  e.AskzczbwsyId == Id).ToList();
            var leaveDTOs = _mapper.Map<List<AdmAskzczbwsydtlDTO>>(entitys);
            leaveDTO.admAskzczbwsydtlDTOs = leaveDTOs;
            return leaveDTO;
        }
        #endregion
    }
}
zhengcaioa/Services/CooperatecustomCustomerService.cs
@@ -336,6 +336,7 @@
                             ShouxineduName = a.Shouxinedu.HasValue ? a.Shouxinedu.Value.ToString("f2") : "",
                             ShenyushouxinName = a.Shenyushouxin.HasValue ? a.Shenyushouxin.Value.ToString("f2") : "",
                             Taocanjianshu = a.Taocanjianshu ?? 0,
                             Customertype = "合作客户",
                         }
                        ).OrderByDescending(x => x.Modifytime).ToList();
zhengcaioa/Services/IntentionCustomerService.cs
@@ -101,6 +101,10 @@
                    updateproject.Weixiner = intentionCustomer.Weixiner;
                    updateproject.Weixintime = intentionCustomer.Weixintime;
                    if (!string.IsNullOrEmpty(intentionCustomer.HuiyuanId))
                    {
                        updateproject.HuiyuanId = intentionCustomer.HuiyuanId;
                    }
                }
            _context.SaveChanges();
@@ -288,6 +292,7 @@
                         Modifier = a.Modifier,
                         Modifytime = a.Modifytime,
                         CreatetimeName = a.Createtime.ToString("yyyy-MM-dd"),
                         Customertype = "档案客户",
                                 Yixiangtime = a.Yixiangtime,
                                 YixiangtimeName = a.Yixiangtime.HasValue? a.Yixiangtime.Value.ToString("yyyy-MM-dd"):"",
                                 Yixiang = a.Yixiang,
zhengcaioa/Services/WfRunProcessService.cs
@@ -7854,5 +7854,356 @@
            return result;
        }
        public ResultEntity WfAskZBXXW(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, "24").FirstOrDefault();
            if (wfRunProcessDTO != null)
            {
                version = wfRunProcessDTO.Version;
            }
            if (version == "v1")
            {
                if (step == "提交")
                {
                    //更新流程实例
                    // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "24").FirstOrDefault();
                    if (wfRunProcessDTO == null)
                    {
                        //插入流程实例
                        wfRunProcessDTO = new WfRunProcessDTO();
                        //wfRunProcessDTO.Applyno =
                        wfRunProcessDTO.Applytime = DateTime.Now;
                        wfRunProcessDTO.Applytiye = "24";
                        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/AskZBXXW?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/AskZBXXW?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/AskZBXXW?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/AskZBXXW?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, "24").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 admAskzczbwsy = _context.AdmAskzczbwsies.Find(DanjuId);
                        if (wfRunProcessDTO == null)
                        {
                            result.Result = false;
                            result.Message = "未找到单据";
                            return result;
                        }
                        admAskzczbwsy.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/AskZBXXW?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/Customer/IntentionCustomerController.cs
@@ -199,6 +199,106 @@
        }
        public IActionResult IndexSelect()
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            List<ActionEntity> actionlist = new List<ActionEntity>();
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
            actionlist.Add(actionEntity);
            ActionEntity actionEntity2 = new ActionEntity();
            actionEntity2.OpenType = 0;
            actionEntity2.ActionUrl = "";
            actionEntity2.ActionFun = "Zhuanyi";
            actionEntity2.PageIco = "fa fa-exchange";
            actionEntity2.ActionName = "确认";
            actionlist.Add(actionEntity2);
            ViewData["ActionInfo"] = actionlist;
            //ViewData["ActionInfo2"] = pageEntities2;
            ViewBag.khlx = _liaotianService.GetSYScode("CooperatecustomCustomer", "khlx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.khly = _liaotianService.GetSYScode("IntentionCustomer", "khly").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.hyfl = _liaotianService.GetSYScode("CooperatecustomCustomer", "hyfl").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.users = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList();
            ViewBag.Creater = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList();
            ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            var areaDTOs = _projectService.Getsheng().ToList();
            foreach (var areaDTO in areaDTOs)
            {
                if (areaDTO.CodeId == "510000")
                {
                    areaDTOs.Remove(areaDTO);
                    break;
                }
            }
            var areaDTOsic = new Area();
            areaDTOsic.CodeId = "510000";
            areaDTOsic.Name = "四川省";
            areaDTOsic.ParentId = "0     ";
            areaDTOs.Insert(1, areaDTOsic);
            ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList();
            ViewBag.Baomingtimebegin = DateTime.Now.AddMonths(-6).ToString("yyyy-MM-dd");
            ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd");
            ViewBag.Customertype = _liaotianService.GetSYScode("ADM_Askzczbwsydtl", "Customertype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            return View();
        }
        public IActionResult GetListSelect(IntentionCustomerDTOSearch search)
        {
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            if(search.Customertype == "01")
            {
                CooperatecustomCustomerDTOSearch search1 = new CooperatecustomCustomerDTOSearch();
                search1.page = search.page;
                search1.rows = search.rows;
                search1.Khly = search.Khly;
                search1.Hyfl = search.Hyfl;
                search1.Khlx = search.Khlx;
                search1.Sheng = search.Sheng;
                search1.City = search.City;
                search1.AreaId = search.AreaId;
                search1.Ywjl = search.Ywjl;
                search1.Name = search.Name;
                search1.Createtime = search.Createtime;
                search1.Shifouweixin = search.Shifouweixin;
                return new JsonResult(_cooperatecustomCustomerService.SearchByPaging(search1));
            }
            else
            {
                return new JsonResult(_intentionCustomerService.SearchByPaging(search));
            }
        }
        //[HttpGet("excel")]
        public IActionResult GetDaochu(IntentionCustomerDTOSearch search)
        {
zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
@@ -2,11 +2,15 @@
using IServices;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Transactions;
using zhengcaioa.IService;
@@ -35,6 +39,7 @@
        private readonly IFiAccountService _fiAccountService;
        private readonly IFiAccountRecordService _iFiAccountRecordService;
        private readonly IConfiguration _configuration;
        public AdmAskController(ILogger<AdmAskController> logger, IAskService askService, IHrDeptService hrDeptService, IWfRunProcessService wfRunProcessService
            , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService
@@ -48,7 +53,9 @@
            , IAdmGoodsRecordService admGoodsRecordService
            , IFiSubjectService ifiSubjectService
            , IFiAccountService fiAccountService
            , IFiAccountRecordService iFiAccountRecordService)
            , IFiAccountRecordService iFiAccountRecordService
             , IConfiguration configuration
            )
        {
            _logger = logger;
            _hrDeptService = hrDeptService;
@@ -67,6 +74,7 @@
            _ifiSubjectService = ifiSubjectService;
            _fiAccountService = fiAccountService;
            _iFiAccountRecordService = iFiAccountRecordService;
            _configuration = configuration;
        }
        public IActionResult Askcost(string id = "")
@@ -1977,5 +1985,271 @@
            return JsonConvert.SerializeObject(resultEntity);
        }
        //获取招标信息网试用审批
        public IActionResult AskZBXXW(string id = "")
        {
            AdmAskzczbwsyDTO dto = new AdmAskzczbwsyDTO();
            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.GetAskZBXXW(id);
                var wfRunProcessDTO = _wfRunProcessService.GetList(dto.Id, "24").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.shiyongstandard = _liaotianService.GetSYScode("ADM_Askzczbwsy", "shiyongstandard");
            //ViewBag.CooperatecustomCustomerDTOs = _cooperatecustomCustomerService.GetList();
            ViewData.Model = dto;
            return View();
        }
        /// <summary>
        /// 保存销售费用申请
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult SaveZBXXW(AdmAskzczbwsyDTO 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.SaveAskZBXXW(data);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                }
                if (data.Step == "招标信息网试用审批" && data.Tongguojujue == "A")
                {
                    //调用接口开启用户试用权限
                  var admAskzczbwsyDTO =  _askService.GetAskZBXXW(data.Id);
                   var  userDTO   = _userService.GetPltUserEntity(admAskzczbwsyDTO.Creater);
                    string huiyuanurl = _configuration.GetSection("huiyuanurl").Value;
                    string SetCaseOrder = _configuration.GetSection("OASetOtherBusiness").Value;
                    Uri postUrl2 = new Uri(huiyuanurl + SetCaseOrder);
                    if (data.CustomerId != null && data.CustomerId.Length > 0)
                    {
                       for(int i=0;i< data.CustomerId.Length; i++)
                        {
                            if (data.Customertype[i] == "合作客户")
                            {
                              var cooperatecustomCustomerDTO =  _cooperatecustomCustomerService.Get(data.CustomerId[i]);
                                JObject questions2 = new JObject();
                                questions2.Add("UserID", cooperatecustomCustomerDTO.HuiyuanId);
                                questions2.Add("UserName", cooperatecustomCustomerDTO.Name);
                                questions2.Add("PhoneNumber", cooperatecustomCustomerDTO.Tel);
                                questions2.Add("BusinessKey", "CGGG");
                                if (admAskzczbwsyDTO.Shiyongstandard == "01")
                                {
                                    questions2.Add("EndTime", DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss"));
                                }
                                else if (admAskzczbwsyDTO.Shiyongstandard == "02")
                                {
                                    questions2.Add("EndTime", DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss"));
                                }
                                else if(admAskzczbwsyDTO.Shiyongstandard == "03")
                                {
                                    questions2.Add("EndTime", DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss"));
                                }
                                questions2.Add("FromName",  userDTO.UserName +" " +userDTO.Phone);
                                questions2.Add("Describe", "OA");
                                string requestJson2 = questions2.ToString();
                                string result2 = string.Empty;
                                using (HttpContent httpContent = new StringContent(requestJson2))
                                {
                                    httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
                                    using (HttpClient httpClient = new HttpClient())
                                    {
                                        httpClient.Timeout = new TimeSpan(0, 0, 10);
                                        HttpResponseMessage responseMessage = httpClient.PostAsync(postUrl2, httpContent).Result;
                                        result2 = responseMessage.Content.ReadAsStringAsync().Result;
                                    }
                                }
                                _logger.LogInformation("result2:" + result2);
                                JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2);
                                if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1")
                                {
                                    cooperatecustomCustomerDTO.HuiyuanId = jobjectresult["UserID"].ToString();
                                    _cooperatecustomCustomerService.save(cooperatecustomCustomerDTO);
                                    resultEntity.Result = true;
                                }
                                else
                                {
                                    resultEntity.Result = false;
                                    resultEntity.Message = "开通招标信息网试用权限失败";
                                    return new JsonResult(resultEntity);
                                }
                            }
                            else
                            {
                              var cooperatecustomCustomerDTO = _intentionCustomerService.Get(data.CustomerId[i]);
                                JObject questions2 = new JObject();
                                questions2.Add("UserID", cooperatecustomCustomerDTO.HuiyuanId);
                                questions2.Add("UserName", cooperatecustomCustomerDTO.Name);
                                questions2.Add("PhoneNumber", cooperatecustomCustomerDTO.Tel);
                                questions2.Add("BusinessKey", "CGGG");
                                if (admAskzczbwsyDTO.Shiyongstandard == "01")
                                {
                                    questions2.Add("EndTime", DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss"));
                                }
                                else if (admAskzczbwsyDTO.Shiyongstandard == "02")
                                {
                                    questions2.Add("EndTime", DateTime.Now.AddMonths(2).ToString("yyyy-MM-dd HH:mm:ss"));
                                }
                                else if (admAskzczbwsyDTO.Shiyongstandard == "03")
                                {
                                    questions2.Add("EndTime", DateTime.Now.AddMonths(3).ToString("yyyy-MM-dd HH:mm:ss"));
                                }
                                questions2.Add("FromName", userDTO.UserName + " " + userDTO.Phone);
                                questions2.Add("Describe", "OA");
                                string requestJson2 = questions2.ToString();
                                string result2 = string.Empty;
                                using (HttpContent httpContent = new StringContent(requestJson2))
                                {
                                    httpContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
                                    using (HttpClient httpClient = new HttpClient())
                                    {
                                        httpClient.Timeout = new TimeSpan(0, 0, 10);
                                        HttpResponseMessage responseMessage = httpClient.PostAsync(postUrl2, httpContent).Result;
                                        result2 = responseMessage.Content.ReadAsStringAsync().Result;
                                    }
                                }
                                _logger.LogInformation("result2:" + result2);
                                JObject jobjectresult = (JObject)JsonConvert.DeserializeObject(result2);
                                if (jobjectresult["code"] != null && jobjectresult["code"].ToString() == "1")
                                {
                                    cooperatecustomCustomerDTO.HuiyuanId = jobjectresult["UserID"].ToString();
                                    _intentionCustomerService.save(cooperatecustomCustomerDTO);
                                    resultEntity.Result = true;
                                }
                                else
                                {
                                    resultEntity.Result = false;
                                    resultEntity.Message = "开通招标信息网试用权限失败";
                                    return new JsonResult(resultEntity);
                                }
                            }
                        }
                    }
                }
                    //发起流程相关
                resultEntity = _wfRunProcessService.WfAskZBXXW(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/AskZBXXW.cshtml
New file
@@ -0,0 +1,455 @@
@model AdmAskzczbwsyDTO;
@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> shiyongstandard = ViewData["shiyongstandard"] 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;
        }
        table {
            border-collapse: collapse;
            border: none;
            width: 900px;
            margin-left: 0px;
            text-align: center;
        }
        td {
            border: solid #000000 1px;
            height: 30px;
        }
    </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="Shiyongstandard" class="form-control" name="Shiyongstandard" data-placeholder="选择 序列 ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in shiyongstandard)
                                            {
                                                @if (!item.CodeSn.Equals(Model.Shiyongstandard))
                                                {
                                                    <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-7 col-md-7">
                                        <a class="btn btn-success" id="xuanze" href="javascript:void(0)" onclick="xuanzekehu();" style="margin-left:4px; border-radius:4px;">
                                            <i class="glyphicon glyphicon-ok"></i>&nbsp;&nbsp;<span class="bold">选择</span>
                                        </a>
                                    </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-8 col-md-8">
                                        <table style="width:95%;" id="kehutable">
                                            @{
                                                int i = 1;
                                            }
                                            <tr>
                                                @*<td style="width:10%;">  编号</td>*@
                                                <td style="width:60%;"> 客户名称</td>
                                                <td style="width:15%;"> 联系方式</td>
                                                <td style="width:15%;"> 客户类型</td>
                                                <td style="width:10%;">  删除</td>
                                            </tr>
                                            @*<tr class="Customers">
                    <td> 1</td>
                    <td>  测试客户</td>
                    <td>   测试电话</td>
                    <td>
                        合作客户
                        <input type="hidden" name="Customername" value="测试客户" />
                        <input type="hidden" name="Phone" value="测试电话" />
                        <input type="hidden" name="Customertype" value="合作客户" />
                        <input type="hidden" name="CustomerId" value="32423423432432434" />
                    </td>
                </tr>*@
                                            @if (Model.admAskzczbwsydtlDTOs != null && Model.admAskzczbwsydtlDTOs.Count > 0)
                                            {
                                                @foreach (var admAskzczbwsydtlDTO in Model.admAskzczbwsydtlDTOs)
                                                {
                                        <tr class="Customers">
                                            @*<td>  @i</td>*@
                                            <td>   @admAskzczbwsydtlDTO.Customername</td>
                                            <td>   @admAskzczbwsydtlDTO.Phone</td>
                                            <td>
                                                @admAskzczbwsydtlDTO.Customertype
                                                <input type="hidden" name="Customername" value="@admAskzczbwsydtlDTO.Customername" />
                                                <input type="hidden" name="Phone" value="@admAskzczbwsydtlDTO.Phone" />
                                                <input type="hidden" name="Customertype" value="@admAskzczbwsydtlDTO.Customertype" />
                                                <input type="hidden" name="CustomerId" value="@admAskzczbwsydtlDTO.CustomerId" />
                                            </td>
                                            <td style="width:10%;">   <button type="button" class="delBtn" onclick="delBtn(this)" data-type="3" style="width:32px">-</button> </td>
                                        </tr>
                                                    i++;
                                                }
                                            }
                                        </table>
                                    </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>&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();
                     $('#xuanze').hide();
                     $('.delBtn').hide();
                 } else {
                     $('#tongyi').hide();
                      $('#jujue').hide();
                     $('#tijiao').hide();
                     $('#shenpiyijian').hide();
                     $('#xuanze').hide();
                     $('.delBtn').hide();
                 }
            } else {
                  //审批相关
                 $('#shenpiyijian').hide();
                 if ("@sifoudangqian" == "A") {
                     $('#tongyi').hide();
                     $('#jujue').hide();
                     $('#CustomerId').chosen();
                 } else {
                     $('#tongyi').hide();
                      $('#jujue').hide();
                     $('#tijiao').hide();
                     $('#xuanze').hide();
                     $('.delBtn').hide();
                 }
            }
        })
        var xuanzekehu = function () {
            OpenWindow("选择客户", "98%", "100%", "/IntentionCustomer/IndexSelect");
        }
        // 保存
        function saveSimCost(tongyi) {
            if ($.trim($("#Shiyongstandard").val()) == '') {
                toastr.warning("试用期限不能为空");
                return;
            }
            var Customerss = $(".Customers");
            if (Customerss == null || Customerss.length <=0) {
                toastr.warning("客户不能为空");
                return;
            }
            $("#Tongguojujue").val(tongyi);
            $.ajax({
                type: "POST",
                url: "/AdmAsk/SaveZBXXW",
                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);
            }
        }
        function delBtn(obj) {
            console.info($(obj).parent().parent());
            $(obj).parent().parent().remove();
        }
    </script>
</body>
</html>
zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelect.cshtml
New file
@@ -0,0 +1,295 @@
@using DTO;
@{
    ViewBag.Title = "IntentionCustomer";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var khlxs = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khlx))';
        var khlys = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khly))';
        var hyfls = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.hyfl))';
        var users = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.users))';
        var shengDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShengDropDown))';
        var Creater = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Creater))';
        var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
        var Customertype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Customertype))';
        var Baomingtimebegin = '@Html.Raw(ViewBag.Baomingtimebegin)';
        var Baomingtimeend = '@Html.Raw(ViewBag.Baomingtimeend)';
        loseherght = 60;
        gridConfig = { multiselect: true, selectcol: "Id" };
        dataCol = [
            {
                label: 'id', name: 'Id', labtype: 'txt', hidden: true
            },
            { label: '建档时间', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '客户单位', name: 'Name', labtype: 'txt', hidden: false, width: 400
            },
            { label: '联系电话', name: 'Tel', labtype: 'txt', hidden: false, width: 100 },
            { label: '所属区域', name: 'ShengName', labtype: 'txt', hidden: false, width: 100  },
            { label: '客户来源', name: 'KhlyName', labtype: 'txt', hidden: false, width: 100  },
            { label: '行业分类', name: 'HyflName', labtype: 'txt', hidden: false, width: 100 },
            { label: '客户类型', name: 'KhlxName', labtype: 'txt', hidden: false, width: 100},
            { label: '业务经理', name: 'YwjlName', labtype: 'txt', hidden: false, width: 100 },
            { label: '客户种类', name: 'Customertype', labtype: 'txt', hidden: false, width: 100 },
        ];
        dataUrl = "/IntentionCustomer/GetListSelect?Createtime=" + Baomingtimebegin + "|" + Baomingtimeend +"&Customertype=01";
        searchCol = [
            { label: '客户来源', name: 'Khly', labtype: 'combox', hidden: false, data: JSON.parse(khlys), cwidth: '5%', cccwidth: '8%' },
            { label: '行业分类', name: 'Hyfl', labtype: 'combox', hidden: false, data: JSON.parse(hyfls), cwidth: '5%', cccwidth: '15%' },
            { label: '客户类型', name: 'Khlx', labtype: 'combox', hidden: false, data: JSON.parse(khlxs), cwidth: '5%', cccwidth: '8%' },
            { label: '业务经理', name: 'Ywjl', labtype: 'combox', hidden: false, data: JSON.parse(users), cwidth: '5%', cccwidth: '8%' },
            { label: '省', name: 'Sheng', labtype: 'combox', hidden: false, data: JSON.parse(shengDropDown), cwidth: '5%', cccwidth: '8%' },
            { label: '市', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '8%' },
            { label: '区县', name: 'AreaId', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '2%', cccwidth: '8%' },
            { label: '客户单位', name: 'Name', labtype: 'txt', hidden: false },
            { label: '建档时间', name: 'Createtime', labtype: 'datearea', hidden: false },
            { label: '客户种类', name: 'Customertype', labtype: 'combox', hidden: false, data: JSON.parse(Customertype), cwidth: '5%', cccwidth: '8%' },
        ];
         var _pageSearch = function () {
            $("#jqGrid").jqGrid('setGridParam', {
                url: dataUrl = "/IntentionCustomer/GetListSelect", postData: jsons, page: 1
            }); //重新载入
            var jsons = GetSearchEnd();
            if (jsons == false) {
                msg.info("请录入查询条件");
                return false;
            }
            LoadGrid(jsons);
        }
        var _pageZhuanyi = function () {
            var duanxin = GetGridSelect();
            var baifangid = "";
            if (duanxin != '') {
                var Customerss = $("[name=CustomerId]", window.parent.document);
                for (var i = 0; i < duanxin.length; i++) {
                    var ssss = true;
                    if (Customerss != null && Customerss.length > 0) {
                        for (var j = 0; j < Customerss.length; j++) {
                            //alert(Customerss[j].value);
                            //alert(duanxin[i]);
                            if (Customerss[j].value == duanxin[i]) {
                                ssss = false;
                            }
                        }
                    }
                   /* alert("ssss" + ssss);*/
                    if (ssss) {
                        baifangid += duanxin[i] + ',';
                        var rowData = $("#jqGrid").jqGrid('getRowData', duanxin[i]);
                        if (rowData.Tel == null || rowData.Tel == "") {
                            toastr.error("请补充客户联系电话");
                            return;
                        }
                        /*  alert(rowData.Id + ";" + rowData.Name + ";" + rowData.Tel + ";" + rowData.Customertype);*/
                        var oTr = document.createElement('tr');
                        $(oTr).addClass("Customers");
                        parent.kehutable.append(oTr);
                        $(oTr).html(`
                                                <td>  `+ rowData.Name + `</td>
                                                <td>    `+ rowData.Tel + `</td>
                                                <td>
                                                     `+ rowData.Customertype + `
                                                    <input type="hidden" name="Customername" value="`+ rowData.Name + `" />
                                                    <input type="hidden" name="Phone" value="`+ rowData.Tel + `" />
                                                    <input type="hidden" name="Customertype" value="`+ rowData.Customertype + `" />
                                                    <input type="hidden" name="CustomerId" value="`+ rowData.Id + `" />
                                                </td>
                                              <td style="width:10%;">   <button type="button" class="delBtn" onclick="delBtn(this)" data-type="3" style="width:32px">-</button> </td>
`);
                    }
                }
                baifangid = baifangid.substring(0, baifangid.length - 1);
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
                return false;
            } else {
                toastr.error("请选择客户");
                return;
            }
        }
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除失败");
        /**/
    }
        }
    </script>
}
@section footerScripts{
    <script type="text/javascript">
        function send() {
            var msg = $("#PBSSheng");
            if (msg.length > 0) {
                $("#PBSSheng").change(function () {
                    var sheng = $("#PBSSheng").val();
                    $.ajax({
                        type: "GET",
                        url: "/Project/getCity?shengid=" + sheng,
                        dataType: "json",
                        global: false,
                        data: "",
                        success: function (data) {
                            var city = $("#PBSCity");
                            city.find('option').remove();
                            var aaa = '<option value="" hassubinfo="true">&nbsp;</option>';
                            city.append(aaa);
                            if (data.length > 0) {
                                for (var i = 0; i < data.length; i++) {
                                    var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
                                    city.append(o);
                                }
                            }
                            $("#PBSCity").trigger('chosen:updated');//更新选项
                        },
                        error: function () {
                            parent.layer.msg('失败', { icon: 5 });
                        }
                    });
                });
            } else {
                setTimeout(send, 1000);
            }
        }
        send();
        function sendCity() {
            var msg = $("#PBSCity");
            if (msg.length > 0) {
                $("#PBSCity").change(function () {
                    var city = $("#PBSCity").val();
                    $.ajax({
                        type: "GET",
                        url: "/Project/getAreaId?cityid=" + city,
                        dataType: "json",
                        global: false,
                        data: "",
                        success: function (data) {
                            var quxian = $("#PBSAreaId");
                            quxian.find('option').remove();
                            var aaa = '<option value="" hassubinfo="true">&nbsp;</option>';
                            quxian.append(aaa);
                            if (data.length > 0) {
                                for (var i = 0; i < data.length; i++) {
                                    var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
                                    quxian.append(o);
                                }
                            }
                            $("#PBSAreaId").trigger('chosen:updated');//更新选项
                        },
                        error: function () {
                            parent.layer.msg('失败', { icon: 5 });
                        }
                    });
                });
            } else {
                setTimeout(sendCity, 1000);
            }
        }
        sendCity();
        $(function () {
            $("#PBSCreatetimeend").val(Baomingtimeend);
            $("#PBSCreatetimestart").val(Baomingtimebegin);
            $("#PBSCustomertype").val("01");
            $("#PBSCustomertype").trigger('chosen:updated');//更新选项
        });
    </script>
}
zhengcaioa/zhengcaioa/appsettings.Development.json
@@ -12,9 +12,9 @@
    }
  },
  "AllowedHosts": "*",
  "Elasticsearchurl": "http://192.168.0.116:9200",
  "Elasticsearchurl": "http://192.168.0.4:9200",
  "SecurityKey": "superSecretKey@345",
  "Shuchengurl": "http://192.168.0.191:8085",
  "Shuchengurl": "http://192.168.0.7:8085",
  "GetShopUsers": "/actionapi/Shop/GetShopUsers",
  "huiyuanurl": "http://192.168.0.113:8087",
  "GetDateFirstOrderUser": "/api/ZCBackgRound/GetDateFirstOrderUser",
@@ -25,6 +25,7 @@
  "yaoqingma": "https://applet.51zhengcai.com:8088/code/",
  "PassPoints": "/api/UserPoints/PassPoints",
  "OaWriteTrainClassOder": "/api/ZCBackgRound/OaWriteTrainClassOder",
  "OAWriteChangeAsync": "/api/ZCBackgRound/OAWriteChangeAsync"
  "OAWriteChangeAsync": "/api/ZCBackgRound/OAWriteChangeAsync",
  "OASetOtherBusiness": "/api/ZCBackgRound/OASetOtherBusiness"
}
zhengcaioa/zhengcaioa/appsettings.json
@@ -25,5 +25,6 @@
  "yaoqingma": "https://applet.51zhengcai.com:8088/code/",
  "PassPoints": "/api/UserPoints/PassPoints",
  "OaWriteTrainClassOder": "/api/ZCBackgRound/OaWriteTrainClassOder",
  "OAWriteChangeAsync": "/api/ZCBackgRound/OAWriteChangeAsync"
  "OAWriteChangeAsync": "/api/ZCBackgRound/OAWriteChangeAsync",
  "OASetOtherBusiness": "/api/ZCBackgRound/OASetOtherBusiness"
}