| New file |
| | |
| | | public with sharing class LexGetUserInfoUtils { |
| | | @AuraEnabled |
| | | public static String getProfileId(){ |
| | | return UserInfo.getProfileId(); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | 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 => { |
| | |
| | | variant : 'error' |
| | | }); |
| | | 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 { |
| | |
| | | import { LightningElement, api , track, wire } from 'lwc'; |
| | | |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | 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 init from '@salesforce/apex/LexMeetingCostsController.init'; |
| | | import judgeMember from '@salesforce/apex/LexMeetingCostsController.judgeMumber'; |
| | | import getProfileIdByName from '@salesforce/apex/LexMeetingCostsController.getProfileIdByName'; |
| | |
| | | Campaign; |
| | | IsLoading = true; |
| | | userId = USER_ID; |
| | | currentUserProfileId; |
| | | NotSupportProfileId; |
| | | |
| | | @wire(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 => { |
| | |
| | | console.log(this.userId); |
| | | this.MeetingCosts(); |
| | | } |
| | | }).catch(error => { |
| | | console.log("error"); |
| | | console.log(error); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | connectedCallback(){ |
| | | |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | async MeetingCosts(){ |
| | | |
| | | var logUser = this.userId; |
| | | |
| | | var records = await judgeMember({ UserId : this.userId}); |
| | | |
| | | var ProfileId= await getProfileIdByName({Name : "系统管理员"}); |
| | | |
| | | |
| | | |
| | | var userProfileId = await getProfileId(); |
| | | if(records.length>0 && this.Campaign.Sponsor_Ones_Post__c == '1.华北'){ |
| | | window.open("/apex/CampaignMeetingcost?id=" + this.Campaign.Id ,'CampaignMember','height=500,width=950'); |
| | | } |
| | |
| | | || logUser == this.Campaign.JingliApprovalManager__c |
| | | || logUser == this.Campaign.BuchangApprovalManager__c |
| | | || logUser == this.Campaign.ZongjianApprovalManager__c |
| | | || this.currentUserProfileId == ProfileId){ |
| | | || userProfileId == ProfileId){ |
| | | window.open("/apex/CampaignMeetingcost?id=" + this.Campaign.Id ,'CampaignMember','height=500,width=950'); |
| | | } |
| | | else { |
| | |
| | | import { LightningElement ,api, track, wire } from 'lwc'; |
| | | |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | 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 init from'@salesforce/apex/LexNoReportApplicationController.initGetOpdData'; |
| | | import getProfileIdByName from'@salesforce/apex/LexNoReportApplicationController.getProfileIdByName'; |
| | | import getProfileId from'@salesforce/apex/LexGetUserInfoUtils.getProfileId'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | |
| | | const event = new ShowToastEvent({ |
| | |
| | | @api recordId; |
| | | IsLoading=true; |
| | | OPDPlan__c; |
| | | currentUserProfileId; |
| | | error; |
| | | NotSupportProfileId; |
| | | |
| | | |
| | | |
| | | |
| | | @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 ; |
| | | } |
| | | |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | |
| | | }); |
| | | } |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | connectedCallback(){ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | async NoReportApplication() { |
| | | //OPD计划状态 |
| | | var status = this.OPDPlan__c.Status__c; |
| | | this.NotSupportProfileId= await getProfileIdByName({Name : "系统管理员"}); |
| | | //当前用户简档id |
| | | var ProfileId = this.currentUserProfileId; |
| | | //当前用户简档id |
| | | var ProfileId = await getProfileId(); |
| | | //跳过系统管理员 |
| | | if(status !='待提交报告'&& ProfileId != this.NotSupportProfileId){ |
| | | this.dispatchEvent(event); |
| | |
| | | } |
| | | else{ |
| | | window.open ('/apex/OPDNoReportApplication?id='+this.OPDPlan__c.Id+'&name='+this.OPDPlan__c.Name, '无报告申请', |
| | | 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no'); |
| | | |
| | | 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no'); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | async ProductRepairQuoteAsset(){ |
| | | window.open ('/apex/ProductRepairQuote?productid='+this.recordId+'&flag=asset', '', 'height=250, width=500, top=300, left=350,location=no') |
| | | window.open ('/apex/ProductRepairQuote?productid='+this.recordId+'&flag=asset', '', 'height=380, width=680, top=300, left=350,location=no') |
| | | } |
| | | |
| | | closeScreen(){ |
| | |
| | | |
| | | async productRepairQuoteProduct(){ |
| | | window.open ('/apex/ProductRepairQuote?productid=' + this.recordId + |
| | | '&flag=productsearch', '', 'height=500, width=1200, top=300, left=350,location=no'); |
| | | '&flag=productsearch', '', 'height=380, width=680, top=300, left=350,location=no'); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | async ProductRepairQuote(){ |
| | | window.open ('/apex/ProductRepairQuote?productid='+this.recordId+'&flag=product', '', 'height=250, width=500, top=300, left=350,location=no') |
| | | window.open ('/apex/ProductRepairQuote?productid='+this.recordId+'&flag=product', '', 'height=380, width=680, top=300, left=350,location=no') |
| | | } |
| | | |
| | | closeScreen(){ |
| | |
| | | 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 => { |
| | |
| | | variant : 'error' |
| | | }); |
| | | 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 =='商谈中') { |