| | |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static InitData initForDepartmentCreate(String recordId,String type){ |
| | | InitData res = new InitData(); |
| | | try { |
| | | Account acc = [ |
| | | select |
| | | Hospital_Department_Class__c |
| | | from Account where Id =: recordId |
| | | ]; |
| | | res.hospitalDepartmentClass = acc.Hospital_Department_Class__c; |
| | | if(type == 'BF'){ |
| | | res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_BF).getRecordTypeId(); |
| | | }else if(type == 'ENT'){ |
| | | res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_ENT).getRecordTypeId(); |
| | | }else if(type == 'GI'){ |
| | | res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_GI).getRecordTypeId(); |
| | | }else if(type == 'GS'){ |
| | | res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_GS).getRecordTypeId(); |
| | | }else if(type == 'GYN'){ |
| | | res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_GYN).getRecordTypeId(); |
| | | }else if(type == 'OTH'){ |
| | | res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OTH).getRecordTypeId(); |
| | | }else if(type == 'URO'){ |
| | | res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_URO).getRecordTypeId(); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static InitData initForRepairContact(String recordId){ |
| | | InitData res = new InitData(); |
| | | try{ |
| | | res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_CON).getRecordTypeId(); |
| | | }catch(Exception e){ |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | class InitData{ |
| | | @AuraEnabled |
| | | public String hospitalSalesdepartmentHP; |
| | |
| | | public String hospitalOCMCategory; |
| | | @AuraEnabled |
| | | public String recordTypeId; |
| | | @AuraEnabled |
| | | public String hospitalDepartmentClass; |
| | | } |
| | | } |
| | |
| | | public static final String RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE = '询价特殊对应'; |
| | | //52 询价注残特殊对应的记录类型‘注残特殊对应’ |
| | | public static final String RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE_ACH = '注残特殊对应'; |
| | | //客户对应的记录类型診療科 呼吸科 |
| | | public static final String RECORD_TYPE_NAME_BY_BF = 'Department_BF'; |
| | | //客户对应的记录类型診療科 耳鼻喉科 |
| | | public static final String RECORD_TYPE_NAME_BY_ENT = 'Department_ENT'; |
| | | //客户对应的记录类型診療科 消化科 |
| | | public static final String RECORD_TYPE_NAME_BY_GI = 'Department_GI'; |
| | | //客户对应的记录类型診療科 普外科 |
| | | public static final String RECORD_TYPE_NAME_BY_GS = 'Department_GS'; |
| | | //客户对应的记录类型診療科 妇科 |
| | | public static final String RECORD_TYPE_NAME_BY_GYN = 'Department_GYN'; |
| | | //客户对应的记录类型診療科 其他 |
| | | public static final String RECORD_TYPE_NAME_BY_OTH = 'Department_OTH'; |
| | | //客户对应的记录类型診療科 泌尿科 |
| | | public static final String RECORD_TYPE_NAME_BY_URO = 'Department_URO'; |
| | | //客户对应的记录类型经销商联系人 |
| | | public static final String RECORD_TYPE_NAME_BY_CON = 'AgencyContact'; |
| | | //Case对应的记录类型‘VOC’ |
| | | public static final String RECORD_TYPE_NAME_BY_VOC = 'VOC'; |
| | | //报表名‘报价产品’ |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexDepartmentCreateBF from 'c/lexDepartmentCreateBF'; |
| | | |
| | | describe('c-lex-department-create-bf', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-department-create-bf', { |
| | | is: LexDepartmentCreateBF |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <!-- |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-07-28 16:01:28 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-28 16:02:03 |
| | | --> |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-07-28 16:01:28 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-31 10:01:47 |
| | | */ |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexAccountController.initForDepartmentCreateBF'; |
| | | export default class LexDepartmentCreateBF extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | recordTypeId; |
| | | hospitalDepartmentClass; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId, |
| | | type: 'BF' |
| | | }).then(result=>{ |
| | | console.log(result); |
| | | this.recordTypeId = result.recordTypeId; |
| | | this.hospitalDepartmentClass = result.hospitalDepartmentClass; |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Department_Class__c: this.recordId, |
| | | Hospital_Department_Class__c: '', |
| | | ParentId: this.recordId, |
| | | Hospital__c: this.hospitalDepartmentClass, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: this.recordTypeId |
| | | } |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexDepartmentCreateENT from 'c/lexDepartmentCreateENT'; |
| | | |
| | | describe('c-lex-department-create-ent', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-department-create-ent', { |
| | | is: LexDepartmentCreateENT |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-07-31 09:57:25 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-31 10:31:19 |
| | | */ |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexAccountController.initForDepartmentCreate'; |
| | | |
| | | export default class LexDepartmentCreateENT extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | recordTypeId; |
| | | hospitalDepartmentClass; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId, |
| | | type: 'ENT' |
| | | }).then(result=>{ |
| | | this.recordTypeId = result.recordTypeId; |
| | | this.hospitalDepartmentClass = result.hospitalDepartmentClass; |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Department_Class__c: this.recordId, |
| | | Hospital_Department_Class__c: '', |
| | | ParentId: this.recordId, |
| | | Hospital__c: this.hospitalDepartmentClass, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: this.recordTypeId |
| | | } |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexDepartmentCreateGI from 'c/lexDepartmentCreateGI'; |
| | | |
| | | describe('c-lex-department-create-gi', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-department-create-gi', { |
| | | is: LexDepartmentCreateGI |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexAccountController.initForDepartmentCreate'; |
| | | |
| | | export default class LexDepartmentCreateGI extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | recordTypeId; |
| | | hospitalDepartmentClass; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId, |
| | | type: 'GI' |
| | | }).then(result=>{ |
| | | this.recordTypeId = result.recordTypeId; |
| | | this.hospitalDepartmentClass = result.hospitalDepartmentClass; |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Department_Class__c: this.recordId, |
| | | Hospital_Department_Class__c: '', |
| | | ParentId: this.recordId, |
| | | Hospital__c: this.hospitalDepartmentClass, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: this.recordTypeId |
| | | } |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexDepartmentCreateGS from 'c/lexDepartmentCreateGS'; |
| | | |
| | | describe('c-lex-department-create-gs', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-department-create-gs', { |
| | | is: LexDepartmentCreateGS |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-07-31 10:56:23 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-31 11:06:33 |
| | | */ |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexAccountController.initForDepartmentCreate'; |
| | | |
| | | export default class LexDepartmentCreateGS extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | recordTypeId; |
| | | hospitalDepartmentClass; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId, |
| | | type: 'GS' |
| | | }).then(result=>{ |
| | | this.recordTypeId = result.recordTypeId; |
| | | this.hospitalDepartmentClass = result.hospitalDepartmentClass; |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Department_Class__c: this.recordId, |
| | | Hospital_Department_Class__c: '', |
| | | ParentId: this.recordId, |
| | | Hospital__c: this.hospitalDepartmentClass, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: this.recordTypeId |
| | | } |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexDepartmentCreateGYN from 'c/lexDepartmentCreateGYN'; |
| | | |
| | | describe('c-lex-department-create-gyn', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-department-create-gyn', { |
| | | is: LexDepartmentCreateGYN |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-07-31 11:05:47 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-31 11:18:49 |
| | | */ |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexAccountController.initForDepartmentCreate'; |
| | | |
| | | export default class LexDepartmentCreateGYN extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | recordTypeId; |
| | | hospitalDepartmentClass; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId, |
| | | type: 'GYN' |
| | | }).then(result=>{ |
| | | this.recordTypeId = result.recordTypeId; |
| | | this.hospitalDepartmentClass = result.hospitalDepartmentClass; |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Department_Class__c: this.recordId, |
| | | Hospital_Department_Class__c: '', |
| | | ParentId: this.recordId, |
| | | Hospital__c: this.hospitalDepartmentClass, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: this.recordTypeId |
| | | } |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexDepartmentCreateOTH from 'c/lexDepartmentCreateOTH'; |
| | | |
| | | describe('c-lex-department-create-oth', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-department-create-oth', { |
| | | is: LexDepartmentCreateOTH |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-07-31 11:18:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-31 11:28:22 |
| | | */ |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexAccountController.initForDepartmentCreate'; |
| | | |
| | | export default class LexDepartmentCreateOTH extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | recordTypeId; |
| | | hospitalDepartmentClass; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId, |
| | | type: 'OTH' |
| | | }).then(result=>{ |
| | | this.recordTypeId = result.recordTypeId; |
| | | this.hospitalDepartmentClass = result.hospitalDepartmentClass; |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Department_Class__c: this.recordId, |
| | | Hospital_Department_Class__c: '', |
| | | ParentId: this.recordId, |
| | | Hospital__c: this.hospitalDepartmentClass, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: this.recordTypeId |
| | | } |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexDepartmentCreateURO from 'c/lexDepartmentCreateURO'; |
| | | |
| | | describe('c-lex-department-create-uro', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-department-create-uro', { |
| | | is: LexDepartmentCreateURO |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexAccountController.initForDepartmentCreate'; |
| | | |
| | | export default class LexDepartmentCreateURO extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | recordTypeId; |
| | | hospitalDepartmentClass; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId, |
| | | type: 'URO' |
| | | }).then(result=>{ |
| | | this.recordTypeId = result.recordTypeId; |
| | | this.hospitalDepartmentClass = result.hospitalDepartmentClass; |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Department_Class__c: this.recordId, |
| | | Hospital_Department_Class__c: '', |
| | | ParentId: this.recordId, |
| | | Hospital__c: this.hospitalDepartmentClass, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: this.recordTypeId |
| | | } |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexRepairContact from 'c/lexRepairContact'; |
| | | |
| | | describe('c-lex-repair-contact', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-repair-contact', { |
| | | is: LexRepairContact |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <!-- |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-07-31 11:42:00 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-31 11:42:37 |
| | | --> |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-07-31 11:42:00 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-31 14:30:18 |
| | | */ |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexAccountController.initForRepairContact'; |
| | | |
| | | export default class LexRepairContact extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | recordTypeId; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.recordTypeId = result.recordTypeId; |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | AgencyContact__c: this.recordId, |
| | | ParentId: this.recordId, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: this.recordTypeId |
| | | } |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |