| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-05-15 13:17:26 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-24 16:44:21 |
| | | * @LastEditTime: 2023-06-02 10:59:13 |
| | | */ |
| | | /* |
| | | * @Description: |
| | |
| | | import init from '@salesforce/apex/OpportunityLightingButtonController.initForChangeContractTypeButton'; |
| | | import changeTrade from '@salesforce/apex/OpportunityLightingButtonController.changeTrade'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | export default class LexChangeContractType extends LightningElement { |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | export default class LexChangeContractType extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | stageName; |
| | | estimationDecision; |
| | |
| | | console.log(result); |
| | | if(result){ |
| | | try { |
| | | console.log("22222"); |
| | | changeTrade({ |
| | | oppId: oppId |
| | | }).then(result=>{ |
| | | console.log("1111"); |
| | | str = result; |
| | | if(str != '1'){ |
| | | this.showToast(str,"error"); |
| | | } |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | window.location.href = 'https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Opportunity/' + this.recordId + '/view'; |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__recordPage', |
| | | attributes: { |
| | | recordId: this.recordId, |
| | | objectApiName: 'Opportunity', |
| | | actionName: 'view' |
| | | } |
| | | }); |
| | | // window.location.href = '/lightning/r/Opportunity/' + this.recordId + '/view'; |
| | | }).catch(error=>{ |
| | | console.log("error"); |
| | | console.log(error); |