From 6a4007b2dd8f98ac42136f6e93010097afdb5d12 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 31 十二月 2021 14:09:44 +0800
Subject: [PATCH] 会员退款申请

---
 zhengcaioa/Services/AskService.cs                                       |    2 
 zhengcaioa/zhengcaioa/Controllers/OA/WfApplytypeController.cs           |    2 
 zhengcaioa/Services/WfRunProcessService.cs                              |  504 ++++++++++++++++++++++++
 zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs             |  115 +++++
 zhengcaioa/IServices/IWfRunProcessService.cs                            |    2 
 zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs |  209 +++++++++
 zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerRefund.cshtml                |  369 +++++++++++++++++
 7 files changed, 1,201 insertions(+), 2 deletions(-)

diff --git a/zhengcaioa/IServices/IWfRunProcessService.cs b/zhengcaioa/IServices/IWfRunProcessService.cs
index c32aa95..3037128 100644
--- a/zhengcaioa/IServices/IWfRunProcessService.cs
+++ b/zhengcaioa/IServices/IWfRunProcessService.cs
@@ -48,5 +48,7 @@
         ResultEntity WfAskCiZhi(string DanjuId, string step, string tongguojujue, string Userid, string Content, string title, string version);
 
         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);
     }
 }
diff --git a/zhengcaioa/Services/AskService.cs b/zhengcaioa/Services/AskService.cs
index 6d145f8..7f74cfa 100644
--- a/zhengcaioa/Services/AskService.cs
+++ b/zhengcaioa/Services/AskService.cs
@@ -477,7 +477,7 @@
                     entity.BankAcount = admAsk.BankAcount;
                     entity.BankName = admAsk.BankName;
                     entity.Username = admAsk.Username;
-
+                    entity.Remark = admAsk.Remark;
 
                     entity.ShenpiStatus = admAsk.ShenpiStatus;
                     entity.CreaterName = admAsk.CreaterName;
diff --git a/zhengcaioa/Services/WfRunProcessService.cs b/zhengcaioa/Services/WfRunProcessService.cs
index 28d38d1..ff9a9bf 100644
--- a/zhengcaioa/Services/WfRunProcessService.cs
+++ b/zhengcaioa/Services/WfRunProcessService.cs
@@ -7350,5 +7350,509 @@
             return result;
         }
 
+        public ResultEntity WfCustomerRefund(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, "23").FirstOrDefault();
+            if (wfRunProcessDTO != null)
+            {
+                version = wfRunProcessDTO.Version;
+            }
+
+
+            if (version == "v1")
+            {
+                if (step == "鎻愪氦")
+                {
+                    //鏇存柊娴佺▼瀹炰緥
+                    // WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "23").FirstOrDefault();
+                    if (wfRunProcessDTO == null)
+                    {
+                        //鎻掑叆娴佺▼瀹炰緥
+                        wfRunProcessDTO = new WfRunProcessDTO();
+                        //wfRunProcessDTO.Applyno = 
+                        wfRunProcessDTO.Applytime = DateTime.Now;
+                        wfRunProcessDTO.Applytiye = "23";
+                        wfRunProcessDTO.DanjuId = DanjuId;
+                        wfRunProcessDTO.Content = title;
+                        wfRunProcessDTO.Step = "瀹℃壒浜�1";
+                        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/CustomerRefund?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 = "瀹℃壒浜�1";
+                            wfNeeddeelDTO.NeeddeelType = "1";
+                            wfNeeddeelDTO.ChuliStatus = "0";
+                            wfNeeddeelDTO.Deelurl = "/AdmAsk/CustomerRefund?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/CustomerRefund?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 = "瀹℃壒浜�1";
+                        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 = "瀹℃壒浜�1";
+                            wfNeeddeelDTO.NeeddeelType = "1";
+                            wfNeeddeelDTO.ChuliStatus = "0";
+                            wfNeeddeelDTO.Deelurl = "/AdmAsk/CustomerRefund?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 == "瀹℃壒浜�1")
+                {
+                    //鏇存柊娴佺▼瀹炰緥
+                    //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "21").FirstOrDefault();
+                    if (wfRunProcessDTO == null)
+                    {
+                        result.Result = false;
+                        result.Message = "鏈壘鍒版祦绋嬪疄渚�";
+                        return result;
+                    }
+                    if (wfRunProcessDTO.Step != "瀹℃壒浜�1")
+                    {
+                        result.Result = false;
+                        result.Message = "褰撳墠姝ラ宸茬粡澶勭悊";
+                        return result;
+                    }
+
+                    if (tongguojujue == "A")
+                    {
+                        wfRunProcessDTO.Step = "瀹℃壒浜�2";
+                        wfRunProcessDTO.Modifier = Userid;
+                        wfRunProcessDTO.Modifytime = DateTime.Now;
+                        result = this.save(wfRunProcessDTO);
+                        if (result.Result == false)
+                        {
+                            return result;
+                        }
+
+                        //鏇存柊寰呭姙
+                        List<WfNeeddeelDTO> wfNeeddeelDTOs = _wfNeeddeelService.GetList(wfRunProcessDTO.Id, "瀹℃壒浜�1");
+
+
+
+                        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
+                                        where a.Id != 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 = "瀹℃壒浜�2";
+                            wfNeeddeelDTO.NeeddeelType = "1";
+                            wfNeeddeelDTO.ChuliStatus = "0";
+                            wfNeeddeelDTO.Deelurl = "/AdmAsk/CustomerRefund?id=" + DanjuId;
+                            wfNeeddeelDTO.Content = "";
+                            wfNeeddeelDTO.Sort = 3;
+                            wfNeeddeelDTO.RecStatus = "A";
+                            wfNeeddeelDTO.Creater = Userid;
+                            wfNeeddeelDTO.Createtime = DateTime.Now;
+                            wfNeeddeelDTO.Modifier = Userid;
+                            wfNeeddeelDTO.Modifytime = wfNeeddeelDTO.Createtime;
+                            result = _wfNeeddeelService.save(wfNeeddeelDTO);
+                            if (result.Result == false)
+                            {
+                                return result;
+                            }
+                        }
+                    }
+                    else
+                    {
+                        wfRunProcessDTO.Step = "瀹岀粨";
+                        wfRunProcessDTO.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, "瀹℃壒浜�1");
+                        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();
+                    }
+
+
+
+
+
+                }
+
+                if (step == "瀹℃壒浜�2")
+                {
+                    //鏇存柊娴佺▼瀹炰緥
+                    //WfRunProcessDTO wfRunProcessDTO = this.GetList(DanjuId, "23").FirstOrDefault();
+                    if (wfRunProcessDTO == null)
+                    {
+                        result.Result = false;
+                        result.Message = "鏈壘鍒版祦绋嬪疄渚�";
+                        return result;
+                    }
+                    if (wfRunProcessDTO.Step != "瀹℃壒浜�2")
+                    {
+                        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, "瀹℃壒浜�2");
+
+                        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, "瀹℃壒浜�2");
+                        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 c2829f3..6b015a0 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" && x.Applyno != "20" && x.Applyno != "22").ToList();
+            ViewBag.wfApplytypeDTOs = _wfApplytypeService.GetList().Where(x => x.Applyno != "03" && x.Applyno != "20" && x.Applyno != "22" /*&& x.Applyno != "23"*/).ToList();
             return View();
         }
     }
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
index 2188ea7..a72126f 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
@@ -1390,6 +1390,121 @@
             return new JsonResult(resultEntity);
         }
 
+
+
+        public IActionResult CustomerRefund(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, "23").FirstOrDefault();
+                if (wfRunProcessDTO == null)
+                {
+                    shifoubiaoji = "D";
+                    sifoudangqian = "D";
+                }
+                else
+                {
+                    dangqianbuzhou = wfRunProcessDTO.Step;
+                    //鏌ヨ瀹℃壒杩涘害
+                    lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id);
+                    if (wfRunProcessDTO.Step != "鎻愪氦")
+                    {
+                        shifoubiaoji = "D";
+                    }
+
+                    //鏌ヨ寰呭姙
+                    var chaxundaiban = _wfNeeddeelService.GetListTracking(wfRunProcessDTO.Id, wfRunProcessDTO.Step).Where(x => x.DeelUserId == curentuser.Id).ToList();
+                    if (chaxundaiban != null && chaxundaiban.Count > 0)
+                    {
+                        sifoudangqian = "A";
+                    }
+                    else
+                    {
+                        sifoudangqian = "D";
+                    }
+
+                }
+
+
+
+
+            }
+
+            ViewBag.shifoubiaoji = shifoubiaoji;
+            ViewBag.sifoudangqian = sifoudangqian;
+            ViewBag.lishiyijian = lishiyijian;
+            ViewBag.dangqianbuzhou = dangqianbuzhou;
+
+             
+
+            ViewData.Model = dto;
+            return View();
+        }
+
+
+        /// <summary>
+        /// 浼氬憳鎻愮幇鐢宠
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult SaveCustomerRefund(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.WfCustomerRefund(data.Id, data.Step, data.Tongguojujue, curentuser.Id, data.Content, data.Tittle, "v1");
+                if (!resultEntity.Result)
+                {
+                    return new JsonResult(resultEntity);
+                }
+                scope.Complete();
+            }
+            return new JsonResult(resultEntity);
+        }
+
         public IActionResult AskCiZhi(string id = "")
         {
             AdmAskCiZhiDTO dto = new AdmAskCiZhiDTO();
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs
index 7c3e077..95a1379 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/CustomerWithdrawalController.cs
@@ -284,5 +284,214 @@
             }
             return new JsonResult(returnMsg);
         }
+
+
+
+        /// <summary>
+        /// 浼氬憳鎻愮幇鐢宠
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult AskCustomerRefund([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.WfCustomerRefund(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);
+        }
+
+
+
+
+
+        /// <summary>
+        /// 浼氬憳鎻愮幇鐢宠锛屽鎵圭粨鏋�
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        public IActionResult GetCustomerRefund(string OrderNo)
+        {
+            ReturnMsg<AdmCustomerWithdrawalDTO> returnMsg = new ReturnMsg<AdmCustomerWithdrawalDTO>();
+            returnMsg.code = 2;
+            try
+            {
+                //楠岃瘉鏁版嵁瀹屾暣鎬�
+                if (string.IsNullOrWhiteSpace(OrderNo))
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁璁㈠崟鍙凤紒";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+
+
+                ResultEntity resultEntity = new ResultEntity();
+
+                var customerWithdrawalDTO = _askService.GetCustomerWithdrawalList(OrderNo).FirstOrDefault();
+
+
+                //楠岃瘉鏄惁閲嶅鍙戣捣
+                if (customerWithdrawalDTO == null)
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁鏌ユ壘鍒板鎵规祦绋嬶紒";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+
+
+
+                var sysCodeDtls = _liaotianService.GetSYScode("wf_run_process", "shenpi_status");
+                var sysCodeDtl = sysCodeDtls.Where(x => x.CodeSn == customerWithdrawalDTO.ShenpiStatus).FirstOrDefault();
+                if (sysCodeDtl != null)
+                {
+                    customerWithdrawalDTO.ShenpiStatusName = sysCodeDtl.Comments;
+                }
+                var wfRunProcessDTO = _wfRunProcessService.GetList(customerWithdrawalDTO.Id, "23").FirstOrDefault();
+
+                if (wfRunProcessDTO == null)
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁鏌ユ壘鍒板鎵规祦绋嬶紒";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+
+                var lishiyijian = _wfHistoryService.GetListshenpi(wfRunProcessDTO.Id).LastOrDefault();
+                if (lishiyijian == null)
+                {
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁鏌ユ壘鍒板鎵规祦绋嬶紒";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+                }
+                customerWithdrawalDTO.Content = lishiyijian.Content;
+                customerWithdrawalDTO.Step = wfRunProcessDTO.Step;
+
+                returnMsg.code = 1;
+                returnMsg.returnObj = customerWithdrawalDTO;
+                returnMsg.count = 1;
+
+            }
+            catch (Exception ex)
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                returnMsg.count = 0;
+
+            }
+            return new JsonResult(returnMsg);
+        }
     }
 }
diff --git a/zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerRefund.cshtml b/zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerRefund.cshtml
new file mode 100644
index 0000000..d0aa4d0
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerRefund.cshtml
@@ -0,0 +1,369 @@
+锘緻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>; //瀹℃壒杩涘害
+
+    List<FiSubjectDTO> FiSubject = ViewData["FiSubject"] as List<FiSubjectDTO>; //绉戠洰
+
+
+}
+
+<!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.OrderNo" name="OrderNo" id="OrderNo" maxlength="50">
+                                    </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="100">
+                                    </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="50">
+                                        <input type="hidden" id="HuiyuanId" name="HuiyuanId" value="@Model.HuiyuanId" />
+                                        <input type="hidden" value="@Model.BankAcount" name="BankAcount" id="BankAcount" maxlength="50">
+                                        <input type="hidden" value="@Model.BankName" name="BankName" id="BankName" maxlength="50">
+                                        <input type="hidden" value="@Model.Username" name="Username" id="Username" maxlength="50">
+                                    </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;" >
+                                    <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="Remark" name="Remark" style="resize:none;overflow-y:hidden; height:80px;" maxlength="500">@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();
+                 } 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/SaveCustomerRefund",
+                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

--
Gitblit v1.9.1