| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-20 15:04:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-04-20 17:15:06 |
| | | * @LastEditTime: 2023-04-20 18:01:37 |
| | | */ |
| | | /* |
| | | * @Description: |
| | |
| | | */ |
| | | import { LightningElement } from 'lwc'; |
| | | import save from '@salesforce/apex/lexPCLLostReportLwcController.save'; |
| | | import unblockui from '@sa'; |
| | | import jquery from '@salesforce/resourceUrl/jquery183minjs'; |
| | | import blockUIcss from '@salesforce/resourceUrl/blockUIcss'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { loadStyle, loadScript } from 'lightning/platformResourceLoader'; |
| | | import setBrand from '@salesforce/apex/lexPCLLostReportLwcController.setBrand'; |
| | | export default class LexPCLLostReportPage extends LightningElement { |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | | loadScript(this,jquery), |
| | | loadStyle(this,blockUIcss) |
| | | ]).then(() =>{ |
| | | save().then(result=>{ |
| | | if(result){ |
| | | this.showToast(result,"success"); |
| | | window.unblockUI(); |
| | | this.clearBrandMannualName(); |
| | | } |
| | | setBrand({ |
| | | |
| | | }).then({ |
| | | |
| | | }); |
| | | }) |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | saveJs() { |
| | | blockme(); |