From 31cdc8c58cbdb9c4a54086be8d781af40dc4df7f Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期五, 08 四月 2022 23:01:33 +0800
Subject: [PATCH] Fix Weekly Report0408
---
force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js b/force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js
index 5056425..2a57fe3 100644
--- a/force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js
+++ b/force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js
@@ -76,10 +76,6 @@
if(rv.Data && fields.hasOwnProperty(item.field) && fields[item.field].References && fields[item.field].References.map(m=>m.value).indexOf(rv.Data.pidType) > -1){
item.value = pid;
}
-
- if(fields.hasOwnProperty(item.field)){
- item.fi = fields[item.field];
- }
}
}
}
@@ -127,6 +123,17 @@
payloadPi[pi_fields_map[item.field].AWS_Field_API__c] = item.value;
}
+
+ if (item.behavior == "Required" && !item.value ) {
+ let fs = component.find("field");
+ for(let fi in fs){
+ let f = fs[fi];
+ if(!f.get('v.value')){
+ f.reset();
+ }
+ }
+ return;
+ }
}
}
}
@@ -167,7 +174,10 @@
if(data.getState() == "SUCCESS"){
var rv = data.getReturnValue();
console.log(rv);
- var sfId = rv.Data.recordId;
+ var sfId = null;
+ if(rv.IsSuccess){
+ sfId = rv.Data.recordId;
+ }
helper.AwsPost(staticResource.transactionUrl,{
txId: result.txId,
--
Gitblit v1.9.1