From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/pages/NewAndEditLoanerUser.page | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/pages/NewAndEditLoanerUser.page b/force-app/main/default/pages/NewAndEditLoanerUser.page
index 5e853dd..f065515 100644
--- a/force-app/main/default/pages/NewAndEditLoanerUser.page
+++ b/force-app/main/default/pages/NewAndEditLoanerUser.page
@@ -136,6 +136,19 @@
UpdatePIToAWS(sobjJson, payloadForNewPI)
}
}
+
+ function EditButton(isDisabled){
+ var topele = document.getElementById('topButtonRow');
+ var bottomele = document.getElementById('bottomButtonRow');
+
+ if (isDisabled) {
+ topele.classList.add("disabledbutton");
+ bottomele.classList.add("disabledbutton");
+ }else {
+ topele.classList.remove("disabledbutton");
+ bottomele.classList.remove("disabledbutton");
+ }
+ }
var GetEleByClass = function(class_name){
let eles = document.getElementsByClassName(class_name);
@@ -219,9 +232,9 @@
v = ele.value;
}
- if(v && v != "000000000000000"){
+ //if(v && v != "000000000000000"){
result[field_api_name] = v;
- }
+ //}
}
} else if (ele.type == 'checkbox') {
@@ -291,7 +304,9 @@
function checkRequiredFieldMsg(formData) {
let blankRequiredFields = '';
for(i = 0;i<requiredFieldAPIList.length;i++){
- if(formData[requiredFieldAPIList[i]]){
+ if(formData[requiredFieldAPIList[i]] && (VLookUpFields.indexOf(requiredFieldAPIList[i]) == -1)){
+ continue;
+ }else if((VLookUpFields.indexOf(requiredFieldAPIList[i]) != -1) && formData[requiredFieldAPIList[i]] != '000000000000000'){
continue;
}else{
if(blankRequiredFields == ''){
@@ -306,6 +321,7 @@
}
function saveSobjectProcess(save_and_new) {
+ EditButton(true);
if(save_and_new){
config.SaveAndNew = true;
}
@@ -344,6 +360,7 @@
let errorMsgNode = document.getElementById("page:form:block:msgContent");
errorMsgNode.innerText = errorMsg;
errorMsgNode.className = 'pbError';
+ EditButton(false);
}
function hiddenErrorMsgNode() {
let errorMsgNode = document.getElementById("page:form:block:msgContent");
--
Gitblit v1.9.1