buli
2023-07-14 36d15f189de2e83ce2576715dac30c3c260388dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<<<<<<< HEAD
<aura:component
    controller="DealerPersonnelController"
=======
<!--
 * @Author: Thhto 997058689@qq.com
 * @Date: 2022-07-08 10:47:25
 * @LastEditors: Thhto 997058689@qq.com
 * @LastEditTime: 2023-02-03 15:25:46
 * @FilePath: \ceshihuanj\force-app\main\default\aura\DealerPersonnelInformationImport\DealerPersonnelInformationImport.cmp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<aura:component controller="DealerPersonnelController"
>>>>>>> LEXCommunityLiJun
    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 class="slds-spinner__dot-a"></div>
                <div class="slds-spinner__dot-b"></div>
            </div>
        </div>
    </aura:renderIf>
    <!-- 批量添加周报 start-->
<<<<<<< HEAD
    <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-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;">
>>>>>>> LEXCommunityLiJun
            <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
<<<<<<< HEAD
                            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>
=======
                            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" />
                            <!-- DB202301262139 SFDC经销商人员导入功能改进 start -->
                            <!-- <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2> -->
                            <pre class="slds-text-heading_small ">{!v.errorMessage}</pre>
                            <!-- DB202301262139 SFDC经销商人员导入功能改进 end -->
>>>>>>> LEXCommunityLiJun
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01">
<<<<<<< HEAD
        <ui:inputText aura:id="articleURL" />
        <div class="demo-only" style="height: 8rem">
=======
        <!-- <ui:inputText aura:id="articleURL" /> -->
        <div class="demo-only" style="height: 8rem;">
>>>>>>> LEXCommunityLiJun
            <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>
<<<<<<< HEAD
    <div>
        <div class="slds-modal__header">
=======
    <div >
        <div class="slds-modal__header ">
>>>>>>> LEXCommunityLiJun
            <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">
<<<<<<< HEAD
                    <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}"
                        />
=======
                    <ui:outputRichText class="uiOutputRichText slds-m--around-large" value="{!v.TableContent}" />
                    <div class="slds-p-around--large slds-align--absolute-center">
                        <lightning:button aura:id="save_con" label="保存" variant="brand" onclick="{!c.processFileContent}" disabled="false" />
                        <lightning:button label="取消" variant="brand" onclick="{!c.cancel}" />
>>>>>>> LEXCommunityLiJun
                    </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>
<<<<<<< HEAD
                        <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 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"/>
>>>>>>> LEXCommunityLiJun
                            </div>
                        </div>
                    </aura:if>
                </aura:set>
            </aura:if>
        </div>
    </div>
    <!-- 批量添加周报 end-->
</aura:component>