From 4677a6d223f3c3576123f55c4b28a149c4b9322a Mon Sep 17 00:00:00 2001 From: 付煜 <fuyu3103346691@163.com> Date: 星期三, 23 三月 2022 15:40:18 +0800 Subject: [PATCH] 周报提交 --- force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js | 19 ++++++++++++------- force-app/main/default/classes/WeeklyReportCmp.cls | 7 ++++++- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js b/force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js index fff0276..93c578b 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)); @@ -669,13 +669,13 @@ component.find('save_button').set('v.disabled', true); var Report_Date__c = component.get('v.data.Report_Date__c'); - alert('Report_Date__c'+Report_Date__c); + // alert('Report_Date__c'+Report_Date__c); var Person_In_Charge2__c = ""; var Submit_date__c = ""; if (component.get('v.mode') == 'edit') { // 鍛� Submit_date__c Submit_date__c = component.get('v.select_report_data').Submit_date__c; - alert('Submit_date__c'+Submit_date__c); + // alert('Submit_date__c'+Submit_date__c); // 鎷呭綋 Person_In_Charge2__c @@ -683,7 +683,7 @@ } else { // 鍛� Submit_date__c Submit_date__c = this.get_date_string(component.find('select_date').get('v.value')); - alert('Submit_date__c'+Submit_date__c); + // alert('Submit_date__c'+Submit_date__c); // 鎷呭綋 Person_In_Charge2__c Person_In_Charge2__c = component.find('select_agency_person').get('v.value'); @@ -754,7 +754,7 @@ if (!Department_Cateogy__c) { error.push("绉戝 涓嶅瓨鍦�"); } if (!doctor2__c) { error.push("鎷滆浜� 涓嶅瓨鍦�"); } if (!Purpose_Type__c) { error.push("娲诲姩鍖哄垎 涓嶅瓨鍦�"); } - if (!SupportNeeds__c) { error.push("鏀彺闇�姹� 涓嶅瓨鍦�"); } + // if (!SupportNeeds__c) { error.push("鏀彺闇�姹� 涓嶅瓨鍦�"); } if (!Opportunity__c) { Opportunity__c = ""; } if (!Product_Category1__c) { error.push("浜у搧鍖哄垎1 涓嶅瓨鍦�"); } if (Purpose_Type__c && (Purpose_Type__c.substr(-3) == 'SIS' || Purpose_Type__c.substr(-3) == 'OPD')) { @@ -774,7 +774,8 @@ if (component.get('v.mode') == 'edit') { var Agency_Report__c = component.get('v.select_report_data').Id; var action = component.get('c.editAgencyReport'); - alert("Purpose_Type:"+Purpose_Type__c+","+"SupportNeedsc:"+SupportNeeds__c); + debugger + // alert("Purpose_Type:"+Purpose_Type__c+","+"SupportNeedsc:"+SupportNeeds__c); action.setParams({ "Agency_Report_Id" : Agency_Report__c, "Department_Cateogy" : Department_Cateogy__c, @@ -842,6 +843,8 @@ /* Save (New & Copy) */ var action = component.get('c.saveAgencyReport'); + debugger; + // alert(SupportNeeds__c); action.setParams({ "Department_Cateogy" : Department_Cateogy__c, "Purpose_Type" : Purpose_Type__c, @@ -1118,6 +1121,7 @@ searchHos : function(component, event, helper) { var hospital_name = event.getParam("value"); var action = component.get("c.getHospitalList"); + debugger; action.setParams({"hospital_name": hospital_name}); action.setCallback(this, function(response) { @@ -1144,6 +1148,7 @@ }, selectHos : function(component, event, helper) { + debugger var hospital_list = component.find('hospital_list'); $A.util.removeClass(hospital_list, 'slds-is-open'); var accname = event.currentTarget.dataset.accname; diff --git a/force-app/main/default/classes/WeeklyReportCmp.cls b/force-app/main/default/classes/WeeklyReportCmp.cls index 5197381..b7787c5 100644 --- a/force-app/main/default/classes/WeeklyReportCmp.cls +++ b/force-app/main/default/classes/WeeklyReportCmp.cls @@ -258,7 +258,10 @@ @AuraEnabled public static List<Agency_Hospital_Link__c> getHospitalList(String hospital_name) { hospital_name = '%' + hospital_name.trim() + '%'; - return [select Hospital_Name_readonly__c, Id, Hospital__c from Agency_Hospital_Link__c where Hospital_Name_readonly__c like :hospital_name and Agency_Campaign_Obj__c = true]; + system.debug('hospital_name+++'+hospital_name); + List<Agency_Hospital_Link__c> ahllist = [select Hospital_Name_readonly__c, Id, Hospital__c from Agency_Hospital_Link__c where Hospital_Name_readonly__c like :hospital_name and Agency_Campaign_Obj__c = true]; + system.debug('Agency_Campaign_Obj__c+++'+ahllist); + return ahllist; } @RemoteAction @@ -417,6 +420,7 @@ if (Department_Cateogy != '') { agency_report.Department_Cateogy__c = Department_Cateogy; } if (Purpose_Type != '') { agency_report.Purpose_Type__c = Purpose_Type; } //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� start + system.debug('SupportNeedsc+++==++==='+SupportNeedsc); if (SupportNeedsc != '') { agency_report.SupportNeeds__c = SupportNeedsc; } //SWAG-CBX68C fy 銆愬鎵樸�慏AMS绯荤粺鍛ㄦ姤妯″潡鍐呭闇�姹傚鍔� end if (Agency_Report_Header != '') { agency_report.Agency_Report_Header__c = Agency_Report_Header; } @@ -548,6 +552,7 @@ // 閫卞牨銉囥兗銈裤倰鍙栧緱 Date week = Date.valueOf(date_str); this.reports = LightningUtil.selectAgencyReport(week, person_str); + System.debug('this.reports+++'+this.reports); } @RemoteAction -- Gitblit v1.9.1