付煜
2022-03-23 4677a6d223f3c3576123f55c4b28a149c4b9322a
周报提交
2个文件已修改
26 ■■■■■ 已修改文件
force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/WeeklyReportCmp.cls 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
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 【委托】DAMS系统周报模块内容需求增加 start
        system.debug('SupportNeedsc+++==++==='+SupportNeedsc);
        if (SupportNeedsc != '') { agency_report.SupportNeeds__c = SupportNeedsc; }
        //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 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