buli
2023-04-21 43fdbff49764d55c7b3a19a1d6e7d8aeb62072ef
force-app/main/default/lwc/quoteTrial/quoteTrial.js
@@ -203,8 +203,7 @@
                    this.OnLoadSaveProduct.push(item);
                }
            })
            // var arrss = [...[], ...this.OnLoadSaveProduct];//20230214
            var arrss = [].concat(this.OnLoadSaveProduct);//20230214
            var arrss = [...[], ...this.OnLoadSaveProduct];
            //合并上一次试算的报价行
            this.addOffer(arrss);
            //处理报价数据改动后试算界面的变化
@@ -264,8 +263,7 @@
    //合并上一次的报价行
    lastQuotation = [];
    addOffer(TrialLine) {
        // this.lastQuotation = [...[], ...addOfferLogic(TrialLine)]; //合并上一次的报价行的逻辑//20230214
        this.lastQuotation = [].concat(addOfferLogic(TrialLine));//20230214
        this.lastQuotation = [...[], ...addOfferLogic(TrialLine)]; //合并上一次的报价行的逻辑
    }
    Complate = false;
    //从数据库更新已保存的数据 方案  UpdateBy 2021 06 29
@@ -391,11 +389,7 @@
        var newDicountData = [];
        newDicountData=SpecialSavesChangePartLogic(jzDataDefaultList,SaveName, SelectedData, IdStr, CompareId,DefalutQuantity,newDicountData,jzDataDiscountList);
        this.jzDataDefault = NewDefaultDatass;
        // this.jzDataProduct = [...this.jzDataProduct, ...AddProductDatass]; //产品明细//20230213
        this.jzDataProduct =this.jzDataProduct.concat(AddProductDatass);//20230213
        console.warn('newDicountData'+ newDicountData[0].Id);
        console.warn('AddProductDatass'+AddProductDatass[0]);
        console.warn('this.jzDataProduct'+this.jzDataProduct[0]);
        this.jzDataProduct = [...this.jzDataProduct, ...AddProductDatass]; //产品明细
        //合同价格汇总
        this.ContractPriceCompute();
        this.jzDataDiscount = newDicountData;
@@ -413,8 +407,7 @@
                ...jzDataProductParam
            }
            jzDataProductParam = this.countListAndNod(tempObject, result);
            // arrData = [...[], jzDataProductParam];//20230214
            arrData = [].concat(jzDataProductParam);//20230214
            arrData = [...[], jzDataProductParam];
            //返回数据比较规则
            this.CompareData(result, idStr, jzDataProductParam, TypeName, jzDataDefaultToTemps, arrData, isShow);
        })
@@ -439,8 +432,7 @@
    CompareData(list, idStr, jzDataProductParam, TypeName, jzDataDefaultToTemps, arrData, isShow) {
        var isChange = false;
        var TempsJzData = []
        // TempsJzData = [...[], ...this.jzDataDefault]; //待选产品//20230214
        TempsJzData = [].concat(this.jzDataDefault);//20230214
        TempsJzData = [...[], ...this.jzDataDefault]; //待选产品
        var TempsJzDataToCompare = []
        TempsJzData.forEach(item => {
            list.forEach(element => { //促销方案主数据关联产品
@@ -483,8 +475,7 @@
            newObj.element = newElement;
            newTempsJzDataToCompare.push(newObj);
        })
        // TempsJzDataToCompare = [...[], ...newTempsJzDataToCompare];//20230214
        TempsJzDataToCompare = [].concat(newTempsJzDataToCompare);//20230214
        TempsJzDataToCompare = [...[], ...newTempsJzDataToCompare];
        //End
        if (TempsJzDataToCompare.length == list.length&&list.length!=0) {
            TempsJzDataToCompare.forEach(TempsItems => {
@@ -516,8 +507,7 @@
        //更新次数
        this.updatesNums();
        //合并重复价格政策方案
        // var jzarr = [...[], ...this.jzDataFixedPrice];//20230214
        var jzarr = [].concat(this.jzDataFixedPrice);//20230214
        var jzarr = [...[], ...this.jzDataFixedPrice];
        this.MergeDuplicateSchemes(jzarr);
        //保存最大次数
        this.savecount(idStr);
@@ -548,8 +538,7 @@
                        CompareFullDataedit.push(editnum);
                    }
                });
                // this.CompareFullData = [...[], ...CompareFullDataedit];//20230214
                this.CompareFullData = [].concat(CompareFullDataedit);//20230214
                this.CompareFullData = [...[], ...CompareFullDataedit];
                Setmap.set(arrs.Id, object);
            } else {
                object = {
@@ -562,14 +551,12 @@
        for (let [k, v] of Setmap) {
            arr.push(v);
        }
        // this.jzDataFixedPrice = [...[], ...arr]//20230214
        this.jzDataFixedPrice = [].concat(arr);//20230214
        this.jzDataFixedPrice = [...[], ...arr]
        this.ConsolidationProgramProducts(arr);
    }
    //归并相同价格政策方案的产品
    ConsolidationProgramProducts(arrSchemes) {
        // var jzdataList = [...[], ...this.jzDataProduct];//20230214
        var jzdataList = [].concat(this.jzDataProduct);//20230214
        var jzdataList = [...[], ...this.jzDataProduct];
        this.jzDataProduct = PriceConsolidation(arrSchemes, jzdataList);
    }
    //保存最大次数
@@ -588,10 +575,8 @@
    //替换listprice单价
    ReplacementUnitPrice() {
        var ifTrade = this.QuoteData[0].Opportunity.Trade__c; //内外贸
        // var arr = [...[], ...this.jzDataProduct];//20230214
        var arr = [].concat(this.jzDataProduct);//20230214
        // this.jzDataProduct = [...[], ...ReplacementUnitPriceLogic(arr, ifTrade)]; //替换listprice单价逻辑//20230214
        this.jzDataProduct = [].concat(ReplacementUnitPriceLogic(arr, ifTrade));//20230214
        var arr = [...[], ...this.jzDataProduct];
        this.jzDataProduct = [...[], ...ReplacementUnitPriceLogic(arr, ifTrade)]; //替换listprice单价逻辑
        //合同价格汇总
        this.ContractPriceCompute();
    }
@@ -678,8 +663,7 @@
                                    newArrsTemp6.push(itsss);
                                }
                            });
                            // newArrsTemp5 = [...[], ...newArrsTemp6];//20230214
                            newArrsTemp5 = [].concat(newArrsTemp6);//20230214
                            newArrsTemp5 = [...[], ...newArrsTemp6];
                            this.jzDataDefault = newArrsTemp5;
                        }
                        this.jzDataProduct = arrProductTemp;
@@ -747,8 +731,7 @@
                                    newArrsTemp6.push(itsss);
                                }
                            });
                            // newArrsTemp5 = [...[], ...newArrsTemp6];//20230214
                            newArrsTemp5 = [].concat(newArrsTemp6);//20230214
                            newArrsTemp5 = [...[], ...newArrsTemp6];
                            this.jzDataDefault = newArrsTemp5;
                        }
                        this.jzDataProduct = arrProductTemp;
@@ -757,8 +740,7 @@
                    }
                }
            });
            // this.jzDataFixedPrice = [...[], ...arrTemp];//20230214
            this.jzDataFixedPrice = [].concat(arrTemp);//20230214
            this.jzDataFixedPrice = [...[], ...arrTemp];
        }
    }
@@ -839,14 +821,11 @@
                }
            }
        });
        this.jzDataDiscount = [...[], ...arrTemp1];//20230214
        // this.jzDataDiscount = [].concat(arrTemp1);//20230214
        console.warn('this.jzDataDiscountceshi1234567890'+this.jzDataDiscount);
        this.jzDataDiscount = [...[], ...arrTemp1];
    }
    //一般折扣更改过合同价格计算
    updateCommonlyDiscountLogic(Id,JxsType,GuaranteeDiscount__c_Input,NormalDiscount__c_Input,Category__c,jzDataDiscount) {
        //todu13
        console.warn('jzDataDiscount'+jzDataDiscount);
        this.updateIdStr("1");
        var arrProductTemp = this.jzDataProduct; // PromotionId   产品明细
        this.jzDataProduct=updateCDLogic(Id,JxsType,GuaranteeDiscount__c_Input,NormalDiscount__c_Input,Category__c,jzDataDiscount,arrProductTemp);
@@ -855,23 +834,14 @@
    //计算一般折扣非对象品折扣
    ComouteProductDiscount(Id,Category__c,GuaranteeDiscount__c_Input, NormalDiscount__c_Input,GuaranteeDiscount_H_Money__c, NormalDiscount_H_Money__c, item) {
        //todu12
        console.warn('this.jzDataDiscountxxx1'+this.jzDataDiscount);
        this.updateIdStr("2");
        var arrTemp1 = this.jzDataDiscount; //折扣政策
        console.warn('this.jzDataDiscountxxx2'+this.jzDataDiscount);
        this.updateIdStr("1");
        var arrProductTemp = this.jzDataProduct; // PromotionId   产品明细
    
        var reslut=ReverseCalculationModifyDiscountLogic(arrTemp1,arrProductTemp,Id,Category__c,GuaranteeDiscount__c_Input, NormalDiscount__c_Input,GuaranteeDiscount_H_Money__c, NormalDiscount_H_Money__c, item);
        // var ceshi = arrTempsss;//20230214
        // this.jzDataDiscount=[...[], ...ceshi];//20230214
        this.jzDataDiscount=[...[], ...arrTempsss];//20230214
        // this.jzDataDiscount=[].concat(arrTempsss);//20230214
        // console.warn('ceshi'+ceshi);
        console.warn('this.jzDataDiscountxxx3+++'+this.jzDataDiscount);
        var ceshi2 = arrProductTempsss;
        this.jzDataProduct =[...[], ...ceshi2];//20230214
        // this.jzDataProduct=[].concat(arrProductTempsss);//20230214
        this.jzDataDiscount=[...[], ...arrTempsss];
        this.jzDataProduct =[...[], ...arrProductTempsss];
        return reslut;
    }
    //todu
@@ -888,10 +858,7 @@
    //删除价格计算
    delectComputeData(item) { //item 产品明细的一条数据
        var sum = this.ComputeListPrice(item.PromotionId);
        // var jzProductarry = [...[], ...this.jzDataProduct];//20230214
        var jzProductarry = [].concat(this.jzDataProduct);//20230214
        console.warn('ceshiasdfasdfsdfasdjzProductarry'+arrss);
            console.warn('sfgssgfgthis.jzDataProduct'+this.jzDataProduct);
        var jzProductarry = [...[], ...this.jzDataProduct];
        jzProductarry.forEach(japdt => { //japdt产品明细
            if (item.PromotionId == japdt.PromotionId) {
                japdt.AgencySubtotal__c = japdt.AgencySubtotal__c + item.AgencySubtotal__c * (japdt.ListPrice * japdt.Quantity / sum);
@@ -900,8 +867,7 @@
                japdt.AgencyUnitPrice__c = Math.round(japdt.AgencyUnitPrice__c * 100) / 100;
            }
        });
        // this.jzDataProduct = [...[], ...jzProductarry];//20230214
        this.jzDataProduct = [].concat(jzProductarry);//20230214
        this.jzDataProduct = [...[], ...jzProductarry];
        //合同价格汇总
        this.ContractPriceCompute();
    }
@@ -910,8 +876,7 @@
        //修改 产品明细
        let num = parseInt(length / Quantity);
        let addArr = [];
        // var newss = [...[], ...this.jzDataDefault];//20230214
        var newss = [].concat(this.jzDataDefault);//20230214
        var newss = [...[], ...this.jzDataDefault];
        var newDataDefault = newss.map(item => {
            if (item == undefined) {
                console.warn("undefined!!");
@@ -931,8 +896,7 @@
            }
            return item;
        })
        // this.jzDataProduct = [...this.jzDataProduct, ...addArr];//20230213
        this.jzDataProduct = this.jzDataProduct.concat(addArr);//20230213
        this.jzDataProduct = [...this.jzDataProduct, ...addArr];
        //合同价格汇总
        this.ContractPriceCompute();
        this.jzDataDefault = newDataDefault;
@@ -969,10 +933,8 @@
    }
    // =======更新促销方案次数数据
    updatesNums() {
        // var jzDataFixedPriceTemp = [...[], ...this.jzDataFixedPrice];//20230214
        var jzDataFixedPriceTemp = [].concat(this.jzDataFixedPrice);//20230214
        // var jzDataDiscountTemp = [...[], ...this.jzDataDiscount];//20230214
        var jzDataDiscountTemp = [].concat(this.jzDataDiscount);//20230214
        var jzDataFixedPriceTemp = [...[], ...this.jzDataFixedPrice];
        var jzDataDiscountTemp = [...[], ...this.jzDataDiscount];
        var CompareFullData = this.CompareFullData;
        updatesNumsLogic(jzDataFixedPriceTemp,jzDataDiscountTemp,CompareFullData);
        this.jzDataFixedPrice = jzDataFixedPriceTemps;
@@ -981,8 +943,7 @@
    // ====================== 判断是否为0 
    ChangeNumZeroTrueData = []
    ChangeNumZeroTrue() {
        // this.ChangeNumZeroTrueData = [...[], ...this.jzDataDefault];//20230214
        this.ChangeNumZeroTrueData = [].concat(this.jzDataDefault);//20230214
        this.ChangeNumZeroTrueData = [...[], ...this.jzDataDefault];
        var newJzDataDefault = this.ChangeNumZeroTrueData.filter(item => {
            if (item.Quantity > 0) {
                return true;
@@ -1108,8 +1069,7 @@
            var falg = true;
            if (item.TypeName == "价格政策") {
                this.DeleteIsChangelogic(item, item.TypeName, num, list);
                // var arrTemp = [...[], ...this.jzDataFixedPrice]; //价格政策//20230214
                var arrTemp = [].concat(this.jzDataFixedPrice);//20230214
                var arrTemp = [...[], ...this.jzDataFixedPrice]; //价格政策
                var TempItem = {};
                arrTemp.forEach(atItem => {
                    if (atItem.Id == item.PromotionId) {
@@ -1128,8 +1088,7 @@
                }
            } else if (item.TypeName == "折扣政策") {
                this.DeleteIsChangelogic(item, item.TypeName, num, list);
                // var arrTempTOName = [...[], ...this.jzDataDiscount]; //折扣政策//20230214
                var arrTempTOName = [].concat(this.jzDataDiscount);//20230214
                var arrTempTOName = [...[], ...this.jzDataDiscount]; //折扣政策
                var TempItemTOName = {};
                var PromotionHeadRecordId = item.recordTypeName__c;
                if (PromotionHeadRecordId == "Authorizer") {
@@ -1214,8 +1173,7 @@
            }
        });
        if (flg) {
            // this.jzDataProduct = [...[], ...jzdatas];//20230214
            this.jzDataProduct = [].concat(jzdatas);//20230214
            this.jzDataProduct = [...[], ...jzdatas];
            if (TypeName == "价格政策") {
                //删除价格计算
                this.delectComputeData(item);
@@ -1239,8 +1197,7 @@
                    }
                });
            }
            // this.jzDataDefault = [...[], ...arr];//20230214
            this.jzDataDefault = [].concat(arr);//20230214
            this.jzDataDefault = [...[], ...arr];
        }
    }
    // ==================通知显示 ======================
@@ -1366,12 +1323,10 @@
                            newarrjdf.push(jdf);
                        }
                    });
                    // this.jzDataFixedPrice = [...[], ...newarrjdf];//20230214
                    this.jzDataFixedPrice = [].concat(newarrjdf);//20230214
                    this.jzDataFixedPrice = [...[], ...newarrjdf];
                });
            });
            // this.jzData = [...[], ...responseObj.records];//20230214
            this.jzData = [].concat(responseObj.records);//20230214
            this.jzData = [...[], ...responseObj.records];
            // this.index=this.jzData.length;
            this.tableIsLoding = false;
        })
@@ -1437,17 +1392,14 @@
        if (this.index == 0) {
            if (this.flagall) {
               if (this.jzDataDefaultCopy.length < this.lastQuotation.length) { //1、条数小于
                    // this.jzDataDefault = [...[], ...this.jzDataDefaultCopy];//20230214
                    this.jzDataDefault = [].concat(this.jzDataDefaultCopy);//20230214
                    this.jzDataDefault = [...[], ...this.jzDataDefaultCopy];
                    this.jzDataProduct = [];
                    this.jzDataFixedPrice = [];
                    this.jzDataDiscount = [];
                    return;
                } else { //2、
                    // var lastQuotation = [...[], ...this.lastQuotation];//20230214
                    var lastQuotation = [].concat(this.lastQuotation);//20230214
                    // var DefaultCopy = [...[], ...this.jzDataDefaultCopy];//20230214
                    var DefaultCopy = [].concat(this.jzDataDefaultCopy);//20230214
                    var lastQuotation = [...[], ...this.lastQuotation];
                    var DefaultCopy = [...[], ...this.jzDataDefaultCopy];
                    var Default = [];
                    for (var j = 0; j < DefaultCopy.length; j++) {
                        var arrList = [];
@@ -1456,8 +1408,7 @@
                            for (var i = 0; i < lastQuotation.length; i++) {
                                if (DefaultCopy[j].Id == lastQuotation[i].Id) {
                                    if (DefaultCopy[j].Quantity < lastQuotation[i].Quantity) { //2-1-1 数量小于 clear
                                        // this.jzDataDefault = [...[], ...this.jzDataDefaultCopy];//20230214
                                        this.jzDataDefault = [].concat(this.jzDataDefaultCopy);//20230214
                                        this.jzDataDefault = [...[], ...this.jzDataDefaultCopy];
                                        this.jzDataProduct = [];
                                        this.jzDataFixedPrice = [];
                                        this.jzDataDiscount = [];
@@ -1483,15 +1434,13 @@
                        }
                    }
                    if (lastQuotation.length != 0) { //2-2  合成数据有剩余
                        // this.jzDataDefault = [...[], ...this.jzDataDefaultCopy];//20230214
                        this.jzDataDefault = [].concat(this.jzDataDefaultCopy);//20230214
                        this.jzDataDefault = [...[], ...this.jzDataDefaultCopy];
                        this.jzDataProduct = [];
                        this.jzDataFixedPrice = [];
                        this.jzDataDiscount = [];
                        return;
                    }
                    // this.jzDataDefault = [...[], ...Default];//20230214
                    this.jzDataDefault = [].concat(Default);//20230214
                    this.jzDataDefault = [...[], ...Default];
                }
            }
        }
@@ -1677,8 +1626,7 @@
                                    CompareFullDataedit.push(editnum);
                                }
                            });
                            // this.CompareFullData = [...[], ...CompareFullDataedit];//20230214
                            this.CompareFullData = [].concat(CompareFullDataedit);//20230214
                            this.CompareFullData = [...[], ...CompareFullDataedit];
                            // }
                        }
                    } else {
@@ -1712,8 +1660,7 @@
            }
        }
        //haha
        // var newArrs = [...[], ...editnewDate];//20230214
        var newArrs = [].concat(editnewDate);//20230214
        var newArrs = [...[], ...editnewDate];
        if (boolean == 1) {
            this.jzDataFixedPrice = newData;
            newArrs.forEach(item => {
@@ -1723,8 +1670,7 @@
                    this.CloseAlert();
                }, 2000);
            });
            // this.jzDataProduct = [...this.newArrsTemp3, ...this.newArrsTemp4];//20230213
            this.jzDataProduct = this.newArrsTemp3.concat(this.newArrsTemp4);//20230213
            this.jzDataProduct = [...this.newArrsTemp3, ...this.newArrsTemp4];
            //合同价格汇总
            this.ContractPriceCompute();
        } else if (boolean == 3) {
@@ -1754,8 +1700,7 @@
        if (this.jzDataFixedPrice == null || this.jzDataFixedPrice.length <= 0) {
            this.jzDataFixedPrice = arrs;
        } else {
            // this.jzDataFixedPrice = [...this.jzDataFixedPrice, ...arrs];//20230213
            this.jzDataFixedPrice = this.jzDataFixedPrice.concat(arrs);//20230213
            this.jzDataFixedPrice = [...this.jzDataFixedPrice, ...arrs];
        };
    }
    //价格政策选中
@@ -1792,12 +1737,10 @@
                        compareFu.push(deletId);
                    }
                });
                // this.CompareFullData = [...[], ...compareFu];//20230214
                this.CompareFullData = [].concat(compareFu);//20230214
                this.CompareFullData = [...[], ...compareFu];
            }
        }
        // this.SelectedFnDataFixedPrice = [...[], ...select];//20230214
        this.SelectedFnDataFixedPrice = [].concat(select);//20230214
        this.SelectedFnDataFixedPrice = [...[], ...select];
        if (fag) {
            //删除所选方案匹配的产品
            this.DeleteChangesFn(ids, "价格政策");
@@ -1821,8 +1764,7 @@
                        compareFu.push(deletId);
                    }
                });
                // this.CompareFullData = [...[], ...compareFu];//20230214
                this.CompareFullData = [].concat(compareFu);//20230214
                this.CompareFullData = [...[], ...compareFu];
                if (this.SelectedFnDataFixedPrice[j].Id == this.jzDataFixedPrice[i].Id) {
                    this.jzDataFixedPrice.splice(i, 1); // 将使后面的元素依次前移,数组长度减1
                    i--;
@@ -1935,8 +1877,7 @@
                            newarrjdf.push(jdf);
                        }
                    });
                    // this.jzDataFixedPrice = [...[], ...newarrjdf];//20230214
                    this.jzDataFixedPrice = [].concat(newarrjdf);//20230214
                    this.jzDataFixedPrice = [...[], ...newarrjdf];
                    if (event.fag && iflag) {
                        var newArr = [];
                        newArr.push(item);
@@ -1953,8 +1894,7 @@
                    }
                })
            })
            // this.jzDataFix = [...[], ...respons];//20230214
            this.jzDataFix = [].concat(respons);//20230214
            this.jzDataFix = [...[], ...respons];
            this.tableIsLodingFix = false;
        })
    }
@@ -1991,8 +1931,7 @@
        if (this.jzDataDiscount == null || this.jzDataDiscount.length <= 0) {
            this.jzDataDiscount = arrs;
        } else {
            // this.jzDataDiscount = [...this.jzDataDiscount, ...arrs];//20230213
            this.jzDataDiscount = this.jzDataDiscount.concat(arrs);//20230213
            this.jzDataDiscount = [...this.jzDataDiscount, ...arrs];
        }
    }
    //折扣政策选中
@@ -2329,16 +2268,14 @@
        debugger
        if (boolean == 0) {
            this.jzDataDiscount = newData;
            // var newArrs = [...[], ...editnewDate];//20230214
            var newArrs = [].concat(editnewDate);//20230214
            var newArrs = [...[], ...editnewDate];
            newArrs.forEach(item => {
                // this.ComputeData(item.Id, '折扣政策');
                //合并折扣政策重复方案
                this.ConsolidatedDiscountPolicy(this.jzDataDiscount);
                this.ComputeDiscount(item.Id, item.NormalDiscount__c_Input, item.GuaranteeDiscount__c_Input, item.Category__c, item.JxsType);
            });
            // this.jzDataProduct = [...this.newArrsTemp2, ...this.newArrsTemp];//20230213
            this.jzDataProduct = this.newArrsTemp2.concat(this.newArrsTemp);//20230213
            this.jzDataProduct = [...this.newArrsTemp2, ...this.newArrsTemp];
            //合同价格汇总
            this.ContractPriceCompute();
            this.Alert("数据修改成功", false, true);
@@ -2356,8 +2293,6 @@
        } else if (boolean == 4) {
            this.jzDataDiscount = newData;
            var ffgg=0;
            console.warn('newData'+newData);
            console.warn('this.jzDataDiscount'+this.jzDataDiscount);
            if(boolean3){
                newData2.forEach(HeTo => {
                    //根据合同价格计算一般折扣
@@ -2366,13 +2301,8 @@
                        ffgg=HeTo;
                        return ;
                    }
                    console.warn('HeTo'+HeTo);
                    //合并折扣政策重复方案
                    // let jzDataDiscountx = [...[], ...this.jzDataDiscount];//20230214
                    let jzDataDiscountx = [].concat(this.jzDataDiscount);//20230214
                    console.warn('jzDataDiscountx'+jzDataDiscountx);
                    console.warn('this.jzDataDiscountxxx'+this.jzDataDiscount);
                    this.ConsolidatedDiscountPolicy(jzDataDiscountx);
                    this.ConsolidatedDiscountPolicy(this.jzDataDiscount);
                    //一般折扣更改过合同价格计算
                    this.updateCommonlyDiscountLogic(HeTo.Id,HeTo.JxsType,HeTo.GuaranteeDiscount__c_Input,HeTo.NormalDiscount__c_Input,HeTo.Category__c,this.jzDataDiscount);
                });
@@ -2484,21 +2414,15 @@
    }
    //合并折扣政策重复方案
    ConsolidatedDiscountPolicy(SchemeSet) {
        console.warn('SchemeSet'+SchemeSet);
        var arr = [];
        arr = ConsolidatedDiscountPolicyLogic(SchemeSet, arr); //合并折扣政策重复方案逻辑
        console.warn('arr'+arr);
        // this.jzDataDiscount = [...[], ...arr];//20230214
        this.jzDataDiscount = [].concat(arr);//20230214
        console.warn('this.jzDataDiscount2'+this.jzDataDiscount);
        this.jzDataDiscount = [...[], ...arr];
        // this.ConsolidationProgramProducts(arr);
        this.ConsolidatedDiscountDetails(arr); //合并折扣政策产品明细
    }
    //合并折扣政策产品明细
    ConsolidatedDiscountDetails(arrSchemes) {
        // var jzdataList = [...[], ...this.jzDataProduct];//20230214
        var jzdataList = [].concat(this.jzDataProduct);//20230214
        console.warn('jzdataList'+jzdataList);
        var jzdataList = [...[], ...this.jzDataProduct];
        this.jzDataProduct = ConsolidatedDiscountDetailsLogic(arrSchemes, jzdataList); //合并折扣政策产品明细逻辑
    }
    @track
@@ -2538,8 +2462,7 @@
                                arr.push(jzdsc);
                            }
                        });
                        // this.jzDataSpecial = [...[], ...arr];//20230214
                        this.jzDataSpecial = [].concat(arr);//20230214
                        this.jzDataSpecial = [...[], ...arr];
                    }
                });
            })
@@ -2608,8 +2531,7 @@
            }
        }
        //haha4
        // var newArrs = [...[], ...editnewDate];//20230214
        var newArrs = [].concat(editnewDate);//20230214
        var newArrs = [...[], ...editnewDate];
        newArrs.forEach(item => {
            if (item.Quantity < item.SplitQuantity) {
                boolean = 2;
@@ -2679,7 +2601,6 @@
        this.ShowCommonly = true
    }
    //保存使用数量
    @track
    IsLoading4 = false;
    jzshows4 = true;
    IsLoadingFlag = true;
@@ -2723,8 +2644,7 @@
            }
        }
        //haha3
        // var newArrs = [...[], ...editnewDate];//20230214
        var newArrs = [].concat(editnewDate);//20230214
        var newArrs = [...[], ...editnewDate];
        newArrs.forEach(item => {
            if (item.Quantity < item.SplitQuantity) {
                boolean = 2;
@@ -2924,8 +2844,7 @@
            itemTemp.typess = "折扣政策";
            newTemp2.push(itemTemp);
        });
        // var data = [...newTemp, ...newTemp2];//20230213
        var data = newTemp.concat(newTemp2);//20230213
        var data = [...newTemp, ...newTemp2];
        var ParamIdStr = this.ParamIdStr;
        var Trade__c = this.QuoteData[0].Opportunity.Trade__c;
        var NewData = ConsolidationScheme(data, ParamIdStr, Trade__c);
@@ -3036,14 +2955,11 @@
        var indexNum = 0;
        var jzdpdc = [];
        if (str == "1") {
            // jzdpdc = [...[], ...this.jzDataProduct]; //促销产品//20230214
            jzdpdc = [].concat(this.jzDataProduct);//20230214
            jzdpdc = [...[], ...this.jzDataProduct]; //促销产品
        } else if (str == "2") {
            // jzdpdc = [...[], ...this.jzDataDiscount]; //折扣政策//20230214
            jzdpdc = [].concat(this.jzDataDiscount);//20230214
            jzdpdc = [...[], ...this.jzDataDiscount]; //折扣政策
        } else if (str == "3") {
            // jzdpdc = [...[], ...this.jzDataFixedPrice]; //价格政策//20230214
            jzdpdc = [].concat(this.jzDataFixedPrice);//20230214
            jzdpdc = [...[], ...this.jzDataFixedPrice]; //价格政策
        }
        jzdpdc.forEach(item => {
            indexNum++;
@@ -3054,14 +2970,11 @@
            newArr.push(temp);
        })
        if (str == "1") {
            // this.jzDataProduct = [...[], ...newArr]; //促销产品//20230214
            this.jzDataProduct = [].concat(newArr);//20230214
            this.jzDataProduct = [...[], ...newArr]; //促销产品
        } else if (str == "2") {
            // this.jzDataDiscount = [...[], ...newArr]; //折扣政策//20230214
            this.jzDataDiscount = [].concat(newArr);//20230214
            this.jzDataDiscount = [...[], ...newArr]; //折扣政策
        } else if (str == "3") {
            // this.jzDataFixedPrice = [...[], ...newArr]; //价格政策//20230214
            this.jzDataFixedPrice = [].concat(newArr);//20230214
            this.jzDataFixedPrice = [...[], ...newArr]; //价格政策
        }
        //TODU
    }