From 6108fe7c4f3a329e8d309d00ee0b1761b8c5ad8f Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 16 十二月 2022 09:39:55 +0800
Subject: [PATCH] 请示批复”里增加“招标信息网”的试用权限

---
 zhengcaioa/IServices/IAskService.cs                                       |    6 
 zhengcaioa/Crawler/sichuan/CcgpSichuanoperation.cs                        |   20 
 zhengcaioa/Services/WfRunProcessService.cs                                |  351 +++++++++++
 zhengcaioa/Model/AdmAskzczbwsydtl.cs                                      |   17 
 zhengcaioa/Services/CooperatecustomCustomerService.cs                     |    1 
 zhengcaioa/IServices/IWfRunProcessService.cs                              |    2 
 zhengcaioa/DTO/CooperatecustomCustomerDTO.cs                              |    2 
 zhengcaioa/DTO/AdmAskzczbwsyDTO.cs                                        |   31 +
 zhengcaioa/Model/zhengcaioaContext.cs                                     |   81 ++
 zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs                           |    6 
 zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelect.cshtml          |  295 +++++++++
 zhengcaioa/Services/AskService.cs                                         |   97 +++
 zhengcaioa/zhengcaioa/appsettings.Development.json                        |    7 
 zhengcaioa/Model/AdmAskzczbwsy.cs                                         |   22 
 zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs               |  276 +++++++++
 zhengcaioa/DTO/IntentionCustomerDTO.cs                                    |    5 
 zhengcaioa/Services/IntentionCustomerService.cs                           |    5 
 zhengcaioa/zhengcaioa/Views/AdmAsk/AskZBXXW.cshtml                        |  455 +++++++++++++++
 zhengcaioa/DTO/AdmAskzczbwsydtlDTO.cs                                     |   16 
 zhengcaioa/Model/IntentionCustomer.cs                                     |    1 
 zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs |  100 +++
 zhengcaioa/zhengcaioa/appsettings.json                                    |    3 
 22 files changed, 1,784 insertions(+), 15 deletions(-)

diff --git a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
index 8d54d28..f1c31ec 100644
--- a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
+++ b/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>();
+
         }
     }
 }
diff --git a/zhengcaioa/Crawler/sichuan/CcgpSichuanoperation.cs b/zhengcaioa/Crawler/sichuan/CcgpSichuanoperation.cs
index f29938b..bbb7387 100644
--- a/zhengcaioa/Crawler/sichuan/CcgpSichuanoperation.cs
+++ b/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)
diff --git a/zhengcaioa/DTO/AdmAskzczbwsyDTO.cs b/zhengcaioa/DTO/AdmAskzczbwsyDTO.cs
new file mode 100644
index 0000000..fe850c0
--- /dev/null
+++ b/zhengcaioa/DTO/AdmAskzczbwsyDTO.cs
@@ -0,0 +1,31 @@
+锘縰sing 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; }
+    }
+}
diff --git a/zhengcaioa/DTO/AdmAskzczbwsydtlDTO.cs b/zhengcaioa/DTO/AdmAskzczbwsydtlDTO.cs
new file mode 100644
index 0000000..7fc8acf
--- /dev/null
+++ b/zhengcaioa/DTO/AdmAskzczbwsydtlDTO.cs
@@ -0,0 +1,16 @@
+锘縰sing 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; }
+    }
+}
diff --git a/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs b/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs
index 6cd5a06..1ec87e0 100644
--- a/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs
+++ b/zhengcaioa/DTO/CooperatecustomCustomerDTO.cs
@@ -79,6 +79,8 @@
 
         public string Zhiwu { get; set; }
 
+        public string Customertype { get; set; }
+
     }
 
     public class CooperatecustomCustomerDTOSearch : SearchEntity
diff --git a/zhengcaioa/DTO/IntentionCustomerDTO.cs b/zhengcaioa/DTO/IntentionCustomerDTO.cs
index 40c2464..828629e 100644
--- a/zhengcaioa/DTO/IntentionCustomerDTO.cs
+++ b/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; }
+        
+
     }
 }
diff --git a/zhengcaioa/IServices/IAskService.cs b/zhengcaioa/IServices/IAskService.cs
index 60c1a9e..f640b5d 100644
--- a/zhengcaioa/IServices/IAskService.cs
+++ b/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);
     }
 }
diff --git a/zhengcaioa/IServices/IWfRunProcessService.cs b/zhengcaioa/IServices/IWfRunProcessService.cs
index 3037128..2371cc7 100644
--- a/zhengcaioa/IServices/IWfRunProcessService.cs
+++ b/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);
     }
 }
diff --git a/zhengcaioa/Model/AdmAskzczbwsy.cs b/zhengcaioa/Model/AdmAskzczbwsy.cs
new file mode 100644
index 0000000..1fe6b90
--- /dev/null
+++ b/zhengcaioa/Model/AdmAskzczbwsy.cs
@@ -0,0 +1,22 @@
+锘縰sing 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; }
+    }
+}
diff --git a/zhengcaioa/Model/AdmAskzczbwsydtl.cs b/zhengcaioa/Model/AdmAskzczbwsydtl.cs
new file mode 100644
index 0000000..babd3f3
--- /dev/null
+++ b/zhengcaioa/Model/AdmAskzczbwsydtl.cs
@@ -0,0 +1,17 @@
+锘縰sing 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; }
+    }
+}
diff --git a/zhengcaioa/Model/IntentionCustomer.cs b/zhengcaioa/Model/IntentionCustomer.cs
index 783869e..9b1825f 100644
--- a/zhengcaioa/Model/IntentionCustomer.cs
+++ b/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; }
     }
 }
diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs
index 3cce961..2fa3a83 100644
--- a/zhengcaioa/Model/zhengcaioaContext.cs
+++ b/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")
diff --git a/zhengcaioa/Services/AskService.cs b/zhengcaioa/Services/AskService.cs
index 7f74cfa..a777b05 100644
--- a/zhengcaioa/Services/AskService.cs
+++ b/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
+
     }
 }
diff --git a/zhengcaioa/Services/CooperatecustomCustomerService.cs b/zhengcaioa/Services/CooperatecustomCustomerService.cs
index acdb492..459f0b9 100644
--- a/zhengcaioa/Services/CooperatecustomCustomerService.cs
+++ b/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();
 
diff --git a/zhengcaioa/Services/IntentionCustomerService.cs b/zhengcaioa/Services/IntentionCustomerService.cs
index 44f86b8..540eeb7 100644
--- a/zhengcaioa/Services/IntentionCustomerService.cs
+++ b/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 = "妗f瀹㈡埛",
                                  Yixiangtime = a.Yixiangtime,
                                  YixiangtimeName = a.Yixiangtime.HasValue? a.Yixiangtime.Value.ToString("yyyy-MM-dd"):"",
                                  Yixiang = a.Yixiang,
diff --git a/zhengcaioa/Services/WfRunProcessService.cs b/zhengcaioa/Services/WfRunProcessService.cs
index fa49335..8433957 100644
--- a/zhengcaioa/Services/WfRunProcessService.cs
+++ b/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;
+        }
     }
 }
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
index dc80ff0..70ebb6f 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
+++ b/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)
         {
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
index 23e8156..66e6368 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
+++ b/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);
+        }
+
     }
 }
diff --git a/zhengcaioa/zhengcaioa/Views/AdmAsk/AskZBXXW.cshtml b/zhengcaioa/zhengcaioa/Views/AdmAsk/AskZBXXW.cshtml
new file mode 100644
index 0000000..a9aaf9f
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/AdmAsk/AskZBXXW.cshtml
@@ -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>
\ No newline at end of file
diff --git a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelect.cshtml b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelect.cshtml
new file mode 100644
index 0000000..41741c5
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexSelect.cshtml
@@ -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>
+}
diff --git a/zhengcaioa/zhengcaioa/appsettings.Development.json b/zhengcaioa/zhengcaioa/appsettings.Development.json
index 9cb38fc..e86b578 100644
--- a/zhengcaioa/zhengcaioa/appsettings.Development.json
+++ b/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"
 
 }
diff --git a/zhengcaioa/zhengcaioa/appsettings.json b/zhengcaioa/zhengcaioa/appsettings.json
index 34667c2..1750af0 100644
--- a/zhengcaioa/zhengcaioa/appsettings.json
+++ b/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"
 }

--
Gitblit v1.9.1