From 5b5c1e16deaa3a9d6d0ed1ffca390655ed103df7 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 14:56:14 +0800
Subject: [PATCH] lex community
---
force-app/main/default/aura/WeeklyReport/WeeklyReportController.js | 73 ++++++++++++++++++++++++++++++++----
1 files changed, 64 insertions(+), 9 deletions(-)
diff --git a/force-app/main/default/aura/WeeklyReport/WeeklyReportController.js b/force-app/main/default/aura/WeeklyReport/WeeklyReportController.js
index b4f4562..435e472 100644
--- a/force-app/main/default/aura/WeeklyReport/WeeklyReportController.js
+++ b/force-app/main/default/aura/WeeklyReport/WeeklyReportController.js
@@ -1,10 +1,12 @@
({
doInit : function(component, event, helper) {
+ console.log('zhj 鏂版柟妗坵eeklyReport');
if (window.location.href.endsWith("weekly-report")) {
helper.doinit(component, event, helper);
} else {
helper.hideCmp(component, event, helper);
}
+ component.set("v.showErrorInfo", false);
},
createAopp : function(component, event, helper) {
@@ -14,10 +16,12 @@
recordTypeId: '012100000006KW7'
});
addRecordEvent.fire();
+ component.set("v.showErrorInfo", false);
},
new_report : function(component, event, helper) {
component.find('save_button').set('v.label', '淇濆瓨骞舵柊寤�');
+ component.set('v.data.Report_Date__c', '');
helper.new_report(component, event, helper);
},
@@ -101,16 +105,62 @@
*/
var agencyHospitalid = component.get('v.hospitalLinkId');
- var arr = new Array();
- arr.push(agencyReport);
- var data = JSON.stringify(arr);
- // helper.set_aws_url(component,data,agencyHospitalid);
+ //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
+ debugger
+ let hospitalName = '';
+ //璋冪敤鍚庣searchAgencyDataId鏂规硶鏌ヨ鍑哄尰闄笅闈㈡墍鏈夊鎴蜂汉鍛榙ataid
+ helper.CallBackAction(component,'searchAgencyDataId',{
+ hospitalId : agencyHospitalid
+ },function(data){
+ if(data.getState() == "SUCCESS"){
+ var data = data.getReturnValue();
+ if(data.IsSuccess == true){
+ let agencyContactIds = ''
+ if(data.Message == '' && data.Data && data.Data.length > 0){
+ hospitalName = data.Data[0].Agency_Hospital__r.Name;
+ for(var i=0;i<data.Data.length;i++){
+ if(data.Data[i].AWS_Data_Id__c)
+ agencyContactIds += ','+data.Data[i].AWS_Data_Id__c;
+ }
+ agencyContactIds = agencyContactIds.substring(1);
+ agencyReport['agencyContactIds'] = agencyContactIds;
+ }else{
+ agencyReport['agencyContactIds'] = agencyContactIds;
+ }
+ var arr = new Array();
+ arr.push(agencyReport);
+ var requestData = JSON.stringify(arr);
+ // helper.set_aws_url(component,data,agencyHospitalid);
- var token = component.get('v.AWStoken');
- var newUrl = component.get('v.AWSinsert');
+ var token = component.get('v.AWStoken');
+ var newUrl = component.get('v.AWSinsert') + 'V2';
+
+ component.set('v.loginEdit',true);
+ helper.insert_agencycontact(component,token,newUrl,requestData,agencyHospitalid,helper,hospitalName);
+ }else{
+ helper.ShowToast({
+ "message" : data.message,
+ "type" : "error"
+ });
+ }
+ }else{
+ helper.ShowToast({
+ "message" : 'searchAgency澶辫触',
+ "type" : "error"
+ });
+ }
+ })
+ //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
+ // var arr = new Array();
+ // arr.push(agencyReport);
+ // var data = JSON.stringify(arr);
+ // // helper.set_aws_url(component,data,agencyHospitalid);
+
+ // var token = component.get('v.AWStoken');
+ // var newUrl = component.get('v.AWSinsert');
- component.set('v.login',true);
- helper.insert_agencycontact(component,token,newUrl,data,agencyHospitalid,helper);
+ // component.set('v.login',true);
+ // helper.insert_agencycontact(component,token,newUrl,data,agencyHospitalid,helper);
// PIPL update Yin Mingjie 21/02/2022 end
}else{
@@ -209,10 +259,12 @@
// var fileInput = component.find("file").getElement();
// var file = fileInput.files[0];
helper.readFile(component,helper,files[0]);
+ component.set("v.showErrorInfo", false);
},
processFileContent : function(component,event,helper){
helper.saveRecords(component,event,helper);
+ component.set("v.showErrorInfo", false);
},
cancel : function(component,event,helper){
@@ -267,5 +319,8 @@
close_export : function(component,event,helper){
component.set("v.showMain",true);
helper.close_export(component);
- }
+ },
+ exportErrorInfo: function(component,event,helper){
+ helper.exportErrorInfoHelper(component);
+ },
})
\ No newline at end of file
--
Gitblit v1.9.1