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/IntentionVisitController.cs |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
index 9c398df..595188a 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
@@ -149,6 +149,11 @@
                 if (!string.IsNullOrWhiteSpace(Viscustomer))
                 {
                     dto.Viscustomer = Viscustomer;
+                   var intentionCustomerDTO = _intentionCustomerService.Get(Viscustomer);
+                    if (intentionCustomerDTO != null)
+                    {
+                        dto.ViscustomerName = intentionCustomerDTO.Name;
+                    }
                     IntentionVisitDTOSearch searchEntity = new IntentionVisitDTOSearch();
                     searchEntity.page = 1;
                     searchEntity.rows = 1000;
@@ -173,9 +178,16 @@
 
 
             }
+            if (!string.IsNullOrWhiteSpace(Viscustomer))
+            {
+                ViewData["customer"] = new List<IntentionCustomerDTO>();
+            }
+            else
+            {
+                ViewData["customer"] = _intentionCustomerService.GetList();
+            }
 
-
-            ViewData["customer"] = _intentionCustomerService.GetList();
+           
  
           
 

--
Gitblit v1.9.1