|  |  |  | 
|---|
|  |  |  | <aura:component controller="DealerPersonnelController" | 
|---|
|  |  |  | implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes" | 
|---|
|  |  |  | access="global"> | 
|---|
|  |  |  | <!-- 批量添加周报 start--> | 
|---|
|  |  |  | <!-- <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> --> | 
|---|
|  |  |  | <aura:attribute name="reports_date" type="List" /> | 
|---|
|  |  |  | <aura:attribute name="errorMessage" type="String" /> | 
|---|
|  |  |  | <aura:attribute name="TableContent" type="String" description=" Show the Result class" /> | 
|---|
|  |  |  | <aura:attribute name="TableContent2" type="String" description=" Show the Result class" /> | 
|---|
|  |  |  | <aura:attribute name="TargetFileName" type="String" description="Name of the file" /> | 
|---|
|  |  |  | <aura:attribute name="tableheaders" type="Object[]" /> | 
|---|
|  |  |  | <aura:attribute name="fileContentData" type="String" /> | 
|---|
|  |  |  | <aura:attribute name="filename" type="String" /> | 
|---|
|  |  |  | <aura:attribute name="NumOfRecords" type="Integer" default="1000" /> | 
|---|
|  |  |  | <aura:attribute name="showMain" type="Boolean" default="true" /> | 
|---|
|  |  |  | <aura:attribute name="IsEventDefault" type="Boolean" default="true" /> | 
|---|
|  |  |  | <aura:attribute name="login" type="Boolean" default="false" /> | 
|---|
|  |  |  | <aura:attribute name="successMessage" type="String" /> | 
|---|
|  |  |  | <!-- 批量添加周报 end--> | 
|---|
|  |  |  | <aura:renderIf isTrue="{!v.login}"> | 
|---|
|  |  |  | implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes" | 
|---|
|  |  |  | access="global"> | 
|---|
|  |  |  | <!-- 批量添加周报 start--> | 
|---|
|  |  |  | <!-- <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> --> | 
|---|
|  |  |  | <aura:attribute name="reports_date" type="List" /> | 
|---|
|  |  |  | <aura:attribute name="errorMessage" type="String" /> | 
|---|
|  |  |  | <aura:attribute name="TableContent" type="String" description=" Show the Result class" /> | 
|---|
|  |  |  | <aura:attribute name="TableContent2" type="String" description=" Show the Result class" /> | 
|---|
|  |  |  | <aura:attribute name="TargetFileName" type="String" description="Name of the file" /> | 
|---|
|  |  |  | <aura:attribute name="tableheaders" type="Object[]" /> | 
|---|
|  |  |  | <aura:attribute name="fileContentData" type="String" /> | 
|---|
|  |  |  | <aura:attribute name="filename" type="String" /> | 
|---|
|  |  |  | <aura:attribute name="NumOfRecords" type="Integer" default="1000" /> | 
|---|
|  |  |  | <aura:attribute name="showMain" type="Boolean" default="true" /> | 
|---|
|  |  |  | <aura:attribute name="IsEventDefault" type="Boolean" default="true" /> | 
|---|
|  |  |  | <aura:attribute name="login" type="Boolean" default="false" /> | 
|---|
|  |  |  | <aura:attribute name="successMessage" type="String" /> | 
|---|
|  |  |  | <!-- start DTT-zhj 增加错误信息table 2023-05-16--> | 
|---|
|  |  |  | <aura:attribute name="errorData" type="Object" /> | 
|---|
|  |  |  | <aura:attribute name="errorColumns" type="List" /> | 
|---|
|  |  |  | <!-- show Error information --> | 
|---|
|  |  |  | <aura:attribute name="showErrorInfo" type="Boolean" default="false" /> | 
|---|
|  |  |  | <!-- end DTT-zhj 增加错误信息table 2023-05-16--> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 批量添加周报 end--> | 
|---|
|  |  |  | <aura:renderIf isTrue="{!v.login}"> | 
|---|
|  |  |  | <div class="slds-spinner_container height100vh"> | 
|---|
|  |  |  | <div class="slds-spinner--brand slds-spinner slds-spinner--medium" role="alert"> | 
|---|
|  |  |  | <span class="slds-assistive-text">Loading</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </aura:renderIf> | 
|---|
|  |  |  | <!-- 批量添加周报 start--> | 
|---|
|  |  |  | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv" style="z-index: 10001"> | 
|---|
|  |  |  | <ui:inputText aura:id="articleURL" /> | 
|---|
|  |  |  | <div class="demo-only" style="height: 8rem;"> | 
|---|
|  |  |  | <div class="slds-notify_container slds-is-relative"> | 
|---|
|  |  |  | <div class="slds-notify slds-notify_toast slds-theme_error" role="status"> | 
|---|
|  |  |  | <div class=" slds-m-left_xx-large"> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"> | 
|---|
|  |  |  | <lightning:icon alternativeText="error" iconName="utility:error" size="small" | 
|---|
|  |  |  | class="buttonColor slds-m-right_small" /> | 
|---|
|  |  |  | <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2> | 
|---|
|  |  |  | <!-- 批量添加周报 start--> | 
|---|
|  |  |  | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv" style="z-index: 10001"> | 
|---|
|  |  |  | <ui:inputText aura:id="articleURL" /> | 
|---|
|  |  |  | <div class="demo-only" style="height: 8rem;"> | 
|---|
|  |  |  | <div class="slds-notify_container slds-is-relative"> | 
|---|
|  |  |  | <div class="slds-notify slds-notify_toast slds-theme_error" role="status"> | 
|---|
|  |  |  | <div class=" slds-m-left_xx-large"> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"> | 
|---|
|  |  |  | <lightning:icon alternativeText="error" iconName="utility:error" size="small" | 
|---|
|  |  |  | class="buttonColor slds-m-right_small" /> | 
|---|
|  |  |  | <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01"> | 
|---|
|  |  |  | <ui:inputText aura:id="articleURL" /> | 
|---|
|  |  |  | <div class="demo-only" style="height: 8rem;"> | 
|---|
|  |  |  | <div class="slds-notify_container slds-is-relative"> | 
|---|
|  |  |  | <div class="slds-notify slds-notify_toast slds-theme_success" role="alert"> | 
|---|
|  |  |  | <div class=" slds-m-left_xx-large"> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"> | 
|---|
|  |  |  | <lightning:icon alternativeText="Success" iconName="utility:success" size="small" | 
|---|
|  |  |  | class="buttonColor slds-m-right_small" /> | 
|---|
|  |  |  | <h2 class="slds-text-heading_small ">{!v.successMessage}</h2> | 
|---|
|  |  |  | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01"> | 
|---|
|  |  |  | <ui:inputText aura:id="articleURL" /> | 
|---|
|  |  |  | <div class="demo-only" style="height: 8rem;"> | 
|---|
|  |  |  | <div class="slds-notify_container slds-is-relative"> | 
|---|
|  |  |  | <div class="slds-notify slds-notify_toast slds-theme_success" role="alert"> | 
|---|
|  |  |  | <div class=" slds-m-left_xx-large"> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"> | 
|---|
|  |  |  | <lightning:icon alternativeText="Success" iconName="utility:success" size="small" | 
|---|
|  |  |  | class="buttonColor slds-m-right_small" /> | 
|---|
|  |  |  | <h2 class="slds-text-heading_small ">{!v.successMessage}</h2> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div > | 
|---|
|  |  |  | <div class="slds-modal__header "> | 
|---|
|  |  |  | <h4 id="headerTarget" class="slds-float--left"></h4> | 
|---|
|  |  |  | <h2 id="headerTarget" class="slds-text-heading--medium">周报批量导入</h2> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium "> | 
|---|
|  |  |  | <aura:if isTrue="{!v.showMain}"> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <center> | 
|---|
|  |  |  | <lightning:input type="file" class="file" uara:id="file" onchange="{!c.CreateRecord}" /> | 
|---|
|  |  |  | </center> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <aura:set attribute="else"> | 
|---|
|  |  |  | <ui:outputRichText class="uiOutputRichText slds-m--around-large" value="{!v.TableContent}" /> | 
|---|
|  |  |  | <div class="slds-p-around--large slds-align--absolute-center"> | 
|---|
|  |  |  | <lightning:button label="保存" variant="brand" onclick="{!c.processFileContent}" /> | 
|---|
|  |  |  | <lightning:button label="取消" variant="brand" onclick="{!c.cancel}" /> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <div class="slds-modal__header "> | 
|---|
|  |  |  | <h4 id="headerTarget" class="slds-float--left"></h4> | 
|---|
|  |  |  | <h2 id="headerTarget" class="slds-text-heading--medium">客户人员批量导入</h2> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium "> | 
|---|
|  |  |  | <aura:if isTrue="{!v.showMain}"> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <center> | 
|---|
|  |  |  | <lightning:input type="file" class="file" uara:id="file" onchange="{!c.CreateRecord}" /> | 
|---|
|  |  |  | </center> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <aura:set attribute="else"> | 
|---|
|  |  |  | <ui:outputRichText class="uiOutputRichText slds-m--around-large" value="{!v.TableContent}" /> | 
|---|
|  |  |  | <div class="slds-p-around--large slds-align--absolute-center"> | 
|---|
|  |  |  | <lightning:button label="保存" variant="brand" onclick="{!c.processFileContent}" /> | 
|---|
|  |  |  | <lightning:button label="取消" variant="brand" onclick="{!c.cancel}" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <aura:if isTrue="{!v.showErrorInfo}"> | 
|---|
|  |  |  | <div class="slds-p-around--large slds-align--absolute-center"> | 
|---|
|  |  |  | <lightning:button label="导出错误信息" variant="brand" onclick="{!c.exportErrorInfo}" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="slds-p-around--large slds-align--absolute-center"> | 
|---|
|  |  |  | <div style="height: 300px;overflow-x:scroll"> | 
|---|
|  |  |  | <lightning:datatable keyField="id" data="{! v.errorData }" columns="{! v.errorColumns }" | 
|---|
|  |  |  | hideCheckboxColumn="true"  minColumnWidth="120"/> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </aura:if> | 
|---|
|  |  |  | </aura:set> | 
|---|
|  |  |  | </aura:if> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </aura:set> | 
|---|
|  |  |  | </aura:if> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 批量添加周报 end--> | 
|---|
|  |  |  | <!-- 批量添加周报 end--> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </aura:component> | 
|---|