From f7dffb669b42852e90ff91b6362a07e3a88945b0 Mon Sep 17 00:00:00 2001
From: fuyu <fuyu@prec-tech.com>
Date: 星期四, 05 一月 2023 14:37:17 +0800
Subject: [PATCH] 进口单证补充
---
force-app/main/default/classes/eSignHomePageController.cls | 39 ++++++++++++-
force-app/main/default/aura/eSignHomePage/eSignHomePageHelper.js | 53 +++++++++++++++--
force-app/main/default/aura/eSignHomePage/eSignHomePage.cmp | 56 +++++++++++++++++-
force-app/main/default/aura/eSignHomePage/eSignHomePageController.js | 13 +++-
4 files changed, 145 insertions(+), 16 deletions(-)
diff --git a/force-app/main/default/aura/eSignHomePage/eSignHomePage.cmp b/force-app/main/default/aura/eSignHomePage/eSignHomePage.cmp
index 7f781c4..0520695 100644
--- a/force-app/main/default/aura/eSignHomePage/eSignHomePage.cmp
+++ b/force-app/main/default/aura/eSignHomePage/eSignHomePage.cmp
@@ -57,6 +57,9 @@
<aura:attribute name="buttonGroup" type="Boolean" default="false" />
<aura:attribute name="eSignForm" type="object" />
<aura:attribute name="DNName" type="string" default="" />
+ <!-- 杩涘彛鍗曡瘉 fy start -->
+ <aura:attribute name="DNId" type="string" default="" />
+ <!-- 杩涘彛鍗曡瘉 fy end -->
<aura:attribute name="errorMessage" type="String" description="澶辫触娑堟伅" />
<!-- 鍒ゆ柇鐩撮攢杩樻槸鍒嗛攢 -->
<aura:attribute name="isDirectSales" type="Boolean" default="" description="鍒ゆ柇鐩撮攢杩樻槸鍒嗛攢" />
@@ -95,6 +98,7 @@
<aura:attribute name="QRWidth" type="String" description="鐢ㄦ潵浠庣埗瀵硅薄鎺ユ敹浼犻�掕繃鏉ョ殑灞忓箷瀹藉害" default="" />
<aura:attribute name="QRHeight" type="String" description="鐢ㄦ潵浠庣埗瀵硅薄鎺ユ敹浼犻�掕繃鏉ョ殑灞忓箷瀹藉害" default="" />
<aura:attribute name="ShowDNNameQR" type="String" description="鍒ゆ柇杩斿洖鏄惁鍙互鎵撳嵃" default="" />
+ <aura:attribute name="AttachmentDisplayflag" type="boolean" default="false" />
<!-- 杩斿洖棣栭〉 start -->
<aura:attribute name="agencyDNSignUpStatus" type="String" default="" description="DN绛炬敹鐘舵��(缁忛攢鍟�)" />
@@ -170,7 +174,7 @@
<div class="slds-float_center" style="text-align:left">
<tr>
<!-- style="{!'padding-left:'+v.floatWidth*0.2+'px;'}" 璇烽�夋嫨鎮ㄩ渶瑕佺鏀剁殑-->
- <td align="left">鍏辫{!v.lineItemSize}鍗曘�侱N鍙�(妯$硦妫�绱�)
+ <td align="left">鍏辫{!v.lineItemSize}鍗曘�侱N鍙�/鍚堝悓鍙锋绱�(妯$硦妫�绱�)
<input id="searchInput" lightning-input_input="" type="text" class="slds-input" value="{!v.searchCase}" name="" onchange="{!c.searchByDNName}" style="{!'width:'+v.floatWidth*0.3+'px;'}" />
</td>
@@ -186,7 +190,8 @@
</div>
</div>
<div id="allDiv" style="{!'width:'+v.floatWidth+'px;overflow-x:scroll;'}">
- <div id="in" style=" width:1012px;margin-right: 4px; ">
+ <!-- 澧炲姞鍒楃殑鏃跺�欒寰楄皟璇曡繖涓搴� -->
+ <div id="in" style=" width:1121px;margin-right: 4px; ">
<!-- 鏄剧ず鍦ㄦ槑缁嗛〉鐨勫綋鍓嶆槑缁嗙殑琛ㄦ牸 -->
<div id="inTable">
<!-- <lightning:card> -->
@@ -279,6 +284,22 @@
</th>
+ <!-- 绗竷鍒� 杩涘彛鍗曡瘉鏄庣粏 fy-->
+ <!-- 杩涘彛鍗曡瘉 fy start -->
+ <th class="slds-is-resizable" tabindex="-1" data-label="杩涘彛鍗曡瘉鏄庣粏" scope="row" style="width: 110px;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>
+ <!-- 杩涘彛鍗曡瘉 fy end -->
<!-- 绗竷鍒� 浜岀淮鐮� -->
<th class="slds-is-resizable" tabindex="-1" data-label="鍖婚櫌绛炬敹浜岀淮鐮�" scope="row" style="width: 140px;height: 35px;text-align: center;">
@@ -412,10 +433,29 @@
</th>
+ <!-- 琛岄」鐩� 绗洓鍒� 杩涘彛鍗曡瘉鏄庣粏 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="https://ocsm stagefull.sandbox.file.force.com/servlet/servlet.FileDownload?file=00P1000001QkhvQ">{!curr.AttachmentName}</a> -->
+ </div>
+ </span>
+
+
+
+ </th>
+ <!-- 杩涘彛鍗曡瘉 fy end -->
<!-- 琛岄」鐩� 绗竷鍒� 鍖婚櫌绛炬敹浜岀淮鐮�-->
<th class="slds-is-resizable" tabindex="-1" data-label="" scope="row" style="text-align: center;">
- <button id="{!curr.skip_Hospital_Sign__c}" tabindex="-1" class="slds-button ReturnButton" name="{!curr.DNNameNo0__c}" style="width: 40px;" value="{!curr.agencySignUpDate__c}" onclick="{!c.showESignQR}">鏌ョ湅</button>
+ <button id="{!curr.skip_Hospital_Sign__c}" tabindex="-1" class="slds-button ReturnButton" name="{!curr.DNNameNo0__c}" style="width: 40px;" value="{!IF(curr.skip_Distribution_Sign__c, 'true', curr.agencySignUpDate__c)}" onclick="{!c.showESignQR}">鏌ョ湅
+ </button>
</th>
@@ -637,4 +677,14 @@
</aura:if>
<!-- </div> -->
+ <!-- 杩涘彛鍗曡瘉 fy start -->
+ <aura:if isTrue="{!v.AttachmentDisplayflag}">
+ <!-- 鍖婚櫌纭 -->
+ <label style="float: left;font-size:20px">杩涘彛鍗曡瘉鏄庣粏</label>
+ <lightning:button variant="neutral" label="杩斿洖" title="Cancel" onclick="{! c.rebackDNListPage }" />
+ <!-- <lightning:button variant="neutral" onclick="{!c.rebackDNListPage}">杩斿洖</button> -->
+ <c:AttachmentDisplay DNId="{!v.DNId}" />
+
+ </aura:if>
+ <!-- 杩涘彛鍗曡瘉 fy end -->
</aura:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/eSignHomePage/eSignHomePageController.js b/force-app/main/default/aura/eSignHomePage/eSignHomePageController.js
index 607eb8d..7fc829b 100644
--- a/force-app/main/default/aura/eSignHomePage/eSignHomePageController.js
+++ b/force-app/main/default/aura/eSignHomePage/eSignHomePageController.js
@@ -2,8 +2,8 @@
* @Description:
* @Author: wql
* @Date: 2021-05-24 09:45:19
- * @LastEditTime: 2021-08-03 15:44:33
- * @LastEditors:
+ * @LastEditTime: 2022-11-07 17:40:15
+ * @LastEditors: Thhto 997058689@qq.com
*/
({
init: function(cmp, event, helper) {
@@ -81,6 +81,13 @@
},
testIn: function(cmp, event, helper) {
helper.testIn(cmp, event);
+ },
+ // 杩涘彛鍗曡瘉 fy start
+ showAttachmentDisplay: function(cmp, event, helper) {
+ helper.showAttachmentDisplay(cmp, event);
+ },
+ rebackDNListPage: function(cmp, event, helper) {
+ helper.rebackDNListPage(cmp, event);
}
-
+ // 杩涘彛鍗曡瘉 fy end
})
\ No newline at end of file
diff --git a/force-app/main/default/aura/eSignHomePage/eSignHomePageHelper.js b/force-app/main/default/aura/eSignHomePage/eSignHomePageHelper.js
index bb2bfe6..0ed8a50 100644
--- a/force-app/main/default/aura/eSignHomePage/eSignHomePageHelper.js
+++ b/force-app/main/default/aura/eSignHomePage/eSignHomePageHelper.js
@@ -528,16 +528,31 @@
//濡傛灉绛炬敹鍗曞綍鍏ヨ〃鏈夋暟鎹紝鍏堝彇褰曞叆琛ㄧ殑鍚﹀垯灏辨绱㈢鏀跺崟淇℃伅
var result;
//瀛樻斁褰曞叆琛╨ist
- var eSignFormEntryList;
+ var eSignFormEntryList=[];
//瀛樻斁绛炬敹鍗昹ist
- var eSignFormList;
+ var eSignFormList=[];
+ //fy 20220727 start
+ //瀛樻斁闄勪欢鍚�
+ var AttachmentMap = new Map();
+ //fy 20220727 end
if (res) {
- if (res.eSignFormEntryList != null) {
+ if (res.eSignFormEntryList != undefined) {
eSignFormEntryList = res.eSignFormEntryList;
}
- if (res.eSignFormList != null) {
+ if (res.eSignFormList != undefined) {
eSignFormList = res.eSignFormList;
}
+ //fy 20220727 start
+ if (res.AttachmentStringList!=undefined) {
+ for(var i = 0; i < res.AttachmentStringList.length; i++){
+ var liststr=[];
+ liststr=res.AttachmentStringList[i].split('_');
+ if(liststr.length>0){
+ AttachmentMap.set(liststr[0],liststr[1]);
+ }
+ }
+ }
+ //fy 20220727 end
var today = this.getNowFormatDate();
if (eSignFormEntryList) {
for (var i = 0; i < eSignFormList.length; i++) {
@@ -583,6 +598,18 @@
}
var pageSize = cmp.get('v.pageSize');
+ //fy 20220727 start
+ debugger
+ if(res){
+ if(AttachmentMap.size>0){
+ for(var i = 0; i < result.length; i++){
+ if(AttachmentMap.has(result[i].Id)){
+ result[i].AttachmentName=AttachmentMap.get(result[i].Id);
+ }
+ }
+ }
+ }
+ //fy 20220727 end
cmp.set("v.data", result);
var data = result;
cmp.set("v.lineItemSize", data.length);
@@ -1129,7 +1156,7 @@
},
//js 妯$硦妫�绱�
filterByName: function(aim, name) {
- return aim.filter(item => item.DNNameNo0__c.match(name));
+ return aim.filter(item => item.DNNameNo0__c.match(name)||item.ContractNO__c.match(name));
},
openESignPage: function(cmp, event) {
//鑾峰彇鎸夐挳涓睘鎬ame == 鑾峰彇鍙傛暟 绠卞彿
@@ -1405,8 +1432,20 @@
});
$A.enqueueAction(action);
+ },
+ // 杩涘彛鍗曡瘉 fy start
+ showAttachmentDisplay: function(cmp, event) {
+ debugger
+ var DNId = event.target.name;
+ cmp.set('v.DNId', DNId);
+ cmp.set('v.AttachmentDisplayflag', true);
+ cmp.set('v.DNListPage', false);
+ },
+ rebackDNListPage: function(cmp, event) {
+ debugger
+ cmp.set('v.AttachmentDisplayflag', false);
+ cmp.set('v.DNListPage', true);
}
-
-
+ // 杩涘彛鍗曡瘉 fy end
})
\ No newline at end of file
diff --git a/force-app/main/default/classes/eSignHomePageController.cls b/force-app/main/default/classes/eSignHomePageController.cls
index 5e7760d..59a3d68 100644
--- a/force-app/main/default/classes/eSignHomePageController.cls
+++ b/force-app/main/default/classes/eSignHomePageController.cls
@@ -137,7 +137,6 @@
} catch (Exception ex) {
return null;
}
-
//new
eSignWrapperList eWList = new eSignWrapperList();
//鍏堝垽鏂湁娌℃湁涓棿琛� 娌℃湁鍒欒祴鍊间负绌�
@@ -153,8 +152,30 @@
}else{
eWList.eSignFormEntryList = null;
}
-
+ system.debug('ceshi4+++'+tempEsignFormList);
if(tempEsignFormList.size() > 0){
+ //fy 20220727 start
+ List<Id> eSignFormId = new List<Id>();
+ for(eSignForm__c es:tempEsignFormList){
+ eSignFormId.add(es.Id);
+ }
+ List<Attachment> AttachmentList= new List<Attachment>();
+ AttachmentList =[select Id,name,ParentId from Attachment where ParentId in:eSignFormId];
+ Map<String,String> AttachmentMap = new Map<String,String>();
+ List<String> AttachmentStringList = new List<String>();
+ if(AttachmentList.size() > 0){
+ for(Attachment Att:AttachmentList){
+ AttachmentMap.put(Att.ParentId, Att.ParentId+'_'+Att.name);
+ }
+ for (String value : AttachmentMap.values()) {
+ AttachmentStringList.add(value);
+ }
+ }
+
+ system.debug('ceshi1+++'+AttachmentList);
+ system.debug('ceshi2+++'+AttachmentStringList);
+ system.debug('ceshi3+++'+eSignFormId);
+ //fy 20220727 end
for(eSignForm__c esf:tempEsignFormList){
if(esf.endUser__c =='濂戠磩'){
esf.Hospital_Name_Text__c = esf.CustomerNameContract__c;
@@ -163,6 +184,11 @@
}
}
eWList.eSignFormList = tempEsignFormList;
+ //fy 20220727 start
+ if(AttachmentStringList.size()>0){
+ eWList.AttachmentStringList = AttachmentStringList;
+ }
+ //fy 20220727 end
}else{
eWList.eSignFormList = null;
}
@@ -219,6 +245,7 @@
//鍒ゆ柇浼犲叆鐨勭被鍨�
@AuraEnabled
public String entryType;
+
public eSignWrapper(Boolean isAgencySubmit,Boolean isHPSubmit,String entryType){
eSignFormEntry = new eSignFormEntry__c();
eSignForm = new eSignForm__c();
@@ -236,10 +263,16 @@
@AuraEnabled
public List<eSignForm__c> eSignFormList;
-
+ //fy 20220727 start
+ @AuraEnabled
+ public List<String> AttachmentStringList;
+ //fy 20220727 end
public eSignWrapperList(){
eSignFormEntryList = new List<eSignFormEntry__c>();
eSignFormList = new List<eSignForm__c>();
+ //fy 20220727 start
+ List<String> AttachmentStringList = new List<String>();
+ //fy 20220727 end
}
}
--
Gitblit v1.9.1