| | |
| | | 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'; |
| | |
| | | "批准后不能添加参会人员,如需添加请联系服务企划部!", |
| | | variant : 'error' |
| | | }); |
| | | import getProfileId from'@salesforce/apex/LexGetUserInfoUtils.getProfileId'; |
| | | import init from '@salesforce/apex/LexSubmitCampaignController.initMember'; |
| | | import getProfileIdByName from '@salesforce/apex/LexMeetingCostsController.getProfileIdByName'; |
| | | export default class lexCampaignMemberService extends LightningElement { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | Campaign; |
| | | currentUserProfileId; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @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(){ |
| | | |
| | | |
| | | } |
| | | |
| | | async campaignMemberService(){ |
| | | var ProfileId= await getProfileIdByName({Name : "系统管理员"}); |
| | | console.log(ProfileId); |
| | | var cstatus = this.Campaign.Status; |
| | | var userProfileId = await getProfileId(); |
| | | if (cstatus =='草案中' || this.Campaign.ServiceDesignDepId__c == USER_ID |
| | | || this.currentUserProfileId == ProfileId ){ |
| | | || userProfileId == ProfileId ){ |
| | | window.open("/apex/CampaignMemberService?id=" + this.Campaign.Id,'CampaignMember','height=400,width=890,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no'); |
| | | |
| | | } else { |