From cdff37596ef14a95a3e557b0d978f50140410308 Mon Sep 17 00:00:00 2001 From: 涂煌豪 <tuhuanghao@prec-tech.com> Date: 星期二, 10 五月 2022 16:17:59 +0800 Subject: [PATCH] 【委托】URF限次修理合同的最高价格修改 --- 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