19626
2023-06-06 4661adc43f549036f4e6e44debe92521c5793083
修改页面以及按钮
27个文件已修改
699 ■■■■■ 已修改文件
force-app/main/default/classes/OpportunityLightingButtonController.cls 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityWebService.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexLightingButtonConstant.cls 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexPCLLostReportLwcController.cls 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRequestDB/lexRequestDB.js 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AccountCaseTab.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CM_SearchDepartment.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CM_SearchDepartmentService.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CM_SearchOpportunity.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/CampaignMemberEditAndDelete.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/MaintenanceDailyReport.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/QuoteTrial.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/Xin_SearchMaintenanceContract.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/Xin_SearchOpportunity.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/Xin_SearchVisitorPlace_Campaign.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/Xin_SearchVisitorPlace_Sales.page 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-12 11:16:07
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-31 17:32:51
 * @LastEditTime: 2023-06-05 13:59:58
 */
public with sharing class OpportunityLightingButtonController {
    @AuraEnabled
@@ -184,6 +184,7 @@
            res.systemProfileId = getProfileIdByName(lexLightingButtonConstant.SYSTEM_PROFILE_NAME);
            res.s1ProfileId = getProfileIdByName(lexLightingButtonConstant.S1_PROFILE_NAME);
            res.s4ProfileId = getProfileIdByName(lexLightingButtonConstant.S4_PROFILE_NAME);
            res.recordTypeId = Schema.SObjectType.Request_tedner_doc__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_AUTHORIZATION_REQUEST).getRecordTypeId();
        } catch (Exception e) {
            System.debug('e:****' + e);
        }
@@ -305,7 +306,11 @@
                CurrencyIsoCode
                from Opportunity where Id =: recordId
            ];
            Report cnyReport = [SELECT Id FROM Report WHERE Name = :lexLightingButtonConstant.REPORT_NAME_FOR_CNY limit 1];
            Report usdReport = [SELECT Id FROM Report WHERE Name = :lexLightingButtonConstant.REPORT_NAME_FOR_USD limit 1];
            res.currencyIsoCode = opportunity.CurrencyIsoCode;
            res.reportForCNYId = cnyReport.Id;
            res.reportForUSDId = usdReport.Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
@@ -426,6 +431,7 @@
            res.accountId = opp.AccountId;
            res.accountName = acc.Name;
            res.name = opp.Name;
            res.recordTypeId = Schema.SObjectType.Task.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP).getRecordTypeId();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
@@ -836,5 +842,9 @@
        public String accountName;
        @AuraEnabled
        public String recordTypeId;
        @AuraEnabled
        public String reportForCNYId;
        @AuraEnabled
        public String reportForUSDId;
    }
}
force-app/main/default/classes/OpportunityWebService.cls
@@ -1,5 +1,5 @@
global class OpportunityWebService {
    @AuraEnabled
    WebService static String changeTrade(String oppId){
        List<Quote> quoList = [select id from Quote where OpportunityId = :oppId];
force-app/main/default/classes/lexLightingButtonConstant.cls
@@ -79,6 +79,14 @@
      public static final String RECORD_TYPE_NAME_BY_COMP= '5.现场结案';
      //失单取消报告的记录类型‘询价取消报告’
      public static final String RECORD_TYPE_NAME_BY_OPPO_CANCEL_REPORT = '询价取消报告';
      //任务的记录类型‘询价跟进’
      public static final String RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP = '询价跟进';
      //授权申请的记录类型‘授权申请’
      public static final String RECORD_TYPE_NAME_BY_AUTHORIZATION_REQUEST = '授权申请';
      //报表名‘报价产品’
      public static final String REPORT_NAME_FOR_CNY = '报价产品';
      //报表名‘产品的询价’
      public static final String REPORT_NAME_FOR_USD = '产品的询价';
    //记录类型的developerName‘ASRCDecision’
    public static final String DEVELOPER_NAME_ASRC_DECISION = 'ASRCDecision';
    //记录类型的developerName‘ASACDecision’
force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -494,7 +494,7 @@
    }
    // 数据录入
    @AuraEnabled
    public static Map<String,String> dataEntry(String report1){
    public static Map<String,String> dataEntry(String report1,List<Id> deleteBrandIdList,List<Id> deleteProductIdList){
        LostReport report = (LostReport)JSON.deserialize(report1, LostReport.class);
        Map<String,String> messageMap = new Map <String,String>();
        system.debug('save---start:');
@@ -543,30 +543,32 @@
            map<string,PCLLostProduct__c> upsertLostProductMap = new map<string,PCLLostProduct__c>();
            // 需要删掉的失单品牌
            list<PCLLostProduct__c> deleteLostProductList = new list<PCLLostProduct__c>();
            Integer lineNo = 0;
            for(LostBrand tempLostBrand : report.LostBrands ) {
                // 如果有失单品牌,那么就要插入更新;
                system.debug('tempLostBrand.lostBrand.Lost_By_Company__c:'+tempLostBrand.lostBrand.Lost_By_Company__c);
                if(string.isNotBlank(tempLostBrand.lostBrand.Lost_By_Company__c)) {
                    upsertLostBrandMap.put(tempLostBrand.lineNo,tempLostBrand.lostBrand);
                    tempLostBrand.lostBrand.Lost_cancel_report__c = report.lostReport.id;
                    upsertLostBrandMap.put(lineNo,tempLostBrand.lostBrand);
                    tempLostBrand.lostBrand.Lost_cancel_report__c = report.lostReport.Id;
                    tempLostBrand.lostBrand.Name = tempLostBrand.lostBrand.Lost_By_Company__c;
                    integer tempNo = 0;
                    for( PCLLostProducts tempLostProduct : tempLostBrand.LostProducts) {
                        system.debug('Name:'+ tempLostProduct.LostProductss.Name );
                        if(tempLostProduct.LostProductss.Quantity__c !=null && tempLostProduct.LostProductss.Quantity__c >0) {
                            tempLostProduct.LostProductss.Name = tempLostBrand.lostBrand.Name + tempLostProduct.LostProductss.Quantity__c;
                            upsertLostProductMap.put(tempLostBrand.lineNo +':'+ tempNo,tempLostProduct.LostProductss);
                        }else if(string.isNotBlank(tempLostProduct.LostProductss.id)) {
                            upsertLostProductMap.put(lineNo +':'+ tempNo,tempLostProduct.LostProductss);
                        }else if(string.isNotBlank(tempLostProduct.LostProductss.Id)) {
                            deleteLostProductList.add(tempLostProduct.LostProductss);
                        }
                        tempNo++;
                    }
                }
                // 如果没有品牌,但是有id, 这样数据需要删除
                else if(string.isNotBlank(tempLostBrand.lostBrand.id)) {
                    deleteLostBrandMap.put(tempLostBrand.lineNo,tempLostBrand.lostBrand);
                else if(string.isNotBlank(tempLostBrand.lostBrand.Id )) {
                    deleteLostBrandMap.put(lineNo,tempLostBrand.lostBrand);
                    // 这里可能需要也判断一下失单型号有没有需要删掉
                }
                lineNo++;
            }
            if(upsertLostBrandMap.size()>0) {
                upsert upsertLostBrandMap.values();
@@ -574,7 +576,7 @@
            for( string productNo :upsertLostProductMap.keyset()) {
                PCLLostProduct__c tempLostProduct = upsertLostProductMap.get(productNo);
                integer brandNo = integer.valueof(productNo.split(':')[0]);
                tempLostProduct.PCLLostBrand__c = upsertLostBrandMap.get(brandNo).id;
                tempLostProduct.PCLLostBrand__c = upsertLostBrandMap.get(brandNo).Id;
            }
            if(upsertLostProductMap.size()>0) {
                upsert upsertLostProductMap.values();
@@ -582,13 +584,20 @@
            if(deleteLostBrandMap.size()>0) {
                delete deleteLostBrandMap.values();
                for(PCLLostBrand__c pcl: deleteLostBrandMap.values()) {
                    pcl.id = null;
                    pcl.Id = null;
                }
            }
            if (deleteProductIdList.size()>0) {
                database.delete(deleteProductIdList);
            }
            if (deleteBrandIdList.size()>0) {
                database.delete(deleteBrandIdList);
            }
            if(deleteLostProductList.size()>0) {
                delete deleteLostProductList;
                for(PCLLostProduct__c pclp: deleteLostProductList) {
                    pclp.id = null;
                    pclp.Id = null;
                }
            }
            if(deleteBrandIDSet.size() > 0) {
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
@@ -4,13 +4,14 @@
 * @Author: chen jing wu
 * @Date: 2023-05-08 14:36:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-26 15:57:45
 * @LastEditTime: 2023-06-01 10:37:01
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/ReportController.initForASACEditorButton';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexASACEditor extends NavigationMixin(LightningElement) {
    @api recordId;
    lastModifiedDate
@@ -69,10 +70,35 @@
    editor(){
        if (this.id != undefined){
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
            const defaultValues = encodeDefaultFieldValues({
                nooverride: '1',
                Id: this.id,
                ReportId: this.recordId,
                RecordTypeIds: 'ASACDecision'
            });
            this[NavigationMixin.Navigate]({
                type: 'standard__webPage',
                attributes: {
                    url: '/apex/RepPAEDecisionRecord'
                },
                state: defaultValues
            });
            // this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
        } else {
            this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
            const defaultValues = encodeDefaultFieldValues({
                nooverride: '1',
                ReportId: this.recordId,
                RecordTypeIds: 'ASACDecision'
            });
            this[NavigationMixin.Navigate]({
                type: 'standard__webPage',
                attributes: {
                    url: '/apex/RepPAEDecisionRecord'
                },
                state: defaultValues
            });
            // this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
        }
        window.open(this.url,"_self");
        // window.open(this.url,"_self");
    }
}
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
@@ -4,13 +4,14 @@
 * @Author: chen jing wu
 * @Date: 2023-05-08 14:36:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-26 15:57:13
 * @LastEditTime: 2023-06-01 10:37:17
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/ReportController.initForASRCEditorButton';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexASRCEditor extends NavigationMixin(LightningElement) {
    @api recordId;
    lastModifiedDate
@@ -67,10 +68,35 @@
    editor(){
        if (this.id != undefined){
            this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
            const defaultValues = encodeDefaultFieldValues({
                nooverride: '1',
                Id: this.id,
                ReportId: this.recordId,
                RecordTypeIds: 'ASRCDecision'
            });
            this[NavigationMixin.Navigate]({
                type: 'standard__webPage',
                attributes: {
                    url: '/apex/RepPAEDecisionRecord'
                },
                state: defaultValues
            });
            // this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
        } else {
            this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
            const defaultValues = encodeDefaultFieldValues({
                ReportId: this.recordId,
                RecordTypeIds: 'ASRCDecision'
            });
            this[NavigationMixin.Navigate]({
                nooverride: '1',
                type: 'standard__webPage',
                attributes: {
                    url: '/apex/RepPAEDecisionRecord'
                },
                state: defaultValues
            });
            // this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
        }
        window.open(this.url,"_self");
        // window.open(this.url,"_self");
    }
}
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
@@ -4,17 +4,20 @@
 * @Author: chen jing wu
 * @Date: 2023-05-15 11:14:32
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-15 11:50:12
 * @LastEditTime: 2023-06-05 14:01:14
 */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/OpportunityLightingButtonController.initForAssignTaskButtonButton';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexAssignTaskButton extends LightningElement {
    @api recordId;
    accountName;
    accountId;
    oppName;
    recordTypeId;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
@@ -37,6 +40,7 @@
            this.accountId = result.accountId;
            this.accountName = result.accountName;
            this.oppName = result.name;
            this.recordTypeId = result.recordTypeId;
            this.assignTask();
        }).catch(error=>{
            console.log("error");
@@ -44,25 +48,43 @@
        });
     }
     assignTask(){
        //基础路径
        var url = '/setup/ui/recordtypeselect.jsp?ent=01I100000016llf';
        //记录类型
        url += '&p3=01210000000cWfw';
        url += '&retURL=%2F';
        url += '&save_new_url=%2Fa3V%2Fe%3FretURL%3D%252Fa3V%252Fo';
        //客户
        url += '&CF00N100000095tn6=' + this.accountName;
        url += '&CF00N100000095tn6_lkid=' + this.accountId;
        //询价
        url += '&CF00N100000095zcA=' + this.oppName;
        url += '&CF00N100000095zcA_lkid=' + this.recordId;
        //任务状态
        url += '&00N100000095tnR=01 分配';
        //任务区分
        url += '&00N100000095tnP=上级分配任务';
        //任务名称
        url += '&Name=*';
        window.open(url);
        // //基础路径
        // var url = '/setup/ui/recordtypeselect.jsp?ent=01I100000016llf';
        // //记录类型
        // url += '&p3=01210000000cWfw';
        // url += '&retURL=%2F';
        // url += '&save_new_url=%2Fa3V%2Fe%3FretURL%3D%252Fa3V%252Fo';
        // //客户
        // url += '&CF00N100000095tn6=' + this.accountName;
        // url += '&CF00N100000095tn6_lkid=' + this.accountId;
        // //询价
        // url += '&CF00N100000095zcA=' + this.oppName;
        // url += '&CF00N100000095zcA_lkid=' + this.recordId;
        // //任务状态
        // url += '&00N100000095tnR=01 分配';
        // //任务区分
        // url += '&00N100000095tnP=上级分配任务';
        // //任务名称
        // url += '&Name=*';
        // window.open(url);
        const defaultValues = encodeDefaultFieldValues({
            account__c: this.accountId,
            OpportunityId__c: this.recordId,
            taskStatus__c: '01 分配',
            taskDifferent__c: '上级分配任务'
        });
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'Task',
                actionName: 'new'
            },
            state: {
                nooverride: '1',
                defaultFieldValues: defaultValues,
                recordTypeId: this.recordTypeId
            }
        });
        this.dispatchEvent(new CloseActionScreenEvent());
     }
}
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-05-15 13:17:26
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-24 16:44:21
 * @LastEditTime: 2023-06-02 10:59:13
 */
/*
 * @Description: 
@@ -22,7 +22,8 @@
import init from '@salesforce/apex/OpportunityLightingButtonController.initForChangeContractTypeButton';
import changeTrade from '@salesforce/apex/OpportunityLightingButtonController.changeTrade';
import LightningConfirm from 'lightning/confirm';
export default class LexChangeContractType extends LightningElement {
import { NavigationMixin } from 'lightning/navigation';
export default class LexChangeContractType extends NavigationMixin(LightningElement) {
    @api recordId;
    stageName;
    estimationDecision;
@@ -53,16 +54,26 @@
        console.log(result);
        if(result){
            try {
                console.log("22222");
                changeTrade({
                    oppId: oppId
                }).then(result=>{
                    console.log("1111");
                    str = result;
                    if(str != '1'){
                        this.showToast(str,"error");
                    }
                    this.IsLoading = false;
                    this.dispatchEvent(new CloseActionScreenEvent());
                    window.location.href = 'https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Opportunity/' + this.recordId + '/view';
                    this[NavigationMixin.Navigate]({
                        type: 'standard__recordPage',
                        attributes: {
                            recordId: this.recordId,
                            objectApiName: 'Opportunity',
                            actionName: 'view'
                        }
                    });
                    // window.location.href = '/lightning/r/Opportunity/' + this.recordId + '/view';
                }).catch(error=>{
                    console.log("error");
                    console.log(error);
force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
@@ -4,14 +4,16 @@
 * @Author: chen jing wu
 * @Date: 2023-04-21 14:32:09
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-12 15:25:47
 * @LastEditTime: 2023-06-05 11:09:35
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/OpportunityLightingButtonController.initForCopyWithAssetButton';
export default class LexCopyWithAsset extends LightningElement {
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexCopyWithAsset extends NavigationMixin(LightningElement) {
    @api recordId;
    sapSendOK;
    name;
@@ -53,16 +55,33 @@
        if(this.sapSendOK){
            this.showToast("询价已经WIN,不能进行拆单","error");
            } else {
                window.open(
                    "/"
                    + this.recordId
                    + "/e?clone=1&retURL=%2F006p0000004bsox&_CONFIRMATIONTOKEN=VmpFPSxNakF4Tnkwd05DMHdPVlF3TmpvME16bzFPUzR5TWpsYSxuc010bXY2U1MxYWgzTHcwNzdUX0VpLE5HUmlaR013&common.udd.actions.ActionsUtilORIG_URI=%2F006p0000004bsox%2Fe&cloneli=1&CF00N10000006qHai="
                    + this.name
                    +"&CF00N10000006qHai_lkid="
                    + this.recordId
                    + "&00N10000009Glvn="
                    + this.isAuthorized
                    + "&00N10000008pnmd=1&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb");
                // window.open(
                //     "/"
                //     + this.recordId
                //     + "/e?clone=1&retURL=%2F006p0000004bsox&_CONFIRMATIONTOKEN=VmpFPSxNakF4Tnkwd05DMHdPVlF3TmpvME16bzFPUzR5TWpsYSxuc010bXY2U1MxYWgzTHcwNzdUX0VpLE5HUmlaR013&common.udd.actions.ActionsUtilORIG_URI=%2F006p0000004bsox%2Fe&cloneli=1&CF00N10000006qHai="
                //     + this.name
                //     +"&CF00N10000006qHai_lkid="
                //     + this.recordId
                //     + "&00N10000009Glvn="
                //     + this.isAuthorized
                //     + "&00N10000008pnmd=1&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb");
                const defaultValues = encodeDefaultFieldValues({
                    Old_Opportunity_ID__c: this.recordId,
                    IsAuthorized__c: this.isAuthorized
                });
                this[NavigationMixin.Navigate]({
                    type: 'standard__objectPage',
                    attributes: {
                        objectApiName: 'Opportunity',
                        actionName: 'clone',
                        recordId: this.recordId
                    },
                    state: {
                        nooverride: '1',
                        defaultFieldValues: defaultValues
                    }
                });
            }
            this.dispatchEvent(new CloseActionScreenEvent());
    }
force-app/main/default/lwc/lexCreateEvent/lexCreateEvent.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-13 13:50:23
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-04-13 14:39:54
 * @LastEditTime: 2023-06-05 09:13:58
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -12,7 +12,9 @@
import init  from '@salesforce/apex/OpportunityLightingButtonController.initForCreateEventButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexCreateEvent extends LightningElement {
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexCreateEvent extends NavigationMixin(LightningElement) {
    @api recordId;
    accountId;
    @wire(CurrentPageReference)
@@ -42,7 +44,18 @@
        })
    }
    createEvent(){
        window.open("/00U/e?retURL=%2Fapex%2FVFClosePage&accid=" + this.accountId + "&oid=" + this.recordId, "新建计划");
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'Event',
                actionName: 'new'
            },
            state: {
                // retURL: '/apex/VFClosePage',
                accid: this.accountId,
                oid: this.recordId
            }
        });
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    showToast(msg,type) {
force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
@@ -7,7 +7,9 @@
import queryForRecords from '@salesforce/apex/OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecords';
import queryForRecTypeList from '@salesforce/apex/OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecTypeList';
import queryForRecords2 from '@salesforce/apex/OpportunityLightingButtonController.queryForNewOpportunityAgencyButtonToRecords2';
export default class LexNewOpportunityAgency extends LightningElement {
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexNewOpportunityAgency extends NavigationMixin(LightningElement) {
    @api recordId;
    agency1Id;
    agencyOpportunity;
@@ -178,32 +180,57 @@
                                        var ahl = records[0];
                                        
                                        try {
                                            var url = "/a2Y/e?retURL=%2F"
                                            + this.recordId
                                            + "&Name='(OLYMPUS)'"
                                            + encodeURIComponent(this.name)
                                            + "&RecordType=" + recTypeId  + "&" + fId_Close_Forecasted_Date__c + "="
                                            + encodeURIComponent(this.closeForecastedDate)
                                            + "&" + fId_Bid_Planned_Date__c + "="
                                            + encodeURIComponent(this.bidPlannedDate)
                                            + "&" + fId_OCM_Change_To_Opportunity_Flg__c + "=1" + "&CF" + fId_Agency_Hospital__c + "_lkid=" + ahl.Id + "&CF" + fId_Agency_Hospital__c + "=" + encodeURIComponent(ahl.Name) + "&" + fId_Amount__c + "="
                                            + encodeURIComponent(this.dealerFinalPrice)
                                            + "&" + fId_OCMSale_Price__c + "="
                                            + encodeURIComponent(this.wholesalePrice)
                                            + "&CF" + fId_Agency__c + "_lkid="
                                            + encodeURIComponent(this.agency1Id)
                                            + "&CF" + fId_Agency__c + "="
                                            + encodeURIComponent(this.agency1Name)
                                            + "&" + fId_StageName__c + "="
                                            + encodeURIComponent(this.opportunityStage)
                                            + "&CF" + fId_Change_To_Opportunity__c + "_lkid="
                                            + encodeURIComponent(this.recordId )
                                            + "&CF" + fId_Change_To_Opportunity__c + "="
                                            + encodeURIComponent(this.name )
                                            + "&" + fId_Department_Cateogy__c + "="
                                            + encodeURIComponent(this.opportunityCategory);
                                            console.log(url);
                                            window.open(url);
                                            // var url = "/a2Y/e?retURL=%2F"
                                            // + this.recordId
                                            // + "&Name='(OLYMPUS)'"
                                            // + encodeURIComponent(this.name)
                                            // + "&RecordType=" + recTypeId  + "&" + fId_Close_Forecasted_Date__c + "="
                                            // + encodeURIComponent(this.closeForecastedDate)
                                            // + "&" + fId_Bid_Planned_Date__c + "="
                                            // + encodeURIComponent(this.bidPlannedDate)
                                            // + "&" + fId_OCM_Change_To_Opportunity_Flg__c + "=1" + "&CF" + fId_Agency_Hospital__c + "_lkid=" + ahl.Id + "&CF" + fId_Agency_Hospital__c + "=" + encodeURIComponent(ahl.Name) + "&" + fId_Amount__c + "="
                                            // + encodeURIComponent(this.dealerFinalPrice)
                                            // + "&" + fId_OCMSale_Price__c + "="
                                            // + encodeURIComponent(this.wholesalePrice)
                                            // + "&CF" + fId_Agency__c + "_lkid="
                                            // + encodeURIComponent(this.agency1Id)
                                            // + "&CF" + fId_Agency__c + "="
                                            // + encodeURIComponent(this.agency1Name)
                                            // + "&" + fId_StageName__c + "="
                                            // + encodeURIComponent(this.opportunityStage)
                                            // + "&CF" + fId_Change_To_Opportunity__c + "_lkid="
                                            // + encodeURIComponent(this.recordId )
                                            // + "&CF" + fId_Change_To_Opportunity__c + "="
                                            // + encodeURIComponent(this.name )
                                            // + "&" + fId_Department_Cateogy__c + "="
                                            // + encodeURIComponent(this.opportunityCategory);
                                            // console.log(url);
                                            // window.open(url);
                                            const defaultValues = encodeDefaultFieldValues({
                                                Name: '(OLYMPUS)',
                                                Close_Forecasted_Date__c: this.closeForecastedDate,
                                                Bid_Planned_Date__c: this.bidPlannedDate,
                                                OCM_Change_To_Opportunity_Flg__c: '1',
                                                Agency_Hospital__c: ahl.Id,
                                                Amount__c: this.dealerFinalPrice,
                                                OCMSale_Price__c: this.wholesalePrice,
                                                Agency__c: this.agency1Id,
                                                StageName__c: this.opportunityStage,
                                                Change_To_Opportunity__c: this.recordId,
                                                Department_Cateogy__c: this.opportunityCategory,
                                                RecordTypeId: recTypeId
                                            });
                                            this[NavigationMixin.Navigate]({
                                                type: 'standard__objectPage',
                                                attributes: {
                                                    objectApiName: 'Agency_Opportunity__c',
                                                    actionName: 'new'
                                                },
                                                state: {
                                                    nooverride: '1',
                                                    defaultFieldValues: defaultValues,
                                                }
                                            });
                                            this.dispatchEvent(new CloseActionScreenEvent());
                                        } catch (error) {
                                            console.log(error)
force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-23 10:09:31
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-15 11:06:07
 * @LastEditTime: 2023-06-05 11:53:46
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -12,8 +12,9 @@
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/OpportunityLightingButtonController.initForOpporSpliteButton';
export default class LexOpporSplite extends LightningElement {
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexOpporSplite extends NavigationMixin(LightningElement) {
    @api recordId;
    authorizedDBNo;
    estimationDecision;
@@ -61,18 +62,30 @@
        }else if(this.siDecideID == ''){
            this.showToast("需求表未批准,不能拆单","error");
        }else if(this.recordId != '草案中' && this.recordId != '已提交' && this.recordId != '已终止'){
            console.log("sss");
            window.open(
                    "/"
                    + this.recordId
                    + "/e?clone=1&retURL=%2F"
                    + this.recordId + "&00N10000002Cbwh=*&CF00N10000006qHai="
                    + this.name + "&00Np0000001DOwi=***&00Np0000001CxmR="
                    + this.opportunityNo + "&CF00N10000006qHai_lkid="
                    + this.recordId + "&00N10000006qHav="
                    + this.opportunityNo + "&00N10000009Glvn="
                    + this.isAuthorized + "&00N10000008pnmd=1&00N10000002DXkZ=&00N10000002DXke=&00N10000002CmTf=&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb"
            );
            // console.log("sss");
            // window.open(
            //         "/"
            //         + this.recordId
            //         + "/e?clone=1&retURL=%2F"
            //         + this.recordId + "&00N10000002Cbwh=*&CF00N10000006qHai="
            //         + this.name + "&00Np0000001DOwi=***&00Np0000001CxmR="
            //         + this.opportunityNo + "&CF00N10000006qHai_lkid="
            //         + this.recordId + "&00N10000006qHav="
            //         + this.opportunityNo + "&00N10000009Glvn="
            //         + this.isAuthorized + "&00N10000008pnmd=1&00N10000002DXkZ=&00N10000002DXke=&00N10000002CmTf=&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb"
            // );
            this[NavigationMixin.Navigate]({
                type: 'standard__objectPage',
                attributes: {
                    objectApiName: 'Opportunity',
                    actionName: 'clone',
                    recordId: this.recordId
                },
                state: {
                    nooverride: '1',
                    // defaultFieldValues: defaultValues,
                }
            });
        }
        this.dispatchEvent(new CloseActionScreenEvent());
    }
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 17:16:48
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-31 11:44:24
 * @LastEditTime: 2023-06-06 10:33:07
-->
<template>
    
@@ -18,12 +18,7 @@
                    <div style="margin-left: 550px;">
                        <lightning-layout-item  size="12">
                            <lightning-button label="追加品牌" onclick={addBrandJs}></lightning-button>
                            <template if:true={isEdit}>
                                <lightning-button name="save" label="保存1" onclick={saveBrandToEditJs}></lightning-button>
                            </template>
                            <template if:false={isEdit}>
                                <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                            </template>
                            <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                            <lightning-button label="返回询价" onclick={cancel}></lightning-button>
                        </lightning-layout-item>
                    </div>
@@ -52,12 +47,7 @@
                                <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
                                    <li key={brand.index}>
                                        <lightning-accordion-section class="" data-id={i} name="失单品牌" label="失单品牌">
                                            <template if:true={isEdit}>
                                                <lightning-button name="save" label="保存1" onclick={saveBrandToEditJs}></lightning-button>
                                            </template>
                                            <template if:false={isEdit}>
                                                <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                            </template>
                                            <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                            <lightning-button name={i} label="删除" onclick={deleteBrandJs} disabled={isBrandCount2}></lightning-button>
                                            <lightning-layout>
                                                <lightning-layout-item size="4" padding="around-small">
@@ -119,7 +109,7 @@
                                                                    <template for:each={brand.LostProducts} for:item="product" for:index="j">
                                                                        <tr class="inputRows" key={product}>
                                                                            <td>
                                                                               <lightning-combobox placeholder={product.LostProductss.LostBrandName__c} class="BrandName" name={j} title={i} options={brandOptions} value={product.LostProductss.LostBrandName__c} onchange={handleLostBrandNameChange} read-only="true"></lightning-combobox>
                                                                               <lightning-combobox placeholder={product.LostProductss.LostBrandName__c} data-id={i} class="BrandName" name={j} title={i} options={brandOptions} value={product.LostProductss.LostBrandName__c} onchange={handleLostBrandNameChange} read-only="true"></lightning-combobox>
                                                                            </td>
                                                                            <td>
                                                                                <!-- <lightning-record-edit-form
@@ -169,12 +159,7 @@
                            <div class="slds-align_absolute-center">
                                <lightning-layout-item size="12">
                                    <lightning-button label="追加品牌" onclick={addBrandJs}></lightning-button>
                                    <template if:true={isEdit}>
                                        <lightning-button name="save" label="保存1" onclick={saveBrandToEditJs}></lightning-button>
                                    </template>
                                    <template if:false={isEdit}>
                                        <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                    </template>
                                    <lightning-button name="save" label="保存" onclick={saveBrandJs}></lightning-button>
                                    <lightning-button label="返回询价" onclick={cancel}></lightning-button>
                                </lightning-layout-item>
                            </div>
@@ -204,7 +189,7 @@
                                <label>失单类型:</label>
                            </lightning-layout-item>
                            <lightning-layout-item size="1">
                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={reportId} density="comfy">
                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
                                    <lightning-output-field field-name="LostType__c" variant="label-hidden"></lightning-output-field>
                                </lightning-record-view-form> 
                            </lightning-layout-item>
@@ -213,7 +198,7 @@
                                <label>失单总金额(元):</label>
                            </lightning-layout-item>
                            <lightning-layout-item size="1">
                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={reportId} density="comfy">
                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
                                    <lightning-output-field field-name="LostTotalAmount__c" variant="label-hidden"></lightning-output-field>
                                </lightning-record-view-form> 
                            </lightning-layout-item>
@@ -222,7 +207,7 @@
                                <label>包含超声:</label>
                            </lightning-layout-item>
                            <lightning-layout-item size="1">
                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={reportId} density="comfy">
                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
                                    <lightning-output-field field-name="InclusionUltrasound__c" variant="label-hidden"></lightning-output-field>
                                </lightning-record-view-form> 
                            </lightning-layout-item>
@@ -231,7 +216,7 @@
                                <label>状态:</label>
                            </lightning-layout-item>
                            <lightning-layout-item size="1">
                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={reportId} density="comfy">
                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
                                    <lightning-output-field field-name="Report_Status__c" variant="label-hidden"></lightning-output-field>
                                </lightning-record-view-form> 
                            </lightning-layout-item> 
@@ -322,9 +307,6 @@
                                    </lightning-layout-item>
                                </div>
                            </lightning-layout>
                            <template if:true={isSubmit}>
                                <div>...test...</div>
                            </template>
                    </div>
                </div>   
            </lightning-card>
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 15:04:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-31 11:42:30
 * @LastEditTime: 2023-06-06 10:51:30
 */
const columns2=[
    { label: '--无--', value: '' },
@@ -47,10 +47,8 @@
import { CurrentPageReference } from "lightning/navigation";
import dataEntry from '@salesforce/apex/lexPCLLostReportLwcController.dataEntry';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import setbrand from '@salesforce/apex/lexPCLLostReportLwcController.setBrand';
import init from '@salesforce/apex/lexPCLLostReportLwcController.init';
import multiSelectCombobox from 'c/multiSelectCombobox'
import lexMultiSelectCombobox from 'c/lexmultiSelectCombobox';
import searchBrands from '@salesforce/apex/lexPCLLostReportLwcController.searchBrands';
import getNewLostBrand from '@salesforce/apex/lexPCLLostReportLwcController.getNewLostBrand';
import getPickList from '@salesforce/apex/lexPCLLostReportLwcController.getPickList';
@@ -64,7 +62,9 @@
    @api oppId;
    @track columns2=columns2;
    @api pageStatus = 'Create';
    @track status = {
        pageStatus: 'Create'
      }
    @track LostReport = {
        LostBrands: [
        ],
@@ -84,11 +84,13 @@
    //失单类型
    RecordTypeOptions = RecordTypeOptions;
    isSubmit = false;
    deleteBrandIdList = [];
    deleteProductIdList = [];
    connectedCallback(){
        init({
            oppId1: this.oppId,
            lostReportId1: this.reportId,
            pageStatus1: this.pageStatus,
            pageStatus1: this.status.pageStatus,
            lostType1: this.lostType,
            submitFlag1: this.submitFlag
        }).then(result=>{
@@ -184,21 +186,21 @@
    }
    get isView(){
        if(this.pageStatus == 'View'){
        if(this.status.pageStatus == 'View'){
            return true;
        }
        return false;
    }
    get isCreateOrEdit(){
        if(this.pageStatus == 'Create' || this.pageStatus == 'Edit'){
        if(this.status.pageStatus == 'Create' || this.status.pageStatus == 'Edit'){
            return true;
        }
        return false;
    }
    get isEdit(){
        if(this.pageStatus == 'Edit'){
        if(this.status.pageStatus == 'Edit'){
            return true;
        }
        return false;
@@ -221,33 +223,7 @@
                this.showToast(result.error,"error");
            }else{
                this.submitFlag = result.submitFlag;
                init({
                    oppId1: this.oppId,
                    lostReportId1: this.reportId,
                    pageStatus1: result.pageStatus,
                    lostType1: this.lostType,
                    submitFlag1: this.submitFlag
                }).then(result=>{
                    var report = result.LostReport;
                    if(result.message != null){
                        if(result.message == '提交成功!'){
                            this.LostReport = report;
                            this.isSubmit = true;
                            this.pageStatus = 'View';
                            console.log(this.LostReport);
                            this.showToast(result.message,"success");
                            this.updateRecordView(this.reportId);
                        }else{
                            this.showToast(result.message,"error");
                        }
                    }else{
                        this.LostReport = report;
                    }
                }).catch(error=>{
                    console.log("error");
                    console.log(error);
                });
                this.updateRecordView(this.reportId);
            }
        }).catch(error=>{
            console.log("error");
@@ -258,17 +234,21 @@
    deleteBrandJs(event){
        var str = event.target.name;
        this.columnsArrIndex = 0;
        if(this.LostReport.LostBrands[str].lostBrand.Id){
            this.deleteBrandIdList.push(this.LostReport.LostBrands[str].lostBrand.Id);
        }
        this.LostReport.LostBrands.splice(str,1);
        console.log(this.LostReport);
        this.deleteBrandIdList.forEach(brandId=>{
            console.log(brandId);
        });
        this.setLostTotalAmount();
    }
    // add tcm 20211118 end
    setLostTotalAmount() {
        var elements = this.template.querySelectorAll('[data-id="TotalAmount"]');
        var tempLostAmount = 0.0;
        elements.forEach(element => {
            if(element.value != 0){
                tempLostAmount = tempLostAmount + parseFloat(element.value);
            }
        this.LostReport.LostBrands.forEach(brand=>{
            tempLostAmount = tempLostAmount + parseFloat(brand.lostBrand.LostPrice__c);
        });
        this.LostReport.lostReport.LostTotalAmount__c = tempLostAmount;
    }
@@ -277,6 +257,15 @@
        var index = event.target.name;
        const payload = event.detail.payload;
        const payloadType = event.detail.payloadType;
        if(this.LostReport.LostBrands[index].lostBrand.Id){
            this.LostReport.LostBrands[index].LostProducts.forEach(product=>{
                if(product.LostProductss.Id){
                    var productId = product.LostProductss.Id
                    this.deleteProductIdList.push(productId);
                }
            });
            console.log(this.deleteProductIdList);
        }
        this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c = payload.value;
        if(payloadType === 'multi-select'){
            this.clearProducts(payload.value,index);
@@ -285,10 +274,6 @@
        }
    }
    setDefaultBrand(value,index){
        console.log('22222');
        // this.LostReport.LostBrands[index].LostProducts.forEach(product => {
        //     product.LostProductss.LostBrandName__c = value;
        // });
        var newProducts = [];
        this.LostReport.LostBrands[index].LostProducts.forEach(product=>{
            this.newProduct.LostProductss.LostBrandName__c = value;
@@ -297,7 +282,6 @@
        this.LostReport.LostBrands[index].LostProducts = newProducts;
    }
    clearProducts(value,index){
        console.log('111111');
        var newProducts = [];
        this.LostReport.LostBrands[index].LostProducts.forEach(product=>{
            this.newProduct.LostProductss.LostBrandName__c = value;
@@ -353,61 +337,42 @@
        if(!this.flag){
            return;
        }
        console.log(this.pageStatus);
        if(this.pageStatus == 'Edit'){
            this.pageStatus = 'View';
        }else{
            dataEntry({
                report1 : JSON.stringify(this.LostReport)
            }).then(result=>{
                console.log(result);
                if(result.error){
                    this.showToast(result.error,"error");
                }else{
                    this.LostReport = JSON.parse(result.LostReport);
                    this.reportId = result.reportId;
                    console.log(this.LostReport);
                    Promise.resolve().then(() => {
                        this.pageStatus = 'View';
                        this.template.querySelectorAll('lightning-card').forEach(elem => {
                            elem.classList.toggle('View');
                        });
        console.log(this.LostReport);
        dataEntry({
            report1 : JSON.stringify(this.LostReport),
            deleteBrandIdList: this.deleteBrandIdList,
            deleteProductIdList: this.deleteProductIdList
        }).then(result=>{
            console.log(result);
            this.deleteBrandIdList.splice(0,this.deleteBrandIdList.length);
            this.deleteProductIdList.splice(0,this.deleteProductIdList.length);
            if(result.error){
                this.showToast(result.error,"error");
            }else{
                var report = JSON.parse(result.LostReport);
                var index1 = 0;
                this.LostReport.LostBrands.forEach(brand=>{
                    brand.lostBrand.Id = report.LostBrands[index1].lostBrand.Id;
                    var index2 = 0;
                    brand.LostProducts.forEach(product=>{
                        product.LostProductss.Id = report.LostBrands[index1].LostProducts[index2].LostProductss.Id;
                        index2++;
                    });
                }
            }).catch(error=>{
                console.log("error");
                console.log(error);
            });
        }
                    index1++;
                });
                this.reportId = result.reportId;
                this.LostReport.lostReport.Id = result.reportId;
                console.log(this.LostReport);
                this.status.pageStatus = 'View';
                this.tableflag = 0;
            }
        }).catch(error=>{
            console.log("error");
            console.log(error);
        });
    }
    saveBrandToEditJs(event) {
        Promise.resolve().then(() => {
            this.pageStatus = 'View';
            this.template.querySelectorAll('lightning-card').forEach(elem => {
                elem.classList.toggle('View');
            });
        });
    }
    editJs(){
        Promise.resolve().then(() => {
            this.pageStatus = 'Edit';
            this.template.querySelectorAll('lightning-card').forEach(elem => {
                elem.classList.toggle('Edit');
            });
        });
        // var elements = this.template.querySelectorAll('.Product');
        // console.log(elements.length);
        // elements.forEach(element=>{
        //     var name = null;
        //     this.productNameList.forEach(product=>{
        //         if(product.index1 == element.title && product.index2 == element.name){
        //             name = product.name;
        //         }
        //     });
        //     element.editLookup(name);
        // });
        this.status.pageStatus = 'Edit';
    }
   
    dataCheck(){
@@ -510,10 +475,14 @@
        if(deleteButtons.length == 1){
            return;
        }
        if(this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.Id){
            var productId = this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.Id;
            this.deleteProductIdList.push(productId);
        }
        this.LostReport.LostBrands[index1].LostProducts.splice(index2,1);
        console.log(this.deleteProductIdList);
    }
    search(topNum,secondNum){
        console.log("sb");
        var elements1 = this.template.querySelectorAll('.ProductClass[data-id="' + topNum + '"]');
        var elements2 = this.template.querySelectorAll('.ProductCategory[data-id="' + topNum + '"]');
        if (this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c==null) {
@@ -526,7 +495,6 @@
            elements2[secondNum].readOnly = true;
        }else {
            console.log("a");
            searchProduct({
                lostProduct : this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.LostProduct__c
            }).then(result=>{
@@ -534,24 +502,19 @@
                var prd = JSON.parse(result);
                this.LostReport.LostBrands[topNum].LostProducts[secondNum].productOptions = this.productOptionsList[prd.ProductClass__c];
                if (prd.ProductCategory__c!=null) {
                    console.log("c");
                    elements1[secondNum].readOnly = false;
                    elements2[secondNum].readOnly = false;
                    this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=prd.ProductClass__c;
                    this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=prd.ProductCategory__c;
                    elements1[secondNum].readOnly = true;
                    elements2[secondNum].readOnly = true;
                    console.log("e");
                    // this.LostReport.LostBrands[topNum].LostProducts[secondNum].bool=true;
                }else {
                    console.log("d");
                    elements1[secondNum].readOnly = false;
                    elements2[secondNum].readOnly = false;
                    this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductClass__c=null;
                    this.LostReport.LostBrands[topNum].LostProducts[secondNum].LostProductss.ProductCategory__c=null;
                    elements1[secondNum].readOnly = true;
                    elements2[secondNum].readOnly = true;
                    // this.LostReport.LostBrands[topNum].LostProducts[secondNum].bool=false;
                }
            }).catch(error=>{
                console.log("error");
@@ -561,16 +524,11 @@
        }
    }
    handleSelected(event) {
        console.log('......');
        var index1 = event.target.title;
        var index2 = event.target.name;
        // var objectname = event.detail.ObjectName;
        this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.LostProduct__c = event.detail.Id;
        this.LostReport.LostBrands[index1].LostProducts[index2].productName = event.detail.Name;
        this.search(index1,index2);
        console.log(this.LostReport);
        // this.account = {Name : event.detail.Name, Id: event.detail.Id}
    }
    handleLostTypeChange(event){
@@ -644,7 +602,6 @@
        this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.LostProductMannual__c = event.target.value;
    }
    handleProductClassChange(event){
        console.log("qwer");
        var index1 = event.target.title;
        var index2 = event.target.name;
        this.LostReport.LostBrands[index1].LostProducts[index2].LostProductss.ProductClass__c = event.target.value;
force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-14 17:15:33
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-05-12 14:43:54
 * @LastEditTime: 2023-06-05 10:36:22
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -16,6 +16,8 @@
export default class LexQuotationProductNew extends LightningElement {
    @api recordId;
    currencyIsoCode;
    reportForCNYId;
    reportForUSDId;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
@@ -36,6 +38,8 @@
            recordId:this.recordId
        }).then(result=>{
            this.currencyIsoCode = result.currencyIsoCode;
            this.reportForCNYId = result.reportForCNYId;
            this.reportForUSDId = result.reportForUSDId;
            this.quotationProductNew();
        }).catch(error=>{
            console.log(error);
@@ -45,10 +49,10 @@
        var Currency = this.currencyIsoCode;
        var OppID = this.recordId;
        if (Currency == 'CNY'){
        var url = '/00O10000002jviu?pv0=' + OppID;
        var url = '/' + this.reportForCNYId + '?pv0=' + OppID;
        }
        else if (Currency == 'USD'){
        var url = '/00O10000005Ju6L?pv0=' + OppID;
        var url = '/' + this.reportForUSDId + '?pv0=' + OppID;
        }
        window.open(url);
        this.dispatchEvent(new CloseActionScreenEvent());
force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
@@ -4,8 +4,9 @@
import init  from '@salesforce/apex/OpportunityLightingButtonController.initForRequestDBButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexRequestDB extends LightningElement {
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexRequestDB extends NavigationMixin(LightningElement) {
    @api recordId;
    stageName;
    sapSendOK;
@@ -21,6 +22,7 @@
    systemProfileId;
    s1ProfileId;
    s4ProfileId;
    recordTypeId;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
@@ -55,6 +57,7 @@
            this.systemProfileId = result.systemProfileId == undefined ? '' : result.systemProfileId;
            this.s1ProfileId = result.s1ProfileId == undefined ? '' : result.s1ProfileId;
            this.s4ProfileId = result.s4ProfileId == undefined ? '' : result.s4ProfileId;
            this.recordTypeId = result.recordTypeId == undefined ? '' : result.recordTypeId;
            this.requestDB();
        })
    }
@@ -77,27 +80,46 @@
            this.showToast("询价已经有取消/失单报告了!","error");
        }
        else {
        location.href = '/a2C/e?retURL=%2F' +
            encodeURI(this.recordId) +
            '&RecordType=01210000000RNXi' +
            '&CF00N10000006QdJz=' +
            encodeURI(this.agency1) +
            '&CF00N10000006QdJz_lkid=' +
            encodeURI(this.agency1Id) +
            '&CF00N10000006QdKn=' +
            encodeURI(this.name) +
            '&CF00N10000006QdKn_lkid=' +
            encodeURI(this.recordId) +
            '&00N10000006QdK4=' +
            encodeURI(this.name) +
            '&00N10000006QdYB=' +
            encodeURI(this.bidPlannedDate) +
            '&CF00N10000006QdZT=' +
            encodeURI(this.salesAssistantName) +
            '&CF00N10000006QdZT_lkid=' +
            encodeURI(this.salesAssistantID) +
            '';
        };
        // location.href = '/a2C/e?retURL=%2F' +
        //     encodeURI(this.recordId) +
        //     '&RecordType=01210000000RNXi' +
        //     '&CF00N10000006QdJz=' +
        //     encodeURI(this.agency1) +
        //     '&CF00N10000006QdJz_lkid=' +
        //     encodeURI(this.agency1Id) +
        //     '&CF00N10000006QdKn=' +
        //     encodeURI(this.name) +
        //     '&CF00N10000006QdKn_lkid=' +
        //     encodeURI(this.recordId) +
        //     '&00N10000006QdK4=' +
        //     encodeURI(this.name) +
        //     '&00N10000006QdYB=' +
        //     encodeURI(this.bidPlannedDate) +
        //     '&CF00N10000006QdZT=' +
        //     encodeURI(this.salesAssistantName) +
        //     '&CF00N10000006QdZT_lkid=' +
        //     encodeURI(this.salesAssistantID) +
        //     '';
            const defaultValues = encodeDefaultFieldValues({
                Bid_distributor__c: this.agency1Id,
                Prospect_name__c: this.recordId,
                Product_discription__c: this.name,
                Tedner_date__c: this.bidPlannedDate,
                Request_target__c: this.salesAssistantID
            });
            this[NavigationMixin.Navigate]({
                type: 'standard__objectPage',
                attributes: {
                    objectApiName: 'Request_tedner_doc__c',
                    actionName: 'new'
                },
                state: {
                    nooverride: '1',
                    defaultFieldValues: defaultValues,
                    RecordTypeId: this.recordTypeId,
                }
            });
        }
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    showToast(msg,type) {
force-app/main/default/pages/AccountCaseTab.page
@@ -1,4 +1,4 @@
<apex:page controller="AccountCaseTabController" showChat="false" showHeader="false" sidebar="false" action="{!init}" id="Page">
<apex:page controller="AccountCaseTabController" showChat="false" showHeader="false" sidebar="false" action="{!init}" id="Page" lightningStylesheets="true">
<title>检查数</title>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
force-app/main/default/pages/CM_SearchDepartment.page
@@ -1,4 +1,4 @@
<apex:page controller="CM_SearchDepartment" action="{!search}" contentType="plain/text">
<apex:page controller="CM_SearchDepartment" action="{!search}" contentType="plain/text" lightningStylesheets="true">
    <apex:outputPanel layout="none" rendered="{!IsOverLimit}">
        <span class="result_name" style="color:red;">检索结果超过了50件</span><span class="result_id" style="display:none"></span><br/>
    </apex:outputPanel>
force-app/main/default/pages/CM_SearchDepartmentService.page
@@ -1,4 +1,4 @@
<apex:page controller="CM_SearchDepartmentServiceController" action="{!search}" contentType="plain/text">
<apex:page controller="CM_SearchDepartmentServiceController" action="{!search}" contentType="plain/text" lightningStylesheets="true">
    <apex:outputPanel layout="none" rendered="{!IsOverLimit}">
        <span class="result_name" style="color:red;">检索结果超过了50件</span><span class="result_id" style="display:none"></span><br/>
    </apex:outputPanel>
force-app/main/default/pages/CM_SearchOpportunity.page
@@ -1,4 +1,4 @@
<apex:page controller="CM_SearchOpportunity" action="{!search}" contentType="plain/text">
<apex:page controller="CM_SearchOpportunity" action="{!search}" contentType="plain/text" lightningStylesheets="true">
    <apex:outputPanel layout="none" rendered="{!IsOverLimit}">
        <span class="result_name" style="color:red;">检索结果超过了30件</span><span class="result_id" style="display:none"></span><br/>
    </apex:outputPanel>
force-app/main/default/pages/CampaignMemberEditAndDelete.page
@@ -1,5 +1,5 @@
<apex:page standardcontroller="CampaignMember__c" extensions="CampaignMemberEditAndDeleteController"   
sidebar="true" showHeader="true" id="allPage" action="{!init}">
sidebar="true" showHeader="true" id="allPage" action="{!init}" lightningStylesheets="true">
<apex:form >
    <div style="font-size: 18px;text-align: center;">
        <apex:outputPanel rendered="{!RecordTypecheck}">
force-app/main/default/pages/MaintenanceDailyReport.page
@@ -1,3 +1,3 @@
<apex:page standardController="Daily_Report__c">
<apex:page standardController="Daily_Report__c" lightningStylesheets="true">
<h1>日报一览正在维护中</h1>
</apex:page>
force-app/main/default/pages/QuoteTrial.page
@@ -1,4 +1,4 @@
<apex:page showHeader="false" sidebar="false" id="quoteTrial" title="报价计算">
<apex:page showHeader="false" sidebar="false" id="quoteTrial" title="报价计算" lightningStylesheets="true">
    <apex:includeLightning />
    <div style="width:100%;height:100%;" id="QuoteTrialApp" />
    <script>
force-app/main/default/pages/Xin_SearchMaintenanceContract.page
@@ -1,4 +1,4 @@
<apex:page controller="Xin_Maintenance_Contract" action="{!search}" contentType="plain/text">
<apex:page controller="Xin_Maintenance_Contract" action="{!search}" contentType="plain/text" lightningStylesheets="true">
    <apex:outputPanel layout="none" rendered="{!IsOverLimit}">
        <span class="result_name" style="color:red;">检索结果超过了30件</span><span class="result_id" style="display:none"></span><br/>
    </apex:outputPanel>
force-app/main/default/pages/Xin_SearchOpportunity.page
@@ -1,4 +1,4 @@
<apex:page controller="Xin_SearchOpportunity" action="{!search}" contentType="plain/text">
<apex:page controller="Xin_SearchOpportunity" action="{!search}" contentType="plain/text" lightningStylesheets="true">
    <apex:outputPanel layout="none" rendered="{!IsOverLimit}">
        <span class="result_name" style="color:red;">检索结果超过了30件</span><span class="result_id" style="display:none"></span><br/>
    </apex:outputPanel>
force-app/main/default/pages/Xin_SearchVisitorPlace_Campaign.page
@@ -1,4 +1,4 @@
<apex:page controller="Xin_SearchVisitorPlace_Campaign" action="{!search}" contentType="plain/text">
<apex:page controller="Xin_SearchVisitorPlace_Campaign" action="{!search}" contentType="plain/text" lightningStylesheets="true">
    <apex:outputPanel layout="none" rendered="{!IsOverLimit}">
        <span class="result_name" style="color:red;">检索结果超过了30件</span><span class="result_id" style="display:none"></span><br/>
    </apex:outputPanel>
force-app/main/default/pages/Xin_SearchVisitorPlace_Sales.page
@@ -1,4 +1,4 @@
<apex:page controller="Xin_SearchVisitorPlace_Sales" action="{!search}" contentType="plain/text">
<apex:page controller="Xin_SearchVisitorPlace_Sales" action="{!search}" contentType="plain/text" lightningStylesheets="true">
    <apex:outputPanel layout="none" rendered="{!IsOverLimit}">
        <span class="result_name" style="color:red;">检索结果超过了50件</span><span class="result_id" style="display:none"></span><br/>
    </apex:outputPanel>