From 428f42fab44b654c69fbc461513203830743d7de Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期二, 18 七月 2023 10:55:50 +0800
Subject: [PATCH] hql20230718更新lightning按钮
---
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js | 49 +
force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js | 65 +-
force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js | 62 +-
force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js | 119 ++--
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js | 13
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js | 44 +
force-app/main/default/classes/QISReportController.cls | 99 +++
force-app/main/default/lwc/lexQISSC/lexQISSC.js | 87 ++-
force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js | 76 +-
force-app/main/default/lwc/lexQISAgree/lexQISAgree.js | 43 +
force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js | 243 ++++++----
force-app/main/default/lwc/lexSendQIS/lexSendQIS.js | 54 +-
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js | 48 +
force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js | 115 ++--
force-app/main/default/lwc/lexOCSMToReportLighting/lexOCSMToReportLighting.js | 33
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js | 48 +
force-app/main/default/lwc/lexRCRecieved/lexRCRecieved.js | 85 ++-
force-app/main/default/lwc/lexOCSMNoToReportLighting/lexOCSMNoToReportLighting.js | 42 +
18 files changed, 793 insertions(+), 532 deletions(-)
diff --git a/force-app/main/default/classes/QISReportController.cls b/force-app/main/default/classes/QISReportController.cls
index 1344bd0..8463989 100644
--- a/force-app/main/default/classes/QISReportController.cls
+++ b/force-app/main/default/classes/QISReportController.cls
@@ -19,8 +19,8 @@
String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASAC_DECISION;
try{
- PAE_DecisionRecord__c rCPAEDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId limit 1];
- res.pAEid = rCPAEDIdList.id;
+ PAE_DecisionRecord__c RCPAEDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId limit 1];
+ res.pAEid = RCPAEDIdList.id;
System.debug(LoggingLevel.INFO, '*** res: ' + res);
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -48,8 +48,8 @@
String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASRC_DECISION;
try{
- PAE_DecisionRecord__c aSRCDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId Limit 1];
- res.pAEid = aSRCDIdList.id;
+ PAE_DecisionRecord__c ASRCDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId Limit 1];
+ res.pAEid = ASRCDIdList.id;
System.debug(LoggingLevel.INFO, '*** res: ' + res);
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -528,6 +528,10 @@
public static InitData initForlexCreateRepairButton (String recordId){
InitData res = new initData();
ID myUserID = UserInfo.getUserId();
+ List<RecordType> RecordTypeList = [select id,name from RecordType where name = '2.OCSM' or name = '1.FSE' or name = '鎴︾暐绉戝鍒嗛 娑堝寲绉�'
+ or name = '鎴︾暐绉戝鍒嗛 娑堝寲绉�' or name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�' or name = '鎴︾暐绉戝鍒嗛ET'
+ or name = '鎴︾暐绉戝鍒嗛 鏅绉�' or name = '鎴︾暐绉戝鍒嗛 娉屽翱绉�' or name = '鎴︾暐绉戝鍒嗛 鑰抽蓟鍠夌'
+ or name = '鎴︾暐绉戝鍒嗛 濠︿汉绉�' or name = '鎴︾暐绉戝鍒嗛 銇濄伄浠�'];
User userinfo = [SELECT id,RepairSalesPoint_Province_China__c FROM User WHERE Id = :myUserID LIMIT 1];
QIS_Report__c report = [SELECT id,Owner.name,FailureQInHospital__c,InformationFrom__c,Delay15Min__c,
AfterFailureInformation__c,Set_usage_product__c,BreakORFallOff__c,Opera_Name__c,
@@ -541,7 +545,39 @@
Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,
Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE id = :report.Hospital_Department__c limit 1];
try{
-
+ for (RecordType rec :RecordTypeList) {
+ if (rec.name == '1.FSE') {
+ res.oneFSE = rec.id.to15();
+ }
+ if (rec.name == '2.OCSM') {
+ res.twoOCSM = rec.id.to15();
+ }
+ if (rec.name == '鎴︾暐绉戝鍒嗛 娑堝寲绉�') {
+ res.xiaohua = rec.id.to15();
+ }
+ if (rec.name == '鎴︾暐绉戝鍒嗛 鍛煎惛绉�') {
+ res.huxi = rec.id.to15();
+ }
+ if (rec.name == '鎴︾暐绉戝鍒嗛ET') {
+ res.eT = rec.id.to15();
+ }
+ if (rec.name == '鎴︾暐绉戝鍒嗛 鏅绉�') {
+ res.puwai = rec.id.to15();
+ }
+ if (rec.name == '鎴︾暐绉戝鍒嗛 娉屽翱绉�') {
+ res.miniao = rec.id.to15();
+ }
+ if (rec.name == '鎴︾暐绉戝鍒嗛 鑰抽蓟鍠夌') {
+ res.erbihou = rec.id.to15();
+ }
+ if (rec.name == '鎴︾暐绉戝鍒嗛 濠︿汉绉�') {
+ res.fuke = rec.id.to15();
+ }
+ if (rec.name == '鎴︾暐绉戝鍒嗛 銇濄伄浠�') {
+ res.qita = rec.id.to15();
+ }
+
+ }
res.Id = report.Id;
res.qisRecordTypeId = report.RecordType_ID__c;
res.oCMjudgement = report.OCM_judgement__c;
@@ -739,9 +775,30 @@
}
return re;
}
+
+ // 鏂板缓QIS
+ @AuraEnabled
+ public static InitData initForlexCreateQISFromAssetButton (String recordId){
+ InitData res = new initData();
+ ID myUserID = UserInfo.getUserId();
+ Asset ass = [SELECT id,AssetMark__c FROM Asset WHERE Id = :recordId LIMIT 1];
+ try{
+ Date fomatToday = Date.today().addDays(-10);
+ QIS_Report__c report = [SELECT id,QIS_Submit_day__c FROM QIS_Report__c WHERE nonyushohin__c=:recordId and QIS_Submit_day__c != null and QIS_Submit_day__c >= :fomatToday];
+ Repair__c rep = [SELECT id,Name FROM Repair__c WHERE Delivered_Product__c = :recordId and Status2__c!='00.鍒犻櫎' and Status2__c!='00.鍙栨秷' and FSE_ApplyForRepair_Day__c >= :fomatToday order by FSE_ApplyForRepair_Day__c desc limit 1];
+ res.Id = report.id;
+ res.repId = rep.id;
+ System.debug(LoggingLevel.INFO, '*** res: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
public class InitData{
@AuraEnabled
public String Id;
+ @AuraEnabled
+ public String repId;
@AuraEnabled
public String qISSCReport;
@AuraEnabled
@@ -769,23 +826,23 @@
@AuraEnabled
public String failuerSituation;
@AuraEnabled
- public String sourceOnCall;
+ public ID sourceOnCall;
@AuraEnabled
public String sourceOnCallname;
@AuraEnabled
- public String hospitalId;
+ public ID hospitalId;
@AuraEnabled
public String hospitalname;
@AuraEnabled
- public String departmentClassId;
+ public ID departmentClassId;
@AuraEnabled
public String departmentClassname;
@AuraEnabled
- public String hospitalDepartment;
+ public ID hospitalDepartment;
@AuraEnabled
public String hospitalDepartmentname;
@AuraEnabled
- public String nonyushohinId;
+ public ID nonyushohinId;
@AuraEnabled
public String nonyushohinIdname;
@AuraEnabled
@@ -815,7 +872,7 @@
@AuraEnabled
public String failureQInHospital;
@AuraEnabled
- public String ownerId;
+ public ID ownerId;
@AuraEnabled
public String ownername;
@AuraEnabled
@@ -853,6 +910,26 @@
@AuraEnabled
public String contractnumber;
@AuraEnabled
+ public String oneFSE;
+ @AuraEnabled
+ public String twoOCSM;
+ @AuraEnabled
+ public String huxi;
+ @AuraEnabled
+ public String xiaohua;
+ @AuraEnabled
+ public String eT;
+ @AuraEnabled
+ public String puwai;
+ @AuraEnabled
+ public String miniao;
+ @AuraEnabled
+ public String erbihou;
+ @AuraEnabled
+ public String fuke;
+ @AuraEnabled
+ public String qita;
+ @AuraEnabled
public Date rCinspectionDate;
@AuraEnabled
public Date qISReplyDay;
diff --git a/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js
index 8cd7513..750332d 100644
--- a/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js
+++ b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js
@@ -2,16 +2,25 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
import init from '@salesforce/apex/QISReportController.initForlexCreateRepairButton';
-export default class lexCreateRepair extends LightningElement {
- @api recordId;
- IsLoading = true;
- typeflag = false;
- newflag = false;
- qisReportId='';
- name='';
- qisRecordTypeId='';
+/*
+ * @Description: 鏂板缓淇悊
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
+export default class lexCreateRepair extends NavigationMixin(LightningElement) {
+ @api recordId;
+ IsLoading = true;
+ typeflag = false;
+ newflag = false;
+ qisReportId='';
+ name='';
+ qisRecordTypeId='';
err='';
accParentId='';
accParentRecordTypeId='';
@@ -29,11 +38,11 @@
UseFailProductFinish='';
failuerSituation='';
sourceOnCall='';
- hospitalId='';
- departmentClassId='';
+ hospitalId1;
+ departmentClassId;
hospitalDepartment='';
- nonyushohinId='';
- ownerId='';
+ nonyushohinId;
+ ownerId;
faliourdate='';
sourceforrepair='';
repairSalesPointProvinceChina='';
@@ -55,8 +64,18 @@
hospitalDepartmentname = '';
nonyushohinIdname = '';
sourceOnCallname = '';
+ oneFSE = '';
+ twoOCSM = '';
+ huxi = '';
+ xiaohua = '';
+ eT = '';
+ puwai = '';
+ miniao = '';
+ fuke = '';
+ erbihou = '';
+ qita = '';
- @wire(CurrentPageReference)
+ @wire(CurrentPageReference)
getStateParameters(currentPageReference) {
console.log(111);
console.log(currentPageReference);
@@ -76,8 +95,19 @@
init({
recordId: this.recordId
}).then(result => {
+ console.log('init鏂规硶杩斿洖');
this.IsLoading = false;
+ this.oneFSE = result.oneFSE;
+ this.twoOCSM = result.twoOCSM;
this.qisReportId = result.Id;
+ this.huxi = result.huxi;
+ this.xiaohua = result.xiaohua;
+ this.eT = result.eT;
+ this.puwai = result.puwai;
+ this.erbihou = result.erbihou;
+ this.miniao = result.miniao;
+ this.fuke = result.fuke;
+ this.qita = result.qita;
this.oCMjudgement = result.oCMjudgement;
this.nextaction = result.nextaction;
this.ownername = result.ownername;
@@ -86,11 +116,11 @@
this.accParentId = result.accParentId;
this.comment = result.comment;
if (result.sourceOnCall!=null) {
- this.sourceOnCall = result.sourceOnCall;
- this.sourceOnCallname = result.sourceOnCallname;
+ this.sourceOnCall = result.sourceOnCall;
+ this.sourceOnCallname = result.sourceOnCallname;
}
this.name = result.name;
- this.hospitalId = result.hospitalId;
+ this.hospitalId1 = result.hospitalId;
this.hospitalname = result.hospitalname;
this.departmentClassname = result.departmentClassname;
this.departmentClassId = result.departmentClassId;
@@ -119,109 +149,112 @@
this.accParentParentFSEGIMainLeaderWorkLocation = result.accParentParentFSEGIMainLeaderWorkLocation;
this.accParentParentFSESPMainLeader = result.accParentParentFSESPMainLeader;
this.accParentParentFSESPMainLeaderWorkLocation = result.accParentParentFSESPMainLeaderWorkLocation;
- if (this.qisRecordTypeId != '01210000000RLWc' && this.qisRecordTypeId != '01210000000RLWh') {
- this.typeflag = true;
- }
- if (this.accParentId != null) {
- if (this.accParentRecordTypeId != null) {
- this.accrecordId = this.accParentRecordTypeId.substring(0,15);
- if (this.accrecordId == '01210000000QemL' || this.accrecordId == '01210000000QezZ' || this.accrecordId == '01210000000QemQ') {
- if (this.accParentParentFSEGIMainLeader != null) {
- this.WorkLocation = this.accParentParentFSEGIMainLeaderWorkLocation;
- }
- }else if(this.accrecordId == '01210000000Qeze' || this.accrecordId == '01210000000Qezj' || this.accrecordId == '01210000000Qezt'|| this.accrecordId == '01210000000Qezo'|| this.accrecordId == '01210000000Qezy'){
- if (this.accParentParentFSESPMainLeader != null) {
- this.WorkLocation = this.accParentParentFSESPMainLeaderWorkLocation;
- }
- }
- }
- }
- if ((this.oCMjudgement == '璐ㄩ噺闂' && this.nextaction == '鏃犲伩缁翠慨') ||
- (this.oCMjudgement == '璐ㄩ噺闂' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == false) ||
- (this.oCMjudgement == '闈炶川閲忛棶棰�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == true) ||
- (this.oCMjudgement == '闈炶川閲忛棶棰�' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == false) ||
- (this.oCMjudgement == '璐ㄩ噺闂+闈炶川閲忛棶棰�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == true) ||
- (this.oCMjudgement == '璐ㄩ噺闂+闈炶川閲忛棶棰�' && this.nextaction == '鏈夊伩缁翠慨+鏃犲伩缁翠慨' && this.specialfollow == false) ||
- (this.oCMjudgement == '鐜拌薄鏈彂鐜�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == true) ||
- (this.oCMjudgement == '鐜拌薄鏈彂鐜�' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == false)) {
- this.newflag = true;
- }
- console.log('this.newflag = '+this.newflag);
- console.log('this.typeflag = '+this.typeflag);
+ if (this.qisRecordTypeId != this.oneFSE && this.qisRecordTypeId != this.twoOCSM) {
+ this.typeflag = true;
+ }
+ if (this.accParentId != null) {
+ if (this.accParentRecordTypeId != null) {
+ this.accrecordId = this.accParentRecordTypeId.substring(0,15);
+ if (this.accrecordId == this.huxi || this.accrecordId == this.xiaohua || this.accrecordId == this.eT) {
+ if (this.accParentParentFSEGIMainLeader != null) {
+ this.WorkLocation = this.accParentParentFSEGIMainLeaderWorkLocation;
+ }
+ }else if(this.accrecordId == this.erbihou || this.accrecordId == this.qita || this.accrecordId == this.fuke|| this.accrecordId == this.puwai || this.accrecordId == this.miniao){
+ if (this.accParentParentFSESPMainLeader != null) {
+ this.WorkLocation = this.accParentParentFSESPMainLeaderWorkLocation;
+ }
+ }
+ }
+ }
+ if ((this.oCMjudgement == '璐ㄩ噺闂' && this.nextaction == '鏃犲伩缁翠慨') ||
+ (this.oCMjudgement == '璐ㄩ噺闂' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == false) ||
+ (this.oCMjudgement == '闈炶川閲忛棶棰�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == true) ||
+ (this.oCMjudgement == '闈炶川閲忛棶棰�' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == false) ||
+ (this.oCMjudgement == '璐ㄩ噺闂+闈炶川閲忛棶棰�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == true) ||
+ (this.oCMjudgement == '璐ㄩ噺闂+闈炶川閲忛棶棰�' && this.nextaction == '鏈夊伩缁翠慨+鏃犲伩缁翠慨' && this.specialfollow == false) ||
+ (this.oCMjudgement == '鐜拌薄鏈彂鐜�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == true) ||
+ (this.oCMjudgement == '鐜拌薄鏈彂鐜�' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == false)) {
+ this.newflag = true;
+ }
+ console.log('this.newflag = '+this.newflag);
+ console.log('this.typeflag = '+this.typeflag);
- if ( this.newflag && this.typeflag) {
- if (this.isUsedForTheOpera == 'YES') {
- this.UseFailProductFinish = '鏄�';
- }else if(this.isUsedForTheOpera == 'NO-鐢ㄦ浛浠e搧瀹屾垚浜�'){
- this.UseFailProductFinish = '鍚�-鐢ㄦ浛浠e搧瀹屾垚';
- }else if(this.isUsedForTheOpera == 'NO-鐢ㄥ叾浠栧叕鍙哥殑鍚岀被浜у搧瀹屾垚浜�'){
- this.UseFailProductFinish = '鍚�-鐢ㄥ叾浠栧叕鍙哥殑鍚岀被浜у搧瀹屾垚';
- }else if(this.isUsedForTheOpera == 'NO-鎵嬫湳涓'){
- this.UseFailProductFinish = '鍚�-鎵嬫湳涓';
- }
- if ('浣跨敤鍓嶅噯澶�' == this.failuerSituation) {
- this.failuerSituation = '浣跨敤鍓嶅噯澶�-鎮h�呮湭楹婚唹';
- }
- var url = '';
- url = "/a0J/e?" +
- "CF00N10000002FIJU_lkid="+this.sourceOnCall+"&" +
- "CF00N10000002FIJU="+this.sourceOnCallname+"&" +
- "CF00N10000002FIJZ_lkid="+this.qisReportId+"&" +
- "CF00N10000002FIJZ="+this.name+"&" +
- "CF00N10000002Dx66_lkid="+this.hospitalId+"&" +
- "CF00N10000002Dx66="+this.hospitalname+"&" +
- "CF00N10000002Dx5t_lkid="+this.departmentClassId+"&" +
- "CF00N10000002Dx5t="+this.departmentClassname+"&" +
- "CF00N10000002Dx5n_lkid="+this.hospitalDepartment+"&" +
- "CF00N10000002Dx5n="+this.hospitalDepartmentname+"&" +
- "CF00N10000002Dx1X_lkid="+this.nonyushohinId+"&" +
- "CF00N10000002Dx1X="+this.nonyushohinIdname+"&" +
- "CF00N10000002EMHw_lkid="+this.ownerId+"&" +
- "CF00N10000002EMHw="+this.ownername+"&" +
- "00N10000002Dx5y="+this.faliourdate+"&" +
- "00N10000002Dx6I="+this.comment+"&" +
- "00N10000002FH86="+this.sourceforrepair+"&" +
- "00N10000006P6Rn="+this.repairSalesPointProvinceChina+"&" +
- "00N10000008rsVQ="+this.trableoccurdaYcollect+"&" +
- "00N10000008rsW7="+this.damageForDocOrPat+"&"+
- "00N10000008rsVw="+this.relationWithTheProblem+"&"+
- "00N10000008rsW2="+this.reportForGoz+"&"+
- "00N10000008rsW6="+this.whichProject+"&"+
- "00N10000008rsVk="+this.operaName+"&" +
- "00N10000008rsVN="+this.breakORFallOff+"&"+
- "00N10000008rsW4="+this.setusageproduct+"&" +
- "00N10000008rsVL="+this.afterFailureInformation+"&" +
- "00N10000008rsVR="+this.delay15Min+"&"+
- "00N10000008rsVZ="+this.informationFrom+"&"+
- "00N10000008rsVT="+this.failureQInHospital+"&" +
- "00N10000008rsVv="+this.failuerSituation+"&"+
- "00N10000008rsW5="+this.UseFailProductFinish+ "&" +
- "00N10000006P6SM="+this.WorkLocation+ "&" +
- "retURL=%2F"+this.qisReportId;
- window.open(url, "_blank");
- this.dispatchEvent(new CloseActionScreenEvent());
- }else{
- const evt = new ShowToastEvent({
- title : '璇IS涓嶈兘鏂板缓淇悊',
- message: '',
+ if ( this.newflag && this.typeflag) {
+ if (this.isUsedForTheOpera == 'YES') {
+ this.UseFailProductFinish = '鏄�';
+ }else if(this.isUsedForTheOpera == 'NO-鐢ㄦ浛浠e搧瀹屾垚浜�'){
+ this.UseFailProductFinish = '鍚�-鐢ㄦ浛浠e搧瀹屾垚';
+ }else if(this.isUsedForTheOpera == 'NO-鐢ㄥ叾浠栧叕鍙哥殑鍚岀被浜у搧瀹屾垚浜�'){
+ this.UseFailProductFinish = '鍚�-鐢ㄥ叾浠栧叕鍙哥殑鍚岀被浜у搧瀹屾垚';
+ }else if(this.isUsedForTheOpera == 'NO-鎵嬫湳涓'){
+ this.UseFailProductFinish = '鍚�-鎵嬫湳涓';
+ }
+ if ('浣跨敤鍓嶅噯澶�' == this.failuerSituation) {
+ this.failuerSituation = '浣跨敤鍓嶅噯澶�-鎮h�呮湭楹婚唹';
+ }
+
+ const defaultFieldValues =encodeDefaultFieldValues({
+ On_Call_ID__c: this.sourceOnCall,
+ QIS_ID__c: this.qisReportId,
+ Hospital__c: this.hospitalId1,
+ Department_Class__c: this.departmentClassId,
+ Account__c:this.hospitalDepartment,
+ Delivered_Product__c:this.nonyushohinId,
+ Incharge_Staff__c:this.ownerId,
+ Failure_Occurrence_Date__c:this.faliourdate,
+ Repair_Detail__c:this.comment,
+ Repair_Source__c:this.sourceforrepair,
+ DateReceiptQuestions__c:this.trableoccurdaYcollect,
+ ifDeadHurt__c:this.damageForDocOrPat,
+ ProductFailureRelated__c:this.relationWithTheProblem,
+ ReportAdverseEvents__c:this.reportForGoz,
+ WhatProject__c:this.whichProject,
+ OperationOrExaminationName__c:this.operaName,
+ BreakORFallOff__c:this.breakORFallOff,
+ SupportingProducts__c:this.setusageproduct,
+ Delay15Min__c:this.delay15Min,
+ AfterFailureInformation__c:this.afterFailureInformation,
+ InformationFrom__c:this.informationFrom,
+ FailureQInHospital__c:this.failureQInHospital,
+ ProblemOccurred__c:this.failuerSituation,
+ UseFailProductFinish__c:this.UseFailProductFinish,
+ SalesOfficeCode_selection__c:this.WorkLocation
+ });
+
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Repair__c',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultFieldValues
+ }
+ });
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }else{
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '璇IS涓嶈兘鏂板缓淇悊',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
+ return;
+ }
}).catch(error => {
const evt = new ShowToastEvent({
- title : '鍙戠敓閿欒',
- message: '',
+ title : '',
+ message: '鍙戠敓閿欒',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
console.log('error='+error);
- return;
+ return;
}).finally(() => {
});
diff --git a/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js b/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
index 2f48924..d8e78dc 100644
--- a/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
+++ b/force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
@@ -5,17 +5,24 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForOCMSubmitButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisWithOCM';
-
+import { updateRecord } from 'lightning/uiRecordApi';
+/*
+ * @Description: 鎻愪氦
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexOCMSubmit extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- QISInstallDate;
- qisStatus;
- contractnumber;
- isaohuiproduct;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ QISInstallDate;
+ qisStatus;
+ contractnumber;
+ isaohuiproduct;
err;
- @wire(CurrentPageReference)
+ @wire(CurrentPageReference)
getStateParameters(currentPageReference) {
console.log(111);
console.log(currentPageReference);
@@ -41,49 +48,49 @@
this.QISInstallDate = result.qISInstallDate;
this.contractnumber = result.contractnumber;
this.isaohuiproduct = result.isaohuiproduct;
- if (this.qisStatus!='鑽夋涓�' && this.qisStatus!='鍙栨秷') {
- const evt = new ShowToastEvent({
- title : '宸茬粡鎻愪氦',
- message: '',
+ if (this.qisStatus!='鑽夋涓�' && this.qisStatus!='鍙栨秷') {
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '宸茬粡鎻愪氦',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }else{
- if (this.qisStatus == '鍙栨秷') {
- const evt = new ShowToastEvent({
- title : '鍙栨秷鍚庣殑QIS涓嶅厑璁稿啀鎻愪氦锛屽鏋滈渶瑕佹彁浜よ鐐瑰嚮\"澶嶅埗\"鎸夐挳閲嶆柊鐢熸垚涓�涓猀IS',
- message: '',
+ return;
+ }else{
+ if (this.qisStatus == '鍙栨秷') {
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '鍙栨秷鍚庣殑QIS涓嶅厑璁稿啀鎻愪氦锛屽鏋滈渶瑕佹彁浜よ鐐瑰嚮\"澶嶅埗\"鎸夐挳閲嶆柊鐢熸垚涓�涓猀IS',
variant: 'error'
});
this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
- }
-
- if (this.QISInstallDate == null) {
- const evt = new ShowToastEvent({
- title : '銆愯喘涔版棩鏈�/瀹夎鏃ユ湡銆戜负绌烘椂涓嶈兘鎻愪氦鐢宠',
- message: '',
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ }
+
+ if (this.QISInstallDate == null) {
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '銆愯喘涔版棩鏈�/瀹夎鏃ユ湡銆戜负绌烘椂涓嶈兘鎻愪氦鐢宠',
variant: 'error'
});
this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
- if (this.contractnumber == null) {
- const evt = new ShowToastEvent({
- title : '銆愰攢鍞悎鍚屼笂璁㈠崟鍙风爜銆戜负绌烘椂涓嶈兘鎻愪氦鐢宠',
- message: '',
+ if (this.contractnumber == null) {
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '銆愰攢鍞悎鍚屼笂璁㈠崟鍙风爜銆戜负绌烘椂涓嶈兘鎻愪氦鐢宠',
variant: 'error'
});
this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
LightningConfirm.open({
message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
variant: 'headerless',
@@ -106,24 +113,26 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
- if (result!='鎴愬姛') {
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
+ if (result!='鎴愬姛') {
this.err = result;
- const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
- variant: 'error'
- });
- this.dispatchEvent(evt);
- }
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
+ variant: 'error'
+ });
+ this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
+ }
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log('error='+error);
- }).finally(() => {
-
- });
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
+ console.log('error='+error);
+ }).finally(() => {
+
+ });
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportLighting/lexOCSMNoToReportLighting.js b/force-app/main/default/lwc/lexOCSMNoToReportLighting/lexOCSMNoToReportLighting.js
index 31f4054..e138fa1 100644
--- a/force-app/main/default/lwc/lexOCSMNoToReportLighting/lexOCSMNoToReportLighting.js
+++ b/force-app/main/default/lwc/lexOCSMNoToReportLighting/lexOCSMNoToReportLighting.js
@@ -3,14 +3,22 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import LightningConfirm from 'lightning/confirm';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/QISReportController.initForlexOCSMNoToReportLightingButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisForlexOCSMNoToReportLighting';
+/*
+ * @Description: OCSM涓嶈鎶ュ憡
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexOCSMNoToReportLighting extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- OCSMAdministrativeReportNumber;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ OCSMAdministrativeReportNumber;
OCSMAdministrativeReportDate;
Awaredate;
err;
@@ -48,8 +56,8 @@
if(res) {
if (this.OCSMAdministrativeReportDate != null || this.OCSMAdministrativeReportNumber != null) {
const evt = new ShowToastEvent({
- title : '宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮OCSM涓嶈鎶ュ憡',
- message: '',
+ title : '',
+ message: '宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮OCSM涓嶈鎶ュ憡',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -60,8 +68,8 @@
this.updateQisSubmit();
}else{
const evt = new ShowToastEvent({
- title : '娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭',
- message: '',
+ title : '',
+ message: '娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -81,21 +89,23 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
this.err = result;
- if (result!='鎴愬姛') {
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
diff --git a/force-app/main/default/lwc/lexOCSMToReportLighting/lexOCSMToReportLighting.js b/force-app/main/default/lwc/lexOCSMToReportLighting/lexOCSMToReportLighting.js
index 525dd7e..5c98b96 100644
--- a/force-app/main/default/lwc/lexOCSMToReportLighting/lexOCSMToReportLighting.js
+++ b/force-app/main/default/lwc/lexOCSMToReportLighting/lexOCSMToReportLighting.js
@@ -2,12 +2,19 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import LightningConfirm from 'lightning/confirm';
+import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForlexOCSMToReportLightingButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisForlexOCSMToReportLighting';
-
+/*
+ * @Description: OCSM瑕佹姤鍛�
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexOCSMToReportLighting extends LightningElement {
- @api recordId;
+ @api recordId;
str;
err;
IsLoading = true;
@@ -46,8 +53,8 @@
this.updateQisSubmit();
}else{
const evt = new ShowToastEvent({
- title : '娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭',
- message: '',
+ title : '',
+ message: '娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -67,21 +74,23 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
this.err = result;
- if (result!='鎴愬姛') {
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
diff --git a/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js
index 60bb2c0..c927338 100644
--- a/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js
+++ b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js
@@ -3,14 +3,22 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForlexOSHInspectButton';
+import { updateRecord } from 'lightning/uiRecordApi';
import updateQis from '@salesforce/apex/QISReportController.updateQisForlexOSHInspect';
+/*
+ * @Description: OSH妫�鏌ュ彈鐞�
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexOSHInspect extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- qisStatus;
- oSHInspectionDate;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ qisStatus;
+ oSHInspectionDate;
err;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -37,30 +45,30 @@
this.qisReportId = result.Id;
this.qisStatus = result.qIStatus;
this.oSHInspectionDate = result.oSHInspectionDate;
- if (this.qisStatus!='OSH妫�娴嬩腑') {
- const evt = new ShowToastEvent({
- title : '闇�瑕佸厛鐐瑰嚮锛籓SH鐜板搧鏀跺埌锛�',
- message: '',
+ if (this.qisStatus!='OSH妫�娴嬩腑') {
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '闇�瑕佸厛鐐瑰嚮锛籓SH鐜板搧鏀跺埌锛�',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }else if(this.oSHInspectionDate != null){
- const evt = new ShowToastEvent({
- title : 'OSH妫�娴嬪凡缁忓彈鐞�',
- message: '',
+ }else if(this.oSHInspectionDate != null){
+ const evt = new ShowToastEvent({
+ title : '',
+ message: 'OSH妫�娴嬪凡缁忓彈鐞�',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }else{
- this.updateQisSubmit();
- }
-
+ }else{
+ this.updateQisSubmit();
+ }
+
-
+
}).catch(error => {
console.log('error='+error);
}).finally(() => {
@@ -68,21 +76,23 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
- if (result!='鎴愬姛') {
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
+ if (result!='鎴愬姛') {
this.err = result;
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
diff --git a/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js
index cf64145..97f655d 100644
--- a/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js
+++ b/force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js
@@ -4,13 +4,20 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForOSHRecievedButton';
import updateQis from '@salesforce/apex/QISReportController.updateQis';
-
+import { updateRecord } from 'lightning/uiRecordApi';
+/*
+ * @Description: OSH鐜板搧鏀跺埌
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexOSHRecieved extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- qisStatus;
- @wire(CurrentPageReference)
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ qisStatus;
+ @wire(CurrentPageReference)
getStateParameters(currentPageReference) {
console.log(111);
console.log(currentPageReference);
@@ -34,18 +41,18 @@
this.qisReportId = result.Id;
this.qisStatus = result.qIStatus;
console.log('this.qisStatus='+this.qisStatus);
- if (this.qisStatus!='OSH妫�娴嬬敵璇�' && this.qisStatus!='瀹屾瘯') {
+ if (this.qisStatus!='OSH妫�娴嬬敵璇�' && this.qisStatus!='瀹屾瘯') {
const evt = new ShowToastEvent({
- title : 'OSH宸茬粡鏀跺埌瀹炵墿',
- message: '',
+ title : '',
+ message: 'OSH宸茬粡鏀跺埌瀹炵墿',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }else{
- this.updateQisSubmit();
- }
+ }else{
+ this.updateQisSubmit();
+ }
}).catch(error => {
console.log('error='+error);
}).finally(() => {
@@ -53,21 +60,23 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
- console.log('result'+result);
- if (result!='鎴愬姛') {
+ console.log('result'+result);
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: result,
+ title : '',
+ message: '鏇存柊澶辫触'+result,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
diff --git a/force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js b/force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js
index d1133f3..1598dfe 100644
--- a/force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js
+++ b/force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js
@@ -5,13 +5,21 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForOSHSubmitButton';
import updateQis from '@salesforce/apex/QISReportController.updateQis1';
+import { updateRecord } from 'lightning/uiRecordApi';
+/*
+ * @Description: 鎻愪氦寰呭鎵�1
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexOSHSubmit extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- qisStatus;
- OSHstaff;
- OSHstaffEmail;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ qisStatus;
+ OSHstaff;
+ OSHstaffEmail;
err;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -42,26 +50,26 @@
console.log('this.qisStatus='+this.qisStatus);
console.log('this.OSHstaff='+this.OSHstaff);
console.log('this.OSHstaffEmail='+this.OSHstaffEmail);
- if (this.qisStatus=='OSH妫�娴嬬敵璇�' || this.qisStatus=='瀹屾瘯') {
+ if (this.qisStatus=='OSH妫�娴嬬敵璇�' || this.qisStatus=='瀹屾瘯') {
const evt = new ShowToastEvent({
- title : '闇�瑕佸厛鐐瑰嚮锛籓SH妫�鏌ュ彈鐞嗭冀',
- message: '',
+ title : '',
+ message: '闇�瑕佸厛鐐瑰嚮锛籓SH妫�鏌ュ彈鐞嗭冀',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }
- if (this.qisStatus!='OSH妫�娴嬩腑') {
+ }
+ if (this.qisStatus!='OSH妫�娴嬩腑') {
const evt = new ShowToastEvent({
- title : '宸茬粡鎻愪氦瀹℃壒',
- message: '',
+ title : '',
+ message: '宸茬粡鎻愪氦瀹℃壒',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }
+ }
LightningConfirm.open({
message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
variant: 'headerless',
@@ -71,8 +79,8 @@
if(res) {
if (this.OSHstaff==null||this.OSHstaffEmail==null) {
const evt = new ShowToastEvent({
- title : 'OSH鎷呭綋蹇呴』濉啓',
- message: '',
+ title : '',
+ message: 'OSH鎷呭綋蹇呴』濉啓',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -84,8 +92,8 @@
}catch(err){
if(err.faultstring !=undefined && err.faultstring.indexOf('INVALID_SESSION_ID') != -1) {
const evt = new ShowToastEvent({
- title : '褰撳墠缃戦〉宸茬櫥鍑猴紝璇锋偍閲嶆柊鐧诲綍鍚庡埛鏂拌缃戦〉锛�',
- message: '',
+ title : '',
+ message: '褰撳墠缃戦〉宸茬櫥鍑猴紝璇锋偍閲嶆柊鐧诲綍鍚庡埛鏂拌缃戦〉锛�',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -109,7 +117,7 @@
}
});
-
+
}).catch(error => {
console.log('error='+error);
}).finally(() => {
@@ -117,21 +125,24 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
- if (result!='鎴愬姛') {
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
+ if (result!='鎴愬姛') {
this.err = result;
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
+
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
diff --git a/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js
index 0a148b6..6614266 100644
--- a/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js
+++ b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js
@@ -3,10 +3,17 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/QISReportController.initForlexPDFQISrequestButton';
+/*
+ * @Description: PDF(QIS鐢宠涔�)
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexPDFQISrequest extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
err;
@wire(CurrentPageReference)
diff --git a/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
index 375454b..302475a 100644
--- a/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
+++ b/force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
@@ -5,12 +5,19 @@
import init from '@salesforce/apex/QISReportController.initForQisAgreeButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisForQisAgree';
import USER_ID from '@salesforce/user/Id';
-
+import { updateRecord } from 'lightning/uiRecordApi';
+/*
+ * @Description: QIS缁撴灉璺熻繘瀹屾瘯
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexQISAgree extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- OwnerId;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ OwnerId;
userId = USER_ID;
err;
@@ -38,16 +45,16 @@
this.qisReportId = result.Id;
this.OwnerId = result.ownerId;
if (this.OwnerId != this.userId) {
- const evt = new ShowToastEvent({
- title : '鍙湁鎵�鏈夎�呭彲浠ユ寜QIS缁撴灉璺熻繘瀹屾瘯鐨勬寜閽�',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '鍙湁鎵�鏈夎�呭彲浠ユ寜QIS缁撴灉璺熻繘瀹屾瘯鐨勬寜閽�',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
}else{
- this.updateQisSubmit();
+ this.updateQisSubmit();
}
}).catch(error => {
console.log('error='+error);
@@ -56,21 +63,23 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
this.err = result;
- if (result!='鎴愬姛') {
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
diff --git a/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
index 2168a7d..79b95fe 100644
--- a/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
+++ b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
@@ -2,12 +2,18 @@
import { CurrentPageReference } from "lightning/navigation";
import init from '@salesforce/apex/QISReportController.initForlexQISIntakeuniversalcodeButton';
import sqlForPAE from '@salesforce/apex/QISReportController.sqlForPAE1';
-
+/*
+ * @Description: Intake universal code缂栬緫
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexQISIntakeuniversalcode extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- paeId;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ paeId;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -35,21 +41,21 @@
this.qisReportId = result.Id;
var RecordTypeId = "ASRCDecision";
sqlForPAE({
- qisReportId: this.qisReportId
- }).then(result => {
- if (result!=null) {
- this.paeId = result.pAEid;
- console.log('result2='+this.paeId);
- }
- var url = '';
- if (result!=null&& this.paeId!=null){
- url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
- } else {
- url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
- }
- console.log('url='+url);
+ qisReportId: this.qisReportId
+ }).then(result => {
+ if (result!=null) {
+ this.paeId = result.pAEid;
+ console.log('result2='+this.paeId);
+ }
+ var url = '';
+ if (result!=null&& this.paeId!=null){
+ url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
+ } else {
+ url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
+ }
+ console.log('url='+url);
window.location.replace(url);
- });
+ });
}
}).catch(error => {
console.log('error='+error);
diff --git a/force-app/main/default/lwc/lexQISSC/lexQISSC.js b/force-app/main/default/lwc/lexQISSC/lexQISSC.js
index 6e89c21..7d6f66a 100644
--- a/force-app/main/default/lwc/lexQISSC/lexQISSC.js
+++ b/force-app/main/default/lwc/lexQISSC/lexQISSC.js
@@ -2,18 +2,27 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
import init from '@salesforce/apex/QISReportController.initForlexQISSCButton';
-export default class lexQISSC extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- name;
- profileName;
- qISSCId;
- qISSCReport;
- nextaction;
- qISMarketCategory;
+/*
+ * @Description: QIS甯傚満閮ㄦ剰瑙�
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
+export default class lexQISSC extends NavigationMixin(LightningElement) {
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ name1;
+ profileName;
+ qISSCId;
+ qISSCReport;
+ nextaction;
+ qISMarketCategory;
err;
@wire(CurrentPageReference)
@@ -38,21 +47,18 @@
}).then(result => {
this.IsLoading = false;
this.qisReportId = result.Id;
- this.name = result.name;
+ this.name1 = result.name;
this.qISSCId = result.qISSCId;
this.qISSCReport = result.qISSCReport;
this.nextaction = result.nextaction;
this.qISMarketCategory = result.qISMarketCategory;
this.profileName = result.profileName;
- console.log('profileName='+this.profileName);
- console.log('qISSCReport='+this.qISSCReport);
- console.log('nextaction='+this.nextaction);
- console.log('qISMarketCategory='+this.qISMarketCategory);
- console.log('qISSCId='+this.qISSCId);
+ console.log('name1='+this.name1);
+ console.log('result.name='+result.name);
if (this.profileName == '2F4_鎶�鏈帹杩涢儴' || this.profileName == '2F4_鎶�鏈帹杩涢儴_OSH 闈炲崟鐐�') {
- const evt = new ShowToastEvent({
- title : '鎮ㄦ病鏈夋柊寤篞IS甯傚満閮ㄦ潈闄愩��',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '鎮ㄦ病鏈夋柊寤篞IS甯傚満閮ㄦ潈闄愩��',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -61,30 +67,45 @@
}
if (this.qISSCReport!=null) {
var urlPrefix = window.location.protocol + '//' + window.location.host+'/'+this.qISSCId;
- window.open(urlPrefix);
- this.dispatchEvent(new CloseActionScreenEvent());
+ window.open(urlPrefix);
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
}else{
- if (this.nextaction == '閫佸洖' && (this.qISMarketCategory == 'ET' || this.qISMarketCategory == 'ENG' || this.qISMarketCategory == 'EndoRapid')) {
- var urlStr ='/a3w/e?CF00N100000095xFJ='+this.name+
- '&CF00N100000095xFJ_lkid='+this.qisReportId+
- '&retURL='+this.qisReportId+
- '&Name='+this.name;
- window.open(urlStr);
-
+ if (this.nextaction == '閫佸洖' && (this.qISMarketCategory == 'ET' || this.qISMarketCategory == 'ENG' || this.qISMarketCategory == 'EndoRapid')) {
+ // var urlStr ='/a3w/e?CF00N100000095xFJ='+this.name+
+ // '&CF00N100000095xFJ_lkid='+this.qisReportId+
+ // '&retURL='+this.qisReportId+
+ // '&Name='+this.name;
+ // window.open(urlStr);
+ const defaultFieldValues =encodeDefaultFieldValues({
+ Name:this.name1,
+ QIS_Report__c:this.qisReportId
+ });
+
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'QIS_SC_Report__c',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultFieldValues
+ }
+ });
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }else{
+ }else{
console.log('瑙﹀彂');
- const evt = new ShowToastEvent({
- title : '瀵瑰簲鏂规硶涓鸿繑鍥炰笖瀵瑰簲涓绘満/娑堣�楀搧涓篍T 鎴� ENG 鎴� EndoRapid 鏃讹紝鎵嶅彲浠ユ柊寤恒��',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '瀵瑰簲鏂规硶涓鸿繑鍥炰笖瀵瑰簲涓绘満/娑堣�楀搧涓篍T 鎴� ENG 鎴� EndoRapid 鏃讹紝鎵嶅彲浠ユ柊寤恒��',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }
+ }
}
}).catch(error => {
console.log('error='+error);
diff --git a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
index 7d23de7..de2af7f 100644
--- a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
+++ b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
@@ -2,13 +2,19 @@
import { CurrentPageReference } from 'lightning/navigation';
import init from '@salesforce/apex/QISReportController.initForQisUniversalFailureCodeButton';
import sqlForPAE from '@salesforce/apex/QISReportController.sqlForPAE';
-
+/*
+ * @Description: Final universal code缂栬緫
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexQisUniversalFailureCode extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- paeId;
- @wire(CurrentPageReference)
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ paeId;
+ @wire(CurrentPageReference)
getStateParameters(currentPageReference) {
console.log(111);
console.log(currentPageReference);
@@ -34,22 +40,22 @@
this.qisReportId = result.Id;
var RecordTypeId = "ASACDecision";
sqlForPAE({
- qisReportId: this.qisReportId
- }).then(result => {
- if (result!=null) {
- this.paeId = result.pAEid;
- console.log('result='+this.paeId);
- }
- var url = '';
- if (result!=null&& this.paeId!=null){
- url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
- } else {
- url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
- }
- console.log('url='+url);
- // window.open(url,'_self');
+ qisReportId: this.qisReportId
+ }).then(result => {
+ if (result!=null) {
+ this.paeId = result.pAEid;
+ console.log('result='+this.paeId);
+ }
+ var url = '';
+ if (result!=null&& this.paeId!=null){
+ url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
+ } else {
+ url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
+ }
+ console.log('url='+url);
+ // window.open(url,'_self');
window.location.replace(url);
- });
+ });
}
}).catch(error => {
console.log('error='+error);
diff --git a/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js
index e54a336..9438863 100644
--- a/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js
+++ b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js
@@ -4,13 +4,21 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForRCCDScompleteButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisForRCCDScomplete';
+import { updateRecord } from 'lightning/uiRecordApi';
+/*
+ * @Description: OCSM鏈嶅姟鏈儴CDS瀹屾瘯
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexRCCDScomplete extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- cdsdate;
- QIStatus;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ cdsdate;
+ QIStatus;
err;
@wire(CurrentPageReference)
@@ -38,9 +46,9 @@
this.cdsdate = result.cdsdate;
this.QIStatus = result.qIStatus;
if (this.QIStatus == 'RC妫�娴嬬敵璇�') {
- const evt = new ShowToastEvent({
- title : '闇�瑕佸厛鐐瑰嚮锛籓CM鏈嶅姟鏈儴鏀跺埌瀹炵墿锛�',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '闇�瑕佸厛鐐瑰嚮锛籓CM鏈嶅姟鏈儴鏀跺埌瀹炵墿锛�',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -48,9 +56,9 @@
return;
}
if (this.cdsdate != null) {
- const evt = new ShowToastEvent({
- title : 'OCM鏈嶅姟鏈儴CDS宸茬粡瀹屾瘯',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: 'OCM鏈嶅姟鏈儴CDS宸茬粡瀹屾瘯',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -65,21 +73,23 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
this.err = result;
- if (result!='鎴愬姛') {
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
diff --git a/force-app/main/default/lwc/lexRCRecieved/lexRCRecieved.js b/force-app/main/default/lwc/lexRCRecieved/lexRCRecieved.js
index 044dee1..d556747 100644
--- a/force-app/main/default/lwc/lexRCRecieved/lexRCRecieved.js
+++ b/force-app/main/default/lwc/lexRCRecieved/lexRCRecieved.js
@@ -2,19 +2,26 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/QISReportController.initForlexRCRecievedButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisForRCRecieved';
-
+/*
+ * @Description: OCSM鏈嶅姟鏈儴鏀跺埌瀹炵墿
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexRCRecieved extends LightningElement {
- @api recordId;
- err;
- IsLoading = true;
- qisReportId;
- qisStatus;
- isAEProfile;
- isPAEProfile;
- isCNBuy;
- @wire(CurrentPageReference)
+ @api recordId;
+ err;
+ IsLoading = true;
+ qisReportId;
+ qisStatus;
+ isAEProfile;
+ isPAEProfile;
+ isCNBuy;
+ @wire(CurrentPageReference)
getStateParameters(currentPageReference) {
console.log(111);
console.log(currentPageReference);
@@ -41,29 +48,29 @@
this.isPAEProfile = result.isPAEProfile;
this.isCNBuy = result.isCNBuy;
console.log('this.qisStatus='+this.qisStatus);
- if (this.qisStatus!='RC妫�娴嬬敵璇�') {
+ if (this.qisStatus!='RC妫�娴嬬敵璇�') {
const evt = new ShowToastEvent({
- title : 'OCM鏈嶅姟鏈儴宸茬粡鏀跺埌瀹炵墿',
- message: '',
+ title : '',
+ message: 'OCM鏈嶅姟鏈儴宸茬粡鏀跺埌瀹炵墿',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }else{
- if (this.isAEProfile == null || this.isPAEProfile == null || this.isCNBuy != 'true') {
- const evt = new ShowToastEvent({
- title : '瀹夊叏淇℃伅鏈垽瀹氾紝璇疯仈绯昏川閲忔硶瑙勯儴',
- message: '',
+ }else{
+ if (this.isAEProfile == null ||(this.isPAEProfile == null && this.isCNBuy != 'true')) {
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '瀹夊叏淇℃伅鏈垽瀹氾紝璇疯仈绯昏川閲忔硶瑙勯儴',
variant: 'error'
});
- this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }else{
- this.updateQisSubmit();
- }
- }
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }else{
+ this.updateQisSubmit();
+ }
+ }
}).catch(error => {
console.log('error='+error);
}).finally(() => {
@@ -71,25 +78,27 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
- console.log('result'+result);
- this.err = result;
- if (result!='鎴愬姛') {
+ console.log('result'+result);
+ this.err = result;
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log('error='+error);
- }).finally(() => {
-
- });
+ updateRecord({fields: { Id: this.recordId }});
+ }).catch(error => {
+ console.log('error='+error);
+ }).finally(() => {
+
+ });
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js b/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
index 2a56a91..4da8f7c 100644
--- a/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
+++ b/force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
@@ -5,22 +5,29 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForRCSubmitButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisWithRC';
-
+import { updateRecord } from 'lightning/uiRecordApi';
+/*
+ * @Description: 鎻愪氦寰呭鎵�
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexRCSubmit extends LightningElement {
- @api recordId;
- IsLoading = true;
- qisReportId;
- qisStatus;
- OSHstaff;
- OSHstaffEmail;
- CancelQISReason;
- Rcid;
- RCinspectionDate;
- QISReplyDay;
- RCproblemnotfound;
- type;
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ qisStatus;
+ OSHstaff;
+ OSHstaffEmail;
+ CancelQISReason;
+ Rcid;
+ RCinspectionDate;
+ QISReplyDay;
+ RCproblemnotfound;
+ type;
err;
- @wire(CurrentPageReference)
+ @wire(CurrentPageReference)
getStateParameters(currentPageReference) {
console.log(111);
console.log(currentPageReference);
@@ -50,7 +57,7 @@
this.RCinspectionDate = result.rCinspectionDate;
this.QISReplyDay = result.qISReplyDay;
this.RCproblemnotfound = result.rCproblemnotfound;
- if (this.qisStatus!='RC妫�娴嬩腑') {
+ if (this.qisStatus!='RC妫�娴嬩腑') {
const evt = new ShowToastEvent({
title : '宸茬粡鎻愪氦瀹℃壒',
message: '',
@@ -58,51 +65,51 @@
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
+ return;
+ }
console.log('this.RCproblemnotfound='+(this.QISReplyDay!=null && this.RCproblemnotfound));
- if (this.CancelQISReason!=null) {
- if (this.qisStatus == 'RC妫�娴嬬敵璇�') {
+ if (this.CancelQISReason==null) {
+ if (this.qisStatus == 'RC妫�娴嬬敵璇�') {
const evt = new ShowToastEvent({
- title : '闇�瑕佸厛鐐瑰嚮锛籓CM鏈嶅姟鏈儴鏀跺埌瀹炵墿锛�',
- message: '',
+ title : '',
+ message: '闇�瑕佸厛鐐瑰嚮锛籓CM鏈嶅姟鏈儴鏀跺埌瀹炵墿锛�',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
- if (this.Rcid ==null) {
+ return;
+ }
+ if (this.Rcid ==null) {
const evt = new ShowToastEvent({
- title : '鍒ゅ畾鎷呭綋蹇呴』濉啓',
- message: '',
+ title : '',
+ message: '鍒ゅ畾鎷呭綋蹇呴』濉啓',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
- if (this.RCinspectionDate == null) {
+ return;
+ }
+ if (this.RCinspectionDate == null) {
const evt = new ShowToastEvent({
- title : 'OCM鏈嶅姟鏈儴杩樻病鏈夋娴嬪畬姣�',
- message: '',
+ title : '',
+ message: 'OCM鏈嶅姟鏈儴杩樻病鏈夋娴嬪畬姣�',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
+ return;
+ }
- if (this.QISReplyDay!=null && this.RCproblemnotfound) {
+ if (this.QISReplyDay!=null && this.RCproblemnotfound) {
const evt = new ShowToastEvent({
- title : '鏈�缁堝垽瀹氭椂锛岃鍙栨秷[鏁呴殰鏈彂鐜扮暀涓嬬户缁瀵焆骞堕�夋嫨[瀵瑰簲鏂规硶]',
- message: '',
+ title : '',
+ message: '鏈�缁堝垽瀹氭椂锛岃鍙栨秷[鏁呴殰鏈彂鐜扮暀涓嬬户缁瀵焆骞堕�夋嫨[瀵瑰簲鏂规硶]',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
+ return;
+ }
LightningConfirm.open({
message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
variant: 'headerless',
@@ -118,7 +125,7 @@
}
});
- }else{
+ }else{
LightningConfirm.open({
message: '涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵',
variant: 'headerless',
@@ -134,10 +141,10 @@
}
});
- }
-
- // this.dispatchEvent(new CloseActionScreenEvent());
-
+ }
+
+ // this.dispatchEvent(new CloseActionScreenEvent());
+
}).catch(error => {
console.log('error='+error);
}).finally(() => {
@@ -145,23 +152,25 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId,
- type: this.type,
- oldQIStatus: this.qisStatus
- }).then(result =>{
- console.log('result'+result);
+ updateQis({
+ recordId: this.recordId,
+ type: this.type,
+ oldQIStatus: this.qisStatus
+ }).then(result =>{
+ console.log('result'+result);
this.err = result;
- if (result!='鎴愬姛') {
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
+ updateRecord({fields: { Id: this.recordId }});
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
diff --git a/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js
index a39ae5f..4465f9e 100644
--- a/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js
+++ b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js
@@ -2,18 +2,26 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/QISReportController.initForlexRCinspectioncompletedateButton';
import updateQis from '@salesforce/apex/QISReportController.updateQisForRCinspectioncompletedate';
+/*
+ * @Description: OCSM鏈嶅姟鏈儴妫�娴嬪畬姣�
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexRCinspectioncompletedate extends LightningElement {
- @api recordId;
- err;
- IsLoading = true;
- qisReportId;
- qisStatus;
- rCinspectionDate;
+ @api recordId;
+ err;
+ IsLoading = true;
+ qisReportId;
+ qisStatus;
+ rCinspectionDate;
- @wire(CurrentPageReference)
+ @wire(CurrentPageReference)
getStateParameters(currentPageReference) {
console.log(111);
console.log(currentPageReference);
@@ -38,27 +46,27 @@
this.qisStatus = result.qIStatus;
this.rCinspectionDate = result.rCinspectionDate;
- if (this.qisStatus =='RC妫�娴嬬敵璇�') {
+ if (this.qisStatus =='RC妫�娴嬬敵璇�') {
const evt = new ShowToastEvent({
- title : '闇�瑕佸厛鐐瑰嚮锛籓CM鏈嶅姟鏈儴鏀跺埌瀹炵墿锛�',
- message: '',
+ title : '',
+ message: '闇�瑕佸厛鐐瑰嚮锛籓CM鏈嶅姟鏈儴鏀跺埌瀹炵墿锛�',
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
- }else if(this.rCinspectionDate != null){
- const evt = new ShowToastEvent({
- title : 'OCM鏈嶅姟鏈儴妫�娴嬪凡缁忓畬姣�',
- message: '',
+ }else if(this.rCinspectionDate != null){
+ const evt = new ShowToastEvent({
+ title : '',
+ message: 'OCM鏈嶅姟鏈儴妫�娴嬪凡缁忓畬姣�',
variant: 'error'
});
- this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }else{
- this.updateQisSubmit();
- }
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }else{
+ this.updateQisSubmit();
+ }
}).catch(error => {
console.log('error='+error);
}).finally(() => {
@@ -66,25 +74,27 @@
});
}
updateQisSubmit(){
- updateQis({
- recordId: this.recordId
- }).then(result =>{
+ updateQis({
+ recordId: this.recordId
+ }).then(result =>{
- console.log('result'+result);
- this.err = result;
- if (result!='鎴愬姛') {
+ console.log('result'+result);
+ this.err = result;
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
+ updateRecord({fields: { Id: this.recordId }});
}
+ updateRecord({fields: { Id: this.recordId }});
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log('error='+error);
- }).finally(() => {
-
- });
+ }).catch(error => {
+ console.log('error='+error);
+ }).finally(() => {
+
+ });
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js b/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
index 359f78a..63636f4 100644
--- a/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
+++ b/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
@@ -4,9 +4,15 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForlexSendQISButton';
import sendSPO from '@salesforce/apex/QISReportController.updateQisForSendQIS';
-
+/*
+ * @Description: 鍙戦�丵IS鍒癝PO
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexSendQIS extends LightningElement {
- @api recordId;
+ @api recordId;
str;
err;
IsLoading = true;
@@ -39,9 +45,9 @@
this.ProfileName = result.profileName;
this.IsSendQIS = result.isSendQIS;
if (this.qisRecordName == '2.OCSM') {
- const evt = new ShowToastEvent({
- title : '涓嶈兘鎻愪氦鍒癝PO',
- message: '璁板綍绫诲瀷涓�'+this.qisRecordName,
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '涓嶈兘鎻愪氦鍒癝PO璁板綍绫诲瀷涓�'+this.qisRecordName,
variant: 'error'
});
this.dispatchEvent(evt);
@@ -50,9 +56,9 @@
}
if (!(this.ProfileName == '绯荤粺绠$悊鍛�' || this.ProfileName == '2F4_鎶�鏈帹杩涢儴' || this.ProfileName == '2F1_鏈嶅姟绐楀彛')) {
- const evt = new ShowToastEvent({
- title : '娌℃湁鏉冮檺鎻愪氦锛岃鑱旂郴绯荤粺绠$悊鍛�',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '娌℃湁鏉冮檺鎻愪氦锛岃鑱旂郴绯荤粺绠$悊鍛�',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -61,9 +67,9 @@
}
if (this.IsSendQIS) {
- const evt = new ShowToastEvent({
- title : '宸叉彁浜ゅ埌SPO锛岃涓嶈閲嶅鎻愪氦',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '宸叉彁浜ゅ埌SPO锛岃涓嶈閲嶅鎻愪氦',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -78,32 +84,32 @@
});
}
send2SPO(){
- sendSPO({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
+ sendSPO({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
this.err = result;
- if (result!='鎴愬姛') {
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
}else{
- const evt = new ShowToastEvent({
- title : '鎻愪氦鎴愬姛锛佽鍦⊿PO绯荤粺涓畬鎴愰��鎹㈣揣鐢宠',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '鎻愪氦鎴愬姛锛佽鍦⊿PO绯荤粺涓畬鎴愰��鎹㈣揣鐢宠',
variant: 'success'
});
- this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
window.location.replace("https://olympus.sharepoint.cn/sites/GSPWF/SitePages/HomePage.aspx");
}
- }).catch(error => {
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
--
Gitblit v1.9.1