1
chenjingwu
2024-05-24 84e0a7994d22fa5be5e5f8ae91ca4990ef495afd
force-app/main/default/lwc/lexNewSolutonProLwc/lexNewSolutonProLwc.js
@@ -1,3 +1,11 @@
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-08-24 15:52:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-09-14 16:36:52
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -13,7 +21,8 @@
import SolutionXNLabel from '@salesforce/label/c.Solution_XN';
import SolutionHDLabel from '@salesforce/label/c.Solution_HD';
import SolutionHNLabel from '@salesforce/label/c.Solution_HN';
import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
import {loadStyle} from 'lightning/platformResourceLoader';
export default class LexNewSolutonProLwc extends NavigationMixin(LightningElement) {
    @api accountId;
    hospitalSalesdepartmentHP;
@@ -36,9 +45,13 @@
        }
    }
    connectedCallback(){
        Promise.all([
            loadStyle(this, lwcCSS)
           ]);
        init({
            recordId: this.accountId
        }).then(result=>{
            console.log(result);
            this.hospitalId = result.hospitalId;
            this.hospitalOCMCategory = result.hospitalOCMCategory;
            this.hospitalSalesdepartmentHP = result.hospitalSalesdepartmentHP;
@@ -63,6 +76,7 @@
            this.salesAssistant = '';
        }
        const defaultValues = encodeDefaultFieldValues({
            Name: '*',
            Hospital__c: this.hospitalId == undefined ? '' : this.hospitalId,
            Department_Class__c: this.accountId == undefined ? '' : this.accountId,
            Sales_Assistant__c: this.salesAssistant == undefined ? '' : this.salesAssistant