fuyu
2023-01-05 c2c5fc25aa9e92a0ab8ebcea4e01a176359d2f78
德勤修改后代码备份
10个文件已添加
838 ■■■■■ 已修改文件
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.auradoc 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.cmp 316 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.cmp-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.css 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.design 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.svg 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplayController.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplayHelper.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplayRenderer.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/AttachmentDisplayController.cls 452 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.auradoc
New file
@@ -0,0 +1,6 @@
<aura:documentation>
    <aura:description>Documentation</aura:description>
    <aura:example name="ExampleName" ref="exampleComponentName" label="Label">
        Example Description
    </aura:example>
</aura:documentation>
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.cmp
New file
@@ -0,0 +1,316 @@
<aura:component implements="flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes,lightning:isUrlAddressable" access="global" controller="AttachmentDisplayController">
    <aura:attribute name="DNId" type="String"
                    description="用来从父对象接收传递过来的签收单id"
                    default=""/>
    <aura:handler name="init" action="{!c.doInit}" value="{!this}"
                    description="初始化方法"/>
    <aura:attribute name="currentData" type="Object[]" description="明细页当前显示的明细的信息" />
    <div>
        <lightning:spinner aura:id="mySpinner" alternativeText='请等待' size="large"  class="slds-spinner_container"/>
    </div>
    <div id="allDivs" >
        <div id="ins" style=" width:1150px;margin-right: 4px; ">
            <!-- 显示在明细页的当前明细的表格 -->
            <div id="inTables">
                <!-- <lightning:card> -->
                <aura:set attribute="title">
                    进口单证明细
                </aura:set>
                <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-hint-parent slds-no-row-hover " style="border-collapse: collapse;border-color:#D7D7D7;" border="1px " >
                    <thead>
                        <tr class="slds-line-height_reset slds-text-title_caps">
                            <!-- 第一列 产品明细 -->
                            <!-- <th class="slds-is-resizable" tabindex="-1" data-label="产品明细" scope="row">
                                <span class="slds-grid slds-grid_align-spread" style="width: 120px;text-align: left;display:block;">
                                    <div class="slds-truncate">
                                        <span title="产品明细" class="slds-truncate" style="padding-bottom: 3px;">产品明细</span>
                                    </div>
                                </span>
                            </th> -->
                            <th class="slds-is-resizable" tabindex="-1" data-label="产品明细" scope="row" style="width: 146px;position:static">
                                <span class="slds-grid slds-grid_align-spread" style="text-align: left;display:block;">
                                    <div class="slds-truncate">
                                        <span title="产品明细" class="slds-truncate" style="padding-bottom: 3px;">产品明细</span>
                                    </div>
                                </span>
                            </th>
                            <!-- 第二列 机身编码 -->
                            <th class="slds-is-resizable" tabindex="-1" data-label="机身编码" scope="row" style="width: 240px;height: 35px;">
                                <span class="slds-grid slds-grid_align-spread" style="text-align: left;display:block;">
                                    <div class="slds-truncate">
                                        <span title="机身编码" class="slds-truncate" style="padding-bottom: 3px;">机身编码</span>
                                    </div>
                                </span>
                            </th>
                             <!-- 第三列 管理编码 -->
                             <th class="slds-is-resizable" tabindex="-1" data-label="管理编码" scope="row" style="width: 240px;height: 35px;">
                                <span class="slds-grid slds-grid_align-spread" style="text-align: left;display:block;">
                                    <div class="slds-truncate">
                                        <span title="管理编码" class="slds-truncate" style="padding-bottom: 3px;">管理编码</span>
                                    </div>
                                </span>
                            </th>
                            <!-- 第四列 预览链接 -->
                            <!-- <th class="slds-is-resizable" tabindex="-1" data-label="预览链接" scope="row" style="width: 249px;height: 35px;">
                                <span class="slds-grid slds-grid_align-spread" style="text-align: center;display:block;">
                                    <div class="slds-truncate">
                                        <span title="预览链接" class="slds-truncate" style="padding-bottom: 3px;">预览链接</span>
                                    </div>
                                </span>
                            </th> -->
                            <!-- 第五列 报关单下载链接 -->
                            <th class="slds-is-resizable" tabindex="-1" data-label="报关单" scope="row" style="width: 249px;">
                                <span class="slds-grid slds-grid_align-spread" style="width: 240px;text-align: center;display:block;">
                                    <div class="slds-truncate">
                                        <span title="报关单下载链接" class="slds-truncate" style="padding-bottom: 3px;">报关单下载链接</span>
                                    </div>
                                </span>
                            </th>
                            <!-- 第六列 商检证下载链接 -->
                            <th class="slds-is-resizable" tabindex="-1" data-label="商检证" scope="row" style="width: 249px;">
                                <span class="slds-grid slds-grid_align-spread" style="width: 240px;text-align: center;display:block;">
                                    <div class="slds-truncate">
                                        <span title="商检证下载链接" class="slds-truncate" style="padding-bottom: 3px;">商检证下载链接</span>
                                    </div>
                                </span>
                            </th>
                        </tr>
                    </thead>
                    <aura:if isTrue="{!v.currentData.length > 0}">
                        <tbody>
                            <aura:iteration items="{!v.currentData}" var="curr" >
                                <tr class="slds-hint-parent">
                                    <!-- 行项目 第一列  产品明细-->
                                    <!-- <th class="slds-is-resizable" tabindex="-1" data-label="DN单号" >
                                        <span class="slds-grid slds-grid_align-spread" style="width: 140px;height:18px;text-align: left;display:block;border: bottom 1px;">
                                            <lightning:formattedText value="{!curr.Name}" style="padding-bottom: 3px;"/>
                                        </span>
                                    </th> -->
                                    <th class="slds-is-resizable" tabindex="-1" data-label="产品明细" style="width: 146px;height:36px;position:static">
                                        <span class="slds-grid slds-grid_align-spread" style="text-align: left;display:block;">
                                            <div class="slds-truncate">
                                                <lightning:formattedText value="{!curr.ProductName}" style="padding-bottom: 3px;"/>
                                            </div>
                                        </span>
                                    </th>
                                    <!-- 行项目 第二列  机身编码-->
                                    <th class="slds-is-resizable" tabindex="-1" data-label="机身编码" style="width: 240px;height: 35px;">
                                        <span class="slds-grid slds-grid_align-spread" style="text-align: left;display:block;">
                                            <div class="slds-truncate">
                                                <lightning:formattedText value="{!curr.FrameNo}" style="padding-bottom: 3px;"/>
                                            </div>
                                        </span>
                                    </th>
                                    <!-- 行项目 第三列  管理编码-->
                                    <th class="slds-is-resizable" tabindex="-1" data-label="管理编码" style="width: 240px;height: 35px;">
                                        <span class="slds-grid slds-grid_align-spread" style="text-align: left;display:block;">
                                            <div class="slds-truncate">
                                                <lightning:formattedText value="{!curr.Name}" style="padding-bottom: 3px;"/>
                                            </div>
                                        </span>
                                    </th>
                                    <!-- 行项目 第四列  预览链接-->
                                    <!-- <aura:if isTrue="{!IF(curr.count ==null,false,true)}">
                                        <th class="slds-is-resizable" tabindex="-1" data-label="预览链接" style="width: 240px;height: 35px;" rowspan="{!curr.count}">
                                            <span class="slds-grid slds-grid_align-spread" style="text-align: center;display:block;">
                                                <div class="slds-truncate"> -->
                                                    <!-- <lightning:formattedText value="{!curr.Name}" style="padding-bottom: 3px;"/> -->
                                                    <!-- <a href="{!curr.code}">预览</a>
                                                </div>
                                            </span>
                                        </th>
                                    </aura:if> -->
                                    <!-- 行项目 第五列  报关单下载链接-->
                                    <aura:if isTrue="{!IF(curr.code =='国内采购',false,true)}">
                                        <aura:if isTrue="{!IF(curr.count ==null,false,true)}">
                                            <!-- <aura:if isTrue="{!IF(curr.code !='无' ,true,false)}">
                                                <th class="slds-is-resizable" tabindex="-1" data-label="报关单" style="width: 249px;" rowspan="{!curr.count}">
                                                    <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                        <div class="slds-truncate"> -->
                                                            <!-- <lightning:formattedText value="{!curr.code}" style="padding-bottom: 3px;"/> rowspan="{!curr.count}"-->
                                                            <!-- <a href="{!curr.codeyu}">预览</a>
                                                            &nbsp;&nbsp;&nbsp;
                                                            <a href="{!curr.code}">下载</a>
                                                        </div>
                                                    </span>
                                                </th>
                                            </aura:if>
                                            <aura:if isTrue="{!IF(curr.code =='无' ,true,false)}">
                                                <th class="slds-is-resizable" tabindex="-1" data-label="报关单" style="width: 249px;" rowspan="{!curr.count}">
                                                    <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                        <div class="slds-truncate"> -->
                                                            <!-- <a href="{!curr.code}">{!curr.code}</a> -->
                                                        <!-- </div>
                                                    </span>
                                                </th>
                                            </aura:if> -->
                                            <aura:if isTrue="{!IF(curr.code =='不出证' ,true,false)}">
                                                <th class="slds-is-resizable" tabindex="-1" data-label="报关单" style="width: 249px;" rowspan="{!curr.count}">
                                                    <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                        <div class="slds-truncate">
                                                            <lightning:formattedText value="{!curr.code}" style="padding-bottom: 3px;"/>
                                                        </div>
                                                    </span>
                                                </th>
                                            </aura:if>
                                            <aura:if isTrue="{!IF(curr.code !='不出证' ,true,false)}">
                                                <aura:if isTrue="{!IF(AND(curr.code =='',curr.codeyu ==''),true,false)}">
                                                    <th class="slds-is-resizable" tabindex="-1" data-label="报关单" style="width: 249px;" rowspan="{!curr.count}">
                                                        <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                            <div class="slds-truncate">
                                                                <lightning:formattedText value="{!curr.code}" style="padding-bottom: 3px;"/>
                                                            </div>
                                                        </span>
                                                    </th>
                                                </aura:if>
                                                <aura:if isTrue="{!IF(AND(curr.code =='',curr.codeyu !=''),true,false)}">
                                                    <th class="slds-is-resizable" tabindex="-1" data-label="报关单" style="width: 249px;" rowspan="{!curr.count}">
                                                        <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                            <div class="slds-truncate">
                                                                <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&amp;key=' + curr.awsKey + '&amp;name=' + curr.fileName}" target="_blank">预览</a>
                                                            </div>
                                                        </span>
                                                    </th>
                                                </aura:if>
                                                <aura:if isTrue="{!IF(AND(curr.code !='',curr.codeyu ==''),true,false)}">
                                                    <th class="slds-is-resizable" tabindex="-1" data-label="报关单" style="width: 249px;" rowspan="{!curr.count}">
                                                        <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                            <div class="slds-truncate">
                                                                <!-- <a href="/eSignSystem/apex/FilePreviewDownVF?type=download&amp;key={!curr.awsKey}&amp;name={!curr.fileName}" target="_blank">下载</a> -->
                                                                <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&amp;key=' + curr.awsKey + '&amp;name=' + curr.fileName}" target="_blank">下载</a>
                                                            </div>
                                                        </span>
                                                    </th>
                                                </aura:if>
                                                <aura:if isTrue="{!IF(AND(curr.code !='',curr.codeyu !=''),true,false)}">
                                                    <th class="slds-is-resizable" tabindex="-1" data-label="报关单" style="width: 249px;" rowspan="{!curr.count}">
                                                        <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                            <div class="slds-truncate">
                                                                <!-- <a href="/eSignSystem/apex/FilePreviewDownVF?type=preview&amp;key={!curr.awsKey}&amp;name={!curr.fileName}" target="_blank">预览</a>  |  <a href="/eSignSystem/apex/FilePreviewDownVF?type=download&amp;key={!curr.awsKey}&amp;name={!curr.fileName}" target="_blank">下载</a> -->
                                                                <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&amp;key=' + curr.awsKey + '&amp;name=' + curr.fileName}" target="_blank">预览</a>  |  <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&amp;key=' + curr.awsKey + '&amp;name=' + curr.fileName}" target="_blank">下载</a>
                                                            </div>
                                                        </span>
                                                    </th>
                                                </aura:if>
                                            </aura:if>
                                        </aura:if>
                                    </aura:if>
                                    <aura:if isTrue="{!IF(curr.code =='国内采购',true,false)}">
                                        <th class="slds-is-resizable" tabindex="-1" data-label="报关单" style="width: 249px;" rowspan="{!curr.count}">
                                            <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                <div class="slds-truncate">
                                                    国内采购
                                                </div>
                                            </span>
                                        </th>
                                    </aura:if>
                                    <!-- 行项目 第六列  商检证下载链接-->
                                    <aura:if isTrue="{!IF(curr.sj_code =='国内采购',false,true)}">
                                        <aura:if isTrue="{!IF(curr.count ==null,false,true)}">
                                            <!-- <aura:if isTrue="{!IF(AND(curr.sj_code !='不出证',curr.sj_code !='') ,true,false)}">
                                                <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                                    <span class="slds-grid slds-grid_align-spread" style="width: 240px;text-align: center;display:block;">
                                                        <div class="slds-truncate"> -->
                                                            <!-- <lightning:formattedText value="{!curr.code}" style="padding-bottom: 3px;"/> -->
                                                            <!-- <a href="{!curr.sj_codeyu}">预览</a>
                                                            &nbsp;&nbsp;&nbsp;
                                                            <a href="{!curr.sj_code}">下载</a>
                                                        </div>
                                                    </span>
                                                </th>
                                            </aura:if> -->
                                            <!-- <aura:if isTrue="{!IF(curr.sj_code =='不出证' ,true,false)}">
                                                <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                                    <span class="slds-grid slds-grid_align-spread" style="width: 240px;text-align: center;display:block;">
                                                        <div class="slds-truncate">
                                                            <lightning:formattedText value="{!curr.sj_code}" style="padding-bottom: 3px;"/> -->
                                                            <!-- <a href="{!curr.code}">下载</a> -->
                                                        <!-- </div>
                                                    </span>
                                                </th>
                                            </aura:if>
                                            <aura:if isTrue="{!IF(AND(curr.sj_code !='不出证',curr.sj_code =='') ,true,false)}">
                                                <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                                    <span class="slds-grid slds-grid_align-spread" style="width: 240px;text-align: center;display:block;">
                                                        <div class="slds-truncate">
                                                        </div>
                                                    </span>
                                                </th>
                                            </aura:if>-->
                                            <aura:if isTrue="{!IF(curr.sj_code =='不出证' ,true,false)}">
                                                <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                                    <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                        <div class="slds-truncate">
                                                            <lightning:formattedText value="{!curr.sj_code}" style="padding-bottom: 3px;"/>
                                                        </div>
                                                    </span>
                                                </th>
                                            </aura:if>
                                            <aura:if isTrue="{!IF(curr.sj_code !='不出证' ,true,false)}">
                                                <aura:if isTrue="{!IF(AND(curr.sj_code =='',curr.sj_codeyu ==''),true,false)}">
                                                    <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                                        <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                            <div class="slds-truncate">
                                                                <lightning:formattedText value="{!curr.sj_code}" style="padding-bottom: 3px;"/>
                                                            </div>
                                                        </span>
                                                    </th>
                                                </aura:if>
                                                <aura:if isTrue="{!IF(AND(curr.sj_code =='',curr.sj_codeyu !=''),true,false)}">
                                                    <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                                        <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                            <div class="slds-truncate">
                                                                <!-- <a href="/eSignSystem/apex/FilePreviewDownVF?type=preview&amp;key={!curr.sj_awsKey}&amp;name={!curr.sj_fileName}" target="_blank">预览</a> -->
                                                                <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&amp;key=' + curr.sj_awsKey + '&amp;name=' + curr.sj_fileName}" target="_blank">预览</a>
                                                            </div>
                                                        </span>
                                                    </th>
                                                </aura:if>
                                                <aura:if isTrue="{!IF(AND(curr.sj_code !='',curr.sj_codeyu ==''),true,false)}">
                                                    <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                                        <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                            <div class="slds-truncate">
                                                                <!-- <a href="/eSignSystem/apex/FilePreviewDownVF?type=download&amp;key={!curr.sj_awsKey}&amp;name={!curr.sj_fileName}" target="_blank">下载</a> -->
                                                                <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&amp;key=' + curr.sj_awsKey + '&amp;name=' + curr.sj_fileName}" target="_blank">下载</a>
                                                            </div>
                                                        </span>
                                                    </th>
                                                </aura:if>
                                                <aura:if isTrue="{!IF(AND(curr.sj_code !='',curr.sj_codeyu !=''),true,false)}">
                                                    <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                                        <span class="slds-grid slds-grid_align-spread" style="width:240px;text-align: center;display:block;">
                                                            <div class="slds-truncate">
                                                                <!-- <a href="/eSignSystem/apex/FilePreviewDownVF?type=preview&amp;key={!curr.sj_awsKey}&amp;name={!curr.sj_fileName}" target="_blank">预览</a>  |  <a href="/eSignSystem/apex/FilePreviewDownVF?type=download&amp;key={!curr.sj_awsKey}&amp;name={!curr.sj_fileName}" target="_blank">下载</a> -->
                                                                <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&amp;key=' + curr.sj_awsKey + '&amp;name=' + curr.sj_fileName}" target="_blank">预览</a>  |  <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&amp;key=' + curr.sj_awsKey + '&amp;name=' + curr.sj_fileName}" target="_blank">下载</a>
                                                            </div>
                                                        </span>
                                                    </th>
                                                </aura:if>
                                            </aura:if>
                                        </aura:if>
                                    </aura:if>
                                    <aura:if isTrue="{!IF(curr.sj_code =='国内采购',true,false)}">
                                        <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count}">
                                            <span class="slds-grid slds-grid_align-spread" style="width: 240px;text-align: center;display:block;">
                                                <div class="slds-truncate">
                                                    国内采购
                                                </div>
                                            </span>
                                        </th>
                                    </aura:if>
                                </tr>
                            </aura:iteration>
                        </tbody>
                    </aura:if>
                </table>
                <aura:if isTrue="{!empty(v.currentData)}">
                <div class="slds-align_absolute-center">
                    No records found
                </div>
            </aura:if>
            </div>
        </div>
    </div>
</aura:component>
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.cmp-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>55.0</apiVersion>
    <description>A Lightning Component Bundle</description>
</AuraDefinitionBundle>
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.css
New file
@@ -0,0 +1,2 @@
.THIS {
}
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.design
New file
@@ -0,0 +1,3 @@
<design:component >
</design:component>
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplay.svg
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="M120,108 C120,114.6 114.6,120 108,120 L12,120 C5.4,120 0,114.6 0,108 L0,12 C0,5.4 5.4,0 12,0 L108,0 C114.6,0 120,5.4 120,12 L120,108 L120,108 Z" id="Shape" fill="#2A739E" />
        <path d="M77.7383308,20 L61.1640113,20 L44.7300055,63.2000173 L56.0543288,63.2000173 L40,99.623291 L72.7458388,54.5871812 L60.907727,54.5871812 L77.7383308,20 Z" id="Path-1" fill="#FFFFFF" />
    </g>
</svg>
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplayController.js
New file
@@ -0,0 +1,9 @@
({
    myAction : function(component, event, helper) {
    },
    doInit : function(cmp, event, helper) {
        // 设置明细页表格的构造
        helper.getFrameNumManage(cmp);
    }
})
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplayHelper.js
New file
@@ -0,0 +1,33 @@
({
    // 获取数据
    getFrameNumManage : function(cmp) {
        debugger
        // this.showSpinner(cmp);
        var action = cmp.get("c.getFrameNumManage");
        var DNId = cmp.get('v.DNId').toString();
        action.setParams({
            'DNId' : DNId,
        });
        action.setCallback(this,function(response) {
            var state = response.getState();
            console.log(state);
            if (state === "SUCCESS") {
                var resultData = response.getReturnValue();
                cmp.set("v.currentData", resultData);
                this.hideSpinner(cmp);
            }else{
                cmp.set("v.errorMessage", '加载失败,请重新打开此页面!');
            }
        });
        $A.enqueueAction(action);
    },
    showSpinner: function(cmp) {
        debugger
        var spinner = cmp.find("mySpinner");
        $A.util.removeClass(spinner, "slds-hide");
    },
    hideSpinner: function(cmp) {
        var spinner = cmp.find("mySpinner");
        $A.util.addClass(spinner, "slds-hide");
    },
})
force-app/main/default/aura/AttachmentDisplay/AttachmentDisplayRenderer.js
New file
@@ -0,0 +1,5 @@
({
// Your renderer method overrides go here
})
force-app/main/default/classes/AttachmentDisplayController.cls
New file
@@ -0,0 +1,452 @@
public without sharing class AttachmentDisplayController {
    @AuraEnabled
    public static List<testInit> getFrameNumManage(String DNId){
        //zhj 判断是否是site站点和链接上面是否存在eSignSystem  2023-01-04 start
        String ourl =URL.getsalesforceBaseUrl().toExternalForm();
        String path =URL.getcurrentRequesturl().getPath();
        Boolean bool = false;
        if(ourl.contains('site') && path.contains('eSignSystem')){
            bool = true;
        }
        System.debug('bool = ' + bool);
        //zhj 判断是否是site站点和链接上面是否存在eSignSystem  2023-01-04 end
        System.debug('DNId'+DNId);
        List<testInit> newinitList = new List<testInit>();
        List<testInit> initList = new List<testInit>();
        List<FrameNumManage__c> FnmList =[SELECT Id, Name ,ManagementCode__c,InspectionCard__c
        , ApplyList__c ,InspectionCard_Select__c ,InspectionCard_Select__r.ViewLink__c
        ,InspectionCard_Select__r.DownloadLink__c, ApplyList_Select__c
        ,ApplyList_Select__r.DownloadLink__c,ApplyList_Select__r.ViewLink__c,  Num__c
        , SerialNumber__c,Material__c , MaterialDepict__c
        ,ApplyList_Select__r.AWS_File_Key__c,ApplyList_Select__r.FileName__c
        ,InspectionCard_Select__r.AWS_File_Key__c,InspectionCard_Select__r.FileName__c
        ,HomeBuy__c
         from FrameNumManage__c where signInForm__c =:DNId order by ApplyList__c desc,SerialNumber__c desc];
        set<String> FileStrSet = new set<String>();
        List<FileAddress__c> FileList = new List<FileAddress__c>();
        Map<String,String> FileStrMap = new Map<String,String>();
        // if (FnmList.size()>0) {
        //     for (FrameNumManage__c nObj : FnmList ) {
        //         FileStrSet.add(nObj.ApplyList__c);
        //     }
        //     FileList = [SELECT Id, Name, FileName__c,ViewLink__c  FROM FileAddress__c WHERE FileName__c IN: FileStrSet];
        //     if(FileList.size()>0){
        //         for (FileAddress__c file : FileList) {
        //             FileStrMap.put(file.FileName__c, file.ViewLink__c);
        //         }
        //     }
        // }
        List<FrameNumManage__c> FnmListhomebuy = new List<FrameNumManage__c>();
        List<FrameNumManage__c> notFnmListhomebuy = new List<FrameNumManage__c>();
        for(FrameNumManage__c fr : FnmList){
            if(fr.HomeBuy__c){
                FnmListhomebuy.add(fr);
            }else{
                notFnmListhomebuy.add(fr);
            }
        }
        Integer n = 0; // 初始化合并行数
        for (Integer i=0;i<notFnmListhomebuy.size() ;i++ ) {
            testInit init = new testInit();
            if (i==0) {
                init.Name = notFnmListhomebuy[i].ManagementCode__c;
                init.ProductName = notFnmListhomebuy[i].Material__c + '-' + notFnmListhomebuy[i].MaterialDepict__c;
                //2022-12-26 fy add 改造 start
                // init.code = notFnmListhomebuy[i].ApplyList__c;
                // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) {
                //     init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c;
                //     init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c;
                // }else{
                //     init.code = '无';
                // }
                if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) {
                    if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) {
                        init.code = '不出证';
                    }else{
                        // 报关单预览链接判断
                        if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) {
                            init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c;
                        }else{
                            init.codeyu = '';
                        }
                        // 报关单下载链接判断
                        if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) {
                            init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c;
                        }else{
                            init.code = '';
                        }
                        if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) {
                            init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c;
                        }else{
                            init.awsKey = '';
                        }
                        if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) {
                            init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c;
                        }else{
                            init.fileName = '';
                        }
                    }
                }else{
                    init.code = '';
                    init.codeyu = '';
                    init.awsKey = '';
                    init.fileName = '';
                }
                // //2022-12-05 fy add 报关单判断
                // //if (String.isNotBlank(FnmList[i].InspectionCard_Select__r.DownloadLink__c)) {
                // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') {
                //     init.sj_code = '不出证';
                // }else if(String.isBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)){
                //     init.sj_code = '';
                // }else{
                //     init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c;
                //     init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c;
                // } //2022-12-05 fy add 商检证判断
                if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) {
                    if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) {
                        init.sj_code = '不出证';
                    }else{
                        // 商检证预览链接判断
                        if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) {
                            init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c;
                        }else{
                            init.sj_codeyu = '';
                        }
                        // 商检证下载链接判断
                        if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) {
                            init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c;
                        }else{
                            init.sj_code = '';
                        }
                        //商检证awkey,filename判断 zhj 2022-12-19 start
                        if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) {
                            init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c;
                        }else{
                            init.sj_awsKey = '';
                        }
                        if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) {
                            init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c;
                        }else{
                            init.sj_fileName = '';
                        }
                        //商检证awkey,filename判断 zhj 2022-12-19 end
                    }
                }else{
                    init.sj_code = '';
                    init.sj_codeyu = '';
                    init.sj_awsKey = '';       // zhj 2022-12-19
                    init.sj_fileName = '';     // zhj 2022-12-19
                }
                //2022-12-26 fy add 改造 end
                // init.code = FileStrMap.get(FnmList[i].ApplyList__c);
                init.Num = notFnmListhomebuy[i].Num__c;
                init.Id = notFnmListhomebuy[i].Id;
                init.FrameNo = notFnmListhomebuy[i].SerialNumber__c;
                n = n+1;
                if (i != notFnmListhomebuy.size()-1) {
                    // 判断第一个与第二个是否一样,不一样赋值1
                    if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) {
                        init.count = n;
                    }
                }else if(notFnmListhomebuy.size() == 1){
                    init.count = 1;
                }
            System.debug('init1===='+init);
            }else {
                // 判断与前一个编码是一致
                if (notFnmListhomebuy[i].ApplyList__c == notFnmListhomebuy[i-1].ApplyList__c) {
                    init.Name = notFnmListhomebuy[i].ManagementCode__c;
                    init.ProductName = notFnmListhomebuy[i].Material__c + '-' + notFnmListhomebuy[i].MaterialDepict__c;
                    //2022-12-26 fy add 改造 start
                    // // init.code = notFnmListhomebuy[i].ApplyList__c;
                    // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) {
                    //     init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c;
                    //     init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c;
                    // }else{
                    //     init.code = '无';
                    // } //2022-12-05 fy add 报关单判断
                    if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) {
                        if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) {
                            init.code = '不出证';
                        }else{
                            // 报关单预览链接判断
                            if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) {
                                init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c;
                            }else{
                                init.codeyu = '';
                            }
                            // 报关单下载链接判断
                            if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) {
                                init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c;
                            }else{
                                init.code = '';
                            }
                            //报关单awkey,filename判断 zhj 2022-12-08 start
                            if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) {
                                init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c;
                            }else{
                                init.awsKey = '';
                            }
                            if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) {
                                init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c;
                            }else{
                                init.fileName = '';
                            }
                            //报关单awkey,filename判断 zhj 2022-12-08 end
                        }
                    }else{
                        init.code = '';
                        init.codeyu = '';
                        init.awsKey = '';       // zhj 2022-12-08
                        init.fileName = '';     // zhj 2022-12-08
                    }
                    //if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) {
                    // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') {
                    //     init.sj_code = '不出证';
                    // }else if(String.isBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)){
                    //     init.sj_code = '';
                    // }else{
                    //     init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c;
                    //     init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c;
                    // }
                    // //2022-12-05 fy add 商检证判断
                    if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) {
                        if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) {
                            init.sj_code = '不出证';
                        }else{
                            // 商检证预览链接判断
                            if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) {
                                init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c;
                            }else{
                                init.sj_codeyu = '';
                            }
                            // 商检证下载链接判断
                            if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) {
                                init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c;
                            }else{
                                init.sj_code = '';
                            }
                            //商检证awkey,filename判断 zhj 2022-12-19 start
                            if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) {
                                init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c;
                            }else{
                                init.sj_awsKey = '';
                            }
                            if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) {
                                init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c;
                            }else{
                                init.sj_fileName = '';
                            }
                            //商检证awkey,filename判断 zhj 2022-12-19 end
                        }
                    }else{
                        init.sj_code = '';
                        init.sj_codeyu = '';
                        init.sj_awsKey = '';       // zhj 2022-12-19
                        init.sj_fileName = '';     // zhj 2022-12-19
                    }
                    //2022-12-26 fy add 改造 end
                    // init.code = FileStrMap.get(notFnmListhomebuy[i].ApplyList__c);
                    init.Num = notFnmListhomebuy[i].Num__c;
                    init.Id = notFnmListhomebuy[i].Id;
                    init.FrameNo = notFnmListhomebuy[i].SerialNumber__c;
                    n = n+1;
                    // 判断是不是最后一个
                    if (i != notFnmListhomebuy.size()-1) {
                        // 不是最后一个,判断与下一个编码一致不一致,不一致直接赋值
                        if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) {
                            init.count = n;
                        }
                    }
                    // 最后一个直接赋值
                    if (i == notFnmListhomebuy.size()-1) {
                        init.count = n;
                    }
                System.debug('init2===='+init);
                }else {
                    // 下一组开始
                    n = 0;
                    init.Name = notFnmListhomebuy[i].ManagementCode__c;
                    init.ProductName = notFnmListhomebuy[i].Material__c + '-' + notFnmListhomebuy[i].MaterialDepict__c;
                    // init.code = notFnmListhomebuy[i].ApplyList__c;
                    //2022-12-26 fy add 改造 start
                    // if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) {
                    //     init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c;
                    //     init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c;
                    // }else{
                    //     init.code = '无';
                    // } //2022-12-05 fy add 报关单判断
                    if (String.isNotBlank(notFnmListhomebuy[i].ApplyList__c)) {
                        if (notFnmListhomebuy[i].ApplyList__c.equals('不出证')) {
                            init.code = '不出证';
                        }else{
                            // 报关单预览链接判断
                            if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) {
                                init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c;
                            }else{
                                init.codeyu = '';
                            }
                            // 报关单下载链接判断
                            if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c)) {
                                init.code = notFnmListhomebuy[i].ApplyList_Select__r.DownloadLink__c;
                            }else{
                                init.code = '';
                            }
                            //报关单awkey,filename判断 zhj 2022-12-08 start
                            if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c)) {
                                init.awsKey = notFnmListhomebuy[i].ApplyList_Select__r.AWS_File_Key__c;
                            }else{
                                init.awsKey = '';
                            }
                            if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.FileName__c)) {
                                init.fileName = notFnmListhomebuy[i].ApplyList_Select__r.FileName__c;
                            }else{
                                init.fileName = '';
                            }
                            //报关单awkey,filename判断 zhj 2022-12-08 end
                        }
                    }else{
                        init.code = '';
                        init.codeyu = '';
                        init.awsKey = '';       // zhj 2022-12-08
                        init.fileName = '';     // zhj 2022-12-08
                    }
                    //if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) {
                    // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') {
                    //     init.sj_code = '不出证';
                    // }else if(String.isBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)){
                    //     init.sj_code = '';
                    // }else{
                    //     init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c;
                    //     init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c;
                    // }
                    //2022-12-05 fy add 商检证判断
                    if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard__c)) {
                        if (notFnmListhomebuy[i].InspectionCard__c.equals('不出证')) {
                            init.sj_code = '不出证';
                        }else{
                            // 商检证预览链接判断
                            if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c)) {
                                init.sj_codeyu = notFnmListhomebuy[i].InspectionCard_Select__r.ViewLink__c;
                            }else{
                                init.sj_codeyu = '';
                            }
                            // 商检证下载链接判断
                            if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) {
                                init.sj_code = notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c;
                            }else{
                                init.sj_code = '';
                            }
                            //商检证awkey,filename判断 zhj 2022-12-19 start
                            if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c)) {
                                init.sj_awsKey = notFnmListhomebuy[i].InspectionCard_Select__r.AWS_File_Key__c;
                            }else{
                                init.sj_awsKey = '';
                            }
                            if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c)) {
                                init.sj_fileName = notFnmListhomebuy[i].InspectionCard_Select__r.FileName__c;
                            }else{
                                init.sj_fileName = '';
                            }
                            //商检证awkey,filename判断 zhj 2022-12-19 end
                        }
                    }else{
                        init.sj_code = '';
                        init.sj_codeyu = '';
                        init.sj_awsKey = '';       // zhj 2022-12-19
                        init.sj_fileName = '';     // zhj 2022-12-19
                    }
                    //2022-12-26 fy add 改造 end
                    // init.code = FileStrMap.get(notFnmListhomebuy[i].ApplyList__c);
                    init.Num = notFnmListhomebuy[i].Num__c;
                    init.Id = notFnmListhomebuy[i].Id;
                    init.FrameNo = notFnmListhomebuy[i].SerialNumber__c;
                    n = n+1;
                    if((i<notFnmListhomebuy.size()-1 && notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c)||(i == notFnmListhomebuy.size()-1)){
                      init.count =n;
                    }
                System.debug('init3===='+init);
                }
            }
            //zhj 如果是eSignSystem需要加上这个前缀链接  2023-01-04 start
            if(bool){
                init.iseSignSystem = '/eSignSystem';
            }else {
                init.iseSignSystem = '';
            }
            //zhj 如果是eSignSystem需要加上这个前缀链接  2023-01-04 end
            initList.add(init);
        }
        List<testInit> newinitListhomebuy = new List<testInit>();
        for(FrameNumManage__c fr : FnmListhomebuy){
            testInit init = new testInit();
            init.Name=fr.ManagementCode__c;
            init.ProductName=fr.Material__c + '-' + fr.MaterialDepict__c;
            init.FrameNo=fr.SerialNumber__c;
            init.code='国内采购';
            init.sj_code='国内采购';
            init.Num=fr.Num__c;
            init.Id=fr.Id;
            init.count=1;
            newinitListhomebuy.add(init);
        }
        // 倒序显示
        for (Integer i = initList.size()-1; i>=0 ; i--) {
            testInit init = new testInit();
            init = initList[i];
            newinitList.add(init);
        }
         // newinitList.addAll(newinitListhomebuy);
         newinitListhomebuy.addAll(newinitList);
         newinitList=newinitListhomebuy;
        System.debug('newinitList'+newinitList);
        System.debug('FnmList'+FnmList);
        System.debug('newinitListhomebuy'+newinitListhomebuy);
        return newinitList;
    }
    // 定义内部类,自定义参数
    class testInit{
        @AuraEnabled
        public Boolean check;
        @AuraEnabled
        public String Name;
        @AuraEnabled
        public String ProductName;
        @AuraEnabled
        public String FrameNo;
        @AuraEnabled
        public String code;
        @AuraEnabled
        public String codeyu;
        @AuraEnabled
        public String sj_code;
        @AuraEnabled
        public String sj_codeyu;
        @AuraEnabled
        public Decimal Num;
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public Integer count;
        @AuraEnabled
        public String awsKey;
        @AuraEnabled
        public String fileName;
        @AuraEnabled
        public String sj_awsKey;
        @AuraEnabled
        public String sj_fileName;
        @AuraEnabled
        public String iseSignSystem; //zhj 站点链接 2023-01-04
    }
}