From a8628cfe2640797ba9265e9be46c42430d9e7eba Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期一, 26 六月 2023 10:01:44 +0800
Subject: [PATCH] 服务按钮样式调整

---
 force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js                    |   20 
 force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js                                  |    1 
 force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html                    |   10 
 force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.html                  |   10 
 force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js              |   95 +
 force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.js                  |   49 
 force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.css                 |   12 
 force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js                            |    7 
 force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html            |    1 
 force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.html                                    |    1 
 force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.html                      |    2 
 force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.css                   |   12 
 force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js                                      |   58 
 force-app/main/default/lwc/lexCreateRepairFromOnCall/lexCreateRepairFromOnCall.js-meta.xml         |    7 
 force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js                      |    9 
 force-app/main/default/lwc/lexCopyRepair/lexCopyRepair.js                                          |  147 ++
 force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.html                          |    1 
 force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html                                              |    3 
 force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js                          |   54 
 force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.html                                            |    1 
 force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.css                     |   12 
 force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js-meta.xml               |    7 
 force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.html                  |   10 
 force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js-meta.xml                 |   26 
 force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js                                          |    6 
 force-app/main/default/classes/buttonAssetCtl.cls                                                  |   80 +
 force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.html                                    |    1 
 force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js                                              |   49 
 force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js                                                |    2 
 force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js                          |  259 ++++-
 force-app/main/default/classes/otherButtonRepairController.cls                                     |    5 
 force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js-meta.xml |    7 
 force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js                            |    1 
 force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html                    |    1 
 force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js                        |  181 ++-
 force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.html                                        |    3 
 force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js                      |    9 
 force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js                      |   64 
 force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js              |   44 
 force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml     |    6 
 force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html                            |    1 
 force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js                              |  106 +
 force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html                |   10 
 force-app/main/default/lwc/lexMailMessege/lexMailMessege.js                                        |    6 
 force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.html                    |    8 
 force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html                        |    1 
 force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.css                     |   12 
 force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js              |    2 
 force-app/main/default/classes/buttonQISReportCtl.cls                                              |    2 
 force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js                                          |  585 ++++++++----
 force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js                              |   42 
 force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js-meta.xml           |    7 
 force-app/main/default/lwc/lexAddress/lexAddress.js                                                |    4 
 force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html                            |    1 
 force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js          |   41 
 force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.html                |    9 
 force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js                                        |   11 
 force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js                                |    9 
 force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js                  |    9 
 force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js        |    8 
 force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js                                      |  134 +-
 force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml                     |    6 
 force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.css                         |   20 
 force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.css                 |   13 
 force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js                    |  297 ++++--
 force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.css                   |   12 
 force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js                            |   52 
 force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.html                        |   12 
 force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js                      |   11 
 69 files changed, 1,869 insertions(+), 835 deletions(-)

diff --git a/force-app/main/default/classes/buttonAssetCtl.cls b/force-app/main/default/classes/buttonAssetCtl.cls
index 8e8152d..97e170d 100644
--- a/force-app/main/default/classes/buttonAssetCtl.cls
+++ b/force-app/main/default/classes/buttonAssetCtl.cls
@@ -7,8 +7,18 @@
     public static InitData init(String recordId){
         InitData res = new initData();
         try{
-            Asset report =  [SELECT Id,NoPartRiskDate_F__c,Product_ID__c,AccountId,HP_Id__c,Hospital__c,Hospital__r.Id,Department_Class__c,Department_Class__r.Id,Name FROM Asset WHERE Id =: recordId LIMIT 1];
+            Asset report =  [SELECT Order_No__c,SerialNumber,Asset_day__c,Posting_Date__c,InstallDate,Asset_Owner__c,AssetMark__c,Id,NoPartRiskDate_F__c,Product_ID__c,AccountId,HP_Id__c,Hospital__c,Hospital__r.Id,Department_Class__c,Department_Class__r.Id,Name FROM Asset WHERE Id =: recordId LIMIT 1];
             System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+
+            res.AssetMarkC = report.AssetMark__c;
+            res.AssetOwnerC = report.Asset_Owner__c;
+            res.InstallDate = report.InstallDate;
+            res.PostingDateC = report.Posting_Date__c;
+            res.AssetDayC = report.Asset_day__c;
+            res.SerialNumber = report.SerialNumber;
+            res.OrderNoC = report.Order_No__c;
+
+
             res.Id = report.Id;
             res.Name = report.Name;
             res.NoPartRiskDateFC = report.NoPartRiskDate_F__c;
@@ -91,6 +101,16 @@
          }
      }
 
+     @AuraEnabled
+     public static List<QIS_Report__c> selecctQISReportrByFomatToday(String AssetId, Date fomatToday){
+         try {
+           List<QIS_Report__c> accounts = [SELECT id,QIS_Submit_day__c from QIS_Report__c where nonyushohin__c=:AssetId and QIS_Submit_day__c != null and QIS_Submit_day__c >=: fomatToday];
+           return accounts;
+       } catch (Exception e) {
+             throw new AuraHandledException(e.getMessage());
+          }
+      }
+
          //鏌ヨRepair__c
     @AuraEnabled
     public static List<Account> selecctAccountByAccountId(String AccountId){
@@ -102,8 +122,66 @@
          }
      }
 
+     @AuraEnabled
+     public static String  selectCASE(String AssetOwnerC){
+        String res='';
+        if(AssetOwnerC.equals('鐥呴櫌璩囩敚')){
+            res='鐥呴櫌璩囩敚';
+        }else if(AssetOwnerC.equals('璐拱')){
+            res='璐拱';
+        }
+        else if(AssetOwnerC.equals('Olympus')){
+            res='Olympus';
+        }
+        else if(AssetOwnerC.equals('澶囧搧')){
+            res='澶囧搧';
+        }
+        else if(AssetOwnerC.equals('銉兗銈逛細绀�')){
+            res='銉兗銈逛細绀�';
+        }
+        else if(AssetOwnerC.equals('鍏朵粬')){
+            res='鍏朵粬';
+        }
+        else if(AssetOwnerC.equals('缁忛攢鍟嗚祫浜�')){
+            res='缁忛攢鍟嗚祫浜�';
+        }else{
+            res='';
+        }
+        return res;
+      }
+
+      @AuraEnabled
+      public static String selectNullvalue(String InstallDate,String PostingDateC,String AssetDayC){
+        String res='';
+        if(InstallDate!=null){
+            res=InstallDate;
+        }else {
+            if(PostingDateC!=null){
+                res=PostingDateC;
+            }else {
+                res=AssetDayC;
+            }
+        }
+        return res;
+       }
+
     public class InitData{
         @AuraEnabled
+        public String AssetMarkC;
+        @AuraEnabled
+        public String AssetOwnerC;
+        @AuraEnabled
+        public Date InstallDate;
+        @AuraEnabled
+        public Date PostingDateC;
+        @AuraEnabled
+        public Date AssetDayC;
+        @AuraEnabled
+        public String SerialNumber;
+        @AuraEnabled
+        public String OrderNoC;
+
+        @AuraEnabled
         public String Id;
         @AuraEnabled
         public String userID;
diff --git a/force-app/main/default/classes/buttonQISReportCtl.cls b/force-app/main/default/classes/buttonQISReportCtl.cls
index 56d8075..6836d25 100644
--- a/force-app/main/default/classes/buttonQISReportCtl.cls
+++ b/force-app/main/default/classes/buttonQISReportCtl.cls
@@ -164,6 +164,8 @@
                 List<User> user = new List<User>();
                 user = [SELECT Id,Alias,Alias__c from User];
 
+                System.debug('The value of user is: ' + user);
+
                QIS_Report__c rac = new QIS_Report__c();
                rac.Id = QId;
                 rac.QIS_Status__c = 'RC妫�娴嬩腑';
diff --git a/force-app/main/default/classes/otherButtonRepairController.cls b/force-app/main/default/classes/otherButtonRepairController.cls
index 1907e8d..9e58449 100644
--- a/force-app/main/default/classes/otherButtonRepairController.cls
+++ b/force-app/main/default/classes/otherButtonRepairController.cls
@@ -7,12 +7,13 @@
     public static InitData init(String recordId){
         InitData res = new initData();
         try{
-            Repair__c report =  [SELECT AWS_Data_Id__c,SAP_condition__c,DOJ_Status__c,DW_Sign__c,Incharge_Staff__r.Id,URF_Reapir__c,Recall_Correspondence__c,Day_later_30__c,Dealer__r.Id,Status__c,URFLimitSerial__c,Maintenance_Contract__r.Id,FSE_ApplyForRepair_time__c,Delivered_Product__r.Id,Asset_Owner__c,State_Hospital__c,is_aohui_product__c,Sales_Dept_HP__c,RCCD__c,Quick_Repair_Sign__c,RepairSource__c,FSE_State__c,VM_Maintenance_Contract__c,Maintenance_Contract__c,NewProductGuarante_Txt__c,Number_of_EffectiveContract__c,Detailed_Address__c,Status1__c,Rental_Apply_Equipment_Set_Detail__c,Rental_Apply_Equipment_Set_Detail_Id__c,Latest_Collect_Date_Priority__c,if_Rental_Apply__c,Offer_Rental_New__c,ProduceCompany_hand__c,CFDA_No_Hand__c,MBC_AwareDate__c,InsReport__c,QIS_ID__c,On_Call_ID__c,RepairSubOrder__c,ProductFailureRelated__c,Delay15Min__c,ProblemOccurredSelect__c,Repair_Source__c ,Failure_Occurrence_Date__c ,MaintenanceContractType__c ,OperationOrExaminationName__c ,WhatProject__c ,FailureQInHospital__c ,ReportAdverseEvents__c ,InformationFrom__c ,AfterFailureInformation__c ,ProblemOccurred__c ,SupportingProducts__c ,ifDeadHurt__c ,UseFailProductFinish__c ,DelayReportReason__c ,BreakORFallOff__c ,DateReceiptQuestions__c ,DeliveryLogisticsAnnotation__c ,DeliveryLogisticsNo__c ,engineerSendDate__c ,DeliveryLogisticsMode__c ,RepairApplicantDepartment__c ,RepairApplicantHospital__c ,RepairApplicant__c ,Repair_Detail__c ,Returns_Product_way__c ,work_location_select__c ,On_site_repair__c ,SalesOfficeCode_selection__c ,Incharge_Staff_Contact__c ,Incharge_Staff__c ,Dealer__c ,RepairCostType__c ,Account__c,Department_Class__c ,Hospital__c ,PaperRepairRequestNo__c ,part_arrangement_complete__c,Repair_Shipped_Date__c,OCSMAdministrativeReportStatus__c,Incharge_Staff_Email__c,Name,HP_Name__c,Delivered_Product__c,
+            Repair__c report =  [SELECT HP_active__c,AWS_Data_Id__c,SAP_condition__c,DOJ_Status__c,DW_Sign__c,Incharge_Staff__r.Id,URF_Reapir__c,Recall_Correspondence__c,Day_later_30__c,Dealer__r.Id,Status__c,URFLimitSerial__c,Maintenance_Contract__r.Id,FSE_ApplyForRepair_time__c,Delivered_Product__r.Id,Asset_Owner__c,State_Hospital__c,is_aohui_product__c,Sales_Dept_HP__c,RCCD__c,Quick_Repair_Sign__c,RepairSource__c,FSE_State__c,VM_Maintenance_Contract__c,Maintenance_Contract__c,NewProductGuarante_Txt__c,Number_of_EffectiveContract__c,Detailed_Address__c,Status1__c,Rental_Apply_Equipment_Set_Detail__c,Rental_Apply_Equipment_Set_Detail_Id__c,Latest_Collect_Date_Priority__c,if_Rental_Apply__c,Offer_Rental_New__c,ProduceCompany_hand__c,CFDA_No_Hand__c,MBC_AwareDate__c,InsReport__c,QIS_ID__c,On_Call_ID__c,RepairSubOrder__c,ProductFailureRelated__c,Delay15Min__c,ProblemOccurredSelect__c,Repair_Source__c ,Failure_Occurrence_Date__c ,MaintenanceContractType__c ,OperationOrExaminationName__c ,WhatProject__c ,FailureQInHospital__c ,ReportAdverseEvents__c ,InformationFrom__c ,AfterFailureInformation__c ,ProblemOccurred__c ,SupportingProducts__c ,ifDeadHurt__c ,UseFailProductFinish__c ,DelayReportReason__c ,BreakORFallOff__c ,DateReceiptQuestions__c ,DeliveryLogisticsAnnotation__c ,DeliveryLogisticsNo__c ,engineerSendDate__c ,DeliveryLogisticsMode__c ,RepairApplicantDepartment__c ,RepairApplicantHospital__c ,RepairApplicant__c ,Repair_Detail__c ,Returns_Product_way__c ,work_location_select__c ,On_site_repair__c ,SalesOfficeCode_selection__c ,Incharge_Staff_Contact__c ,Incharge_Staff__c ,Dealer__c ,RepairCostType__c ,Account__c,Department_Class__c ,Hospital__c ,PaperRepairRequestNo__c ,part_arrangement_complete__c,Repair_Shipped_Date__c,OCSMAdministrativeReportStatus__c,Incharge_Staff_Email__c,Name,HP_Name__c,Delivered_Product__c,
             Repair_Product_Serial_No__c,Service_Repair_No__c,Repair_Firstestimated_Date__c,
             Repair_Estimated_Date__c,RC_information__c,Id,OCSMAdministrativeReportNumber__c,
             OCSMAdministrativeReportDate__c,Aware_date__c,PAE_Determine__c,ETQ_UPLOAD_STATUS__c,
             AE_DetermineResult__c,PAE_DetermineAC__c,Repair_Inspection_Date__c,Contain_UseRSA__c FROM Repair__c WHERE Id =: recordId LIMIT 1];
             System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+            res.HPActiveC = report.HP_active__c;
             res.detailedAddress = report.Detailed_Address__c;
             res.numberofEffectiveContract = report.Number_of_EffectiveContract__c;
             res.newProductGuaranteTxt = report.NewProductGuarante_Txt__c;
@@ -430,6 +431,8 @@
 
     public class InitData{
         @AuraEnabled
+        public String HPActiveC;
+        @AuraEnabled
         public String detailedAddress;
         @AuraEnabled
         public String numberofEffectiveContract;
diff --git a/force-app/main/default/lwc/lexAddress/lexAddress.js b/force-app/main/default/lwc/lexAddress/lexAddress.js
index 33a766b..dbc0d28 100644
--- a/force-app/main/default/lwc/lexAddress/lexAddress.js
+++ b/force-app/main/default/lwc/lexAddress/lexAddress.js
@@ -50,9 +50,7 @@
             }
         }).catch(error => {
             console.log(error);
-        }).finally(() => {
-
-        });
+        })
     }
 
     //鐩磋繑鏀惰揣鍦板潃
diff --git a/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js b/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
index 3cc9064..fd53bdb 100644
--- a/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
+++ b/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
@@ -55,7 +55,6 @@
         var status = this.StatusC;
         if (status != '寰呭鐞�') {
             this.ShowToastEvent("鎶ヤ慨瀛愬崟鐨勭姸鎬佷笉鏄� 寰呭鐞� 鏃犳硶鐢宠淇悊", "error")
-            // alert('鎶ヤ慨瀛愬崟鐨勭姸鎬佷笉鏄� 寰呭鐞� 鏃犳硶鐢宠淇悊');
             return;
         }
         var url = '/apex/ChoiceAsset?Id=' + this.Id + '&Type=Repair';
diff --git a/force-app/main/default/lwc/lexCopyRepair/lexCopyRepair.js b/force-app/main/default/lwc/lexCopyRepair/lexCopyRepair.js
index 954826c..d1a046a 100644
--- a/force-app/main/default/lwc/lexCopyRepair/lexCopyRepair.js
+++ b/force-app/main/default/lwc/lexCopyRepair/lexCopyRepair.js
@@ -11,8 +11,14 @@
 } from 'lightning/actions';
 import init from '@salesforce/apex/otherButtonRepairController.init';
 import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import {
+	NavigationMixin
+} from 'lightning/navigation';
+import {
+	encodeDefaultFieldValues
+} from 'lightning/pageReferenceUtils';
 
-export default class LexCopyRepair extends LightningElement {
+export default class LexCopyRepair extends NavigationMixin(LightningElement)  {
     @api recordId;
     str;
     IsLoading = true;
@@ -157,7 +163,6 @@
                 this.Status1C = result.Status1C;
 
                 this.CopyRepair();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -168,40 +173,112 @@
     CopyRepair() {
         var Status = this.Status1C;
         if (Status == '0.鍒犻櫎' || Status == '0.鍙栨秷') {
-            var url = "/a0J/e?00N10000009H2fa=" + this.Name + "&CF00N10000002Dx1X=" + this.DeliveredProductC +
-                "&CF00N10000002Dx1X_lkid=" + this.DeliveredProductC + "&00N10000006P1dw=" + this.PaperRepairRequestNoC +
-                "&CF00N10000002Dx66=" + this.HospitalC + "&CF00N10000002Dx5t=" + this.DepartmentClassC +
-                "&CF00N10000002Dx5n=" + this.AccountC + "&00N10000008rG4p=" + this.RepairCostTypeC +
-                "&CF00N10000006P1eV=" + this.DealerC + "&CF00N10000002EMHw=" + this.InchargeStaffC +
-                "&CF00N10000005HDvq=" + this.InchargeStaffContactC + "&00N10000006P6SM=" + this.SalesOfficeCodeSelectionC +
-                "&00N10000002F6dW=" + this.OnSiteRepairC + "&00N10000006P6Rn=" + this.workLocationSelectC +
-                "&00N10000009i1Z2=" + this.ReturnsProductWayC + "&00N10000002Dx6I=" + this.RepairDetailC +
-                "&00N10000009H1rQ=" + this.RepairApplicantC + "&00N10000009H1rP=" + this.RepairApplicantHospitalC +
-                "&00N10000009H1rO=" + this.RepairApplicantDepartmentC + "&00N10000009H1rB=" + this.DeliveryLogisticsModeC +
-                "&00N10000009H1rk=" + this.engineerSendDateC + "&00N10000009H1rC=" + this.DeliveryLogisticsNoC +
-                "&00N10000009H1rA=" + this.DeliveryLogisticsAnnotationC + "&00N10000008rsVQ=" + this.DateReceiptQuestionsC +
-                "&00N10000008rsVN=" + this.BreakORFallOffC + "&00N10000008rsVS=" + this.DelayReportReasonC +
-                "&00N10000008rsW5=" + this.UseFailProductFinishC + "&00N10000008rsW7=" + this.ifDeadHurtC +
-                "&00N10000008rsW4=" + this.SupportingProductsC + "&00N10000008rsVv=" + this.ProblemOccurredC +
-                "&00N10000008rsVL=" + this.AfterFailureInformationC + "&00N10000009hsvI=" + this.ProblemOccurredSelectC +
-                "&00N10000008rsVR=" + this.Delay15MinC + "&00N10000008rsVw=" + this.ProductFailureRelatedC +
-                "&00N10000008rsVZ=" + this.InformationFromC + "&00N10000008rsW2=" + this.ReportAdverseEventsC +
-                "&00N10000008rsVT=" + this.FailureQInHospitalC + "&00N10000008rsW6=" + this.WhatProjectC +
-                "&00N10000008rsVk=" + this.OperationOrExaminationNameC + "&00N10000008rWce=" + this.MaintenanceContractTypeC +
-                "&00N10000002Dx5y=" + this.FailureOccurrenceDateC + "&00N10000002FH86=" + this.RepairSourceC +
-                "&CF00N10000009H1rR=" + this.RepairSubOrderC + "&CF00N10000002FIJU=" + this.OnCallIDC +
-                "&CF00N10000002FIJZ=" + this.QISIDC + "&CF00N10000006PRCp=" + this.InsReportC +
-                "&00N10000008rsVM=" + this.AwareDateC + "&00N10000009GmI6=" + this.OCSMAdministrativeReportNumberC +
-                "&00N10000009GmI4=" + this.MBCAwareDateC + "&00N10000009GmI5=" + this.OCSMAdministrativeReportDateC +
-                "&00N10000009GmI7=" + this.OCSMAdministrativeReportStatusC + "&00N100000095siE=" + this.CFDANoHandC +
-                "&00N100000095shz=" + this.ProduceCompanyHandC + "&00N100000098PV9=" + this.OfferRentalNewC +
-                "&00N100000098PVA=" + this.ifRentalApplyC + "&00N10000006gZ4g=" + this.LatestCollectDatePriorityC +
-                "&00N10000007MNFW=" + this.RentalApplyEquipmentSetDetailIdC +
-                "&CF00N10000007MNFX=" + this.RentalApplyEquipmentSetDetailC + "&retURL=%2F" + this.Id;
-            window.open(url);
+            const url = encodeDefaultFieldValues({
+                Old_Name__c: this.Name,
+                Delivered_Product__c: this.DeliveredProductC,
+                PaperRepairRequestNo__c: this.PaperRepairRequestNoC,
+                Hospital__c: this.HospitalC,
+                Department_Class__c: this.DepartmentClassC,
+                Account__c: this.AccountC,
+                RepairCostType__c: this.RepairCostTypeC,
+                Dealer__c: this.DealerC,
+                Incharge_Staff__c: this.InchargeStaffC,
+                Incharge_Staff_Contact__c: this.InchargeStaffContactC,
+                SalesOfficeCode_selection__c: this.SalesOfficeCodeSelectionC,
+                On_site_repair__c: this.OnSiteRepairC,
+                work_location_select__c : this.workLocationSelectC,
+                Returns_Product_way__c : this.ReturnsProductWayC,
+                Repair_Detail__c : this.RepairDetailC,
+                RepairApplicant__c : this.RepairApplicantC,
+                RepairApplicantHospital__c : this.RepairApplicantHospitalC,
+                RepairApplicantDepartment__c : this.RepairApplicantDepartmentC,
+                DeliveryLogisticsMode__c : this.DeliveryLogisticsModeC,
+                engineerSendDate__c : this.engineerSendDateC,
+                DeliveryLogisticsNo__c : this.DeliveryLogisticsNoC,
+                DeliveryLogisticsAnnotation__c : this.DeliveryLogisticsAnnotationC,
+                DateReceiptQuestions__c : this.DateReceiptQuestionsC,
+                BreakORFallOff__c : this.BreakORFallOffC,
+                DelayReportReason__c : this.DelayReportReasonC,
+                UseFailProductFinish__c : this.UseFailProductFinishC,
+                ifDeadHurt__c  : this.ifDeadHurtC,
+                SupportingProducts__c  : this.SupportingProductsC,
+                ProblemOccurred__c : this.ProblemOccurredC,
+                AfterFailureInformation__c : this.AfterFailureInformationC,
+                ProblemOccurredSelect__c : this.ProblemOccurredSelectC,
+                Delay15Min__c: this.Delay15MinC,
+                ProductFailureRelated__c : this.ProductFailureRelatedC,
+                InformationFrom__c : this.InformationFromC,
+                ReportAdverseEvents__c : this.ReportAdverseEventsC,
+                FailureQInHospital__c : this.FailureQInHospitalC,
+                WhatProject__c : this.WhatProjectC,
+                OperationOrExaminationName__c : this.OperationOrExaminationNameC,
+                MaintenanceContractType__c : this.MaintenanceContractTypeC,
+                Failure_Occurrence_Date__c : this.FailureOccurrenceDateC,
+                Repair_Source__c : this.RepairSourceC,
+                RepairSubOrder__c : this.RepairSubOrderC,
+                On_Call_ID__c : this.OnCallIDC,
+                QIS_ID__c : this.QISIDC,
+                InsReport__c : this.InsReportC,
+                Aware_date__c : this.AwareDateC,
+                OCSMAdministrativeReportNumber__c : this.OCSMAdministrativeReportNumberC,
+                MBC_AwareDate__c : this.MBCAwareDateC,
+                OCSMAdministrativeReportDate__c : this.OCSMAdministrativeReportDateC,
+                OCSMAdministrativeReportStatus__c : this.OCSMAdministrativeReportStatusC,
+                CFDA_No_Hand__c : this.CFDANoHandC,
+                ProduceCompany_hand__c : this.ProduceCompanyHandC,
+                Offer_Rental_New__c : this.OfferRentalNewC,
+                if_Rental_Apply__c : this.ifRentalApplyC,
+                Latest_Collect_Date_Priority__c : this.LatestCollectDatePriorityC,
+                Rental_Apply_Equipment_Set_Detail_Id__c : this.RentalApplyEquipmentSetDetailIdC,
+                Rental_Apply_Equipment_Set_Detail__c : this.RentalApplyEquipmentSetDetailC,
+            });
+            this[NavigationMixin.Navigate]({
+                type: 'standard__objectPage',
+                attributes: {
+                    objectApiName: 'Repair__c',
+                    actionName: 'new'
+                },
+                state: {
+                    nooverride: '1',
+                    defaultFieldValues: url
+                }
+            });
+            this.dispatchEvent(new CloseActionScreenEvent());
+
+            // var url = "/a0J/e?00N10000009H2fa=" + this.Name + "&CF00N10000002Dx1X=" + this.DeliveredProductC +
+            //     "&CF00N10000002Dx1X_lkid=" + this.DeliveredProductC + "&00N10000006P1dw=" + this.PaperRepairRequestNoC +
+            //     "&CF00N10000002Dx66=" + this.HospitalC + "&CF00N10000002Dx5t=" + this.DepartmentClassC +
+            //     "&CF00N10000002Dx5n=" + this.AccountC + "&00N10000008rG4p=" + this.RepairCostTypeC +
+            //     "&CF00N10000006P1eV=" + this.DealerC + "&CF00N10000002EMHw=" + this.InchargeStaffC +
+            //     "&CF00N10000005HDvq=" + this.InchargeStaffContactC + "&00N10000006P6SM=" + this.SalesOfficeCodeSelectionC +
+            //     "&00N10000002F6dW=" + this.OnSiteRepairC + "&00N10000006P6Rn=" + this.workLocationSelectC +
+            //     "&00N10000009i1Z2=" + this.ReturnsProductWayC + "&00N10000002Dx6I=" + this.RepairDetailC +
+            //     "&00N10000009H1rQ=" + this.RepairApplicantC + "&00N10000009H1rP=" + this.RepairApplicantHospitalC +
+            //     "&00N10000009H1rO=" + this.RepairApplicantDepartmentC + "&00N10000009H1rB=" + this.DeliveryLogisticsModeC +
+            //     "&00N10000009H1rk=" + this.engineerSendDateC + "&00N10000009H1rC=" + this.DeliveryLogisticsNoC +
+            //     "&00N10000009H1rA=" + this.DeliveryLogisticsAnnotationC + "&00N10000008rsVQ=" + this.DateReceiptQuestionsC +
+            //     "&00N10000008rsVN=" + this.BreakORFallOffC + "&00N10000008rsVS=" + this.DelayReportReasonC +
+            //     "&00N10000008rsW5=" + this.UseFailProductFinishC + "&00N10000008rsW7=" + this.ifDeadHurtC +
+            //     "&00N10000008rsW4=" + this.SupportingProductsC + "&00N10000008rsVv=" + this.ProblemOccurredC +
+            //     "&00N10000008rsVL=" + this.AfterFailureInformationC + "&00N10000009hsvI=" + this.ProblemOccurredSelectC +
+            //     "&00N10000008rsVR=" + this.Delay15MinC + "&00N10000008rsVw=" + this.ProductFailureRelatedC +
+            //     "&00N10000008rsVZ=" + this.InformationFromC + "&00N10000008rsW2=" + this.ReportAdverseEventsC +
+            //     "&00N10000008rsVT=" + this.FailureQInHospitalC + "&00N10000008rsW6=" + this.WhatProjectC +
+            //     "&00N10000008rsVk=" + this.OperationOrExaminationNameC + "&00N10000008rWce=" + this.MaintenanceContractTypeC +
+            //     "&00N10000002Dx5y=" + this.FailureOccurrenceDateC + "&00N10000002FH86=" + this.RepairSourceC +
+            //     "&CF00N10000009H1rR=" + this.RepairSubOrderC + "&CF00N10000002FIJU=" + this.OnCallIDC +
+            //     "&CF00N10000002FIJZ=" + this.QISIDC + "&CF00N10000006PRCp=" + this.InsReportC +
+            //     "&00N10000008rsVM=" + this.AwareDateC + "&00N10000009GmI6=" + this.OCSMAdministrativeReportNumberC +
+            //     "&00N10000009GmI4=" + this.MBCAwareDateC + "&00N10000009GmI5=" + this.OCSMAdministrativeReportDateC +
+            //     "&00N10000009GmI7=" + this.OCSMAdministrativeReportStatusC + "&00N100000095siE=" + this.CFDANoHandC +
+            //     "&00N100000095shz=" + this.ProduceCompanyHandC + "&00N100000098PV9=" + this.OfferRentalNewC +
+            //     "&00N100000098PVA=" + this.ifRentalApplyC + "&00N10000006gZ4g=" + this.LatestCollectDatePriorityC +
+            //     "&00N10000007MNFW=" + this.RentalApplyEquipmentSetDetailIdC +
+            //     "&CF00N10000007MNFX=" + this.RentalApplyEquipmentSetDetailC + "&retURL=%2F" + this.Id;
+            // window.open(url);
         } else {
-            this.ShowToastEvent("璇ョ姸鎬佷笅涓嶈兘澶嶅埗", "error")
-            // alert("璇ョ姸鎬佷笅涓嶈兘澶嶅埗");
+            this.ShowToastEvent("璇ョ姸鎬佷笅涓嶈兘澶嶅埗", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
         }
     }
 
diff --git a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.css b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.css
new file mode 100644
index 0000000..abf7b01
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.css
@@ -0,0 +1,13 @@
+
+.toast{
+	border: 1px solid #c9c9c9;
+	border-radius: 10px; 
+	width: 50%;
+	margin: 0 auto;
+	font-size: 18px;
+	font-weight: bold;
+	padding: 10px 20px;
+	background: #EA001E;
+	display: flex;
+	color: white;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html
index d044dbb..05d41a6 100644
--- a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html
+++ b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html
@@ -2,4 +2,12 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
     </div>
-</template>
\ No newline at end of file
+    <div if:false={IsLoading} class="toast">
+		<span style="padding: 10px;">{msg}</span>
+		<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+                <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+                    title="Close"  style="color: black;"></lightning-icon>
+              <span class="slds-assistive-text">Close</span>
+        </button>
+	</div>
+</template>
diff --git a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js
index fbf624c..762c054 100644
--- a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js
+++ b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js
@@ -17,6 +17,7 @@
     IsLoading = true;
     Id;
     Status;
+    msg;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -35,7 +36,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.Status = result.Status;
 
@@ -53,7 +53,12 @@
         if (status == '鍏紑涓�') {
             window.open("/apex/AssessmentReport?camid=" + this.Id, "_top");
         } else {
-            alert("鍙湁鎵瑰噯鍚庢墠鑳藉垱寤烘姤鍛�!");
+            this.msg = '鍙湁鎵瑰噯鍚庢墠鑳藉垱寤烘姤鍛�!';
+            this.IsLoading = false;
         }
     }
+
+    closeAction() {
+        window.history.go(-1);
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.css b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.css
new file mode 100644
index 0000000..e9fe316
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.css
@@ -0,0 +1,12 @@
+.toast{
+	border: 1px solid #c9c9c9;
+	border-radius: 10px; 
+	width: 50%;
+	margin: 0 auto;
+	font-size: 18px;
+	font-weight: bold;
+	padding: 10px 20px;
+	background: #EA001E;
+	display: flex;
+	color: white;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html
index d044dbb..05d41a6 100644
--- a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html
+++ b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html
@@ -2,4 +2,12 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
     </div>
-</template>
\ No newline at end of file
+    <div if:false={IsLoading} class="toast">
+		<span style="padding: 10px;">{msg}</span>
+		<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+                <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+                    title="Close"  style="color: black;"></lightning-icon>
+              <span class="slds-assistive-text">Close</span>
+        </button>
+	</div>
+</template>
diff --git a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js
index df27f2b..a1fe2e8 100644
--- a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js
+++ b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js
@@ -17,6 +17,7 @@
     IsLoading = true;
     Id;
     Status;
+    msg;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -35,7 +36,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.Status = result.Status;
 
@@ -53,7 +53,12 @@
         if (status == '鍏紑涓�') {
             window.open("/apex/InstructReport?camid=" + this.Id, "_top");
         } else {
-            alert("鍙湁鎵瑰噯鍚庢墠鑳藉垱寤烘姤鍛�!")
+            this.msg = '鍙湁鎵瑰噯鍚庢墠鑳藉垱寤烘姤鍛�!';
+            this.IsLoading = false;
         }
     }
+
+    closeAction() {
+        window.history.go(-1);
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
index 0f54a7c..e49d936 100644
--- a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
+++ b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js
@@ -10,8 +10,14 @@
     CloseActionScreenEvent
 } from 'lightning/actions';
 import init from '@salesforce/apex/buttonAccountCtl.init';
+import {
+    NavigationMixin
+} from 'lightning/navigation';
+import {
+    encodeDefaultFieldValues
+} from 'lightning/pageReferenceUtils';
 
-export default class LexCreateNewServiceContract extends LightningElement {
+export default class LexCreateNewServiceContract extends NavigationMixin(LightningElement) {
     @api recordId;
     str;
     IsLoading = true;
@@ -57,21 +63,31 @@
 
     // 鏂板缓鏂版湇鍔″悎鍚�	
     CreateNewServiceContract() {
-        var Hospital = this.HospitalC;
-        var Hospitalid = this.HospitalIdC;
-        var Department = this.DepartmentClassC;
-        var Departmentid = this.DepartmentClassIdC;
-        var accountname = this.Name;
-        var accountid = this.Id;
+        const url = encodeDefaultFieldValues({
+            Hospital__c: this.HospitalC,
+            Department_Class__c: this.DepartmentClassC,
+            Department__c: this.Id
+        });
+        this[NavigationMixin.Navigate]({
+            type: 'standard__objectPage',
+            attributes: {
+                objectApiName: 'Maintenance_Contract__c',
+                actionName: 'new'
+            },
+            state: {
+                nooverride: '1',
+                defaultFieldValues: url
+            }
+        });
+        this.dispatchEvent(new CloseActionScreenEvent());
 
+        // var url = 'a0H/e?CF00N10000002Dx56=' + Hospital + '&CF00N10000002Dx56_lkid=' +
+        //     Hospitalid + '&CF00N10000002Dx4p=' + Department + '&CF00N10000002Dx4p_lkid=' +
+        //     Departmentid + '&CF00N10000002Dx4q=' + accountname + '&CF00N10000002Dx4q_lkid=' +
+        //     accountid + '&RecordType=01210000000gTYq';
 
-        var url = 'a0H/e?CF00N10000002Dx56=' + Hospital + '&CF00N10000002Dx56_lkid=' +
-            Hospitalid + '&CF00N10000002Dx4p=' + Department + '&CF00N10000002Dx4p_lkid=' +
-            Departmentid + '&CF00N10000002Dx4q=' + accountname + '&CF00N10000002Dx4q_lkid=' +
-            accountid + '&RecordType=01210000000gTYq';
+        //     console.log(url);
 
-            console.log(url);
-
-        window.top.location.href = url;
+        // window.top.location.href = url;
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml
index 3da8f7a..12078fb 100644
--- a/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml
+++ b/force-app/main/default/lwc/lexCreateNewServiceContract/lexCreateNewServiceContract.js-meta.xml
@@ -9,10 +9,4 @@
 		<target>lightning__RecordAction</target>
 		<target>lightning__FlowScreen</target> 
 	</targets>
-	 <!-- 瀹氫箟鍙橀噺 --> 
-    <targetConfigs> 
-        <targetConfig targets="lightning__FlowScreen"> 
-            <property name="recordId" type="String" label="recordId"/>
-        </targetConfig> 
-    </targetConfigs> 
 </LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.css b/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.css
index 8d634cd..e9fe316 100644
--- a/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.css
+++ b/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.css
@@ -1,10 +1,12 @@
-.createEmailHolder{
-    position: relative;
-    display: inline-block;
-    width: 80px;
-    height: 80px;
-    text-align: center;
-}
-.container .uiContainerManager{
-	display: none !important;
+.toast{
+	border: 1px solid #c9c9c9;
+	border-radius: 10px; 
+	width: 50%;
+	margin: 0 auto;
+	font-size: 18px;
+	font-weight: bold;
+	padding: 10px 20px;
+	background: #EA001E;
+	display: flex;
+	color: white;
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.html b/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.html
index 61d9b05..0c84cf0 100644
--- a/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.html
+++ b/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.html
@@ -1,5 +1,15 @@
 <template>
-    <div class="createEmailHolder" if:true={IsLoading}>
+    <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>    </div>
     </div>
+    <div if:false={IsLoading} class="toast">
+		<span style="padding: 10px;">{msg}</span>
+		<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+                <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+                    title="Close"  style="color: black;"></lightning-icon>
+              <span class="slds-assistive-text">Close</span>
+        </button>
+	</div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js b/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js
index e27813d..2bab6b2 100644
--- a/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js
+++ b/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js
@@ -1,60 +1,219 @@
-import { LightningElement,wire,track,api} from 'lwc';
-import { CurrentPageReference } from "lightning/navigation";
-import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
-import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-import init  from '@salesforce/apex/QISReportController.initForlexCreateQISFromAssetButton';
-import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
-import { updateRecord } from 'lightning/uiRecordApi';
+import {
+	LightningElement,
+	wire,
+	api
+} from 'lwc';
+import {
+	CurrentPageReference
+} from "lightning/navigation";
+import {
+	CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/buttonAssetCtl.init';
+import selecctRepairByFomatToday from '@salesforce/apex/buttonAssetCtl.selecctRepairByFomatToday';
+import selecctQISReportrByFomatToday from '@salesforce/apex/buttonAssetCtl.selecctQISReportrByFomatToday';
+import selectCASE from '@salesforce/apex/buttonAssetCtl.selectCASE';
+import selectNullvalue from '@salesforce/apex/buttonAssetCtl.selectNullvalue';
+import LightningConfirm from 'lightning/confirm';
+import {
+	NavigationMixin
+} from 'lightning/navigation';
+import {
+	encodeDefaultFieldValues
+} from 'lightning/pageReferenceUtils';
+import {
+	ShowToastEvent
+} from 'lightning/platformShowToastEvent';
 
-export default class lexCreateQISFromAsset extends LightningElement {
+export default class lexCreateQISFromAsset extends NavigationMixin(LightningElement) {
 	@api recordId;
+	str;
 	IsLoading = true;
-	Old_Repair_Name;
+	Id;
+	day1;
+	AssetMarkC;
+	AssetOwnerC;
+	InstallDate;
+	PostingDateC;
+	AssetDayC;
+	SerialNumber;
+	OrderNoC;
+	ProductIDC;
+	HospitalId;
+	HospitalC;
+	DepartmentClassId;
+	DepartmentClassC;
+	Name;
+	AccountId;
+	msg;
+	Old_Repair_Name = '';
+	Instration_date_consumable = null;
+	Customer_asset_or_loaner = '';
+	fomatToday;
 
 	@wire(CurrentPageReference)
-     getStateParameters(currentPageReference) {
-             console.log(111);
-             console.log(currentPageReference);
-
-         if (currentPageReference) {
-           const urlValue = currentPageReference.state.recordId;
-           if (urlValue) {
-             let str = `${urlValue}`;
-             console.log("str");
-             console.log(str);
-             this.recordId = str;
-           }
-         }
-    }
-
-
-    connectedCallback(){
-		console.log(this.recordId);
-		init({recordId:this.recordId}).then(result=>{
-			console.log(result);
-			if(result!=null){
-				if (result.id!=null) {
-					var boolday=confirm('璇风‘璁ゆ浠舵槸鍚﹀睘浜�10澶╁唴閲嶅鎶ュ憡锛屽鏋滄槸锛岃浣跨敤鍘烸IS閲岀殑澶嶅埗鍔熻兘閲嶆柊鎻愪氦銆�');
-					if(!boolday){
-						return;
-					} 
-				}
-				if (result.repId!=null) {
-					var boolday=confirm('璇风‘璁ゆ浠舵槸鍚﹀睘浜�10澶╁唴閲嶅鎶ュ憡锛屽鏋滄槸锛岄渶鎸夌収鍘熷厛鐨勭淮淇俊鎭~鍐欍��');
-					if(!boolday){
-						return;
-					}
-				}
-				
+	getStateParameters(currentPageReference) {
+		if (currentPageReference) {
+			const urlValue = currentPageReference.state.recordId;
+			if (urlValue) {
+				let str = `${urlValue}`;
+				this.recordId = str;
 			}
-		}).catch(err=>{
-			console.log("error:");
-			console.log(err);
-		}).finally(()=>{
-
-		});
+		}
 	}
 
+	connectedCallback() {
+		init({
+			recordId: this.recordId
+		}).then(result => {
+			console.log(result);
+			if (result != null) {
+				this.Id = result.Id;
+				this.day1 = result.day1;
+				this.AssetMarkC = result.AssetMarkC;
+				this.AssetOwnerC = result.AssetOwnerC;
+				this.InstallDate = result.InstallDate;
+				this.PostingDateC = result.PostingDateC;
+				this.AssetDayC = result.AssetDayC;
+				this.SerialNumber = result.SerialNumber;
+				this.OrderNoC = result.OrderNoC;
+				this.ProductIDC = result.ProductIDC;
+				this.HospitalId = result.HospitalId;
+				this.HospitalC = result.HospitalC;
+				this.DepartmentClassId = result.DepartmentClassId;
+				this.DepartmentClassC = result.DepartmentClassC;
+				this.Name = result.Name;
+				this.AccountId = result.AccountId;
 
+
+				this.CreateQISFromAsset();
+			}
+		}).catch(error => {
+			console.log(error);
+		})
+	}
+
+	// 鏂板缓鎺堣/鑰冩牳鎶ュ憡	
+	CreateQISFromAsset() {
+		this.fomatToday = this.day1;
+		selecctQISReportrByFomatToday({
+			AssetId: this.Id,
+			fomatToday: this.fomatToday
+		}).then(records => {
+			console.log(records);
+			if (this.AssetMarkC == null || this.AssetMarkC == undefined) {
+				this.ShowToastEvent('淇濇湁璁惧鏍囪涓虹┖锛岃鑱旂郴绠$悊鍛樿ˉ鍏呫��!', "error");
+				this.dispatchEvent(new CloseActionScreenEvent());
+				return;
+			}
+			if (records.length >= 1) {
+				this.handleConfirmClick01('璇风‘璁ゆ浠舵槸鍚﹀睘浜�10澶╁唴閲嶅鎶ュ憡锛屽鏋滄槸锛岃浣跨敤鍘烸IS閲岀殑澶嶅埗鍔熻兘閲嶆柊鎻愪氦銆�');
+			} else {
+				this.ss();
+			}
+		})
+	}
+
+	ss() {
+		selecctRepairByFomatToday({
+			AssetId: this.Id,
+			fomatToday: this.fomatToday
+		}).then(records2 => {
+			if (this.AssetMarkC == '鑰楁潗') {
+				selectCASE({
+					AssetOwnerC: this.AssetOwnerC
+				}).then(result => {
+					console.log(result);
+					this.Customer_asset_or_loaner = result;
+				})
+
+				selectNullvalue({
+					InstallDate: this.InstallDate,
+					PostingDateC: this.PostingDateC,
+					AssetDayC: this.AssetDayC
+				}).then(result => {
+					console.log(result);
+					this.Instration_date_consumable = result;
+
+				})
+			}
+			if (records2.length >= 1) {
+				this.Old_Repair_Name = records2[0].Name;
+			}
+			if (records2.length >= 1) {
+				this.handleConfirmClick02('璇风‘璁ゆ浠舵槸鍚﹀睘浜�10澶╁唴閲嶅鎶ュ憡锛屽鏋滄槸锛岄渶鎸夌収鍘熷厛鐨勭淮淇俊鎭~鍐欍��');
+			} else {
+				this.ll();
+			}
+		})
+	}
+
+	ll() {
+
+		const url = encodeDefaultFieldValues({
+			Name: "*",
+			Hospital__c: this.HospitalId,
+			Department_Class__c: this.DepartmentClassId,
+			nonyushohin__c: this.Id,
+			Generation_Source__c: "淇濇湁璁惧",
+			Lots_No__c: this.SerialNumber,
+			sell__c: this.Customer_asset_or_loaner,
+			Instration_date_consumable__c: this.Instration_date_consumable,
+			consumable__c: this.ProductIDC,
+			contract_number_ET__c: this.OrderNoC,
+			Hospital_Department__c: this.AccountId,
+			Old_Repair_Name__c: this.Old_Repair_Name
+		});
+		this[NavigationMixin.Navigate]({
+			type: 'standard__objectPage',
+			attributes: {
+				objectApiName: 'QIS_Report__c',
+				actionName: 'new'
+			},
+			state: {
+				nooverride: '1',
+				defaultFieldValues: url
+			}
+		});
+		this.dispatchEvent(new CloseActionScreenEvent());
+	}
+
+	async handleConfirmClick01(msg) {
+		const result = await LightningConfirm.open({
+			message: msg,
+			variant: 'headerless',
+			label: 'this is the aria-label value'
+		});
+		if (result) {
+			this.ss();
+		} else {
+			this.dispatchEvent(new CloseActionScreenEvent());
+		}
+	}
+
+	async handleConfirmClick02(msg) {
+		const result = await LightningConfirm.open({
+			message: msg,
+			variant: 'headerless',
+			label: 'this is the aria-label value'
+		});
+		if (result) {
+			this.ll();
+		} else {
+			this.dispatchEvent(new CloseActionScreenEvent());
+		}
+	}
+
+	ShowToastEvent(msg, type) {
+		const event = new ShowToastEvent({
+			title: '',
+			message: msg,
+			variant: type
+		});
+		this.dispatchEvent(event);
+	}
+
+	closeAction() {
+		location.reload();
+	}
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js-meta.xml b/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js-meta.xml
index 03722c3..3392981 100644
--- a/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js-meta.xml
+++ b/force-app/main/default/lwc/lexCreateQISFromAsset/lexCreateQISFromAsset.js-meta.xml
@@ -1,19 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexCreateQISFromAsset">
-    <apiVersion>51.0</apiVersion>
-    <isExposed>true</isExposed>
-    <targets>
-        <target>lightning__AppPage</target>
-        <target>lightning__RecordPage</target>
-        <target>lightning__HomePage</target>
-        <target>lightning__RecordAction</target>
-        <!-- 灞忓箷娴侀厤缃� -->
-        <target>lightning__FlowScreen</target>
-    </targets>
-      <targetConfigs>
-            <targetConfig targets="lightning__FlowScreen">
-                <!-- name js涓娇鐢ㄧ殑鍙橀噺锛屼粠灞忓箷娴佷腑鑾峰彇鍙傛暟  label 鍦ㄥ睆骞曟祦鐨勮LWC鐨勮缃腑鏄剧ず -->
-                <property name="recordId" type="String" label="recordId"/>
-            </targetConfig>
-        </targetConfigs>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>54.0</apiVersion>
+	<isExposed>true</isExposed>
+	<targets>
+		<target>lightning__RecordPage</target>
+		<target>lightning__AppPage</target>
+		<target>lightning__HomePage</target>
+		<target>lightning__RecordAction</target>
+	</targets>
 </LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.css b/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.css
new file mode 100644
index 0000000..e9fe316
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.css
@@ -0,0 +1,12 @@
+.toast{
+	border: 1px solid #c9c9c9;
+	border-radius: 10px; 
+	width: 50%;
+	margin: 0 auto;
+	font-size: 18px;
+	font-weight: bold;
+	padding: 10px 20px;
+	background: #EA001E;
+	display: flex;
+	color: white;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.html b/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.html
index d044dbb..0c84cf0 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.html
+++ b/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.html
@@ -1,5 +1,15 @@
 <template>
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>    </div>
     </div>
+    <div if:false={IsLoading} class="toast">
+		<span style="padding: 10px;">{msg}</span>
+		<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+                <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+                    title="Close"  style="color: black;"></lightning-icon>
+              <span class="slds-assistive-text">Close</span>
+        </button>
+	</div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js b/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js
index 7b58902..97ec5dd 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js
+++ b/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js
@@ -15,8 +15,18 @@
 import selecctProduct2ById from '@salesforce/apex/buttonAssetCtl.selecctProduct2ById';
 import selecctRepairByFomatToday from '@salesforce/apex/buttonAssetCtl.selecctRepairByFomatToday';
 import selecctQISReportByFomatToday from '@salesforce/apex/buttonAssetCtl.selecctQISReportByFomatToday';
+import {
+    NavigationMixin
+} from 'lightning/navigation';
+import {
+    encodeDefaultFieldValues
+} from 'lightning/pageReferenceUtils';
+import LightningConfirm from 'lightning/confirm';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
 
-export default class LexCreateRepairFromAsset extends LightningElement {
+export default class LexCreateRepairFromAsset extends NavigationMixin(LightningElement) {
     @api recordId;
     str;
     IsLoading = true;
@@ -38,6 +48,20 @@
     RepairSalesPointProvinceChinaC;
     notCreateRepairFromAssetButton;
     notCreateRepairFromAssetButton02;
+    msg;
+    flag = false;
+    fomatToday;
+    QIS_Name = '';
+    QIS_Id = '';
+    Old_Repair_Name = '';
+    Work_Location = '';
+    FSE_GI_Main_Leader__id = '';
+    FSE_GI_Main_Leader__name = '';
+    FSE_SP_Main_Leader__id = '';
+    FSE_SP_Main_Leader__name = '';
+    Incharge_Staff = '';
+    Incharge_Staff_id = '';
+
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -56,7 +80,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.userID = result.userID;
                 this.day = result.day;
@@ -84,9 +107,6 @@
                     }
                     this.CreateRepairFromAsset();
                 })
-
-
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -102,61 +122,61 @@
         var EmployeeNo = this.EmployeeNoC;
 
         if (nCRepairFromAssetBList.indexOf(EmployeeNo) != -1) {
-            alert("瀵逛笉璧凤紝鎮ㄦ棤鏉冧娇鐢ㄦ鎸夐挳鍒涘缓淇悊锛�");
+            this.ShowToastEvent("瀵逛笉璧凤紝鎮ㄦ棤鏉冧娇鐢ㄦ鎸夐挳鍒涘缓淇悊锛�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
 
-        var fomatToday = this.day1;
-        var QIS_Name = '';
-        var QIS_Id = '';
-        var url1 = "";
-        var FSE_GI_Main_Leader__id = '';
-        var FSE_GI_Main_Leader__name = '';
-        var FSE_SP_Main_Leader__id = '';
-        var FSE_SP_Main_Leader__name = '';
-        var Incharge_Staff = '';
-        var Incharge_Staff_id = '';
-        var Work_Location = '';
-        var Old_Repair_Name = '';
+        this.fomatToday = this.day1;
+
 
         selecctQISReportByFomatToday({
             AssetId: this.Id,
-            fomatToday: fomatToday
+            fomatToday: this.fomatToday
         }).then(records => {
-            console.log(records);
             if (records.length >= 1) {
-                var boolday = confirm('璇风‘璁ゆ浠舵槸鍚﹀睘浜�10澶╁唴閲嶅鎶ュ憡锛屽鏋滄槸锛岃浣跨敤鍘烸IS淇℃伅濉啓銆�');
-                if (!boolday) {
-                    return;
-                }
+                this.QIS_Name = records[0].Name;
+                this.QIS_Id = records[0].Id;
             }
             if (records.length >= 1) {
-                QIS_Name = records[0].Name;
-                QIS_Id = records[0].Id;
+                this.handleConfirmClick01('璇风‘璁ゆ浠舵槸鍚﹀睘浜�10澶╁唴閲嶅鎶ュ憡锛屽鏋滄槸锛岃浣跨敤鍘烸IS淇℃伅濉啓銆�');
+            } else {
+                this.ss();
             }
+
         })
+    }
+
+    ss() {
         selecctRepairByFomatToday({
             AssetId: this.Id,
-            fomatToday: fomatToday
+            fomatToday: this.fomatToday
         }).then(records2 => {
             console.log(records2);
-            if (records2.length >= 1) {
-                var boolday = confirm('姝や欢璁惧濡備负10澶╁唴閲嶅鎶ュ憡锛屽缓璁洖鍒板師淇悊鍗曚娇鐢ㄥ鍒跺姛鑳芥彁浜ゃ�傝纭鏄惁缁х画鏂板缓淇悊锛� ');
-                if (!boolday) {
-                    return;
-                }
+
+            var partSupplyFinishDate = this.NoPartRiskDateFC;
+            if (this.day < this.NoPartRiskDateFC && this.NoPartRiskDateFC <= this.day2) {
+                this.ShowToastEvent('棰勮' + partSupplyFinishDate + '闆朵欢鍗冲皢鍋滀骇锛岃閫佷慨鍓嶄笌宸ュ巶鍙奟C鑱旂粶', "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+            }
+            if (this.NoPartRiskDateFC != null && this.NoPartRiskDateFC != undefined && this.NoPartRiskDateFC <= this.day) {
+                this.ShowToastEvent('璇ュ瀷鍙烽浂浠跺凡缁忓仠浜э紝鏈夌壒娈婇渶姹傦紝璇烽�佷慨鍓嶄笌宸ュ巶RC鑱旂粶', "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
             }
             if (records2.length >= 1) {
-                Old_Repair_Name = records2[0].Name;
+                this.Old_Repair_Name = records2[0].Name;
+            }
+            if (records2.length >= 1) {
+                this.handleConfirmClick02('姝や欢璁惧濡備负10澶╁唴閲嶅鎶ュ憡锛屽缓璁洖鍒板師淇悊鍗曚娇鐢ㄥ鍒跺姛鑳芥彁浜ゃ�傝纭鏄惁缁х画鏂板缓淇悊锛� ');
+            } else {
+                this.ll();
             }
         })
-        var partSupplyFinishDate = this.NoPartRiskDateFC;
-        if (this.day < this.NoPartRiskDateFC && this.NoPartRiskDateFC <= this.day2) {
-            alert('棰勮' + partSupplyFinishDate + '闆朵欢鍗冲皢鍋滀骇锛岃閫佷慨鍓嶄笌宸ュ巶鍙奟C鑱旂粶');
-        }
-        if (this.NoPartRiskDateFC != null && this.NoPartRiskDateFC != undefined && this.NoPartRiskDateFC <= this.day) {
-            alert('璇ュ瀷鍙烽浂浠跺凡缁忓仠浜э紝鏈夌壒娈婇渶姹傦紝璇烽�佷慨鍓嶄笌宸ュ巶RC鑱旂粶');
-        }
+    }
+
+    ll() {
         selecctProduct2ById({
             Id: this.ProductIDC
         }).then(recordP => {
@@ -165,87 +185,146 @@
             if (recordP != null && recordP.length > 0) {
                 var canRepair = recordP[0].Can_Repair__c;
                 if (canRepair == '绗笁鏂�') {
-                    alert('闈炴垜鍙镐慨鐞嗗璞★紝鏃犳硶鏂板缓淇悊锛屽鏈変笉鏄庤鍜ㄨCIC');
+                    this.ShowToastEvent('闈炴垜鍙镐慨鐞嗗璞★紝鏃犳硶鏂板缓淇悊锛屽鏈変笉鏄庤鍜ㄨCIC', "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 }
                 if (canRepair == '涓�' || canRepair == null) {
-                    alert('鏈澶囨棤娉曟柊寤轰慨鐞�');
+                    this.ShowToastEvent('鏈澶囨棤娉曟柊寤轰慨鐞�', "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 }
                 if (canRepair == 'RC閫佷慨') {
-                    url1 = "&00N10000009HAJl=TRUE"
+                    this.flag = true;
                 }
             }
-        })
-        selecctAccountByAccountId({
-            AccountId: this.AccountId
-        }).then(List => {
-            console.log(List);
-            if (List != null) {
-                var RecordTypeId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15);
-                console.log(RecordTypeId);
-                if (RecordTypeId != 'Agency') {
-                    if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) {
-                        FSE_GI_Main_Leader__id = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'].substring(0, 15);
-                        FSE_GI_Main_Leader__name = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Name'];
-                    }
-                    if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) {
-                        FSE_SP_Main_Leader__id = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0, 15);
-                        FSE_SP_Main_Leader__name = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name'];
-                    }
-                    if (List[0]['Parent']['RecordType_DeveloperName__c'] != null || List[0]['Parent']['RecordType_DeveloperName__c'] != undefined) {
-                        var recordId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15);
-                        if (recordId == 'Department_Class_GI' || recordId == 'Department_Class_BF' || recordId == 'Department_Class_ET') {
-                            if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) {
-                                Work_Location = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Work_Location__c'];
-                            }
-                        } else if (recordId == 'Department_Class_GS' || recordId == 'Department_Class_URO' || recordId == 'Department_Class_ENT' || recordId == 'Department_Class_GYN' || recordId == 'Department_Class_OTH') {
-                            if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) {
-                                Work_Location = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Work_Location__c'];
-                            }
+            selecctAccountByAccountId({
+                AccountId: this.AccountId
+            }).then(List => {
+                console.log(List);
+                if (List != null) {
+                    var RecordTypeId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15);
+                    console.log(RecordTypeId);
+                    if (RecordTypeId != 'Agency') {
+                        if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) {
+                            this.FSE_GI_Main_Leader__id = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'].substring(0, 15);
+                            this.FSE_GI_Main_Leader__name = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Name'];
+                        }
+                        if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) {
+                            this.FSE_SP_Main_Leader__id = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0, 15);
+                            this.FSE_SP_Main_Leader__name = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name'];
+                        }
+                        if (List[0]['Parent']['RecordType_DeveloperName__c'] != null || List[0]['Parent']['RecordType_DeveloperName__c'] != undefined) {
+                            var recordId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15);
+                            if (recordId == 'Department_Class_GI' || recordId == 'Department_Class_BF' || recordId == 'Department_Class_ET') {
+                                if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) {
+                                    this.Work_Location = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['this.Work_Location__c'];
+                                }
+                            } else if (recordId == 'Department_Class_GS' || recordId == 'Department_Class_URO' || recordId == 'Department_Class_ENT' || recordId == 'Department_Class_GYN' || recordId == 'Department_Class_OTH') {
+                                if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) {
+                                    this.Work_Location = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['this.Work_Location__c'];
+                                }
 
+                            }
+                        }
+                        if (RecordTypeId == 'Department_Class_GI') {
+                            this.Incharge_Staff = this.FSE_GI_Main_Leader__name;
+                            this.Incharge_Staff_id = this.FSE_GI_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_BF') {
+                            this.Incharge_Staff = this.FSE_GI_Main_Leader__name;
+                            this.Incharge_Staff_id = this.FSE_GI_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_ET') {
+                            this.Incharge_Staff = this.FSE_GI_Main_Leader__name;
+                            this.Incharge_Staff_id = this.FSE_GI_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_GS') {
+                            this.Incharge_Staff = this.FSE_SP_Main_Leader__name;
+                            this.Incharge_Staff_id = this.FSE_SP_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_URO') {
+                            this.Incharge_Staff = this.FSE_SP_Main_Leader__name;
+                            this.Incharge_Staff_id = this.FSE_SP_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_ENT') {
+                            this.Incharge_Staff = this.FSE_SP_Main_Leader__name;
+                            this.Incharge_Staff_id = this.FSE_SP_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_GYN') {
+                            this.Incharge_Staff = this.FSE_SP_Main_Leader__name;
+                            this.Incharge_Staff_id = this.FSE_SP_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_OTH') {
+                            this.Incharge_Staff = this.FSE_SP_Main_Leader__name;
+                            this.Incharge_Staff_id = this.FSE_SP_Main_Leader__id;
                         }
                     }
-                    if (RecordTypeId == 'Department_Class_GI') {
-                        Incharge_Staff = FSE_GI_Main_Leader__name;
-                        Incharge_Staff_id = FSE_GI_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_BF') {
-                        Incharge_Staff = FSE_GI_Main_Leader__name;
-                        Incharge_Staff_id = FSE_GI_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_ET') {
-                        Incharge_Staff = FSE_GI_Main_Leader__name;
-                        Incharge_Staff_id = FSE_GI_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_GS') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_URO') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_ENT') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_GYN') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_OTH') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
                 }
-
-            }
-            var url = "/a0J/e?CF00N10000002Dx66_lkid=" + this.HospitalId + "&CF00N10000002Dx66=" + this.HospitalC + "&CF00N10000002Dx5t_lkid=" + this.DepartmentClassId + "&CF00N10000002Dx5t=" + this.DepartmentClassC + "&CF00N10000002Dx5n_lkid=" + this.Id + "&CF00N10000002Dx5n=" + this.Name + "&CF00N10000002Dx1X_lkid=" + this.Id + "&CF00N10000002Dx1X=" + this.Name + "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + "&00N10000002FH86=%e5%8f%aa%e4%bf%ae%e7%90%86&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + "&00N10000006P6SM=" + encodeURI(Work_Location) + "&CF00N10000009H7yM=" + QIS_Name + "&CF00N10000009H7yM_lkid=" + QIS_Id + "&00N10000009H2fa=" + Old_Repair_Name + "&retURL=%2F" + this.Id;
-            if (url1 != undefined) {
-                url = url + url1;
-            }
-            window.open(url);
+                const url = encodeDefaultFieldValues({
+                    Hospital__c: this.HospitalId,
+                    Department_Class__c: this.DepartmentClassId,
+                    Account__c: this.AccountId,
+                    Delivered_Product__c: this.Id,
+                    Incharge_Staff__c: this.Incharge_Staff_id,
+                    Work_Location_select__c: this.RepairSalesPointProvinceChinaC,
+                    SalesOfficeCode_selection__c: encodeURI(this.Work_Location),
+                    Source_QIS__c: this.QIS_Id,
+                    Old_Name__c: this.Old_Repair_Name,
+                    Exc_Work_Location__c: this.flag
+                });
+                this[NavigationMixin.Navigate]({
+                    type: 'standard__objectPage',
+                    attributes: {
+                        objectApiName: 'Repair__c',
+                        actionName: 'new'
+                    },
+                    state: {
+                        nooverride: '1',
+                        defaultFieldValues: url
+                    }
+                });
+                this.dispatchEvent(new CloseActionScreenEvent());
+            })
         })
     }
+
+    async handleConfirmClick01(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+        if (result) {
+            this.ss();
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
+
+    async handleConfirmClick02(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+        if (result) {
+            this.ll();
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
+
+    ShowToastEvent(msg, type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+
+    closeAction() {
+        location.reload();
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js-meta.xml b/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js-meta.xml
index 3da8f7a..3392981 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js-meta.xml
+++ b/force-app/main/default/lwc/lexCreateRepairFromAsset/lexCreateRepairFromAsset.js-meta.xml
@@ -7,12 +7,5 @@
 		<target>lightning__AppPage</target>
 		<target>lightning__HomePage</target>
 		<target>lightning__RecordAction</target>
-		<target>lightning__FlowScreen</target> 
 	</targets>
-	 <!-- 瀹氫箟鍙橀噺 --> 
-    <targetConfigs> 
-        <targetConfig targets="lightning__FlowScreen"> 
-            <property name="recordId" type="String" label="recordId"/>
-        </targetConfig> 
-    </targetConfigs> 
 </LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js b/force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js
index 3e6e2aa..a4febf0 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js
+++ b/force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js
@@ -12,8 +12,14 @@
 import init from '@salesforce/apex/buttonAccountCtl.init';
 import initUserName from '@salesforce/apex/buttonAccountCtl.initUserName';
 import selecctAccountByAccountId from '@salesforce/apex/buttonAccountCtl.selecctAccountByAccountId';
+import {
+    NavigationMixin
+} from 'lightning/navigation';
+import {
+    encodeDefaultFieldValues
+} from 'lightning/pageReferenceUtils';
 
-export default class LexCreateRepairFromDepartment extends LightningElement {
+export default class LexCreateRepairFromDepartment extends NavigationMixin(LightningElement) {
     @api recordId;
     str;
     IsLoading = true;
@@ -43,7 +49,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.HospitalC = result.HospitalC == undefined ? "" : result.HospitalC;;
                 this.HospitalId = result.HospitalId == undefined ? "" : result.HospitalId;;
@@ -61,7 +66,6 @@
                     }
                     this.CreateRepairFromDepartment();
                 })
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -142,8 +146,35 @@
                     Incharge_Staff_id = FSE_SP_Main_Leader__id;
                 }
             }
-            var url = "/a0J/e?CF00N10000002Dx66_lkid=" + this.HospitalId + "&CF00N10000002Dx66=" + this.HospitalC + "&CF00N10000002Dx5t_lkid=" + this.DepartmentClassId + "&CF00N10000002Dx5t=" + this.DepartmentClassC + "&CF00N10000002Dx5n_lkid=" + this.Id + "&CF00N10000002Dx5n=" + this.Name + "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + "&00N10000002FH86=%e5%8f%aa%e4%bf%ae%e7%90%86&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + "&00N10000006P6SM=" + encodeURI(Work_Location) + "&retURL=%2F" + this.Id;
-            window.open(url);
+            const url = encodeDefaultFieldValues({
+                Hospital__c: this.HospitalC,
+                Department_Class__c: this.DepartmentClassC,
+                Account__c: this.Id,
+                Incharge_Staff__c: Incharge_Staff_id,
+                SalesOfficeCode_selection__c: encodeURI(Work_Location),
+                work_location_select__c: this.RepairSalesPointProvinceChinaC
+            });
+            this[NavigationMixin.Navigate]({
+                type: 'standard__objectPage',
+                attributes: {
+                    objectApiName: 'Repair__c',
+                    actionName: 'new'
+                },
+                state: {
+                    nooverride: '1',
+                    defaultFieldValues: url
+                }
+            });
+            this.dispatchEvent(new CloseActionScreenEvent());
+
+            // var url = "/a0J/e?CF00N10000002Dx66_lkid=" + this.HospitalId + "&CF00N10000002Dx66=" + this.HospitalC + 
+            // "&CF00N10000002Dx5t_lkid=" + this.DepartmentClassId + "&CF00N10000002Dx5t=" + this.DepartmentClassC + 
+            // "&CF00N10000002Dx5n_lkid=" + this.Id + "&CF00N10000002Dx5n=" + this.Name + 
+            // "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + 
+            // "&00N10000002FH86=%e5%8f%aa%e4%bf%ae%e7%90%86&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + 
+            // "&00N10000006P6SM=" + encodeURI(Work_Location) + "&retURL=%2F" + this.Id;
+            
+            // window.open(url);
         })
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js-meta.xml b/force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js-meta.xml
index 3da8f7a..3392981 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js-meta.xml
+++ b/force-app/main/default/lwc/lexCreateRepairFromDepartment/lexCreateRepairFromDepartment.js-meta.xml
@@ -7,12 +7,5 @@
 		<target>lightning__AppPage</target>
 		<target>lightning__HomePage</target>
 		<target>lightning__RecordAction</target>
-		<target>lightning__FlowScreen</target> 
 	</targets>
-	 <!-- 瀹氫箟鍙橀噺 --> 
-    <targetConfigs> 
-        <targetConfig targets="lightning__FlowScreen"> 
-            <property name="recordId" type="String" label="recordId"/>
-        </targetConfig> 
-    </targetConfigs> 
 </LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromOnCall/lexCreateRepairFromOnCall.js-meta.xml b/force-app/main/default/lwc/lexCreateRepairFromOnCall/lexCreateRepairFromOnCall.js-meta.xml
index 3da8f7a..3392981 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromOnCall/lexCreateRepairFromOnCall.js-meta.xml
+++ b/force-app/main/default/lwc/lexCreateRepairFromOnCall/lexCreateRepairFromOnCall.js-meta.xml
@@ -7,12 +7,5 @@
 		<target>lightning__AppPage</target>
 		<target>lightning__HomePage</target>
 		<target>lightning__RecordAction</target>
-		<target>lightning__FlowScreen</target> 
 	</targets>
-	 <!-- 瀹氫箟鍙橀噺 --> 
-    <targetConfigs> 
-        <targetConfig targets="lightning__FlowScreen"> 
-            <property name="recordId" type="String" label="recordId"/>
-        </targetConfig> 
-    </targetConfigs> 
 </LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.html b/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.html
index d044dbb..6a4719c 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.html
+++ b/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.html
@@ -1,5 +1,5 @@
 <template>
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
-    </div>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>    </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js b/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js
index 69ef0be..a290a88 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js
+++ b/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js
@@ -12,8 +12,17 @@
 import init from '@salesforce/apex/buttonQISReportCtl.init';
 import initUserName from '@salesforce/apex/buttonQISReportCtl.initUserName';
 import selecctAccountByAccountId from '@salesforce/apex/buttonQISReportCtl.selecctAccountByAccountId';
+import {
+    NavigationMixin
+} from 'lightning/navigation';
+import {
+    encodeDefaultFieldValues
+} from 'lightning/pageReferenceUtils';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
 
-export default class LexCreateRepairFromQIS extends LightningElement {
+export default class LexCreateRepairFromQIS extends NavigationMixin(LightningElement) {
     @api recordId;
     str;
     IsLoading = true;
@@ -55,7 +64,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.Name = result.Name;
                 this.SourceOnCallId = result.SourceOnCallId == undefined ? "" : result.SourceOnCallId;
@@ -86,7 +94,6 @@
                     this.CreateRepairFromQIS();
                 })
 
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -95,7 +102,6 @@
 
     //鏂板缓淇悊QIS	
     CreateRepairFromQIS() {
-        console.log("寮�濮�");
         var newflag = false;
         if ((this.OCMJudgementC == '璐ㄩ噺闂' && this.nextAction == '鏃犲伩缁翠慨' && this.SpecialFollow == '0') || (this.OCMJudgementC == '闈炶川閲忛棶棰�' && this.nextAction == '鏃犲伩缁翠慨' && this.SpecialFollow == '1') || (this.OCMJudgementC == '闈炶川閲忛棶棰�' && this.nextAction == '鏈夊伩缁翠慨' && this.SpecialFollow == '0') || (this.OCMJudgementC == '璐ㄩ噺闂+闈炶川閲忛棶棰�' && this.nextAction == '鏃犲伩缁翠慨' && this.SpecialFollow == '1') || (this.OCMJudgementC == '璐ㄩ噺闂+闈炶川閲忛棶棰�' && this.nextAction == '鏈夊伩缁翠慨+鏃犲伩缁翠慨' && this.SpecialFollow == '0')) {
             newflag = true;
@@ -110,73 +116,120 @@
                 var Incharge_Staff = '';
                 var Incharge_Staff_id = '';
                 var Work_Location = '';
-                if (List[0]['ParentId'] != null) {
-                    RecordTypeId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15);
-                    console.log(RecordTypeId);
-                    var FSE_GI_Main_Leader__id = '';
-                    var FSE_GI_Main_Leader__name = '';
-                    var FSE_SP_Main_Leader__id = '';
-                    var FSE_SP_Main_Leader__name = '';
-                    if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) {
-                        FSE_GI_Main_Leader__id = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'].substring(0, 15);
-                        FSE_GI_Main_Leader__name = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Name'];
-                    }
-                    if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) {
-                        FSE_SP_Main_Leader__id = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0, 15);
-                        FSE_SP_Main_Leader__name = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name'];
-                    }
-                    if (List[0]['Parent']['RecordType_DeveloperName__c'] != null || List[0]['Parent']['RecordType_DeveloperName__c'] != undefined) {
-                        var recordId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15);
-                        if (recordId == 'Department_Class_GI' || recordId == 'Department_Class_BF' || recordId == 'Department_Class_ET') {
-                            if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) {
-                                Work_Location = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Work_Location__c'];
-                            }
-                        } else if (recordId == 'Department_Class_GS' || recordId == 'Department_Class_URO' || recordId == 'Department_Class_ENT' || recordId == 'Department_Class_GYN' || recordId == 'Department_Class_OTH') {
-                            if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) {
-                                Work_Location = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Work_Location__c'];
-                            }
-
+                if (List.length > 0) {
+                    if (List[0]['ParentId'] != null) {
+                        RecordTypeId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15);
+                        console.log(RecordTypeId);
+                        var FSE_GI_Main_Leader__id = '';
+                        var FSE_GI_Main_Leader__name = '';
+                        var FSE_SP_Main_Leader__id = '';
+                        var FSE_SP_Main_Leader__name = '';
+                        if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) {
+                            FSE_GI_Main_Leader__id = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'].substring(0, 15);
+                            FSE_GI_Main_Leader__name = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Name'];
                         }
-                    }
-                    if (RecordTypeId == 'Department_Class_GI') {
-                        Incharge_Staff = FSE_GI_Main_Leader__name;
-                        Incharge_Staff_id = FSE_GI_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_BF') {
-                        Incharge_Staff = FSE_GI_Main_Leader__name;
-                        Incharge_Staff_id = FSE_GI_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_ET') {
-                        Incharge_Staff = FSE_GI_Main_Leader__name;
-                        Incharge_Staff_id = FSE_GI_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_GS') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_URO') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_ENT') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_GYN') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
-                    }
-                    if (RecordTypeId == 'Department_Class_OTH') {
-                        Incharge_Staff = FSE_SP_Main_Leader__name;
-                        Incharge_Staff_id = FSE_SP_Main_Leader__id;
+                        if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) {
+                            FSE_SP_Main_Leader__id = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0, 15);
+                            FSE_SP_Main_Leader__name = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name'];
+                        }
+                        if (List[0]['Parent']['RecordType_DeveloperName__c'] != null || List[0]['Parent']['RecordType_DeveloperName__c'] != undefined) {
+                            var recordId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15);
+                            if (recordId == 'Department_Class_GI' || recordId == 'Department_Class_BF' || recordId == 'Department_Class_ET') {
+                                if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) {
+                                    Work_Location = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Work_Location__c'];
+                                }
+                            } else if (recordId == 'Department_Class_GS' || recordId == 'Department_Class_URO' || recordId == 'Department_Class_ENT' || recordId == 'Department_Class_GYN' || recordId == 'Department_Class_OTH') {
+                                if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) {
+                                    Work_Location = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Work_Location__c'];
+                                }
+
+                            }
+                        }
+                        if (RecordTypeId == 'Department_Class_GI') {
+                            Incharge_Staff = FSE_GI_Main_Leader__name;
+                            Incharge_Staff_id = FSE_GI_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_BF') {
+                            Incharge_Staff = FSE_GI_Main_Leader__name;
+                            Incharge_Staff_id = FSE_GI_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_ET') {
+                            Incharge_Staff = FSE_GI_Main_Leader__name;
+                            Incharge_Staff_id = FSE_GI_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_GS') {
+                            Incharge_Staff = FSE_SP_Main_Leader__name;
+                            Incharge_Staff_id = FSE_SP_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_URO') {
+                            Incharge_Staff = FSE_SP_Main_Leader__name;
+                            Incharge_Staff_id = FSE_SP_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_ENT') {
+                            Incharge_Staff = FSE_SP_Main_Leader__name;
+                            Incharge_Staff_id = FSE_SP_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_GYN') {
+                            Incharge_Staff = FSE_SP_Main_Leader__name;
+                            Incharge_Staff_id = FSE_SP_Main_Leader__id;
+                        }
+                        if (RecordTypeId == 'Department_Class_OTH') {
+                            Incharge_Staff = FSE_SP_Main_Leader__name;
+                            Incharge_Staff_id = FSE_SP_Main_Leader__id;
+                        }
                     }
                 }
 
-                window.open("/a0J/e?CF00N10000002FIJU_lkid=" + this.SourceOnCallId + "&CF00N10000002FIJU=" + this.SourceOnCall + "&CF00N10000002FIJZ_lkid=" + this.Id + "&CF00N10000002FIJZ=" + this.Name + "&CF00N10000002Dx66_lkid=" + this.HospitalId + "&CF00N10000002Dx66=" + this.Hospital + "&CF00N10000002Dx5t_lkid=" + this.DepartmentClassId + "&CF00N10000002Dx5t=" + this.DepartmentClass + "&CF00N10000002Dx5n_lkid=" + this.HospitalDepartmentId + "&CF00N10000002Dx5n=" + this.HospitalDepartment + "&CF00N10000002Dx1X_lkid=" + this.nonyushohinId + "&CF00N10000002Dx1X=" + this.nonyushohin + "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + "&00N10000002Dx5y=" + this.TrableOccurDaYCollect + "&00N10000006P6SM=" + encodeURI(Work_Location) + "&00N10000002FH86=" + this.sourceForRepair + "&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + "&retURL=%2F" + this.Id);
+                const url = encodeDefaultFieldValues({
+                    On_Call_ID__c: this.SourceOnCall,
+                    QIS_ID__c: this.Id,
+                    Hospital__c: this.Hospital,
+                    Department_Class__c: this.DepartmentClass,
+                    Account__c: this.HospitalDepartment,
+                    Delivered_Product__c: this.nonyushohin,
+                    Incharge_Staff__c: Incharge_Staff_id,
+                    Failure_Occurrence_Date__c: this.TrableOccurDaYCollect,
+                    SalesOfficeCode_selection__c: encodeURI(Work_Location),
+                    Repair_Source__c: this.sourceForRepair,
+                    work_location_select__c: this.RepairSalesPointProvinceChinaC
+                });
+                this[NavigationMixin.Navigate]({
+                    type: 'standard__objectPage',
+                    attributes: {
+                        objectApiName: 'Repair__c',
+                        actionName: 'new'
+                    },
+                    state: {
+                        nooverride: '1',
+                        defaultFieldValues: url
+                    }
+                });
+                this.dispatchEvent(new CloseActionScreenEvent());
+
+                // window.open("/a0J/e?CF00N10000002FIJU_lkid=" + this.SourceOnCallId + "&CF00N10000002FIJU=" + this.SourceOnCall + 
+                // "&CF00N10000002FIJZ_lkid=" + this.Id + "&CF00N10000002FIJZ=" + this.Name + 
+                // "&CF00N10000002Dx66_lkid=" + this.HospitalId + "&CF00N10000002Dx66=" + this.Hospital + 
+                // "&CF00N10000002Dx5t_lkid=" + this.DepartmentClassId + "&CF00N10000002Dx5t=" + this.DepartmentClass + 
+                // "&CF00N10000002Dx5n_lkid=" + this.HospitalDepartmentId + "&CF00N10000002Dx5n=" + this.HospitalDepartment + 
+                // "&CF00N10000002Dx1X_lkid=" + this.nonyushohinId + "&CF00N10000002Dx1X=" + this.nonyushohin + 
+                // "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + 
+                // "&00N10000002Dx5y=" + this.TrableOccurDaYCollect + "&00N10000006P6SM=" + encodeURI(Work_Location) + 
+                // "&00N10000002FH86=" + this.sourceForRepair + "&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + 
+                // "&retURL=%2F" + this.Id);
 
             })
         } else {
-            alert("涓嶈兘鏂板缓淇悊");
+            this.ShowToastEvent("涓嶈兘鏂板缓淇悊", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
         }
     }
+
+    ShowToastEvent(msg, type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js-meta.xml b/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js-meta.xml
index 3da8f7a..3392981 100644
--- a/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js-meta.xml
+++ b/force-app/main/default/lwc/lexCreateRepairFromQIS/lexCreateRepairFromQIS.js-meta.xml
@@ -7,12 +7,5 @@
 		<target>lightning__AppPage</target>
 		<target>lightning__HomePage</target>
 		<target>lightning__RecordAction</target>
-		<target>lightning__FlowScreen</target> 
 	</targets>
-	 <!-- 瀹氫箟鍙橀噺 --> 
-    <targetConfigs> 
-        <targetConfig targets="lightning__FlowScreen"> 
-            <property name="recordId" type="String" label="recordId"/>
-        </targetConfig> 
-    </targetConfigs> 
 </LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.css b/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.css
new file mode 100644
index 0000000..e9fe316
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.css
@@ -0,0 +1,12 @@
+.toast{
+	border: 1px solid #c9c9c9;
+	border-radius: 10px; 
+	width: 50%;
+	margin: 0 auto;
+	font-size: 18px;
+	font-weight: bold;
+	padding: 10px 20px;
+	background: #EA001E;
+	display: flex;
+	color: white;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.html b/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.html
index d044dbb..8b1c452 100644
--- a/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.html
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.html
@@ -1,5 +1,15 @@
 <template>
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+    </div>
+    <div if:false={IsLoading} class="toast">
+        <span style="padding: 10px;">{msg}</span>
+        <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction}
+            title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+            <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse"
+                size="small" title="Close" style="color: black;"></lightning-icon>
+            <span class="slds-assistive-text">Close</span>
+        </button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js b/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js
index c5bd082..bf632b6 100644
--- a/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance/lexCustomAnewMaintenance.js
@@ -10,6 +10,9 @@
     CloseActionScreenEvent
 } from 'lightning/actions';
 import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
 import selectMaintenanceContractEstimate from '@salesforce/apex/otherButtonMaintenanceContractCtl.selectMaintenanceContractEstimate';
 
 export default class LexCustomAnewMaintenance extends LightningElement {
@@ -20,6 +23,7 @@
     StatusC;
     RecordTypeDeveloperNameC;
     URFContractC;
+    msg;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -39,7 +43,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
                 this.StatusC = result.StatusC;
@@ -53,10 +56,12 @@
         })
     }
 
-    //涓
+    //鍚堝悓鍐嶆姤浠�
     CustomAnew() {
         if (this.StatusC != "寮曞悎涓�") {
-            alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鍐嶆姤浠�")
+            this.msg = "缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鍐嶆姤浠�";
+            this.IsLoading = false;
+            return;
         } else {
             selectMaintenanceContractEstimate({
                 recordId: this.Id
@@ -72,11 +77,16 @@
                     } else {
                         window.open("/apex/SelectAssetEstimate?copyid=" + ids[0].Id, "_top");
                     }
-
                 } else {
-                    alert('璇烽�夋嫨涓�涓姤浠�')
+                    this.msg = '璇烽�夋嫨涓�涓姤浠�';
+                    this.IsLoading = false;
+                    return;
                 }
             })
         }
     }
+
+    closeAction() {
+        window.history.go(-1);
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.html b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.html
index d044dbb..d512b2c 100644
--- a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.html
+++ b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.html
@@ -1,5 +1,6 @@
 <template>
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
index 5123b26..7d968c9 100644
--- a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
+++ b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
@@ -15,6 +15,7 @@
 import {
     ShowToastEvent
 } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
 
 export default class LexCustomDelete extends LightningElement {
     @api recordId;
@@ -45,13 +46,10 @@
                 this.userID = result.userID;
 
                 this.CustomDelete();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
-        }).finally(() => {
-
-        });
+        })
     }
 
     // 鍒犻櫎
@@ -62,24 +60,34 @@
             if (repList != null && repList.length > 0) {
                 var rp = repList[0];
                 if (rp.Status__c != "鑽夋涓�" && rp.Status__c != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)" && rp.Status__c != "4.淇悊鍝佽繑閫侀樁娈�") {
-                    this.ShowToastEvent("涓嶆槸鑽夋涓紝涓嶈兘鍒犻櫎", "error")
+                    this.ShowToastEvent("涓嶆槸鑽夋涓紝涓嶈兘鍒犻櫎", "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
+                    return;
                 } else if (rp.Status__c == "4.淇悊鍝佽繑閫侀樁娈�" && (rp.SAP_Transfer_time__c != undefined || rp.Repair_Ordered_Date__c != undefined)) {
-                    this.ShowToastEvent("宸茬粡鍙戦�佽繃SAP锛屼笉鑳藉垹闄�", "error")
+                    this.ShowToastEvent("宸茬粡鍙戦�佽繃SAP锛屼笉鑳藉垹闄�", "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
+                    return;
                 } else if (this.userID.substring(0, 15) != rp.CreatedById.substring(0, 15) && this.userID.substring(0, 15) != rp.Acc_OwnerId__c.substring(0, 15) && this.userID.substring(0, 15) != rp.FSE_ownerid__c.substring(0, 15)) {
-                    this.ShowToastEvent("涓嶆槸鎵�鏈変汉銆佸垱寤轰汉鎴朏SE涓昏礋璐d汉锛屼笉鑳藉垹闄�", "error")
+                    this.ShowToastEvent("涓嶆槸鎵�鏈変汉銆佸垱寤轰汉鎴朏SE涓昏礋璐d汉锛屼笉鑳藉垹闄�", "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
+                    return;
                 } else {
-                    if (confirm("鏄惁纭畾锛�")) {
-                        deleteRepair({
-                            rid: rp.Id
-                        }).then(rtn => {
-                            if (rtn == "OK") {
-                                window.location.href = "/a0J/o";
-                            } else {
-                                alert(rtn);
-                            }
-                        })
-                    }
+                    this.handleConfirmClick("鏄惁纭畾锛�");
                 }
+            }
+        })
+    }
+
+    ll() {
+        deleteRepair({
+            rid: this.Id
+        }).then(rtn => {
+            if (rtn == "OK") {
+                window.location.href = "/a0J/o";
+            } else {
+                this.ShowToastEvent(rtn, "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
             }
         })
     }
@@ -92,4 +100,18 @@
         });
         this.dispatchEvent(event);
     }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+
+        if (result) {
+            this.ll();
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.css b/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.css
new file mode 100644
index 0000000..e9fe316
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.css
@@ -0,0 +1,12 @@
+.toast{
+	border: 1px solid #c9c9c9;
+	border-radius: 10px; 
+	width: 50%;
+	margin: 0 auto;
+	font-size: 18px;
+	font-weight: bold;
+	padding: 10px 20px;
+	background: #EA001E;
+	display: flex;
+	color: white;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.html b/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.html
index bc883e6..0bc8152 100644
--- a/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.html
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.html
@@ -1,5 +1,14 @@
 <template>
     <div class="toReportHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
+    <div if:false={IsLoading} class="toast">
+		<span style="padding: 10px;">{msg}</span>
+		<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+                <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+                    title="Close"  style="color: black;"></lightning-icon>
+              <span class="slds-assistive-text">Close</span>
+        </button>
+	</div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.js b/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.js
index 9b81859..86a5138 100644
--- a/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.js
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance/lexCustomNewMCMaintenance.js
@@ -10,6 +10,7 @@
     CloseActionScreenEvent
 } from 'lightning/actions';
 import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
+import LightningConfirm from 'lightning/confirm';
 
 export default class LexCustomNewMCMaintenance extends LightningElement {
     @api recordId;
@@ -20,6 +21,7 @@
     IsRecognitionModelC;
     URFContractC;
     RecordTypeDeveloperNameC;
+    msg;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -39,7 +41,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.StatusC = result.StatusC;
                 this.IsRecognitionModelC = result.IsRecognitionModelC;
@@ -57,22 +58,44 @@
     // 鏂板缓鏂版湇鍔″悎鍚屾姤浠�	
     CustomNewMC() {
         if (this.StatusC != "寮曞悎涓�") {
-            alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环");
+            this.msg = "缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环";
+            this.IsLoading = false;
         } else {
             if (this.IsRecognitionModelC == 1) {
-                if (!confirm("璇ョ粡閿�鍟嗕负鍏堟瀵硅薄锛屾槸鍚︾户缁柊寤烘姤浠凤紵")) {
-                    return;
-                }
-            }
-            if (this.RecordTypeDeveloperNameC == "NewMaintenance_Contract") {
-                if (this.URFContractC == 0) {
-                    window.open("/apex/SelectAssetEstimateVM?mcid=" + this.Id, "_top");
-                } else {
-                    window.open("/apex/SelectAssetEstimateURF?mcid=" + this.Id, "_top");
-                }
+                this.handleConfirmClick("璇ョ粡閿�鍟嗕负鍏堟瀵硅薄锛屾槸鍚︾户缁柊寤烘姤浠凤紵")
             } else {
-                window.open("/apex/SelectAssetEstimate?mcid=" + this.Id, "_top");
+                this.ll();
             }
+
         }
     }
+
+    ll() {
+        if (this.RecordTypeDeveloperNameC == "NewMaintenance_Contract") {
+            if (this.URFContractC == 0) {
+                window.open("/apex/SelectAssetEstimateVM?mcid=" + this.Id, "_top");
+            } else {
+                window.open("/apex/SelectAssetEstimateURF?mcid=" + this.Id, "_top");
+            }
+        } else {
+            window.open("/apex/SelectAssetEstimate?mcid=" + this.Id, "_top");
+        }
+    }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+        if (result) {
+            this.ll();
+        } else {
+            window.history.go(-1);
+        }
+    }
+
+    closeAction() {
+        window.history.go(-1);
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.css b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.css
new file mode 100644
index 0000000..e9fe316
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.css
@@ -0,0 +1,12 @@
+.toast{
+	border: 1px solid #c9c9c9;
+	border-radius: 10px; 
+	width: 50%;
+	margin: 0 auto;
+	font-size: 18px;
+	font-weight: bold;
+	padding: 10px 20px;
+	background: #EA001E;
+	display: flex;
+	color: white;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.html b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.html
index d044dbb..880fcf3 100644
--- a/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.html
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.html
@@ -2,4 +2,12 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
     </div>
+    <div if:false={IsLoading} class="toast">
+		<span style="padding: 10px;">{msg}</span>
+		<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+                <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+                    title="Close"  style="color: black;"></lightning-icon>
+              <span class="slds-assistive-text">Close</span>
+        </button>
+	</div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js
index ac46aa5..cbd223a 100644
--- a/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance/lexCustomNewMaintenance.js
@@ -18,6 +18,7 @@
     Id;
     StatusC;
     RecordTypeDeveloperNameC;
+    msg;
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -37,7 +38,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.StatusC = result.StatusC;
                 this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
@@ -53,7 +53,8 @@
     // 鏂板缓缁翠慨鍚堝悓鎶ヤ环
     CustomNew() {
         if (this.StatusC != "寮曞悎涓�") {
-            alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环");
+            this.msg = "缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环";
+            this.IsLoading = false;
         } else {
             if (this.RecordTypeDeveloperNameC == "NewMaintenance_Contract") {
                 window.open("/apex/SelectAssetEstimateVM?mcid=" + this.Id, "_top");
@@ -62,4 +63,8 @@
             }
         }
     }
+
+    closeAction() {
+        window.history.go(-1);
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js b/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
index f446a53..d37c2db 100644
--- a/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
+++ b/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
@@ -46,7 +46,6 @@
                 this.RepairC = result.RepairC;
 
                 this.DiscountRequest();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -63,10 +62,12 @@
                 console.log(rp);
                 if (rp.Return_Without_Repair_IF__c == true) {
                     this.ShowToastEvent("鏈慨鐞嗗綊杩樼殑淇悊涓嶅厑璁稿噺浠风敵璇�", "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 } else {
                     if (rp.Return_Without_Repair__c == true) {
                         this.ShowToastEvent("宸茬粡鐢宠鏈慨鐞嗚繑鍥烇紝濡傛灉闇�瑕佺户缁慨鐞嗚鍙栨秷\"鏈慨鐞嗗綊杩樼敵璇穃"鐨勫嬀閫夊悗鍐嶈繘琛屽噺浠风敵璇锋搷浣�", "error");
+                        this.dispatchEvent(new CloseActionScreenEvent());
                         return;
                     }
                 }
@@ -77,7 +78,8 @@
                 console.log(result);
                 if (result.length > 0) {
                     var split = result.split(", ");
-                    alert(split[1]);
+                    this.ShowToastEvent(split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 }
             })
@@ -87,7 +89,8 @@
                 console.log(result);
                 if (result.length > 0) {
                     var split = result.split(", ");
-                    alert(split[1]);
+                    this.ShowToastEvent(split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 }
             })
diff --git a/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
index 6cbc7d5..6c1c060 100644
--- a/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
+++ b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
@@ -69,7 +69,9 @@
 
     // 鎶ヤ环闄勪欢鏇存柊鐨勯偖浠堕�氱煡
     mailMessege() {
-        var Link = "https://ocsm--partial.sandbox.my.salesforce.com/" + this.Id;
+        // var Link = "https://ocsm--partial.sandbox.my.salesforce.com/" + this.Id;
+
+        var origin = window.location.origin + "/" + this.Id;
 
         location.href = 'mailto:' + this.InchargeStaffEmailC +
             '?bcc=' + this.userEmail +
@@ -83,6 +85,6 @@
             '姝ゆ鎶ヤ环鏃ワ細' + this.RepairEstimatedDateC + '%0D%0A' +
             '%0D%0A' +
             'RC鑱旂粶浜嬮」锛�' + this.RCInformationC + '%0D%0A' +
-            '%0D%0A' + Link + '';
+            '%0D%0A' + origin;
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html
index 87f391a..92c9e32 100644
--- a/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html
+++ b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html
@@ -2,5 +2,6 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
         <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
index 7c02aa0..1712fda 100644
--- a/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
+++ b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
@@ -14,6 +14,7 @@
 import {
     ShowToastEvent
 } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
 
 export default class LexOCSMNoToReportRepair extends LightningElement {
     @api recordId;
@@ -42,14 +43,12 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.OCSMAdministrativeReportNumberC = result.OCSMAdministrativeReportNumberC;
                 this.OCSMAdministrativeReportDateC = result.OCSMAdministrativeReportDateC;
                 this.AwareDateC = result.AwareDateC;
 
                 this.OCSMNoToReport();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -58,29 +57,7 @@
 
     // OCSM涓嶈鎶ュ憡
     OCSMNoToReport() {
-        if (!confirm("涓嶈鎶ュ憡鍚庢棤娉曟挙鍥烇紝鏄惁缁х画锛�")) {
-            return;
-        }
-        if (this.OCSMAdministrativeReportNumberC != undefined ||
-            this.OCSMAdministrativeReportDateC != undefined) {
-            this.ShowToastEvent("宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮OCSM涓嶈鎶ュ憡銆�", "error")
-            return;
-        }
-        if (this.AwareDateC != undefined) {
-            updateRepair({
-                recordId: this.Id
-            }).then(result => {
-                console.log(result);
-                if (result.length > 0) {
-                    var split = result.split(", ");
-                    alert(split[1]);
-                } 
-                 window.location.reload();
-            })
-        } else {
-            this.ShowToastEvent("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�", "error")
-            return;
-        }
+        this.handleConfirmClick("涓嶈鎶ュ憡鍚庢棤娉曟挙鍥烇紝鏄惁缁х画锛�");
     }
 
     // 寮圭獥
@@ -92,4 +69,41 @@
         });
         this.dispatchEvent(event);
     }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+
+        if (result) {
+            if (this.OCSMAdministrativeReportNumberC != undefined ||
+                this.OCSMAdministrativeReportDateC != undefined) {
+                this.ShowToastEvent("宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮OCSM涓嶈鎶ュ憡銆�", "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+            }
+            if (this.AwareDateC != undefined) {
+                updateRepair({
+                    recordId: this.Id
+                }).then(result => {
+                    console.log(result);
+                    if (result.length > 0) {
+                        var split = result.split(", ");
+                        this.ShowToastEvent(split[1], "error");
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        return;
+                    }
+                    window.location.reload();
+                })
+            } else {
+                this.ShowToastEvent("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�", "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+            }
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
index d9f159f..e56a0d1 100644
--- a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
+++ b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
@@ -52,7 +52,6 @@
                 this.isCNBuyC = result.isCNBuyC;
 
                 this.OCSMNogoods();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -63,14 +62,18 @@
     OCSMNogoods() {
         if (this.QISStatusC != 'RC妫�娴嬬敵璇�') {
             this.ShowToastEvent("OCM鏈嶅姟鏈儴宸茬粡鏀跺埌瀹炵墿", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
         } else {
             if ((this.isAEProfileC == undefined || this.isPAEProfileC == undefined) && this.isCNBuyC != 'true') {
-                this.ShowToastEvent("瀹夊叏淇℃伅鏈垽瀹氾紝璇疯仈绯昏川閲忔硶瑙勯儴", "error");
                 var btns = document.getElementsByName('rc_recieved');
                 for (var i = 0; i < btns.length; i++) {
                     btns[i].disabled = true;
                     btns[i].className = 'btnDisabled';
                 }
+                this.ShowToastEvent("瀹夊叏淇℃伅鏈垽瀹氾紝璇疯仈绯昏川閲忔硶瑙勯儴", "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
             } else {
                 updateQisForRCRecieved({
                     QId: this.Id,
@@ -78,7 +81,9 @@
                 }).then(result => {
                     console.log(result);
                     if (result.length > 0) {
-                        alert(result);
+                        this.ShowToastEvent(result, "error");
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        return;
                     }
                 })
             }
diff --git a/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html
index 87f391a..92c9e32 100644
--- a/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html
+++ b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html
@@ -2,5 +2,6 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
         <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js
index dd78103..5c44fe5 100644
--- a/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js
+++ b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js
@@ -14,7 +14,7 @@
 import {
     ShowToastEvent
 } from 'lightning/platformShowToastEvent';
-
+import LightningConfirm from 'lightning/confirm';
 
 export default class LexOCSMToReportRepair extends LightningElement {
     @api recordId;
@@ -42,13 +42,11 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.AwareDateC = result.AwareDateC;
                 this.OCSMAdministrativeReportStatusC = result.OCSMAdministrativeReportStatusC;
                 
                 this.OCSMToReport();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -59,24 +57,7 @@
 
     // OCSM瑕佹姤鍛�
     OCSMToReport() {
-        if (!confirm("鎶ュ憡鍚庢棤娉曟挙鍥烇紝鏄惁缁х画锛�")) {
-            return;
-        }
-        if (this.OCSMAdministrativeReportStatusC == undefined && this.AwareDateC != undefined) {
-            updateRepair({
-                recordId: this.Id
-            }).then(result => {
-                console.log(result);
-                if (result.length > 0) {
-                    var split = result.split(", ");
-                    alert(split[1]);
-                }
-                location.reload();
-            })
-        } else {
-            this.ShowToastEvent("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�", "error")
-            return;
-        }
+        this.handleConfirmClick("鎶ュ憡鍚庢棤娉曟挙鍥烇紝鏄惁缁х画锛�");
     }
 
     // 寮圭獥
@@ -88,4 +69,35 @@
         });
         this.dispatchEvent(event);
     }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+        if(result){
+            if (this.OCSMAdministrativeReportStatusC == undefined && this.AwareDateC != undefined) {
+                updateRepair({
+                    recordId: this.Id
+                }).then(result => {
+                    console.log(result);
+                    if (result.length > 0) {
+                        var split = result.split(", ");
+                        this.ShowToastEvent(split[1], "error");
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        return;
+                    }
+                    location.reload();
+                })
+            } else {
+                this.ShowToastEvent("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�", "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+            }
+        }
+        else{
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
index 388856a..b680883 100644
--- a/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
+++ b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
@@ -48,7 +48,6 @@
                 this.email = result.email;
 
                 this.OSHNogoods();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -59,6 +58,8 @@
     OSHNogoods() {
         if (this.QISStatusC != 'OSH妫�娴嬬敵璇�' && this.QISStatusC != '瀹屾瘯') {
             this.ShowToastEvent("OSH宸茬粡鏀跺埌瀹炵墿", "error")
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
         } else {
             updateOSHNogoods({
                 Id: this.Id,
@@ -68,7 +69,8 @@
                 console.log(result);
                 if (result.length > 0) {
                     var split = result.split(", ");
-                    alert(split[1]);
+                    this.ShowToastEvent(split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                 }
             })
         }
diff --git a/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.html b/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.html
index 87f391a..92c9e32 100644
--- a/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.html
+++ b/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.html
@@ -2,5 +2,6 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
         <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js b/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
index 9cb57e1..c441754 100644
--- a/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
+++ b/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
@@ -14,6 +14,8 @@
 import {
     ShowToastEvent
 } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
+
 
 export default class LexPreContractSubmit extends LightningElement {
     @api recordId;
@@ -44,7 +46,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.oldIsRecognitionModelC = result.oldIsRecognitionModelC;
                 this.uploadToRMTimeC = result.uploadToRMTimeC;
                 this.IsRecognitionModelTrueC = result.IsRecognitionModelTrueC;
@@ -53,7 +54,6 @@
                 this.Id = result.Id;
 
                 this.preContractSubmit();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -64,37 +64,30 @@
     preContractSubmit() {
         if (this.oldIsRecognitionModelC) {
             if (this.uploadToRMTimeC == null) {
-                this.ShowToastEvent('褰撳墠缁翠慨鍚堝悓鐨勭粡閿�鍟嗘槸鍏堟瀵硅薄锛岄渶瑕佸厛銆愪笂浼犺娆惧悎鍚屻�戯紝鐒跺悗瀹屾垚璁ゆ浠ュ悗鎵嶈兘澶嶆牳銆�', "error")
+                this.ShowToastEvent('褰撳墠缁翠慨鍚堝悓鐨勭粡閿�鍟嗘槸鍏堟瀵硅薄锛岄渶瑕佸厛銆愪笂浼犺娆惧悎鍚屻�戯紝鐒跺悗瀹屾垚璁ゆ浠ュ悗鎵嶈兘澶嶆牳銆�', "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
                 return;
             } else {
                 if (!this.IsRecognitionModelTrueC) {
-                    this.ShowToastEvent('褰撳墠缁翠慨鍚堝悓娌℃湁瀹屾垚璁ゆ锛屼笉鑳借繘琛屽鏍搞��', "error")
+                    this.ShowToastEvent('褰撳墠缁翠慨鍚堝悓娌℃湁瀹屾垚璁ゆ锛屼笉鑳借繘琛屽鏍搞��', "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 }
             }
         }
         var status = this.MCApprovalStatusC;
         if (status != 'Draft' && status != 'Reject' && status != undefined) {
-            this.ShowToastEvent('澶嶆牳宸茬粡鎻愪氦锛岃纭鐘舵�併��', "error")
+            this.ShowToastEvent('澶嶆牳宸茬粡鎻愪氦锛岃纭鐘舵�併��', "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         var con_no = this.ContractprintCompletedC;
         if (con_no == undefined) {
-            this.ShowToastEvent('鍚堝悓鐩栫珷瀹屾瘯涓虹┖锛屼笉鑳芥彁浜ゅ悎鍚屽鏍哥敵璇枫��', "error")
+            this.ShowToastEvent('鍚堝悓鐩栫珷瀹屾瘯涓虹┖锛屼笉鑳芥彁浜ゅ悎鍚屽鏍哥敵璇枫��', "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
-        if (!confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
-            return;
-        }
-        processResults({
-            recordId: this.recordId
-        }).catch(error => {
-            if (error.body.pageErrors[0] != null) {
-                var errmsg = error.body.pageErrors[0].message.toString();
-                this.ShowToastEvent(errmsg + '_sys', "error")
-                return;
-            }
-        })
+        this.handleConfirmClick("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵");
     }
 
     // 寮圭獥
@@ -106,4 +99,27 @@
         });
         this.dispatchEvent(event);
     }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+
+        if (result) {
+            processResults({
+                recordId: this.Id
+            }).catch(error => {
+                if (error.body.pageErrors[0] != null) {
+                    var errmsg = error.body.pageErrors[0].message.toString();
+                    this.ShowToastEvent(errmsg, "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
+                    return;
+                }
+            })
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js b/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js
index 2bdad39..e6368de 100644
--- a/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js
+++ b/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js
@@ -58,8 +58,6 @@
         }).then(result => {
             this.DeliveredProductC = result;
             window.open('/apex/ProductRepairQuote?productid=' + this.DeliveredProductC + '&flag=asset', '', 'height=250, width=500, top=300, left=350,location=no')
-        }).catch(error => {
-            console.log(error);
         })
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html
index d044dbb..15a028e 100644
--- a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html
+++ b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html
@@ -1,5 +1,6 @@
 <template>
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>  
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js
index b2cef38..2a07eed 100644
--- a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js
+++ b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js
@@ -10,8 +10,17 @@
     CloseActionScreenEvent
 } from 'lightning/actions';
 import init from '@salesforce/apex/buttonQISReportCtl.init';
+import {
+    NavigationMixin
+} from 'lightning/navigation';
+import {
+    encodeDefaultFieldValues
+} from 'lightning/pageReferenceUtils';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
 
-export default class LexQISMBCrequestNew extends LightningElement {
+export default class LexQISMBCrequestNew extends NavigationMixin(LightningElement) {
     @api recordId;
     str;
     IsLoading = true;
@@ -52,12 +61,35 @@
     // 鏂板缓QIS M-BC鐢宠.
     QISMBCRequestNew() {
         var status = this.QISStatusC;
-
         if (status != '瀹屾瘯' && status != '宸插洖绛�' && status != '鍙栨秷') {
-            alert("QIS娌℃湁瀹℃壒瀹屾瘯鎴栧彇娑堬紝涓嶅彲浠ュ垱寤篞IS M-BC!");
+            this.ShowToastEvent("QIS娌℃湁瀹℃壒瀹屾瘯鎴栧彇娑堬紝涓嶅彲浠ュ垱寤篞IS M-BC!", "error");
             return;
         }
-        var url = "a20/e?retURL=%2Fa20%2Fo&Name=" + this.Name + "&CF00N10000006Q4NP_lkid=" + this.Id;
-        window.top.location.href = url;
+        const url = encodeDefaultFieldValues({
+            Name: this.Name,
+            QIS_request_name__c: this.Id
+        });
+        this[NavigationMixin.Navigate]({
+            type: 'standard__objectPage',
+            attributes: {
+                objectApiName: 'QIS_M_BC__c',
+                actionName: 'new'
+            },
+            state: {
+                nooverride: '1',
+                defaultFieldValues: url
+            }
+        });
+        // var url = "a20/e?retURL=%2Fa20%2Fo&Name=" + this.Name + "&CF00N10000006Q4NP_lkid=" + this.Id;
+        // window.open(url);
+    }
+
+    ShowToastEvent(msg, type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml
index 3da8f7a..12078fb 100644
--- a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml
+++ b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml
@@ -9,10 +9,4 @@
 		<target>lightning__RecordAction</target>
 		<target>lightning__FlowScreen</target> 
 	</targets>
-	 <!-- 瀹氫箟鍙橀噺 --> 
-    <targetConfigs> 
-        <targetConfig targets="lightning__FlowScreen"> 
-            <property name="recordId" type="String" label="recordId"/>
-        </targetConfig> 
-    </targetConfigs> 
 </LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js b/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
index 777f405..ca55997 100644
--- a/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
+++ b/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
@@ -61,7 +61,6 @@
                         this.RentalApplyDiscountApproval();
                     }
                 })
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -74,16 +73,19 @@
 
         if (power != '2B2_澶囧搧涓績妫�娴�&浠撳簱绠$悊') {
             this.ShowToastEvent("瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
 
         var status = this.RentalApplyDiscountStatusC;
         if (status == '瀹℃壒涓�') {
             this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (status == '鎵瑰噯') {
             this.ShowToastEvent("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (status == '鑽夋涓�' || status == undefined || status == '椹冲洖') {
@@ -94,12 +96,14 @@
                     console.log(result);
                     if (result.length > 0) {
                         var split = result.split(", ");
-                        alert("鎻愪氦澶辫触 " + split[1]);
+                        this.ShowToastEvent("鎻愪氦澶辫触 " + split[1], "error");
+                        this.dispatchEvent(new CloseActionScreenEvent());
                         return;
                     }
                 })
             } else {
                 this.ShowToastEvent("鎻愪氦澶辫触", "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
                 return;
             }
         }
diff --git a/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.html b/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.html
index 87f391a..92c9e32 100644
--- a/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.html
+++ b/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.html
@@ -2,5 +2,6 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
         <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js b/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
index 2f0f4de..f66f5ce 100644
--- a/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
+++ b/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
@@ -14,6 +14,7 @@
 import {
     ShowToastEvent
 } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
 
 export default class LexSCSubmit extends LightningElement {
     @api recordId;
@@ -39,12 +40,10 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.StatusC = result.StatusC;
 
                 this.SCSubmit();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -54,26 +53,12 @@
     // 鎻愪氦寰呭鎵�
     SCSubmit() {
         if (this.StatusC != '鑽夋涓�') {
-            this.ShowToastEvent("宸茬粡鎻愪氦瀹℃壒", "error")
+            this.ShowToastEvent("宸茬粡鎻愪氦瀹℃壒", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
 
-        if (!confirm("涓�鏃CM鎻愪氦姝よ褰曚互寰呮壒鍑嗭紝鏍规嵁鎮ㄧ殑璁剧疆鎮ㄥ彲鑳戒笉鍐嶈兘澶熺紪杈戞璁板綍鎴栧皢浠栦粠鎵瑰噯杩囩▼涓皟鍥炪�傛槸鍚︾户缁紵")) {
-            return;
-        }
-
-        updateQISSCReport({
-            QId: this.Id
-        }).then(result => {
-            console.log(result);
-            if (result.length > 0) {
-                var split = result.split(", ");
-                alert(split[1]);
-            } else {
-                this.ShowToastEvent("宸叉彁浜�", "success")
-                window.location.reload();
-            }
-        })
+        this.handleConfirmClick("涓�鏃CM鎻愪氦姝よ褰曚互寰呮壒鍑嗭紝鏍规嵁鎮ㄧ殑璁剧疆鎮ㄥ彲鑳戒笉鍐嶈兘澶熺紪杈戞璁板綍鎴栧皢浠栦粠鎵瑰噯杩囩▼涓皟鍥炪�傛槸鍚︾户缁紵");
     }
 
     ShowToastEvent(msg, type) {
@@ -84,4 +69,30 @@
         });
         this.dispatchEvent(event);
     }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+
+        if(result){
+            updateQISSCReport({
+                QId: this.Id
+            }).then(result => {
+                console.log(result);
+                if (result.length > 0) {
+                    var split = result.split(", ");
+                    this.ShowToastEvent(split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
+                } else {
+                    this.ShowToastEvent("宸叉彁浜�", "success")
+                    window.location.reload();
+                }
+            })
+        }else{
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js
index 8e7f76d..6b1b1a0 100644
--- a/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js
+++ b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js
@@ -47,7 +47,6 @@
 
     // 鏂板缓CIC/浜у搧	
     SelectProduct2CIC() {
-        console.log(11111111);
         var pathnames = window.location.pathname.split("/");
         if (pathnames[1] == "emptyHtmlDoc.html") {
             window.open("/apex/SelectProduct2CIC?cicid=" + this.Id, "_parent");
diff --git a/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.html b/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.html
index aaa4cbd..92c9e32 100644
--- a/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.html
+++ b/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.html
@@ -1,6 +1,7 @@
 <template>
-    <div class="toReportHolder" if:true={IsLoading}>
+    <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
         <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js b/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
index 277d86e..66b40ba 100644
--- a/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
+++ b/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
@@ -38,10 +38,11 @@
   api,
   wire
 } from "lwc";
+import LightningConfirm from 'lightning/confirm';
+
 
 export default class LexSendNFM103 extends LightningElement {
   @api recordId;
-  detailedAddress;
   dealer;
   numberofEffectiveContract;
   newProductGuaranteTxt;
@@ -80,10 +81,15 @@
   userName;
   profileName;
   Id;
+  DetailedAddress;
+  surplusCount = 0;
+  url;
+  HPActiveC;
 
   @wire(CurrentPageReference)
   getStateParameters(currentPageReference) {
     if (currentPageReference) {
+      this.url = currentPageReference.state.backgroundContext;
       const urlValue = currentPageReference.state.recordId;
       if (urlValue) {
         let str = `${urlValue}`;
@@ -104,7 +110,8 @@
         btns[i].className = 'btnDisabled';
       }
       this.Id = result.Id;
-      this.detailedAddress = result.detailedAddress;
+      this.HPActiveC = result.HPActiveC;
+      this.DetailedAddress = result.detailedAddress;
       this.dealer = result.DealerC;
       this.numberofEffectiveContract = result.numberofEffectiveContract;
       this.newProductGuaranteTxt = result.newProductGuaranteTxt;
@@ -160,209 +167,29 @@
           this.foo();
         }
       })
-      this.dispatchEvent(new CloseActionScreenEvent());
     }).catch(error => {
       console.log(error);
     });
   }
 
   foo() {
-    // queryForrecords3({
-    //   dealer: this.dealer
-    // }).then(result => {
-    //   if (result.length > 0 && result[0].FirstParagraph__c == true) {
-    //     if (!confirm("璇ョ粡閿�鍟嗕负鍏堟瀵硅薄锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紵")) {
-    //       return;
-    //     }
-    //   }
-    //   if (
-    //     this.numberofEffectiveContract == "鏃�" && this.newProductGuaranteTxt != "2: 澶氬勾淇濅慨" &&
-    //     this.newProductGuaranteTxt != "2: 鏈嶅姟澶氬勾淇濅慨" && this.newProductGuaranteTxt != "8: 甯傚満澶氬勾淇濅慨" &&
-    //     this.onSiteRepair == "鐩撮�丼ORC淇悊"
-    //   ) {
-    //     if (!confirm("璁惧涓洪潪缁翠慨鍚堝悓涓旈潪澶氬勾淇濅慨瀵硅薄鍝侊紝璇风‘璁ゆ槸鍚︾洿閫丼ORC淇悊锛�")) {
-    //       return;
-    //     }
-    //   }
-    //   if ((this.maintenanceContract != undefined || this.VMMaintenanceContract != undefined) &&
-    //     this.onSiteRepair == "RC淇悊" && this.FSEState == "灞变笢鐪�"
-    //   ) {
-    //     if (!confirm("璇ヨ澶囦负缁翠慨鍚堝悓鎴栧骞翠繚淇璞″搧锛岃纭鏄惁閫佽嚦RC淇悊锛�")) {
-    //       return;
-    //     }
-    //   }
-    //   var today = Date.now();
-    //   var dateReceiptQuestions = Date.parse(this.dateReceiptQuestions);
-    //   var dates = (today - dateReceiptQuestions) / (24 * 60 * 60 * 1000);
-    //   if (this.profileName != "绯荤粺绠$悊鍛�" && this.userName != "鑳� 鐜夋垚" && this.userName != "鏉� 鐞竻" &&
-    //     this.userName != "閮� 娲�" &&
-    //     this.delayReportReason == undefined && dates > "1" &&
-    //     this.repairSource != "QIS杞慨鐞�") {
-    //     alert("鐢宠淇悊鏃禨AP淇悊鐢宠鏃ヨ秴杩囬棶棰樿仈缁滄敹鍒版棩1澶╋紝蹇呴』濉啓闂秴鏃舵姤鍛婄殑鐞嗙敱");
-    //     return;
-    //   }
-    //   if (this.quickRepairSign == true && (this.numberofEffectiveContract == "鏈�" || this.newProductGuaranteTxt == "2: 澶氬勾淇濅慨" ||
-    //       this.newProductGuaranteTxt == "2: 鏈嶅姟澶氬勾淇濅慨" || this.newProductGuaranteTxt == "8: 甯傚満澶氬勾淇濅慨") &&
-    //     (this.onSiteRepair == "RC淇悊" || this.onSiteRepair == "鍔炰簨澶勪慨鐞�" || this.onSiteRepair == "鐜板満淇悊")) {
-    //     if (this.RCCD == "2.涓滃寳" || this.RCCD == "3.瑗垮寳") {
-    //       if (!confirm("璇ュ瀷鍙峰搴斾负鍚堝悓鎴栧骞翠繚瀵硅薄鍝併�傚纭涓哄ぇ淇悊鏁呴殰锛岄渶瑕侀�夋嫨鐩撮�丼ORC淇悊锛岃纭鏄惁缁х画銆�")) {
-    //         return;
-    //       }
-    //     } else if (this.RCCD == "1.鍗庡寳" || this.RCCD == "6.鍗庡崡" || this.RCCD == "4.瑗垮崡") {
-    //       if (!confirm("璇ュ瀷鍙峰搴斾负鍚堝悓鎴栧骞翠繚瀵硅薄鍝併�傚纭涓哄ぇ淇悊鏁呴殰锛岄渶瑕侀�夋嫨鐩撮�丱GZ淇悊锛岃纭鏄惁缁х画銆�")) {
-    //         return;
-    //       }
-    //     }
-    //   }
-    //   var returnsProductWay = this.returnsProductway;
-    //   if (returnsProductWay == undefined) {
-    //     if (!confirm("杩斿搧鏂瑰紡涓虹┖锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紒")) {
-    //       return;
-    //     }
-    //   }
-    //   var DetailedAddress = this.detailedAddress;
-    //   if (this.assetOwner != "Olympus") {
-    //     if (DetailedAddress != undefined) {
-    //       var prompt = '褰撳墠鐩磋繑鏀惰揣鍦板潃涓猴細' + DetailedAddress + ',鎮ㄧ‘璁や笉淇敼浜嗗悧锛�';
-    //       if (!confirm(prompt)) {
-    //         return;
-    //       }
-    //     } else {
-    //       alert('褰撳墠淇悊娌℃湁褰曞叆鐩磋繑鏀惰揣鐨勮缁嗗湴鍧�锛屼笉鑳界敵璇蜂慨鐞嗭紒');
-    //       return;
-    //     }
-    //   }
-    //   queryForEquipments({
-    //     deliveredProductId: this.deliveredProductId,
-    //   }).then(equipments => {
-    //     if (equipments != null && equipments.length > 0) {
-    //       var equipment = equipments[0];
-    //       if (equipment.Status == "寤冩") {
-    //         alert("璁惧搴熷純锛屼笉鑳芥彁浜ょ敵璇�!");
-    //         return;
-    //       }
-    //     }
-    //   });
-    //   if (this.FSEApplyForRepairTime != undefined) {
-    //     alert("宸蹭慨鐞嗙敵璇凤紝涓嶅啀淇悊鐢宠浜�");
-    //     return;
-    //   }
-    //   var surplusCount = 0;
-    //   if (this.URFReapir == false) {
-    //     queryForUrfAsset({
-    //       maintenanceContractId: this.maintenanceContractId,
-    //       deliveredProductId: this.deliveredProductId,
-    //     }).then(urfAsset => {
-    //       var seriesMaxRepairCount = 0;
-    //       var seriesRepairCount = 0;
-    //       if (urfAsset != null && urfAsset.length > 0) {
-    //         seriesMaxRepairCount = urfAsset[0].Series_MaxRepairCount_F__c;
-    //         seriesRepairCount = urfAsset[0].Series_RepairCount_F__c;
-    //         surplusCount = seriesMaxRepairCount - seriesRepairCount;
-    //       }
-    //     });
-    //     queryForUrfSeriesInfo({
-    //       URFLimitSerial: this.URFLimitSerial,
-    //     }).then(urfSeriesInfo => {
-    //       var urfSeries = "";
-    //       if (urfSeriesInfo != null && urfSeriesInfo.length > 0) {
-    //         urfSeries = urfSeriesInfo[0].URFLimitSerial__c;
-    //       }
-    //       queryForRepairCount({
-    //         maintenanceContractId: this.maintenanceContractId,
-    //         status1: "1.鍙楃悊瀹屾瘯",
-    //         URFLimitSerial: urfSeries,
-    //       }).then(repairCount => {
-    //         if (repairCount.length > 0 && surplusCount == 1) {
-    //           alert("璇ヨ澶囧叧鑱旈檺娆″悎鍚岋紝鐩墠鍓╀綑娆℃暟灏忎簬閫佷慨璁惧銆傝绛夊緟杩涜涓慨鐞嗗畬鎴愬悗鍐嶈繘琛岀敵璇�");
-    //           return;
-    //         }
-    //       });
-    //     });
-    //   }
-    //   if (this.status != "鑽夋涓�" && this.status != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)" && this.status != "4.淇悊鍝佽繑閫侀樁娈�") {
-    //     alert("涓嶆槸鑽夋涓笉鑳界敵璇�");
-    //   } else {
-    //     if (this.dealer != undefined) {
+    if (this.HPActiveC == '鐒″姽') {
+      this.ShowToastEvent("鏈尰闄㈠凡鏃犳晥锛屾棤娉曡繘琛岀敵璇枫��", "error");
+      this.dispatchEvent(new CloseActionScreenEvent());
+      return;
+    }
 
-    //       queryForFindInvalidLicense({
-    //         dealerId: this.dealerId,
-    //       }).then(findInvalidLicense => {
-    //         console.log(findInvalidLicense);
-    //         if (findInvalidLicense.length > 0) {
-    //           alert("缁忛攢鍟嗕笁璇佷笉鍦ㄦ湁鏁堟湡锛屾棤娉曢�佷慨");
-    //           return;
-    //         }
-    //       });
-    //     }
-    //   }
-    //   if (this.ifDeadHurt == "鏈�") {
-    //     if (!confirm("鏄惁纭AE瑕佹彁浜わ紵")) {
-    //       return;
-    //     }
-    //   }
-    //   if (this.dayLater30 == "鏄�") {
-    //     alert("鍒涘缓鍚庤秴杩�30澶╋紝涓嶈兘鐢宠浜�");
-    //     return;
-    //   }
-    //   var prompt11 = "鍚堝悓鍐呭ぇ淇鏁板凡鐢ㄥ畬锛屽綋鍓嶄慨鐞嗕负鍚堝悓澶栫殑淇悊锛屾槸鍚︾户缁紵";
-    //   if (this.URFReapir == false && surplusCount == 0) {
-    //     if (!confirm(prompt11)) {
-    //       return;
-    //     }
-    //   }
-    //   updateForRepair1({
-    //     recordId: this.Id
-    //   }).then(result => {
-    //     if (result != null && result.length > 0) {
-    //       var split = result.split(", ");
-    //       alert(split[1]);
-    //     } else {
-    //       queryForReocrds({
-    //         inchargeStaffId: this.inchargeStaffId,
-    //       }).then(records => {
-    //         if (records != null && records.length > 0) {
-    //           var staff = records[0];
-    //           console.log(staff);
-    //           updateRepair2({
-    //             recordId: this.Id,
-    //             staff: staff,
-    //             DWSign: this.DWSign,
-    //             statusc: "1.鍙楃悊瀹屾瘯",
-    //             DOJStatus: this.DOJStatus,
-    //             SAPcondition: this.SAPcondition,
-    //           }).then(result => {
-    //             console.log(result);
-    //             if (result != null && result.length > 0) {
-    //               var split = result.split(", ");
-    //               alert(split[1]);
-    //             } else {
-    //               if (this.salesOfficeCodeSelection == "鎴愰兘RC") {
-    //                 alert("鐜伴樁娈碉紝鎴愰兘RC浠呭彈鐞嗗洓宸濓紙瑗胯棌锛夊唴闀溿�佽タ鍗楀叏鍩烠V/CLV锛屽叾浣欏疄鐗╄鍙戣嚦骞垮窞RC銆�");
-    //               }
-    //             }
-    //           });
-    //           queryForRds({
-    //             recordId: this.Id,
-    //           }).then(rds => {
-    //             if (rds != null && rds.length > 0) {
-    //               var repairAft = rds[0];
-    //               if (repairAft.NewProductGuarante_Formula__c != repairAft.ProductGuarante_Create__c) {
-    //                 alert("璇ヨ澶囦繚淇俊鎭凡鍙戠敓鍙樺寲锛岃浜嗚В");
-    //               }
-    //             }
-    //           });
-    //         } else {
-    //           alert("娌℃湁鎵惧埌 淇悊濮旀墭鑰�");
-    //         }
-    //       });
-    //     }
-    //   });
-    // });
+    queryForrecords3({
+      dealer: this.dealer
+    }).then(result => {
+      if (result.length > 0 && result[0].FirstParagraph__c == true) {
+        this.handleConfirmClick01("璇ョ粡閿�鍟嗕负鍏堟瀵硅薄锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紵");
+      } else {
+        this.ll01();
+      }
+    });
 
     var staticResource;
-    var DetailedAddress = this.detailedAddress;
-
     getStaticResource({
       sobj: "Repair__c"
     }).then(result => {
@@ -382,13 +209,252 @@
           function (data) {
             console.log(data);
             if (data && data.object) {
-               DetailedAddress = data.object.detailedAddress;
+              this.DetailedAddress = data.object.detailedAddress;
             }
             this.foo();
           },
           staticResource.token);
       });
     })
+  }
+
+  ll01() {
+    console.log(1);
+    if (this.numberofEffectiveContract == "鏃�" && this.newProductGuaranteTxt != "2: 澶氬勾淇濅慨" &&
+      this.newProductGuaranteTxt != "2: 鏈嶅姟澶氬勾淇濅慨" && this.newProductGuaranteTxt != "8: 甯傚満澶氬勾淇濅慨" &&
+      this.onSiteRepair == "鐩撮�丼ORC淇悊") {
+      this.handleConfirmClick02("璁惧涓洪潪缁翠慨鍚堝悓涓旈潪澶氬勾淇濅慨瀵硅薄鍝侊紝璇风‘璁ゆ槸鍚︾洿閫丼ORC淇悊锛�");
+    } else {
+      this.ll02();
+    }
+  }
+
+  ll02() {
+    console.log(2);
+    if ((this.maintenanceContract != undefined || this.VMMaintenanceContract != undefined) &&
+      this.onSiteRepair == "RC淇悊" && this.FSEState == "灞变笢鐪�"
+    ) {
+      this.handleConfirmClick03("璇ヨ澶囦负缁翠慨鍚堝悓鎴栧骞翠繚淇璞″搧锛岃纭鏄惁閫佽嚦RC淇悊锛�");
+    } else {
+      this.ll03();
+    }
+  }
+
+  ll03() {
+    console.log(3);
+    var today = Date.now();
+    var dateReceiptQuestions = Date.parse(this.dateReceiptQuestions);
+    var dates = (today - dateReceiptQuestions) / (24 * 60 * 60 * 1000);
+    if (this.profileName != "绯荤粺绠$悊鍛�" && this.userName != "鑳� 鐜夋垚" && this.userName != "鏉� 鐞竻" &&
+      this.userName != "閮� 娲�" &&
+      this.delayReportReason == undefined && dates > "1" &&
+      this.repairSource != "QIS杞慨鐞�") {
+      this.ShowToastEvent("鐢宠淇悊鏃禨AP淇悊鐢宠鏃ヨ秴杩囬棶棰樿仈缁滄敹鍒版棩1澶╋紝蹇呴』濉啓闂秴鏃舵姤鍛婄殑鐞嗙敱", "error");
+      this.dispatchEvent(new CloseActionScreenEvent());
+      return;
+    }
+    if (this.quickRepairSign == true && (this.numberofEffectiveContract == "鏈�" || this.newProductGuaranteTxt == "2: 澶氬勾淇濅慨" ||
+        this.newProductGuaranteTxt == "2: 鏈嶅姟澶氬勾淇濅慨" || this.newProductGuaranteTxt == "8: 甯傚満澶氬勾淇濅慨") &&
+      (this.onSiteRepair == "RC淇悊" || this.onSiteRepair == "鍔炰簨澶勪慨鐞�" || this.onSiteRepair == "鐜板満淇悊")) {
+      if (this.RCCD == "2.涓滃寳" || this.RCCD == "3.瑗垮寳") {
+        this.handleConfirmClick04("璇ュ瀷鍙峰搴斾负鍚堝悓鎴栧骞翠繚瀵硅薄鍝併�傚纭涓哄ぇ淇悊鏁呴殰锛岄渶瑕侀�夋嫨鐩撮�丼ORC淇悊锛岃纭鏄惁缁х画銆�");
+      } else if (this.RCCD == "1.鍗庡寳" || this.RCCD == "6.鍗庡崡" || this.RCCD == "4.瑗垮崡") {
+        this.handleConfirmClick04("璇ュ瀷鍙峰搴斾负鍚堝悓鎴栧骞翠繚瀵硅薄鍝併�傚纭涓哄ぇ淇悊鏁呴殰锛岄渶瑕侀�夋嫨鐩撮�丱GZ淇悊锛岃纭鏄惁缁х画銆�");
+      } else {
+        if (this.returnsProductway == undefined) {
+          this.handleConfirmClick06("杩斿搧鏂瑰紡涓虹┖锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紒");
+        } else {
+          this.ll06();
+        }
+      }
+    } else {
+      if (this.returnsProductway == undefined) {
+        this.handleConfirmClick06("杩斿搧鏂瑰紡涓虹┖锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紒");
+      } else {
+        this.ll06();
+      }
+    }
+  }
+
+  ll06() {
+    console.log(6);
+    if (this.assetOwner != "Olympus") {
+      if (this.DetailedAddress != undefined) {
+        this.handleConfirmClick07('褰撳墠鐩磋繑鏀惰揣鍦板潃涓猴細' + this.DetailedAddress + ',鎮ㄧ‘璁や笉淇敼浜嗗悧锛�');
+      } else {
+        this.ShowToastEvent('褰撳墠淇悊娌℃湁褰曞叆鐩磋繑鏀惰揣鐨勮缁嗗湴鍧�锛屼笉鑳界敵璇蜂慨鐞嗭紒', "error");
+        this.dispatchEvent(new CloseActionScreenEvent());
+        return;
+      }
+    } else {
+      this.ll07();
+    }
+  }
+
+  ll07() {
+    console.log(7);
+    queryForEquipments({
+      deliveredProductId: this.deliveredProductId,
+    }).then(equipments => {
+      if (equipments != null && equipments.length > 0) {
+        var equipment = equipments[0];
+        if (equipment.Status == "寤冩") {
+          this.ShowToastEvent("璁惧搴熷純锛屼笉鑳芥彁浜ょ敵璇�!", "error");
+          this.dispatchEvent(new CloseActionScreenEvent());
+          return;
+        }
+      }
+    });
+    console.log(701);
+    if (this.FSEApplyForRepairTime != undefined) {
+      this.ShowToastEvent("宸蹭慨鐞嗙敵璇凤紝涓嶅啀淇悊鐢宠浜�", "error");
+      this.dispatchEvent(new CloseActionScreenEvent());
+      return;
+    }
+    console.log(702);
+    if (this.URFReapir == false) {
+      queryForUrfAsset({
+        maintenanceContractId: this.maintenanceContractId,
+        deliveredProductId: this.deliveredProductId,
+      }).then(urfAsset => {
+        var seriesMaxRepairCount = 0;
+        var seriesRepairCount = 0;
+        if (urfAsset != null && urfAsset.length > 0) {
+          seriesMaxRepairCount = urfAsset[0].Series_MaxRepairCount_F__c;
+          seriesRepairCount = urfAsset[0].Series_RepairCount_F__c;
+          this.surplusCount = seriesMaxRepairCount - seriesRepairCount;
+        }
+      });
+      console.log(703);
+
+      queryForUrfSeriesInfo({
+        URFLimitSerial: this.URFLimitSerial,
+      }).then(urfSeriesInfo => {
+        var urfSeries = "";
+        if (urfSeriesInfo != null && urfSeriesInfo.length > 0) {
+          urfSeries = urfSeriesInfo[0].URFLimitSerial__c;
+        }
+        console.log(704);
+
+        queryForRepairCount({
+          maintenanceContractId: this.maintenanceContractId,
+          status1: "1.鍙楃悊瀹屾瘯",
+          URFLimitSerial: urfSeries,
+        }).then(repairCount => {
+          if (repairCount.length > 0 && this.surplusCount == 1) {
+            this.ShowToastEvent("璇ヨ澶囧叧鑱旈檺娆″悎鍚岋紝鐩墠鍓╀綑娆℃暟灏忎簬閫佷慨璁惧銆傝绛夊緟杩涜涓慨鐞嗗畬鎴愬悗鍐嶈繘琛岀敵璇�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+          }
+        });
+      });
+    }
+    console.log(705);
+
+    if (this.status != "鑽夋涓�" && this.status != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)" && this.status != "4.淇悊鍝佽繑閫侀樁娈�") {
+      this.ShowToastEvent("涓嶆槸鑽夋涓笉鑳界敵璇�", "error");
+      this.dispatchEvent(new CloseActionScreenEvent());
+      return;
+    } else {
+      if (this.dealer != undefined) {
+        queryForFindInvalidLicense({
+          dealerId: this.dealerId,
+        }).then(findInvalidLicense => {
+          console.log(findInvalidLicense);
+          if (findInvalidLicense.length > 0) {
+            this.ShowToastEvent("缁忛攢鍟嗕笁璇佷笉鍦ㄦ湁鏁堟湡锛屾棤娉曢�佷慨", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+          }
+        });
+      }
+    }
+    if (this.ifDeadHurt == "鏈�") {
+      this.handleConfirmClick08("鏄惁纭AE瑕佹彁浜わ紵");
+    } else {
+      this.ll08();
+    }
+  }
+
+  ll08() {
+    console.log(8);
+    if (this.dayLater30 == "鏄�") {
+      this.ShowToastEvent("鍒涘缓鍚庤秴杩�30澶╋紝涓嶈兘鐢宠浜�", "error");
+      this.dispatchEvent(new CloseActionScreenEvent());
+      return;
+    }
+    if (this.URFReapir == true && this.surplusCount == 0) {
+      this.handleConfirmClick09("鍚堝悓鍐呭ぇ淇鏁板凡鐢ㄥ畬锛屽綋鍓嶄慨鐞嗕负鍚堝悓澶栫殑淇悊锛屾槸鍚︾户缁紵");
+    } else {
+      this.ll09();
+    }
+  }
+
+  ll09() {
+    console.log(9);
+    updateForRepair1({
+      recordId: this.Id
+    }).then(result => {
+      if (result != null && result.length > 0) {
+        var split = result.split(", ");
+        this.ShowToastEvent(split[1], "error");
+        this.dispatchEvent(new CloseActionScreenEvent());
+        return;
+      } else {
+        console.log(901);
+        queryForReocrds({
+          inchargeStaffId: this.inchargeStaffId,
+        }).then(records => {
+          if (records != null && records.length > 0) {
+            var staff = records[0];
+            console.log(staff);
+            console.log(902);
+            updateRepair2({
+              recordId: this.Id,
+              staff: staff,
+              DWSign: this.DWSign,
+              statusc: "1.鍙楃悊瀹屾瘯",
+              DOJStatus: this.DOJStatus,
+              SAPcondition: this.SAPcondition,
+            }).then(result => {
+              console.log(result);
+              console.log(903);
+              if (result != null && result.length > 0) {
+                var split = result.split(", ");
+                this.ShowToastEvent(split[1], "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+              } else {
+                if (this.salesOfficeCodeSelection == "鎴愰兘RC") {
+                  this.ShowToastEvent("鐜伴樁娈碉紝鎴愰兘RC浠呭彈鐞嗗洓宸濓紙瑗胯棌锛夊唴闀溿�佽タ鍗楀叏鍩烠V/CLV锛屽叾浣欏疄鐗╄鍙戣嚦骞垮窞RC銆�", "error");
+                  this.dispatchEvent(new CloseActionScreenEvent());
+                  return;
+                }
+              }
+              console.log(904);
+              queryForRds({
+                recordId: this.Id,
+              }).then(rds => {
+                console.log(rds);
+                if (rds != null && rds.length > 0) {
+                  var repairAft = rds[0];
+                  if (repairAft.NewProductGuarante_Formula__c != repairAft.ProductGuarante_Create__c) {
+                    this.ShowToastEvent("璇ヨ澶囦繚淇俊鎭凡鍙戠敓鍙樺寲锛岃浜嗚В", "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
+                    return;
+                  }
+                }
+              });
+              window.open(this.url, "_self");
+            });
+          } else {
+            this.ShowToastEvent("娌℃湁鎵惧埌 淇悊濮旀墭鑰�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+          }
+        });
+      }
+    });
   }
 
   ShowToastEvent(msg, type) {
@@ -399,4 +465,129 @@
     });
     this.dispatchEvent(event);
   }
+
+  async handleConfirmClick01(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      this.ll01();
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
+
+  async handleConfirmClick02(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      this.ll02();
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
+
+  async handleConfirmClick03(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      this.ll03();
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
+
+  async handleConfirmClick04(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      if (this.returnsProductway == undefined) {
+        this.handleConfirmClick06("杩斿搧鏂瑰紡涓虹┖锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紒");
+      } else {
+        this.ll06();
+      }
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
+
+  async handleConfirmClick05(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      if (this.returnsProductway == undefined) {
+        this.handleConfirmClick06("杩斿搧鏂瑰紡涓虹┖锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紒");
+      } else {
+        this.ll06();
+      }
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
+
+  async handleConfirmClick06(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      this.ll06();
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
+
+  async handleConfirmClick07(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      this.ll07();
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
+
+  async handleConfirmClick08(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      this.ll08();
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
+
+  async handleConfirmClick09(msg) {
+    const result = await LightningConfirm.open({
+      message: msg,
+      variant: 'headerless',
+      label: 'this is the aria-label value'
+    });
+    if (result) {
+      this.ll09();
+    } else {
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }
+  }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.html b/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.html
index aaa4cbd..62dbf20 100644
--- a/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.html
+++ b/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.html
@@ -2,5 +2,6 @@
     <div class="toReportHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
         <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js b/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js
index 8cee80b..34540bf 100644
--- a/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js
+++ b/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js
@@ -17,6 +17,7 @@
 import {
     ShowToastEvent
 } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
 
 export default class LexSendQISToEtQ extends LightningElement {
     @api recordId;
@@ -32,6 +33,7 @@
     ETQUPLOADSTATUSC;
     AEDetermineResultC;
     profileName;
+    statu = '';
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -50,7 +52,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.userId = result.userId;
                 this.profileId = result.profileId;
@@ -72,7 +73,6 @@
                         this.myReload();
                     }
                 })
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -89,31 +89,51 @@
 
     // 鍙戦�丵IS鍒癊tQ	
     SendQISToEtQ() {
-        console.log(this.profileName);
-        var QId = this.Id;
-        var uid = this.userId;
-
         if (this.profileName != "2F7_OSH鎷呭綋" && this.profileName != "2F7_OSH璐ㄩ噺娉曡") {
-            alert("鎮ㄦ病鏈夊彂閫丵IS鍒癊tQ鐨勬潈闄愩��");
+            this.ShowToastEvent("鎮ㄦ病鏈夊彂閫丵IS鍒癊tQ鐨勬潈闄愩��", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (this.PAEDetermineC == undefined) {
-            alert("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
+            this.ShowToastEvent("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (this.AEDetermineResultC == "nonAE" && this.PAEDetermineC == "nonPAE" && this.PAEDetermineACC == "nonPAE" && this.OCMJudgementC == undefined && this.QISFinalJudgementC == undefined) {
-            alert("nonAE骞秐onPAE鐨凲IS鍚屾鍒癊tQ鐨勬椂鍊欙紝妫�娴嬬粨璁�(OCSM)鏄繀濉殑銆備笉鍙互鍙戦�佸埌EtQ銆�");
+            this.ShowToastEvent("nonAE骞秐onPAE鐨凲IS鍚屾鍒癊tQ鐨勬椂鍊欙紝妫�娴嬬粨璁�(OCSM)鏄繀濉殑銆備笉鍙互鍙戦�佸埌EtQ銆�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (this.ETQUPLOADSTATUSC == "3") {
-            if (!confirm("鏄惁娓呯┖EtQ鍚屾鐘舵�侊紝閲嶆柊鍚屾鏁版嵁锛�")) {
-                return;
-            }
+            this.handleConfirmClick("鏄惁娓呯┖EtQ鍚屾鐘舵�侊紝閲嶆柊鍚屾鏁版嵁锛�");
+        } else {
+            this.ll();
         }
+    }
 
-        var statu = '';
+    myReload() {
+        selectQISReportC({
+            QId: this.Id
+        }).then(record => {
+            console.log(record);
+            if (record[0].AsyncData__c == 'true' && record[0].ETQ_UPLOAD_STATUS__c != '3' || record[0].Complaint_Number__c != null) {
+                var btns = document.getElementsByName("sendqistoetq");
+                for (var i = 0; i < btns.length; i++) {
+                    btns[i].disabled = true;
+                    btns[i].className = 'btnDisabled';
+                }
+                this.ShowToastEvent('璇IS涔嬪墠宸茬粡鍙戦�佽繃浜�', "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+            } else {
+                this.SendQISToEtQ();
+            }
+        })
+    }
+
+    ll() {
         if (this.AEDetermineResultC != undefined && this.PAEDetermineC != undefined && this.PAEDetermineACC == undefined) {
-            statu = "Q1";
+            this.statu = "Q1";
         } else if (
             (this.AEDetermineResultC != undefined && this.PAEDetermineC != undefined && this.PAEDetermineACC != "nonPAE" && this.PAEDetermineACC != undefined) ||
             (this.AEDetermineResultC == "nonAE" && this.PAEDetermineC == "nonPAE" && this.PAEDetermineACC == "nonPAE") &&
@@ -123,61 +143,43 @@
                     (this.QISFinalJudgementC == undefined || this.QISFinalJudgementC == "璐ㄩ噺闂")) ||
                 (this.OCMJudgementC == "闈炶川閲忛棶棰�" || this.OCMJudgementC == "鐜拌薄鏈彂鐜�") &&
                 this.QISFinalJudgementC == "璐ㄩ噺闂")) {
-            statu = "Q2";
+            this.statu = "Q2";
         } else if ((this.AEDetermineResultC == "nonAE" && this.PAEDetermineC == "nonPAE" && this.PAEDetermineACC == "nonPAE") &&
             ((this.OCMJudgementC == undefined || this.OCMJudgementC == "璐ㄩ噺闂" || this.OCMJudgementC == "璐ㄩ噺闂+闈炶川閲忛棶棰�") && this.QISFinalJudgementC == "闈炶川閲忛棶棰�") ||
             ((this.OCMJudgementC == "闈炶川閲忛棶棰�" || this.OCMJudgementC == "鐜拌薄鏈彂鐜�") && (this.QISFinalJudgementC == undefined || this.QISFinalJudgementC == "闈炶川閲忛棶棰�"))) {
-            statu = "Q3";
+            this.statu = "Q3";
         }
-        try {
-            updateQISReportC({
-                QId: QId,
-                uid: uid
-            })
+        updateQISReportC({
+            QId: this.Id,
+            uid: this.userId
+        })
 
-            var qisreports = new Array()
-            qisreports[0] = this.Id;
+        var qisreports = new Array()
+        qisreports[0] = this.Id;
 
-            var statuArr = new Array();
-            statuArr.push(statu);
+        var statuArr = new Array();
+        statuArr.push(this.statu);
 
-            sendToETQ({
-                iflog_Id: "",
-                rowDataSFDC: "",
-                repairIds: qisreports,
-                statu: statuArr[0]
-            }).then(result => {
-                alert(result);
-            })
-
-            alert("鍙戦�佹垚鍔�!")
-            var btns = document.getElementsByName("sendqistoetq");
-            for (var i = 0; i < btns.length; i++) {
-                btns[i].disabled = true;
-                btns[i].className = 'btnDisabled';
-            }
-            location.reload();
-        } catch (error) {
-            alert("鍙戦�丵IS鍒癊tQ澶辫触" + error.faultstring + ' code:' + error.faultcode)
-        }
-    }
-
-    myReload() {
-        selectQISReportC({
-            QId: this.Id
-        }).then(record => {
-        console.log(record);
-            if (record[0].AsyncData__c == 'true' && record[0].ETQ_UPLOAD_STATUS__c != '3' || record[0].Complaint_Number__c != null) {
-                var btns = document.getElementsByName("sendqistoetq");
-                for (var i = 0; i < btns.length; i++) {
-                    btns[i].disabled = true;
-                    btns[i].className = 'btnDisabled';
-                }
-                alert('璇IS涔嬪墠宸茬粡鍙戦�佽繃浜�')
+        sendToETQ({
+            iflog_Id: "",
+            rowDataSFDC: "",
+            repairIds: qisreports,
+            statu: statuArr[0]
+        }).then(result => {
+            if (result == "鍙戦�佹垚鍔�!") {
+                this.ShowToastEvent(result, "success");
+                this.dispatchEvent(new CloseActionScreenEvent());
             } else {
-                this.SendQISToEtQ();
+                this.ShowToastEvent("鍙戦�丵IS鍒癊tQ澶辫触," + result, "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
             }
         })
+
+        var btns = document.getElementsByName("sendqistoetq");
+        for (var i = 0; i < btns.length; i++) {
+            btns[i].disabled = true;
+            btns[i].className = 'btnDisabled';
+        }
     }
 
     // 寮圭獥
@@ -189,4 +191,18 @@
         });
         this.dispatchEvent(event);
     }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+
+        if (result) {
+            this.ll();
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html
index 87f391a..92c9e32 100644
--- a/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html
+++ b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html
@@ -2,5 +2,6 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
         <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js
index 82f115d..bfc137a 100644
--- a/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js
+++ b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js
@@ -17,6 +17,7 @@
 import {
     ShowToastEvent
 } from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
 
 export default class LexSendRepairsToEtQ extends LightningElement {
     @api recordId;
@@ -33,6 +34,8 @@
     profileId;
     profileName;
     userName;
+    msg;
+    statu = '';
 
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -52,7 +55,6 @@
         }).then(result => {
             console.log(result);
             if (result != null) {
-                this.IsLoading = false;
                 this.Id = result.Id;
                 this.PAEDetermineC = result.PAEDetermineC;
                 this.ETQUPLOADSTATUSC = result.ETQUPLOADSTATUSC;
@@ -67,7 +69,6 @@
                 }).then(result => {
                     console.log(result);
                     if (result != null) {
-                        this.IsLoading = false;
                         this.userName = result[0].Name;
                     }
                 })
@@ -75,7 +76,6 @@
                     profileId: this.profileId
                 }).then(result => {
                     if (result != null) {
-                        this.IsLoading = false;
                         this.profileName = result[0].Name;
 
                         this.myDate();
@@ -83,7 +83,6 @@
                     }
                 })
 
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -105,13 +104,15 @@
         selectRecords({
             recordId: this.Id
         }).then(result => {
-            if (result[0].AsyncData__c == 'true' && result[0].ETQ_UPLOAD_STATUS__c != '3' || result[0].Complaint_Number__c != null) {
+            if (result[0].AsyncData__c == true && result[0].ETQ_UPLOAD_STATUS__c != '3' || result[0].Complaint_Number__c != null) {
                 var btns = document.getElementsByName("sendrepairstoetq");
                 for (var i = 0; i < btns.length; i++) {
                     btns[i].disabled = true;
                     btns[i].className = 'btnDisabled';
                 }
-                alert('璇ヤ慨鐞嗕箣鍓嶅凡缁忓彂閫佽繃浜�');
+                this.ShowToastEvent('璇ヤ慨鐞嗕箣鍓嶅凡缁忓彂閫佽繃浜�', "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
             } else {
                 this.SendRepairsToEtQ();
             }
@@ -123,61 +124,71 @@
     // 鍙戦�丒TQ
     SendRepairsToEtQ() {
         if (this.profileName != "2F7_OSH鎷呭綋" && this.profileName != "2F7_OSH璐ㄩ噺娉曡" && this.profileName != '绯荤粺绠$悊鍛�') {
-            alert("鎮ㄦ病鏈夊彂閫佷慨鐞嗗埌EtQ鐨勬潈闄愩��");
+            this.ShowToastEvent("鎮ㄦ病鏈夊彂閫佷慨鐞嗗埌EtQ鐨勬潈闄愩��", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
-        var statu = '';
         if (this.PAEDetermineC == undefined) {
-            alert("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
+            this.ShowToastEvent("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+        }
+        if (this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE" && this.userName != "闆� 鏂板缓") {
+            this.ShowToastEvent("Close Complait鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (this.ETQUPLOADSTATUSC == "3") {
-            if (!confirm("鏄惁娓呯┖EtQ鍚屾鐘舵�侊紝閲嶆柊鍚屾鏁版嵁锛�")) {
-                return;
-            }
+            this.handleConfirmClick("鏄惁娓呯┖EtQ鍚屾鐘舵�侊紝閲嶆柊鍚屾鏁版嵁锛�");
+        } else {
+            this.ll();
         }
-        if (this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE" && this.userName != "闆� 鏂板缓") {
-            alert("Close Complait鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ");
-            return;
-        }
+    }
+
+    ll() {
         if (this.PAEDetermineC != undefined && this.AEDetermineResultC != undefined && this.PAEDetermineACC == undefined) {
-            statu = "R1";
+            this.statu = "R1";
         } else if ((this.AEDetermineResultC != undefined && this.PAEDetermineC != undefined && this.PAEDetermineACC != undefined) &&
             !(this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE")) {
-            statu = "R2";
+            this.statu = "R2";
             if (this.RepairInspectionDateC == undefined) {
-                alert("5.淇悊妫�娴嬫棩鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
+                this.ShowToastEvent("5.淇悊妫�娴嬫棩鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�", "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
                 return;
             }
             if (this.ContainUseRSAC == 1) {
-                alert("Final universal code涓虹┖锛屾垨鑰呭寘鍚玌seRSA锛岃纭銆�");
+                this.ShowToastEvent("Final universal code涓虹┖锛屾垨鑰呭寘鍚玌seRSA锛岃纭銆�", "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
                 return;
             }
         }
-        try {
-            var repairids = new Array()
-            repairids[0] = this.Id;
 
-            var statuArr = new Array();
-            statuArr.push(statu);
+        var repairids = new Array()
+        repairids[0] = this.Id;
 
-            sendToETQ({
-                iflog_Id: "",
-                rowDataSFDC: "",
-                repairIds: repairids,
-                statu: statuArr[0]
-            }).then(result => {
-                alert(result);
-                location.reload();
-            })
+        var statuArr = new Array();
+        statuArr.push(this.statu);
 
-            var btns = document.getElementsByName("sendrepairstoetq");
-            for (var i = 0; i < btns.length; i++) {
-                btns[i].disabled = true;
-                btns[i].className = 'btnDisabled';
+        sendToETQ({
+            iflog_Id: "",
+            rowDataSFDC: "",
+            repairIds: repairids,
+            statu: statuArr[0]
+        }).then(result => {
+            console.log("result:" + result);
+            if (result == "鍙戦�佹垚鍔�!") {
+                this.ShowToastEvent(result, "success");
+                this.dispatchEvent(new CloseActionScreenEvent());
+            } else {
+                this.ShowToastEvent("鍙戦�佷慨鐞嗗埌EtQ澶辫触," + result, "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
             }
-        } catch (error) {
-            alert("鍙戦�佷慨鐞嗗埌EtQ澶辫触" + error.faultstring + ' code:' + error.faultcode);
+        })
+
+        var btns = document.getElementsByName("sendrepairstoetq");
+        for (var i = 0; i < btns.length; i++) {
+            btns[i].disabled = true;
+            btns[i].className = 'btnDisabled';
         }
     }
 
@@ -190,4 +201,19 @@
         });
         this.dispatchEvent(event);
     }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+
+        if (result) {
+            this.ll();
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
+
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
index 26b7f7d..6aa856d 100644
--- a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
+++ b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
@@ -59,7 +59,6 @@
                         this.ServiceCutPriceApply();
                     }
                 })
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -74,15 +73,18 @@
 
         if (power != '2F2A_RC' && power != '2F4_鎶�鏈帹杩涢儴' && power != '2F4_鎶�鏈帹杩涢儴_闈濻SO') {
             this.ShowToastEvent("瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         var status = this.CutPriceStatusServiceC;
         if (status == '瀹℃壒涓�') {
             this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (status == '鎵瑰噯') {
             this.ShowToastEvent("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
             return;
         }
         if (status == '鑽夋涓�' || status == undefined || status == '椹冲洖') {
@@ -92,7 +94,8 @@
                 console.log(result);
                 if (result.length > 0) {
                     var split = result.split(", ");
-                    alert(split[1]);
+                    this.ShowToastEvent(split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 }
             })
@@ -102,11 +105,13 @@
                 console.log(result);
                 if (result.length > 0) {
                     var split = result.split(", ");
-                    alert("鎻愪氦澶辫触 " + split[1]);
+                    this.ShowToastEvent("鎻愪氦澶辫触 " + split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                     return;
                 } else {
                     this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛锛�", "success");
                     location.reload();
+                    this.dispatchEvent(new CloseActionScreenEvent());
                 }
             })
         }
diff --git a/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html
index 87f391a..92c9e32 100644
--- a/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html
+++ b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html
@@ -2,5 +2,6 @@
     <div class="exampleHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
         <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
index 987e871..9025162 100644
--- a/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
+++ b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
@@ -12,7 +12,10 @@
 import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
 import updateColunm from '@salesforce/apex/MaintenanceContractSetColunmWebService.updateColunm';
 import up2sap from '@salesforce/apex/MaintenanceContractWebService.up2sap';
-import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+import LightningConfirm from 'lightning/confirm';
 
 export default class LexUploadToRecognitionModel extends LightningElement {
     @api recordId;
@@ -54,54 +57,68 @@
                 this.PaymentPlanSumFirstC = result.PaymentPlanSumFirstC;
 
                 this.uploadToRecognitionModel();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
-        }).finally(() => {
-
-        });
+        })
     }
 
     // 涓婁紶璁ゆ鍚堝悓
     uploadToRecognitionModel() {
         if (this.ContractQuotationOrNotC == '杩樻病鍋氭姤浠�') {
-            this.ShowToastEvent("鎮ㄨ繕娌℃湁鍋氬悎鍚屾姤浠凤紝涓嶈兘涓婁紶璁ゆ鍚堝悓銆�", "error") 
+            this.ShowToastEvent("鎮ㄨ繕娌℃湁鍋氬悎鍚屾姤浠凤紝涓嶈兘涓婁紶璁ゆ鍚堝悓銆�", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
         } else if (this.MaintenanceContractNoC == undefined) {
-            this.ShowToastEvent('鍚堝悓鍙风爜涓虹┖锛屼笉鑳戒笂浼犺娆惧悎鍚屻��', "error") 
+            this.ShowToastEvent('鍚堝悓鍙风爜涓虹┖锛屼笉鑳戒笂浼犺娆惧悎鍚屻��', "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
         } else if (this.uploadToSapTimeC != undefined) {
-            this.ShowToastEvent('宸茬粡涓婁紶SAP锛屼笉鑳藉啀娆′笂浼犺娆惧悎鍚屻��', "error") 
+            this.ShowToastEvent('宸茬粡涓婁紶SAP锛屼笉鑳藉啀娆′笂浼犺娆惧悎鍚屻��', "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
         } else if (this.uploadToRMTimeC != undefined) {
-            this.ShowToastEvent('宸茬粡涓婁紶璁ゆ鍚堝悓锛屼笉鑳藉啀娆′笂浼犺娆惧悎鍚屻��', "error") 
+            this.ShowToastEvent('宸茬粡涓婁紶璁ゆ鍚堝悓锛屼笉鑳藉啀娆′笂浼犺娆惧悎鍚屻��', "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
         } else {
             if (!this.oldIsRecognitionModelC) {
-                this.ShowToastEvent('缁忛攢鍟嗕负绌烘垨缁忛攢鍟嗕笉鏄厛娆惧璞★紝涓嶉渶瑕佷笂浼犺娆惧悎鍚屻��', "error") 
+                this.ShowToastEvent('缁忛攢鍟嗕负绌烘垨缁忛攢鍟嗕笉鏄厛娆惧璞★紝涓嶉渶瑕佷笂浼犺娆惧悎鍚屻��', "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
             } else if (this.PaymentPlanSumFirstC == undefined) {
-                this.ShowToastEvent('绗竴娆¤鍒掍粯娆鹃噾棰濅笉鑳戒负绌恒��', "error") 
+                this.ShowToastEvent('绗竴娆¤鍒掍粯娆鹃噾棰濅笉鑳戒负绌恒��', "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
             } else {
-                if (!confirm('璇风‘璁ゆ槸鍚﹁涓婁紶璁ゆ鍚堝悓銆�')) {
-                    return;
-                }
-                updateColunm({
-                    mcid: this.Id
-                }).then(result => {
-                    if (result != '1') {
-                        alert('涓婁紶璁ゆ鍚堝悓澶辫触,鍥犱负 鏉ュ勾鍚堝悓鐩稿叧淇℃伅淇敼澶辫触') 
-                        location.href = "/" + this.Id;
-                    }
-                })
-                up2sap({
-                    mcid: this.Id
-                }).then(rtn => {
-                    if (rtn == '1') {
-                        alert("涓婁紶璁ゆ鍚堝悓鎴愬姛") 
-                        location.href = "/" + this.Id;
-                    } else {
-                        alert(rtn) 
-                    }
-                })
+                this.handleConfirmClick('璇风‘璁ゆ槸鍚﹁涓婁紶璁ゆ鍚堝悓銆�');
             }
         }
+    }
+
+    ll() {
+        updateColunm({
+            mcid: this.Id
+        }).then(result => {
+            if (result != '1') {
+                this.ShowToastEvent('涓婁紶璁ゆ鍚堝悓澶辫触,鍥犱负 鏉ュ勾鍚堝悓鐩稿叧淇℃伅淇敼澶辫触', "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                window.reload();
+            }
+        })
+        up2sap({
+            mcid: this.Id
+        }).then(rtn => {
+            if (rtn == '1') {
+                this.ShowToastEvent("涓婁紶璁ゆ鍚堝悓鎴愬姛", "success");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                window.reload();
+            } else {
+                this.ShowToastEvent(rtn, "error");
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+            }
+        })
     }
 
     // 寮圭獥
@@ -113,4 +130,18 @@
         });
         this.dispatchEvent(event);
     }
+
+    async handleConfirmClick(msg) {
+        const result = await LightningConfirm.open({
+            message: msg,
+            variant: 'headerless',
+            label: 'this is the aria-label value'
+        });
+
+        if (result) {
+            this.ll();
+        } else {
+            this.dispatchEvent(new CloseActionScreenEvent());
+        }
+    }
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
index 97a70c1..687c05f 100644
--- a/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
+++ b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
@@ -42,7 +42,6 @@
                 this.Id = result.Id;
 
                 this.YanshoudanRequest();
-                this.dispatchEvent(new CloseActionScreenEvent());
             }
         }).catch(error => {
             console.log(error);
@@ -58,10 +57,12 @@
             if (result != null) {
                 if (result.length > 0) {
                     var split = result.split(", ");
-                    alert(split[1]);
+                    this.ShowToastEvent(split[1], "error");
+                    this.dispatchEvent(new CloseActionScreenEvent());
                 }
             }
-            alert("宸茬粡鐢宠杩囦簡锛屼笉鍏佽閲嶆柊鐢宠");
+            this.ShowToastEvent("宸茬粡鐢宠杩囦簡锛屼笉鍏佽閲嶆柊鐢宠", "error");
+            this.dispatchEvent(new CloseActionScreenEvent());
         })
     }
 
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html
index c8bdbfc..48f29e0 100644
--- a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html
+++ b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html
@@ -1,5 +1,6 @@
 <template>
-   <div class="sisToOPDHolder" if:true={IsLoading}>
+    <div class="sisToOPDHolder" if:true={IsLoading}>
         <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
     </div>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
index b35e67a..bc41f13 100644
--- a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
+++ b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
@@ -54,7 +54,7 @@
         if (this.QISStatusC != '鍙栨秷') {
             this.ShowToastEvent('鐘舵�佷负鍙栨秷鐨凲IS鎵嶅彲浠ヨ澶嶅埗骞舵柊寤�', 'error');
             return;
-        }
+        }   
         var url = "/" + this.Id + "/e?newclone=1&retURL=%2F" + this.Id + " &CF00N100000073PA0=" + this.Name + "&CF00N100000073PA0_lkid=" + this.Id;
         window.open(url);
     }

--
Gitblit v1.9.1