19626
2023-10-11 7c7cb195462c2ded7bfe4105959ea36d1dd68ded
force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 14:08:55
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-10-08 15:40:39
 * @LastEditTime: 2023-10-10 17:35:29
 */
/*
 * @Description: 
@@ -70,6 +70,11 @@
            this.salesOwnerBuchang = result.salesOwnerBuchang;
            this.salesOwnerBuchangID = result.salesOwnerBuchangID;
            this.cntLostCancelDraft = result.cntLostCancelDraft;
            if(!result.isHavePower){
                this.showToast('您不能创建失单/部分失单报告!','error');
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }
            this.loseReport();
        })
    }
@@ -108,13 +113,22 @@
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            title: ' ',
            message: msg,
            variant: type,
            mode: 'sticky'
        });
        this.dispatchEvent(event);
        if(type == 'success'){
            const event = new ShowToastEvent({
                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());
        }
    }
    //显示信息
    showMyToast(title, message, variant) {