|  |  | 
 |  |  |                 var report_id = component.get('v.edit_copy_select_report_id'); | 
 |  |  |                 if (report_id != "") { | 
 |  |  |                     var select_EffectProgress1 = ''; | 
 |  |  |                     var OtherBrandConsumables = ''; | 
 |  |  |                     var WarlockClassification = ''; | 
 |  |  |                     var ProductCcategory = ''; | 
 |  |  |                     var productCategories = ''; | 
 |  |  |                     var i = 0; | 
 |  |  |                     for (i = 0; i < reports.length; i++) { | 
 |  |  |                         if (report_id == reports[i]["Id"]) { | 
 |  |  |                             select_EffectProgress1 = reports[i]["EffectProgress__c"]; | 
 |  |  |                             OtherBrandConsumables = reports[i]["OtherBrandConsumables__c"]; | 
 |  |  |                             WarlockClassification = reports[i]["WarlockClassification__c"]; | 
 |  |  |                             ProductCcategory = reports[i]["ProductCcategory__c"]; | 
 |  |  |                             productCategories = reports[i]["productCategories__c"]; | 
 |  |  |                                 break; | 
 |  |  | 
 |  |  |                         component.find('select_EffectProgress').set('v.value', select_EffectProgress1); | 
 |  |  |                     } | 
 |  |  |                     //术士分类 | 
 |  |  |                     if (OtherBrandConsumables != null && OtherBrandConsumables != '') { | 
 |  |  |                         component.find('select_OtherBrandConsumables').set('v.value', OtherBrandConsumables); | 
 |  |  |                     if (WarlockClassification != null && WarlockClassification != '') { | 
 |  |  |                         component.find('select_OtherBrandConsumables').set('v.value', WarlockClassification); | 
 |  |  |                     } | 
 |  |  |                     //已采用其他品牌 | 
 |  |  |                     if (ProductCcategory != null && ProductCcategory != '') { | 
 |  |  | 
 |  |  |             var doctor2__c = component.find('select_doctor').get('v.value'); | 
 |  |  |             var WorkRecord__c = component.find('select_purpose_type').get('v.value'); | 
 |  |  |             var EffectProgress__c = component.find('select_EffectProgress').get('v.value'); | 
 |  |  |             var OtherBrandConsumables__c = component.find('select_OtherBrandConsumables').get('v.value'); | 
 |  |  |             var WarlockClassification__c = component.find('select_OtherBrandConsumables').get('v.value'); | 
 |  |  |             var ProductCcategory__c = component.find('select_ProductCcategory').get('v.value'); | 
 |  |  |             var productCategories__c = component.find('select_productCategories').get('v.value'); | 
 |  |  |             var warlocksNumber__c = component.find('select_warlocksNumber').get('v.value'); | 
 |  |  | 
 |  |  |                     !DealerPersonnel__c && | 
 |  |  |                     !doctor2__c && | 
 |  |  |                     !EffectProgress__c && | 
 |  |  |                     !OtherBrandConsumables__c && | 
 |  |  |                     !WarlockClassification__c && | 
 |  |  |                     !ProductCcategory__c && | 
 |  |  |                     !productCategories__c && | 
 |  |  |                     !warlocksNumber__c && | 
 |  |  | 
 |  |  |                     select_report_data['DealerPersonnel__c'] == DealerPersonnel__c && | 
 |  |  |                     select_report_data['doctor2__c'] == doctor2__c && | 
 |  |  |                     select_report_data['EffectProgress__c'] == EffectProgress__c && | 
 |  |  |                     select_report_data['OtherBrandConsumables__c'] == OtherBrandConsumables__c &&    | 
 |  |  |                     select_report_data['WarlockClassification__c'] == WarlockClassification__c &&    | 
 |  |  |                     select_report_data['ProductCcategory__c'] == ProductCcategory__c && | 
 |  |  |                     select_report_data['productCategories__c'] == productCategories__c && | 
 |  |  |                     select_report_data['warlocksNumber__c'] == warlocksNumber__c && | 
 |  |  | 
 |  |  |                     select_report_data['DealerPersonnel__c'] == DealerPersonnel__c && | 
 |  |  |                     select_report_data['doctor2__c'] == doctor2__c && | 
 |  |  |                     select_report_data['EffectProgress__c'] == EffectProgress__c && | 
 |  |  |                     select_report_data['OtherBrandConsumables__c'] == OtherBrandConsumables__c &&   | 
 |  |  |                     select_report_data['WarlockClassification__c'] == WarlockClassification__c &&   | 
 |  |  |                     select_report_data['ProductCcategory__c'] == ProductCcategory__c && | 
 |  |  |                     select_report_data['productCategories__c'] == productCategories__c && | 
 |  |  |                     select_report_data['warlocksNumber__c'] == warlocksNumber__c && | 
 |  |  | 
 |  |  |         var EffectProgress__c = component.find('select_EffectProgress').get('v.value'); | 
 |  |  |          // 科室同来耗材月使用量   ConsumptionOfConsumables__c       | 
 |  |  |         var ConsumptionOfConsumables__c = component.find('select_ConsumptionOfConsumables').get('v.value'); | 
 |  |  |          // 术士分类   OtherBrandConsumables__c   | 
 |  |  |         var OtherBrandConsumables__c = component.find('select_OtherBrandConsumables').get('v.value'); | 
 |  |  |          // 术士分类   WarlockClassification__c   | 
 |  |  |         var WarlockClassification__c = component.find('select_OtherBrandConsumables').get('v.value'); | 
 |  |  |           // 已采用其他品牌   ProductCcategory__c   | 
 |  |  |         var ProductCcategory__c = component.find('select_ProductCcategory').get('v.value'); | 
 |  |  |            // 其他品牌产品类别   productCategories__c   | 
 |  |  | 
 |  |  |         if (!EffectProgress__c) { error.push("效果/进度 不存在"); }  | 
 |  |  |         // if (!OtherBrandConsumables__c) { error.push("术士分类 不存在"); } | 
 |  |  |         if (!ProductCcategory__c) { error.push("已采用其他品牌  不存在"); } | 
 |  |  |         if (!productCategories__c) { error.push("产品类别 不存在"); } | 
 |  |  |         // if (!productCategories__c) { error.push("其他品牌产品类别 不存在"); } | 
 |  |  |         if (!ConsumptionOfConsumables__c) { error.push("科室同类耗材月使用量 不能为空"); } | 
 |  |  |         if (!warlocksNumber__c) { error.push("产品用量 不能为空"); } | 
 |  |  |         for (var i = 0; i < error.length; i++) { | 
 |  |  | 
 |  |  |                 "ConsumptionOfConsumables": ConsumptionOfConsumables__c, | 
 |  |  |                 "WorkRecord": WorkRecord__c, | 
 |  |  |                 "EffectProgress": EffectProgress__c, | 
 |  |  |                 "OtherBrandConsumables" : OtherBrandConsumables__c, | 
 |  |  |                 "WarlockClassification" : WarlockClassification__c, | 
 |  |  |                 "ProductCcategory" : ProductCcategory__c, | 
 |  |  |                 "productCategories" : productCategories__c, | 
 |  |  |                 "warlocksNumber" : warlocksNumber__c, | 
 |  |  | 
 |  |  |                 "DealerPersonnel": DealerPersonnel__c, | 
 |  |  |                 "ProductCcategory" : ProductCcategory__c, | 
 |  |  |                 "productCategories" : productCategories__c, | 
 |  |  |                 "OtherBrandConsumables" : OtherBrandConsumables__c, | 
 |  |  |                 "WarlockClassification" : WarlockClassification__c, | 
 |  |  |                 "ProductClassification": ProductClassification__c, | 
 |  |  |                 "WorkRecord": WorkRecord__c, | 
 |  |  |                 "EffectProgress": EffectProgress__c, | 
 |  |  | 
 |  |  |         } | 
 |  |  |         columnDivider = ','; | 
 |  |  |         lineDivider = '\n'; | 
 |  |  |         keys = ['Submit_date__c', 'Person_In_Charge2__c', 'Report_Date__c', 'Agency_Hospital__c','Department_Cateogy__c','DealerPersonnel__c','WorkRecord__c','doctor2__c','ProductClassification__c','UseProduct1__c', 'UseProduct2__c','UseProduct3__c', 'EffectProgress__c','ConsumptionOfConsumables__c',  'OtherBrandConsumables__c', 'ProductCcategory__c', 'productCategories__c','warlocksNumber__c','WorkMark__c']; | 
 |  |  |         keys = ['Submit_date__c', 'Person_In_Charge2__c', 'Report_Date__c', 'Agency_Hospital__c','Department_Cateogy__c','DealerPersonnel__c','WorkRecord__c','doctor2__c','ProductClassification__c','UseProduct1__c', 'UseProduct2__c','UseProduct3__c', 'EffectProgress__c','ConsumptionOfConsumables__c',  'WarlockClassification__c', 'ProductCcategory__c', 'productCategories__c','warlocksNumber__c','WorkMark__c']; | 
 |  |  |         thkeys = ['周', '担当', '活动日', '医院', '科室', '经销商人员', '工作记录',  '医院人员','产品分类(第三分类)', '使用产品1(产品型号)', '使用产品2','使用产品3','效果/进度','科室同类耗材月使用量','术士分类','已采用其他品牌','其他品牌产品类别','产品用量','工作标记'] | 
 |  |  |         csvStringResult = ''; | 
 |  |  |         csvStringResult += thkeys.join(columnDivider); | 
 |  |  | 
 |  |  |                 } else if (skey == 'UseProduct3__c') { | 
 |  |  |                     csvStringResult +=  objectRecords[i].UseProduct3__r.Name; | 
 |  |  |                 } else if (skey == 'EffectProgress__c'){ | 
 |  |  |                     csvStringResult +=  objectRecords[i].EffectProgress__r.Name; | 
 |  |  |                 }else if (skey == 'OtherBrandConsumables__c'){  | 
 |  |  |                     csvStringResult +=  objectRecords[i].OtherBrandConsumables__r.Name; | 
 |  |  |                     csvStringResult +=  objectRecords[i].EffectProgress__r.EffectProgress__c; | 
 |  |  |                 }else if (skey == 'WarlockClassification__c'){  | 
 |  |  |                     csvStringResult +=  objectRecords[i].WarlockClassification__r.WarlockClassification__c; | 
 |  |  |                 }else if(skey == 'ProductCcategory__c'){ | 
 |  |  |                     csvStringResult +=  objectRecords[i].ProductCcategory__r.Name; | 
 |  |  |                     csvStringResult +=  objectRecords[i].ProductCcategory__r.ProductCcategory__c; | 
 |  |  |                 }else if(skey == 'productCategories__c'){ | 
 |  |  |                     csvStringResult +=  objectRecords[i].productCategories__r.Name; | 
 |  |  |                     csvStringResult +=  objectRecords[i].productCategories__r.productCategories__c; | 
 |  |  |                 }else{ | 
 |  |  |                     csvStringResult +=  objectRecords[i][skey] ; | 
 |  |  |                 } | 
 |  |  | 
 |  |  |     //  导出页面显示的模板 | 
 |  |  |     showExportDate: function (component, objectRecords) { | 
 |  |  |         console.log('进入showexceportdate' + objectRecords); | 
 |  |  |         var keys = ['Submit_date__c', 'Person_In_Charge2__c', 'Report_Date__c', 'Agency_Hospital__c','Department_Cateogy__c','DealerPersonnel__c','WorkRecord__c','doctor2__c','ProductClassification__c','UseProduct1__c', 'UseProduct2__c','UseProduct3__c', 'EffectProgress__c','ConsumptionOfConsumables__c',  'OtherBrandConsumables__c', 'ProductCcategory__c','productCategories__c', 'warlocksNumber__c','WorkMark__c']; | 
 |  |  |         var keys = ['Submit_date__c', 'Person_In_Charge2__c', 'Report_Date__c', 'Agency_Hospital__c','Department_Cateogy__c','DealerPersonnel__c','WorkRecord__c','doctor2__c','ProductClassification__c','UseProduct1__c', 'UseProduct2__c','UseProduct3__c', 'EffectProgress__c','ConsumptionOfConsumables__c',  'WarlockClassification__c', 'ProductCcategory__c','productCategories__c', 'warlocksNumber__c','WorkMark__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\">"; | 
 |  |  | 
 |  |  |                 } else if (skey == 'UseProduct3__c') { | 
 |  |  |                     content += '<td>' + objectRecords[i].UseProduct3__r.Name + '</td>'; | 
 |  |  |                 } else if (skey == 'EffectProgress__c'){ | 
 |  |  |                     content += '<td>' + objectRecords[i].EffectProgress__r.Name + '</td>'; | 
 |  |  |                 }else if (skey == 'OtherBrandConsumables__c'){ | 
 |  |  |                     content += '<td>' + objectRecords[i].OtherBrandConsumables__r.Name + '</td>';  | 
 |  |  |                     content += '<td>' + objectRecords[i].EffectProgress__r.EffectProgress__c + '</td>'; | 
 |  |  |                 }else if (skey == 'WarlockClassification__c'){ | 
 |  |  |                     content += '<td>' + objectRecords[i].WarlockClassification__r.WarlockClassification__c + '</td>';  | 
 |  |  |                 }else if (skey == 'ProductCcategory__c'){ | 
 |  |  |                     content += '<td>' + objectRecords[i].ProductCcategory__r.Name + '</td>'; | 
 |  |  |                     content += '<td>' + objectRecords[i].ProductCcategory__r.ProductCcategory__c + '</td>'; | 
 |  |  |                 }else if (skey == 'productCategories__c'){ | 
 |  |  |                     content += '<td>' + objectRecords[i].productCategories__r.Name + '</td>'; | 
 |  |  |                     content += '<td>' + objectRecords[i].productCategories__r.productCategories__c + '</td>'; | 
 |  |  |                 }else{ | 
 |  |  |                     content += '<td>' + objectRecords[i][skey] + '</td>'; | 
 |  |  |                 } | 
 |  |  | 
 |  |  |     //工作会记录 | 
 |  |  |     selectPurposeType: function (component,event,helper) { | 
 |  |  |         var doctor_value = component.find('select_purpose_type').get('v.value'); | 
 |  |  |         alert(doctor_value); | 
 |  |  |         if(doctor_value != ''){ | 
 |  |  |         var action = component.get('c.selectPurposeTypes'); | 
 |  |  |         action.setParams({ |