| | |
| | | component.find('select_result').set('v.options', this.conv_selected(res.allselectlist.Result__c)); |
| | | component.find('select_stageName').set('v.options', this.conv_selected(res.allselectlist.StageName__c)); |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | // component.find('SupportNeeds__c').set('v.options', this.conv_selected(res.allselectlist.SupportNeeds__c)); |
| | | component.find('SupportNeeds__c').set('v.options', this.conv_selected(res.allselectlist.SupportNeeds__c)); |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | component.set('v.selected_agency_person', res.allselectlist.AgencyPerson__c[0].label); |
| | | component.set('v.dialog_type', '新建'); |
| | |
| | | this.set_selected(component, 'select_purpose_type', select_data['Purpose_Type__c']); |
| | | this.select_purpose_type(component); |
| | | } |
| | | |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | // 支援需求 |
| | | if (select_data['SupportNeeds__c'] != '') { |
| | | this.set_selected(component, 'SupportNeeds__c', select_data['SupportNeeds__c']); |
| | | } |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | // 結果 |
| | | if (select_data['Result__c'] != '' && typeof select_data['Result__c'] !== "undefined") { |
| | | component.find('select_result').set('v.value', select_data['Result__c']); |
| | |
| | | var Department_Cateogy__c = component.find('select_department').get('v.value'); |
| | | var doctor2__c = component.find('select_doctor').get('v.value'); |
| | | var Purpose_Type__c = component.find('select_purpose_type').get('v.value'); |
| | | var SupportNeeds__c = component.find('SupportNeeds__c').get('v.value'); |
| | | var Opportunity__c = component.get('v.data.Opportunity__c'); |
| | | var Product_Category1__c = component.find('select_Product1').get('v.value'); |
| | | var Product_Category2__c = component.find('select_Product2').get('v.value'); |
| | |
| | | !Department_Cateogy__c && |
| | | !doctor2__c && |
| | | !Purpose_Type__c && |
| | | !SupportNeeds__c&&//WAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 |
| | | !Opportunity__c && |
| | | !Product_Category1__c && |
| | | !Product_Category2__c && |
| | |
| | | select_report_data['Department_Cateogy__c'] == Department_Cateogy__c && |
| | | select_report_data['doctor2__c'] == doctor2__c && |
| | | select_report_data['Purpose_Type__c'] == Purpose_Type__c && |
| | | select_report_data['SupportNeeds__c'] == SupportNeeds__c &&//WAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 |
| | | select_report_data['Opportunity__c'] == Opportunity__c && |
| | | select_report_data['Product_Category1__c'] == Product_Category1__c && |
| | | select_report_data['Product_Category2__c'] == Product_Category2__c && |
| | |
| | | select_report_data['Department_Cateogy__c'] == Department_Cateogy__c && |
| | | select_report_data['doctor2__c'] == doctor2__c && |
| | | select_report_data['Purpose_Type__c'] == Purpose_Type__c && |
| | | select_report_data['SupportNeeds__c'] == SupportNeeds__c &&//WAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 |
| | | select_report_data['Opportunity__c'] == Opportunity__c && |
| | | select_report_data['Product_Category1__c'] == Product_Category1__c && |
| | | select_report_data['Product_Category2__c'] == Product_Category2__c && |
| | |
| | | var Purpose_Type__c = component.find('select_purpose_type').get('v.value'); |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | // 支援需求 SupportNeeds__c |
| | | // var SupportNeeds__c = component.find('SupportNeeds__c').get('v.value'); |
| | | var SupportNeeds__c = component.find('SupportNeeds__c').get('v.value'); |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | // 询价 Opportunity__c |
| | | var Opportunity__c = component.get('v.data.Opportunity__c'); |
| | |
| | | "Department_Cateogy" : Department_Cateogy__c, |
| | | "Purpose_Type" : Purpose_Type__c, |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | // "SupportNeedsc" : SupportNeeds__c, |
| | | "SupportNeedsc" : SupportNeeds__c, |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | "Agency_Report_Header" : Agency_Report_Header__c, |
| | | "Agency_Hospital" : Agency_Hospital__c, |
| | |
| | | "Department_Cateogy" : Department_Cateogy__c, |
| | | "Purpose_Type" : Purpose_Type__c, |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | // "SupportNeedsc" : SupportNeeds__c, |
| | | "SupportNeedsc" : SupportNeeds__c, |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | "Agency_Report_Header" : Agency_Report_Header__c, |
| | | "Agency_Hospital" : Agency_Hospital__c, |
| | |
| | | component.set('v.doctor_title', ''); |
| | | component.find('select_department').set('v.options', this.conv_selected(component.get('v.allselectlist.Department_Cateogy__c'))); |
| | | component.find('select_purpose_type').set('v.options', this.conv_selected(component.get('v.allselectlist.Purpose_Type__c'))); |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | component.find('SupportNeeds__c').set('v.options', this.conv_selected(component.get('v.allselectlist.SupportNeeds__c'))); |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | // ToDo需要测试手机上能运行不 |
| | | component.set('v.data.Opportunity__c', ''); |
| | | component.find('select_Product1').set('v.value',''); |
| | |
| | | columnDivider = ','; |
| | | lineDivider = '\n'; |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start ,'SupportNeeds__c' ,'支援需求' |
| | | keys = ['Submit_date__c','Person_In_Charge2__c','Report_Date__c','Agency_Hospital__c','Department_Cateogy__c','doctor2__c','visitor_title__c','Product_Category1__c','Product_Category2__c','Product_Category3__c','Purpose_Type__c','Result__c']; |
| | | thkeys = ['周','担当','活动日','医院','科室','拜访人','职位','产品区分1','产品区分2','产品区分3','活动区分','结果'] |
| | | keys = ['Submit_date__c','Person_In_Charge2__c','Report_Date__c','Agency_Hospital__c','Department_Cateogy__c','doctor2__c','visitor_title__c','Product_Category1__c','Product_Category2__c','Product_Category3__c','Purpose_Type__c','Result__c','SupportNeeds__c']; |
| | | thkeys = ['周','担当','活动日','医院','科室','拜访人','职位','产品区分1','产品区分2','产品区分3','活动区分','结果','支援需求'] |
| | | csvStringResult = ''; |
| | | csvStringResult += thkeys.join(columnDivider); |
| | | csvStringResult += lineDivider; |
| | |
| | | }else if(skey == 'Product_Category3__c'){ |
| | | csvStringResult += '"'+ objectRecords[i].Product_Category3__r.Name+'"'; |
| | | } |
| | | // else if(skey == 'SupportNeeds__c'){//SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | // csvStringResult += '"'+ objectRecords[i].SupportNeeds__c+'"'; |
| | | // } |
| | | else if(skey == 'SupportNeeds__c'){//SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | csvStringResult += '"'+ objectRecords[i].SupportNeeds__c+'"'; |
| | | } |
| | | else{ |
| | | csvStringResult += '"'+ objectRecords[i][skey]+'"'; |
| | | } |
| | |
| | | }, |
| | | showExportDate : function(component,objectRecords){ |
| | | console.log('进入showexceportdate'+objectRecords);//SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start ,'SupportNeeds__c' ,'支援需求' |
| | | var keys = ['Submit_date__c','Person_In_Charge2__c','Report_Date__c','Agency_Hospital__c','Department_Cateogy__c','doctor2__c','visitor_title__c','Product_Category1__c','Product_Category2__c','Product_Category3__c','Purpose_Type__c','Result__c']; |
| | | var headers = ['周','担当','活动日','医院','科室','拜访人','职位','产品区分1','产品区分2','产品区分3','活动区分','结果'] |
| | | var keys = ['Submit_date__c','Person_In_Charge2__c','Report_Date__c','Agency_Hospital__c','Department_Cateogy__c','doctor2__c','visitor_title__c','Product_Category1__c','Product_Category2__c','Product_Category3__c','Purpose_Type__c','Result__c','SupportNeeds__c']; |
| | | var headers = ['周','担当','活动日','医院','科室','拜访人','职位','产品区分1','产品区分2','产品区分3','活动区分','结果','支援需求'] |
| | | var content = "<table class=\"table slds-table slds-table--bordered slds-table--cell-buffer\">"; |
| | | content += "<thead><tr class=\"slds-text-title--caps\">"; |
| | | for(i=0;i<headers.length; i++){ |
| | |
| | | }else if(skey == 'Product_Category3__c'){ |
| | | content += '<td>'+ objectRecords[i].Product_Category3__r.Name+'</td>'; |
| | | } |
| | | // else if(skey == 'SupportNeeds__c'){//SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | // content += '<td>'+ objectRecords[i].SupportNeeds__c+'</td>'; |
| | | // } |
| | | else if(skey == 'SupportNeeds__c'){//SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | content += '<td>'+ objectRecords[i].SupportNeeds__c+'</td>'; |
| | | } |
| | | else{ |
| | | content += '<td>'+ objectRecords[i][skey]+'</td>'; |
| | | } |