黄千龙
2023-05-11 048f7b0855d05293e80c9bf5dbf0620f064f13f4
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -8,6 +8,9 @@
    @api recordId;//当前这条数据的id
    status;//状态
    profileId;//profileId id
    systemProfileId;
    SalesManagerId;
    SalesHospitalId;
    IsLoading = true;
    @wire(CurrentPageReference)
@@ -28,17 +31,20 @@
        }).then(result => {
                this.IsLoading = false;
                this.status = result.status;
                this.profileId = result.profileId.slice(0,15);
                this.profileId = result.profileId;
                this.systemProfileId = result.systemProfileId;
                this.SalesManagerId = result.SalesManagerId;
                this.SalesHospitalId = result.SalesHospitalId;
                this.LoseButton();
                this.dispatchEvent(new CloseActionScreenEvent());
        })        
    }
    //招标项目失单
    //招标项目 失单
    LoseButton(){
        sqlResult({id: this.recordId}).then(result=>{
            //简档权限 2S1_销售医院担当 2S4_销售管理者 系统管理员
            if (this.profileId != '00e10000000xnp2' && this.profileId != '00e10000000xnpH' && this.profileId != '00e10000000Y3o5') {
            if (this.profileId != this.SalesManagerId  && this.profileId != this.SalesHospitalId && this.profileId != this.systemProfileId) {
                this.showToast("您没有权限,无法创建询价提交失单。","error");
                return;
            }