| | |
| | | import queryForCancelReportButton from '@salesforce/apex/OpportunityLightingButtonController.queryForCancelReportButton'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import ConSent from '@salesforce/apex/BidAnnouncementController.ConSent'; |
| | | export default class LexCancelReport extends LightningElement { |
| | | @api recordId; |
| | | stageName; |
| | |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.stageName = result.stageName; |
| | | this.sapSendOK = result.sapSendOK; |
| | | this.cntLostCancelDraft = result.cntLostCancelDraft; |
| | | this.cntLostCancelReport = result.cntLostCancelReport; |
| | | this.jobCategory = result.jobCategory; |
| | | this.biddingProjectNameBid = result.biddingProjectNameBid; |
| | | this.name = result.name; |
| | | this.salesAssistantID = result.salesAssistantID; |
| | | this.salesAssistantName = result.salesAssistantName; |
| | | this.managerName = result.managerName; |
| | | this.salesManagerDepartmentID = result.salesManagerDepartmentID; |
| | | this.salesOwnerBuchang = result.salesOwnerBuchang; |
| | | this.salesOwnerBuchangID = result.salesOwnerBuchangID; |
| | | console.log(result); |
| | | this.stageName = result.stageName == undefined ? '' : result.stageName; |
| | | this.sapSendOK = result.sapSendOK == undefined ? '' : result.sapSendOK; |
| | | this.cntLostCancelDraft = result.cntLostCancelDraft == undefined ? '' : result.cntLostCancelDraft; |
| | | this.cntLostCancelReport = result.cntLostCancelReport == undefined ? '' : result.cntLostCancelReport; |
| | | this.jobCategory = result.jobCategory == undefined ? '' : result.jobCategory; |
| | | this.biddingProjectNameBid = result.biddingProjectNameBid == undefined ? '' : result.biddingProjectNameBid; |
| | | this.name = result.name == undefined ? '' : result.name; |
| | | this.salesAssistantID = result.salesAssistantID == undefined ? '' : result.salesAssistantID; |
| | | this.salesAssistantName = result.salesAssistantName == undefined ? '' : result.salesAssistantName; |
| | | this.managerName = result.managerName == undefined ? '' : result.managerName; |
| | | this.salesManagerDepartmentID = result.salesManagerDepartmentID == undefined ? '' : result.salesManagerDepartmentID; |
| | | this.salesOwnerBuchang = result.salesOwnerBuchang == undefined ? '' : result.salesOwnerBuchang; |
| | | this.salesOwnerBuchangID = result.salesOwnerBuchangID == undefined ? '' : result.salesOwnerBuchangID; |
| | | this.cancelReport(); |
| | | }) |
| | | } |
| | |
| | | |
| | | } |
| | | else if (this.sapSendOK == '1') { |
| | | this.showToast("已经上传SAP、不能做 取消 了!",""); |
| | | this.showToast("已经上传SAP、不能做 取消 了!","error"); |
| | | } |
| | | else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) { |
| | | this.showToast("询价已经有 取消/失单报告 了!","error"); |
| | | } |
| | | else if (this.jobCategory == '支援') { |
| | | this.showToast("询价所有人是助理的,先请修改到销售担当!",""); |
| | | this.showToast("询价所有人是助理的,先请修改到销售担当!","error"); |
| | | } |
| | | //XLIU-CG98L5 【委托】【评估】新需求-招标项目/询价对应流标、废标改善 start |
| | | //else if({!NOT(ISBLANK(Opportunity.Bidding_Project_Name_Bid__c))}&& '{!Opportunity.subInfoType__c}' != '3-1:废标公告' &&'{!Opportunity.subInfoType__c}' != '3-2:流标公告'){ |
| | | else if(this.biddingProjectNameBid != undefined && sqlResult.size == 0){ |
| | | else if(this.biddingProjectNameBid != '' && sqlResult.length == 0){ |
| | | this.showToast("有招投标项目时只能做失单或部分失单报告!","error"); |
| | | } |
| | | //XLIU-CG98L5 【委托】【评估】新需求-招标项目/询价对应流标、废标改善 end |