unknown
2023-08-24 ddb0231ef7c5cf2bad9d3f1afc2f733674ad38a5
再修理按钮

再修理按钮
24个文件已添加
624 ■■■■■ 已修改文件
force-app/main/default/lwc/lexOCSMFollowEnd/lexOCSMFollowEnd.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMFollowEnd/lexOCSMFollowEnd.js 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMFollowEnd/lexOCSMFollowEnd.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHAccept/lexOSHAccept.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHAccept/lexOSHAccept.js 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHAccept/lexOSHAccept.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHFollowEnd/lexOSHFollowEnd.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHFollowEnd/lexOSHFollowEnd.js 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHFollowEnd/lexOSHFollowEnd.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainOCSM/lexPDFRepairAgainOCSM.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainOCSM/lexPDFRepairAgainOCSM.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainOCSM/lexPDFRepairAgainOCSM.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainOSH/lexPDFRepairAgainOSH.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainOSH/lexPDFRepairAgainOSH.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainOSH/lexPDFRepairAgainOSH.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainRC/lexPDFRepairAgainRC.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainRC/lexPDFRepairAgainRC.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFRepairAgainRC/lexPDFRepairAgainRC.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCconfirm/lexRCconfirm.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCconfirm/lexRCconfirm.js 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRCconfirm/lexRCconfirm.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexnewMBC/lexnewMBC.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexnewMBC/lexnewMBC.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexnewMBC/lexnewMBC.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMFollowEnd/lexOCSMFollowEnd.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexOCSMFollowEnd/lexOCSMFollowEnd.js
New file
@@ -0,0 +1,84 @@
import { LightningElement, track, wire, api } from 'lwc';
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/lexRepairAgainAnController.init';
import updateStatus from '@salesforce/apex/lexRepairAgainAnController.updateStatus';
export default class lexOCSMFollowEnd extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(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(res=>{
            if(res){
                console.log('res==='+ JSON.stringify(res));
                this.IsLoading = false;
                console.log(res);
                if(res.repairAgainStatus == '取消'){
                    this.showToast('取消后的再修理返品分析不允许再提交,如果需要提交请点击\"复制\"按钮重新生成一个再修理返品分析','warning');
                    return;
                }
                if(res.repairAgainStatus != 'OSH填写完毕'){
                    this.showToast('已经提交','warning');
                    return;
                }
                if(res.actionOCM == '' || res.technicalResponsibility == '' || res.oCMConfirmer == ''||res.actionOCM == null || res.technicalResponsibility == null || res.oCMConfirmer == null){
                    this.showToast('【客户对应(OCSM)】或【技术担当】或【OCSM确认者】为空时不能提交申请','warning');
                    return;
                }
                updateStatus({
                    recordId: this.recordId,
                    updateStatus: '已提交'
                }).then(res=>{
                    if(res == 'SUCCESS'){
                        this.showToast('提交成功','success');
                        return;
                    }else if(res == 'ERROR'){
                        this.showToast('提交失败','error');
                        return;
                    }
                }).catch(err=>{
                    console.log('updateStatus===='+err);
                })
            }else{
                this.showToast('未查到数据','warning');
            }
        })
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        if(type == 'success'){
            this.updateRecordView(this.recordId);
        }
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
}
force-app/main/default/lwc/lexOCSMFollowEnd/lexOCSMFollowEnd.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCSMFollowEnd">
    <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>
force-app/main/default/lwc/lexOSHAccept/lexOSHAccept.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexOSHAccept/lexOSHAccept.js
New file
@@ -0,0 +1,80 @@
import { LightningElement, track, wire, api } from 'lwc';
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/lexRepairAgainAnController.init';
import updateRepairAgainStatus from '@salesforce/apex/lexRepairAgainAnController.updateRepairAgainStatus';
//品保受理
export default class lexOSHAccept extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(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(res=>{
            if(res){
                console.log(res);
                this.IsLoading = false;
                if(res.repairAgainStatus == '取消'){
                    this.showToast('取消后的再修理返品分析不允许再提交,如果需要提交请点击\"复制\"按钮重新生成一个再修理返品分析','warning');
                    return;
                }
                if(res.repairAgainStatus != 'RC填写完毕'){
                    this.showToast('已经提交','warning');
                    return;
                }
                updateRepairAgainStatus({
                    recordId: this.recordId,
                    updateStatus: 'OSH受理'
                }).then(result=>{
                    if(result == 'SUCCESS'){
                        this.showToast('提交成功','success');
                        return;
                    }else if(result == 'ERROR'){
                        this.showToast('提交失败','error');
                        return;
                    }
                }).catch(err=>{
                    console.log('updateStatus===='+err);
                })
            }else{
                this.showToast('未查到数据','warning');
            }
        })
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        if(type == 'success'){
            this.updateRecordView(this.recordId);
        }
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
}
force-app/main/default/lwc/lexOSHAccept/lexOSHAccept.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOSHAccept">
     <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>
force-app/main/default/lwc/lexOSHFollowEnd/lexOSHFollowEnd.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexOSHFollowEnd/lexOSHFollowEnd.js
New file
@@ -0,0 +1,112 @@
import { LightningElement, track, wire, api } from 'lwc';
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/lexRepairAgainAnController.init';
import updateRepairAgainAnApproveStatus from '@salesforce/apex/lexRepairAgainAnController.updateRepairAgainAnApproveStatus';
import updateRepairAgainAnApproveStatus2 from '@salesforce/apex/lexRepairAgainAnController.updateRepairAgainAnApproveStatus2';
//品保提交审批
export default class lexOSHFollowEnd extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(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(res=>{
            if(res){
                console.log('res==='+ JSON.stringify(res));
                this.IsLoading = false;
                // if(res.RepairAgain_Status__c == '取消'){
                if(res.repairAgainStatus == '取消'){
                    this.showToast('取消后的再修理返品分析不允许再提交,如果需要提交请点击\"复制\"按钮重新生成一个再修理返品分析','warning');
                    return;
                }
                if(res.repairAgainStatus != 'OSH受理'){
                    this.showToast('请先进行OSH受理!');
                    return;
                }
                console.log('res.repairAgainAnApproveStatus==='+res.repairAgainAnApproveStatus);
                //一次审批
                if(res.repairAgainAnApproveStatus == '' || res.repairAgainAnApproveStatus === undefined || res.repairAgainAnApproveStatus != '批准'){
                    if(res.judgementOSH == '' || res.judgementOSH == undefined || res.analysisOSH == '' || res.analysisOSH == undefined || res.analysisReasonOSH == '' || res.analysisReasonOSH == undefined || res.actionOSH == '' || res.actionOSH == undefined){
                        this.showToast('【结论(OSH)】或【技术检测分析(OSH医疗品质保障部填写)】或【技术检测分析原因】或【技术对应】为空时不能提交申请','warning');
                        return;
                    }
                    updateRepairAgainAnApproveStatus({
                        recordId: this.recordId,
                        updateStatus:'已提交'
                    }).then(result=>{
                        if(result == 'SUCCESS'){
                            this.showToast('提交成功','success');
                            return;
                        }
                        if(result == 'ERROR'){
                            this.showToast('提交失败','error');
                            return;
                        }
                    }).catch(error=>{
                        console.log('updateRepairAgainAnApproveStatus'+error);
                    })
                }
                //二次审批
                if(res.repairAgainAnApproveStatus == '批准'){
                    if(res.judgementOSH2 == '' || res.analysisOSH2 == '' || res.analysisReasonOSH2 == '' || res.actionOSH2 == ''){
                        this.showToast('【结论(OSH)(二次)】或【技术检测分析(OSH医疗品质保障部填写)(二次))】或【技术检测分析原因(二次)】或【技术对应(二次)】为空时不能提交申请','warning');
                        return;
                    }
                    updateRepairAgainAnApproveStatus2({
                        recordId: this.recordId,
                        judgementOSH2: res.judgementOSH2,
                    }).then(result=>{
                        if(result == 'SUCCESS'){
                            this.showToast('提交成功','success');
                            return;
                        }
                        if(result == 'ERROR'){
                            this.showToast('提交失败','error');
                            return;
                        }
                    })
                }
            }else{
                this.showToast('未查到数据','warning');
            }
        })
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        if(type == 'success'){
            this.updateRecordView(this.recordId);
        }
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
}
force-app/main/default/lwc/lexOSHFollowEnd/lexOSHFollowEnd.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOSHFollowEnd">
     <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>
force-app/main/default/lwc/lexPDFRepairAgainOCSM/lexPDFRepairAgainOCSM.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexPDFRepairAgainOCSM/lexPDFRepairAgainOCSM.js
New file
@@ -0,0 +1,36 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexPDFRepairAgainOCSM extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
           }
         }
    }
    connectedCallback () {
        console.log("ggg333");
        this.openPDF().then(res=>{
            this.IsLoading = false;
            this.dispatchEvent(new CloseActionScreenEvent());
        })
    }
    async openPDF(){
        window.open('/apex/RepairAgainAnPDF?id='+ this.recordId +'&status=3', 'RepairAgainAnPDF');
    }
}
force-app/main/default/lwc/lexPDFRepairAgainOCSM/lexPDFRepairAgainOCSM.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexPDFRepairAgainOCSM">
     <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>
force-app/main/default/lwc/lexPDFRepairAgainOSH/lexPDFRepairAgainOSH.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexPDFRepairAgainOSH/lexPDFRepairAgainOSH.js
New file
@@ -0,0 +1,34 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
export default class lexPDFRepairAgainOSH extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
           }
         }
    }
    connectedCallback () {
        console.log("ggg222");
        this.openPDF().then(res=>{
            this.IsLoading = false;
            this.dispatchEvent(new CloseActionScreenEvent());
        })
    }
    async openPDF(){
        window.open('/apex/RepairAgainAnPDF?id='+ this.recordId +'&status=2', 'RepairAgainAnPDF');
    }
}
force-app/main/default/lwc/lexPDFRepairAgainOSH/lexPDFRepairAgainOSH.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexPDFRepairAgainOSH">
     <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>
force-app/main/default/lwc/lexPDFRepairAgainRC/lexPDFRepairAgainRC.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexPDFRepairAgainRC/lexPDFRepairAgainRC.js
New file
@@ -0,0 +1,33 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
export default class lexPDFRepairAgainRC extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
           }
         }
    }
    connectedCallback () {
        console.log("ggg111");
        this.openPDF().then(res=>{
            this.IsLoading = false;
            this.dispatchEvent(new CloseActionScreenEvent());
        })
    }
    async openPDF(){
        window.open('/apex/RepairAgainAnPDF?id='+ this.recordId +'&status=1', 'RepairAgainAnPDF');
    }
}
force-app/main/default/lwc/lexPDFRepairAgainRC/lexPDFRepairAgainRC.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexPDFRepairAgainRC">
     <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>
force-app/main/default/lwc/lexRCconfirm/lexRCconfirm.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexRCconfirm/lexRCconfirm.js
New file
@@ -0,0 +1,78 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
import LightningConfirm from 'lightning/confirm';
import updateRepairAgainStatus from '@salesforce/apex/lexRepairAgainAnController.updateRepairAgainStatus';
//RC确认
export default class lexRCconfirm extends LightningElement {
    @api recordId;
    IsLoading = true;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            try{
                const urlValue = currentPageReference.state.recordId;
                if (urlValue) {
                 let str = `${urlValue}`;
                     console.log("str2");
                     console.log(str);
                     this.recordId = str;
                     console.log("dd");
                }
            }catch(e){
                console.log(e);
            }
         }
    }
    connectedCallback () {
        this.IsLoading = false;
        LightningConfirm.open({
                message: "RC确认后无法撤回,是否确认?",
                variant: 'headerless',
                label: '提示信息',
                // setting theme would have no effect
        }).then(submit=>{
            console.log("ttt:"+submit);
            if(!submit){
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }else{
                updateRepairAgainStatus({
                    recordId: this.recordId,
                    updateStatus: 'OSH填写完毕'
                }).then(res=>{
                    if(res == 'SUCCESS'){
                        this.showToast('提交成功','success');
                        return;
                    }
                    if(res == 'ERROR'){
                        this.showToast('提交失败','error');
                        return;
                    }
                })
            }
        })
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        if(type == 'success'){
            this.updateRecordView(this.recordId);
        }
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
}
force-app/main/default/lwc/lexRCconfirm/lexRCconfirm.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRCconfirm">
     <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>
force-app/main/default/lwc/lexnewMBC/lexnewMBC.html
New file
@@ -0,0 +1,3 @@
<template>
</template>
force-app/main/default/lwc/lexnewMBC/lexnewMBC.js
New file
@@ -0,0 +1,55 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference } from 'lightning/navigation';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/lexRepairAgainAnController.init';
export default class lexnewMBC extends NavigationMixin(LightningElement) {
    @api recordId;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
        if (currentPageReference) {
            const urlValue = currentPageReference.state.recordId;
            if (urlValue) {
             let str = `${urlValue}`;
             this.recordId = str;
            }
        }
     }
     connectedCallback(){
         init({
             recordId: this.recordId
         }).then(res=>{
             if(res){
                 this.showNewObject(res.repairAgainAnName);
             }
         })
     }
     showNewObject(name){
         console.log('showNewObject==');
         const defaultFieldValues = encodeDefaultFieldValues({
             Name: '*',
             RepairAgainAn_request_name__c: this.recordId,
             RepairAgainAn_M_BC_management_code__c: name
         });
         this[NavigationMixin.Navigate]({
             type: 'standard__objectPage',
              attributes: {
                objectApiName: 'RepairAgainAn_M_BC__c',
                actionName: 'new',
                RecordType:''
            },
            state: {
                nooverride: '1',
                defaultFieldValues: defaultFieldValues
            }
         })
         this.dispatchEvent(new CloseActionScreenEvent());
     }
}
force-app/main/default/lwc/lexnewMBC/lexnewMBC.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexnewMBC">
     <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>