| | |
| | | component.find('select_purpose_type').set('v.options', this.conv_selected(res.allselectlist.Purpose_Type__c)); |
| | | 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)); |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | component.set('v.selected_agency_person', res.allselectlist.AgencyPerson__c[0].label); |
| | | component.set('v.dialog_type', '新建'); |
| | | |
| | |
| | | } |
| | | } |
| | | if (dc != '' || purpose_type != '') { |
| | | |
| | | var action = component.get('c.getProductList'); |
| | | action.setParams({ |
| | | "dc" : dc, |
| | |
| | | }); |
| | | action.setCallback(this,function(response){ |
| | | var state = response.getState(); |
| | | alert(state); |
| | | if(state == 'SUCCESS'){ |
| | | |
| | | var res = response.getReturnValue(); |
| | | component.find('select_Product1').set("v.options", JSON.parse(JSON.stringify(res))); |
| | | component.find('select_Product2').set("v.options", JSON.parse(JSON.stringify(res))); |
| | |
| | | if (select_data['Department_Cateogy__c'] != '') { |
| | | this.set_selected(component, 'select_department', select_data['Department_Cateogy__c']); |
| | | } |
| | | |
| | | // 拜访人 |
| | | component.set('v.default_select_doctor_id', select_data['doctor2__c']); |
| | | this.set_doctor_list(component); |
| | |
| | | |
| | | // 活动区分 Purpose_Type__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'); |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | // 询价 Opportunity__c |
| | | var Opportunity__c = component.get('v.data.Opportunity__c'); |
| | | |
| | |
| | | if (!Department_Cateogy__c) { error.push("科室 不存在"); } |
| | | if (!doctor2__c) { error.push("拜访人 不存在"); } |
| | | if (!Purpose_Type__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')) { |
| | |
| | | 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); |
| | | action.setParams({ |
| | | "Agency_Report_Id" : Agency_Report__c, |
| | | "Department_Cateogy" : Department_Cateogy__c, |
| | | "Purpose_Type" : Purpose_Type__c, |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | "SupportNeedsc" : SupportNeeds__c, |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | "Agency_Report_Header" : Agency_Report_Header__c, |
| | | "Agency_Hospital" : Agency_Hospital__c, |
| | | "Person_In_Charge2" : Person_In_Charge2__c, |
| | |
| | | action.setParams({ |
| | | "Department_Cateogy" : Department_Cateogy__c, |
| | | "Purpose_Type" : Purpose_Type__c, |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | "SupportNeedsc" : SupportNeeds__c, |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end |
| | | "Agency_Report_Header" : Agency_Report_Header__c, |
| | | "Agency_Hospital" : Agency_Hospital__c, |
| | | "Person_In_Charge2" : Person_In_Charge2__c, |
| | |
| | | var result = component.find('result'); |
| | | $A.util.addClass(result, 'disp_none'); |
| | | } |
| | | |
| | | this.select_department(component, null, null); |
| | | }, |
| | | |
| | |
| | | }, |
| | | showExportDate : function(component,objectRecords){ |
| | | console.log('进入showexceportdate'+objectRecords); |
| | | alert(777); |
| | | 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 content = "<table class=\"table slds-table slds-table--bordered slds-table--cell-buffer\">"; |