From 1c5d7b4b5b9d7fab7d10be4775ea5ba4420aeecc Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 03 八月 2021 13:40:11 +0800
Subject: [PATCH] 今日开发   会员提现申请发起接口,会员提现申请审批

---
 zhengcaioa/IServices/IAskService.cs                                     |    6 
 zhengcaioa/zhengcaioa/Controllers/OA/WfApplytypeController.cs           |    2 
 zhengcaioa/Services/WfRunProcessService.cs                              |  338 ++++++++++++++
 zhengcaioa/IServices/IWfRunProcessService.cs                            |    2 
 zhengcaioa/DTO/AdmCustomerWithdrawalDTO.cs                              |   31 +
 zhengcaioa/Model/zhengcaioaContext.cs                                   |   67 ++
 表修改.sql                                                                 |  161 +++++++
 zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs                         |    3 
 zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerWithdrawal.cshtml            |  344 ++++++++++++++
 zhengcaioa/Services/AskService.cs                                       |   71 +++
 zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs             |  120 +++++
 zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs |  184 ++++++++
 zhengcaioa/Model/AdmCustomerWithdrawal.cs                               |   27 +
 13 files changed, 1,354 insertions(+), 2 deletions(-)

diff --git a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
index 92fedbb..1a0ebb0 100644
--- a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
+++ b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -249,6 +249,9 @@
             CreateMap<AdmAskBaiFang, AdmAskBaiFangDTO>();
             CreateMap<AdmAskBaiFangDTO, AdmAskBaiFang>();
 
+            CreateMap<AdmCustomerWithdrawal, AdmCustomerWithdrawalDTO>();
+            CreateMap<AdmCustomerWithdrawalDTO, AdmCustomerWithdrawal>(); 
+
         }
     }
 }
diff --git a/zhengcaioa/DTO/AdmCustomerWithdrawalDTO.cs b/zhengcaioa/DTO/AdmCustomerWithdrawalDTO.cs
new file mode 100644
index 0000000..d47495d
--- /dev/null
+++ b/zhengcaioa/DTO/AdmCustomerWithdrawalDTO.cs
@@ -0,0 +1,31 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace DTO
+{
+    public class AdmCustomerWithdrawalDTO
+    {
+        public string Id { get; set; }
+        public string OrderNo { get; set; }
+        public decimal? Jine { get; set; }
+        public string JineName { get; set; }
+        public string HuiyuanName { get; set; }
+        public string HuiyuanId { get; set; }
+        public string HuiyuanPhone { get; set; }
+        public DateTime Shenqingtime { get; set; }
+        public string ShenqingtimeName { 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; }
+    }
+}
diff --git a/zhengcaioa/IServices/IAskService.cs b/zhengcaioa/IServices/IAskService.cs
index 4af4021..00062f7 100644
--- a/zhengcaioa/IServices/IAskService.cs
+++ b/zhengcaioa/IServices/IAskService.cs
@@ -41,5 +41,11 @@
         //璁块棶璇风ず
         ResultEntity SaveAskBaiFang(AdmAskBaiFangDTO admAsk);
         AdmAskBaiFangDTO GetAskBaiFang(string Id);
+
+        //浼氬憳鎻愮幇鐢宠
+        ResultEntity SaveCustomerWithdrawal(AdmCustomerWithdrawalDTO admAsk);
+        AdmCustomerWithdrawalDTO GetCustomerWithdrawal(string Id);
+
+        List<AdmCustomerWithdrawalDTO> GetCustomerWithdrawalList(string OrderNo);
     }
 }
diff --git a/zhengcaioa/IServices/IWfRunProcessService.cs b/zhengcaioa/IServices/IWfRunProcessService.cs
index 6694fba..3a8a641 100644
--- a/zhengcaioa/IServices/IWfRunProcessService.cs
+++ b/zhengcaioa/IServices/IWfRunProcessService.cs
@@ -42,5 +42,7 @@
         ResultEntity WfAskYouHui(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
 
         ResultEntity WfAskBaiFang(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
+
+        ResultEntity WfCustomerWithdrawal(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
     }
 }
diff --git a/zhengcaioa/Model/AdmCustomerWithdrawal.cs b/zhengcaioa/Model/AdmCustomerWithdrawal.cs
new file mode 100644
index 0000000..24b3a4a
--- /dev/null
+++ b/zhengcaioa/Model/AdmCustomerWithdrawal.cs
@@ -0,0 +1,27 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+#nullable disable
+
+namespace zhengcaioa.Models
+{
+    public partial class AdmCustomerWithdrawal
+    {
+        public string Id { get; set; }
+        public string OrderNo { get; set; }
+        public decimal? Jine { get; set; }
+        public string HuiyuanName { get; set; }
+        public string HuiyuanId { get; set; }
+        public string HuiyuanPhone { get; set; }
+        public DateTime Shenqingtime { 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/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs
index 4bd4130..7cc84d4 100644
--- a/zhengcaioa/Model/zhengcaioaContext.cs
+++ b/zhengcaioa/Model/zhengcaioaContext.cs
@@ -38,6 +38,7 @@
         public virtual DbSet<AdmAttendanceRule> AdmAttendanceRules { get; set; }
         public virtual DbSet<AdmAttendanceRulesDtl> AdmAttendanceRulesDtls { get; set; }
         public virtual DbSet<AdmBreakPrecedent> AdmBreakPrecedents { get; set; }
+        public virtual DbSet<AdmCustomerWithdrawal> AdmCustomerWithdrawals { get; set; }
         public virtual DbSet<AdmHoldPhone> AdmHoldPhones { get; set; }
         public virtual DbSet<AdmMemoBook> AdmMemoBooks { get; set; }
         public virtual DbSet<AdmSignIn> AdmSignIns { get; set; }
@@ -1086,6 +1087,72 @@
                     .HasComment("鍛樺伐");
             });
 
+            modelBuilder.Entity<AdmCustomerWithdrawal>(entity =>
+            {
+                entity.ToTable("ADM_Customer_withdrawal");
+
+                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.HuiyuanId).HasMaxLength(50);
+
+                entity.Property(e => e.HuiyuanName).HasMaxLength(100);
+
+                entity.Property(e => e.HuiyuanPhone).HasMaxLength(50);
+
+                entity.Property(e => e.Jine)
+                    .HasColumnType("money")
+                    .HasDefaultValueSql("((0))");
+
+                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.OrderNo).HasMaxLength(50);
+
+                entity.Property(e => e.RecStatus)
+                    .IsRequired()
+                    .HasMaxLength(1)
+                    .HasColumnName("rec_status")
+                    .HasDefaultValueSql("('A')");
+
+                entity.Property(e => e.Remark).HasMaxLength(500);
+
+                entity.Property(e => e.ShenpiStatus)
+                    .HasMaxLength(1)
+                    .HasColumnName("shenpi_status")
+                    .HasDefaultValueSql("('D')");
+
+                entity.Property(e => e.Shenqingtime)
+                    .HasColumnType("datetime")
+                    .HasDefaultValueSql("(getdate())");
+
+                entity.Property(e => e.Tittle)
+                    .HasMaxLength(50)
+                    .HasColumnName("tittle");
+            });
+
             modelBuilder.Entity<AdmHoldPhone>(entity =>
             {
                 entity.ToTable("ADM_HoldPhone");
diff --git a/zhengcaioa/Services/AskService.cs b/zhengcaioa/Services/AskService.cs
index dd1c59b..c37b993 100644
--- a/zhengcaioa/Services/AskService.cs
+++ b/zhengcaioa/Services/AskService.cs
@@ -450,5 +450,76 @@
 
         #endregion
 
+        #region 浼氬憳鎻愮幇鐢宠
+        public ResultEntity SaveCustomerWithdrawal(AdmCustomerWithdrawalDTO admAsk)
+        {
+            ResultEntity resultEntity = new ResultEntity();
+            try
+            {
+                AdmCustomerWithdrawal ask = _mapper.Map<AdmCustomerWithdrawal>(admAsk);
+                if (string.IsNullOrEmpty(admAsk.Id))
+                {
+                    ask.Id = Guid.NewGuid().ToString();
+                    admAsk.Id = ask.Id;
+                    _context.AdmCustomerWithdrawals.Add(ask);
+                }
+                else
+                {
+                    var entity = _context.AdmCustomerWithdrawals.Find(admAsk.Id);
+
+                    entity.OrderNo = admAsk.OrderNo;
+                    entity.Jine = admAsk.Jine;
+                    entity.HuiyuanName = admAsk.HuiyuanName;
+                    entity.HuiyuanId = admAsk.HuiyuanId;
+                    entity.HuiyuanPhone = admAsk.HuiyuanPhone;
+                    entity.Shenqingtime = admAsk.Shenqingtime;
+
+
+                    entity.ShenpiStatus = admAsk.ShenpiStatus;
+                    entity.CreaterName = admAsk.CreaterName;
+                    entity.Tittle = admAsk.Tittle;
+
+
+
+                    entity.Modifier = admAsk.Modifier;
+                    entity.Modifytime = DateTime.Now;
+                }
+                _context.SaveChanges();
+                resultEntity.ReturnID = ask.Id;
+                resultEntity.Result = true;
+            }
+            catch (Exception ex)
+            {
+                resultEntity.Result = false;
+                resultEntity.Message = "淇濆瓨澶辫触锛岃鑱旂郴绠$悊鍛�";
+                ex.Message.ToString();
+            }
+
+            return resultEntity;
+        }
+
+        public AdmCustomerWithdrawalDTO GetCustomerWithdrawal(string Id)
+        {
+            var entity = _context.AdmCustomerWithdrawals.Where(e => e.RecStatus == "A" && e.Id == Id).FirstOrDefault();
+            if (entity == null)
+            {
+                entity = new AdmCustomerWithdrawal();
+            }
+            var leaveDTO = _mapper.Map<AdmCustomerWithdrawalDTO>(entity);
+            return leaveDTO;
+
+        }
+
+        public List<AdmCustomerWithdrawalDTO> GetCustomerWithdrawalList(string OrderNo)
+        {
+            var entity = _context.AdmCustomerWithdrawals.Where(e => e.RecStatus == "A" && e.OrderNo == OrderNo).ToList();
+            
+            var leaveDTO = _mapper.Map<List<AdmCustomerWithdrawalDTO>>(entity);
+            return leaveDTO;
+
+        }
+
+        #endregion
+
     }
 }
diff --git a/zhengcaioa/Services/WfRunProcessService.cs b/zhengcaioa/Services/WfRunProcessService.cs
index 5541884..4499b1a 100644
--- a/zhengcaioa/Services/WfRunProcessService.cs
+++ b/zhengcaioa/Services/WfRunProcessService.cs
@@ -6018,5 +6018,343 @@
             return result;
         }
 
+        public ResultEntity WfCustomerWithdrawal(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, "20").FirstOrDefault();
+            if (wfRunProcessDTO != null)
+            {
+                version = wfRunProcessDTO.Version;
+            }
+
+
+            if (version == "v1")
+            {
+                if (step == "鎻愪氦")
+                {
+                    //鏇存柊娴佺▼瀹炰緥
+                    // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "20").FirstOrDefault();
+                    if (wfRunProcessDTO == null)
+                    {
+                        //鎻掑叆娴佺▼瀹炰緥
+                        wfRunProcessDTO = new WfRunProcessDTO();
+                        //wfRunProcessDTO.Applyno = 
+                        wfRunProcessDTO.Applytime = DateTime.Now;
+                        wfRunProcessDTO.Applytiye = "20";
+                        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/CustomerWithdrawal?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/CustomerWithdrawal?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/CustomerWithdrawal?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/CustomerWithdrawal?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, "20").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 admCustomerWithdrawal = _context.AdmCustomerWithdrawals.Find(DanjuId);
+                        if (wfRunProcessDTO == null)
+                        {
+                            result.Result = false;
+                            result.Message = "鏈壘鍒板崟鎹�";
+                            return result;
+                        }
+                        admCustomerWithdrawal.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.ShenpiStatus = "R";
+                        wfRunProcessDTO.Modifier = Userid;
+                        wfRunProcessDTO.Modifytime = DateTime.Now;
+                        result = this.save(wfRunProcessDTO);
+                        if (result.Result == false)
+                        {
+                            return result;
+                        }
+                        //鏇存柊鍗曟嵁
+                        var admCustomerWithdrawal = _context.AdmCustomerWithdrawals.Find(DanjuId);
+                        if (wfRunProcessDTO == null)
+                        {
+                            result.Result = false;
+                            result.Message = "鏈壘鍒板崟鎹�";
+                            return result;
+                        }
+                        admCustomerWithdrawal.ShenpiStatus = "R";
+                        _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 = "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();
+
+
+                        
+
+                    }
+
+
+
+                }
+
+
+            }
+
+
+
+            return result;
+        }
+
     }
 }
diff --git a/zhengcaioa/zhengcaioa/Controllers/OA/WfApplytypeController.cs b/zhengcaioa/zhengcaioa/Controllers/OA/WfApplytypeController.cs
index 8505c05..fba106c 100644
--- a/zhengcaioa/zhengcaioa/Controllers/OA/WfApplytypeController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/OA/WfApplytypeController.cs
@@ -34,7 +34,7 @@
         {
             
 
-            ViewBag.wfApplytypeDTOs = _wfApplytypeService.GetList().Where(x => x.Applyno != "03").ToList();
+            ViewBag.wfApplytypeDTOs = _wfApplytypeService.GetList().Where(x => x.Applyno != "03" && x.Applyno != "20").ToList();
             return View();
         }
     }
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
index 61d4363..3b23945 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
@@ -1162,7 +1162,7 @@
 
 
         /// <summary>
-        /// 淇濆瓨閿�鍞垂鐢ㄧ敵璇�
+        /// 淇濆瓨鎷滆鐢宠
         /// </summary>
         /// <param name="data"></param>
         /// <returns></returns>
@@ -1203,5 +1203,123 @@
             }
             return new JsonResult(resultEntity);
         }
+
+
+        public IActionResult CustomerWithdrawal(string id = "")
+        {
+            AdmCustomerWithdrawalDTO dto = new AdmCustomerWithdrawalDTO();
+            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.GetCustomerWithdrawal(id);
+                dto.ShenqingtimeName = dto.Shenqingtime.ToString("yyyy-MM-dd");
+                dto.JineName = dto.Jine.Value.ToString("F2");
+
+                var wfRunProcessDTO = _wfRunProcessService.GetList(dto.Id, "20").FirstOrDefault();
+                if (wfRunProcessDTO == null)
+                {
+                    shifoubiaoji = "D";
+                    sifoudangqian = "D";
+                }
+                else
+                {
+                    dangqianbuzhou = wfRunProcessDTO.Step;
+                    //鏌ヨ瀹℃壒杩涘害
+                    lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id);
+                    if (wfRunProcessDTO.Step != "鎻愪氦")
+                    {
+                        shifoubiaoji = "D";
+                    }
+
+                    //鏌ヨ寰呭姙
+                    var chaxundaiban = _wfNeeddeelService.GetListTracking(wfRunProcessDTO.Id, wfRunProcessDTO.Step).Where(x => x.DeelUserId == curentuser.Id).ToList();
+                    if (chaxundaiban != null && chaxundaiban.Count > 0)
+                    {
+                        sifoudangqian = "A";
+                    }
+                    else
+                    {
+                        sifoudangqian = "D";
+                    }
+
+                }
+
+
+
+
+            }
+
+            ViewBag.shifoubiaoji = shifoubiaoji;
+            ViewBag.sifoudangqian = sifoudangqian;
+            ViewBag.lishiyijian = lishiyijian;
+            ViewBag.dangqianbuzhou = dangqianbuzhou;
+
+            //ViewBag.jtype = _liaotianService.GetSYScode("CooperVisit", "jtype");
+            //ViewBag.visType = _liaotianService.GetSYScode("CooperVisit", "visType");
+            //var cooperatecustomCustomerDTOs = _cooperatecustomCustomerService.GetList();
+            //var intentionCustomerDTOs = _intentionCustomerService.GetList();
+
+            //ViewBag.CooperatecustomCustomerDTOs = 
+
+            ViewData.Model = dto;
+            return View();
+        }
+
+
+        /// <summary>
+        /// 浼氬憳鎻愮幇鐢宠
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult SaveCustomerWithdrawal(AdmCustomerWithdrawalDTO 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.SaveCustomerWithdrawal(data);
+                    if (!resultEntity.Result)
+                    {
+                        return new JsonResult(resultEntity);
+                    }
+                }
+
+
+
+                //鍙戣捣娴佺▼鐩稿叧
+
+                resultEntity = _wfRunProcessService.WfCustomerWithdrawal(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/Controllers/admin/CustomerWithdrawalController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs
new file mode 100644
index 0000000..b3cdab9
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs
@@ -0,0 +1,184 @@
+锘縰sing DTO;
+using IServices;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Transactions;
+using zhengcaioa.IService;
+using zhengcaioa.Models;
+
+namespace zhengcaioa.Controllers.admin
+{
+  
+    public class CustomerWithdrawalController : Controller
+    {
+
+        private readonly IHrDeptService _hrDeptService;
+        private readonly ILogger<CustomerWithdrawalController> _logger;
+        private readonly IAskService _askService;
+        private readonly IWfRunProcessService _wfRunProcessService;
+        private readonly IWfHistoryService _wfHistoryService;
+        private readonly IWfNeeddeelService _wfNeeddeelService;
+        private readonly IAdmGoodsManageService _admGoodsManageService;
+        private readonly ILiaotianService _liaotianService;
+        private readonly IUserService _userService;
+        private readonly IAdmBreakPrecedentService _aAdmBreakPrecedentService;
+        private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
+        private readonly IIntentionCustomerService _intentionCustomerService;
+
+        public CustomerWithdrawalController(ILogger<CustomerWithdrawalController> logger, IAskService askService, IHrDeptService hrDeptService, IWfRunProcessService wfRunProcessService
+            , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService
+            , IAdmGoodsManageService admGoodsManageService
+            , ILiaotianService liaotianService
+            , IUserService userService
+            , IAdmBreakPrecedentService aAdmBreakPrecedentService
+            , ICooperatecustomCustomerService cooperatecustomCustomerService
+            , IIntentionCustomerService intentionCustomerService)
+        {
+            _logger = logger;
+            _hrDeptService = hrDeptService;
+            _askService = askService;
+            _wfRunProcessService = wfRunProcessService;
+            _wfHistoryService = wfHistoryService;
+            _wfNeeddeelService = wfNeeddeelService;
+            _admGoodsManageService = admGoodsManageService;
+            _liaotianService = liaotianService;
+            _userService = userService;
+            _aAdmBreakPrecedentService = aAdmBreakPrecedentService;
+            _cooperatecustomCustomerService = cooperatecustomCustomerService;
+            _intentionCustomerService = intentionCustomerService;
+        }
+
+
+
+
+
+        /// <summary>
+        /// 浼氬憳鎻愮幇鐢宠
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult AskCustomerWithdrawal([FromBody] AdmCustomerWithdrawalDTO data)
+        {
+            ReturnMsg<AdmCustomerWithdrawalDTO> returnMsg = new ReturnMsg<AdmCustomerWithdrawalDTO>();
+            returnMsg.code = 2;
+            try
+            {
+                //楠岃瘉鏁版嵁瀹屾暣鎬�
+                if (string.IsNullOrWhiteSpace(data.OrderNo))
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁璁㈠崟鍙凤紒";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+                if (string.IsNullOrWhiteSpace(data.HuiyuanId))
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁浼氬憳id锛�";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+                if (string.IsNullOrWhiteSpace(data.HuiyuanName))
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁浼氬憳鍚嶇О锛�";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+                if (string.IsNullOrWhiteSpace(data.HuiyuanPhone))
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁浼氬憳鐢佃瘽锛�";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+                if (data.Shenqingtime == DateTime.MinValue)
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁鐢宠鏃ユ湡锛�";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+                if (!data.Jine.HasValue)
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁鎻愮幇閲戦锛�";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+              
+                ResultEntity resultEntity = new ResultEntity();
+                using (TransactionScope scope = new TransactionScope())
+                {
+
+                    //楠岃瘉鏄惁閲嶅鍙戣捣
+                    if(_askService.GetCustomerWithdrawalList(data.OrderNo).Count > 0)
+                    {
+                        returnMsg.code = 2;
+                        returnMsg.error = "璇ヨ鍗曞凡缁忓彂璧锋祦绋嬶紒";
+                        returnMsg.count = 0;
+                        return new JsonResult(returnMsg);
+                    }
+
+
+
+                    //娴佺▼姝ラ
+                    data.Step = "鎻愪氦";
+                    data.Tongguojujue = "";
+                    data.Content = "";
+                    data.Tittle = "浼氬憳鎻愮幇鐢宠锛�" + data.HuiyuanName + "锛�";
+
+                    data.CreaterName = data.HuiyuanName;
+                    data.ShenpiStatus = "D";
+                    data.RecStatus = "A";
+                    data.Creater = "e4c93811-b9b1-4998-89f5-c416ebab0c07";
+                    data.Createtime = DateTime.Now;
+                    data.Modifier = data.Creater;
+                    data.Modifytime = data.Createtime;
+
+                    resultEntity = _askService.SaveCustomerWithdrawal(data);
+                    if (!resultEntity.Result)
+                    {
+                        returnMsg.code = 2;
+                        returnMsg.error = resultEntity.Message;
+                        returnMsg.count = 0;
+                        return new JsonResult(returnMsg);
+                    }
+
+
+
+
+                    //鍙戣捣娴佺▼鐩稿叧
+
+                    resultEntity = _wfRunProcessService.WfCustomerWithdrawal(data.Id, data.Step, data.Tongguojujue, "e4c93811-b9b1-4998-89f5-c416ebab0c07", data.Content, data.Tittle, "v1");
+                    if (!resultEntity.Result)
+                    {
+                        returnMsg.code = 2;
+                        returnMsg.error = resultEntity.Message;
+                        returnMsg.count = 0;
+                        return new JsonResult(returnMsg);
+                    }
+                    scope.Complete();
+                    returnMsg.code = 1;
+                    returnMsg.returnObj = null;
+                    returnMsg.count = 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                returnMsg.count = 0;
+
+            }
+            return new JsonResult(returnMsg);
+        }
+    }
+}
diff --git a/zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerWithdrawal.cshtml b/zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerWithdrawal.cshtml
new file mode 100644
index 0000000..9729509
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerWithdrawal.cshtml
@@ -0,0 +1,344 @@
+锘緻model AdmCustomerWithdrawalDTO;
+@using DTO;
+@using zhengcaioa.Models;
+@{
+    Layout = null;
+
+    //娴佺▼鐩稿叧
+    string shifoubiaoji = ViewBag.shifoubiaoji as string;
+    string sifoudangqian = ViewBag.sifoudangqian as string;
+    string dangqianbuzhou = ViewBag.dangqianbuzhou as string;
+
+    List<WfHistoryDTO> lishiyijian = ViewData["lishiyijian"] as List<WfHistoryDTO>; //瀹℃壒杩涘害
+
+
+ 
+}
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+    <meta name="description" content="">
+    <meta name="author" content="ThemeBucket">
+    <link href="~/css/bootstrap.min.css" rel="stylesheet">
+    <link href="~/css/font-awesome.min.css" rel="stylesheet">
+    <link href="~/css/animate.min.css" rel="stylesheet">
+    <link href="~/css/style.min.css" rel="stylesheet">
+    <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
+    <link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">
+    <link href="~/css/style.min.css" rel="stylesheet">
+    <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
+
+    <!-- jqgrid-->
+    <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
+    <script src="~/js/bootstrap.min.js"></script>
+
+    <!--瀹瑰櫒-->
+    <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
+    <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
+    <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
+    <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
+    <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
+    <script src="~/js/TUJS.js"></script>
+
+    <style type="text/css">
+
+        div.clearfix > label {
+            padding-top: 8px;
+        }
+
+        .col-md-1.control-label {
+            padding-right: 0px;
+            font-weight: 400;
+        }
+    </style>
+
+
+</head>
+
+<body class="gray-bg" style="overflow:auto">
+    <form id="fm" method="post">
+        <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="ibox float-e-margins">
+                        <div id="div_content" class="ibox-content" style="background-color:white;">
+                            <div class="row">
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">鍗曟嵁鍚嶇О<i class="red">*</i></label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <input type="text" class="form-control" value="@Model.Tittle" name="tittle" id="tittle" validate="RequiredField" autocomplete="off" readonly="readonly">
+
+                                    </div>
+                                </div>
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">鐢宠浜�<i class="red">*</i></label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <input type="text" class="form-control" value="@Model.CreaterName" name="createrName" id="createrName" validate="RequiredField" autocomplete="off" readonly="readonly">
+
+                                    </div>
+                                </div>
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">鐢宠鏃堕棿<i class="red">*</i></label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <input type="text" class="layui-input  layer-date  ldate form-control" value="@Model.ShenqingtimeName" name="Shenqingtime" id="Shenqingtime" readonly="readonly">
+
+                                    </div>
+                                </div>
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">浼氬憳鍚嶇О<i class="red">*</i></label>
+                                    <div class="col-sm-6 col-md-6">
+                                        <input type="text" class="form-control" value="@Model.HuiyuanName" name="HuiyuanName" id="HuiyuanName" maxlength="500">
+                                    </div>
+                                </div>
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">浼氬憳鐢佃瘽</label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <input type="text" class="form-control" value="@Model.HuiyuanPhone" name="HuiyuanPhone" id="HuiyuanPhone" maxlength="500">
+                                        <input type="hidden" id="HuiyuanId" name="HuiyuanId" value="@Model.HuiyuanId" />
+                                        <input type="hidden" id="OrderNo" name="OrderNo" value="@Model.OrderNo" />
+                                    </div>
+                                </div>
+
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">鎻愮幇閲戦锛堝厓锛�<i class="red">*</i></label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <input class="form-control" id="Jine" name="Jine" type="text" value="@Model.JineName" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
+                                    </div>
+                                </div>
+
+
+
+                                <div class="clearfix layer-area" style="padding-bottom:15px;" id="shenpiyijian">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">瀹℃壒鎰忚</label>
+                                    <div class="col-sm-6 col-md-6">
+                                        <textarea class="form-control data" id="Content" name="Content" style="resize:none;overflow-y:hidden; height:80px;" maxlength="500"></textarea>
+                                    </div>
+                                </div>
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">瀹℃壒杩涘害</label>
+                                    <div class="col-sm-6 col-md-6">
+                                        <table>
+                                            @if (lishiyijian.Count > 0)
+                                            {
+                                                <tr>
+                                                    <td style="border:1px solid #ccc;width:150px;">姝ラ </td>
+                                                    <td style="border:1px solid #ccc;width:150px;"> 鎵瑰鐘舵��</td>
+                                                    <td style="border:1px solid #ccc;width:150px;">鎵瑰鏃堕棿</td>
+                                                    <td style="border:1px solid #ccc;width:300px;"> 瀹℃壒鎰忚</td>
+                                                    <td style="border:1px solid #ccc;width:100px;"> 鎵瑰浜�</td>
+                                                </tr>
+                                            }
+
+                                            @foreach (var wfHistory in lishiyijian)
+                                            {
+                                                <tr>
+                                                    <td style="border:1px solid #ccc;width:150px;">@wfHistory.Step</td>
+                                                    <td style="border:1px solid #ccc;width:150px;">@wfHistory.ChuliStatusName</td>
+                                                    <td style="border:1px solid #ccc;width:150px;">@wfHistory.ModifytimeName</td>
+                                                    <td style="border:1px solid #ccc;width:300px;">@wfHistory.Content</td>
+                                                    <td style="border:1px solid #ccc;width:100px;">@wfHistory.DeelUserIdName</td>
+                                                </tr>
+                                            }
+                                        </table>
+                                    </div>
+                                </div>
+                                <div class="clearfix layer-area" style="padding-bottom:60px;">
+
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
+            <div class="" style="float:right;" data-bootstro-width="500px">
+                <a class="btn btn-success" href="javascript:void(0)" onclick="_pageAutoClose();" style="margin-left:4px; border-radius:4px;">
+                    <i class="glyphicon glyphicon-remove"></i>&nbsp;&nbsp;<span class="bold">鍙栨秷</span>
+                </a>
+                <a class="btn btn-success" id="tijiao" href="javascript:void(0)" onclick="saveSimCost('');" style="margin-left:4px; border-radius:4px;">
+                    <i class="glyphicon glyphicon-ok"></i>&nbsp;&nbsp;<span class="bold">鎻愪氦</span>
+                </a>
+
+                <a class="btn btn-success" id="tongyi" href="javascript:void(0)" onclick="saveSimCost('A');" style="margin-left:4px; border-radius:4px;">
+                    <span class="bold">鍚屾剰</span>
+                </a>
+
+                <a class="btn btn-success" id="jujue" href="javascript:void(0)" onclick="saveSimCost('D');" style="margin-left:4px; border-radius:4px;">
+                    <span class="bold">鎷掔粷</span>
+                </a>
+                <input type="hidden" id="id" name="id" value="@Model.Id" />
+                <input type="hidden" id="Tongguojujue" name="Tongguojujue" value="" />
+                <input type="hidden" id="Step" name="Step" value="@dangqianbuzhou" />
+            </div>
+        </div>
+
+    </form>
+
+    <script type="text/javascript">
+
+        var hh = document.body.clientHeight -  $("#top").height() * 2 - 50;
+        $("#div_content").height(hh);
+
+        toastr.options = {
+            "closeButton": true,
+            "debug": false,
+            "progressBar": true,
+            "positionClass": "toast-bottom-right",
+            "onclick": null,
+            "showDuration": "300",
+            "hideDuration": "600",
+            "timeOut": "4500",
+            "extendedTimeOut": "600",
+            "showEasing": "swing",
+            "hideEasing": "linear",
+            "showMethod": "fadeIn",
+            "hideMethod": "fadeOut"
+        };
+
+
+        $(function () {
+
+
+
+
+
+             if ("@shifoubiaoji" != "A") {
+                $("input").attr('readonly', true);
+                $("textarea").attr('readonly', true);
+                $(':radio').attr('disabled', true);
+                $(':checkbox').attr('disabled', true);
+                $(':button').attr('disabled', true);
+                //$('a').removeAttr('onclick');
+                 $('select').attr('disabled', true);
+                 $("#fileUp").attr('disabled', true);
+
+                 $('.fujianshanchu').removeAttr('onclick');
+
+
+                 if ("@sifoudangqian" == "A") {
+                     $("#Content").attr('readonly', false);
+                      $('#tijiao').hide();
+                 } else {
+                     $('#tongyi').hide();
+                      $('#jujue').hide();
+                     $('#tijiao').hide();
+                     $('#shenpiyijian').hide();
+                 }
+
+            } else {
+
+
+                  //瀹℃壒鐩稿叧
+                 $('#shenpiyijian').hide();
+                 if ("@sifoudangqian" == "A") {
+                     $('#tongyi').hide();
+                     $('#jujue').hide();
+                    
+
+                     $(".ldate").each(function (el) {
+                         laydate({
+                             elem: "#" + $(this).attr('id'), //瀵瑰簲id
+                             format: 'YYYY-MM-DD', //鏃ユ湡鏍煎紡 // 鍒嗛殧绗﹀彲浠ヤ换鎰忓畾涔夛紝璇ヤ緥瀛愯〃绀哄彧鏄剧ず骞存湀
+                             min: '2021-01-01', //璁惧畾鏈�灏忔棩鏈熶负褰撳墠鏃ユ湡
+                             max: '2099-06-16', //鏈�澶ф棩鏈�
+                             type: 'datetime',
+                             festival: false, //鏄剧ず鑺傛棩
+                             istime: true, 聽 //鏄惁鏄剧ず鏃跺垎绉�
+                             istoday: true, //鏄惁鏄粖澶�
+                             choose: function (datas) { //閫夋嫨鏃ユ湡瀹屾瘯鐨勫洖璋�
+                                 // console.log("234234234234324");
+                                 // end.min = datas; //寮�濮嬫棩閫夊ソ鍚庯紝閲嶇疆缁撴潫鏃ョ殑鏈�灏忔棩鏈�
+                                 // end.start = datas //灏嗙粨鏉熸棩鐨勫垵濮嬪�艰瀹氫负寮�濮嬫棩
+                                 checktime();
+                             }
+                         });
+
+                     });
+
+                 } else {
+                     $('#tongyi').hide();
+                      $('#jujue').hide();
+                      $('#tijiao').hide();
+                 }
+
+
+            }
+
+        })
+
+
+        // 淇濆瓨
+        function saveSimCost(tongyi) {
+            if ($.trim($("#Shenqingtime").val()) == '') {
+                toastr.warning("鐢宠鏃堕棿涓嶈兘涓虹┖");
+                return;
+            }
+
+            if ($.trim($("#HuiyuanName").val()) == '') {
+                toastr.warning("浼氬憳鍚嶇О涓嶈兘涓虹┖");
+                return;
+            }
+             
+            if ($.trim($("#Jine").val()) == '') {
+                toastr.warning("鎻愮幇閲戦涓嶈兘涓虹┖");
+                return;
+            }
+
+            
+
+            $("#Tongguojujue").val(tongyi);
+
+            $.ajax({
+                type: "POST",
+                url: "/AdmAsk/SaveCustomerWithdrawal",
+                dataType: "json",
+                global: false,
+                data: $('#fm').serialize(),
+                success: function (data) {
+
+                        if (data.Result) {
+                            parent.layer.msg('鎻愪氦鎴愬姛', { icon: 6 });
+                            try {
+                                _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶
+                            }
+                            catch (err) {
+                                var pathname = window.location.pathname;
+                                var search = window.location.search;
+                                parent._CloseTab1(pathname + search);
+                            }
+                        }
+                        else {
+                            parent.layer.msg(data.Message, { icon: 5 });
+                        }
+
+                },
+                error: function () {
+                    parent.layer.msg('澶辫触', { icon: 5 });
+                }
+            });
+        }
+
+
+        function _pageAutoClose() {
+            try {
+                parent.window._reloadPageData();
+                var index = parent.layer.getFrameIndex(window.name);
+                parent.layer.isRefresh = true;
+                parent.layer.closeAll('loading');
+                parent.layer.close(index);
+                return false;
+            }
+            catch (err) {
+                var pathname = window.location.pathname;
+                var search = window.location.search;
+                parent._CloseTab1(pathname + search);
+            }
+
+        }
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/\350\241\250\344\277\256\346\224\271.sql" "b/\350\241\250\344\277\256\346\224\271.sql"
index e2b94cf..0091523 100644
--- "a/\350\241\250\344\277\256\346\224\271.sql"
+++ "b/\350\241\250\344\277\256\346\224\271.sql"
@@ -1,6 +1,167 @@
 USE [zhengcaioa]
 GO
 
+/****** Object:  Table [dbo].[ADM_Customer_withdrawal]    Script Date: 2021/8/3 9:08:32 ******/
+SET ANSI_NULLS ON
+GO
+
+SET QUOTED_IDENTIFIER ON
+GO
+
+CREATE TABLE [dbo].[ADM_Customer_withdrawal](
+	[Id] [nvarchar](50) NOT NULL,
+	[OrderNo] [nvarchar](50) NULL,
+	[Jine] [money] NULL,
+	[HuiyuanName] [nvarchar](100) NULL,
+	[HuiyuanId] [nvarchar](50) NULL,
+	[HuiyuanPhone] [nvarchar](50) NULL,
+	[Shenqingtime] [datetime] NOT NULL,
+
+
+
+	[Remark] [nvarchar](500) NULL,
+	[shenpi_status] [nvarchar](1) NULL,
+	[rec_status] [nvarchar](1) NOT NULL,
+	[creater] [nvarchar](50) NOT NULL,
+	[createtime] [datetime] NOT NULL,
+	[modifier] [nvarchar](50) NOT NULL,
+	[modifytime] [datetime] NOT NULL,
+	[createrName] [nvarchar](50) NULL,
+	[tittle] [nvarchar](50) NULL,
+ CONSTRAINT [PK__Customer_withdrawal__3214EC077AC5FA48] PRIMARY KEY CLUSTERED 
+(
+	[Id] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 100) ON [PRIMARY]
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[ADM_Customer_withdrawal] ADD  DEFAULT ((0)) FOR [Jine]
+GO
+
+ALTER TABLE [dbo].[ADM_Customer_withdrawal] ADD  DEFAULT ('D') FOR [shenpi_status]
+GO
+
+ALTER TABLE [dbo].[ADM_Customer_withdrawal] ADD  DEFAULT ('A') FOR [rec_status]
+GO
+
+ALTER TABLE [dbo].[ADM_Customer_withdrawal] ADD  DEFAULT ('1') FOR [creater]
+GO
+
+ALTER TABLE [dbo].[ADM_Customer_withdrawal] ADD  DEFAULT (getdate()) FOR [createtime]
+GO
+
+ALTER TABLE [dbo].[ADM_Customer_withdrawal] ADD  DEFAULT ('1') FOR [modifier]
+GO
+
+ALTER TABLE [dbo].[ADM_Customer_withdrawal] ADD  DEFAULT (getdate()) FOR [modifytime]
+GO
+ALTER TABLE [dbo].[ADM_Customer_withdrawal] ADD  DEFAULT (getdate()) FOR [Shenqingtime]
+GO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+USE [zhengcaioa]
+GO
+
 /****** Object:  Table [dbo].[ADM_AskBaiFang]    Script Date: 2021/7/30 9:03:25 ******/
 SET ANSI_NULLS ON
 GO

--
Gitblit v1.9.1