| | |
| | | } |
| | | |
| | | if (reportDate != null) { |
| | | console.log('reportDate = ' + reportDate); |
| | | component.set('v.data.Report_Date__c', reportDate); |
| | | } |
| | | |
| | |
| | | component.find('select_Product1').set('v.value',''); |
| | | component.find('select_Product2').set('v.value',''); |
| | | component.find('select_Product3').set('v.value',''); |
| | | console.log('reportDate = 空'); |
| | | component.set('v.data.Report_Date__c', ''); |
| | | component.set('v.oppdata.Close_Forecasted_Date__c', ''); |
| | | component.set('v.oppdata.Amount__c', ''); |
| | |
| | | let errorDatas = []; |
| | | let errorDataRow = []; |
| | | debugger |
| | | var fileContentData = component.get("v.fileContentData").split('\n'); |
| | | for (var i=0; i<ress.length; i++) { |
| | | res1 += ress[i].substr(7)+'\n'; |
| | | if (ress[i] != '') { |
| | |
| | | errorData.errorRow = ress[i].substr(7).substring(1, 2); |
| | | errorDataRow.push(errorData.errorRow); |
| | | errorData.errorInfo = ress[i].substr(7).substring(5).replace('=',''); |
| | | if(errorData.errorInfo == '拜访人不存在'){ |
| | | console.log('errorData.errorRow = ' + errorData.errorRow) |
| | | errorData.errorInfo ='拜访人 ' + fileContentData[errorData.errorRow].split(',')[4] + '不存在'; |
| | | } |
| | | errorDatas.push(errorData); |
| | | } else { |
| | | errorDatas[index].errorInfo += '; ' + ress[i].substr(7).substring(5); |
| | | if(ress[i].substr(7).substring(5) == '拜访人不存在'){ |
| | | errorDatas[index].errorInfo += '; ' + '拜访人 ' + fileContentData[errorDatas[index].errorRow].split(',')[4] + '不存在'; |
| | | }else{ |
| | | errorDatas[index].errorInfo += '; ' + ress[i].substr(7).substring(5); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var fileContentData = component.get("v.fileContentData").split('\n'); |
| | | let errorColumns = [ |
| | | { label: '错误行', fieldName: 'errorRow', type: 'text', hideDefaultActions: true, initialWidth: 100 }, |
| | | { label: '错误信息', fieldName: 'errorInfo', type: 'text', hideDefaultActions: true, initialWidth: 300, wrapText: true } |
| | |
| | | let errorDatas = []; |
| | | let errorDataRow = []; |
| | | debugger |
| | | var fileContentData = component.get("v.fileContentData").split('\n'); |
| | | console.log('errorArray = ' + JSON.stringify(errorArray)) |
| | | for (var i in errorArray) { |
| | | if (errorArray[i] != '') { |
| | |
| | | errorData.errorRow = errorArray[i].trim().substring(1, 2); |
| | | errorDataRow.push(errorData.errorRow); |
| | | errorData.errorInfo = errorArray[i].trim().substring(5,errorArray[i].trim().length).replace('=',''); |
| | | if(errorData.errorInfo == '拜访人AWS不存在'){ |
| | | errorData.errorInfo ='拜访人 ' + fileContentData[errorData.errorRow].split(',')[4] + '不存在'; |
| | | } |
| | | errorDatas.push(errorData); |
| | | } else { |
| | | errorDatas[index].errorInfo += '; ' + errorArray[i].trim().substring(5,errorArray[i].trim().length); |
| | | if(errorArray[i].trim().substring(5) == '拜访人AWS不存在'){ |
| | | errorData[index].errorInfo = '; ' + '拜访人 ' + fileContentData[errorDatas[index].errorRow].split(',')[4] + '不存在'; |
| | | }else{ |
| | | errorDatas[index].errorInfo += '; ' + errorArray[i].trim().substring(5,errorArray[i].trim().length); |
| | | } |
| | | } |
| | | } |
| | | } |