| New file |
| | |
| | | <aura:component implements="flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global"> |
| | | <aura:attribute name="recordId" type="String" /> |
| | | <aura:handler name="render" value="{!this}" action="{!c.closeModal}" /> |
| | | <aura:attribute name="isDoneRendering" type="Boolean" default="false"/> |
| | | <div class="exampleHolder"> |
| | | <c:lexMeetingDelayApplyCampaign recordId="{!v.recordId}" /> |
| | | </div> |
| | | </aura:component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <description>A Lightning Component Bundle</description> |
| | | </AuraDefinitionBundle> |
| New file |
| | |
| | | ({ |
| | | myAction : function(component, event, helper) { |
| | | |
| | | } |
| | | }) |
| New file |
| | |
| | | ({ |
| | | helperMethod : function() { |
| | | |
| | | } |
| | | }) |
| New file |
| | |
| | | <aura:component implements="flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global"> |
| | | <aura:attribute name="recordId" type="String" /> |
| | | <aura:handler name="render" value="{!this}" action="{!c.closeModal}" /> |
| | | <aura:attribute name="isDoneRendering" type="Boolean" default="false"/> |
| | | <div class="exampleHolder"> |
| | | |
| | | <c:lexSubmitCampaignService recordId="{!v.recordId}" /> |
| | | |
| | | </div> |
| | | </aura:component> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <description>A Lightning Component Bundle</description> |
| | | </AuraDefinitionBundle> |
| New file |
| | |
| | | ({ |
| | | myAction : function(component, event, helper) { |
| | | |
| | | } |
| | | }) |
| New file |
| | |
| | | ({ |
| | | helperMethod : function() { |
| | | |
| | | } |
| | | }) |
| New file |
| | |
| | | public with sharing class LexGuaranteeStatuAchievements { |
| | | @AuraEnabled |
| | | public static Statu_Achievements__c init(String recordId){ |
| | | Statu_Achievements__c res = new Statu_Achievements__c(); |
| | | try{ |
| | | res = [SELECT InstallDate__c FROM Statu_Achievements__c WHERE Id=:recordId]; |
| | | return res; |
| | | } |
| | | catch(Exception e){ |
| | | return res; |
| | | } |
| | | } |
| | | } |
| 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> |
| | |
| | | } |
| | | return res; |
| | | } |
| | | //新建OPD计划(科室) 客户上的按钮 |
| | | @AuraEnabled |
| | | public static Account initNewOPDButton(String recordId){ |
| | | Account res = new Account(); |
| | | try{ |
| | | res = [SELECT Id,Is_Active__c |
| | | FROM Account |
| | | WHERE Id=:recordId]; |
| | | return res; |
| | | } |
| | | catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | return null; |
| | | } |
| | | } |
| | | //新建OPD计划(询价) 询价上的按钮 |
| | | @AuraEnabled |
| | | public static Opportunity initNewOPDButton2(String recordId){ |
| | | Opportunity res = new Opportunity(); |
| | | try{ |
| | | res = [SELECT Id,AccountId,Name ,StageName |
| | | FROM Opportunity |
| | | WHERE Id=:recordId]; |
| | | return res; |
| | | } |
| | | catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static void newAndUpddateCampaign(String Id,String Status){ |
| | | public static String newAndUpddateCampaign(String Id,String Status){ |
| | | try{ |
| | | Campaign res = new Campaign(); |
| | | res.Id = Id; |
| | | res.Status=Status; |
| | | update res; |
| | | return 'success'; |
| | | } |
| | | catch(Exception e){ |
| | | System.debug('lexSubmitCampaign,method:newAndUpddateCampaign error: '+e.getMessage()); |
| | | return e.getMessage(); |
| | | |
| | | } |
| | | |
| | |
| | | System.debug('lexSubmitCampaign,method:addCampaignEvent error: '+e.getMessage()); |
| | | return e.getMessage(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //会议变更申请列表按钮 |
| | | @AuraEnabled |
| | | public static Campaign initMeetingDelayApply(String recordId){ |
| | | Campaign res = new Campaign(); |
| | | try { |
| | | res = [SELECT Id,PlanBackData__c,Meeting_Cooperate__c,Meeting_Cooperate2__c, |
| | | Meeting_Cooperate3__c,Meeting_Cooperate4__c,Meeting_Type__c,HostName__c, |
| | | cooperatorCompany__c,StartDate,EndDate,IF_Approved__c,Status,CampaignStatus__c,IF_Submit__c, |
| | | Meeting_Approved_No__c |
| | | FROM Campaign |
| | | WHERE Id = :recordId]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:initMeetingDelayApply error: '+e.getMessage()); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<meeting_delay_apply__c> findQualified1(String CampaignId){ |
| | | List<meeting_delay_apply__c> res = new List<meeting_delay_apply__c>(); |
| | | try { |
| | | res = [SELECT Id FROM meeting_delay_apply__c |
| | | WHERE Status__c = '审批中' And Campaign__c =:CampaignId ]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage()); |
| | | return res; |
| | | } |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Consum_Apply__c> findQualified2(String CampaignId){ |
| | | List<Consum_Apply__c> res = new List<Consum_Apply__c>(); |
| | | try { |
| | | res = [SELECT Id FROM Consum_Apply__c |
| | | WHERE Status__c Not in ('草案中','取消') And Campaign__c =:CampaignId ]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage()); |
| | | return res; |
| | | } |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Rental_Apply__c> findQualified3(String CampaignId){ |
| | | List<Rental_Apply__c> res = new List<Rental_Apply__c>(); |
| | | try { |
| | | res = [SELECT Id FROM Rental_Apply__c |
| | | WHERE Status__c Not in ('草案中','取消') And Campaign__c =:CampaignId ]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage()); |
| | | return res; |
| | | } |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static String getRecordIdByName(String Name){ |
| | | try { |
| | | List<RecordType> res = [Select Id, Name From RecordType Where Name LIKE :Name limit 1]; |
| | | String needId = res[0].Id; |
| | | return needId; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:getRecordIdByName error: '+e.getMessage()); |
| | | return ''; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="Attachment" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire,api } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | export default class lexAgenceCopyPI extends LightningElement { |
| | | |
| | | @api recordId; |
| | | IsLoading=true; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | this.CopyPI().then(result => { |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | |
| | | |
| | | async CopyPI(){ |
| | | window.location.href = "/"+this.recordId+"/e?newclone=1"; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexAgenceCopyPI"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .holder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| | | .toast{ |
| | | border: 1px solid #c9c9c9; |
| | | border-radius: 10px; |
| | | width: 50%; |
| | | margin: 0 auto; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | padding: 10px 20px; |
| | | background: #feb75d; |
| | | display: flex; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | | title="Close" style="color: black;"></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <!-- <lightning:icon iconName="utility:warning" alternativeText="Warning!" title="Warning" /> --> |
| | | </div> |
| | | <!-- <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" if:false={IsLoading}> |
| | | <div class="slds-modal__container"> |
| | | <header class="slds-modal__header" style="color: black;"> |
| | | <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate">请选择借出备品一览记录</h2> |
| | | </header> |
| | | |
| | | <div style="height: 100px;"> |
| | | <div class="rewardDetailsTitle">Details</div> |
| | | </div> |
| | | |
| | | <footer class="slds-modal__footer"> |
| | | <lightning-button variant="brand" label="确定" class="slds-var-m-left_x-small" onclick={handleSubmit}></lightning-button> |
| | | </footer> |
| | | </div> |
| | | </section> --> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/LexGuaranteeStatuAchievements.init'; |
| | | export default class lexGuaranteePeriodAlterationApplication extends LightningElement { |
| | | @api recordId; |
| | | |
| | | @api rentalApplyIds; |
| | | IsLoading=true; |
| | | //提示信息 |
| | | msg; |
| | | hasError; |
| | | rentalApplyIds; |
| | | Statu_Achievements__c; |
| | | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res=>{ |
| | | this.Statu_Achievements__c=res; |
| | | this.guaranteePeriodAlterationApplication().then(res=>{ |
| | | this.IsLoading=false; |
| | | |
| | | if(this.msg==""){ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.closeAction(); |
| | | } |
| | | |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | async guaranteePeriodAlterationApplication(){ |
| | | let hasError ='0'; |
| | | console.log(this.Statu_Achievements__c.InstallDate__c ); |
| | | if (this.Statu_Achievements__c.InstallDate__c != '' && this.Statu_Achievements__c.InstallDate__c !=undefined) { |
| | | window.open('/apex/AssetGuaranteePeriodAlteration?Statu_AchievementsId='+this.recordId) |
| | | } else { |
| | | this.msg='该注残"安装日期"为空,不能进行保修期变更'; |
| | | hasError='1'; |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSIAbortBtn"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | <property name="rentalApplyIds" type="String[]" label="rentalApplyIds"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | <div class="Attachment" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | |
| | | |
| | | import init from '@salesforce/apex/LexSubmitCampaignController.initMeetingDelayApply'; |
| | | import findQualified1 from '@salesforce/apex/LexSubmitCampaignController.findQualified1'; |
| | | import findQualified2 from '@salesforce/apex/LexSubmitCampaignController.findQualified2'; |
| | | import findQualified3 from '@salesforce/apex/LexSubmitCampaignController.findQualified3'; |
| | | import getRecordIdByName from '@salesforce/apex/LexSubmitCampaignController.getRecordIdByName'; |
| | | import changeCampaign from '@salesforce/apex/OpdPlanWebService.changeCampaign'; |
| | | const event1 = new ShowToastEvent({ |
| | | message: |
| | | "存在审批中的会议延期申请,无法再次提交延期申请。!", |
| | | variant : "warning" |
| | | }); |
| | | const event2 = new ShowToastEvent({ |
| | | message: |
| | | "耗材借出申请的状态未处于`草案中`或`取消`,该会议只能取消,无法延期。", |
| | | variant : "warning" |
| | | }); |
| | | const event3 = new ShowToastEvent({ |
| | | message: |
| | | "备品借出申请的状态未处于`草案中`或`取消`,该会议只能取消,无法延期。", |
| | | variant : "warning" |
| | | }); |
| | | const event4 = new ShowToastEvent({ |
| | | message: |
| | | "该活动信息已发送到智慧医疗,请确认后再操作", |
| | | variant : "warning" |
| | | }); |
| | | const event5 = new ShowToastEvent({ |
| | | message: |
| | | "该会议不在公开中或申请中,只能取消,无法延期。", |
| | | variant : "warning" |
| | | }); |
| | | export default class lexMeetingDelayApplyCampaign extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | Campaign; |
| | | |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | console.log(this.recordId); |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res=>{ |
| | | console.log(res); |
| | | this.Campaign=res; |
| | | this.meetingDelayApply().then(res=>{ |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | |
| | | async meetingDelayApply(){ |
| | | var hasError='0'; |
| | | var CampaignId = this.Campaign.Id; |
| | | var PlanBackData= this.Campaign.PlanBackData__c; |
| | | var Meeting_Cooperate = this.Campaign.Meeting_Cooperate__c; |
| | | var Meeting_Cooperate2 = this.Campaign.Meeting_Cooperate2__c; |
| | | var Meeting_Cooperate3 = this.Campaign.Meeting_Cooperate3__c; |
| | | var Meeting_Cooperate4 = this.Campaign.Meeting_Cooperate4__c; |
| | | var MeetingType = this.Campaign.Meeting_Type__c; |
| | | var HostName = this.Campaign.HostName__c; |
| | | var cooperatorCompany = this.Campaign.cooperatorCompany__c; |
| | | var meetingStartDate = this.Campaign.StartDate; |
| | | var meetingEndDate = this.Campaign.EndDate; |
| | | //OBPM LY 20211221 start |
| | | var IFApproved = this.Campaign.IF_Approved__c; |
| | | //OBPM LY 20211221 end |
| | | var status = this.Campaign.Status; |
| | | var CampaignStatus = this.Campaign.CampaignStatus__c; // 20221201 ljh DB202211527935 add |
| | | var IF_Submit__c = this.Campaign.IF_Submit__c; |
| | | var MeetingApprovedNoId = this.Campaign.Meeting_Approved_No__c; |
| | | |
| | | |
| | | var meetingSize = await findQualified1(); |
| | | if(meetingSize.length>0){ |
| | | this.dispatchEvent(event1); |
| | | return; |
| | | } |
| | | |
| | | var consumSize = await findQualified2(); |
| | | if(consumSize.length>0){ |
| | | this.dispatchEvent(event2); |
| | | return; |
| | | } |
| | | |
| | | var rentalSize = await findQualified3(); |
| | | if(rentalSize.length>0){ |
| | | this.dispatchEvent(event3); |
| | | return; |
| | | } |
| | | //活动信息已经发送给智慧医疗 |
| | | if(IF_Submit__c != 0){ |
| | | this.dispatchEvent(event4); |
| | | } |
| | | |
| | | // 会议延期检查 SWAG-BVH3Q7 20201120 |
| | | var rtn = await changeCampaign({campaignId:CampaignId}); |
| | | if (rtn != 'OK') { |
| | | const event5 = new ShowToastEvent({ |
| | | message: |
| | | rtn, |
| | | variant : "warning" |
| | | }); |
| | | this.dispatchEvent(event5); |
| | | return; |
| | | } |
| | | // 20221201 ljh DB202211527935 add start |
| | | // 对于1 学会/会议和6 营业部专用会议这两种会议类型,请将公开中或申请中不允许提交变更申请的约束,改到会议状态字段。 |
| | | var recordTypeId1= await getRecordIdByName({Name : '%学会/会议%'}); |
| | | var recordTypeId2= await getRecordIdByName({Name : '%营业部专用会议%'}); |
| | | //开发环境没有此recordType |
| | | var recordTypeId3= await getRecordIdByName({Name : '%会议延期%'}); |
| | | var canDelayFlag = false; |
| | | if((this.Campaign.RecordTypeId == recordTypeId1 || this.Campaign.RecordTypeId == recordTypeId2)&&(CampaignStatus == '公开中' || CampaignStatus == '申请中')){ |
| | | canDelayFlag = true; |
| | | }else if(!(this.Campaign.RecordTypeId == recordTypeId1 || this.Campaign.RecordTypeId == recordTypeId2)&& (status == '公开中' || status == '申请中')){ |
| | | canDelayFlag = true; |
| | | } |
| | | if(!canDelayFlag){ |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | campaign__c: CampaignId, |
| | | HostName__c: HostName, |
| | | cooperatorCompany__c: cooperatorCompany, |
| | | meetingStartDate: meetingStartDate, |
| | | meeting_end_date__c: meetingEndDate, |
| | | Meeting_Type__c: MeetingType, |
| | | IF_Approved__c: IFApproved, |
| | | dismantling_date__c: PlanBackData, |
| | | Meeting_Cooperate1__c:Meeting_Cooperate, |
| | | Meeting_Cooperate2__c: Meeting_Cooperate2, |
| | | Meeting_Cooperate3__c: Meeting_Cooperate3, |
| | | Meeting_Cooperate4__c:Meeting_Cooperate4, |
| | | MeetingApproved__c: MeetingApprovedNoId, |
| | | retURL : CampaignId |
| | | }); |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'meeting_delay_apply__c', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId : recordTypeId3 |
| | | } |
| | | }); |
| | | }else{ |
| | | this.dispatchEvent(event5); |
| | | return; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaign"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .holder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| | | .toast{ |
| | | border: 1px solid #c9c9c9; |
| | | border-radius: 10px; |
| | | width: 50%; |
| | | margin: 0 auto; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | padding: 10px 20px; |
| | | background: #feb75d; |
| | | display: flex; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | | title="Close" style="color: black;"></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <!-- <lightning:icon iconName="utility:warning" alternativeText="Warning!" title="Warning" /> --> |
| | | </div> |
| | | <!-- <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" if:false={IsLoading}> |
| | | <div class="slds-modal__container"> |
| | | <header class="slds-modal__header" style="color: black;"> |
| | | <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate">请选择借出备品一览记录</h2> |
| | | </header> |
| | | |
| | | <div style="height: 100px;"> |
| | | <div class="rewardDetailsTitle">Details</div> |
| | | </div> |
| | | |
| | | <footer class="slds-modal__footer"> |
| | | <lightning-button variant="brand" label="确定" class="slds-var-m-left_x-small" onclick={handleSubmit}></lightning-button> |
| | | </footer> |
| | | </div> |
| | | </section> --> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | export default class lexNewInsReport extends LightningElement { |
| | | @api recordId; |
| | | |
| | | @api rentalApplyIds; |
| | | IsLoading=true; |
| | | //提示信息 |
| | | msg; |
| | | hasError; |
| | | rentalApplyIds; |
| | | |
| | | connectedCallback(){ |
| | | this.newInsReport().then(res=>{ |
| | | this.IsLoading=false; |
| | | if(this.msg==""){ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.closeAction(); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | async newInsReport(){ |
| | | window.open("/apex/OFSInsReportLayout?hpid"+this.recordId+"&rt=EndoscopeSystem", "_blank"); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSIAbortBtn"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | <property name="rentalApplyIds" type="String[]" label="rentalApplyIds"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | <div class="Attachment" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | const event1 = new ShowToastEvent({ |
| | | message: |
| | | "科室状态为无效,不允许新建OPD计划", |
| | | variant : "warning" |
| | | }); |
| | | import init from '@salesforce/apex/LexOPDSupplementaryController.initNewOPDButton'; |
| | | export default class lexNewOPDButtonAccount extends NavigationMixin(LightningElement) { |
| | | |
| | | @api recordId; |
| | | IsLoading=true; |
| | | Account; |
| | | |
| | | |
| | | @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(res=>{ |
| | | if (res!=null) { |
| | | console.log(res); |
| | | this.Account=res; |
| | | this.newOPDButtonAccount().then(res=>{ |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | else{ |
| | | const eventInItError = new dispatchEvent({ |
| | | message : '页面初始化错误,请联系管理员', |
| | | variant : 'error' |
| | | }); |
| | | this.dispatchEvent(eventInItError); |
| | | return; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | async newOPDButtonAccount(){ |
| | | var AccLab_active=this.Account.Is_Active__c; |
| | | if(AccLab_active =="無効"){ |
| | | this.dispatchEvent(event1); |
| | | return; |
| | | } |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Account_Laboratory__c: this.recordId, |
| | | OPDType__c: '科室', |
| | | Name : '*', |
| | | retURL : '%2F' + this.recordId |
| | | }); |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'OPDPlan__c', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaign"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | <div class="Attachment" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | const event1 = new ShowToastEvent({ |
| | | message: |
| | | "询价状态为:失单、取消、注残、发货、完毕,不允许创建OPD计划", |
| | | variant : "warning" |
| | | }); |
| | | import init from '@salesforce/apex/LexOPDSupplementaryController.initNewOPDButton2'; |
| | | export default class lexNewOPDButtonOpportunity extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | Opportunity; |
| | | |
| | | |
| | | @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(res=>{ |
| | | if (res!=null) { |
| | | console.log(res); |
| | | this.Opportunity=res; |
| | | this.newOPDButtonOpportunity().then(res=>{ |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | else{ |
| | | const eventInItError = new dispatchEvent({ |
| | | message : '页面初始化错误,请联系管理员', |
| | | variant : 'error' |
| | | }); |
| | | this.dispatchEvent(eventInItError); |
| | | return; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | async newOPDButtonOpportunity(){ |
| | | var oppstagename =this.Opportunity.StageName; |
| | | if(oppstagename=='敗戦' || oppstagename=='削除' || oppstagename=='注残' || oppstagename=='出荷' || oppstagename=='完了'){ |
| | | this.dispatchEvent(event1); |
| | | return; |
| | | } |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Related_Opportunity1_ID__c: this.recordId, |
| | | Account_Laboratory__c: this.Opportunity.AccountId, |
| | | Related_Opportunity1__c : this.Opportunity.Name, |
| | | OPDType__c : '询价', |
| | | Name : '*', |
| | | retURL : '%2F' + this.recordId |
| | | }); |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'OPDPlan__c', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaign"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | <div class="Attachment" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire,api } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | |
| | | const event1 = new ShowToastEvent({ |
| | | message: |
| | | "请填写是否需要出借备品!", |
| | | variant : "warning" |
| | | }); |
| | | const event2 = new ShowToastEvent({ |
| | | message: |
| | | "如果会议发生费用,请填写会议费用。!", |
| | | variant : "warning" |
| | | }); |
| | | const event3 = new ShowToastEvent({ |
| | | message: |
| | | "会议未结束,不允许提交会议报告。!", |
| | | variant : "warning" |
| | | }); |
| | | const event4 = new ShowToastEvent({ |
| | | message: |
| | | "不能提交审批,请确认会议状态!", |
| | | variant : "warning" |
| | | }); |
| | | |
| | | import init from '@salesforce/apex/LexSubmitCampaignController.initSubmit'; |
| | | import newAndUpddateCampaign from '@salesforce/apex/LexSubmitCampaignController.newAndUpddateCampaign'; |
| | | import submitApprovalRequest from '@salesforce/apex/LexSubmitCampaignController.submitApprovalRequest'; |
| | | export default class lexSubmitCampaign extends LightningElement { |
| | | |
| | | @api recordId; |
| | | IsLoading=true; |
| | | Campaign; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | console.log(this.recordId); |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | if (result != null) { |
| | | this.Campaign = result; |
| | | console.log(this.Campaign); |
| | | this.submit().then(result=>{ |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | }).catch(error => { |
| | | const eventInItError = new ShowToastEvent({ |
| | | message: |
| | | error.message, |
| | | variant : 'error' |
| | | }); |
| | | this.dispatchEvent(eventInItError); |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | async submit(){ |
| | | var checkUpdate =0; |
| | | var status = this.Campaign.Status; |
| | | var statusnext = ''; |
| | | var isLend = this.Campaign.Is_LendProduct__c; |
| | | // CHAN-C4E8GM Start |
| | | var EndDate = new Date(this.Campaign.EndDate); |
| | | // CHAN-C4E8GM End |
| | | if (status =='草案中' || status =='计划提交'){ |
| | | if(isLend == '' || isLend == undefined){ |
| | | this.dispatchEvent(event1); |
| | | return; |
| | | } |
| | | statusnext = "计划提交"; |
| | | |
| | | } else if ((status =='公开中' || status =='报告提交') && (new Date()>= EndDate)) { |
| | | this.dispatchEvent(event2); |
| | | statusnext = "报告提交"; |
| | | // CHAN-C4E8GM Start |
| | | } else if ((status =='公开中' || status =='报告提交') && (new Date()< EndDate)) { |
| | | this.dispatchEvent(event3); |
| | | return; |
| | | // CHAN-C4E8GM End |
| | | } else { |
| | | this.dispatchEvent(event4); |
| | | return; |
| | | } |
| | | console.log(statusnext); |
| | | await newAndUpddateCampaign({Id : this.recordId , Status : statusnext }).then(result=>{ |
| | | if(result !='success'){ |
| | | const eventErroe1 = new ShowToastEvent({ |
| | | message: |
| | | result, |
| | | variant : 'error' |
| | | }); |
| | | checkUpdate +=1; |
| | | this.dispatchEvent(eventErroe1); |
| | | } |
| | | }); |
| | | if(checkUpdate!=0){ |
| | | return; |
| | | } |
| | | await submitApprovalRequest({recordId : this.recordId}).then(result=>{ |
| | | console.log(result); |
| | | if(result!=null){ |
| | | //更新状态 |
| | | newAndUpddateCampaign({Id : this.recordId , Status : status}).then(result=>{ |
| | | if(result!='success'){ |
| | | const eventErroe3 = new ShowToastEvent({ |
| | | message: |
| | | result, |
| | | variant : 'error' |
| | | }); |
| | | checkUpdate +=1; |
| | | this.dispatchEvent(eventErroe3); |
| | | } |
| | | }); |
| | | if(checkUpdate!=0){ |
| | | return; |
| | | } |
| | | const eventFail = new ShowToastEvent({ |
| | | message: |
| | | result, |
| | | variant : 'error' |
| | | }); |
| | | this.dispatchEvent(eventFail); |
| | | alert('2222'); |
| | | return; |
| | | } |
| | | }); |
| | | window.location.reload(); |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaign"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire,api } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | const event1 = new ShowToastEvent({ |
| | | message: |
| | | "不能提交审批,请确认会议状态!", |
| | | variant : "warning" |
| | | }); |
| | | import init from '@salesforce/apex/LexSubmitCampaignController.initSubmit'; |
| | | import newAndUpddateCampaign from '@salesforce/apex/LexSubmitCampaignController.newAndUpddateCampaign'; |
| | | import submitApprovalRequest from '@salesforce/apex/LexSubmitCampaignController.submitApprovalRequest'; |
| | | export default class lexSubmitCampaignService extends LightningElement { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | Campaign; |
| | | |
| | | @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 => { |
| | | if (result != null) { |
| | | this.Campaign = result; |
| | | this.submitCampaignService().then(result=>{ |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | async submitCampaignService(){ |
| | | var checkUpdate=0; |
| | | var status = this.Campaign.Status; |
| | | var statusnext = ""; |
| | | if (status =='草案中'){ |
| | | } else { |
| | | this.dispatchEvent(event1); |
| | | return; |
| | | } |
| | | await submitApprovalRequest({recordId : this.recordId}).then(result=>{ |
| | | console.log(result); |
| | | if(result!=null){ |
| | | //更新状态 |
| | | newAndUpddateCampaign({Id : this.recordId , Status : status}).then(result=>{ |
| | | if(result!='success'){ |
| | | const eventErroe3 = new ShowToastEvent({ |
| | | message: |
| | | result, |
| | | variant : 'error' |
| | | }); |
| | | checkUpdate +=1; |
| | | this.dispatchEvent(eventErroe3); |
| | | } |
| | | }); |
| | | if(checkUpdate!=0){ |
| | | return; |
| | | } |
| | | const eventFail = new ShowToastEvent({ |
| | | message: |
| | | result, |
| | | variant : 'error' |
| | | }); |
| | | this.dispatchEvent(eventFail); |
| | | return; |
| | | } |
| | | }); |
| | | |
| | | window.location.reload(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaignService"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | </LightningComponentBundle> |