| | |
| | | <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> |
| | | |
| | | <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&key=' + curr.awsKey + '&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&key={!curr.awsKey}&name={!curr.fileName}" target="_blank">下载</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&key=' + curr.awsKey + '&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&key={!curr.awsKey}&name={!curr.fileName}" target="_blank">预览</a> | <a href="/eSignSystem/apex/FilePreviewDownVF?type=download&key={!curr.awsKey}&name={!curr.fileName}" target="_blank">下载</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&key=' + curr.awsKey + '&name=' + curr.fileName}" target="_blank">预览</a> | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&key=' + curr.awsKey + '&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> |
| | | |
| | | <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&key={!curr.sj_awsKey}&name={!curr.sj_fileName}" target="_blank">预览</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&key=' + curr.sj_awsKey + '&name=' + curr.sj_fileName}" target="_blank">预览</a> |
| | | <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:1000px;margin-right: 4px; "> |
| | | <!-- 显示在明细页的当前明细的表格 --> |
| | | <div id="inTables"> |
| | | <!-- <lightning:card> --> |
| | | <aura:set attribute="title"> |
| | | 进口单证明细 |
| | | </aura:set> |
| | | <label style="float: left;font-size:20px">进口单证明细</label> |
| | | <lightning:button variant="neutral" label="返回" title="Cancel" onclick="{! c.rebackDNListPage }" /> |
| | | <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: 249px;" rowspan="{!curr.count}"> |
| | | </th> |
| | | </aura:if> --> |
| | | <aura:if isTrue="{!IF(curr.count ==null,false,true)}"> |
| | | <aura:if isTrue="{!IF(AND(curr.code !='',curr.codeyu !='',curr.codeyu.length > 25,curr.code.length > 25),false,true)}"> |
| | | <!-- 只有预览 --> |
| | | <aura:if isTrue="{!IF(AND(curr.codeyu !='',curr.codeyu.length > 25,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.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&key=' + curr.awsKey + '&name=' + curr.fileName}" target="_blank">预览</a> |
| | | </div> |
| | | </span> |
| | | </th> |
| | | </aura:if> |
| | | <!-- 只有下载 --> |
| | | <aura:if isTrue="{!IF(AND(curr.code !='',curr.code.length > 25,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=download&key=' + curr.awsKey + '&name=' + curr.fileName}" target="_blank">下载</a> |
| | | </div> |
| | | </span> |
| | | </th> |
| | | </aura:if> |
| | | <!-- 其他情况显示自己 --> |
| | | <aura:if isTrue="{!IF(AND(AND(curr.codeyu !='',curr.codeyu.length > 25,curr.code =='') == false , AND(curr.code !='',curr.code.length > 25,curr.codeyu =='')== false) ,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> |
| | | <!-- 预览和下载都有 --> |
| | | <aura:if isTrue="{!IF(AND(curr.code !='',curr.codeyu !='',curr.codeyu.length > 25,curr.code.length > 25),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&key={!curr.awsKey}&name={!curr.fileName}" target="_blank">预览</a> | <a href="/eSignSystem/apex/FilePreviewDownVF?type=download&key={!curr.awsKey}&name={!curr.fileName}" target="_blank">下载</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&key=' + curr.awsKey + '&name=' + curr.fileName}" target="_blank">预览</a> | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&key=' + curr.awsKey + '&name=' + curr.fileName}" target="_blank">下载</a> |
| | | </div> |
| | | </span> |
| | | </th> |
| | | </aura:if> |
| | | </aura:if> |
| | | <!-- 行项目 第六列 商检证下载链接--> |
| | | <aura:if isTrue="{!IF(curr.count_sj ==null,false,true)}"> |
| | | <aura:if isTrue="{!IF(AND(curr.sj_code !='',curr.sj_codeyu !='',curr.sj_code.length > 25,curr.sj_codeyu.length > 25),false,true)}"> |
| | | <!-- 只有预览 --> |
| | | <aura:if isTrue="{!IF(AND(curr.sj_codeyu !='',curr.sj_codeyu.length > 25,curr.sj_code ==''),true,false)}"> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count_sj}"> |
| | | <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&key={!curr.sj_awsKey}&name={!curr.sj_fileName}" target="_blank">预览</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&key=' + curr.sj_awsKey + '&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&key={!curr.sj_awsKey}&name={!curr.sj_fileName}" target="_blank">下载</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&key=' + curr.sj_awsKey + '&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&key={!curr.sj_awsKey}&name={!curr.sj_fileName}" target="_blank">预览</a> | <a href="/eSignSystem/apex/FilePreviewDownVF?type=download&key={!curr.sj_awsKey}&name={!curr.sj_fileName}" target="_blank">下载</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&key=' + curr.sj_awsKey + '&name=' + curr.sj_fileName}" target="_blank">预览</a> | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&key=' + curr.sj_awsKey + '&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> |
| | | </div> |
| | | </span> |
| | | </th> |
| | | </aura:if> |
| | | <!-- 只有下载 --> |
| | | <aura:if isTrue="{!IF(AND(curr.sj_code !='',curr.sj_code.length > 25,curr.sj_codeyu ==''),true,false)}"> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count_sj}"> |
| | | <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&key={!curr.sj_awsKey}&name={!curr.sj_fileName}" target="_blank">下载</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&key=' + curr.sj_awsKey + '&name=' + curr.sj_fileName}" target="_blank">下载</a> |
| | | </div> |
| | | </span> |
| | | </th> |
| | | </aura:if> |
| | | <!-- 其他情况显示自己 --> |
| | | <aura:if isTrue="{!IF(AND(AND(curr.sj_codeyu !='',curr.sj_codeyu.length > 25,curr.sj_code =='')== false,AND(curr.sj_code !='',curr.sj_code.length > 25,curr.sj_codeyu =='') == false),true,false)}"> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count_sj}"> |
| | | <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> |
| | | <!-- 预览和下载都有 --> |
| | | <aura:if isTrue="{!IF(AND(curr.sj_code !='',curr.sj_codeyu !='',curr.sj_code.length > 25,curr.sj_codeyu.length > 25),true,false)}"> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" rowspan="{!curr.count_sj}"> |
| | | <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&key={!curr.sj_awsKey}&name={!curr.sj_fileName}" target="_blank">预览</a> | <a href="/eSignSystem/apex/FilePreviewDownVF?type=download&key={!curr.sj_awsKey}&name={!curr.sj_fileName}" target="_blank">下载</a> --> |
| | | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=preview&key=' + curr.sj_awsKey + '&name=' + curr.sj_fileName}" target="_blank">预览</a> | <a href="{!curr.iseSignSystem + '/apex/FilePreviewDownVF?type=download&key=' + curr.sj_awsKey + '&name=' + curr.sj_fileName}" target="_blank">下载</a> |
| | | </div> |
| | | </span> |
| | | </th> |
| | | </aura:if> |
| | | </aura:if> |
| | | <!-- </aura:if> --> |
| | | <!-- 2023 0208 fy add 报关单商检证新需求,重新判断 start --> |
| | | <!-- </aura:if> |
| | | <aura:if isTrue="{!IF(curr.sj_code =='国内采购',true,false)}"> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="商检证" style="width: 249px;" > |
| | | <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> --> |
| | | <!-- 2023 0208 fy add 报关单商检证新需求,重新判断 end --> |
| | | </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> |
| | |
| | | }, |
| | | doInit : function(cmp, event, helper) { |
| | | // 设置明细页表格的构造 |
| | | console.log('hello zhj'); |
| | | helper.getFrameNumManage(cmp); |
| | | } |
| | | }, |
| | | //20230302 进口单证改造 fy start |
| | | rebackDNListPage: function(cmp, event, helper) { |
| | | helper.rebackDNListPage(cmp); |
| | | }, |
| | | //20230302 进口单证改造 fy end |
| | | }) |
| | |
| | | /* |
| | | * @Author: Thhto 997058689@qq.com |
| | | * @Date: 2022-11-04 14:53:06 |
| | | * @LastEditors: Thhto 997058689@qq.com |
| | | * @LastEditTime: 2023-03-02 17:50:25 |
| | | * @FilePath: \ceshihuanj\force-app\main\default\aura\AttachmentDisplay\AttachmentDisplayHelper.js |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | */ |
| | | ({ |
| | | // 获取数据 |
| | | getFrameNumManage : function(cmp) { |
| | | debugger |
| | | // this.showSpinner(cmp); |
| | | var action = cmp.get("c.getFrameNumManage"); |
| | | var DNId = cmp.get('v.DNId').toString(); |
| | | // var DNId = cmp.get('v.DNId').toString(); |
| | | var DNId = this.getQueryVariable('DNId'); |
| | | action.setParams({ |
| | | 'DNId' : DNId, |
| | | }); |
| | |
| | | var spinner = cmp.find("mySpinner"); |
| | | $A.util.addClass(spinner, "slds-hide"); |
| | | }, |
| | | getQueryVariable: function(variable) { //id字符串 |
| | | var query = window.location.search.substring(1); |
| | | var vars = query.split("&"); |
| | | for (var i = 0; i < vars.length; i++) { |
| | | var pair = vars[i].split("="); |
| | | if (pair[0] == variable) { |
| | | return pair[1]; |
| | | } |
| | | } |
| | | return (false); |
| | | }, |
| | | //20230302 进口单证改造 fy start |
| | | rebackDNListPage: function(variable) { //id字符串 |
| | | debugger |
| | | var AgencyIDM = this.getQueryVariable('AgencyIDM'); |
| | | window.open('/eSignSystem/s/EsignDataEntry?AgencyID='+AgencyIDM+'&pinit=true', '_self'); |
| | | }, |
| | | //20230302 进口单证改造 fy end |
| | | }) |
| | |
| | | <!-- |
| | | * @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" |
| | | implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes" |
| | | access="global"> |
| | |
| | | </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" /> |
| | | <!-- <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"> |
| | |
| | | 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> |
| | | <!-- DB202301262139 SFDC经销商人员导入功能改进 start --> |
| | | <!-- <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2> --> |
| | | <pre class="slds-text-heading_small ">{!v.errorMessage}</pre> |
| | | <!-- DB202301262139 SFDC经销商人员导入功能改进 end --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01"> |
| | | <ui:inputText aura:id="articleURL" /> |
| | | <!-- <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"> |
| | |
| | | <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 aura:id="save_con" label="保存" variant="brand" onclick="{!c.processFileContent}" disabled="false" /> |
| | | <lightning:button label="取消" variant="brand" onclick="{!c.cancel}" /> |
| | | </div> |
| | | |
| | |
| | | ({ |
| | | readFile: function (component, helper, file) { |
| | | debugger |
| | | if (!file) return; |
| | | if (!file.name.match(/\.(csv||CSV)$/)) { |
| | | return alert('only support csv files'); |
| | |
| | | reader.readAsDataURL(file); |
| | | }, |
| | | saveRecords: function (component, event, helper) { |
| | | debugger |
| | | component.set('v.login', true); |
| | | var action = component.get("c.processData"); |
| | | var fieldsList = ['Name', 'Phone', 'AccountNumber']; //Please write your code dynamic fields |
| | |
| | | if (state === "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | var res1 = ''; |
| | | debugger; |
| | | if (res != 'success') { |
| | | var ress = res.split('='); |
| | | console.log(ress); |
| | |
| | | component.set('v.errorMessage', res1 + "请修改后重新上传"); |
| | | this.showErrorToast(component); |
| | | component.set('v.login', false); |
| | | component.find('save_con').set('v.disabled', true); |
| | | } else { |
| | | // this.success('导入成功'); |
| | | component.set('v.successMessage', '导入成功'); |
| | | this.showSuccessToast01(component); |
| | | component.set("v.showMain", true); |
| | | component.set('v.login', false); |
| | | component.find('save_con').set('v.disabled', false); |
| | | } |
| | | } |
| | | else if (state === "INCOMPLETE") { |
| | |
| | | window.setTimeout($A.getCallback(function () { |
| | | $A.util.addClass(component.find('errorDiv'), 'slds-hide'); |
| | | }), |
| | | 4000 |
| | | 7000 |
| | | ); |
| | | }, |
| | | success : function(message) { |
| | |
| | | <!-- 校验code --> |
| | | <aura:attribute name="code" type="string" default="" /> |
| | | <aura:attribute name="decodeCode" type="string" default="" /> |
| | | <!-- 20230302 进口单证改造 fy start --> |
| | | <aura:attribute name="AgencyIDM" type="string" default="" /> |
| | | <!-- 20230302 进口单证改造 fy end --> |
| | | |
| | | |
| | | <aura:attribute name="isLastPage" type="Boolean" default="false" description="是否最后一页,如果是最后一页,那么表格分页的下一页不可用" /> |
| | |
| | | <!-- 行项目 第四列 进口单证明细 fy--> |
| | | <!-- 进口单证 fy start --> |
| | | <th class="slds-is-resizable" tabindex="-1" data-label="进口单证明细" scope="row"> |
| | | |
| | | <span class="slds-grid slds-grid_align-spread" style="text-align: center;display:block;"> |
| | | <div class="slds-truncate"> |
| | | <!-- <lightning:formattedText value="{!curr.AttachmentName}" /> --> |
| | | <!-- <a href="https://sfpi-mebg-test.olympuschina.com:8081/stg/api/file/preview?key=20220419/8cf583ab71c94eee96da7bbfcc1b376b.html">附件名1</a> --> |
| | | <button tabindex="-1" class="slds-button ReturnButton" style="width: 40px;" name="{!curr.Id}" onclick="{!c.showAttachmentDisplay}">查看</button> |
| | | <!-- <a onclick="{!c.showAttachmentDisplay}">查看</a> --> |
| | | <!-- <a href="{!'/eSignSystem/s/AttachmentDisplay?DNId='+ curr.Id}" target="_blank">查看</a> --> |
| | | <!-- <a href="https://ocsm stagefull.sandbox.file.force.com/servlet/servlet.FileDownload?file=00P1000001QkhvQ">{!curr.AttachmentName}</a> --> |
| | | </div> |
| | | </span> |
| | |
| | | }, |
| | | // 进口单证 fy start |
| | | showAttachmentDisplay: function(cmp, event, helper) { |
| | | helper.showAttachmentDisplay(cmp, event); |
| | | // helper.showAttachmentDisplay(cmp, event); |
| | | helper.showAttachmentDisplay2(cmp, event); |
| | | }, |
| | | rebackDNListPage: function(cmp, event, helper) { |
| | | helper.rebackDNListPage(cmp, event); |
| | | } |
| | | }, |
| | | // 进口单证 fy end |
| | | }) |
| | |
| | | ({ |
| | | init: function(cmp, event) { |
| | | |
| | | debugger |
| | | // 创建Base64对象 |
| | | var Base64 = { |
| | | _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", |
| | |
| | | }; |
| | | |
| | | //判断url是否有参数 |
| | | debugger |
| | | var flag = this.getURLISTrueParameter(); |
| | | //参数对象map |
| | | var paramValue = this.getURLParameterValue(); |
| | | //20230302 进口单证改造 fy start |
| | | // var paramValue = this.getURLParameterValue(); |
| | | var paramValue = this.getURLParameterValue(cmp); |
| | | //20230302 进口单证改造 fy end |
| | | //参数对象map的长度 |
| | | var length = Object.keys(paramValue).length; |
| | | |
| | |
| | | |
| | | //解码后的管理编码 |
| | | cmp.set("v.decodeCode", code.replace(reg, "$2")); |
| | | //20230302 进口单证改造 fy start |
| | | //隐藏检索页 |
| | | cmp.set("v.DNNameInput", true); |
| | | // cmp.set("v.DNNameInput", true); |
| | | //20230302 进口单证改造 fy start |
| | | //显示首页 |
| | | cmp.set('v.buttonGroup', false); |
| | | |
| | | //20230302 进口单证改造 fy start |
| | | if(paramValue.pinit=='true'){ |
| | | cmp.set("v.DNNameInput", false); |
| | | cmp.set("v.code", code.replace(reg, "$2")); |
| | | cmp.set('v.allWidth', document.documentElement.clientWidth - 40); |
| | | cmp.set('v.floatWidth', document.documentElement.clientWidth * 0.85); |
| | | cmp.set('v.floatWidth1', document.documentElement.clientWidth); |
| | | console.log('floatWidth:' + document.documentElement.clientWidth * 0.85); |
| | | this.getAccountHandler(cmp); |
| | | }else{ |
| | | cmp.set("v.DNNameInput", true); |
| | | } |
| | | //20230302 进口单证改造 fy end |
| | | |
| | | } |
| | | //判断DNName是否为空 不为空则隐藏检索页 |
| | |
| | | // add slds-hide class from mySpinner |
| | | var spinner = cmp.find("mySpinner"); |
| | | $A.util.addClass(spinner, "slds-hide"); |
| | | }, |
| | | getURLParameterValue: function() { |
| | | }, //20230302 进口单证改造 fy start |
| | | getURLParameterValue: function(cmp) { |
| | | // getURLParameterValue: function() { |
| | | //20230302 进口单证改造 fy end |
| | | |
| | | var querystring = location.search.substr(1); |
| | | var querystring = window.location.search.substr(1); |
| | | var paramValue = {}; |
| | | querystring.split("&").forEach(function(part) { |
| | | var param = part.split("="); |
| | | paramValue[param[0]] = decodeURIComponent(param[1]); |
| | | //20230302 进口单证改造 fy start |
| | | if(param[0]=='AgencyID'){ |
| | | cmp.set("v.AgencyIDM", param[1]); |
| | | } |
| | | //20230302 进口单证改造 fy end |
| | | }); |
| | | |
| | | //console.log('paramValue-' + paramValue); |
| | |
| | | }, |
| | | getURLISTrueParameter: function() { |
| | | |
| | | var url = location.search; |
| | | var url = window.location.search; |
| | | var flag; |
| | | if (url.indexOf("?") != -1) { |
| | | flag = true; |
| | |
| | | debugger |
| | | cmp.set('v.AttachmentDisplayflag', false); |
| | | cmp.set('v.DNListPage', true); |
| | | } |
| | | }, |
| | | showAttachmentDisplay2: function(cmp, event) { |
| | | debugger |
| | | var DNId = event.target.name; |
| | | //20230302 进口单证改造 fy start |
| | | var AgencyIDM = cmp.get('v.AgencyIDM'); |
| | | window.open('/eSignSystem/s/AttachmentDisplay?DNId=' + DNId+'&AgencyIDM='+AgencyIDM, '_blank'); |
| | | //20230302 进口单证改造 fy end |
| | | }, |
| | | // 进口单证 fy 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 |
| | | 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]; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | ,ApplyList_NoHave__c |
| | | ,InspectionCard_NoHave__c |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | from FrameNumManage__c where signInForm__c =:DNId |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // order by ApplyList__c desc,InspectionCard__c desc,SerialNumber__c desc]; |
| | | order by ApplyList_NoHave__c desc,InspectionCard_NoHave__c desc ,SerialNumber__c desc]; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | set<String> FileStrSet = new set<String>(); |
| | | List<FileAddress__c> FileList = new List<FileAddress__c>(); |
| | | Map<String,String> FileStrMap = new Map<String,String>(); |
| | |
| | | // } |
| | | 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); |
| | | } |
| | | } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // for(FrameNumManage__c fr : FnmList){ |
| | | // if(fr.HomeBuy__c){ |
| | | // FnmListhomebuy.add(fr); |
| | | // }else{ |
| | | // notFnmListhomebuy.add(fr); |
| | | // } |
| | | // } |
| | | notFnmListhomebuy = FnmList; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | Integer n = 0; // 初始化合并行数 |
| | | Integer n_sj = 0; // 初始化合并行数(商检证) 2023-01-10 fy add |
| | | for (Integer i=0;i<notFnmListhomebuy.size() ;i++ ) { |
| | | testInit init = new testInit(); |
| | | if (i==0) { |
| | |
| | | // }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 = ''; |
| | | } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | 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 { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_NoHave__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_NoHave__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | init.codeyu = ''; |
| | | init.awsKey = ''; // zhj 2022-12-08 |
| | | init.fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | // 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 = ''; |
| | | } |
| | | // 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 = ''; |
| | | // } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | // //2022-12-05 fy add 报关单判断 |
| | | // //if (String.isNotBlank(FnmList[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') { |
| | |
| | | // 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 |
| | | |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | 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-08 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-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_NoHave__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_NoHave__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-08 |
| | | init.sj_fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | // 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 |
| | | //2023 0208 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; |
| | | n_sj = n_sj+1; // 2023-01-10 fy add |
| | | if (i != notFnmListhomebuy.size()-1) { |
| | | // 判断第一个与第二个是否一样,不一样赋值1 |
| | | if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) { |
| | | if (notFnmListhomebuy[i].ApplyList_NoHave__c != notFnmListhomebuy[i+1].ApplyList_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count = n; |
| | | } |
| | | // 2023-01-10 fy add start |
| | | // 判断第一个与下一个是否一样,不一样赋值1——商检证 |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].InspectionCard__c != notFnmListhomebuy[i+1].InspectionCard__c) { |
| | | if (notFnmListhomebuy[i].InspectionCard_NoHave__c != notFnmListhomebuy[i+1].InspectionCard_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count_sj = n_sj; |
| | | } |
| | | // 2023-01-10 fy add end |
| | | }else if(notFnmListhomebuy.size() == 1){ |
| | | init.count = 1; |
| | | init.count_sj = 1; // 2023-01-10 fy add 如果只有一条 赋值合并行数 |
| | | } |
| | | System.debug('init1===='+init); |
| | | }else { |
| | | // 判断与前一个编码是一致 |
| | | if (notFnmListhomebuy[i].ApplyList__c == notFnmListhomebuy[i-1].ApplyList__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].ApplyList__c == notFnmListhomebuy[i-1].ApplyList__c) { |
| | | if (notFnmListhomebuy[i].ApplyList_NoHave__c == notFnmListhomebuy[i-1].ApplyList_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.Name = notFnmListhomebuy[i].ManagementCode__c; |
| | | init.ProductName = notFnmListhomebuy[i].Material__c + '-' + notFnmListhomebuy[i].MaterialDepict__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 |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c)) { |
| | | init.codeyu = notFnmListhomebuy[i].ApplyList_Select__r.ViewLink__c; |
| | | }else{ |
| | | init.codeyu = ''; |
| | | } |
| | | }else{ |
| | | init.code = ''; |
| | | 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 { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_NoHave__c)) { |
| | | init.code = notFnmListhomebuy[i].ApplyList_NoHave__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | init.codeyu = ''; |
| | | init.awsKey = ''; // zhj 2022-12-08 |
| | | init.fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | } |
| | | |
| | | // 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 |
| | | // } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | //if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') { |
| | | // init.sj_code = '不出证'; |
| | |
| | | // } |
| | | // //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 |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | 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-08 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-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_NoHave__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_NoHave__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-08 |
| | | init.sj_fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | |
| | | // 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 |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | // init.code = FileStrMap.get(notFnmListhomebuy[i].ApplyList__c); |
| | | init.Num = notFnmListhomebuy[i].Num__c; |
| | | init.Id = notFnmListhomebuy[i].Id; |
| | |
| | | // 判断是不是最后一个 |
| | | if (i != notFnmListhomebuy.size()-1) { |
| | | // 不是最后一个,判断与下一个编码一致不一致,不一致直接赋值 |
| | | if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c) { |
| | | if (notFnmListhomebuy[i].ApplyList_NoHave__c != notFnmListhomebuy[i+1].ApplyList_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count = n; |
| | | } |
| | | } |
| | |
| | | // }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 = ''; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | 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 { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].ApplyList_NoHave__c)){ |
| | | init.code = notFnmListhomebuy[i].ApplyList_NoHave__c; |
| | | }else{ |
| | | init.code = ''; |
| | | } |
| | | init.codeyu = ''; |
| | | init.awsKey = ''; // zhj 2022-12-08 |
| | | init.fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | } |
| | | |
| | | // 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 |
| | | // } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | //if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__r.DownloadLink__c)) { |
| | | // if (notFnmListhomebuy[i].InspectionCard__c =='不出证') { |
| | | // init.sj_code = '不出证'; |
| | |
| | | // 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 |
| | | |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_Select__c)) { |
| | | // 报关单预览链接判断 |
| | | 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-08 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-08 end |
| | | }else { |
| | | if (String.isNotBlank(notFnmListhomebuy[i].InspectionCard_NoHave__c)) { |
| | | init.sj_code = notFnmListhomebuy[i].InspectionCard_NoHave__c; |
| | | }else{ |
| | | init.sj_code = ''; |
| | | } |
| | | init.sj_codeyu = ''; |
| | | init.sj_awsKey = ''; // zhj 2022-12-08 |
| | | init.sj_fileName = ''; // zhj 2022-12-08 |
| | | } |
| | | |
| | | // 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 |
| | | //2023 0208 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)){ |
| | | |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if((i<notFnmListhomebuy.size()-1 && notFnmListhomebuy[i].ApplyList__c != notFnmListhomebuy[i+1].ApplyList__c)||(i == notFnmListhomebuy.size()-1)){ |
| | | if((i<notFnmListhomebuy.size()-1 && notFnmListhomebuy[i].ApplyList_NoHave__c != notFnmListhomebuy[i+1].ApplyList_NoHave__c)||(i == notFnmListhomebuy.size()-1)){ |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | |
| | | init.count =n; |
| | | } |
| | | System.debug('init3===='+init); |
| | | } |
| | | // 2023-01-10 fy add start 商检证排序合并 |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].InspectionCard__c == notFnmListhomebuy[i-1].InspectionCard__c) { |
| | | if (notFnmListhomebuy[i].InspectionCard_NoHave__c == notFnmListhomebuy[i-1].InspectionCard_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | n_sj = n_sj+1; |
| | | if (i != notFnmListhomebuy.size()-1) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].InspectionCard__c != notFnmListhomebuy[i+1].InspectionCard__c) { |
| | | if (notFnmListhomebuy[i].InspectionCard_NoHave__c != notFnmListhomebuy[i+1].InspectionCard_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count_sj = n_sj; |
| | | } |
| | | }else{ |
| | | init.count_sj = n_sj; |
| | | } |
| | | |
| | | }else{ |
| | | n_sj = 0; |
| | | n_sj = n_sj+1; |
| | | if (i == notFnmListhomebuy.size()-1) { |
| | | init.count_sj = n_sj; |
| | | }else{ |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // if (notFnmListhomebuy[i].InspectionCard__c != notFnmListhomebuy[i+1].InspectionCard__c) { |
| | | if (notFnmListhomebuy[i].InspectionCard_NoHave__c != notFnmListhomebuy[i+1].InspectionCard_NoHave__c) { |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | init.count_sj = n_sj; |
| | | } |
| | | } |
| | | } |
| | | // 2023-01-10 fy add end 商检证排序合并 |
| | | } |
| | | //zhj 如果是eSignSystem需要加上这个前缀链接 2023-01-04 start |
| | | if(bool){ |
| | |
| | | //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); |
| | | } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // 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); |
| | | // } |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | // 倒序显示 |
| | | for (Integer i = initList.size()-1; i>=0 ; i--) { |
| | | testInit init = new testInit(); |
| | |
| | | newinitList.add(init); |
| | | } |
| | | // newinitList.addAll(newinitListhomebuy); |
| | | newinitListhomebuy.addAll(newinitList); |
| | | newinitList=newinitListhomebuy; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 start |
| | | // newinitListhomebuy.addAll(newinitList); |
| | | // newinitList=newinitListhomebuy; |
| | | //2023 0208 fy add 报关单商检证新需求,重新判断 end |
| | | System.debug('newinitList'+newinitList); |
| | | System.debug('FnmList'+FnmList); |
| | | System.debug('newinitListhomebuy'+newinitListhomebuy); |
| | | // System.debug('newinitListhomebuy'+newinitListhomebuy); |
| | | return newinitList; |
| | | |
| | | } |
| | |
| | | @AuraEnabled |
| | | public Integer count; |
| | | @AuraEnabled |
| | | public Integer count_sj;//2023-01-10 fy add 商检证单独合并 |
| | | @AuraEnabled |
| | | public String awsKey; |
| | | @AuraEnabled |
| | | public String fileName; |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
New file |
| | |
| | | @isTest |
| | | public class AttachmentDisplayControllerTest { |
| | | static testMethod void TestInit01(){ |
| | | List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院']; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科']; |
| | | if (rectSct.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('診療科 消化科', '診療科 呼吸科') order by Name desc]; |
| | | if (rectDpt.size() == 0) { |
| | | return; |
| | | } |
| | | List<RecordType> rectAs = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Asset' and Name = '备品']; |
| | | if (rectAs.size() == 0) { |
| | | return; |
| | | } |
| | | |
| | | |
| | | // insert hospital |
| | | Account company1 = new Account(); |
| | | company1.RecordTypeId = rectCo[0].Id; |
| | | company1.Name = '病院テスト1'; |
| | | company1.OCM_man_province_txt__c = '江西'; |
| | | company1.AgentCode_Ext__c = '888888'; |
| | | List<Account> hps = new Account[]{company1}; |
| | | insert hps; |
| | | |
| | | List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = :company1.Id order by Department_Class_Label__c]; |
| | | |
| | | Account depart1 = new Account(); |
| | | depart1.RecordTypeId = rectDpt[0].Id; |
| | | depart1.Name = '*'; |
| | | depart1.Department_Name__c = '診療科1'; |
| | | depart1.ParentId = dc1s[0].Id; |
| | | depart1.Department_Class__c = dc1s[0].Id; |
| | | depart1.Hospital__c = company1.Id; |
| | | depart1.OCM_man_province_txt__c = '江西'; |
| | | // depart1.AgentCode_Ext__c = '888888'; |
| | | |
| | | insert new Account[] {depart1}; |
| | | |
| | | List<Product2> prdList = new List<Product2>(); |
| | | Product2 prd1 = new Product2(); |
| | | prd1.ProductCode_Ext__c = 'HistoryPrd1'; |
| | | prd1.ProductCode = 'HistoryPrd1'; |
| | | prd1.Repair_Product_Code__c = 'HistoryPrd1_RP'; |
| | | prd1.Name = 'HistoryPrd1'; |
| | | prd1.Manual_Entry__c = false; |
| | | prd1.Extend_new_product_gurantee__c = true; |
| | | prd1.Extend_Gurantee_Start__c = Date.today().addDays(-60); |
| | | prd1.Extend_Gurantee_End__c = Date.today().addDays(60); |
| | | prd1.HomeBuy__c=true; |
| | | prdList.add(prd1); |
| | | insert prdList; |
| | | |
| | | Asset ast = new Asset(); |
| | | |
| | | ast.RecordTypeId = rectAs[0].Id; |
| | | ast.SerialNumber = 'abcdefg'; |
| | | ast.Name = '测试资产1'; |
| | | ast.AccountId = depart1.Id; |
| | | ast.Department_Class__c = dc1s[0].Id; |
| | | ast.Hospital__c = company1.Id; |
| | | ast.Product2Id = prd1.Id; |
| | | ast.Guarantee_period_for_products__c = Date.today(); |
| | | ast.InstallDate = Date.today(); |
| | | ast.Manage_type__c = '个体管理'; |
| | | ast.FirstApproveDate_old__c = Date.today().addDays(-30); |
| | | |
| | | Oly_TriggerHandler.bypass('AssetHandler'); |
| | | |
| | | insert ast; |
| | | |
| | | Asset ast1 = [select RecordTypeID__c from Asset where Id =: ast.Id]; |
| | | |
| | | String RecordTypeID = ast1.RecordTypeID__c; |
| | | |
| | | System.assertEquals(RecordTypeID , ast.RecordTypeId); |
| | | |
| | | RecordType rectOpp = [select id from RecordType where IsActive = true and SobjectType = 'Opportunity' and DeveloperName = 'Opportunity' ]; |
| | | Opportunity opp = new Opportunity( |
| | | Name='testOpp1', |
| | | StageName='引合', |
| | | CloseDate=Date.today(), |
| | | AccountId=depart1.Id, |
| | | Sales_Root__c = '販売店', |
| | | Competitor__c ='A', |
| | | Click_Close_Date__c = null, |
| | | RecordType = rectOpp |
| | | ); |
| | | insert opp; |
| | | |
| | | //注残 |
| | | Statu_Achievements__c Sac = new Statu_Achievements__c( |
| | | name = 'zhucan_one', |
| | | Opportunity__c = opp.id, |
| | | DeliveryDate__c = Date.today(), |
| | | ContractNO__c = 'ContractNO1', |
| | | ContractAmount__c = 1000 |
| | | ); |
| | | insert Sac; |
| | | |
| | | |
| | | |
| | | //新建电子签收单 |
| | | eSignForm__c eSignForm = new eSignForm__c(); |
| | | eSignForm.Statu_Achievements__c = Sac.Id; |
| | | eSignForm.Name = '::测试电子签收单'; |
| | | eSignForm.DNName__c = '65210306'; |
| | | |
| | | insert eSignForm; |
| | | |
| | | eSignForm__c eSignForm1 = new eSignForm__c(); |
| | | eSignForm1.Statu_Achievements__c = Sac.Id; |
| | | eSignForm1.Name = '::测试电子签收单2'; |
| | | eSignForm1.DNName__c = '65210307'; |
| | | |
| | | insert eSignForm1; |
| | | |
| | | eSignFormEntry__c eSignFormEntry1 = new eSignFormEntry__c(); |
| | | eSignFormEntry1.Name = '::电子签收单录入表1'; |
| | | eSignFormEntry1.eSignForm__c = eSignForm.Id; |
| | | eSignFormEntry1.entryType__c = '经销商收货'; |
| | | |
| | | insert eSignFormEntry1; |
| | | |
| | | eSignFormEntry__c eSignFormEntry2 = new eSignFormEntry__c(); |
| | | eSignFormEntry2.Name = '::电子签收单录入表2'; |
| | | eSignFormEntry2.eSignForm__c = eSignForm.Id; |
| | | eSignFormEntry2.entryType__c = '经销商收货'; |
| | | eSignFormEntry2.IsSubmit__c = true; |
| | | eSignFormEntry2.IsHPSubmit__c = true; |
| | | // eSignFormEntry2.createdDate = Date.today().addDays(-2); |
| | | insert eSignFormEntry2; |
| | | |
| | | eSignFormEntry__c eSignFormEntry3 = new eSignFormEntry__c(); |
| | | eSignFormEntry3.Name = '::电子签收单录入表3'; |
| | | eSignFormEntry3.eSignForm__c = eSignForm1.Id; |
| | | eSignFormEntry3.entryType__c = '经销商收货'; |
| | | eSignFormEntry3.IsSubmit__c = true; |
| | | eSignFormEntry3.IsHPSubmit__c = true; |
| | | insert eSignFormEntry3; |
| | | |
| | | |
| | | //新建电子签收单明细 |
| | | eSignFormLineItem__c eSignFormLineItem = new eSignFormLineItem__c(); |
| | | eSignFormLineItem.Name = '::电子签收单明细'; |
| | | eSignFormLineItem.eSignForm__c = eSignForm.Id; |
| | | |
| | | insert eSignFormLineItem; |
| | | |
| | | eSignFormLineItem__c eSignFormLineItem1 = new eSignFormLineItem__c(); |
| | | eSignFormLineItem1.Name = '::电子签收单明细'; |
| | | eSignFormLineItem1.eSignForm__c = eSignForm1.Id; |
| | | |
| | | insert eSignFormLineItem1; |
| | | |
| | | //新建电子签收单明细录入表 |
| | | |
| | | eSignFormLineItemEntry__c eSignFormLineItemEntry1 = new eSignFormLineItemEntry__c(); |
| | | eSignFormLineItemEntry1.Name = '::电子签收单明细录入1'; |
| | | eSignFormLineItemEntry1.eSignFormEntry__c =eSignFormEntry1.Id; |
| | | eSignFormLineItemEntry1.eSignFormLineItem__c = eSignFormLineItem.Id; |
| | | |
| | | insert eSignFormLineItemEntry1; |
| | | |
| | | eSignFormLineItemEntry__c eSignFormLineItemEntry2 = new eSignFormLineItemEntry__c(); |
| | | eSignFormLineItemEntry2.Name = '::电子签收单明细录入2'; |
| | | eSignFormLineItemEntry2.eSignFormEntry__c =eSignFormEntry2.Id; |
| | | eSignFormLineItemEntry2.eSignFormLineItem__c = eSignFormLineItem.Id; |
| | | |
| | | |
| | | insert eSignFormLineItemEntry2; |
| | | |
| | | FileAddress__c FileName1 = new FileAddress__c(); |
| | | FileName1.FileName__c = 'ceshiyi1'; |
| | | FileName1.ViewLink__c = 'ceshiyi1'; |
| | | insert FileName1; |
| | | |
| | | FileAddress__c FileName2 = new FileAddress__c(); |
| | | FileName2.FileName__c = 'ceshiyi2'; |
| | | FileName2.ViewLink__c = 'ceshiyi2'; |
| | | insert FileName2; |
| | | |
| | | FrameNumManage__c FrameNumManage1 = new FrameNumManage__c(); |
| | | FrameNumManage1.Name = '测试1'; |
| | | FrameNumManage1.ManagementCode__c ='KVZFI'; |
| | | FrameNumManage1.ApplyList__c = 'ceshiyi1'; |
| | | FrameNumManage1.Num__c = 2; |
| | | FrameNumManage1.SerialNumber__c = '22R'; |
| | | FrameNumManage1.Material__c = 'wuliaoceshi'; |
| | | FrameNumManage1.MaterialDepict__c = 'wuliaomiaoshu'; |
| | | FrameNumManage1.signInForm__c = eSignForm.Id; |
| | | FrameNumManage1.InspectionCard_Select__c =FileName2.Id; |
| | | |
| | | insert FrameNumManage1; |
| | | |
| | | FrameNumManage__c FrameNumManage2 = new FrameNumManage__c(); |
| | | FrameNumManage2.Name = '测试2'; |
| | | FrameNumManage2.ManagementCode__c ='KVZFI2'; |
| | | FrameNumManage2.ApplyList__c = 'ceshiyi2'; |
| | | FrameNumManage2.Num__c = 2; |
| | | FrameNumManage2.SerialNumber__c = '22R'; |
| | | FrameNumManage2.Material__c = 'wuliaoceshi'; |
| | | FrameNumManage2.MaterialDepict__c = 'wuliaomiaoshu'; |
| | | FrameNumManage2.signInForm__c = eSignForm.Id; |
| | | FrameNumManage2.InspectionCard_Select__c =FileName2.Id; |
| | | FrameNumManage2.ApplyList_Select__c =FileName2.Id; |
| | | |
| | | insert FrameNumManage2; |
| | | FrameNumManage__c FrameNumManage3 = new FrameNumManage__c(); |
| | | FrameNumManage3.Name = '测试3'; |
| | | FrameNumManage3.ManagementCode__c ='KVZFI3'; |
| | | FrameNumManage3.ApplyList__c = 'ceshiyi2'; |
| | | FrameNumManage3.Num__c = 2; |
| | | FrameNumManage3.SerialNumber__c = '22R'; |
| | | FrameNumManage3.Material__c = 'wuliaoceshi3'; |
| | | FrameNumManage3.MaterialDepict__c = 'wuliaomiaoshu3'; |
| | | FrameNumManage3.signInForm__c = eSignForm.Id; |
| | | FrameNumManage3.InspectionCard_Select__c =FileName1.Id; |
| | | FrameNumManage3.ApplyList_Select__c =FileName1.Id; |
| | | |
| | | insert FrameNumManage3; |
| | | FrameNumManage__c FrameNumManage4 = new FrameNumManage__c(); |
| | | FrameNumManage4.Name = '测试4'; |
| | | FrameNumManage4.ManagementCode__c ='KVZFI4'; |
| | | FrameNumManage4.ApplyList__c = 'ceshiyi4'; |
| | | FrameNumManage4.Num__c = 2; |
| | | FrameNumManage4.SerialNumber__c = '22R'; |
| | | FrameNumManage4.Material__c = 'wuliaoceshi4'; |
| | | FrameNumManage4.MaterialDepict__c = 'wuliaomiaoshu4'; |
| | | FrameNumManage4.signInForm__c = eSignForm.Id; |
| | | FrameNumManage4.Asset__c = ast.Id; |
| | | FrameNumManage4.ApplyList_Select__c =FileName1.Id; |
| | | |
| | | insert FrameNumManage4; |
| | | |
| | | FrameNumManage__c FrameNumManage5 = new FrameNumManage__c(); |
| | | FrameNumManage5.Name = '测试5'; |
| | | FrameNumManage5.ManagementCode__c ='KVZFI5'; |
| | | FrameNumManage5.ApplyList__c = 'ceshiyi5'; |
| | | FrameNumManage5.Num__c = 2; |
| | | FrameNumManage5.SerialNumber__c = '22R'; |
| | | FrameNumManage5.Material__c = 'wuliaoceshi5'; |
| | | FrameNumManage5.MaterialDepict__c = 'wuliaomiaoshu5'; |
| | | FrameNumManage5.InspectionCard__c = '不出证'; |
| | | FrameNumManage5.signInForm__c = eSignForm.Id; |
| | | FrameNumManage5.ApplyList_Select__c =FileName1.Id; |
| | | |
| | | insert FrameNumManage5; |
| | | |
| | | FrameNumManage__c FrameNumManage6 = new FrameNumManage__c(); |
| | | FrameNumManage6.Name = '测试6'; |
| | | FrameNumManage6.ManagementCode__c ='KVZFI6'; |
| | | FrameNumManage6.ApplyList__c = 'ceshiyi6'; |
| | | FrameNumManage6.Num__c = 2; |
| | | FrameNumManage6.SerialNumber__c = '22R'; |
| | | FrameNumManage6.Material__c = 'wuliaoceshi6'; |
| | | FrameNumManage6.MaterialDepict__c = 'wuliaomiaoshu6'; |
| | | FrameNumManage6.InspectionCard__c = 'ceshiyi2'; |
| | | FrameNumManage6.signInForm__c = eSignForm.Id; |
| | | FrameNumManage6.ApplyList_Select__c =FileName1.Id; |
| | | |
| | | insert FrameNumManage6; |
| | | |
| | | FrameNumManage__c FrameNumManage7 = new FrameNumManage__c(); |
| | | FrameNumManage7.Name = '测试7'; |
| | | FrameNumManage7.ManagementCode__c ='KVZFI7'; |
| | | FrameNumManage7.ApplyList__c = 'ceshiyi6'; |
| | | FrameNumManage7.Num__c = 2; |
| | | FrameNumManage7.SerialNumber__c = '22R'; |
| | | FrameNumManage7.Material__c = 'wuliaoceshi6'; |
| | | FrameNumManage7.MaterialDepict__c = 'wuliaomiaoshu6'; |
| | | FrameNumManage7.InspectionCard__c = 'ceshiyi2'; |
| | | FrameNumManage7.signInForm__c = eSignForm.Id; |
| | | |
| | | insert FrameNumManage7; |
| | | |
| | | FrameNumManage__c FrameNumManage8 = new FrameNumManage__c(); |
| | | FrameNumManage8.Name = '测试8'; |
| | | FrameNumManage8.ManagementCode__c ='KVZFI8'; |
| | | FrameNumManage8.ApplyList__c = 'ceshiyi8'; |
| | | FrameNumManage8.Num__c = 2; |
| | | FrameNumManage8.SerialNumber__c = '22R'; |
| | | FrameNumManage8.Material__c = 'wuliaoceshi5'; |
| | | FrameNumManage8.MaterialDepict__c = 'wuliaomiaoshu5'; |
| | | FrameNumManage8.InspectionCard__c = 'ceshiyi1'; |
| | | FrameNumManage8.signInForm__c = eSignForm.Id; |
| | | FrameNumManage8.ApplyList_Select__c =FileName1.Id; |
| | | FrameNumManage8.InspectionCard_Select__c =FileName2.Id; |
| | | |
| | | insert FrameNumManage8; |
| | | |
| | | FrameNumManage__c FrameNumManage9 = new FrameNumManage__c(); |
| | | FrameNumManage9.Name = '测试9'; |
| | | FrameNumManage9.ManagementCode__c ='KVZFI9'; |
| | | FrameNumManage9.ApplyList__c = ''; |
| | | FrameNumManage9.Num__c = 2; |
| | | FrameNumManage9.SerialNumber__c = '22R'; |
| | | FrameNumManage9.Material__c = 'wuliaoceshi9'; |
| | | FrameNumManage9.MaterialDepict__c = 'wuliaomiaoshu9'; |
| | | FrameNumManage9.InspectionCard__c = ''; |
| | | FrameNumManage9.signInForm__c = eSignForm1.Id; |
| | | FrameNumManage9.ApplyList_Select__c =FileName1.Id; |
| | | FrameNumManage9.InspectionCard_Select__c =FileName2.Id; |
| | | |
| | | insert FrameNumManage9; |
| | | FrameNumManage__c FrameNumManage10 = new FrameNumManage__c(); |
| | | FrameNumManage10.Name = '测试10'; |
| | | FrameNumManage10.ManagementCode__c ='KVZFI10'; |
| | | FrameNumManage10.ApplyList__c = ''; |
| | | FrameNumManage10.Num__c = 2; |
| | | FrameNumManage10.SerialNumber__c = '22R'; |
| | | FrameNumManage10.Material__c = 'wuliaoceshi10'; |
| | | FrameNumManage10.MaterialDepict__c = 'wuliaomiaoshu10'; |
| | | FrameNumManage10.InspectionCard__c = ''; |
| | | FrameNumManage10.signInForm__c = eSignForm1.Id; |
| | | FrameNumManage10.ApplyList_Select__c =FileName1.Id; |
| | | FrameNumManage10.InspectionCard_Select__c =FileName2.Id; |
| | | |
| | | insert FrameNumManage10; |
| | | |
| | | FrameNumManage__c FrameNumManage11 = new FrameNumManage__c(); |
| | | FrameNumManage11.Name = '测试11'; |
| | | FrameNumManage11.ManagementCode__c ='KVZFI11'; |
| | | FrameNumManage11.ApplyList__c = null; |
| | | FrameNumManage11.Num__c = 2; |
| | | FrameNumManage11.SerialNumber__c = '22R'; |
| | | FrameNumManage11.Material__c = 'wuliaoceshi11'; |
| | | FrameNumManage11.MaterialDepict__c = 'wuliaomiaoshu11'; |
| | | FrameNumManage11.InspectionCard__c = ''; |
| | | FrameNumManage11.signInForm__c = eSignForm1.Id; |
| | | FrameNumManage11.ApplyList_Select__c =FileName1.Id; |
| | | FrameNumManage11.InspectionCard_Select__c =FileName2.Id; |
| | | |
| | | insert FrameNumManage11; |
| | | |
| | | // create ContentVersions |
| | | list<ContentVersion> cvList = new list<ContentVersion>(); |
| | | cvList.add( new ContentVersion(Title = 'test1',PathOnClient = 'Test1.txt',VersionData = Blob.valueOf('test data 1'), IsMajorVersion = true) ); |
| | | cvList.add( new ContentVersion(Title = 'test2',PathOnClient = 'Test2.txt',VersionData = Blob.valueOf('test data 2'), IsMajorVersion = true) ); |
| | | cvList.add( new ContentVersion(Title = 'test3',PathOnClient = 'Test3.txt',VersionData = Blob.valueOf('test data 3'), IsMajorVersion = true) ); |
| | | insert cvList; |
| | | |
| | | Test.startTest(); |
| | | // retrieve Ids for ContentDocuments created on insert of ContentVersions |
| | | list<Id> cdIdList = new list<Id>(); |
| | | for (ContentDocument cd : [SELECT Id, LatestPublishedVersionId |
| | | FROM ContentDocument |
| | | WHERE (LatestPublishedVersionId = :cvList[0].Id |
| | | OR LatestPublishedVersionId = :cvList[1].Id |
| | | OR LatestPublishedVersionId = :cvList[2].Id) |
| | | ORDER BY Title]) { |
| | | cdIdList.add(cd.Id); |
| | | } |
| | | system.assertEquals(3, cdIdList.size()); |
| | | |
| | | |
| | | // create ContentDocumentLink links. 2 for TestAcct (1) and 1 for TestAcct (2) |
| | | list<ContentDocumentLink> cdlList = new list<ContentDocumentLink>(); |
| | | cdlList.add(new ContentDocumentLink(ContentDocumentId=cdIdList[0], LinkedEntityId=eSignFormEntry1.Id, ShareType='V')); |
| | | |
| | | insert cdlList; |
| | | string aid = String.valueOf(depart1.Id); |
| | | eSignHomePageController.getDNSignUpStatus('65210306'); |
| | | eSignHomePageController.eSignWrapperList esceshi = eSignHomePageController.getDNSignUpLists(aid,'Agency'); |
| | | eSignHomePageController.getAccount('888888'); |
| | | AttachmentDisplayController.getFrameNumManage(eSignForm.Id); |
| | | |
| | | eSignHomePageController.getDNSignUpStatus('65210307'); |
| | | eSignHomePageController.eSignWrapperList esceshi1 = eSignHomePageController.getDNSignUpLists(aid,'Agency'); |
| | | eSignHomePageController.getAccount('888888'); |
| | | AttachmentDisplayController.getFrameNumManage(eSignForm1.Id); |
| | | Test.stopTest(); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>55.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | public with sharing class DealerPersonnelController { |
| | | public without sharing class DealerPersonnelController { |
| | | public DealerPersonnelController() { |
| | | |
| | | } |
| | |
| | | public static String processData(String fileData,String sobjectName,List<String> fields) { |
| | | system.debug('fileData===============>'+fileData); |
| | | String errorMage = ''; |
| | | try { |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // Savepoint sp = Database.setSavepoint(); |
| | | // try { |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | if(fileData != null){ |
| | | String[] fileLines = new String[]{}; |
| | | fileLines = fileData.split('\n'); |
| | | system.debug('fileLines===================>'+fileLines); |
| | | // 经销商管理编码 |
| | | List<String> managementCodeList = new List<String>(); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // 客户名 |
| | | List<String> CustomerNameList = new List<String>(); |
| | | //人员管理编码 |
| | | List<String> CManageCodeList = new List<String>(); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // 导入的数据 |
| | | List<List<String>> inputList = new List<List<String>>(); |
| | | for (Integer i = 1,j = fileLines.size(); i < j; i++) { |
| | | List<String> inputValues = new List<String>(); |
| | | inputValues = fileLines[i].split(','); |
| | | System.debug('inputValues=============>'+inputValues); |
| | | if(inputValues != null){ |
| | | if(inputValues[0] == '' || inputValues[0]== null){ |
| | | errorMage += 'errorMage: 第' + i + '行,姓名不能为空!'; |
| | | errorMage += '='; |
| | | } |
| | | if(inputValues[1] == '' || inputValues[1] ==null){ |
| | | errorMage += 'errorMage: 第' + i + '行,手机不能为空!'; |
| | | errorMage += '='; |
| | | if(fileLines[i].replace(',','').trim()!=''){ |
| | | inputValues = fileLines[i].split(',',-1); |
| | | System.debug('inputValues=============>'+inputValues); |
| | | System.debug('fileLines[i]=============>'+fileLines[i]); |
| | | if(inputValues != null){ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // if(inputValues[0] == '' || inputValues[0]== null){ |
| | | // errorMage += 'errorMage: 第' + i + '行,姓名不能为空!'; |
| | | // errorMage += '='; |
| | | // } |
| | | // // if(inputValues[1] == '' || inputValues[1] ==null){ |
| | | // // errorMage += 'errorMage: 第' + i + '行,手机不能为空!'; |
| | | // // errorMage += '='; |
| | | // // } |
| | | // // boolean mobileNumberFlag = mobileNumberVerification(inputValues[1]); |
| | | // // if(mobileNumberFlag == false){ |
| | | // // errorMage += 'errorMage: 你的手机号码不太正确,请检查您的手机是否正确!'; |
| | | // // errorMage += '='; |
| | | // // } |
| | | // // if(inputValues[2] == '' || inputValues[2] == null){ |
| | | // // errorMage += 'errorMage: 第' + i + '行,邮箱不能为空!'; |
| | | // // errorMage += '='; |
| | | // // } |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // if(inputValues[2] != '' && inputValues[2] != null){ |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // boolean mailboxFlag = mailboxVerification(inputValues[2]); |
| | | // if(mailboxFlag == false){ |
| | | // errorMage += 'errorMage:第' + i + '行, 你的邮箱不太正确,请检查您的邮箱格式!'; |
| | | // errorMage += '='; |
| | | // } |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // } |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // if(inputValues[3] == '' || inputValues[3] == null){ |
| | | // errorMage += 'errorMage: 第' + i + '行,经销商管理编码不能为空!'; |
| | | // errorMage += '='; |
| | | // } |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // if(inputValues[4] == '' || inputValues[4] == null){ |
| | | // errorMage += 'errorMage: 第' + i + '行,客户名不能为空!'; |
| | | // errorMage += '='; |
| | | // } |
| | | // if(inputValues[5] == '' || inputValues[5] == null){ |
| | | // errorMage += 'errorMage: 第' + i + '行,经销商用户不能为空!'; |
| | | // errorMage += '='; |
| | | // } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | inputValues[3]=inputValues[3].leftpad(10,'0'); |
| | | System.debug('测试去零1 '+inputValues[3].replace(' ','').length()); |
| | | |
| | | managementCodeList.add(inputValues[3]); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | CustomerNameList.add(inputValues[4]); |
| | | CManageCodeList.add(inputValues[6]); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | inputList.add(inputValues); |
| | | |
| | | //导入的数据 |
| | | // System.debug('inputValues[0]===============>'+ inputValues[0]); |
| | | // System.debug('inputValues[1]===============>'+ inputValues[1]); |
| | | // System.debug('inputValues[2]===============>'+ inputValues[2]); |
| | | // System.debug('inputValues[3]===============>'+ inputValues[3]); |
| | | // //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // System.debug('inputValues[4]===============>'+ inputValues[4]); |
| | | // System.debug('inputValues[5]===============>'+ inputValues[5]); |
| | | // System.debug('inputValues[6]===============>'+ inputValues[6]); |
| | | // System.debug('inputValues[7]===============>'+ inputValues[7]); |
| | | // System.debug('inputValues[8]===============>'+ inputValues[8]); |
| | | // System.debug('inputValues[9]===============>'+ inputValues[9]); |
| | | // System.debug('inputValues[10]===============>'+ inputValues[10]); |
| | | // System.debug('inputValues[11]===============>'+ inputValues[11]); |
| | | // System.debug('inputValues[12]===============>'+ inputValues[12]); |
| | | // System.debug('inputValues[13]===============>'+ inputValues[13]); |
| | | // System.debug('inputValues[14]===============>'+ inputValues[14]); |
| | | // System.debug('inputValues[15]===============>'+ inputValues[15]); |
| | | // System.debug('inputValues[16]===============>'+ inputValues[16]); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | |
| | | } |
| | | boolean mobileNumberFlag = mobileNumberVerification(inputValues[1]); |
| | | if(mobileNumberFlag == false){ |
| | | errorMage += 'errorMage: 你的手机号码不太正确,请检查您的手机是否正确!'; |
| | | errorMage += '='; |
| | | } |
| | | if(inputValues[2] == '' || inputValues[2] == null){ |
| | | errorMage += 'errorMage: 第' + i + '行,邮箱不能为空!'; |
| | | errorMage += '='; |
| | | } |
| | | boolean mailboxFlag = mailboxVerification(inputValues[2]); |
| | | if(mailboxFlag == false){ |
| | | errorMage += 'errorMage: 你的邮箱不太正确,请检查您的邮箱格式!'; |
| | | errorMage += '='; |
| | | } |
| | | if(inputValues[3] == '' || inputValues[3] == null){ |
| | | errorMage += 'errorMage: 第' + i + '行,经销商管理编码不能为空!'; |
| | | errorMage += '='; |
| | | } |
| | | |
| | | managementCodeList.add(inputValues[3]); |
| | | inputList.add(inputValues); |
| | | //导入的数据 |
| | | System.debug('inputValues[0]===============>'+ inputValues[0]); |
| | | System.debug('inputValues[1]===============>'+ inputValues[1]); |
| | | System.debug('inputValues[2]===============>'+ inputValues[2]); |
| | | System.debug('inputValues[3]===============>'+ inputValues[3]); |
| | | } |
| | | } |
| | | Map<String,Account> accountIdMap = new Map<String,Account>(); |
| | | List<Account> accountList = [select id, Name,Management_Code__c from Account where Management_Code__c in: managementCodeList]; |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | Map<String,Contact> contactIdMap = new Map<String,Contact>(); |
| | | Map<Id,String> ManagementCodeMap = new Map<Id,String>(); |
| | | List<Id> AccountIdList =new List<Id>(); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | System.debug('managementCodeList===============>'+ managementCodeList); |
| | | System.debug('CustomerNameList===============>'+ CustomerNameList); |
| | | List<Account> accountList = [select id, Name,Management_Code__c from Account where Management_Code__c in: managementCodeList and Name in:CustomerNameList]; |
| | | System.debug('iaccountList===============>'+ accountList); |
| | | for(Account ac : accountList){ |
| | | accountIdMap.put(ac.Management_Code__c,ac); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | AccountIdList.add(ac.Id); |
| | | ManagementCodeMap.put(ac.Id,ac.Management_Code__c); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | //查询客户人员是否有数据 |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // Map<String,Contact> contactIdMapName = new Map<String,Contact>(); |
| | | List<Contact> contactList = [select id, CManageCode__c,AccountId from Contact where AccountId in: AccountIdList and CManageCode__c in:CManageCodeList ]; |
| | | // List<Contact> contactList = [select id, CManageCode__c,AccountId,Name from Contact where AccountId in: AccountIdList ]; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | for(Contact cc : contactList){ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // String namekey = cc.Name.replace(' ', ''); |
| | | // String contactKey2=ManagementCodeMap.get(cc.AccountId)+'_'+namekey; |
| | | // contactIdMapName.put(contactKey2,cc); |
| | | String contactKey=ManagementCodeMap.get(cc.AccountId)+'_'+cc.CManageCode__c; |
| | | contactIdMap.put(contactKey,cc); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // System.debug('contactIdMapName++'+contactIdMapName); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | List<Contact> cnupdateList = new List<Contact>(); |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | List<Contact> cnList = new List<Contact>(); |
| | | Integer lineNumber = 1; |
| | | for(List<String> lineList :inputList){ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | Boolean errorflag1 = false; |
| | | String errorMageHang = ''; |
| | | if(lineList[0] == '' || lineList[0]== null){ |
| | | errorMageHang += ',姓名不能为空!'; |
| | | errorflag1 = true; |
| | | } |
| | | if(lineList[2] != '' && lineList[2] != null){ |
| | | boolean mailboxFlag = mailboxVerification(lineList[2]); |
| | | if(mailboxFlag == false){ |
| | | errorMageHang += ', 你的邮箱不太正确,请检查您的邮箱格式!'; |
| | | errorflag1 = true; |
| | | } |
| | | } |
| | | if(lineList[3] == '' || lineList[3] == null){ |
| | | errorMageHang += ',经销商管理编码不能为空!'; |
| | | errorflag1 = true; |
| | | } |
| | | if(lineList[4] == '' || lineList[4] == null){ |
| | | errorMageHang += ',客户名不能为空!'; |
| | | errorflag1 = true; |
| | | } |
| | | if(lineList[5] == '' || lineList[5] == null){ |
| | | errorMageHang += ',经销商用户不能为空!'; |
| | | errorflag1 = true; |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | Contact con = new Contact(); |
| | | //暂时导入的是经销商用户,所以记录类型只有经销商,暂时写死;后期如果有变动再更改 |
| | | con.RecordTypeId = '01210000000QfWiAAK'; |
| | | if(lineList[0] != null && lineList[0] != ''){ |
| | | con.LastName = lineList[0]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,姓氏'+lineList[0]+'不存在'; |
| | | errorMage += '='; |
| | | } |
| | | if(lineList[1] != null && lineList[1] != ''){ |
| | | if(mobileNumberVerification(lineList[1])){ |
| | | con.MobilePhone = lineList[1]; |
| | | if(!contactIdMap.containsKey(lineList[3]+'_'+lineList[6])){ |
| | | if(lineList[0] != null && lineList[0] != ''){ |
| | | con.LastName = lineList[0]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不正确!'; |
| | | errorMage += '='; |
| | | } |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不存在'; |
| | | errorMage += '='; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,姓氏'+lineList[0]+'不存在'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',姓氏 '+lineList[0]+' 不存在'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | } |
| | | if(lineList[1] != null && lineList[1] != ''){ |
| | | // if(mobileNumberVerification(lineList[1])){ |
| | | con.MobilePhone = lineList[1]; |
| | | // }else{ |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不正确!'; |
| | | // errorMage += '='; |
| | | // } |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // else{ |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,手机'+lineList[1]+'不存在'; |
| | | // errorMage += '='; |
| | | // } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | if(lineList[2] != null && lineList[2] != ''){ |
| | | if(mailboxVerification(lineList[2])){ |
| | | con.Email = lineList[2]; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不正确!'; |
| | | errorMage += '='; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',电子邮件 '+lineList[2]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不存在'; |
| | | errorMage += '='; |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // else{ |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,电子邮件'+lineList[2]+'不存在'; |
| | | // errorMage += '='; |
| | | // } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | if(accountIdMap.containsKey(lineList[3])){ |
| | | con.AccountId = accountIdMap.get(lineList[3]).id; |
| | | }else{ |
| | | errorMage += 'error: 第'+ lineNumber +'行数据,经销商编码'+lineList[3]+'不存在'; |
| | | errorMage += '='; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,经销商编码'+lineList[3]+'或者客户名不存在'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',经销商编码 '+lineList[3]+' 或者客户名不存在'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //暂定创建直接为 true |
| | | con.Agency_User__c = true; |
| | | // con.Agency_User__c = true; |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | if(lineList[5] != null && lineList[5] != ''){ |
| | | if(lineList[5]=='true'||lineList[5]=='TRUE'){ |
| | | con.Agency_User__c=true; |
| | | }else{ |
| | | con.Agency_User__c=false; |
| | | } |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,经销商用户'+lineList[0]+'不存在'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',经销商用户 '+lineList[0]+' 不存在'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | //经销商专员类型 |
| | | if(VerificationOLYAssistantType(lineList[7])){ |
| | | con.OLY_Assistant_Type__c = lineList[7]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,经销商专员类型'+lineList[7]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',经销商专员类型 '+lineList[7]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //入职年份 |
| | | if(VerificationDateType(lineList[8])){ |
| | | con.InductionYear__c = ConversionDateType(lineList[8]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,入职年份'+lineList[8]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',入职年份 '+lineList[8]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //GIR认证级别 |
| | | if(VerifyCertificationLevel(lineList[9])){ |
| | | con.GIR_CertificationLevel__c = lineList[9]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,GIR认证级别'+lineList[9]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',GIR认证级别 '+lineList[9]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //GIR认证时间 |
| | | if(VerificationDateType(lineList[10])){ |
| | | con.GIR_CertificationTime__c = ConversionDateType(lineList[10]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,GIR认证时间'+lineList[10]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',GIR认证时间 '+lineList[10]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SP认证级别 |
| | | if(VerifyCertificationLevel(lineList[11])){ |
| | | con.SP_CertificationLevel__c = lineList[11]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,SP认证级别'+lineList[11]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',SP认证级别 '+lineList[11]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SP认证时间 |
| | | if(VerificationDateType(lineList[12])){ |
| | | con.SP_CertificationTime__c = ConversionDateType(lineList[12]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,SP认证时间'+lineList[12]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',SP认证时间 '+lineList[12]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //ET认证级别 |
| | | if(VerifyCertificationLevel(lineList[13])){ |
| | | con.ET_CertificationLevel__c = lineList[13]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,ET认证级别'+lineList[13]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',ET认证级别 '+lineList[13]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //ET认证时间 |
| | | if(VerificationDateType(lineList[14])){ |
| | | con.ET_CertificationTime__c = ConversionDateType(lineList[14]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,ET认证时间'+lineList[14]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang += ',ET认证时间 '+lineList[14]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //ENG认证级别 |
| | | if(VerifyCertificationLevel(lineList[15])){ |
| | | con.ENG_CertificationLevel__c = lineList[15]; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,ENG认证级别'+lineList[15]+'不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang +=',ENG认证级别 '+lineList[15]+' 不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //ENG认证时间 |
| | | if(VerificationDateType(lineList[16])){ |
| | | con.ENG_CertificationTime__c = ConversionDateType(lineList[16]); |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // errorMage += 'error: 第'+ lineNumber +'行数据,ENG认证时间'+lineList[16]+'格式不正确!'; |
| | | // errorMage += '='; |
| | | errorMageHang +=',ENG认证时间 '+lineList[16]+' 格式不正确!'; |
| | | errorflag1 = true; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // lineNumber++; |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | System.debug('001+'+lineList[3]+'_'+lineList[6]); |
| | | System.debug('002+'+contactIdMap.get(lineList[3]+'_'+lineList[6])); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // System.debug('003+'+lineList[3]+'_'+lineList[0]); |
| | | // System.debug('004+'+contactIdMapName.get(lineList[3]+'_'+lineList[0])); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | if(errorflag1){ |
| | | errorMage += 'error: 第' + lineNumber + '行 ('+lineList[0]+') 的数据'+errorMageHang; |
| | | errorMage += '='; |
| | | }else{ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | if(contactIdMap.containsKey(lineList[3]+'_'+lineList[6])){ |
| | | con.Id=contactIdMap.get(lineList[3]+'_'+lineList[6]).Id; |
| | | cnupdateList.add(con); |
| | | }else { |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start 0228 |
| | | // if(!contactIdMapName.containsKey(lineList[3]+'_'+lineList[0])){ |
| | | // cnList.add(con); |
| | | // } |
| | | cnList.add(con); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | // cnList.add(con); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | lineNumber++; |
| | | cnList.add(con); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | if(errorMage != ''){ |
| | | system.debug('errorMage==========>'+errorMage); |
| | | return errorMage; |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // if(errorMage != ''){ |
| | | // system.debug('errorMage==========>'+errorMage); |
| | | // return errorMage; |
| | | // } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | |
| | | // 新增周报明细 |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | List<String> errorChongfuList = new List<String>(); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | if(cnList.size() > 0 ){ |
| | | insertContact(cnList); |
| | | System.debug('003+'+cnList); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // insertContact(cnList); |
| | | Database.SaveResult[] InsertShare = Database.insert(cnList, false); |
| | | for(Database.SaveResult insertresult :InsertShare){ |
| | | if (!insertresult.isSuccess()) { |
| | | String errerContactiD=''; |
| | | String errer = String.valueOf(insertresult.getErrors()[0]); |
| | | if(errer.contains('UniqueNumber__c 与记录值重复')){ |
| | | List<String> errerList = errer.split('UniqueNumber__c 与记录值重复'); |
| | | if(errerList.size()>1){ |
| | | errerContactiD=errerList[1].substring(errerList[1].indexOf('ID 为:')+5,errerList[1].indexOf(';getStatusCode')).replace(' ',''); |
| | | errorChongfuList.add(errerContactiD); |
| | | } |
| | | }else{ |
| | | errorMage += errer; |
| | | } |
| | | } |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | // 更新周报明细 |
| | | if(cnupdateList.size() > 0 ){ |
| | | System.debug('004+'+cnupdateList); |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // updateContact(cnupdateList); |
| | | Database.SaveResult[] UpdateShare = Database.update(cnupdateList, false); |
| | | for(Database.SaveResult updateresult :UpdateShare){ |
| | | if (!updateresult.isSuccess()) { |
| | | String errerContactiD=''; |
| | | String errer = String.valueOf(updateresult.getErrors()[0]); |
| | | if(errer.contains('UniqueNumber__c 与记录值重复')){ |
| | | List<String> errerList = errer.split('UniqueNumber__c 与记录值重复'); |
| | | if(errerList.size()>1){ |
| | | errerContactiD=errerList[1].substring(errerList[1].indexOf('ID 为:')+5,errerList[1].indexOf(';getStatusCode')).replace(' ',''); |
| | | errorChongfuList.add(errerContactiD); |
| | | } |
| | | }else{ |
| | | errorMage += errer; |
| | | } |
| | | } |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | List<Contact> repeatContact=[select Id,Name from Contact where Id = :errorChongfuList]; |
| | | if(repeatContact.size()>0){ |
| | | for(Contact repeatContactitem :repeatContact){ |
| | | String errerContactName=''; |
| | | String errerContactID=''; |
| | | errerContactName = repeatContactitem.Name; |
| | | errerContactID = repeatContactitem.Id; |
| | | errorMage +='error: 数据中存在与系统现有用户 '+errerContactName+'(Id为:'+errerContactiD+')重复的电话号码'; |
| | | } |
| | | }else if(errorChongfuList.size()>0){ |
| | | errorMage +='error: 数据中存在重复的电话号码'; |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | } |
| | | if(errorMage != ''){ |
| | | system.debug('errorMage==========>'+errorMage); |
| | | return errorMage; |
| | | } |
| | | return 'success'; |
| | | } catch (Exception e) { |
| | | System.debug('exception'+e); |
| | | return 'exception'+e; |
| | | } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // String errer=String.valueOf(e); |
| | | // String errerContactiD=''; |
| | | // String errerContactName=''; |
| | | // if(errer.contains('UniqueNumber__c 与记录值重复')){ |
| | | // List<String> errerList = errer.split('UniqueNumber__c 与记录值重复'); |
| | | // if(errerList.size()>1){ |
| | | // errerContactiD=errerList[1].substring(errerList[1].indexOf('ID 为:')+5,errerList[1].indexOf(': []')).replace(' ',''); |
| | | // List<Contact> repeatContact=[select Name from Contact where Id = :errerContactiD]; |
| | | // if(repeatContact.size()>0){ |
| | | // errerContactName=repeatContact[0].Name; |
| | | // return 'error: 数据中存在与系统现有用户 '+errerContactName+'(Id为:'+errerContactiD+')重复的电话号码'; |
| | | // }else{ |
| | | // return 'error: 数据中存在重复的电话号码'; |
| | | // } |
| | | // } |
| | | // } |
| | | // return e.getLineNumber()+'exception'+e; |
| | | |
| | | // } catch (Exception e) { |
| | | // Database.rollback(sp); |
| | | // System.debug('exception++++++++++++++++++'+e.getLineNumber()+e); |
| | | // String errer=String.valueOf(e); |
| | | // String errerContactiD=''; |
| | | // String errerContactName=''; |
| | | // if(errer.contains('UniqueNumber__c 与记录值重复')){ |
| | | // List<String> errerList = errer.split('UniqueNumber__c 与记录值重复'); |
| | | // if(errerList.size()>1){ |
| | | // errerContactiD=errerList[1].substring(errerList[1].indexOf('ID 为:')+5,errerList[1].indexOf(': []')).replace(' ',''); |
| | | // List<Contact> repeatContact=[select Name from Contact where Id = :errerContactiD]; |
| | | // if(repeatContact.size()>0){ |
| | | // errerContactName=repeatContact[0].Name; |
| | | // return 'error: 数据中存在与系统现有用户 '+errerContactName+'(Id为:'+errerContactiD+')重复的电话号码'; |
| | | // }else{ |
| | | // return 'error: 数据中存在重复的电话号码'; |
| | | // } |
| | | // } |
| | | // } |
| | | // return e.getLineNumber()+'exception'+e; |
| | | // } |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | } |
| | | // 电子邮件的验证 |
| | | public static boolean mailboxVerification(String mailbox){ |
| | | String check = '^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$'; |
| | | String check = '^([a-z0-9A-Z]+[_-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$'; |
| | | Pattern regex = Pattern.compile(check); |
| | | Matcher matcher = regex.matcher(mailbox); |
| | | if (matcher.matches()){ |
| | |
| | | return false; |
| | | } |
| | | // 手机号的验证 |
| | | public static boolean mobileNumberVerification(String phoneNumber){ |
| | | String check = '^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$'; |
| | | Pattern regex = Pattern.compile(check); |
| | | Matcher matcher = regex.matcher(phoneNumber); |
| | | if(matcher.matches()){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | // public static boolean mobileNumberVerification(String phoneNumber){ |
| | | // String check = '^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$'; |
| | | // Pattern regex = Pattern.compile(check); |
| | | // Matcher matcher = regex.matcher(phoneNumber); |
| | | // if(matcher.matches()){ |
| | | // return true; |
| | | // } |
| | | // return false; |
| | | // } |
| | | //新增客户人员; |
| | | public static void insertContact(List<Contact> data) { |
| | | insert data; |
| | | } |
| | | |
| | | // SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy start |
| | | //校验认证级别; |
| | | public static boolean VerifyCertificationLevel(String data) { |
| | | //DB202301262139 SFDC经销商人员导入功能改进 start |
| | | // if(data=='A'||data=='B'||data==''){ |
| | | if(data=='A级'||data=='A级未通过'||data=='A级未通过(失效)'||data=='A级(失效)'||data=='B级'||data=='B级(失效)'||data=='B级未通过'||data=='初级'||data=='初级未通过'||data=='未认证'||data==''){ |
| | | //DB202301262139 SFDC经销商人员导入功能改进 end |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | //校验日期类型 |
| | | public static Boolean VerificationDateType(String data) { |
| | | List<String> date1str; |
| | | List<String> date2str; |
| | | if(data==''){ |
| | | return true; |
| | | } |
| | | date1str=data.split('/'); |
| | | date2str=data.split('-'); |
| | | if(date1str.size()>1||date2str.size()>1){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | //转换日期类型; |
| | | public static Date ConversionDateType(String data) { |
| | | if(data==''){ |
| | | return null; |
| | | } |
| | | return Date.valueOf(data.replace('/','-')); |
| | | } |
| | | //校验经销商专员类型; |
| | | public static Boolean VerificationOLYAssistantType(String data) { |
| | | if(data=='GR专员'||data=='SP专员'||data=='GRSP专员'||data=='ET专员'||data=='TB专员'||data=='奥辉基层专员'||data=='商务助理'||data=='*****'||data==''){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | //更新客户人员; |
| | | public static void updateContact(List<Contact> data){ |
| | | update data; |
| | | } |
| | | //SWAG-CEW85A 【委托】消耗品&DAMS系统经销商人员管理——信息完善;fy end |
| | | } |
| | |
| | | insert account1; |
| | | } |
| | | @isTest public static void selectProductCcategoryTest() { |
| | | testInit(); |
| | | Test.startTest(); |
| | | String reports = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名\r\n小王,18801332211,123@qq.com,737011,启稳起步\r\n','',null); |
| | | testInit(); |
| | | String reports = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名,经销商用户,人员管理编码,经销商专员类型,入职年份,GIR认证级别,GIR认证时间,SP认证级别,SP认证时间,ET认证级别,ET认证时间,ENG认证级别,ENG认证时间\r\n小王,18801332211,123@qq.com,737011,启稳起步,TRUE,C000125941,SP专员,2021/1/7,A,2022/1/7,A,2019/1/7,A,2021/2/7,B,2020/1/7\r\n','',null); |
| | | String reports2 = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名,经销商用户,人员管理编码,经销商专员类型,入职年份,GIR认证级别,GIR认证时间,SP认证级别,SP认证时间,ET认证级别,ET认证时间,ENG认证级别,ENG认证时间\r\n小王,18801332211,123@qq.com,737011,test1医院,TRUE,,SP专员,2021/1/7,A级,2022/1/7,A级,2019/1/7,A级,2021/2/7,B级,2020/1/7\r\n','',null); |
| | | List<Contact> data = new List<Contact>(); |
| | | DealerPersonnelController.updateContact(data); |
| | | Boolean a= DealerPersonnelController.VerificationDateType(''); |
| | | Date b = DealerPersonnelController.ConversionDateType(''); |
| | | Test.stopTest(); |
| | | } |
| | | @isTest public static void selectProductCcategoryTest01() { |
| | | testInit(); |
| | | Test.startTest(); |
| | | String reports = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名\r\n,,,,\r\n','',null); |
| | | String reports = DealerPersonnelController.processData('"姓名,手机,电子邮件,经销商编码,客户名,经销商用户,人员管理编码,经销商专员类型,入职年份,GIR认证级别,GIR认证时间,SP认证级别,SP认证时间,ET认证级别,ET认证时间,ENG认证级别,ENG认证时间\r\n,,123,,,,,123,123,123,123,123,13,12,123,132,13\r\n','',null); |
| | | Test.stopTest(); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | // 已经存在报价 |
| | | if (String.isNotBlank(oppquoid)) { |
| | | //DB202302464682【报价委托】报价委托改善224 fy start |
| | | Quote quo2 = new Quote(); |
| | | List<Quote> quote = [select Id,Agency1__c,Agency2__c From Quote Where Id =:oppquoid]; |
| | | if(quote.size()>0){ |
| | | quo2=quote[0]; |
| | | } |
| | | quo.Agency1_entrust__c = quo2.Agency1__c; |
| | | quo.Agency2_entrust__c = quo2.Agency2__c; |
| | | //DB202302464682【报价委托】报价委托改善224 fy end |
| | | // 报价商品取得 |
| | | // CHAN-BHNBX6 2019/11/20 START//fy lastbuy 20220310 PricebookEntry.Product2.LastbuyProductFLG__c |
| | | List<QuoteLineItem> qlis = [select id,PricebookEntry.Product2Id,PricebookEntry.Product2.LastbuyProductFLG__c,Quantity__c,CurrencyIsoCode,GuaranteePeriod__c from QuoteLineItem where QuoteId = :oppquoid]; |
| | |
| | | [ SELECT Id,Name,Cancel_Decide__c,Agency_Hospital_Link__c,CreatedDate, PriceRefreshDate__c,Quote_Print_Date__c,Agency1_entrust__c,cancelMultiyearInsurance__c, |
| | | Quote_Date__c,QuoteToName__c,Quote_Expiration_Date__c,Quote_Comment__c,Tender_information__c,Noteplus__c,Lead__c,Opportunity__c, |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c, |
| | | Agency2_entrust__c,//DB202302464682【报价委托】报价委托改善224 fy |
| | | Print_HP_Name__c,Account__c,IraiUser__c,IraiSubject__c,CurrencyIsoCode,IraiName__c,QuoteIrai_Status__c,QuoteProportion__c,Note__c,IraiComment__c |
| | | , urgent__c //20230104 lt DB202212427301 |
| | | FROM QuoteIrai__c Where Id =:quoId]; |
| | | // CHAN-BJQ4VZ 精琢技术 2019/12/11 End |
| | | // CHAN-BHNBX6 2019/11/20 START |
| | | List<QuoteIraiLineItem__c> items = //lastbuy 2022/3/10 fy start LastbuyProductFLG__c //SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 start Is_DangerousChemicals__c |
| | | List<QuoteIraiLineItem__c> items = //lastbuy 2022/3/10 fy start LastbuyProductFLG__c //SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 start Is_DangerousChemicals__c,CanNotCancelledGurantee__c |
| | | [Select Id,Asset_Model_No__c,SFDA_Status__c,Name__c,BSS_Category__c,QuoteIrai__r.Quote_Print_Date__c, |
| | | Qty_Unit__c,Quantity__c,Product2__r.SFDA_Status__c,ProductCode__c,ListPrice__c,Product2__r.LastbuyProductFLG__c,Product2__r.Is_DangerousChemicals__c, |
| | | Qty_Unit__c,Quantity__c,Product2__r.SFDA_Status__c,ProductCode__c,ListPrice__c,Product2__r.LastbuyProductFLG__c,Product2__r.Is_DangerousChemicals__c,CanNotCancelledGurantee__c, |
| | | Product2__r.Sales_Possibility__c,Product2__r.Name,Product2__c,ServicePrice__c,NoDiscountTotal__c,GuaranteePeriod__c |
| | | From QuoteIraiLineItem__c where QuoteIrai__c = :quoId Order by Item_Order__c, Id]; |
| | | // CHAN-BHNBX6 2019/11/20 END |
| | |
| | | } |
| | | } |
| | | } |
| | | // System.debug('---lt123---descriptions---'+descriptions); |
| | | if (descriptions.size() <= 0) { |
| | | errorflg = true; |
| | | errorMessage = '没有要委托的产品。'; |
| | |
| | | } |
| | | |
| | | String description = ''; |
| | | //20230116 fy start |
| | | String descriptionsendEmailp = ''; |
| | | String descriptionsendEmailbody = ''; |
| | | //20230116 fy end |
| | | Integer i = 1; |
| | | for (String d : descriptions) { |
| | | if (i == 1) { |
| | | description += d; |
| | | //20230116 fy start |
| | | descriptionsendEmailp += d; |
| | | //20230116 fy end |
| | | } else { |
| | | description += '\r\n' + d; |
| | | //20230116 fy start |
| | | descriptionsendEmailp += '\r\n' + d; |
| | | //20230116 fy end |
| | | } |
| | | i += 1; |
| | | } |
| | | // System.debug('---lt123---description---'+description); |
| | | //obsap 新增经销商1字段 fy start |
| | | if (!String.isBlank(quo.Agency1_entrust__c)) { |
| | | Account quoteAeName = [select Id,Name from Account where Id =:quo.Agency1_entrust__c]; |
| | | description += '\r\n' + '第一经销商名称' + ':' + quoteAeName.Name; |
| | | //20230116 fy start |
| | | descriptionsendEmailbody += '\r\n' + '第一经销商名称' + ':' + quoteAeName.Name; |
| | | //20230116 fy end |
| | | } |
| | | //DB202302464682【报价委托】报价委托改善224 fy start |
| | | if (!String.isBlank(quo.Agency2_entrust__c)) { |
| | | Account quoteAeName2 = [select Id,Name from Account where Id =:quo.Agency2_entrust__c]; |
| | | description += '\r\n' + '第二经销商名称' + ':' + quoteAeName2.Name; |
| | | descriptionsendEmailbody += '\r\n' + '第二经销商名称' + ':' + quoteAeName2.Name; |
| | | } |
| | | //DB202302464682【报价委托】报价委托改善224 fy end |
| | | if (quo.QuoteProportion__c!=null) { |
| | | description += '\r\n' + '报价比例' + ':' + quo.QuoteProportion__c; |
| | | //20230116 fy start |
| | | descriptionsendEmailbody += '\r\n' + '报价比例' + ':' + quo.QuoteProportion__c; |
| | | //20230116 fy end |
| | | } |
| | | if (!String.isBlank(quo.IraiComment__c)) { |
| | | description += '\r\n' + '报价备注' + ':' + quo.IraiComment__c; |
| | | //20230116 fy start |
| | | descriptionsendEmailbody += '\r\n' + '报价备注' + ':' + quo.IraiComment__c; |
| | | //20230116 fy end |
| | | } |
| | | //obsap 新增经销商1字段 fy end |
| | | //XLIU-CFE8M7 【委托】【P-OBSAP】报价委托任务改善 fy start |
| | |
| | | description += '\r\n' + node; |
| | | //XLIU-CFE8M7 【委托】【P-OBSAP】报价委托任务改善 fy end |
| | | // description += '\r\n' + quo.Note__c; |
| | | //20230116 fy start |
| | | descriptionsendEmailbody += '\r\n' + node; |
| | | //20230116 fy end |
| | | } |
| | | if (!String.isBlank(quo.Account__c)) { |
| | | description += '\r\n' + Account.sObjectType.getDescribe().getLabel() + ':' + baseUrl + '/' + quo.Account__c; |
| | | //20230116 fy start |
| | | descriptionsendEmailbody += '\r\n' + Account.sObjectType.getDescribe().getLabel() + ':' + baseUrl + '/' + quo.Account__c; |
| | | //20230116 fy end |
| | | } |
| | | // 经销商询价报价委托 2020-02-28 update by vivek start |
| | | if (!String.isBlank(quo.Agency_Hospital_Link__c)) { |
| | | description += '\r\n' + Agency_Hospital_Link__c.sObjectType.getDescribe().getLabel() + ':' + baseUrl + '/' + quo.Agency_Hospital_Link__c; |
| | | //20230116 fy start |
| | | descriptionsendEmailbody += '\r\n' + Agency_Hospital_Link__c.sObjectType.getDescribe().getLabel() + ':' + baseUrl + '/' + quo.Agency_Hospital_Link__c; |
| | | //20230116 fy end |
| | | } |
| | | // 经销商询价报价委托 2020-02-28 update by vivek end |
| | | //obsap 新增经销商1字段 fy start |
| | | if (!String.isBlank(quo.Agency1_entrust__c)) { |
| | | description += '\r\n' + '第一经销商' + ':' + baseUrl + '/' + quo.Agency1_entrust__c; |
| | | //20230116 fy start |
| | | descriptionsendEmailbody += '\r\n' + '第一经销商' + ':' + baseUrl + '/' + quo.Agency1_entrust__c; |
| | | //20230116 fy end |
| | | } |
| | | //DB202302464682【报价委托】报价委托改善224 fy start |
| | | if (!String.isBlank(quo.Agency2_entrust__c)) { |
| | | description += '\r\n' + '第二经销商' + ':' + baseUrl + '/' + quo.Agency2_entrust__c; |
| | | descriptionsendEmailbody += '\r\n' + '第二经销商' + ':' + baseUrl + '/' + quo.Agency2_entrust__c; |
| | | } |
| | | //DB202302464682【报价委托】报价委托改善224 fy end |
| | | //SWAG-CKDATG【委托】【OBSAP-报价委托】报价委托项目改善1 fy start |
| | | if (!String.isBlank(tenderid)&&!description.contains('招标项目') ) { |
| | | description += '\r\n' + '招标项目' + ':' + baseUrl + '/' + tenderid; |
| | | //20230116 fy start |
| | | descriptionsendEmailbody += '\r\n' + '招标项目' + ':' + baseUrl + '/' + tenderid; |
| | | //20230116 fy end |
| | | } |
| | | //SWAG-CKDATG【委托】【OBSAP-报价委托】报价委托项目改善1 fy end |
| | | //obsap 新增经销商1字段 fy end |
| | |
| | | Task[] tasks = [select Id,Subject,OwnerId,Description,ActivityDate,QuoteIraiId__c |
| | | from Task |
| | | where QuoteIraiId__c = :quoId and OwnerId in :irai_userids]; |
| | | String todoSubject = '报价委托:' + quo.IraiSubject__c; |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy start |
| | | List<String> HeadquartersArray= quo.Headquarters__c.split('\\.'); |
| | | String Headquarters = ''; |
| | | if(HeadquartersArray.size()>0){ |
| | | Headquarters = HeadquartersArray.size()>=2 ? HeadquartersArray[1]:HeadquartersArray[0]; |
| | | } |
| | | // String todoSubject = '报价委托:' + quo.IraiSubject__c; |
| | | String todoSubject = Headquarters+'报价委托:' + quo.IraiSubject__c; |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy end |
| | | // 20230104 lt DB202212427301 start |
| | | if(quo.Urgent__c){ |
| | | todoSubject = '【紧急】' + todoSubject; |
| | | } |
| | | |
| | | // 20230104 lt DB202212427301 end |
| | | if (!String.isBlank(quo.IraiName__c)) { |
| | | todoSubject += ', ' + quo.IraiName__c; |
| | | } |
| | |
| | | // taskid = task.Id; |
| | | // } |
| | | List<String> new_task_users = new List<String>(); |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy start |
| | | List<String> taskIdL = new List<String>(); |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy end |
| | | if (tasks.size() > 0) { |
| | | List<String> task_users = new List<String>(); |
| | | for (Task task : tasks) { |
| | | task_users.add(task.OwnerId); |
| | | |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy start |
| | | taskIdL.add(task.Id); |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy end |
| | | task.Subject = todoSubject; |
| | | task.Description = description; |
| | | task.ActivityDate = Date.today(); |
| | | } |
| | | Database.DMLOptions dmlo = new Database.DMLOptions(); |
| | | dmlo.EmailHeader.triggerUserEmail = true; |
| | | Database.update(tasks, dmlo); |
| | | // update tasks; |
| | | |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy start |
| | | // Database.DMLOptions dmlo = new Database.DMLOptions(); |
| | | // dmlo.EmailHeader.triggerUserEmail = true; |
| | | // Database.update(tasks, dmlo); |
| | | update tasks; |
| | | if(taskIdL.size()>0){ |
| | | sendEmail(todoSubject,descriptionsendEmailp,descriptionsendEmailbody,taskIdL[0],Headquarters); |
| | | } |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy end |
| | | for (String uid : irai_userids) { |
| | | if (!task_users.contains(uid)) { |
| | | new_task_users.add(uid); |
| | |
| | | new_task.Description = description; |
| | | new_task.ActivityDate = Date.today(); |
| | | new_task.QuoteIraiId__c = quoId; |
| | | // 20230109 lt DB202212427301 start |
| | | if(quo.Urgent__c){ |
| | | new_task.Priority = '高'; |
| | | } |
| | | // 20230109 lt DB202212427301 start |
| | | |
| | | new_tasks.add(new_task); |
| | | } |
| | | system.debug('new_tasks++'+new_tasks); |
| | | Database.DMLOptions dmlo = new Database.DMLOptions(); |
| | | dmlo.EmailHeader.triggerUserEmail = true; |
| | | Database.insert(new_tasks, dmlo); |
| | | // insert new_tasks; |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy start |
| | | // Database.DMLOptions dmlo = new Database.DMLOptions(); |
| | | // dmlo.EmailHeader.triggerUserEmail = true; |
| | | // Database.insert(new_tasks, dmlo); |
| | | insert new_tasks; |
| | | sendEmail(todoSubject,descriptionsendEmailp,descriptionsendEmailbody,new_tasks[0].Id,Headquarters); |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy end |
| | | } |
| | | // obsap 委托人按公共小组区分,检索数量增加 2022-05-09 ssm end |
| | | |
| | |
| | | quo.LastIraiUser__c = u.Name; |
| | | QuoteIrai__c qi = new QuoteIrai__c(Id = quoId); |
| | | qi.LastIraiUser__c = quo.LastIraiUser__c; |
| | | qi.Urgent__c = quo.Urgent__c; //20230104 lt DB202212427301 shart |
| | | //报价委托状态更新 已经委托 |
| | | qi.QuoteIrai_Status__c = '已经委托'; |
| | | //DB202211607582 fy 【报价委托】报价委托页面需求 start |
| | | qi.EntrustmentDate__c = Date.today(); |
| | | //DB202211607582 fy 【报价委托】报价委托页面需求 end |
| | | update qi; |
| | | |
| | | if(String.isNotBlank(quoId)){ |
| | | // CHAN-BJQ4VZ 精琢技术 2019/12/11 Start |
| | | //XLIU-CFE8M7 【委托】【P-OBSAP】报价委托任务改善 fy Noteplus__c |
| | | //SWAG-CF589P【委托】【P:OBSAP】报价委托相关新需求评估 fy Lead__c,Opportunity__c, |
| | | quo =[ SELECT Id,Name,Cancel_Decide__c,CreatedDate, PriceRefreshDate__c,Quote_Print_Date__c,//obsap 新增经销商1字段 fy satrt Agency1_entrust__c,SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start cancelMultiyearInsurance__c, |
| | | Quote_Date__c,QuoteToName__c,Quote_Expiration_Date__c,Quote_Comment__c,Tender_information__c,Agency1_entrust__c,Noteplus__c,Lead__c,Opportunity__c,cancelMultiyearInsurance__c, |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c, |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c,Agency2_entrust__c,//DB202302464682【报价委托】报价委托改善224 fy |
| | | Print_HP_Name__c,Account__c,Agency_Hospital_Link__c,IraiUser__c,IraiSubject__c,CurrencyIsoCode,IraiName__c,QuoteIrai_Status__c,QuoteProportion__c,Note__c,IraiComment__c |
| | | , urgent__c //20230104 lt DB202212427301 |
| | | FROM QuoteIrai__c Where Id =:quoId]; |
| | | // CHAN-BJQ4VZ 精琢技术 2019/12/11 End |
| | | } |
| | | |
| | | // 招投标报价委托 2020-06-21 update by gzw start |
| | | if (!String.isBlank(quo.Tender_information__c)) { |
| | | Tender_information__c tender = new Tender_information__c(Id = quo.Tender_information__c); |
| | |
| | | if(String.isNotBlank(leadid)){ |
| | | lea.Id = leadid; |
| | | lea.OfferToEntrust__c = 1; |
| | | //20230227 lt DB202302251962 start |
| | | List<Lead> leadlist = [select Id,Firsttime_Quote_Irai__c from Lead where Id = :leadid]; |
| | | System.debug('lt123日期1'+ leadlist[0].Firsttime_Quote_Irai__c); |
| | | System.debug('lt123日期2'+ lea.Firsttime_Quote_Irai__c); |
| | | if(leadlist.size() > 0){ |
| | | if(leadlist[0].Firsttime_Quote_Irai__c == null){ |
| | | lea.Firsttime_Quote_Irai__c = Date.today(); |
| | | } |
| | | } |
| | | //20230227 lt DB202302251962 end |
| | | update lea; |
| | | } |
| | | //XLIU-CHY4KW 20220907 lt end |
| | |
| | | //XLIU-CFE8M7 【委托】【P-OBSAP】报价委托任务改善 fy Noteplus__c |
| | | //SWAG-CF589P【委托】【P:OBSAP】报价委托相关新需求评估 fy Lead__c,Opportunity__c, |
| | | qs = [select Id,Account__c,Agency_Hospital_Link__c,Name,IraiUser__c,IraiSubject__c,Tender_information__c,Agency1_entrust__c,Noteplus__c,Lead__c,Opportunity__c,cancelMultiyearInsurance__c, |
| | | Preferential_Trading_Price__c,Discount__c,Pricing__c,Unit_Price__c,Offer_Amount__c,TOTAL__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c, |
| | | Preferential_Trading_Price__c,Discount__c,Pricing__c,Unit_Price__c,Offer_Amount__c,TOTAL__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c,Agency2_entrust__c,//DB202302464682【报价委托】报价委托改善224 fy |
| | | Contract__c,Print_HP_Name__c,Quote_Expiration_Date__c,Quote_Comment__c,IraiName__c,QuoteIrai_Status__c,QuoteProportion__c,Note__c,IraiComment__c |
| | | , urgent__c //20230104 lt DB202212427301 |
| | | From QuoteIrai__c Where Id =:quoId]; |
| | | // CHAN-BJQ4VZ 精琢技术 2019/12/11 End |
| | | if (qs.size()>0){ |
| | |
| | | //obsap 新增经销商1字段 fy staty |
| | | q.Agency1_entrust__c = quo.Agency1_entrust__c; |
| | | //obsap 新增经销商1字段 fy staty |
| | | //DB202302464682【报价委托】报价委托改善224 fy start |
| | | q.Agency2_entrust__c = quo.Agency2_entrust__c; |
| | | //DB202302464682【报价委托】报价委托改善224 fy end |
| | | // SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start |
| | | q.cancelMultiyearInsurance__c = quo.cancelMultiyearInsurance__c; |
| | | // SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end |
| | |
| | | q.Quote_Expiration_Date__c = quo.Quote_Expiration_Date__c; |
| | | q.Quote_Comment__c = quo.Quote_Comment__c; |
| | | q.LastIraiUser__c = quo.LastIraiUser__c; |
| | | q.Urgent__c = quo.Urgent__c; //20230104 lt DB202212427301 shart |
| | | system.debug('标准价格2:'+qb.Estimation_List_Price); |
| | | // CHAN-BJQ4VZ 精琢技术 2019/12/10 Start |
| | | q.Estimation_List_Price__c = qb.Estimation_List_Price; |
| | |
| | | //XLIU-CFE8M7 【委托】【P-OBSAP】报价委托任务改善 fy Noteplus__c |
| | | //SWAG-CF589P【委托】【P:OBSAP】报价委托相关新需求评估 fy Lead__c,Opportunity__c, |
| | | quo =[ SELECT Id,Name,Cancel_Decide__c,CreatedDate, PriceRefreshDate__c,Quote_Print_Date__c,//obsap 新增经销商1字段 fy satrt Agency1_entrust__c,SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start cancelMultiyearInsurance__c, |
| | | Quote_Date__c,QuoteToName__c,Quote_Expiration_Date__c,Quote_Comment__c,Tender_information__c,Agency1_entrust__c,Noteplus__c,Lead__c,Opportunity__c,cancelMultiyearInsurance__c, |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c, |
| | | Quote_Date__c,QuoteToName__c,Quote_Expiration_Date__c,Quote_Comment__c,Tender_information__c,Agency1_entrust__c,Noteplus__c,Lead__c,Opportunity__c,cancelMultiyearInsurance__c,Headquarters__c,//DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy Headquarters__c |
| | | TOTAL__c,Discount__c,Pricing__c,Preferential_Trading_Price__c,Contract__c,LastIraiUser__c,MultiYearWarrantyTotalPrice__c,QuoteTotal_Page__c,Estimation_List_Price__c,Agency2_entrust__c,//DB202302464682【报价委托】报价委托改善224 fy |
| | | Print_HP_Name__c,Account__c,Agency_Hospital_Link__c,IraiUser__c,IraiSubject__c,CurrencyIsoCode,IraiName__c,QuoteIrai_Status__c,QuoteProportion__c,Note__c,IraiComment__c |
| | | , urgent__c //20230104 lt DB202212427301 |
| | | FROM QuoteIrai__c Where Id =:q.Id]; |
| | | |
| | | system.debug('○○○○○Save1○○○○○'); |
| | |
| | | return str; |
| | | } |
| | | //SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 end |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy start |
| | | private static void sendEmail(String title , String bodyTextp , String bodyTextbody,String TaskId,String Headquarters) { |
| | | system.debug('bodyText++'+bodyTextp+bodyTextbody); |
| | | bodyTextbody = bodyTextbody.replaceFirst('\r\n', ''); |
| | | List<Task> TaskList = [select Id,Request_staff__c,ActivityDate,Priority from Task where Id =:TaskId]; |
| | | Task Taskobj = TaskList[0]; |
| | | //20230116 fy start |
| | | String bodyTextbu ='新建任务'; |
| | | bodyTextbu += '\r\n\r\n'+'到:OBSAP成员'; |
| | | if(String.isNotBlank(Headquarters)){ |
| | | Headquarters='('+Headquarters+')'; |
| | | } |
| | | bodyTextbu += '\r\n'+Taskobj.Request_staff__c +Headquarters+' 已分配给您以下新建任务:'; |
| | | bodyTextbu += '\r\n'+'主题: '+title; |
| | | bodyTextbu += '\r\n'+'结束期限: '+Taskobj.ActivityDate; |
| | | bodyTextbu += '\r\n'+'优先级: '+Taskobj.Priority; |
| | | bodyTextbu += '\r\n' +'评论:<pre>'+bodyTextp+'</pre>'; |
| | | bodyTextbu += bodyTextbody; |
| | | bodyTextbu += '\r\n\r\n' +'有关更多详细信息,请单击以下链接:'+'\r\n\r\n'+'https://ocsm.my.salesforce.com/'+Taskobj.Id; |
| | | bodyTextbu = bodyTextbu.replace('\r\n', '<br/>'); |
| | | bodyTextbu = bodyTextbu.replaceFirst('<br/>', ''); |
| | | System.debug('bodyTextbu+++'+bodyTextbu); |
| | | //20230116 fy end |
| | | Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); |
| | | List<String> toAddresses = new List<String>(); |
| | | toAddresses.add(System.Label.OBSAP_Group_Mail); |
| | | // toAddresses.add('fuyu@prec-tech.com'); |
| | | //收件人地址 |
| | | mail.setToAddresses(toAddresses); |
| | | String Detection = System.Label.OBSAP_QuoteIrai_Mail_Detection; |
| | | if(!Detection.equals('invalid') && String.isNotBlank(Detection)){ |
| | | String[] toccAddresses = System.Label.OBSAP_QuoteIrai_Mail_Detection.split(','); |
| | | //抄送人地址 |
| | | mail.setCcAddresses(toccAddresses); |
| | | } |
| | | //邮件主题 |
| | | mail.setSubject(title); |
| | | //内容的编码 |
| | | mail.setCharset('UTF-8'); |
| | | //邮件内容 |
| | | mail.setHtmlBody(bodyTextbu); |
| | | //使用电子邮件模板设置对象id |
| | | // mail.setTargetObjectId(TaskId); |
| | | //设置电子邮件模板id |
| | | // EmailTemplate temp = [ |
| | | // SELECT Id, Name, Subject, HtmlValue, Body, BrandTemplateId |
| | | // FROM EmailTemplate |
| | | // WHERE DeveloperName = 'Task_To_Queue' |
| | | // LIMIT 1 |
| | | // ]; |
| | | // mail.setTemplateId(temp.Id); |
| | | //发送邮件 |
| | | Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); |
| | | } |
| | | //DB202301106714 【报价委托改善】OBSAP通知邮件发送邮箱修改 fy end |
| | | |
| | | // CHAN-BJQ4VZ 精琢技术 2019/12/11 Start |
| | | public class QuoteBean { |
| | |
| | | public Decimal NoDiscount_Page { get; set; } |
| | | public Decimal NoDiscountTotal_Page { get; set; } |
| | | // CHAN-BHNBX6 2019/11/20 END |
| | | |
| | | // SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start |
| | | public String CanNotCancelledGurantee { get; set; } |
| | | // SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end |
| | | |
| | | // TODO ほんとうはいらない、使うところのロジックを修正しなければいけない、削除するようにしたいです。 |
| | | public QELine(Integer i) { |
| | |
| | | } |
| | | |
| | | // CHAN-BHNBX6 2019/11/20 END |
| | | // SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start |
| | | this.CanNotCancelledGurantee = qli.CanNotCancelledGurantee__c?'true':'false'; |
| | | // SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end |
| | | } |
| | | |
| | | // TODO Subtotal__c、以前のロジックを確認 |
| | |
| | | controller.quo.IraiComment__c = 'テスト03'; |
| | | controller.quo.QuoteProportion__c = 10; |
| | | controller.quo.IraiUser__c = user.Id; |
| | | controller.quo.cancelMultiyearInsurance__c = '不要'; |
| | | |
| | | controller.activities[0].lineNo = 0; |
| | | controller.activities[0].Asset_Model = '00107'; |
| | |
| | | // System.assertEquals(null, controller.activities[0].Asset_Model); |
| | | |
| | | controller.quo.IraiSubject__c = 'テスト05'; |
| | | controller.quo.cancelMultiyearInsurance__c = '不要'; |
| | | |
| | | controller.excel_text = '00103\t10'; |
| | | controller.excelImport(); |
| | |
| | | // CHAN-BHNBX6 2019/11/25 END |
| | | |
| | | controller.quoteIrai(); |
| | | |
| | | System.test.startTest(); |
| | | QuoteIrai__c[] irais2 = [select Id, Note__c,Name, IraiUser__c, IraiSubject__c, CurrencyIsoCode from QuoteIrai__c where IraiSubject__c = 'テスト05']; |
| | | QuoteIraiLineItem__c[] items2 = [select Id, Asset_Model_No__c, SFDA_Status__c, Name__c,Quantity__c, ListPrice__c, ProductCode__c,Product2__c,ServicePrice__c,GuaranteePeriod__c from QuoteIraiLineItem__c where QuoteIrai__c = :irais2[0].Id order by Item_Order__c]; |
| | | |
| | |
| | | // System.assertEquals(true, controller.errorflg); |
| | | // System.assertEquals('停止', controller.activities[0].pageObject.SFDA_Status__c); |
| | | // System.assertEquals('00103:软管接头123', controller.activities[0].pageObject.Name__c); |
| | | System.test.stopTest(); |
| | | } |
| | | |
| | | //其他单体函数 |
| | |
| | | <apex:page controller="NewQuoteIraiController" sidebar="false" action="{!init}" id="Page" > |
| | | <apex:page controller="NewQuoteIraiController" sidebar="false" action="{!init}" id="Page" lightningStylesheets="true"> |
| | | <apex:stylesheet value="{!URLFOR($Resource.jquerysuggestcss)}"/> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | |
| | | alert('请选择对应的营业助理.'); |
| | | unblockUI(); |
| | | } |
| | | else if (window.confirm('确定要委托该人员吗?\n' + mail)) { |
| | | QuoteIrai(); |
| | | } else { |
| | | unblockUI(); |
| | | // 20230104 lt DB202212427301 start 注释 |
| | | // else if (window.confirm('确定要委托该人员吗?\n' + mail)) { |
| | | // QuoteIrai(); |
| | | // } |
| | | // 20230104 lt DB202212427301 end |
| | | else { |
| | | QuoteIrai(); // 20230104 lt DB202212427301 end |
| | | // unblockUI(); // 20230104 lt DB202212427301 end |
| | | } |
| | | } else { |
| | | alert('请选择委托人员.'); |
| | |
| | | <td style="text-align:center;width:20px;"><apex:selectList value="{!quo.IraiUser__c}" size="1" style="width:120px" id="IraiUser" onchange="ObsapUsersChange()"><apex:selectOptions value="{!ObsapUsers}" id="obsapUsersList"/></apex:selectList></td> |
| | | </apex:variable> |
| | | |
| | | <!-- 20230104 lt DB202212427301 start--> |
| | | <!-- <th style="text-align:right;width:80px;">{!$ObjectType.QuoteIrai__c.fields.LastIraiUser__c.Label}</th> |
| | | <td style="text-align:center;width:70px;"><apex:outputField id="LastIraiUser" value="{!quo.LastIraiUser__c}"/></td> --> |
| | | <!-- 20230104 lt DB202212427301 end--> |
| | | |
| | | <th style="text-align:right;width:80px;">{!$ObjectType.QuoteIrai__c.fields.LastIraiUser__c.Label}</th> |
| | | <td style="text-align:center;width:70px;"><apex:outputField id="LastIraiUser" value="{!quo.LastIraiUser__c}"/></td> |
| | | <!-- 20230104 lt DB202212427301 start--> |
| | | <th style="text-align:right;width:190px;">紧急:</th> |
| | | <td style="text-align:center;width:10px;"><apex:inputField id="Urgent" value="{!quo.Urgent__c}"/></td> |
| | | <!-- 20230104 lt DB202212427301 end--> |
| | | |
| | | <!-- 2020/02/18 精琢技术 韩部长提出先隐藏 没必要 Start--> |
| | | <!-- <th style="text-align:right;width:70px;">总计</th> |
| | | <td style="text-align:right;width:80px;"> |
| | |
| | | </tr> |
| | | <tr> |
| | | <td style="text-align:right;width:50px;"></td> |
| | | <th style="text-align:right;width:50px;" rowspan="2"> |
| | | <th style="text-align:right;width:50px;" rowspan="3"> |
| | | {!$ObjectType.QuoteIrai__c.fields.MultiYearWarrantyTotalPrice__c.Label} |
| | | : </th> |
| | | <!-- <td style="width:470px;"> --> |
| | | <!--obsap 新增经销商1字段 fy start--> |
| | | <td style="width:10px;" rowspan="2"> |
| | | <td style="width:100px;" rowspan="3"> |
| | | <!--obsap 新增经销商1字段 fy end--> |
| | | <apex:outputtext id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}" |
| | | <apex:outputtext style="width: :100px" id="MultiYearWarrantyTotalPrice_out" value="{0, number, ###,##0.00}" |
| | | > |
| | | <!--obsap 新增经销商1字段 fy start--> |
| | | <!-- style="text-align:right;width:180px;"> --> |
| | |
| | | <th style="width:100px;text-align:right;">{!$Label.Sales_Name1}</th> |
| | | <td colspan="2" style="width:260px;text-align:right;"><apex:inputField style="width:230px;" id="SalesName1" value="{!quo.Agency1_entrust__c}" onChange=""/></td> |
| | | <!-- SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy start --> |
| | | <th style="width:100px;text-align:right;">取消多年保</th> |
| | | <td colspan="2" style="text-align:left;"><apex:inputField id="cancelMultiyearInsurance" value="{!quo.cancelMultiyearInsurance__c}" /></td> |
| | | <th style="width:100px;text-align:right;">多年保</th> |
| | | <!-- DB202212304166 【紧急-报价委托与购买意向】请将最后操作的报价委托状态放到购买意向中 fy start --> |
| | | <td colspan="2" style="text-align:left;"><apex:inputField id="cancelMultiyearInsurance" value="{!quo.cancelMultiyearInsurance__c}" onChange="cancelMultiyearInsurancechange()"/></td><!-- onChange="cancelMultiyearInsurancechange()"--> |
| | | <!-- DB202212304166 【紧急-报价委托与购买意向】请将最后操作的报价委托状态放到购买意向中 fy end --> |
| | | <!-- SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end --> |
| | | </tr> |
| | | <!--obsap 新增经销商1字段 fy end--> |
| | | <!--DB202302464682【报价委托】报价委托改善224 fy start--> |
| | | <tr> |
| | | <td ></td> |
| | | <td ></td> |
| | | <td ></td> |
| | | <th style="width:100px;text-align:right;">{!$Label.Sales_Name2}</th> |
| | | <td colspan="2" style="width:260px;text-align:right;"><apex:inputField style="width:230px;" id="SalesName2" value="{!quo.Agency2_entrust__c}" onChange=""/></td> |
| | | <th style="width:100px;text-align:right;"></th> |
| | | <td colspan="2" style="text-align:left;"></td> |
| | | </tr> |
| | | <!--DB202302464682【报价委托】报价委托改善224 fy end--> |
| | | <tr> |
| | | <td> </td> |
| | | </tr> |
| | |
| | | <!-- 产品编号--> |
| | | <apex:column style="text-align:center;width:150px;"> |
| | | <apex:inputText id="Assert" style="width:120px;" value="{!s.Asset_Model}" onclick="searchProduct('{!s.lineNo}',this.value)" /> |
| | | <!-- DB202212304166 【紧急-报价委托与购买意向】请将最后操作的报价委托状态放到购买意向中 fy start --> |
| | | <apex:inputHidden id="CanNotCancelledGurantee__c" value="{!s.CanNotCancelledGurantee}" /> |
| | | <!-- DB202212304166 【紧急-报价委托与购买意向】请将最后操作的报价委托状态放到购买意向中 fy start --> |
| | | </apex:column> |
| | | <!-- NMPA状态 --> |
| | | <apex:column style="width:100px;text-align:center;"> |
| | |
| | | <apex:outputPanel layout="none" rendered="{!!$ObjectType.QuoteIraiLineItem__c.fields.ServicePrice__c.accessible}" > |
| | | <span style="width:80px;text-align:right;" id="Page:mainForm:block:lists:{!s.lineNo}:NoDiscountTotalText">{!IF(s.PageObject.Product2__c == null, ' ', 0.00)}</span> |
| | | <script type="text/javascript"> |
| | | debugger |
| | | j$(escapeVfId('Page:mainForm:block:lists:'+ {!s.lineNo} + ':NoDiscountTotal')).val(toNum(0)); |
| | | </script> |
| | | </apex:outputPanel> |
| | | |
| | | |
| | | </apex:column> |
| | | <!-- DB202212304166 【紧急-报价委托与购买意向】请将最后操作的报价委托状态放到购买意向中 fy start --> |
| | | <!-- <apex:column style="width:100px;text-align:right;"> |
| | | <apex:outputPanel layout="none" rendered="{!IF(quo.cancelMultiyearInsurance__c =='要' ||(quo.cancelMultiyearInsurance__c =='不要' && s.CanNotCancelledGurantee == 'true' ),true,false)}" > |
| | | <apex:outputText style="width:80px;" id="NoDiscountTotalText" value="{0, number, ###,##0.00}"> |
| | | <apex:param value="{!s.NoDiscountTotal_Page}" /> |
| | | </apex:outputText> |
| | | </apex:outputPanel> |
| | | <apex:inputHidden id="NoDiscountTotal" value="{!s.NoDiscountTotal_Page}"/> |
| | | <apex:inputHidden id="NoDiscount" value="{!s.NoDiscount_Page}"/> |
| | | <apex:outputPanel layout="none" rendered="{!IF(quo.cancelMultiyearInsurance__c =='不要'&& s.CanNotCancelledGurantee == 'false' ,true,false)}" > |
| | | <span style="width:80px;text-align:right;" id="Page:mainForm:block:lists:{!s.lineNo}:NoDiscountTotalText">{!IF(s.PageObject.Product2__c == null, ' ', 0.00)}</span> |
| | | <script type="text/javascript"> |
| | | j$(escapeVfId('Page:mainForm:block:lists:'+ {!s.lineNo} + ':NoDiscountTotal')).val(toNum(0)); |
| | | </script> |
| | | </apex:outputPanel> |
| | | </apex:column> --> |
| | | <!-- DB202212304166 【紧急-报价委托与购买意向】请将最后操作的报价委托状态放到购买意向中 fy end --> |
| | | <!-- CHAN-BHNBX6 NodisCount 小计 2019/11/20 END --> |
| | | </apex:pageBlockTable> |
| | | </div> |
| | |
| | | <td style="width:100px;" align="right"><apex:commandButton id="QuoteIraiBtn" action="{!checkIraiUser}" reRender="IraiUserId,message1" onclick="blockme();" oncomplete="iraiJs();return false;" value="发送委托邮件" style="width:90px;" disabled="{!Save_button}"/></td> |
| | | <!-- SWAG-CKDATG 【委托】【OBSAP-报价委托】报价委托项目改善1 fy end --> |
| | | <td style="width:100px;" align="right"><apex:commandButton action="{!checkIraiUser}" reRender="IraiUserId,hiddenQuoid,message1" onclick="blockme();" oncomplete="save2btn();return false;" value="{!$Label.Save_Button}" style="width:90px;" disabled="{!Save_button}" /></td> |
| | | <td style="width:100px;" align="right"><apex:commandButton onclick="oppReflection2btn();return false;" rerender="hiddenQuoid" value="{!$Label.Opp_Button}" style="width:90px;" disabled="{!Save_button}"/></td> |
| | | <!-- 20230109 lt DB202212427301 start 注释 --> |
| | | <!-- <td style="width:100px;" align="right"><apex:commandButton onclick="oppReflection2btn();return false;" rerender="hiddenQuoid" value="{!$Label.Opp_Button}" style="width:90px;" disabled="{!Save_button}"/></td> |
| | | <td style="width:100px;" align="right"><apex:commandButton action="{!Back}" rerender="hiddenQuoid" value="不保存(返回)" style="width:90px;"/></td> |
| | | <td style="width:100px;" align="right"><apex:commandButton value="产品试用评价OPD" style="width:95px;" onclick="openpdf('OPD');return false;" disabled="{!pdf_button}"/></td> |
| | | <td style="width:100px;" align="right"><apex:commandButton value="产品试用评价SIS" style="width:95px;" onclick="openpdf('SIS');return false;" disabled="{!pdf_button}"/></td> |
| | | <td style="width:100px;" align="right"><apex:commandButton value="产品试用评价SIS" style="width:95px;" onclick="openpdf('SIS');return false;" disabled="{!pdf_button}"/></td> --> |
| | | <!-- 20230109 lt DB202212427301 end 注释 --> |
| | | </tr> |
| | | </table> |
| | | </td> |