19626
2023-10-11 7c7cb195462c2ded7bfe4105959ea36d1dd68ded
force-app/main/default/lwc/lexEditLost/lexEditLost.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-09-12 17:37:34
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-10-09 16:43:31
 * @LastEditTime: 2023-10-11 14:58:33
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -37,13 +37,22 @@
        }
    }
    showToast(msg,type) {
        if(type == 'success'){
        const event = new ShowToastEvent({
            title: ' ',
                message: msg,
                variant: type,
            });
            this.dispatchEvent(event);
            this.dispatchEvent(new CloseActionScreenEvent());
        }else{
            const event = new ShowToastEvent({
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
            this.dispatchEvent(new CloseActionScreenEvent());
        }
    }
    connectedCallback(){
@@ -55,7 +64,7 @@
        }).then(result=>{
            console.log(result);
            if(result.error){
                this.showToast(res.error);
                this.showToast('您不能修改失单/部分失单报告!','error');
                this.dispatchEvent(new CloseActionScreenEvent());
            }else if(result.report){
                this.lostlist = result.report.lostReport;