From 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 18 三月 2022 18:27:34 +0800
Subject: [PATCH] NFM606fix

---
 force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js b/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js
index 52e7b79..fff0276 100644
--- a/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js
+++ b/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js
@@ -12,8 +12,8 @@
                 component.set('v.allselectlist',res.allselectlist);
                 component.set('v.doclist',res.doclist);
                 // PIPL update Yin Mingjie 21/02/2022 start
-                // component.find('select_agency_person').set('v.options', this.conv_selected(res.allselectlist.AgencyPerson__c));
-                this.search_contact(component, event, helper,res.allselectlist.AgencyPerson__c);
+                component.find('select_agency_person').set('v.options', this.conv_selected(res.allselectlist.AgencyPerson__c));
+                // this.search_contact(component, event, helper,res.allselectlist.AgencyPerson__c);
                 // PIPL update Yin Mingjie 21/02/2022 end
                 component.find('select_department').set('v.options', this.conv_selected(res.allselectlist.Department_Cateogy__c));
                 component.find('select_purpose_type').set('v.options', this.conv_selected(res.allselectlist.Purpose_Type__c));
@@ -57,7 +57,11 @@
             var searchUrl = result.searchUrl;
             this.search_core(token,searchUrl,payload,(result)=>{
                 if(result.status == '0'){
-                    this.to_contact_list(result,contactData,component);
+                    if(result.object != null){
+                        this.to_contact_list(result,contactData,component);
+                    }else{
+                        component.set('v.login',false);
+                    }
                 }else{
                     this.error('AWS search status : ' + result.status);
                     component.set('v.login',false);
@@ -299,8 +303,8 @@
     
     get_agency_person_name : function(component, agency_person_value) {
         // PIPL update Yin Mingjie 21/02/2022 start
-        // var allselectlist = component.get('v.allselectlist.AgencyPerson__c');
-        var allselectlist = component.get('v.allselectlistAgencyPerson');
+        var allselectlist = component.get('v.allselectlist.AgencyPerson__c');
+        // var allselectlist = component.get('v.allselectlistAgencyPerson');
         // PIPL update Yin Mingjie 21/02/2022 end
         var new_label = '';
         for (var i = 0; i < allselectlist.length; i++) {

--
Gitblit v1.9.1