19626
2023-09-13 196df4d4bf1941546d349cadbf343655578ec280
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-05-15 11:14:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-05 14:01:14
 * @LastEditTime: 2023-09-04 13:16:23
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -12,7 +12,8 @@
import init from '@salesforce/apex/OpportunityLightingButtonController.initForAssignTaskButtonButton';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexAssignTaskButton extends LightningElement {
import RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP from '@salesforce/label/c.RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP';
export default class LexAssignTaskButton extends NavigationMixin(LightningElement) {
    @api recordId;
    accountName;
    accountId;
@@ -40,7 +41,7 @@
            this.accountId = result.accountId;
            this.accountName = result.accountName;
            this.oppName = result.name;
            this.recordTypeId = result.recordTypeId;
            this.recordTypeId = RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP;
            this.assignTask();
        }).catch(error=>{
            console.log("error");
@@ -71,12 +72,13 @@
            account__c: this.accountId,
            OpportunityId__c: this.recordId,
            taskStatus__c: '01 分配',
            taskDifferent__c: '上级分配任务'
            taskDifferent__c: '上级分配任务',
            Name: '*'
        });
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'Task',
                objectApiName: 'task__c',
                actionName: 'new'
            },
            state: {