From 1b214a96d371ce90578fb7d6c14eecfcba5f87f0 Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期一, 11 四月 2022 18:52:32 +0800
Subject: [PATCH] Sfdc2PoContactBatch修改
---
force-app/main/default/pages/UploadPdf.page | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/pages/UploadPdf.page b/force-app/main/default/pages/UploadPdf.page
index cc9e50b..6759466 100644
--- a/force-app/main/default/pages/UploadPdf.page
+++ b/force-app/main/default/pages/UploadPdf.page
@@ -23,7 +23,6 @@
var fileObject = document.getElementById("page:theForm:block:uploadSection:file");
var reader = new FileReader();
var data = reader.readAsDataURL(fileObject.files[0]);
- debugger
console.log(event);
}
function getBase64(file) {
@@ -79,7 +78,10 @@
"sfRecordId":"",
"isSuccess":isSuccess
}), function(result){
- window.location.reload();
+ console.log("confirmTrans-" + JSON.stringify(data));
+ document.getElementById("file").files[0].name = '';
+ enableButtonStatus();
+ refreshFiles();
}, staticResources.token);
}
@@ -89,6 +91,7 @@
}
}
function uploadFileToAWS(data, size, fileName) {
+
console.log("body=" + JSON.stringify({ 'file': data, "size": size, 'fileName': fileName }));
AWSService.post(uploadUrl, JSON.stringify({
'file': data,
@@ -96,7 +99,7 @@
'fileName': fileName })
, function(result){
console.log("result" + JSON.stringify(result));
-
+
if (result.success == true) {
key = result.object;
@@ -117,11 +120,11 @@
confirmTrans(result.txId, 1);
}
- // window.location.reload();
+ window.location.reload();
},
{ escape: true }
);
-
+
console.log('key' + key);
} else {
alertErrorMessage('涓婁紶澶辫触璇风◢鍚庡啀璇曪紒');
@@ -195,7 +198,7 @@
}
</style>
<apex:form id="theForm">
- <apex:actionFunction name="refreshFiles" action="{!refreshFiles}" reRender="pdf,uploadSection"/>
+ <apex:actionFunction name="refreshFiles" action="{!refreshFiles}" reRender="pdf,theForm"/>
<br/>
<br/>
<apex:pageBlock id="block">
--
Gitblit v1.9.1