From cf25900d05a788e9052132b55e471695319542e0 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 03 十二月 2021 15:40:49 +0800
Subject: [PATCH] t提交

---
 zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs    |    4 
 zhengcaioa/zhengcaioa/Views/CooperOrder/selectWenshu.cshtml               |  139 +++++++++++++
 zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml         |   15 +
 zhengcaioa/DTO/CooperOrderDTO.cs                                          |   22 ++
 zhengcaioa/IServices/ICooperVisitService.cs                               |    2 
 zhengcaioa/Services/CooperVisitService.cs                                 |    8 
 zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs       |    5 
 zhengcaioa/zhengcaioa/Views/CooperOrder/IndexWenshu.cshtml                |  139 +++++++++++++
 zhengcaioa/IServices/ICooperOrderService.cs                               |    5 
 zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs |    8 
 zhengcaioa/Services/CooperOrderService.cs                                 |  173 +++++++++++++++++
 zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs  |   65 ++++++
 12 files changed, 574 insertions(+), 11 deletions(-)

diff --git a/zhengcaioa/DTO/CooperOrderDTO.cs b/zhengcaioa/DTO/CooperOrderDTO.cs
index 8924bd3..9b7e678 100644
--- a/zhengcaioa/DTO/CooperOrderDTO.cs
+++ b/zhengcaioa/DTO/CooperOrderDTO.cs
@@ -120,6 +120,13 @@
         public DateTime? tousuNoticeDate { get; set; }
         public string tousuIsResultnotice { get; set; }
         public DateTime? tousuResultnoticeDate { get; set; }
+
+        public string XmName { get; set; }
+        public string XmCode { get; set; }
+        public string PurchaserName { get; set; }
+        public string Agency { get; set; }
+        public decimal YishouMoney { get; set; }
+        public decimal WeishouMoney { get; set; }
     }
 
     public class CooperOrderDTOSearch : SearchEntity
@@ -127,8 +134,8 @@
         public string Ywjl { get; set; }
         public string OrderType { get; set; }
         public string OrderNo { get; set; }
-        public string XdTime { get; set; }
-        public string KhdwName { get; set; }
+       
+       
         public string Khlx { get; set; }
         public string HuifangStatus { get; set; }
         public string PingjiaStatus { get; set; }
@@ -144,5 +151,16 @@
 
         public string HuiyuanId { get; set; }
 
+
+        public string XmName { get; set; }
+        public string XmCode { get; set; }
+        public string PurchaserName { get; set; }
+        public string Agency { get; set; }
+        public string KhdwName { get; set; }
+        public string Wenshuleixing { get; set; }
+        public string XdTime { get; set; }
+        public string Fkzt { get; set; }
+        public int Status { get; set; }
+        
     }
 }
diff --git a/zhengcaioa/IServices/ICooperOrderService.cs b/zhengcaioa/IServices/ICooperOrderService.cs
index 8b225e7..15be1fe 100644
--- a/zhengcaioa/IServices/ICooperOrderService.cs
+++ b/zhengcaioa/IServices/ICooperOrderService.cs
@@ -81,5 +81,10 @@
 
         List<TComplaintShouquandaibiaoDTO> GetListComplaintShouquandaibiao(string ComplaintId);
 
+
+
+
+        ResultDataEntity<CooperOrderDTO> SearchByPagingWenshu(CooperOrderDTOSearch searchEntity);
+
     }
 }
diff --git a/zhengcaioa/IServices/ICooperVisitService.cs b/zhengcaioa/IServices/ICooperVisitService.cs
index 94f2db7..788a453 100644
--- a/zhengcaioa/IServices/ICooperVisitService.cs
+++ b/zhengcaioa/IServices/ICooperVisitService.cs
@@ -17,7 +17,7 @@
 
         ResultEntity ModifyStatus(string id, string userid);
 
-        List<CooperatecustomCustomerDTO> GetList(string[] id);
+        List<CooperatecustomCustomerDTO> GetList(string[] id=null);
 
         List<CooperVisitDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax);
     }
diff --git a/zhengcaioa/Services/CooperOrderService.cs b/zhengcaioa/Services/CooperOrderService.cs
index 7bf10c7..fa1b109 100644
--- a/zhengcaioa/Services/CooperOrderService.cs
+++ b/zhengcaioa/Services/CooperOrderService.cs
@@ -923,7 +923,7 @@
         public List<TChallengeletterDTO> GetListChallengeletter(string OrderId)
         {
 
-            var entity = _context.TChallengeletters.Where(x => x.Status == 1 && x.OrderId == OrderId).ToList();
+            var entity = _context.TChallengeletters.Where(x =>/* x.Status == 1 && */x.OrderId == OrderId).ToList();
 
 
 
@@ -1065,7 +1065,7 @@
         public List<TComplaintletterDTO> GetListComplaintletter(string OrderId)
         {
 
-            var entity = _context.TComplaintletters.Where(x => x.Status == 1 && x.OrderId == OrderId).ToList();
+            var entity = _context.TComplaintletters.Where(x => /*x.Status == 1 &&*/ x.OrderId == OrderId).ToList();
 
 
 
@@ -1504,5 +1504,174 @@
             _context.SaveChanges();
             return result;
         }
+
+
+
+        public ResultDataEntity<CooperOrderDTO> SearchByPagingWenshu(CooperOrderDTOSearch searchEntity)
+        {
+
+
+
+            ResultDataEntity<CooperOrderDTO> data = new ResultDataEntity<CooperOrderDTO>();
+            List<CooperOrderDTO> list = new List<CooperOrderDTO>();
+
+
+
+
+            var listCode = (from a in _context.SysCodeDtls
+                            join b in _context.SysCodes
+                            on a.CodeId equals b.Id
+                            where a.RecStatus == "A"
+                                          && b.RecStatus == "A"
+                            select new CodeDataEntity()
+                            {
+                                CodeId = b.Id,
+                                CodeTable = b.CodeTable,
+                                CodeField = b.CodeField,
+                                CodeSn = a.CodeSn,
+                                Comments = a.Comments,
+                                Contents = a.Contents,
+                                RecStatus = a.RecStatus,
+                                Sort = a.Sort
+                            }
+                      );
+            DateTime XdTimestart = DateTime.Now;
+            DateTime XdTimeend = DateTime.Now;
+            if (!string.IsNullOrWhiteSpace(searchEntity.XdTime))
+            {
+                string[] XdTimes = searchEntity.XdTime.Split("|");
+                DateTime.TryParse(XdTimes[0], out XdTimestart);
+                DateTime.TryParse(XdTimes[1], out XdTimeend);
+                XdTimeend = XdTimeend.AddDays(1);
+            }
+
+
+            var query2 = (from a in _context.CooperOrders
+
+                          join b in _context.TChallengeletters
+                      on a.Id equals b.OrderId
+
+
+
+                          join g in _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A")
+                           on a.Khdw equals g.Id
+                          into gsss
+                          from ggg in gsss.DefaultIfEmpty()
+
+                          join l in _context.FiOrderrecievemoneys.Where(x => x.RecStatus == "A").GroupBy(q => new { q.OrderId }).Select(q => new
+                          {
+                              OrderId = q.Key.OrderId,
+                              YishouMoney = q.Sum(x => x.Recievemoney),
+                          }
+                           )
+                          on a.Id equals l.OrderId
+                         into lsss
+                          from lll in lsss.DefaultIfEmpty()
+
+                          where a.RecStatus == "A" && a.OrderType1 == "浠f嫙璐ㄧ枒鍑�"
+                          && (string.IsNullOrWhiteSpace(searchEntity.XdTime) || (b.Createtime >= XdTimestart && b.Createtime <= XdTimeend))
+                            && (string.IsNullOrWhiteSpace(searchEntity.Wenshuleixing) || a.OrderType1 == searchEntity.Wenshuleixing.Trim())
+                              && (string.IsNullOrWhiteSpace(searchEntity.XmName) || b.XmName.Contains(searchEntity.XmName.Trim()))
+                               && (string.IsNullOrWhiteSpace(searchEntity.XmCode) || b.XmCode.Contains(searchEntity.XmCode.Trim()))
+                                 && (string.IsNullOrWhiteSpace(searchEntity.PurchaserName) || b.PurchaserName.Contains(searchEntity.PurchaserName.Trim()))
+                                     //&& (string.IsNullOrWhiteSpace(searchEntity.Agency) || b.Agency.Contains(searchEntity.Agency.Trim()))
+                                     && (string.IsNullOrWhiteSpace(searchEntity.KhdwName) || ggg.Name.Contains(searchEntity.KhdwName.Trim()))
+                                     && (searchEntity.Status <= 0 || b.Status == searchEntity.Status)
+
+
+
+
+
+                          select new CooperOrderDTO
+                          {
+                              Id = a.Id,
+
+                              XmCode = b.XmCode,
+                              XmName = b.XmName,
+                              PurchaserName = b.PurchaserName,
+                              Agency = "",
+                              KhdwName = ggg.Name,
+                              XdTime = a.Createtime,
+                              XdTimeName = a.Createtime.ToString("yyyy-MM-dd"),
+                              YishouMoney = lll.YishouMoney ?? 0,
+                              WeishouMoney = (a.Money ?? 0) /*- (a.Youhui ?? 0)*/ - (lll.YishouMoney ?? 0),
+                              OrderType1 = a.OrderType1,
+                          }
+                ).ToList();
+
+
+               var query1 =(from a in _context.CooperOrders
+                       join b in _context.TComplaintletters.Where(x => x.Status == 1)
+                       on a.Id equals b.OrderId
+
+
+                       join g in _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A")
+                        on a.Khdw equals g.Id
+                       into gsss
+                       from ggg in gsss.DefaultIfEmpty()
+
+                       join l in _context.FiOrderrecievemoneys.Where(x => x.RecStatus == "A").GroupBy(q => new { q.OrderId }).Select(q => new
+                       {
+                           OrderId = q.Key.OrderId,
+                           YishouMoney = q.Sum(x => x.Recievemoney),
+                       }
+                        )
+                       on a.Id equals l.OrderId
+                      into lsss
+                       from lll in lsss.DefaultIfEmpty()
+
+                       where a.RecStatus == "A" && a.OrderType1 == "浠f嫙鎶曡瘔涔�"
+                       && (string.IsNullOrWhiteSpace(searchEntity.XdTime) || (b.Createtime >= XdTimestart && b.Createtime <= XdTimeend))
+                         && (string.IsNullOrWhiteSpace(searchEntity.Wenshuleixing) || a.OrderType1 == searchEntity.Wenshuleixing.Trim())
+                          && (string.IsNullOrWhiteSpace(searchEntity.XmCode) || b.XmCode.Contains(searchEntity.XmCode.Trim()))
+                           && (string.IsNullOrWhiteSpace(searchEntity.XmName) || b.XmName.Contains(searchEntity.XmName.Trim()))
+                              && (string.IsNullOrWhiteSpace(searchEntity.PurchaserName) || b.PurchaserName.Contains(searchEntity.PurchaserName.Trim()))
+                                && (string.IsNullOrWhiteSpace(searchEntity.Agency) || b.Agency.Contains(searchEntity.Agency.Trim()))
+                                  && (string.IsNullOrWhiteSpace(searchEntity.KhdwName) || ggg.Name.Contains(searchEntity.KhdwName.Trim()))
+                                  && (searchEntity.Status <= 0 || b.Status == searchEntity.Status)
+
+
+
+
+
+                       select new CooperOrderDTO
+                       {
+                           Id = a.Id,
+
+                           XmCode = b.XmCode,
+                           XmName = b.XmName,
+                           PurchaserName = b.PurchaserName,
+                           Agency = b.Agency,
+                           KhdwName = ggg.Name,
+                           XdTime = b.Createtime.Value,
+                           XdTimeName = b.Createtime.Value.ToString("yyyy-MM-dd"),
+                           YishouMoney = lll.YishouMoney ?? 0,
+                           WeishouMoney = (a.Money ?? 0) /*- (a.Youhui ?? 0)*/ - (lll.YishouMoney ?? 0),
+                           OrderType1 = a.OrderType1,
+                       }
+                ).ToList();
+
+            query2.AddRange(query1);
+            var query = query2.Where(x => x.WeishouMoney <= 0).OrderByDescending(x => x.Createtime).ToList();
+
+
+        
+
+
+
+
+
+
+
+         
+
+
+
+            //if (searchEntity.totalrows == 0)
+            searchEntity.totalrows = query.Count();
+            var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
+            data.LoadData(searchEntity, lianlist);
+            return data;
+        }
     }
 }
diff --git a/zhengcaioa/Services/CooperVisitService.cs b/zhengcaioa/Services/CooperVisitService.cs
index 19f433a..27ccb94 100644
--- a/zhengcaioa/Services/CooperVisitService.cs
+++ b/zhengcaioa/Services/CooperVisitService.cs
@@ -247,7 +247,7 @@
         /// 鑾峰彇鎵�鏈夋湁鏁堝悎浣滃鎴�
         /// </summary>
         /// <returns></returns>
-        public List<CooperatecustomCustomerDTO> GetList(string[] id)
+        public List<CooperatecustomCustomerDTO> GetList(string[] id=null)
         {
             List<CooperatecustomCustomerDTO> result = new List<CooperatecustomCustomerDTO>();
             if (id != null)
@@ -258,6 +258,12 @@
 
                 result = _mapper.Map<List<CooperatecustomCustomerDTO>>(listCooperatecustomCustomers);
             }
+            else
+            {
+                var listCooperatecustomCustomers = _context.CooperatecustomCustomers.ToList();
+
+                result = _mapper.Map<List<CooperatecustomCustomerDTO>>(listCooperatecustomCustomers);
+            }
 
 
 
diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
index 3c04b37..81d1c77 100644
--- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
@@ -1446,5 +1446,70 @@
             return new JsonResult(returnMsg);
         }
 
+
+
+        [CheckLogin]
+        public IActionResult IndexWenshu()
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            List<ActionEntity> actionlist = new List<ActionEntity>();
+            ActionEntity actionEntity = new ActionEntity();
+            actionEntity.OpenType = 0;
+            actionEntity.ActionUrl = "";
+            actionEntity.ActionFun = "Search";
+            actionEntity.PageIco = "fa fa-search";
+            actionEntity.ActionName = "鏌ヨ";
+            actionlist.Add(actionEntity);
+
+            ViewData["ActionInfo"] = actionlist;
+
+
+
+
+            return View();
+
+        }
+
+
+
+        [CheckLogin]
+        public IActionResult GetListWenshu(CooperOrderDTOSearch search)
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            //search.Status = 1;
+            //search.Creater = curentuser.Id;
+            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
+            return new JsonResult(_cooperOrderService.SearchByPagingWenshu(search));
+        }
+
+
+        [CheckLogin]
+        public IActionResult selectWenshu()
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            List<ActionEntity> actionlist = new List<ActionEntity>();
+            ActionEntity actionEntity = new ActionEntity();
+            actionEntity.OpenType = 0;
+            actionEntity.ActionUrl = "";
+            actionEntity.ActionFun = "Search";
+            actionEntity.PageIco = "fa fa-search";
+            actionEntity.ActionName = "鏌ヨ";
+            actionlist.Add(actionEntity);
+
+            ViewData["ActionInfo"] = actionlist;
+
+
+            ViewBag.Wenshuleixing = _liaotianService.GetSYScode("t_challengeletter", "Wenshuleixing").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+
+
+            return View();
+
+        }
+
+ 
+
     }
 }
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
index e5d0b3f..ec20280 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
@@ -182,7 +182,6 @@
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
             List<CooperatecustomCustomerDTO> result = new List<CooperatecustomCustomerDTO>();
-
             if (baifangid != null)
             {
                 result = _cooperVisitService.GetList(baifangid.Split(","));
@@ -222,7 +221,7 @@
             CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
             dto.Fasongfangshi = "01";
             dto.Fasongneirong = neirong;
-            dto.Jieshouren = baifangid;
+            dto.Jieshouren = baifangid.Length>2000? baifangid.Substring(0,2000): baifangid;
             dto.RecStatus = "A";
             dto.Creater = curentuser.Id;
             dto.Modifytime = DateTime.Now;
@@ -301,7 +300,7 @@
             CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
             dto.Fasongfangshi = "02";
             dto.Fasongneirong = neirong;
-            dto.Jieshouren = baifangid;
+            dto.Jieshouren = baifangid.Length > 2000 ? baifangid.Substring(0, 2000) : baifangid; ;
             dto.RecStatus = "A";
             dto.Creater = curentuser.Id;
             dto.Modifytime = DateTime.Now;
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
index c5e3cfe..fa24320 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
@@ -273,6 +273,14 @@
                 actionlist.Add(actionEntity);
             }
 
+            ActionEntity actionEntity4 = new ActionEntity();
+            actionEntity4.OpenType = 0;
+            actionEntity4.ActionUrl = "";
+            actionEntity4.ActionFun = "Duanxin";
+            actionEntity4.PageIco = "";
+            actionEntity4.ActionName = "缇ゅ彂鐭俊";
+            actionlist.Add(actionEntity4);
+
             ViewData["ActionInfo"] = actionlist;
 
 
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
index e6e158b..c0b5ec1 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
@@ -352,7 +352,7 @@
             CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
             dto.Fasongfangshi = "01";
             dto.Fasongneirong = neirong;
-            dto.Jieshouren = baifangid;
+            dto.Jieshouren = baifangid.Length > 2000 ? baifangid.Substring(0, 2000) : baifangid; ;
             dto.RecStatus = "A";
             dto.Creater = curentuser.Id;
             dto.Modifytime = DateTime.Now;
@@ -431,7 +431,7 @@
             CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
             dto.Fasongfangshi = "02";
             dto.Fasongneirong = neirong;
-            dto.Jieshouren = baifangid;
+            dto.Jieshouren = baifangid.Length > 2000 ? baifangid.Substring(0, 2000) : baifangid; ;
             dto.RecStatus = "A";
             dto.Creater = curentuser.Id;
             dto.Modifytime = DateTime.Now;
diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/IndexWenshu.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/IndexWenshu.cshtml
new file mode 100644
index 0000000..8de6cd3
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/IndexWenshu.cshtml
@@ -0,0 +1,139 @@
+锘緻{
+    ViewBag.Title = "CooperOrder";
+    Layout = "~/Views/Shared/_Layout_Search.cshtml";
+}
+@section headerStyle{
+    <script type="text/javascript">
+       
+        gridConfig = { multiselect: true, selectcol: "Id" };
+        loseherght = 40;
+        dataCol = [
+            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
+            { label: '鍒涘缓鏃ユ湡', name: 'XdTimeName', labtype: 'txt', hidden: false, width: 100 },
+            {
+                label: '椤圭洰缂栧彿', name: 'XmCode', labtype: 'txt', hidden: false, width: 100
+                //,
+                //formatter: function (cellvalue, options, rowObject) {
+                //    return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/OrderBanciOrder/Edit?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
+                //}
+            },
+            { label: '椤圭洰鍚嶇О', name: 'XmName', labtype: 'txt', hidden: false, width: 100 },
+            { label: '閲囪喘浜�', name: 'PurchaserName', labtype: 'txt', hidden: false, width: 100 },
+            { label: '閲囪喘浠g悊鏈烘瀯', name: 'Agency', labtype: 'txt', hidden: false, width: 100 },
+            { label: '瀹㈡埛鍗曚綅', name: 'KhdwName', labtype: 'txt', hidden: false, width: 100 },
+           
+            {
+                label: '鐢熸垚鏂囦功', name: 'Status', labtype: 'txt', hidden: false, width: 100
+                ,
+                formatter: function (cellvalue, options, rowObject) {
+                  
+                    if (rowObject.OrderType1 == "浠f嫙鎶曡瘔涔�") {
+                        return "<a onclick=\"OpenWindow('鐢熸垚鎶曡瘔涔�','98%','100%', '/OrderBanciOrder/Edit?id=" + rowObject.Id + "')\"  >鐢熸垚鎶曡瘔涔�</a>";
+                    }
+                    else if (rowObject.OrderType1 == "浠f嫙璐ㄧ枒鍑�") {
+                        return "<a onclick=\"OpenWindow('鐢熸垚璐ㄧ枒鍑�','98%','100%', '/OrderBanciOrder/Edit?id=" + rowObject.Id + "')\"  >鐢熸垚璐ㄧ枒鍑�</a>";
+                    }
+
+                  
+                }
+            },
+
+
+        ];
+        dataUrl = "/CooperOrder/GetListWenshu";
+        searchCol = [
+            { label: '椤圭洰鍚嶇О', name: 'XmName', labtype: 'txt', hidden: false },
+            { label: '椤圭洰缂栧彿', name: 'XmCode', labtype: 'txt', hidden: false },
+            
+            { label: '閲囪喘浜�', name: 'PurchaserName', labtype: 'txt', hidden: false },
+            { label: '閲囪喘浠g悊鏈烘瀯', name: 'Agency', labtype: 'txt', hidden: false },
+            { label: '瀹㈡埛鍚嶇О', name: 'KhdwName', labtype: 'txt', hidden: false },
+            //{ label: '鏂囦功绫诲埆', name: 'Wenshuleixing', labtype: 'txt', hidden: false },
+            //{ label: '鏃堕棿', name: 'XdTime', labtype: 'datearea', hidden: false },
+
+
+
+
+
+
+        ];
+        //var _pageAdd = function () {
+        //    OpenWindow("鏂板鐝", "98%", "90%", "/CooperOrder/Edit/");
+        //}
+
+         
+
+
+        var _afterSave = function (result) {
+            if (result) {
+                toastr.success("淇濆瓨鎴愬姛");
+            } else {
+                toastr.error("淇濆瓨澶辫触");
+            }
+        }
+
+        var _afterDel = function (result) {
+            if (result) {
+                toastr.success("鍒犻櫎鎴愬姛");
+            } else {
+                /**/
+                toastr.error("鍒犻櫎鎴愬姛");
+        /**/
+    }
+        }
+
+        var _pageDuanxin = function () {
+            var duanxin = GetGridSelect();
+            var baifangid = "";
+            if (duanxin != '') {
+                for (var i = 0; i < duanxin.length; i++) {
+                    baifangid += duanxin[i] + ','
+                }
+                baifangid = baifangid.substring(0, baifangid.length - 1);
+            } else {
+                toastr.error("璇烽�夋嫨璁㈠崟");
+                return;
+            }
+
+            OpenWindow("缇ゅ彂鐭俊", "50%", "50%", "/OrderBanciOrder/Duanxin?id=" + baifangid);
+
+        }
+
+
+        var _pagePrint = function () {
+
+            var Baomingtime = $("#PBSBaomingtime").val();
+            var Peixunbanci = $("#PBSPeixunbanci").val();
+            var Kechengleixing = $("#PBSKechengleixing").val();
+            var Xingming = $("#PBSXingming").val();
+            var Lianxidianhua = $("#PBSLianxidianhua").val();
+
+
+
+            var Createtimestart = $("#PBSCreatetimestart").val();
+
+            var Createtimeend = $("#PBSCreatetimeend").val();
+            var Createtime = '';
+            if (Createtimestart != '' && Createtimeend != '') {
+                Createtime = Createtimestart + '|' + Createtimeend;
+            }
+
+
+            var url = "/OrderBanciOrder/print?Baomingtime=" + Baomingtime + "&Peixunbanci=" + Peixunbanci + "&Kechengleixing=" + Kechengleixing + "&Xingming=" + Xingming + "&Lianxidianhua=" + Lianxidianhua;
+            var me = window.open(url, "鎵撳嵃");  //鎵撳紑鏂扮獥鍙�
+
+
+        }
+
+    </script>
+}
+
+@section footerScripts{
+    <script type="text/javascript">
+
+
+
+
+
+    </script>
+}
diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/selectWenshu.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/selectWenshu.cshtml
new file mode 100644
index 0000000..ec1d653
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/selectWenshu.cshtml
@@ -0,0 +1,139 @@
+锘緻{
+    ViewBag.Title = "CooperOrder";
+    Layout = "~/Views/Shared/_Layout_Search.cshtml";
+}
+@section headerStyle{
+    <script type="text/javascript">
+        var Wenshuleixing = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Wenshuleixing))';
+        gridConfig = { multiselect: true, selectcol: "Id" };
+        loseherght = 40;
+        dataCol = [
+            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
+            { label: '鍒涘缓鏃ユ湡', name: 'XdTimeName', labtype: 'txt', hidden: false, width: 100 },
+            {
+                label: '椤圭洰缂栧彿', name: 'XmCode', labtype: 'txt', hidden: false, width: 100
+                //,
+                //formatter: function (cellvalue, options, rowObject) {
+                //    return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/OrderBanciOrder/Edit?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
+                //}
+            },
+            { label: '椤圭洰鍚嶇О', name: 'XmName', labtype: 'txt', hidden: false, width: 100 },
+            { label: '閲囪喘浜�', name: 'PurchaserName', labtype: 'txt', hidden: false, width: 100 },
+            { label: '閲囪喘浠g悊鏈烘瀯', name: 'Agency', labtype: 'txt', hidden: false, width: 100 },
+            { label: '瀹㈡埛鍗曚綅', name: 'KhdwName', labtype: 'txt', hidden: false, width: 100 },
+
+            {
+                label: '鏌ョ湅鏂囦功', name: 'Status', labtype: 'txt', hidden: false, width: 100
+                ,
+                formatter: function (cellvalue, options, rowObject) {
+                    
+                    if (rowObject.OrderType1 == "浠f嫙鎶曡瘔涔�") {
+                        return "<a onclick=\"OpenWindow('鏌ョ湅鎶曡瘔涔�','98%','100%', '/OrderBanciOrder/Edit?id=" + rowObject.Id + "')\"  >鏌ョ湅鎶曡瘔涔�</a>";
+                    }
+                    else if (rowObject.OrderType1 == "浠f嫙璐ㄧ枒鍑�") {
+                        return "<a onclick=\"OpenWindow('鏌ョ湅璐ㄧ枒鍑�','98%','100%', '/OrderBanciOrder/Edit?id=" + rowObject.Id + "')\"  >鏌ョ湅璐ㄧ枒鍑�</a>";
+                    }
+                }
+            },
+
+
+        ];
+        dataUrl = "/CooperOrder/GetListWenshu";
+        searchCol = [
+            { label: '鏃堕棿', name: 'XdTime', labtype: 'datearea', hidden: false },
+            { label: '鏂囦功绫诲埆', name: 'Wenshuleixing', labtype: 'combox', hidden: false, data: JSON.parse(Wenshuleixing) },
+            { label: '椤圭洰鍚嶇О', name: 'XmName', labtype: 'txt', hidden: false },
+            { label: '椤圭洰缂栧彿', name: 'XmCode', labtype: 'txt', hidden: false },
+
+            { label: '閲囪喘浜�', name: 'PurchaserName', labtype: 'txt', hidden: false },
+            { label: '閲囪喘浠g悊鏈烘瀯', name: 'Agency', labtype: 'txt', hidden: false },
+            { label: '瀹㈡埛鍚嶇О', name: 'KhdwName', labtype: 'txt', hidden: false },
+           
+
+
+
+
+
+
+
+        ];
+        //var _pageAdd = function () {
+        //    OpenWindow("鏂板鐝", "98%", "90%", "/CooperOrder/Edit/");
+        //}
+
+
+
+
+        var _afterSave = function (result) {
+            if (result) {
+                toastr.success("淇濆瓨鎴愬姛");
+            } else {
+                toastr.error("淇濆瓨澶辫触");
+            }
+        }
+
+        var _afterDel = function (result) {
+            if (result) {
+                toastr.success("鍒犻櫎鎴愬姛");
+            } else {
+                /**/
+                toastr.error("鍒犻櫎鎴愬姛");
+        /**/
+    }
+        }
+
+        var _pageDuanxin = function () {
+            var duanxin = GetGridSelect();
+            var baifangid = "";
+            if (duanxin != '') {
+                for (var i = 0; i < duanxin.length; i++) {
+                    baifangid += duanxin[i] + ','
+                }
+                baifangid = baifangid.substring(0, baifangid.length - 1);
+            } else {
+                toastr.error("璇烽�夋嫨璁㈠崟");
+                return;
+            }
+
+            OpenWindow("缇ゅ彂鐭俊", "50%", "50%", "/OrderBanciOrder/Duanxin?id=" + baifangid);
+
+        }
+
+
+        var _pagePrint = function () {
+
+            var Baomingtime = $("#PBSBaomingtime").val();
+            var Peixunbanci = $("#PBSPeixunbanci").val();
+            var Kechengleixing = $("#PBSKechengleixing").val();
+            var Xingming = $("#PBSXingming").val();
+            var Lianxidianhua = $("#PBSLianxidianhua").val();
+
+
+
+            var Createtimestart = $("#PBSCreatetimestart").val();
+
+            var Createtimeend = $("#PBSCreatetimeend").val();
+            var Createtime = '';
+            if (Createtimestart != '' && Createtimeend != '') {
+                Createtime = Createtimestart + '|' + Createtimeend;
+            }
+
+
+            var url = "/OrderBanciOrder/print?Baomingtime=" + Baomingtime + "&Peixunbanci=" + Peixunbanci + "&Kechengleixing=" + Kechengleixing + "&Xingming=" + Xingming + "&Lianxidianhua=" + Lianxidianhua;
+            var me = window.open(url, "鎵撳嵃");  //鎵撳紑鏂扮獥鍙�
+
+
+        }
+
+    </script>
+}
+
+@section footerScripts{
+    <script type="text/javascript">
+
+
+
+
+
+    </script>
+}
diff --git a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml
index 18d1827..8a85204 100644
--- a/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml
@@ -52,7 +52,22 @@
 
 
 
+        var _pageDuanxin = function () {
+            var duanxin = GetGridSelect();
+            var baifangid = "";
+            if (duanxin != '') {
+                for (var i = 0; i < duanxin.length; i++) {
+                    baifangid += duanxin[i] + ','
+                }
+                baifangid = baifangid.substring(0, baifangid.length - 1);
+            } else {
+                toastr.error("璇烽�夋嫨瀹㈡埛");
+                return;
+            }
 
+            OpenWindow("缇ゅ彂鐭俊", "50%", "50%", "/IntentionVisit/Duanxin?id=" + baifangid);
+
+        }
 
 
 

--
Gitblit v1.9.1