| | |
| | | if (key == 'sre') {continue;} |
| | | dataArr.push(key); |
| | | } |
| | | if(dataArr.length == 0){ |
| | | component.set('v.login',false); |
| | | this.warning('没有找到符合条件的客户人员'); |
| | | return; |
| | | } |
| | | let obj= Object.create(null); |
| | | obj['dataIds'] = dataArr; |
| | | var data = JSON.stringify(obj); |
| | |
| | | saveRecords : function(component,event){ |
| | | component.set('v.login',true); |
| | | var action = component.get("c.processData"); |
| | | debugger; |
| | | var selectDate = component.find('select_date').get('v.value'); |
| | | var fieldsList=['Name','Phone','AccountNumber']; //Please write your code dynamic fields |
| | | var sss=component.get("v.fileContentData"); |
| | | action.setParams({ |
| | | fileData : component.get("v.fileContentData"), |
| | | //selectDateselectDate :component.find('select_date').get('v.value'), |
| | |
| | | } |
| | | columnDivider = ','; |
| | | lineDivider = '\n'; |
| | | 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','活动区分','结果'] |
| | | //SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | 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; |
| | |
| | | csvStringResult += '"'+ objectRecords[i].Product_Category2__r.Name+'"'; |
| | | }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{ |
| | | csvStringResult += '"'+ objectRecords[i][skey]+'"'; |
| | | } |
| | |
| | | return csvStringResult; |
| | | }, |
| | | 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','doctor2__c','visitor_title__c','Product_Category1__c','Product_Category2__c','Product_Category3__c','Purpose_Type__c','Result__c']; |
| | | var headers = ['周','担当','活动日','医院','科室','拜访人','职位','产品区分1','产品区分2','产品区分3','活动区分','结果'] |
| | | console.log('进入showexceportdate'+objectRecords);//SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start |
| | | 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++){ |
| | |
| | | content += '<td>'+ objectRecords[i].Product_Category2__r.Name+'</td>'; |
| | | }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{ |
| | | content += '<td>'+ objectRecords[i][skey]+'</td>'; |
| | | } |
| | |
| | | // var data = this.search(searchUrl,data,token); |
| | | // return data;searchUrl,requestSearchPayload,token |
| | | // }, |
| | | |
| | | }) |