From fe371deb6a1e8941d1cd5e3f427d9a201e719b12 Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期一, 17 四月 2023 16:04:05 +0800
Subject: [PATCH] 20230417QIS按钮上传

---
 force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js                                      |  100 +++++
 force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.html                                |    5 
 force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js                                    |  101 +++++
 force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js-meta.xml                         |   11 
 force-app/main/default/classes/QISReportController.cls                                         |  210 ++++++++++++
 force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.css                                 |   10 
 force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js                                            |   61 +++
 force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.css         |   22 +
 force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js          |   98 +++++
 force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css                                   |   22 +
 force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css                                           |   22 +
 force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js-meta.xml                                   |   11 
 force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js                                  |  231 +++++++++++++
 force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js-meta.xml                             |   11 
 force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.html                                  |    5 
 force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js-meta.xml |   11 
 force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.html        |    5 
 force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js-meta.xml                           |   11 
 force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.css                                     |   10 
 force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.html                                    |    5 
 force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html                                          |    5 
 21 files changed, 964 insertions(+), 3 deletions(-)

diff --git a/force-app/main/default/classes/QISReportController.cls b/force-app/main/default/classes/QISReportController.cls
index 73cdda1..296a17c 100644
--- a/force-app/main/default/classes/QISReportController.cls
+++ b/force-app/main/default/classes/QISReportController.cls
@@ -350,7 +350,6 @@
         }
          return re;
     }
-
     //OCSM涓嶈鎶ュ憡
     @AuraEnabled
     public static InitData initForlexOCSMNoToReportLightingButton (String recordId){
@@ -413,6 +412,7 @@
         }
          return re;
     }
+
     //鍙戦�丵IS鍒癝PO
     @AuraEnabled
     public static InitData initForlexSendQISButton (String recordId){
@@ -502,7 +502,7 @@
         }
          return re;
     }
-     // QIS甯傚満閮ㄦ剰瑙�
+    // QIS甯傚満閮ㄦ剰瑙�
     @AuraEnabled
     public static InitData initForlexQISSCButton (String recordId){
         InitData res = new initData();
@@ -523,6 +523,73 @@
         }
         return res;
     }
+     // 鏂板缓淇悊
+    @AuraEnabled
+    public static InitData initForlexCreateRepairButton (String recordId){
+        InitData res = new initData();
+        ID myUserID = UserInfo.getUserId();
+        User userinfo = [SELECT id,RepairSalesPoint_Province_China__c FROM User WHERE Id = :myUserID LIMIT 1];
+        QIS_Report__c report = [SELECT  id,Owner.name,FailureQInHospital__c,InformationFrom__c,Delay15Min__c,
+                                AfterFailureInformation__c,Set_usage_product__c,BreakORFallOff__c,Opera_Name__c,
+                                Which_Project__c,Report_For_Goz__c,Relation_With_The_Problem__c,Damage_For_Doc_Or_Pat__c,
+                                Trable_occur_daY_collect__c,source_for_repair__c,Faliour_date__c,OwnerId,nonyushohin__c,nonyushohin__r.name,
+                                Hospital_Department__c,Hospital_Department__r.name,Department_Class__c,Department_Class__r.name,Hospital__c,Hospital__r.name,name,Source_OnCall__c,Source_OnCall__r.name,
+                                failuer_situation__c,Comment__c,Is_Used_For_The_Opera__c,RecordType_ID__c,
+                                OCM_judgement__c,next_action__c,Special_follow__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
+        Account acc = [SELECT id,ParentId,Parent.RecordTypeId, 
+                        Parent.Parent.FSE_GI_Main_Leader__c,Parent.Parent.FSE_SP_Main_Leader__c,
+                        Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,
+                        Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE id = :report.Hospital_Department__c limit 1];
+        try{
+            
+            res.Id = report.Id;
+            res.qisRecordTypeId = report.RecordType_ID__c;
+            res.oCMjudgement = report.OCM_judgement__c;
+            res.nextaction = report.next_action__c;
+            res.comment = report.Comment__c;
+            res.sourceOnCall = report.Source_OnCall__c;
+            res.sourceOnCallname = report.Source_OnCall__r.name;
+            res.name = report.name;
+            res.hospitalId = report.Hospital__c;
+            res.hospitalname = report.Hospital__r.name;
+            res.departmentClassId = report.Department_Class__c;
+            res.departmentClassname = report.Department_Class__r.name;
+            res.hospitalDepartment = report.Hospital_Department__c;
+            res.hospitalDepartmentname = report.Hospital_Department__r.name;
+            res.nonyushohinId = report.nonyushohin__c;
+            res.nonyushohinIdname = report.nonyushohin__r.name;
+            res.ownerId = report.OwnerId;
+            res.faliourdate = report.Faliour_date__c;
+            res.sourceforrepair = report.source_for_repair__c;
+            res.repairSalesPointProvinceChina = userinfo.RepairSalesPoint_Province_China__c;
+            res.trableoccurdaYcollect = report.Trable_occur_daY_collect__c;
+            res.damageForDocOrPat = report.Damage_For_Doc_Or_Pat__c;
+            res.relationWithTheProblem = report.Relation_With_The_Problem__c;
+            res.reportForGoz = report.Report_For_Goz__c;
+            res.whichProject = report.Which_Project__c;
+            res.operaName = report.Opera_Name__c;
+            res.breakORFallOff = report.BreakORFallOff__c;
+            res.setusageproduct = report.Set_usage_product__c;
+            res.afterFailureInformation = report.AfterFailureInformation__c;
+            res.delay15Min = report.Delay15Min__c;
+            res.informationFrom = report.InformationFrom__c;
+            res.failureQInHospital = report.FailureQInHospital__c;
+            res.ownername = report.Owner.name;
+            res.failuerSituation = report.failuer_situation__c;
+            res.isUsedForTheOpera = report.Is_Used_For_The_Opera__c;
+            res.specialfollow = report.Special_follow__c;
+            res.accParentId = acc.ParentId;
+            res.accParentRecordTypeId = acc.Parent.RecordTypeId;
+            res.accParentParentFSEGIMainLeader = acc.Parent.Parent.FSE_GI_Main_Leader__c;
+            res.accParentParentFSEGIMainLeaderWorkLocation = acc.Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c;
+            res.accParentParentFSESPMainLeader = acc.Parent.Parent.FSE_SP_Main_Leader__c;
+            res.accParentParentFSESPMainLeaderWorkLocation = acc.Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c;
+            System.debug(LoggingLevel.INFO, '*** res: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }
      // PDF(QIS鐢宠涔�)
     @AuraEnabled
     public static InitData initForlexPDFQISrequestButton (String recordId){
@@ -536,8 +603,144 @@
         }
         return res;
     }
+
+    // OCSM鏈嶅姟鏈儴妫�娴嬪畬姣�
+    @AuraEnabled
+    public static InitData initForlexRCinspectioncompletedateButton (String recordId){
+        InitData res = new initData();
+        ID myUserID = UserInfo.getUserId();
+        User userinfo = [SELECT id,Profile.name FROM User WHERE Id = :myUserID LIMIT 1];
+        try{
+            QIS_Report__c report = [SELECT  id ,RC_inspection_date__c,QIS_Status__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
+            res.Id = report.Id;
+            res.rCinspectionDate = report.RC_inspection_date__c;
+            res.QIStatus = report.QIS_Status__c;
+            System.debug(LoggingLevel.INFO, '*** res: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }
+
+    @AuraEnabled
+    public static String updateQisForRCinspectioncompletedate (String recordId){
+        String re = '鎴愬姛'; 
+        ID myUserID = UserInfo.getUserId();
+        User userinfo = [SELECT id,Alias FROM User WHERE Id = :myUserID LIMIT 1];
+
+        try{    
+                QIS_Report__c rac  = new QIS_Report__c();   
+                rac.id = recordId;
+                rac.RC_inspection_date__c  = Date.today();
+                rac.RC__c = myUserID;
+                rac.RC_Inspection_staff__c  = userinfo.Alias;
+                update rac;
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+            re = e.getMessage();
+        }
+         return re;
+    }
+    // OSH妫�鏌ュ彈鐞�
+    @AuraEnabled
+    public static InitData initForlexOSHInspectButton (String recordId){
+        InitData res = new initData();
+        ID myUserID = UserInfo.getUserId();
+        User userinfo = [SELECT id,Profile.name FROM User WHERE Id = :myUserID LIMIT 1];
+        try{
+            QIS_Report__c report = [SELECT  id ,OSHInspectionDate__c,QIS_Status__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
+            res.Id = report.Id;
+            res.oSHInspectionDate = report.OSHInspectionDate__c;
+            res.QIStatus = report.QIS_Status__c;
+            System.debug(LoggingLevel.INFO, '*** res: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }
+
+    @AuraEnabled
+    public static String updateQisForlexOSHInspect (String recordId){
+        String re = '鎴愬姛'; 
+        try{    
+                QIS_Report__c rac  = new QIS_Report__c();   
+                rac.id = recordId;
+                rac.OSHInspectionDate__c   = Date.today();
+                update rac;
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+            re = e.getMessage();
+        }
+         return re;
+    }
+
+     //     澶嶅埗1
+   @AuraEnabled
+    public static InitData initForlexcopyQISButton (String recordId){
+        InitData res = new initData();
+        try{
+            QIS_Report__c report = [SELECT  id,Name,QIS_Status__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];  
+            res.Id = report.Id;
+            res.name = report.Name;
+            res.qIStatus = report.QIS_Status__c;
+            System.debug(LoggingLevel.INFO, '*** res: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }
+
+     // OCSM鏃犲疄鐗╅�佽揪
+    @AuraEnabled
+    public static InitData initForlexOCSMNogoodsButton (String recordId){
+        InitData res = new initData();
+        ID myUserID = UserInfo.getUserId();
+        User userinfo = [SELECT id,Profile.name FROM User WHERE Id = :myUserID LIMIT 1];
+        try{
+            QIS_Report__c report = [SELECT  id ,QIS_Status__c,isAE_Profile__c,is_CNBuy__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
+            res.Id = report.Id;
+            res.isAEProfile = report.isAE_Profile__c;
+            res.QIStatus = report.QIS_Status__c;
+            res.isCNBuy = report.is_CNBuy__c;
+            System.debug(LoggingLevel.INFO, '*** res: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }
+
+    @AuraEnabled
+    public static String updatelexOCSMNogoods (String recordId){
+        String re = '鎴愬姛'; 
+        ID myUserID = UserInfo.getUserId();
+        User userinfo = [SELECT Id,Alias__c,Alias, BuchangApprovalManagerSales__c,JingliApprovalManager__c, BuchangApprovalManager__c, ZongjianApprovalManager__c FROM User WHERE Id = :myUserID LIMIT 1];
+
+        try{    
+                QIS_Report__c rac  = new QIS_Report__c();   
+                rac.id = recordId;
+                rac.QIS_Status__c   = 'RC妫�娴嬩腑';
+                rac.OCM_RC_RecievedDate__c    = Date.today();
+                rac.RC__c = myUserID;
+                if (userinfo != null) {
+                    rac.RC_Receive_staff__c   = userinfo.Alias;
+                }
+                if (userinfo != null && userinfo.BuchangApprovalManagerSales__c !=null) {
+                    rac.RC_Manager__c  = userinfo.BuchangApprovalManagerSales__c;
+                }else{
+                    rac.RC_Manager__c = myUserID;
+                }
+                rac.CDS_date__c    = Date.today();
+                rac.RC_CDS_staff__c   = userinfo.Alias__c;
+                rac.OCSM_Nogoods__c   = true;
+                update rac;
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+            re = e.getMessage();
+        }
+         return re;
+    }
     public class InitData{
-       @AuraEnabled
+        @AuraEnabled
         public String Id;
         @AuraEnabled
         public String qISSCReport;
@@ -675,6 +878,7 @@
         public Boolean isSendQIS;
         @AuraEnabled
         public Boolean specialfollow;
+        
     }
 
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.css b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.css
new file mode 100644
index 0000000..8d634cd
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.css
@@ -0,0 +1,10 @@
+.createEmailHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.html b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.html
new file mode 100644
index 0000000..61d9b05
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="createEmailHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js
new file mode 100644
index 0000000..8a2f637
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js
@@ -0,0 +1,231 @@
+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.initForlexCreateRepairButton';
+import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
+import { updateRecord } from 'lightning/uiRecordApi';
+
+export default class lexCreateRepair extends LightningElement {
+	@api recordId;
+	IsLoading = true;
+	typeflag = false;
+	newflag = false;
+	qisReportId='';
+	name='';
+	qisRecordTypeId='';
+    err='';
+    accParentId='';
+    accParentRecordTypeId='';
+    accParentParentFSEGIMainLeader='';
+    accParentParentFSEGIMainLeaderWorkLocation='';
+    accParentParentFSESPMainLeader='';
+    accParentParentFSESPMainLeaderWorkLocation='';
+    WorkLocation='';
+    accrecordId='';
+    oCMjudgement='';
+    nextaction='';
+    specialfollow='';
+    comment='';
+    isUsedForTheOpera='';
+    UseFailProductFinish='';
+    failuerSituation='';
+    sourceOnCall='';
+    hospitalId='';
+    departmentClassId='';
+    hospitalDepartment='';
+    nonyushohinId='';
+    ownerId='';
+    faliourdate='';
+    sourceforrepair='';
+    repairSalesPointProvinceChina='';
+    trableoccurdaYcollect='';
+    damageForDocOrPat='';
+    relationWithTheProblem='';
+    reportForGoz='';
+    whichProject='';
+    operaName='';
+    breakORFallOff='';
+    setusageproduct='';
+    afterFailureInformation='';
+    delay15Min='';
+    informationFrom='';
+    failureQInHospital='';
+    ownername='';
+    hospitalname = '';
+    departmentClassname = '';
+    hospitalDepartmentname = '';
+    nonyushohinIdname = '';
+    sourceOnCallname = '';
+
+	@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 () {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            this.IsLoading = false;
+            this.qisReportId = result.Id;
+            this.oCMjudgement = result.oCMjudgement;
+            this.nextaction = result.nextaction;
+            this.ownername = result.ownername;
+            this.specialfollow = result.specialfollow;
+            this.qisRecordTypeId = result.qisRecordTypeId;
+            this.accParentId = result.accParentId;
+            this.comment = result.comment;
+            if (result.sourceOnCall!=null) {
+            	this.sourceOnCall = result.sourceOnCall;
+            	this.sourceOnCallname = result.sourceOnCallname;
+            }
+            this.name = result.name;
+            this.hospitalId = result.hospitalId;
+            this.hospitalname = result.hospitalname;
+            this.departmentClassname = result.departmentClassname;
+            this.departmentClassId = result.departmentClassId;
+            this.hospitalDepartment = result.hospitalDepartment;
+            this.nonyushohinId = result.nonyushohinId;
+            this.ownerId = result.ownerId;
+            this.faliourdate = result.faliourdate;
+            this.sourceforrepair = result.sourceforrepair;
+            this.repairSalesPointProvinceChina = result.repairSalesPointProvinceChina;
+            this.trableoccurdaYcollect = result.trableoccurdaYcollect;
+            this.damageForDocOrPat = result.damageForDocOrPat;
+            this.relationWithTheProblem = result.relationWithTheProblem;
+            this.reportForGoz = result.reportForGoz;
+            this.whichProject = result.whichProject;
+            this.operaName = result.operaName;
+            this.breakORFallOff = result.breakORFallOff;
+            this.setusageproduct = result.setusageproduct;
+            this.afterFailureInformation = result.afterFailureInformation;
+            this.delay15Min = result.delay15Min;
+            this.informationFrom = result.informationFrom;
+            this.failureQInHospital = result.failureQInHospital;
+            this.failuerSituation = result.failuerSituation;
+            this.isUsedForTheOpera = result.isUsedForTheOpera;
+            this.accParentRecordTypeId = result.accParentRecordTypeId;
+            this.accParentParentFSEGIMainLeader = result.accParentParentFSEGIMainLeader;
+            this.accParentParentFSEGIMainLeaderWorkLocation = result.accParentParentFSEGIMainLeaderWorkLocation;
+            this.accParentParentFSESPMainLeader = result.accParentParentFSESPMainLeader;
+            this.accParentParentFSESPMainLeaderWorkLocation = result.accParentParentFSESPMainLeaderWorkLocation;
+         	if (this.qisRecordTypeId != '01210000000RLWc' && this.qisRecordTypeId != '01210000000RLWh') {
+         		this.typeflag = true;
+         	}
+         	if (this.accParentId != null) {
+         		if (this.accParentRecordTypeId != null) {
+         			this.accrecordId = this.accParentRecordTypeId.substring(0,15);
+         			if (this.accrecordId == '01210000000QemL' || this.accrecordId == '01210000000QezZ' || this.accrecordId == '01210000000QemQ') {
+         				if (this.accParentParentFSEGIMainLeader != null) {
+         					this.WorkLocation = this.accParentParentFSEGIMainLeaderWorkLocation;
+         				}
+         			}else if(this.accrecordId == '01210000000Qeze' || this.accrecordId == '01210000000Qezj' || this.accrecordId == '01210000000Qezt'|| this.accrecordId == '01210000000Qezo'|| this.accrecordId == '01210000000Qezy'){
+         				if (this.accParentParentFSESPMainLeader != null) {
+         					this.WorkLocation = this.accParentParentFSESPMainLeaderWorkLocation;
+         				}
+         			}
+         		}
+         	}
+         	if ((this.oCMjudgement == '璐ㄩ噺闂' && this.nextaction == '鏃犲伩缁翠慨') ||
+         		(this.oCMjudgement == '璐ㄩ噺闂' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == '0') || 
+         		(this.oCMjudgement == '闈炶川閲忛棶棰�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == '1') || 
+         		(this.oCMjudgement == '闈炶川閲忛棶棰�' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == '0') || 
+         		(this.oCMjudgement == '璐ㄩ噺闂+闈炶川閲忛棶棰�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == '1') || 
+         		(this.oCMjudgement == '璐ㄩ噺闂+闈炶川閲忛棶棰�' && this.nextaction == '鏈夊伩缁翠慨+鏃犲伩缁翠慨' && this.specialfollow == '0') || 
+         		(this.oCMjudgement == '鐜拌薄鏈彂鐜�' && this.nextaction == '鏃犲伩缁翠慨' && this.specialfollow == '1') || 
+         		(this.oCMjudgement == '鐜拌薄鏈彂鐜�' && this.nextaction == '鏈夊伩缁翠慨' && this.specialfollow == '0')) {
+         		this.newflag = true;
+         	}
+         	console.log('this.newflag = '+this.newflag);
+         	console.log('this.typeflag = '+this.typeflag);
+         	if ( this.newflag && this.typeflag) {
+         		if (this.isUsedForTheOpera == 'YES') {
+         			this.UseFailProductFinish = '鏄�';
+         		}else if(this.isUsedForTheOpera == 'NO-鐢ㄦ浛浠e搧瀹屾垚浜�'){
+         			this.UseFailProductFinish = '鍚�-鐢ㄦ浛浠e搧瀹屾垚';
+         		}else if(this.isUsedForTheOpera == 'NO-鐢ㄥ叾浠栧叕鍙哥殑鍚岀被浜у搧瀹屾垚浜�'){
+         			this.UseFailProductFinish = '鍚�-鐢ㄥ叾浠栧叕鍙哥殑鍚岀被浜у搧瀹屾垚';
+         		}else if(this.isUsedForTheOpera == 'NO-鎵嬫湳涓'){
+         			this.UseFailProductFinish = '鍚�-鎵嬫湳涓';
+         		}
+         		if ('浣跨敤鍓嶅噯澶�' == this.failuerSituation) {
+         			this.failuerSituation = '浣跨敤鍓嶅噯澶�-鎮h�呮湭楹婚唹';
+         		}
+         		var url = '';
+         			url = "/a0J/e?" +
+						"CF00N10000002FIJU_lkid="+this.sourceOnCall+"&" +
+						"CF00N10000002FIJU="+this.sourceOnCallname+"&" +
+						"CF00N10000002FIJZ_lkid="+this.qisReportId+"&" +
+						"CF00N10000002FIJZ="+this.name+"&" +
+						"CF00N10000002Dx66_lkid="+this.hospitalId+"&" +
+						"CF00N10000002Dx66="+this.hospitalname+"&" +
+						"CF00N10000002Dx5t_lkid="+this.departmentClassId+"&" +
+						"CF00N10000002Dx5t="+this.departmentClassname+"&" +
+						"CF00N10000002Dx5n_lkid="+this.hospitalDepartment+"&" +
+						"CF00N10000002Dx5n="+this.hospitalDepartmentname+"&" +
+						"CF00N10000002Dx1X_lkid="+this.nonyushohinId+"&" +
+						"CF00N10000002Dx1X="+this.nonyushohinIdname+"&" +
+						"CF00N10000002EMHw_lkid="+this.ownerId+"&" +
+						"CF00N10000002EMHw="+this.ownername+"&" +
+						"00N10000002Dx5y="+this.faliourdate+"&" +
+						"00N10000002Dx6I="+this.comment+"&" +
+						"00N10000002FH86="+this.sourceforrepair+"&" +
+						"00N10000006P6Rn="+this.repairSalesPointProvinceChina+"&" +
+						"00N10000008rsVQ="+this.trableoccurdaYcollect+"&" +
+						"00N10000008rsW7="+this.damageForDocOrPat+"&"+
+						"00N10000008rsVw="+this.relationWithTheProblem+"&"+
+						"00N10000008rsW2="+this.reportForGoz+"&"+
+						"00N10000008rsW6="+this.whichProject+"&"+
+						"00N10000008rsVk="+this.operaName+"&" +
+						"00N10000008rsVN="+this.breakORFallOff+"&"+
+						"00N10000008rsW4="+this.setusageproduct+"&" +
+						"00N10000008rsVL="+this.afterFailureInformation+"&" +
+						"00N10000008rsVR="+this.delay15Min+"&"+
+						"00N10000008rsVZ="+this.informationFrom+"&"+
+						"00N10000008rsVT="+this.failureQInHospital+"&" +
+						"00N10000008rsVv="+this.failuerSituation+"&"+
+						"00N10000008rsW5="+this.UseFailProductFinish+ "&" +
+						"00N10000006P6SM="+this.WorkLocation+ "&" +
+						"retURL=%2F"+this.qisReportId;
+						window.open(url, "_blank");
+						this.dispatchEvent(new CloseActionScreenEvent());
+         	}else{
+         		const evt = new ShowToastEvent({
+                        title : '璇IS涓嶈兘鏂板缓淇悊',
+                        message: '',
+                        variant: 'error'
+                    });
+                    this.dispatchEvent(evt);
+                this.dispatchEvent(new CloseActionScreenEvent());
+         		return;
+         	}
+        }).catch(error => {
+            
+            const evt = new ShowToastEvent({
+                        title : '鍙戠敓閿欒',
+                        message: '',
+                        variant: 'error'
+                    });
+                    this.dispatchEvent(evt);
+
+            this.dispatchEvent(new CloseActionScreenEvent());
+            console.log('error='+error);
+         	return;
+        }).finally(() => {
+            
+        }); 
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js-meta.xml b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js-meta.xml
new file mode 100644
index 0000000..6cafb47
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexCreateRepair">
+   <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/lexOCSMNogoods/lexOCSMNogoods.css b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css
@@ -0,0 +1,22 @@
+.outerBorderCss{
+    border: 1px solid #D4D4D4;
+    border-radius : 5px;
+    border-top : 3px solid #565959;
+}
+.borderCss{
+    border: 1px solid #D4D4D4;
+    border-radius : 5px;
+    margin-bottom : 7px;
+    border-top : 3px solid #565959;
+}
+.headerDorderCss{
+    border-top: 1px solid #565959;
+    border-bottom: 1px solid #D4D4D4;
+    padding:3px;
+}
+.centerCss{
+    text-align: center;
+}
+.centerCss .left{
+    margin-left: 100px;
+}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.html b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="sisToOPDHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ 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
new file mode 100644
index 0000000..f7be272
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
@@ -0,0 +1,101 @@
+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 { updateRecord } from 'lightning/uiRecordApi';
+import init  from '@salesforce/apex/QISReportController.initForlexRCRecievedButton';
+import updateQis  from '@salesforce/apex/QISReportController.updateQisForRCRecieved';
+
+export default class lexOCSMNogoods extends LightningElement {
+	@api recordId;
+	err;
+	IsLoading = true;
+	qisReportId;
+	qisStatus;
+	isAEProfile;
+	isCNBuy;
+	 @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 () {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            this.IsLoading = false;
+            this.qisReportId = result.Id;
+            this.qisStatus = result.qIStatus;
+            this.isAEProfile = result.isAEProfile;
+            this.isCNBuy = result.isCNBuy;
+            console.log('this.qisStatus='+this.qisStatus);   
+         	if (this.qisStatus!='RC妫�娴嬬敵璇�') {
+                const evt = new ShowToastEvent({
+                        title : 'OCM鏈嶅姟鏈儴宸茬粡鏀跺埌瀹炵墿',
+                        message: '',
+                        variant: 'error'
+                    });
+                this.dispatchEvent(evt);
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+         	}else{
+         		if (this.isAEProfile == null || this.isPAEProfile == null || this.isCNBuy != 'true') {
+         			const evt = new ShowToastEvent({
+                        title : '瀹夊叏淇℃伅鏈垽瀹氾紝璇疯仈绯昏川閲忔硶瑙勯儴',
+                        message: '',
+                        variant: 'error'
+                    });
+	                this.dispatchEvent(evt);
+	                this.dispatchEvent(new CloseActionScreenEvent());
+	                return;
+         		}else{
+         			this.updateQisSubmit();
+         		}
+         	}
+        }).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        }); 
+    }
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    updateQisSubmit(){
+        	updateQis({
+        		 recordId: this.recordId
+        		}).then(result =>{
+                    
+        			console.log('result'+result);
+        			this.err = result;
+        			if (result!='鎴愬姛') {
+                        const evt = new ShowToastEvent({
+                            title : '鏇存柊澶辫触',
+                            message: this.err,
+                            variant: 'error'
+                        });
+                        this.dispatchEvent(evt);
+                    }
+                this.dispatchEvent(new CloseActionScreenEvent());
+                this.updateRecordView(this.recordId);
+        		}).catch(error => {
+           				 console.log('error='+error);
+		        }).finally(() => {
+		            
+		        });
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js-meta.xml b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js-meta.xml
new file mode 100644
index 0000000..7881cfb
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCSMNogoods">
+     <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/lexOSHInspect/lexOSHInspect.css b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.css
new file mode 100644
index 0000000..f708a55
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.css
@@ -0,0 +1,10 @@
+.opdToSISHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.html b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.html
new file mode 100644
index 0000000..cc6a015
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="opdToSISHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js
new file mode 100644
index 0000000..55e5142
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js
@@ -0,0 +1,100 @@
+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.initForlexOSHInspectButton';
+import updateQis  from '@salesforce/apex/QISReportController.updateQisForlexOSHInspect';
+import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
+import { updateRecord } from 'lightning/uiRecordApi';
+
+export default class lexOSHInspect extends LightningElement {
+	@api recordId;
+	IsLoading = true;
+	qisReportId;
+	qisStatus;
+	oSHInspectionDate;
+    err;
+    @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 () {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            this.IsLoading = false;
+            this.qisReportId = result.Id;
+            this.qisStatus = result.qIStatus;
+            this.oSHInspectionDate = result.oSHInspectionDate;
+         	if (this.qisStatus!='OSH妫�娴嬩腑') {
+         		const evt = new ShowToastEvent({
+                            title : '闇�瑕佸厛鐐瑰嚮锛籓SH鐜板搧鏀跺埌锛�',
+                            message: '',
+                            variant: 'error'
+                        });
+                        this.dispatchEvent(evt);
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        return;
+         	}else if(this.oSHInspectionDate != null){
+         		const evt = new ShowToastEvent({
+                            title : 'OSH妫�娴嬪凡缁忓彈鐞�',
+                            message: '',
+                            variant: 'error'
+                        });
+                        this.dispatchEvent(evt);
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        return;
+         	}else{
+         		this.updateQisSubmit();
+         	}
+         	
+    
+			
+        }).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        }); 
+    }
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    updateQisSubmit(){
+        	updateQis({
+        		 recordId: this.recordId
+        		}).then(result =>{
+        			console.log('result'+result);
+        			if (result!='鎴愬姛') {
+                        this.err = result;
+                        const evt = new ShowToastEvent({
+                            title : '鏇存柊澶辫触',
+                            message: this.err,
+                            variant: 'error'
+                        });
+                        this.dispatchEvent(evt);
+                    }
+                this.dispatchEvent(new CloseActionScreenEvent());
+                this.updateRecordView(this.recordId);
+        		}).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        });
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js-meta.xml b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js-meta.xml
new file mode 100644
index 0000000..220e747
--- /dev/null
+++ b/force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOSHInspect">
+      <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/lexRCinspectioncompletedate/lexRCinspectioncompletedate.css b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.css
new file mode 100644
index 0000000..635bc6c
--- /dev/null
+++ b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.css
@@ -0,0 +1,22 @@
+.outerBorderCss{
+    border: 1px solid #D4D4D4;
+    border-radius : 5px;
+    border-top : 3px solid #565959;
+}
+.borderCss{
+    border: 1px solid #D4D4D4;
+    border-radius : 5px;
+    margin-bottom : 7px;
+    border-top : 3px solid #565959;
+}
+.headerDorderCss{
+    border-top: 1px solid #565959;
+    border-bottom: 1px solid #D4D4D4;
+    padding:3px;
+}
+.centerCss{
+    text-align: center;
+}
+.centerCss .left{
+    margin-left: 100px;
+}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.html b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.html
new file mode 100644
index 0000000..49a10f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="sisToOPDHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js
new file mode 100644
index 0000000..73d0840
--- /dev/null
+++ b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js
@@ -0,0 +1,98 @@
+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 { updateRecord } from 'lightning/uiRecordApi';
+import init  from '@salesforce/apex/QISReportController.initForlexRCinspectioncompletedateButton';
+import updateQis  from '@salesforce/apex/QISReportController.updateQisForRCinspectioncompletedate';
+
+export default class lexRCinspectioncompletedate extends LightningElement {
+	@api recordId;
+	err;
+	IsLoading = true;
+	qisReportId;
+	qisStatus;
+	rCinspectionDate;
+
+	 @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 () {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            this.IsLoading = false;
+            this.qisReportId = result.Id;
+            this.qisStatus = result.qIStatus;
+            this.rCinspectionDate = result.rCinspectionDate;
+
+         	if (this.qisStatus =='RC妫�娴嬬敵璇�') {
+                const evt = new ShowToastEvent({
+                        title : '闇�瑕佸厛鐐瑰嚮锛籓CM鏈嶅姟鏈儴鏀跺埌瀹炵墿锛�',
+                        message: '',
+                        variant: 'error'
+                    });
+                this.dispatchEvent(evt);
+                this.dispatchEvent(new CloseActionScreenEvent());
+                return;
+         	}else if(this.rCinspectionDate != null){
+         			const evt = new ShowToastEvent({
+                        title : 'OCM鏈嶅姟鏈儴妫�娴嬪凡缁忓畬姣�',
+                        message: '',
+                        variant: 'error'
+                    });
+	                this.dispatchEvent(evt);
+	                this.dispatchEvent(new CloseActionScreenEvent());
+	                return;
+         	}else{
+         		this.updateQisSubmit();
+         	}
+        }).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        }); 
+    }
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    updateQisSubmit(){
+        	updateQis({
+        		 recordId: this.recordId
+        		}).then(result =>{
+                    
+        			console.log('result'+result);
+        			this.err = result;
+        			if (result!='鎴愬姛') {
+                        const evt = new ShowToastEvent({
+                            title : '鏇存柊澶辫触',
+                            message: this.err,
+                            variant: 'error'
+                        });
+                        this.dispatchEvent(evt);
+                    }
+                this.dispatchEvent(new CloseActionScreenEvent());
+                this.updateRecordView(this.recordId);
+        		}).catch(error => {
+           				 console.log('error='+error);
+		        }).finally(() => {
+		            
+		        });
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js-meta.xml b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js-meta.xml
new file mode 100644
index 0000000..1546b5e
--- /dev/null
+++ b/force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRCinspectioncompletedate">
+    <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/lexcopyQIS/lexcopyQIS.css b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css
new file mode 100644
index 0000000..9acb129
--- /dev/null
+++ b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css
@@ -0,0 +1,22 @@
+.outerBorderCss{
+    border: 1px solid #D4D4D4;
+    border-radius : 5px;
+    border-top : 3px solid #565959;
+}
+.borderCss{
+    border: 1px solid #D4D4D4;
+    border-radius : 5px;
+    margin-bottom : 7px;
+    border-top : 3px solid #565959;
+}
+.headerDorderCss{
+    border-top: 1px solid #565959;
+    border-bottom: 1px solid #D4D4D4;
+    padding:3px;
+}
+.centerCss{
+    text-align: center;
+}
+.centerCss .left{
+    margin-left: 100px;
+}/* sample css file *//* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html
new file mode 100644
index 0000000..c8bdbfc
--- /dev/null
+++ b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.html
@@ -0,0 +1,5 @@
+<template>
+   <div class="sisToOPDHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </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
new file mode 100644
index 0000000..ee1cc09
--- /dev/null
+++ b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
@@ -0,0 +1,61 @@
+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 { updateRecord } from 'lightning/uiRecordApi';
+import init  from '@salesforce/apex/QISReportController.initForlexcopyQISButton';
+
+
+export default class lexcopyQIS extends LightningElement {
+	@api recordId;
+	err;
+	IsLoading = true;
+	qisReportId;
+	qisStatus;
+	name;
+	
+	 @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 () {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            this.IsLoading = false;
+            this.qisReportId = result.Id;
+            this.qisStatus = result.qIStatus;
+            this.name = result.name;
+            if (this.qisStatus != '鍙栨秷') {
+            	const evt = new ShowToastEvent({
+                        title : '鐘舵�佷负鍙栨秷鐨凲IS鎵嶅彲浠ヨ澶嶅埗骞舵柊寤�',
+                        message: '',
+                        variant: 'error'
+                    });
+	                this.dispatchEvent(evt);
+	                this.dispatchEvent(new CloseActionScreenEvent());
+	                return;
+            }
+           	var url = "/"+this.qisReportId+"/e?newclone=1&retURL=%2F"+this.qisReportId+" &CF00N100000073PA0="+this.name+"&CF00N100000073PA0_lkid="+this.qisReportId;
+           	window.open(url);
+           	this.dispatchEvent(new CloseActionScreenEvent());
+        }).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        }); 
+    }
+}	
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js-meta.xml b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js-meta.xml
new file mode 100644
index 0000000..c629aee
--- /dev/null
+++ b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexcopyQIS">
+   <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

--
Gitblit v1.9.1