| | |
| | | import { LightningElement, track, wire,api } from 'lwc'; |
| | | import { getRecord } from 'lightning/uiRecordApi'; |
| | | import USER_ID from '@salesforce/user/Id'; |
| | | import USERPROFILE_ID from '@salesforce/schema/User.ProfileId'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | |
| | | @api recordId; |
| | | IsLoading=true; |
| | | Campaign; |
| | | currentUserProfileId; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | |
| | | } |
| | | } |
| | | |
| | | @wire(getRecord, { recordId: USER_ID, fields: [USERPROFILE_ID]}) |
| | | userDetails({error, data}) { |
| | | if (data) { |
| | | this.currentUserProfileId =data.fields.ProfileId.value; |
| | | } else if (error) { |
| | | this.error = error ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | }); |
| | | this.dispatchEvent(eventInItError); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | connectedCallback(){ |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | var ProfileId= await getProfileIdByName({Name : "系统管理员"}); |
| | | var cstatus = this.Campaign.Status_Service__c; |
| | | var Service = this.Campaign.ServiceDesignDep__c; |
| | | var userProfileId = await getProfileId(); |
| | | if (cstatus =='开班筹备中' || cstatus =='开班中' || Service == USER_ID || |
| | | this.currentUserProfileId == ProfileId |
| | | userProfileId == ProfileId |
| | | ){ |
| | | window.open("/apex/DateModify?id=" + this.Campaign.Id,'时间修改申请页面','height=500, width=900, top=0, left=0'); |
| | | } else if(cstatus =='商谈中') { |