From 744f42c5496e656a1f9927740a3b37c0b97a6cba Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 14:34:12 +0800
Subject: [PATCH] lexcommunityupload0714
---
force-app/main/default/pages/CustomDeleteVF.page | 120 ++++++++++++++++++++++++++++++------------------------------
1 files changed, 60 insertions(+), 60 deletions(-)
diff --git a/force-app/main/default/pages/CustomDeleteVF.page b/force-app/main/default/pages/CustomDeleteVF.page
index 13c585b..7dc04cd 100644
--- a/force-app/main/default/pages/CustomDeleteVF.page
+++ b/force-app/main/default/pages/CustomDeleteVF.page
@@ -1,75 +1,75 @@
-<apex:page standardController="Repair__c">
+<apex:page standardController="Repair__c" lightningStylesheets="true" >
-<script src="/soap/ajax/51.0/connection.js" type="text/javascript"></script>
-<script src="/soap/ajax/51.0/apex.js" type="text/javascript"></script>
+<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
+<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
<div id="ivtDifferenceDetail" style="position: relative; margin-top: 20px; margin-left: 20px;font-size: 23px;"></div>
<div id="ivtDifferenceDetailBack" style="position: relative; display:none; margin-top: 20px; margin-left: 20px;font-size: 23px;">
- <a style="font-size: 18px;">璇风偣鍑�</a>
- <a href="javascript: history.go(-1)" style="color: blue;font-size: 20px;">杩斿洖</a><br/>
+ <a style="font-size: 18px;">璇风偣鍑�</a>
+ <a href="javascript: history.go(-1)" style="color: blue;font-size: 20px;">杩斿洖</a><br/>
</div>
<script type="text/javascript">
- var message;
-
- var Status = '{!Repair__c.Status__c}';
- var FSE = '{!Repair__c.FSE_ApplyForRepair_time__c}';
- var SAP = '{!Repair__c.SAP_Transfer_time__c}';
- var cre = '{!Repair__c.CreatedById}';
- var Rep = '{!Repair__c.Repair_Ordered_Date__c}';
- var acc = '{!Repair__c.Acc_OwnerId__c}';
- var fSE = '{!Repair__c.FSE_ownerid__c}';
+ var message;
+
+ var Status = '{!Repair__c.Status__c}';
+ var FSE = '{!Repair__c.FSE_ApplyForRepair_time__c}';
+ var SAP = '{!Repair__c.SAP_Transfer_time__c}';
+ var cre = '{!Repair__c.CreatedById}';
+ var Rep = '{!Repair__c.Repair_Ordered_Date__c}';
+ var acc = '{!Repair__c.Acc_OwnerId__c}';
+ var fSE = '{!Repair__c.FSE_ownerid__c}';
- if (Status != null && Status.length > 0) {
- if (Status != "鑽夋涓�"&& Status != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)"&& Status != "4.淇悊鍝佽繑閫侀樁娈�") {
- message = "涓嶆槸鑽夋涓�,涓嶈兘鍒犻櫎";
- document.getElementById('ivtDifferenceDetail').innerHTML = message;
- document.getElementById("ivtDifferenceDetailBack").style.display = "block";
+ if (Status != null && Status.length > 0) {
+ if (Status != "鑽夋涓�"&& Status != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)"&& Status != "4.淇悊鍝佽繑閫侀樁娈�") {
+ message = "涓嶆槸鑽夋涓�,涓嶈兘鍒犻櫎";
+ document.getElementById('ivtDifferenceDetail').innerHTML = message;
+ document.getElementById("ivtDifferenceDetailBack").style.display = "block";
- }
- else if (Status == "0.鐢宠瀹屾瘯"&& (FSE != "")) {
- message = "FSE宸茬粡鐢宠锛屼笉鑳藉垹闄�";
- document.getElementById('ivtDifferenceDetail').innerHTML = message;
- document.getElementById("ivtDifferenceDetailBack").style.display = "block";
- }
- else if (Status == "4.淇悊鍝佽繑閫侀樁娈�"&& (SAP != "" || Rep!= "")){
- message = "宸茬粡鍙戦�佽繃SAP锛屼笉鑳藉垹闄�";
- document.getElementById('ivtDifferenceDetail').innerHTML = message;
- document.getElementById("ivtDifferenceDetailBack").style.display = "block";
- }
- else if ("{!$User.Id}".substring(0,15) != cre.substring(0,15) && "{!$User.Id}".substring(0,15) != acc.substring(0,15)&& "{!$User.Id}".substring(0,15) != fSE.substring(0,15)) {
- message = "涓嶆槸鎵�鏈変汉銆佸垱寤轰汉鎴朏SE涓昏礋璐d汉锛屼笉鑳藉垹闄�";
- document.getElementById('ivtDifferenceDetail').innerHTML = message;
- document.getElementById("ivtDifferenceDetailBack").style.display = "block";
- }
- else {
-
- sforce.connection.sessionId = '{!$Api.Session_ID}';
- var rtn=sforce.apex.execute("ControllerUtil","deleteRepair",{rid:'{!Repair__c.Id}'});
- if (rtn == "OK") {
- reload();
- } else {
- alert(rtn);
+ }
+ else if (Status == "0.鐢宠瀹屾瘯"&& (FSE != "")) {
+ message = "FSE宸茬粡鐢宠锛屼笉鑳藉垹闄�";
+ document.getElementById('ivtDifferenceDetail').innerHTML = message;
+ document.getElementById("ivtDifferenceDetailBack").style.display = "block";
+ }
+ else if (Status == "4.淇悊鍝佽繑閫侀樁娈�"&& (SAP != "" || Rep!= "")){
+ message = "宸茬粡鍙戦�佽繃SAP锛屼笉鑳藉垹闄�";
+ document.getElementById('ivtDifferenceDetail').innerHTML = message;
+ document.getElementById("ivtDifferenceDetailBack").style.display = "block";
+ }
+ else if ("{!$User.Id}".substring(0,15) != cre.substring(0,15) && "{!$User.Id}".substring(0,15) != acc.substring(0,15)&& "{!$User.Id}".substring(0,15) != fSE.substring(0,15)) {
+ message = "涓嶆槸鎵�鏈変汉銆佸垱寤轰汉鎴朏SE涓昏礋璐d汉锛屼笉鑳藉垹闄�";
+ document.getElementById('ivtDifferenceDetail').innerHTML = message;
+ document.getElementById("ivtDifferenceDetailBack").style.display = "block";
+ }
+ else {
+
+ sforce.connection.sessionId = '{!$Api.Session_ID}';
+ var rtn=sforce.apex.execute("ControllerUtil","deleteRepair",{rid:'{!Repair__c.Id}'});
+ if (rtn == "OK") {
+ reload();
+ } else {
+ alert(rtn);
- }
- }
- }
+ }
+ }
+ }
- function reload(){
- var str="";
- if(getParam('retURL')!==null){
- str +=getParam('retURL');
- }
- window.open(str,'_self');
- }
+ function reload(){
+ var str="";
+ if(getParam('retURL')!==null){
+ str +=getParam('retURL');
+ }
+ window.open(str,'_self');
+ }
- function getParam(paramName) {
- paramValue = "", isFound = !1;
- if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
- arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
- while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
- }
- return paramValue == "" && (paramValue = null), paramValue
+ function getParam(paramName) {
+ paramValue = "", isFound = !1;
+ if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
+ arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
+ while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
+ }
+ return paramValue == "" && (paramValue = null), paramValue
}
</script>
</apex:page>
\ No newline at end of file
--
Gitblit v1.9.1