| | |
| | | /* |
| | | * @Author: zhangchunxu |
| | | * @Date: 2023-06-27 16:51:18 |
| | | * @LastEditors: zhangchunxu |
| | | * @LastEditTime: 2023-08-04 13:17:42 |
| | | * |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/TenderingButtonController.initTenderingController'; |
| | | import sqlResult from '@salesforce/apex/TenderingButtonController.sqlResult'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | export default class lexTenderingLostButton extends LightningElement { |
| | | @api recordId;//当前这条数据的id |
| | | status;//状态 |
| | |
| | | this.TwoS1_Sales_Hospital = result.TwoS1_Sales_Hospital; |
| | | this.TwoS4_Sales_Manager = result.TwoS4_Sales_Manager; |
| | | this.LoseButton(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | // 判断是否需要新建询价 |
| | | if(this.status == '05.询价中'|| this.status == '06.成交' || this.status == '07.部分成交' || this.status == '08.失单' || result.length > 0){ |
| | | if(confirm('此项目已关联询价,请确实是否新建询价提交失单。')) { |
| | | |
| | | }else{ |
| | | return; |
| | | } |
| | | LightningConfirm.open({ |
| | | message: '此项目已关联询价,请确实是否新建询价提交失单。', |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value', |
| | | }).then(res=>{ |
| | | if(res) { |
| | | window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no'); |
| | | if(this.status == "04.待关联询价"){ |
| | | window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | } |
| | | showToast(msg,type) { |
| | |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | } |