黄千龙
2023-07-18 428f42fab44b654c69fbc461513203830743d7de
hql20230718更新lightning按钮
18个文件已修改
1325 ■■■■■ 已修改文件
force-app/main/default/classes/QISReportController.cls 99 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js 243 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js 119 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNoToReportLighting/lexOCSMNoToReportLighting.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMToReportLighting/lexOCSMToReportLighting.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISAgree/lexQISAgree.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISSC/lexQISSC.js 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCRecieved/lexRCRecieved.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSendQIS/lexSendQIS.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/QISReportController.cls
@@ -19,8 +19,8 @@
        
        String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASAC_DECISION;
        try{
            PAE_DecisionRecord__c rCPAEDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId  And RecordType.DeveloperName =  :recordTypeId limit 1];
            res.pAEid = rCPAEDIdList.id;
            PAE_DecisionRecord__c RCPAEDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId  And RecordType.DeveloperName =  :recordTypeId limit 1];
            res.pAEid = RCPAEDIdList.id;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -48,8 +48,8 @@
        
        String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASRC_DECISION;
        try{
            PAE_DecisionRecord__c aSRCDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId  And RecordType.DeveloperName =  :recordTypeId Limit 1];
            res.pAEid = aSRCDIdList.id;
            PAE_DecisionRecord__c ASRCDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId  And RecordType.DeveloperName =  :recordTypeId Limit 1];
            res.pAEid = ASRCDIdList.id;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -528,6 +528,10 @@
    public static InitData initForlexCreateRepairButton (String recordId){
        InitData res = new initData();
        ID myUserID = UserInfo.getUserId();
        List<RecordType> RecordTypeList = [select id,name from RecordType where name = '2.OCSM' or name = '1.FSE' or name = '戦略科室分類 消化科'
                                            or name = '戦略科室分類 消化科' or name = '戦略科室分類 呼吸科' or name = '戦略科室分類ET'
                                            or name = '戦略科室分類 普外科' or name = '戦略科室分類 泌尿科' or name = '戦略科室分類 耳鼻喉科'
                                            or name = '戦略科室分類 婦人科' or name = '戦略科室分類 その他'];
        User userinfo = [SELECT id,RepairSalesPoint_Province_China__c FROM User WHERE Id = :myUserID LIMIT 1];
        QIS_Report__c report = [SELECT  id,Owner.name,FailureQInHospital__c,InformationFrom__c,Delay15Min__c,
                                AfterFailureInformation__c,Set_usage_product__c,BreakORFallOff__c,Opera_Name__c,
@@ -541,7 +545,39 @@
                        Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,
                        Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE id = :report.Hospital_Department__c limit 1];
        try{
            for (RecordType rec :RecordTypeList) {
                if (rec.name == '1.FSE') {
                    res.oneFSE = rec.id.to15();
                }
                if (rec.name == '2.OCSM') {
                    res.twoOCSM = rec.id.to15();
                }
                if (rec.name == '戦略科室分類 消化科') {
                    res.xiaohua = rec.id.to15();
                }
                if (rec.name == '戦略科室分類 呼吸科') {
                    res.huxi = rec.id.to15();
                }
                if (rec.name == '戦略科室分類ET') {
                    res.eT = rec.id.to15();
                }
                if (rec.name == '戦略科室分類 普外科') {
                    res.puwai = rec.id.to15();
                }
                if (rec.name == '戦略科室分類 泌尿科') {
                    res.miniao = rec.id.to15();
                }
                if (rec.name == '戦略科室分類 耳鼻喉科') {
                    res.erbihou = rec.id.to15();
                }
                if (rec.name == '戦略科室分類 婦人科') {
                    res.fuke = rec.id.to15();
                }
                if (rec.name == '戦略科室分類 その他') {
                    res.qita = rec.id.to15();
                }
            }
            res.Id = report.Id;
            res.qisRecordTypeId = report.RecordType_ID__c;
            res.oCMjudgement = report.OCM_judgement__c;
@@ -739,9 +775,30 @@
        }
         return re;
    }
     // 新建QIS
    @AuraEnabled
    public static InitData initForlexCreateQISFromAssetButton (String recordId){
        InitData res = new initData();
        ID myUserID = UserInfo.getUserId();
        Asset ass = [SELECT id,AssetMark__c FROM Asset WHERE Id = :recordId LIMIT 1];
        try{
            Date fomatToday = Date.today().addDays(-10);
            QIS_Report__c report = [SELECT id,QIS_Submit_day__c FROM QIS_Report__c WHERE nonyushohin__c=:recordId and QIS_Submit_day__c != null and QIS_Submit_day__c >= :fomatToday];
            Repair__c rep = [SELECT id,Name FROM Repair__c WHERE Delivered_Product__c = :recordId and Status2__c!='00.删除' and Status2__c!='00.取消' and FSE_ApplyForRepair_Day__c >= :fomatToday  order by FSE_ApplyForRepair_Day__c desc limit 1];
            res.Id = report.id;
            res.repId = rep.id;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String repId;
        @AuraEnabled
        public String qISSCReport;
        @AuraEnabled
@@ -769,23 +826,23 @@
        @AuraEnabled
        public String failuerSituation;
        @AuraEnabled
        public String sourceOnCall;
        public ID sourceOnCall;
        @AuraEnabled
        public String sourceOnCallname;
        @AuraEnabled
        public String hospitalId;
        public ID hospitalId;
        @AuraEnabled
        public String hospitalname;
        @AuraEnabled
        public String departmentClassId;
        public ID departmentClassId;
        @AuraEnabled
        public String departmentClassname;
        @AuraEnabled
        public String hospitalDepartment;
        public ID hospitalDepartment;
        @AuraEnabled
        public String hospitalDepartmentname;
        @AuraEnabled
        public String nonyushohinId;
        public ID nonyushohinId;
        @AuraEnabled
        public String nonyushohinIdname;
        @AuraEnabled
@@ -815,7 +872,7 @@
        @AuraEnabled
        public String failureQInHospital;
        @AuraEnabled
        public String ownerId;
        public ID ownerId;
        @AuraEnabled
        public String ownername;
        @AuraEnabled
@@ -853,6 +910,26 @@
        @AuraEnabled
        public String contractnumber;
        @AuraEnabled
        public String oneFSE;
        @AuraEnabled
        public String twoOCSM;
        @AuraEnabled
        public String huxi;
        @AuraEnabled
        public String xiaohua;
        @AuraEnabled
        public String eT;
        @AuraEnabled
        public String puwai;
        @AuraEnabled
        public String miniao;
        @AuraEnabled
        public String erbihou;
        @AuraEnabled
        public String fuke;
        @AuraEnabled
        public String qita;
        @AuraEnabled
        public Date rCinspectionDate;
        @AuraEnabled
        public Date qISReplyDay;
force-app/main/default/lwc/lexCreateRepair/lexCreateRepair.js
@@ -2,16 +2,25 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
import init  from '@salesforce/apex/QISReportController.initForlexCreateRepairButton';
export default class lexCreateRepair extends LightningElement {
    @api recordId;
    IsLoading = true;
    typeflag = false;
    newflag = false;
    qisReportId='';
    name='';
    qisRecordTypeId='';
/*
 * @Description: 新建修理
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexCreateRepair extends NavigationMixin(LightningElement) {
    @api recordId;
    IsLoading = true;
    typeflag = false;
    newflag = false;
    qisReportId='';
    name='';
    qisRecordTypeId='';
    err='';
    accParentId='';
    accParentRecordTypeId='';
@@ -29,11 +38,11 @@
    UseFailProductFinish='';
    failuerSituation='';
    sourceOnCall='';
    hospitalId='';
    departmentClassId='';
    hospitalId1;
    departmentClassId;
    hospitalDepartment='';
    nonyushohinId='';
    ownerId='';
    nonyushohinId;
    ownerId;
    faliourdate='';
    sourceforrepair='';
    repairSalesPointProvinceChina='';
@@ -55,8 +64,18 @@
    hospitalDepartmentname = '';
    nonyushohinIdname = '';
    sourceOnCallname = '';
    oneFSE = '';
    twoOCSM = '';
    huxi = '';
    xiaohua = '';
    eT = '';
    puwai = '';
    miniao = '';
    fuke = '';
    erbihou = '';
    qita = '';
    @wire(CurrentPageReference)
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
@@ -76,8 +95,19 @@
        init({
            recordId: this.recordId
        }).then(result => {
            console.log('init方法返回');
            this.IsLoading = false;
            this.oneFSE = result.oneFSE;
            this.twoOCSM = result.twoOCSM;
            this.qisReportId = result.Id;
            this.huxi = result.huxi;
            this.xiaohua = result.xiaohua;
            this.eT = result.eT;
            this.puwai = result.puwai;
            this.erbihou = result.erbihou;
            this.miniao = result.miniao;
            this.fuke = result.fuke;
            this.qita = result.qita;
            this.oCMjudgement = result.oCMjudgement;
            this.nextaction = result.nextaction;
            this.ownername = result.ownername;
@@ -86,11 +116,11 @@
            this.accParentId = result.accParentId;
            this.comment = result.comment;
            if (result.sourceOnCall!=null) {
                this.sourceOnCall = result.sourceOnCall;
                this.sourceOnCallname = result.sourceOnCallname;
                this.sourceOnCall = result.sourceOnCall;
                this.sourceOnCallname = result.sourceOnCallname;
            }
            this.name = result.name;
            this.hospitalId = result.hospitalId;
            this.hospitalId1 = result.hospitalId;
            this.hospitalname = result.hospitalname;
            this.departmentClassname = result.departmentClassname;
            this.departmentClassId = result.departmentClassId;
@@ -119,109 +149,112 @@
            this.accParentParentFSEGIMainLeaderWorkLocation = result.accParentParentFSEGIMainLeaderWorkLocation;
            this.accParentParentFSESPMainLeader = result.accParentParentFSESPMainLeader;
            this.accParentParentFSESPMainLeaderWorkLocation = result.accParentParentFSESPMainLeaderWorkLocation;
             if (this.qisRecordTypeId != '01210000000RLWc' && this.qisRecordTypeId != '01210000000RLWh') {
                 this.typeflag = true;
             }
             if (this.accParentId != null) {
                 if (this.accParentRecordTypeId != null) {
                     this.accrecordId = this.accParentRecordTypeId.substring(0,15);
                     if (this.accrecordId == '01210000000QemL' || this.accrecordId == '01210000000QezZ' || this.accrecordId == '01210000000QemQ') {
                         if (this.accParentParentFSEGIMainLeader != null) {
                             this.WorkLocation = this.accParentParentFSEGIMainLeaderWorkLocation;
                         }
                     }else if(this.accrecordId == '01210000000Qeze' || this.accrecordId == '01210000000Qezj' || this.accrecordId == '01210000000Qezt'|| this.accrecordId == '01210000000Qezo'|| this.accrecordId == '01210000000Qezy'){
                         if (this.accParentParentFSESPMainLeader != null) {
                             this.WorkLocation = this.accParentParentFSESPMainLeaderWorkLocation;
                         }
                     }
                 }
             }
             if ((this.oCMjudgement == '质量问题' && this.nextaction == '无偿维修') ||
                 (this.oCMjudgement == '质量问题' && this.nextaction == '有偿维修' && this.specialfollow == false) ||
                 (this.oCMjudgement == '非质量问题' && this.nextaction == '无偿维修' && this.specialfollow == true) ||
                 (this.oCMjudgement == '非质量问题' && this.nextaction == '有偿维修' && this.specialfollow == false) ||
                 (this.oCMjudgement == '质量问题+非质量问题' && this.nextaction == '无偿维修' && this.specialfollow == true) ||
                 (this.oCMjudgement == '质量问题+非质量问题' && this.nextaction == '有偿维修+无偿维修' && this.specialfollow == false) ||
                 (this.oCMjudgement == '现象未发现' && this.nextaction == '无偿维修' && this.specialfollow == true) ||
                 (this.oCMjudgement == '现象未发现' && this.nextaction == '有偿维修' && this.specialfollow == false)) {
                 this.newflag = true;
             }
             console.log('this.newflag = '+this.newflag);
             console.log('this.typeflag = '+this.typeflag);
            if (this.qisRecordTypeId != this.oneFSE && this.qisRecordTypeId != this.twoOCSM) {
                this.typeflag = true;
            }
            if (this.accParentId != null) {
                if (this.accParentRecordTypeId != null) {
                    this.accrecordId = this.accParentRecordTypeId.substring(0,15);
                    if (this.accrecordId == this.huxi || this.accrecordId == this.xiaohua || this.accrecordId == this.eT) {
                        if (this.accParentParentFSEGIMainLeader != null) {
                            this.WorkLocation = this.accParentParentFSEGIMainLeaderWorkLocation;
                        }
                    }else if(this.accrecordId == this.erbihou || this.accrecordId == this.qita || this.accrecordId == this.fuke|| this.accrecordId == this.puwai || this.accrecordId == this.miniao){
                        if (this.accParentParentFSESPMainLeader != null) {
                            this.WorkLocation = this.accParentParentFSESPMainLeaderWorkLocation;
                        }
                    }
                }
            }
            if ((this.oCMjudgement == '质量问题' && this.nextaction == '无偿维修') ||
                (this.oCMjudgement == '质量问题' && this.nextaction == '有偿维修' && this.specialfollow == false) ||
                (this.oCMjudgement == '非质量问题' && this.nextaction == '无偿维修' && this.specialfollow == true) ||
                (this.oCMjudgement == '非质量问题' && this.nextaction == '有偿维修' && this.specialfollow == false) ||
                (this.oCMjudgement == '质量问题+非质量问题' && this.nextaction == '无偿维修' && this.specialfollow == true) ||
                (this.oCMjudgement == '质量问题+非质量问题' && this.nextaction == '有偿维修+无偿维修' && this.specialfollow == false) ||
                (this.oCMjudgement == '现象未发现' && this.nextaction == '无偿维修' && this.specialfollow == true) ||
                (this.oCMjudgement == '现象未发现' && this.nextaction == '有偿维修' && this.specialfollow == false)) {
                this.newflag = true;
            }
            console.log('this.newflag = '+this.newflag);
            console.log('this.typeflag = '+this.typeflag);
    
             if ( this.newflag && this.typeflag) {
                 if (this.isUsedForTheOpera == 'YES') {
                     this.UseFailProductFinish = '是';
                 }else if(this.isUsedForTheOpera == 'NO-用替代品完成了'){
                     this.UseFailProductFinish = '否-用替代品完成';
                 }else if(this.isUsedForTheOpera == 'NO-用其他公司的同类产品完成了'){
                     this.UseFailProductFinish = '否-用其他公司的同类产品完成';
                 }else if(this.isUsedForTheOpera == 'NO-手术中止'){
                     this.UseFailProductFinish = '否-手术中止';
                 }
                 if ('使用前准备' == this.failuerSituation) {
                     this.failuerSituation = '使用前准备-患者未麻醉';
                 }
                 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 : '该QIS不能新建修理',
                        message: '',
            if ( this.newflag && this.typeflag) {
                if (this.isUsedForTheOpera == 'YES') {
                    this.UseFailProductFinish = '是';
                }else if(this.isUsedForTheOpera == 'NO-用替代品完成了'){
                    this.UseFailProductFinish = '否-用替代品完成';
                }else if(this.isUsedForTheOpera == 'NO-用其他公司的同类产品完成了'){
                    this.UseFailProductFinish = '否-用其他公司的同类产品完成';
                }else if(this.isUsedForTheOpera == 'NO-手术中止'){
                    this.UseFailProductFinish = '否-手术中止';
                }
                if ('使用前准备' == this.failuerSituation) {
                    this.failuerSituation = '使用前准备-患者未麻醉';
                }
                const defaultFieldValues =encodeDefaultFieldValues({
                                  On_Call_ID__c: this.sourceOnCall,
                                  QIS_ID__c: this.qisReportId,
                                  Hospital__c: this.hospitalId1,
                                  Department_Class__c: this.departmentClassId,
                                  Account__c:this.hospitalDepartment,
                                  Delivered_Product__c:this.nonyushohinId,
                                  Incharge_Staff__c:this.ownerId,
                                  Failure_Occurrence_Date__c:this.faliourdate,
                                  Repair_Detail__c:this.comment,
                                  Repair_Source__c:this.sourceforrepair,
                                  DateReceiptQuestions__c:this.trableoccurdaYcollect,
                                  ifDeadHurt__c:this.damageForDocOrPat,
                                  ProductFailureRelated__c:this.relationWithTheProblem,
                                  ReportAdverseEvents__c:this.reportForGoz,
                                  WhatProject__c:this.whichProject,
                                  OperationOrExaminationName__c:this.operaName,
                                  BreakORFallOff__c:this.breakORFallOff,
                                  SupportingProducts__c:this.setusageproduct,
                                  Delay15Min__c:this.delay15Min,
                                  AfterFailureInformation__c:this.afterFailureInformation,
                                  InformationFrom__c:this.informationFrom,
                                  FailureQInHospital__c:this.failureQInHospital,
                                  ProblemOccurred__c:this.failuerSituation,
                                  UseFailProductFinish__c:this.UseFailProductFinish,
                                  SalesOfficeCode_selection__c:this.WorkLocation
                                });
                        this[NavigationMixin.Navigate]({
                          type: 'standard__objectPage',
                          attributes: {
                            objectApiName: 'Repair__c',
                            actionName: 'new'
                          },
                          state: {
                            nooverride: '1',
                            defaultFieldValues: defaultFieldValues
                          }
                        });
            this.dispatchEvent(new CloseActionScreenEvent());
            }else{
                const evt = new ShowToastEvent({
                        title : '',
                        message: '该QIS不能新建修理',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                this.dispatchEvent(new CloseActionScreenEvent());
                 return;
             }
                return;
            }
        }).catch(error => {
            
            const evt = new ShowToastEvent({
                        title : '发生错误',
                        message: '',
                        title : '',
                        message: '发生错误',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
            this.dispatchEvent(new CloseActionScreenEvent());
            console.log('error='+error);
             return;
            return;
        }).finally(() => {
            
        }); 
force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
@@ -5,17 +5,24 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForOCMSubmitButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisWithOCM';
import { updateRecord } from 'lightning/uiRecordApi';
/*
 * @Description: 提交
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexOCMSubmit extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    QISInstallDate;
    qisStatus;
    contractnumber;
    isaohuiproduct;
    @api recordId;
    IsLoading = true;
    qisReportId;
    QISInstallDate;
    qisStatus;
    contractnumber;
    isaohuiproduct;
    err;
    @wire(CurrentPageReference)
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
@@ -41,49 +48,49 @@
            this.QISInstallDate = result.qISInstallDate;
            this.contractnumber = result.contractnumber;
            this.isaohuiproduct = result.isaohuiproduct;
             if (this.qisStatus!='草案中' && this.qisStatus!='取消') {
                 const evt = new ShowToastEvent({
                        title : '已经提交',
                        message: '',
            if (this.qisStatus!='草案中' && this.qisStatus!='取消') {
                const evt = new ShowToastEvent({
                        title : '',
                        message: '已经提交',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                this.dispatchEvent(new CloseActionScreenEvent());
                 return;
             }else{
                 if (this.qisStatus == '取消') {
                     const evt = new ShowToastEvent({
                        title : '取消后的QIS不允许再提交,如果需要提交请点击\"复制\"按钮重新生成一个QIS',
                        message: '',
                return;
            }else{
                if (this.qisStatus == '取消') {
                    const evt = new ShowToastEvent({
                        title : '',
                        message: '取消后的QIS不允许再提交,如果需要提交请点击\"复制\"按钮重新生成一个QIS',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                 }
             }
             if (this.QISInstallDate == null) {
                 const evt = new ShowToastEvent({
                        title : '【购买日期/安装日期】为空时不能提交申请',
                        message: '',
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }
            }
            if (this.QISInstallDate == null) {
                const evt = new ShowToastEvent({
                        title : '',
                        message: '【购买日期/安装日期】为空时不能提交申请',
                        variant: 'error'
                    });
                 this.dispatchEvent(evt);
                 this.dispatchEvent(new CloseActionScreenEvent());
                return;
             }
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }
             if (this.contractnumber == null) {
                 const evt = new ShowToastEvent({
                        title : '【销售合同上订单号码】为空时不能提交申请',
                        message: '',
            if (this.contractnumber == null) {
                const evt = new ShowToastEvent({
                        title : '',
                        message: '【销售合同上订单号码】为空时不能提交申请',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                 this.dispatchEvent(new CloseActionScreenEvent());
                return;
             }
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }
                LightningConfirm.open({
                message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?',
                variant: 'headerless',
@@ -106,24 +113,26 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                    if (result!='成功') {
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                    if (result!='成功') {
                        this.err = result;
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                    }
                        const evt = new ShowToastEvent({
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                        console.log('error='+error);
                }).finally(() => {
                });
                updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
                        console.log('error='+error);
                }).finally(() => {
                });
    }
}
force-app/main/default/lwc/lexOCSMNoToReportLighting/lexOCSMNoToReportLighting.js
@@ -3,14 +3,22 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import LightningConfirm from 'lightning/confirm';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
import init  from '@salesforce/apex/QISReportController.initForlexOCSMNoToReportLightingButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForlexOCSMNoToReportLighting';
/*
 * @Description: OCSM不要报告
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexOCSMNoToReportLighting extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    OCSMAdministrativeReportNumber;
    @api recordId;
    IsLoading = true;
    qisReportId;
    OCSMAdministrativeReportNumber;
    OCSMAdministrativeReportDate;
    Awaredate;
    err;
@@ -48,8 +56,8 @@
                    if(res) {
                        if (this.OCSMAdministrativeReportDate != null || this.OCSMAdministrativeReportNumber != null) {
                            const evt = new ShowToastEvent({
                                    title : '已经报告的QIS,不可以点击OCSM不要报告',
                                    message: '',
                                    title : '',
                                    message: '已经报告的QIS,不可以点击OCSM不要报告',
                                    variant: 'error'
                                });
                                this.dispatchEvent(evt);
@@ -60,8 +68,8 @@
                            this.updateQisSubmit();
                        }else{
                            const evt = new ShowToastEvent({
                                    title : '没有AwareDate或已经OCSM行政报告,请确认',
                                    message: '',
                                    title : '',
                                    message: '没有AwareDate或已经OCSM行政报告,请确认',
                                    variant: 'error'
                                });
                                this.dispatchEvent(evt);
@@ -81,21 +89,23 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                     this.err = result;
                    if (result!='成功') {
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
            
force-app/main/default/lwc/lexOCSMToReportLighting/lexOCSMToReportLighting.js
@@ -2,12 +2,19 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import LightningConfirm from 'lightning/confirm';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForlexOCSMToReportLightingButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForlexOCSMToReportLighting';
/*
 * @Description: OCSM要报告
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexOCSMToReportLighting extends LightningElement {
    @api recordId;
    @api recordId;
    str;
    err;
    IsLoading = true;
@@ -46,8 +53,8 @@
                            this.updateQisSubmit();
                        }else{
                            const evt = new ShowToastEvent({
                                    title : '没有AwareDate或已经OCSM行政报告,请确认',
                                    message: '',
                                    title : '',
                                    message: '没有AwareDate或已经OCSM行政报告,请确认',
                                    variant: 'error'
                                });
                                this.dispatchEvent(evt);
@@ -67,21 +74,23 @@
        });
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                     this.err = result;
                    if (result!='成功') {
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
            
force-app/main/default/lwc/lexOSHInspect/lexOSHInspect.js
@@ -3,14 +3,22 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForlexOSHInspectButton';
import { updateRecord } from 'lightning/uiRecordApi';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForlexOSHInspect';
/*
 * @Description: OSH检查受理
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexOSHInspect extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    qisStatus;
    oSHInspectionDate;
    @api recordId;
    IsLoading = true;
    qisReportId;
    qisStatus;
    oSHInspectionDate;
    err;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -37,30 +45,30 @@
            this.qisReportId = result.Id;
            this.qisStatus = result.qIStatus;
            this.oSHInspectionDate = result.oSHInspectionDate;
             if (this.qisStatus!='OSH检测中') {
                 const evt = new ShowToastEvent({
                            title : '需要先点击[OSH现品收到]',
                            message: '',
            if (this.qisStatus!='OSH检测中') {
                const evt = new ShowToastEvent({
                            title : '',
                            message: '需要先点击[OSH现品收到]',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
             }else if(this.oSHInspectionDate != null){
                 const evt = new ShowToastEvent({
                            title : 'OSH检测已经受理',
                            message: '',
            }else if(this.oSHInspectionDate != null){
                const evt = new ShowToastEvent({
                            title : '',
                            message: 'OSH检测已经受理',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
             }else{
                 this.updateQisSubmit();
             }
            }else{
                this.updateQisSubmit();
            }
    
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
@@ -68,21 +76,23 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                    if (result!='成功') {
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                    if (result!='成功') {
                        this.err = result;
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
            
force-app/main/default/lwc/lexOSHRecieved/lexOSHRecieved.js
@@ -4,13 +4,20 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForOSHRecievedButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQis';
import { updateRecord } from 'lightning/uiRecordApi';
/*
 * @Description: OSH现品收到
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexOSHRecieved extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    qisStatus;
     @wire(CurrentPageReference)
    @api recordId;
    IsLoading = true;
    qisReportId;
    qisStatus;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
@@ -34,18 +41,18 @@
            this.qisReportId = result.Id;
            this.qisStatus = result.qIStatus;
            console.log('this.qisStatus='+this.qisStatus);
             if (this.qisStatus!='OSH检测申请' && this.qisStatus!='完毕') {
            if (this.qisStatus!='OSH检测申请' && this.qisStatus!='完毕') {
                const evt = new ShowToastEvent({
                        title : 'OSH已经收到实物',
                        message: '',
                        title : '',
                        message: 'OSH已经收到实物',
                        variant: 'error'
                    });
                this.dispatchEvent(evt);
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
             }else{
                 this.updateQisSubmit();
             }
            }else{
                this.updateQisSubmit();
            }
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
@@ -53,21 +60,23 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    
                    console.log('result'+result);
                    if (result!='成功') {
                    console.log('result'+result);
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: result,
                            title : '',
                            message: '更新失败'+result,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
            
force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.js
@@ -5,13 +5,21 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForOSHSubmitButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQis1';
import { updateRecord } from 'lightning/uiRecordApi';
/*
 * @Description: 提交待审批1
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexOSHSubmit extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    qisStatus;
    OSHstaff;
    OSHstaffEmail;
    @api recordId;
    IsLoading = true;
    qisReportId;
    qisStatus;
    OSHstaff;
    OSHstaffEmail;
    err;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -42,26 +50,26 @@
            console.log('this.qisStatus='+this.qisStatus);
            console.log('this.OSHstaff='+this.OSHstaff);
            console.log('this.OSHstaffEmail='+this.OSHstaffEmail);
             if (this.qisStatus=='OSH检测申请' || this.qisStatus=='完毕') {
            if (this.qisStatus=='OSH检测申请' || this.qisStatus=='完毕') {
                const evt = new ShowToastEvent({
                            title : '需要先点击[OSH检查受理]',
                            message: '',
                            title : '',
                            message: '需要先点击[OSH检查受理]',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
             }
             if (this.qisStatus!='OSH检测中') {
            }
            if (this.qisStatus!='OSH检测中') {
                const evt = new ShowToastEvent({
                            title : '已经提交审批',
                            message: '',
                            title : '',
                            message: '已经提交审批',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
             }
            }
            LightningConfirm.open({
            message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?',
            variant: 'headerless',
@@ -71,8 +79,8 @@
                if(res) {
                    if (this.OSHstaff==null||this.OSHstaffEmail==null) {
                        const evt = new ShowToastEvent({
                                    title : 'OSH担当必须填写',
                                    message: '',
                                    title : '',
                                    message: 'OSH担当必须填写',
                                    variant: 'error'
                                });
                                this.dispatchEvent(evt);
@@ -84,8 +92,8 @@
                        }catch(err){
                            if(err.faultstring !=undefined && err.faultstring.indexOf('INVALID_SESSION_ID') != -1) {
                                const evt = new ShowToastEvent({
                                        title : '当前网页已登出,请您重新登录后刷新该网页!',
                                        message: '',
                                        title : '',
                                        message: '当前网页已登出,请您重新登录后刷新该网页!',
                                        variant: 'error'
                                    });
                                    this.dispatchEvent(evt);
@@ -109,7 +117,7 @@
                }
                
            });
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
@@ -117,21 +125,24 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                    if (result!='成功') {
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                    if (result!='成功') {
                        this.err = result;
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                 updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
            
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js
@@ -3,10 +3,17 @@
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/QISReportController.initForlexPDFQISrequestButton';
/*
 * @Description: PDF(QIS申请书)
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexPDFQISrequest extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    @api recordId;
    IsLoading = true;
    qisReportId;
    err;
    @wire(CurrentPageReference)
force-app/main/default/lwc/lexQISAgree/lexQISAgree.js
@@ -5,12 +5,19 @@
import init  from '@salesforce/apex/QISReportController.initForQisAgreeButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForQisAgree';
import USER_ID from '@salesforce/user/Id';
import { updateRecord } from 'lightning/uiRecordApi';
/*
 * @Description: QIS结果跟进完毕
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexQISAgree extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    OwnerId;
    @api recordId;
    IsLoading = true;
    qisReportId;
    OwnerId;
    userId = USER_ID;
    err;
@@ -38,16 +45,16 @@
            this.qisReportId = result.Id;
            this.OwnerId = result.ownerId;
            if (this.OwnerId != this.userId) {
                const evt = new ShowToastEvent({
                            title : '只有所有者可以按QIS结果跟进完毕的按钮',
                            message: '',
                const evt = new ShowToastEvent({
                            title : '',
                            message: '只有所有者可以按QIS结果跟进完毕的按钮',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
            }else{
                this.updateQisSubmit();
                this.updateQisSubmit();
            }
        }).catch(error => {
            console.log('error='+error);
@@ -56,21 +63,23 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                     this.err = result;
                    if (result!='成功') {
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
            
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
@@ -2,12 +2,18 @@
import { CurrentPageReference } from "lightning/navigation";
import init  from '@salesforce/apex/QISReportController.initForlexQISIntakeuniversalcodeButton';
import sqlForPAE  from '@salesforce/apex/QISReportController.sqlForPAE1';
/*
 * @Description: Intake universal code编辑
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexQISIntakeuniversalcode extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    paeId;
    @api recordId;
    IsLoading = true;
    qisReportId;
    paeId;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
@@ -35,21 +41,21 @@
                this.qisReportId = result.Id;
                var RecordTypeId = "ASRCDecision";
                sqlForPAE({
                    qisReportId: this.qisReportId
                    }).then(result => {
                    if (result!=null) {
                        this.paeId = result.pAEid;
                        console.log('result2='+this.paeId);
                    }
                    var url = '';
                    if (result!=null&& this.paeId!=null){
                        url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
                    } else {
                        url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
                    }
                    console.log('url='+url);
                    qisReportId: this.qisReportId
                 }).then(result => {
                    if (result!=null) {
                        this.paeId = result.pAEid;
                        console.log('result2='+this.paeId);
                    }
                    var url = '';
                    if (result!=null&& this.paeId!=null){
                        url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
                    } else {
                        url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
                    }
                    console.log('url='+url);
                    window.location.replace(url);
                });
                });
            }
        }).catch(error => {
            console.log('error='+error);
force-app/main/default/lwc/lexQISSC/lexQISSC.js
@@ -2,18 +2,27 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
import init  from '@salesforce/apex/QISReportController.initForlexQISSCButton';
export default class lexQISSC extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    name;
    profileName;
    qISSCId;
    qISSCReport;
    nextaction;
    qISMarketCategory;
/*
 * @Description: QIS市场部意见
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexQISSC  extends NavigationMixin(LightningElement) {
    @api recordId;
    IsLoading = true;
    qisReportId;
    name1;
    profileName;
    qISSCId;
    qISSCReport;
    nextaction;
    qISMarketCategory;
    err;
    @wire(CurrentPageReference)
@@ -38,21 +47,18 @@
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.name = result.name;
            this.name1 = result.name;
            this.qISSCId = result.qISSCId;
            this.qISSCReport = result.qISSCReport;
            this.nextaction = result.nextaction;
            this.qISMarketCategory = result.qISMarketCategory;
            this.profileName = result.profileName;
            console.log('profileName='+this.profileName);
            console.log('qISSCReport='+this.qISSCReport);
            console.log('nextaction='+this.nextaction);
            console.log('qISMarketCategory='+this.qISMarketCategory);
            console.log('qISSCId='+this.qISSCId);
            console.log('name1='+this.name1);
           console.log('result.name='+result.name);
            if (this.profileName == '2F4_技术推进部' || this.profileName == '2F4_技术推进部_OSH 非单点') {
                const evt = new ShowToastEvent({
                            title : '您没有新建QIS市场部权限。',
                            message: '',
                const evt = new ShowToastEvent({
                            title : '',
                            message: '您没有新建QIS市场部权限。',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
@@ -61,30 +67,45 @@
            }
            if (this.qISSCReport!=null) {
                var urlPrefix = window.location.protocol + '//' + window.location.host+'/'+this.qISSCId;
                 window.open(urlPrefix);
                this.dispatchEvent(new CloseActionScreenEvent());
                 window.open(urlPrefix);
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }else{
                if (this.nextaction == '送回' && (this.qISMarketCategory == 'ET' || this.qISMarketCategory == 'ENG' || this.qISMarketCategory == 'EndoRapid')) {
                    var urlStr ='/a3w/e?CF00N100000095xFJ='+this.name+
                            '&CF00N100000095xFJ_lkid='+this.qisReportId+
                            '&retURL='+this.qisReportId+
                            '&Name='+this.name;
                        window.open(urlStr);
                if (this.nextaction == '送回' && (this.qISMarketCategory == 'ET' || this.qISMarketCategory == 'ENG' || this.qISMarketCategory == 'EndoRapid')) {
                    // var urlStr ='/a3w/e?CF00N100000095xFJ='+this.name+
                    //         '&CF00N100000095xFJ_lkid='+this.qisReportId+
                    //         '&retURL='+this.qisReportId+
                    //         '&Name='+this.name;
                    //     window.open(urlStr);
                        const defaultFieldValues =encodeDefaultFieldValues({
                                  Name:this.name1,
                                  QIS_Report__c:this.qisReportId
                                });
                        this[NavigationMixin.Navigate]({
                          type: 'standard__objectPage',
                          attributes: {
                            objectApiName: 'QIS_SC_Report__c',
                            actionName: 'new'
                          },
                          state: {
                            nooverride: '1',
                            defaultFieldValues: defaultFieldValues
                          }
                        });
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                }else{
                }else{
                    console.log('触发');
                    const evt = new ShowToastEvent({
                            title : '对应方法为返回且对应主机/消耗品为ET 或 ENG 或 EndoRapid 时,才可以新建。',
                            message: '',
                    const evt = new ShowToastEvent({
                            title : '',
                            message: '对应方法为返回且对应主机/消耗品为ET 或 ENG 或 EndoRapid 时,才可以新建。',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                }
                }
            }
        }).catch(error => {
            console.log('error='+error);
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
@@ -2,13 +2,19 @@
import { CurrentPageReference } from 'lightning/navigation';
import init  from '@salesforce/apex/QISReportController.initForQisUniversalFailureCodeButton';
import sqlForPAE  from '@salesforce/apex/QISReportController.sqlForPAE';
/*
 * @Description: Final universal code编辑
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexQisUniversalFailureCode extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    paeId;
     @wire(CurrentPageReference)
    @api recordId;
    IsLoading = true;
    qisReportId;
    paeId;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
@@ -34,22 +40,22 @@
                this.qisReportId = result.Id;
                var RecordTypeId = "ASACDecision";
                sqlForPAE({
                    qisReportId: this.qisReportId
                    }).then(result => {
                    if (result!=null) {
                        this.paeId = result.pAEid;
                        console.log('result='+this.paeId);
                    }
                    var url = '';
                    if (result!=null&& this.paeId!=null){
                        url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
                    } else {
                        url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
                    }
                    console.log('url='+url);
                    // window.open(url,'_self');
                    qisReportId: this.qisReportId
                 }).then(result => {
                    if (result!=null) {
                        this.paeId = result.pAEid;
                        console.log('result='+this.paeId);
                    }
                    var url = '';
                    if (result!=null&& this.paeId!=null){
                        url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ;
                    } else {
                        url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId;
                    }
                    console.log('url='+url);
                    // window.open(url,'_self');
                    window.location.replace(url);
                });
                });
            }
        }).catch(error => {
            console.log('error='+error);
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js
@@ -4,13 +4,21 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForRCCDScompleteButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForRCCDScomplete';
import { updateRecord } from 'lightning/uiRecordApi';
/*
 * @Description: OCSM服务本部CDS完毕
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexRCCDScomplete extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    cdsdate;
    QIStatus;
    @api recordId;
    IsLoading = true;
    qisReportId;
    cdsdate;
    QIStatus;
    err;
    @wire(CurrentPageReference)
@@ -38,9 +46,9 @@
            this.cdsdate = result.cdsdate;
            this.QIStatus = result.qIStatus;
            if (this.QIStatus == 'RC检测申请') {
                const evt = new ShowToastEvent({
                            title : '需要先点击[OCM服务本部收到实物]',
                            message: '',
                const evt = new ShowToastEvent({
                            title : '',
                            message: '需要先点击[OCM服务本部收到实物]',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
@@ -48,9 +56,9 @@
                        return;
            }
            if (this.cdsdate != null) {
                const evt = new ShowToastEvent({
                            title : 'OCM服务本部CDS已经完毕',
                            message: '',
                const evt = new ShowToastEvent({
                            title : '',
                            message: 'OCM服务本部CDS已经完毕',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
@@ -65,21 +73,23 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                     this.err = result;
                    if (result!='成功') {
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
            
force-app/main/default/lwc/lexRCRecieved/lexRCRecieved.js
@@ -2,19 +2,26 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
import init  from '@salesforce/apex/QISReportController.initForlexRCRecievedButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForRCRecieved';
/*
 * @Description: OCSM服务本部收到实物
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexRCRecieved extends LightningElement {
    @api recordId;
    err;
    IsLoading = true;
    qisReportId;
    qisStatus;
    isAEProfile;
    isPAEProfile;
    isCNBuy;
     @wire(CurrentPageReference)
    @api recordId;
    err;
    IsLoading = true;
    qisReportId;
    qisStatus;
    isAEProfile;
    isPAEProfile;
    isCNBuy;
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
@@ -41,29 +48,29 @@
            this.isPAEProfile = result.isPAEProfile;
            this.isCNBuy = result.isCNBuy;
            console.log('this.qisStatus='+this.qisStatus);   
             if (this.qisStatus!='RC检测申请') {
            if (this.qisStatus!='RC检测申请') {
                const evt = new ShowToastEvent({
                        title : 'OCM服务本部已经收到实物',
                        message: '',
                        title : '',
                        message: 'OCM服务本部已经收到实物',
                        variant: 'error'
                    });
                this.dispatchEvent(evt);
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
             }else{
                 if (this.isAEProfile == null || this.isPAEProfile == null || this.isCNBuy != 'true') {
                     const evt = new ShowToastEvent({
                        title : '安全信息未判定,请联系质量法规部',
                        message: '',
            }else{
                if (this.isAEProfile == null ||(this.isPAEProfile == null && this.isCNBuy != 'true')) {
                    const evt = new ShowToastEvent({
                        title : '',
                        message: '安全信息未判定,请联系质量法规部',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                 }else{
                     this.updateQisSubmit();
                 }
             }
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }else{
                    this.updateQisSubmit();
                }
            }
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
@@ -71,25 +78,27 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    
                    console.log('result'+result);
                    this.err = result;
                    if (result!='成功') {
                    console.log('result'+result);
                    this.err = result;
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                            console.log('error='+error);
                }).finally(() => {
                });
                updateRecord({fields: { Id: this.recordId }});
                }).catch(error => {
                         console.log('error='+error);
                }).finally(() => {
                });
    }
}
force-app/main/default/lwc/lexRCSubmit/lexRCSubmit.js
@@ -5,22 +5,29 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForRCSubmitButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisWithRC';
import { updateRecord } from 'lightning/uiRecordApi';
/*
 * @Description: 提交待审批
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexRCSubmit extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    qisStatus;
    OSHstaff;
    OSHstaffEmail;
    CancelQISReason;
    Rcid;
    RCinspectionDate;
    QISReplyDay;
    RCproblemnotfound;
    type;
    @api recordId;
    IsLoading = true;
    qisReportId;
    qisStatus;
    OSHstaff;
    OSHstaffEmail;
    CancelQISReason;
    Rcid;
    RCinspectionDate;
    QISReplyDay;
    RCproblemnotfound;
    type;
    err;
    @wire(CurrentPageReference)
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
@@ -50,7 +57,7 @@
            this.RCinspectionDate = result.rCinspectionDate;
            this.QISReplyDay = result.qISReplyDay;
            this.RCproblemnotfound = result.rCproblemnotfound;
             if (this.qisStatus!='RC检测中') {
            if (this.qisStatus!='RC检测中') {
                const evt = new ShowToastEvent({
                        title : '已经提交审批',
                        message: '',
@@ -58,51 +65,51 @@
                    });
                 this.dispatchEvent(evt);
                this.dispatchEvent(new CloseActionScreenEvent());
                 return;
             }
                return;
            }
            console.log('this.RCproblemnotfound='+(this.QISReplyDay!=null  && this.RCproblemnotfound));
             if (this.CancelQISReason!=null) {
                 if (this.qisStatus == 'RC检测申请') {
            if (this.CancelQISReason==null) {
                if (this.qisStatus == 'RC检测申请') {
                    const evt = new ShowToastEvent({
                        title : '需要先点击[OCM服务本部收到实物]',
                        message: '',
                        title : '',
                        message: '需要先点击[OCM服务本部收到实物]',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                 }
                 if (this.Rcid ==null) {
                    return;
                }
                if (this.Rcid ==null) {
                    const evt = new ShowToastEvent({
                        title : '判定担当必须填写',
                        message: '',
                        title : '',
                        message: '判定担当必须填写',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                 }
                 if (this.RCinspectionDate == null) {
                    return;
                }
                if (this.RCinspectionDate == null) {
                    const evt = new ShowToastEvent({
                        title : 'OCM服务本部还没有检测完毕',
                        message: '',
                        title : '',
                        message: 'OCM服务本部还没有检测完毕',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                 }
                    return;
                }
                 if (this.QISReplyDay!=null  && this.RCproblemnotfound) {
                if (this.QISReplyDay!=null  && this.RCproblemnotfound) {
                    const evt = new ShowToastEvent({
                        title : '最终判定时,请取消[故障未发现留下继续观察]并选择[对应方法]',
                        message: '',
                        title : '',
                        message: '最终判定时,请取消[故障未发现留下继续观察]并选择[对应方法]',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                 }
                    return;
                }
                LightningConfirm.open({
                message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?',
                variant: 'headerless',
@@ -118,7 +125,7 @@
                    }
                    
                });
             }else{
            }else{
                LightningConfirm.open({
                message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?',
                variant: 'headerless',
@@ -134,10 +141,10 @@
                    }
                    
                });
             }
             // this.dispatchEvent(new CloseActionScreenEvent());
            }
            // this.dispatchEvent(new CloseActionScreenEvent());
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
@@ -145,23 +152,25 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId,
                 type: this.type,
                 oldQIStatus: this.qisStatus
                }).then(result =>{
                    console.log('result'+result);
            updateQis({
                 recordId: this.recordId,
                 type: this.type,
                 oldQIStatus: this.qisStatus
                }).then(result =>{
                    console.log('result'+result);
                     this.err = result;
                    if (result!='成功') {
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                    updateRecord({fields: { Id: this.recordId }});
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
            
force-app/main/default/lwc/lexRCinspectioncompletedate/lexRCinspectioncompletedate.js
@@ -2,18 +2,26 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
import init  from '@salesforce/apex/QISReportController.initForlexRCinspectioncompletedateButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisForRCinspectioncompletedate';
/*
 * @Description: OCSM服务本部检测完毕
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexRCinspectioncompletedate extends LightningElement {
    @api recordId;
    err;
    IsLoading = true;
    qisReportId;
    qisStatus;
    rCinspectionDate;
    @api recordId;
    err;
    IsLoading = true;
    qisReportId;
    qisStatus;
    rCinspectionDate;
     @wire(CurrentPageReference)
     @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
@@ -38,27 +46,27 @@
            this.qisStatus = result.qIStatus;
            this.rCinspectionDate = result.rCinspectionDate;
             if (this.qisStatus =='RC检测申请') {
            if (this.qisStatus =='RC检测申请') {
                const evt = new ShowToastEvent({
                        title : '需要先点击[OCM服务本部收到实物]',
                        message: '',
                        title : '',
                        message: '需要先点击[OCM服务本部收到实物]',
                        variant: 'error'
                    });
                this.dispatchEvent(evt);
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
             }else if(this.rCinspectionDate != null){
                     const evt = new ShowToastEvent({
                        title : 'OCM服务本部检测已经完毕',
                        message: '',
            }else if(this.rCinspectionDate != null){
                    const evt = new ShowToastEvent({
                        title : '',
                        message: 'OCM服务本部检测已经完毕',
                        variant: 'error'
                    });
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
             }else{
                 this.updateQisSubmit();
             }
                    this.dispatchEvent(evt);
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
            }else{
                this.updateQisSubmit();
            }
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
@@ -66,25 +74,27 @@
        }); 
    }
    updateQisSubmit(){
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
            updateQis({
                 recordId: this.recordId
                }).then(result =>{
                    
                    console.log('result'+result);
                    this.err = result;
                    if (result!='成功') {
                    console.log('result'+result);
                    this.err = result;
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        updateRecord({fields: { Id: this.recordId }});
                    }
                updateRecord({fields: { Id: this.recordId }});
                this.dispatchEvent(new CloseActionScreenEvent());
                }).catch(error => {
                            console.log('error='+error);
                }).finally(() => {
                });
                }).catch(error => {
                         console.log('error='+error);
                }).finally(() => {
                });
    }
}
force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
@@ -4,9 +4,15 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForlexSendQISButton';
import sendSPO  from '@salesforce/apex/QISReportController.updateQisForSendQIS';
/*
 * @Description: 发送QIS到SPO
 * @Author: hql
 * @Date: 2023-07-12 09:45:19
 * @LastEditTime: 2023-07-12 15:44:33
 * @LastEditors:
 */
export default class lexSendQIS extends LightningElement {
    @api recordId;
    @api recordId;
    str;
    err;
    IsLoading = true;
@@ -39,9 +45,9 @@
                this.ProfileName = result.profileName;
                this.IsSendQIS = result.isSendQIS;
                if (this.qisRecordName == '2.OCSM') {
                    const evt = new ShowToastEvent({
                            title : '不能提交到SPO',
                            message: '记录类型为'+this.qisRecordName,
                    const evt = new ShowToastEvent({
                            title : '',
                            message: '不能提交到SPO记录类型为'+this.qisRecordName,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
@@ -50,9 +56,9 @@
                }
                if (!(this.ProfileName == '系统管理员' || this.ProfileName == '2F4_技术推进部' || this.ProfileName == '2F1_服务窗口')) {
                    const evt = new ShowToastEvent({
                            title : '没有权限提交,请联系系统管理员',
                            message: '',
                    const evt = new ShowToastEvent({
                            title : '',
                            message: '没有权限提交,请联系系统管理员',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
@@ -61,9 +67,9 @@
                }
                if (this.IsSendQIS) {
                    const evt = new ShowToastEvent({
                            title : '已提交到SPO,请不要重复提交',
                            message: '',
                    const evt = new ShowToastEvent({
                            title : '',
                            message: '已提交到SPO,请不要重复提交',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
@@ -78,32 +84,32 @@
        });
    }
    send2SPO(){
            sendSPO({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
            sendSPO({
                 recordId: this.recordId
                }).then(result =>{
                    console.log('result'+result);
                     this.err = result;
                    if (result!='成功') {
                    if (result!='成功') {
                        const evt = new ShowToastEvent({
                            title : '更新失败',
                            message: this.err,
                            title : '',
                            message: '更新失败'+this.err,
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                    }else{
                        const evt = new ShowToastEvent({
                            title : '提交成功!请在SPO系统中完成退换货申请',
                            message: '',
                        const evt = new ShowToastEvent({
                            title : '',
                            message: '提交成功!请在SPO系统中完成退换货申请',
                            variant: 'success'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        window.location.replace("https://olympus.sharepoint.cn/sites/GSPWF/SitePages/HomePage.aspx");
                    }
                
                }).catch(error => {
                }).catch(error => {
            console.log('error='+error);
        }).finally(() => {