| | |
| | | this.OnLoadSaveProduct.push(item); |
| | | } |
| | | }) |
| | | // var arrss = [...[], ...this.OnLoadSaveProduct];//20230214 |
| | | var arrss = [].concat(this.OnLoadSaveProduct);//20230214 |
| | | var arrss = [...[], ...this.OnLoadSaveProduct]; |
| | | //合并上一次试算的报价行 |
| | | this.addOffer(arrss); |
| | | //处理报价数据改动后试算界面的变化 |
| | |
| | | //合并上一次的报价行 |
| | | lastQuotation = []; |
| | | addOffer(TrialLine) { |
| | | // this.lastQuotation = [...[], ...addOfferLogic(TrialLine)]; //合并上一次的报价行的逻辑//20230214 |
| | | this.lastQuotation = [].concat(addOfferLogic(TrialLine));//20230214 |
| | | this.lastQuotation = [...[], ...addOfferLogic(TrialLine)]; //合并上一次的报价行的逻辑 |
| | | } |
| | | Complate = false; |
| | | //从数据库更新已保存的数据 方案 UpdateBy 2021 06 29 |
| | |
| | | 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; |
| | |
| | | ...jzDataProductParam |
| | | } |
| | | jzDataProductParam = this.countListAndNod(tempObject, result); |
| | | // arrData = [...[], jzDataProductParam];//20230214 |
| | | arrData = [].concat(jzDataProductParam);//20230214 |
| | | arrData = [...[], jzDataProductParam]; |
| | | //返回数据比较规则 |
| | | this.CompareData(result, idStr, jzDataProductParam, TypeName, jzDataDefaultToTemps, arrData, isShow); |
| | | }) |
| | |
| | | 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 => { //促销方案主数据关联产品 |
| | |
| | | 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 => { |
| | |
| | | //更新次数 |
| | | this.updatesNums(); |
| | | //合并重复价格政策方案 |
| | | // var jzarr = [...[], ...this.jzDataFixedPrice];//20230214 |
| | | var jzarr = [].concat(this.jzDataFixedPrice);//20230214 |
| | | var jzarr = [...[], ...this.jzDataFixedPrice]; |
| | | this.MergeDuplicateSchemes(jzarr); |
| | | //保存最大次数 |
| | | this.savecount(idStr); |
| | |
| | | CompareFullDataedit.push(editnum); |
| | | } |
| | | }); |
| | | // this.CompareFullData = [...[], ...CompareFullDataedit];//20230214 |
| | | this.CompareFullData = [].concat(CompareFullDataedit);//20230214 |
| | | this.CompareFullData = [...[], ...CompareFullDataedit]; |
| | | Setmap.set(arrs.Id, object); |
| | | } else { |
| | | object = { |
| | |
| | | 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); |
| | | } |
| | | //保存最大次数 |
| | |
| | | //替换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(); |
| | | } |
| | |
| | | newArrsTemp6.push(itsss); |
| | | } |
| | | }); |
| | | // newArrsTemp5 = [...[], ...newArrsTemp6];//20230214 |
| | | newArrsTemp5 = [].concat(newArrsTemp6);//20230214 |
| | | newArrsTemp5 = [...[], ...newArrsTemp6]; |
| | | this.jzDataDefault = newArrsTemp5; |
| | | } |
| | | this.jzDataProduct = arrProductTemp; |
| | |
| | | newArrsTemp6.push(itsss); |
| | | } |
| | | }); |
| | | // newArrsTemp5 = [...[], ...newArrsTemp6];//20230214 |
| | | newArrsTemp5 = [].concat(newArrsTemp6);//20230214 |
| | | newArrsTemp5 = [...[], ...newArrsTemp6]; |
| | | this.jzDataDefault = newArrsTemp5; |
| | | } |
| | | this.jzDataProduct = arrProductTemp; |
| | |
| | | } |
| | | } |
| | | }); |
| | | // this.jzDataFixedPrice = [...[], ...arrTemp];//20230214 |
| | | this.jzDataFixedPrice = [].concat(arrTemp);//20230214 |
| | | this.jzDataFixedPrice = [...[], ...arrTemp]; |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | }); |
| | | 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); |
| | |
| | | //计算一般折扣非对象品折扣 |
| | | 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 |
| | |
| | | //删除价格计算 |
| | | 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); |
| | |
| | | japdt.AgencyUnitPrice__c = Math.round(japdt.AgencyUnitPrice__c * 100) / 100; |
| | | } |
| | | }); |
| | | // this.jzDataProduct = [...[], ...jzProductarry];//20230214 |
| | | this.jzDataProduct = [].concat(jzProductarry);//20230214 |
| | | this.jzDataProduct = [...[], ...jzProductarry]; |
| | | //合同价格汇总 |
| | | this.ContractPriceCompute(); |
| | | } |
| | |
| | | //修改 产品明细 |
| | | 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!!"); |
| | |
| | | } |
| | | 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; |
| | |
| | | } |
| | | // =======更新促销方案次数数据 |
| | | 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; |
| | |
| | | // ====================== 判断是否为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; |
| | |
| | | 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) { |
| | |
| | | } |
| | | } 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") { |
| | |
| | | } |
| | | }); |
| | | if (flg) { |
| | | // this.jzDataProduct = [...[], ...jzdatas];//20230214 |
| | | this.jzDataProduct = [].concat(jzdatas);//20230214 |
| | | this.jzDataProduct = [...[], ...jzdatas]; |
| | | if (TypeName == "价格政策") { |
| | | //删除价格计算 |
| | | this.delectComputeData(item); |
| | |
| | | } |
| | | }); |
| | | } |
| | | // this.jzDataDefault = [...[], ...arr];//20230214 |
| | | this.jzDataDefault = [].concat(arr);//20230214 |
| | | this.jzDataDefault = [...[], ...arr]; |
| | | } |
| | | } |
| | | // ==================通知显示 ====================== |
| | |
| | | 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; |
| | | }) |
| | |
| | | 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 = []; |
| | |
| | | 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 = []; |
| | |
| | | } |
| | | } |
| | | 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]; |
| | | } |
| | | } |
| | | } |
| | |
| | | CompareFullDataedit.push(editnum); |
| | | } |
| | | }); |
| | | // this.CompareFullData = [...[], ...CompareFullDataedit];//20230214 |
| | | this.CompareFullData = [].concat(CompareFullDataedit);//20230214 |
| | | this.CompareFullData = [...[], ...CompareFullDataedit]; |
| | | // } |
| | | } |
| | | } else { |
| | |
| | | } |
| | | } |
| | | //haha |
| | | // var newArrs = [...[], ...editnewDate];//20230214 |
| | | var newArrs = [].concat(editnewDate);//20230214 |
| | | var newArrs = [...[], ...editnewDate]; |
| | | if (boolean == 1) { |
| | | this.jzDataFixedPrice = newData; |
| | | newArrs.forEach(item => { |
| | |
| | | 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) { |
| | |
| | | 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]; |
| | | }; |
| | | } |
| | | //价格政策选中 |
| | |
| | | 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, "价格政策"); |
| | |
| | | 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--; |
| | |
| | | newarrjdf.push(jdf); |
| | | } |
| | | }); |
| | | // this.jzDataFixedPrice = [...[], ...newarrjdf];//20230214 |
| | | this.jzDataFixedPrice = [].concat(newarrjdf);//20230214 |
| | | this.jzDataFixedPrice = [...[], ...newarrjdf]; |
| | | if (event.fag && iflag) { |
| | | var newArr = []; |
| | | newArr.push(item); |
| | |
| | | } |
| | | }) |
| | | }) |
| | | // this.jzDataFix = [...[], ...respons];//20230214 |
| | | this.jzDataFix = [].concat(respons);//20230214 |
| | | this.jzDataFix = [...[], ...respons]; |
| | | this.tableIsLodingFix = false; |
| | | }) |
| | | } |
| | |
| | | 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]; |
| | | } |
| | | } |
| | | //折扣政策选中 |
| | |
| | | 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); |
| | |
| | | } 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 => { |
| | | //根据合同价格计算一般折扣 |
| | |
| | | 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); |
| | | }); |
| | |
| | | } |
| | | //合并折扣政策重复方案 |
| | | 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 |
| | |
| | | arr.push(jzdsc); |
| | | } |
| | | }); |
| | | // this.jzDataSpecial = [...[], ...arr];//20230214 |
| | | this.jzDataSpecial = [].concat(arr);//20230214 |
| | | this.jzDataSpecial = [...[], ...arr]; |
| | | } |
| | | }); |
| | | }) |
| | |
| | | } |
| | | } |
| | | //haha4 |
| | | // var newArrs = [...[], ...editnewDate];//20230214 |
| | | var newArrs = [].concat(editnewDate);//20230214 |
| | | var newArrs = [...[], ...editnewDate]; |
| | | newArrs.forEach(item => { |
| | | if (item.Quantity < item.SplitQuantity) { |
| | | boolean = 2; |
| | |
| | | this.ShowCommonly = true |
| | | } |
| | | //保存使用数量 |
| | | @track |
| | | IsLoading4 = false; |
| | | jzshows4 = true; |
| | | IsLoadingFlag = true; |
| | |
| | | } |
| | | } |
| | | //haha3 |
| | | // var newArrs = [...[], ...editnewDate];//20230214 |
| | | var newArrs = [].concat(editnewDate);//20230214 |
| | | var newArrs = [...[], ...editnewDate]; |
| | | newArrs.forEach(item => { |
| | | if (item.Quantity < item.SplitQuantity) { |
| | | boolean = 2; |
| | |
| | | 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); |
| | |
| | | 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++; |
| | |
| | | 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 |
| | | } |