From d4f1d60996bcec152e100b231c37589270c5fae6 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 21 九月 2022 09:07:10 +0800
Subject: [PATCH] 优化拜访客户

---
 zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
index 478e3ba..e25676f 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
@@ -134,9 +134,25 @@
             {
                 dto.Viscustomer = Viscustomer;
                 dto.Vistime = DateTime.Now;
+                if (!string.IsNullOrWhiteSpace(Viscustomer))
+                {
+                 
+                    var cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(Viscustomer);
+                    if (cooperatecustomCustomerDTO != null)
+                    {
+                        dto.ViscustomerName = cooperatecustomCustomerDTO.Name;
+                    }
+                }
             }
-
-            ViewData["customer"] = _cooperatecustomCustomerService.GetList();
+            if (!string.IsNullOrWhiteSpace(Viscustomer))
+            {
+                ViewData["customer"] = new List<CooperatecustomCustomerDTO>();
+            }
+            else
+            {
+                ViewData["customer"] = _cooperatecustomCustomerService.GetList();
+            }
+         
 
 
 

--
Gitblit v1.9.1