| | |
| | | import { LightningElement, track } from 'lwc'; |
| | | import { LightningElement,api, track } from 'lwc'; |
| | | import GetInspectById from '@salesforce/apex/EnquiryNoBiddingController.GetInspectById'; |
| | | import SaveDataYB from '@salesforce/apex/EnquiryNoBiddingController.SaveDataYB'; |
| | | import ChangeDataYB from '@salesforce/apex/EnquiryNoBiddingController.ChangeDataYB'; |
| | | import GetIrresponsibleReason from '@salesforce/apex/EnquiryNoBiddingController.GetIrresponsibleReason'; |
| | | |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import CheckOwnerRequest from '@salesforce/apex/EnquiryNoBiddingController.CheckOwner'; |
| | | |
| | | import lwcCSS from '@salesforce/resourceUrl/lwcCSS'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | import GetTenderInformationById from '@salesforce/apex/EnquiryNoBiddingController.GetTenderInformationById'; |
| | | |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | |
| | | import GetDataById from '@salesforce/apex/EnquiryNoBiddingController.GetDataById'; |
| | | |
| | |
| | | TongzhiIcon = 'standard:account' //提示显示的标签 |
| | | IsLeftStyle = "" //提示显示的样式 |
| | | BgColorStyle = "" |
| | | showToast(msg,type) { |
| | | if(type == 'success'){ |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | }else{ |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | |
| | | } |
| | | Alert(content,error = false,left = false){ |
| | | this.SaveShowText = content; |
| | | this.Tongzhishow = true; |
| | |
| | | } |
| | | return(false); |
| | | } |
| | | ParamIdStr = '' //不应标申请iD |
| | | ParamOIdStr = '' //询价ID |
| | | ParamPIdStr = '' //招投标ID |
| | | @api ParamIdStr = ''; //不应标申请iD |
| | | @api ParamOIdStr = '';//询价ID |
| | | @api ParamPIdStr = ''; //招投标ID |
| | | |
| | | |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | | loadStyle(this, lwcCSS) |
| | | ]); |
| | | console.log('123456'); |
| | | console.log(this.ParamOIdStr); |
| | | this.OnLoading(true); |
| | | |
| | | var paramId = this.getQueryVariable('id'); |
| | | var paramOId = this.getQueryVariable('oid'); |
| | | var paramTId = this.getQueryVariable('tid'); |
| | | // var paramId = this.getQueryVariable('id'); |
| | | // var paramOId = this.getQueryVariable('oid'); |
| | | // var paramTId = this.getQueryVariable('tid'); |
| | | // paramId = 'a4Y1m0000000dhGEAQ'; |
| | | // paramOId = '0061000000QL9M4AAL'; |
| | | |
| | | this.ParamIdStr= paramId; |
| | | this.ParamOIdStr = paramOId; |
| | | this.ParamPIdStr = paramTId; |
| | | // this.ParamIdStr= paramId; |
| | | // this.ParamOIdStr = paramOId; |
| | | // this.ParamPIdStr = paramTId; |
| | | |
| | | debugger; |
| | | |
| | |
| | | |
| | | // Opp_Bid__c | Bidding_Project_Name_BidId__c |
| | | |
| | | if(this.ParamOIdStr !=undefined && this.ParamOIdStr!=false) |
| | | if(this.ParamOIdStr !='' && this.ParamOIdStr!=false) |
| | | { |
| | | GetDataById({Id:this.ParamOIdStr}).then(response=>{ |
| | | var data = JSON.parse(response); |
| | |
| | | setTimeout(()=>{ |
| | | this.OnLoading(false); |
| | | },1500); |
| | | }) |
| | | }).catch(error=>{ |
| | | console.log('error'); |
| | | console.log(error); |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | //数据保存方法 |
| | | saveFn(event,temp){ |
| | | if(!this.IsCheck){return;} |
| | | |
| | | this.IsLoading = true; |
| | | this.IsCheck = false; |
| | | |
| | | debugger; |
| | |
| | | debugger; |
| | | |
| | | var IsInsert = this.InspectData.Id==undefined?"是":"否"; |
| | | const closeEvent = new CustomEvent('closeaction', { |
| | | bubbles: true, // 允许事件冒泡至父组件 |
| | | composed: true, // 允许事件穿越 Shadow DOM 界限 |
| | | }); |
| | | if (temp == 1) { |
| | | ChangeDataYB({JsonData:JSON.stringify(this.InspectData),Id:this.ParamOIdStr,IsInsert:IsInsert}).then((response)=>{ |
| | | if (response.indexOf("成功") != -1) { |
| | | this.Alert("提交成功"); |
| | | // this.Alert("提交成功"); |
| | | this.showToast("提交成功","success"); |
| | | this.DisabledSet(); |
| | | |
| | | this.IsLoading = false; |
| | | this.IsCheck = true; |
| | | |
| | | |
| | | window.location.hash = "Refresh"+"=="+this.ParamOIdStr; |
| | | setTimeout(() => { |
| | | window.location = '/' + this.ParamOIdStr; |
| | | }, 2000); |
| | | this.dispatchEvent(closeEvent); |
| | | // window.location.hash = "Refresh"+"=="+this.ParamOIdStr; |
| | | }else{ |
| | | this.Alert(response,true); |
| | | this.showToast(response,"error"); |
| | | this.IsLoading = false; |
| | | // this.Alert(response,true); |
| | | this.IsCheck = true; |
| | | } |
| | | }); |
| | |
| | | { |
| | | SaveDataYB({JsonData:JSON.stringify(this.InspectData),Id:this.ParamOIdStr,IsInsert:IsInsert}).then((response)=>{ |
| | | if (response=="成功") { |
| | | this.Alert("保存成功",false,true); |
| | | window.location.hash = "Refresh"+"=="+this.ParamOIdStr; |
| | | // this.Alert("保存成功",false,true); |
| | | this.showToast("保存成功","success"); |
| | | this.IsLoading = false; |
| | | // window.location.hash = "Refresh"+"=="+this.ParamOIdStr; |
| | | setTimeout(() => { |
| | | window.location = '/' + this.ParamOIdStr; |
| | | }, 2000); |
| | | this.dispatchEvent(closeEvent); |
| | | this.IsCheck = true; |
| | | }else{ |
| | | this.Alert(response,true); |
| | | // this.Alert(response,true); |
| | | this.showToast(response,"error"); |
| | | this.IsLoading = false; |
| | | this.IsCheck = true; |
| | | } |
| | | }); |