zhengjinyi 4 år sedan
förälder
incheckning
4fb27edd69

+ 1 - 1
components/cm-module/creatOrder/goodsList.vue

@@ -32,7 +32,7 @@
 										:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
 									</text>
 								</view>
-								<view v-else class="floor-tags">{{pros.promotions.name}}</view>	
+								<view v-else-if="pros.promotions.type !=3" class="floor-tags">{{pros.promotions.name}}</view>	
 							</view>
 						</view>	
 					</view>

+ 1 - 1
components/cm-module/creatOrder/sellerGoodsList.vue

@@ -32,7 +32,7 @@
 										:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
 									</text>
 								</view>
-								<view v-else class="floor-tags">{{pros.promotions.name}}</view>	
+								<view v-else-if="pros.promotions.type !=3" class="floor-tags">{{pros.promotions.name}}</view>	
 							</view>
 						</view>	
 					</view>

+ 94 - 99
pages/goods/cart.vue

@@ -184,6 +184,7 @@
 				handlerPros:{},//监听单挑促销商品
 				failureList:[],	//失效商品列表
 				goodsList:[],	//购物车的商品
+				promotionsList:[],//促销列表
 				delGoodsList:'',//要删除的商品
 				setGoodData:'', //确认订单的商品
 				isCheckAll:false,//是否全选
@@ -206,6 +207,7 @@
 				pullFlag: true,
 				pageSize: 10,
 				pageNum: 1,
+				submitIds:[]
 			}
 		},
 		onLoad(){
@@ -264,6 +266,7 @@
 					this.skeletonShow = false
 					let data = response.data
 					this.kindCount = data.kindCount
+					this.promotionsList = data.promotions
 					this.$store.commit('updateAllNum',data.kindCount)
 					if( data.list.length > 0 || data.invalid.length > 0){
 						this.isEmpty =false
@@ -313,6 +316,16 @@
 			},
 			ischeck(item,pro){//为未选中的时候改变为true,反之为true
 				pro.productsChecked = !pro.productsChecked;
+				if(pro.productsChecked) {
+					if(!this.submitIds.includes(pro.productID*1)){
+						this.submitIds.push(pro.productID);
+					}
+				} else {
+					var lent = this.submitIds.indexOf(pro.productID*1);
+					if(lent >=0 ){
+						this.submitIds.splice(lent, 1);
+					}
+				}
 				this.updateProductCheckedAllBtn(item);
 				this.updateCheckAllBtn();
 				
@@ -365,8 +378,15 @@
 				item.cartList.forEach(pros=>{
 					if(item.checked) {
 						pros.productsChecked = true;
+						if(!this.submitIds.includes(pros.productId*1)){
+							this.submitIds.push(pros.productId);
+						}
 					} else {
 						pros.productsChecked = false;
+						var lent = this.submitIds.indexOf(pros.productId*1);
+						if(lent >=0 ){
+							this.submitIds.splice(lent, 1);
+						}
 					}
 				})
 			},
@@ -393,32 +413,30 @@
 				this.updateBothCheckBtn();     
 			},
 			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
-				let prosPrice=0;
-				let touchPrice = 0; 
+				let touchPrice = 0;
 				let reducedPrice = 0;//商铺合计满减价
-				let totalOriginalPrice = 0;//商铺合计原价
-				let productsList=[];
 				this.goodsList.map((item,index)=>{
-					productsList = item.cartList;
 					//计算店铺满减后店铺合计
 					if(item.promotions && item.promotions.mode == 2){
-						productsList.forEach(pros=>{
+						let prosPrice=0;
+						let totalOriginalPrice = 0;//商铺合计原价
+						item.cartList.forEach(pros=>{
 							prosPrice += pros.price*pros.number
-							totalOriginalPrice+= pros.price*pros.number;
-							if(prosPrice >= item.promotions.touchPrice){
-								item.totalPrice = prosPrice - item.promotions.reducedPrice  
-								item.reducedPrice = item.promotions.reducedPrice
-								item.totalOriginalPrice = totalOriginalPrice
-							}else{
-								item.reducedPrice = 0  //统计合计价格
-								item.totalPrice = prosPrice
-							}
+							totalOriginalPrice += pros.originalPrice*pros.number
 						})
+						if(prosPrice >= item.promotions.touchPrice){
+							item.totalPrice = prosPrice - item.promotions.reducedPrice  
+							item.reducedPrice = item.promotions.reducedPrice
+							item.totalOriginalPrice = totalOriginalPrice
+						}else{
+							item.reducedPrice = 0  //统计合计价格
+							item.totalPrice = prosPrice
+						}
 					}else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
 						let _totalPrice = 0;
 						let _reducedPrice = 0;
 						let _totalOriginalPrice =0;
-						productsList.forEach(pros=>{
+						item.cartList.forEach(pros=>{
 							let _price = pros.price*pros.number
 							_totalOriginalPrice += pros.price*pros.number;
 							if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
@@ -428,7 +446,7 @@
 								}
 								_totalPrice +=  _price
 							}else{
-								_reducedPrice = 0
+								_reducedPrice = 0;
 								_totalPrice += pros.price*pros.number;
 							}
 						})
@@ -438,89 +456,66 @@
 					}
 				})
 			},
-			totalPeice(){	//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
-			    this.allPrice = 0
-			    let productsList =[];
-			    //店铺满减
-			    let prosPrice=0;
-			    let totalPrice = 0;
-			    let reducedPrice=0;//促销满减
-			    let totalOriginalPrice=0;//促销原价
-			    //凑单满减.单品满减				
-			    let _totalPrice = 0;
-			    let _promsPrice = 0;
-			    let _reducedPrice = 0;
-			    let _reducedPromsPrice = 0;
-			    let _totalOriginalPrice =0;
-			    // 正常商品
-			    let _totalNonePrice = 0;
-			    let _isFlag = false;
-			    /*
-			    *originalPrice:商品原价
-			    *price:商品现价
-			    *mode:促销商品满减计算 促销方式mode为 2 的单独做计算 当mode == 2时商品promotions字段为促销活动内容,
-			    *touchPrice 为需要满金额 
-			    *reducedPrice 为满减金额
-			    **/ 
-			    this.goodsList.forEach((item,index)=>{
-			    	item.cartList.forEach(pros=>{	
-			    		if(pros.productsChecked){							
-			    			if(item.promotions && item.promotions.mode == 2){
-								this.promotionsList.forEach(proms =>{
-									if (item.promotions.id == proms.id){
-										_isShopFlag = true;
-										prosPrice = pros.price*pros.number
-									}
-								})
-								if(_isShopFlag){
-									if(prosPrice >= item.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-										totalPrice = prosPrice -  item.promotions.reducedPrice  //统计合计价格
-										totalOriginalPrice += pros.originalPrice*pros.productCount //统计原商品价格
-										reducedPrice = item.promotions.reducedPrice	//统计总减金额
-									}else{
-										totalPrice += prosPrice	//未达满减的统计合计价格
-									}
+			totalPeice(){//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
+				let totalPrice = 0;
+				let reducedPrice = 0;
+				let originalPrice = 0;
+				this.goodsList.forEach((item,index)=>{
+					let supplierPrice = 0;
+					let supplierReducedPrice = 0;
+					item.totalprice = 0;
+					item.reducedprice = 0;
+					item.originalprice = 0;
+					item.cartList.forEach(pros=>{	
+						if(pros.productsChecked){								
+							supplierPrice += pros.price*pros.number;
+							// 单品满减
+							if(pros.promotions && pros.promotions.type*1===1 && pros.promotions.mode*1===2){
+								// 单品满减-重新计算供应商总价/满减金额
+								if(pros.price*pros.number >= pros.promotions.touchPrice){
+									supplierPrice -= pros.promotions.reducedPrice;
+									supplierReducedPrice += pros.promotions.reducedPrice;
 								}
-			    			}else if(pros.promotions && pros.promotions.type == 1 && pros.promotions.mode == 2){//以下为计算除店铺满减以外的单品满减
-			    				let _price = 0;
-			    				_price = pros.price*pros.number
-			    				_totalOriginalPrice += pros.originalPrice*pros.number; //统计原商品价格
-			    				if(_price >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-			    					_price = _price - pros.promotions.reducedPrice //商品满减后价格
-			    					_reducedPrice += pros.promotions.reducedPrice //统计总减金额
-			    				}else{
-			    					_reducedPrice = 0  //将满减金额置为0
-			    				}
-			    				_totalPrice +=  _price //统计合计价格
-			    			}else if(pros.promotions && pros.promotions.type == 2 && pros.promotions.mode == 2){//凑单满减计算合计
-			    				let _price = 0;
-			    				this.promotionsList.forEach(proms =>{
-			    					proms.productList.forEach(el =>{
-			    						if (pros.productId == el.productId){
-			    							_isFlag = true;
-			    							_price += pros.price*pros.number
-			    							_totalOriginalPrice += pros.originalPrice*pros.number; //统计原商品价格
-			    						}
-			    					})
-			    					if(_price >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-			    						_reducedPromsPrice = pros.promotions.reducedPrice //统计总减金额
-			    					}else{
-			    						_reducedPromsPrice = 0  //将满减金额置为0
-			    					}
-			    				})	
-			    				_promsPrice += _price//统计合计价格
-			    			}else{
-			    				_totalNonePrice += pros.price*pros.number; //正常商品的价格总计
-			    			}
-			    		}	
-			    	})
-			    })
-			    if(_isFlag){
-			    	_promsPrice = _promsPrice - _reducedPromsPrice 
-			    }
-			    this.totalOriginalPrice = totalOriginalPrice + _totalOriginalPrice;
-			    this.reducedPrice = reducedPrice + _reducedPrice + _reducedPromsPrice;
-			    this.allPrice = totalPrice + _totalPrice + _promsPrice + _totalNonePrice;
+							}
+						}	
+					})
+					// 店铺满减
+					if(item.promotions && item.promotions.mode*1===2){
+						// 店铺满减-计算供应商总价/满减金额
+						if(supplierPrice >= item.promotions.touchPrice){
+							supplierPrice -= item.promotions.reducedPrice;
+							supplierReducedPrice += item.promotions.reducedPrice;
+						}
+					}
+					item.totalprice = supplierPrice;
+					item.reducedprice = supplierReducedPrice;
+					item.originalprice = (supplierPrice+supplierReducedPrice);
+					totalPrice += item.totalprice;
+					reducedPrice += item.reducedprice;
+					originalPrice += item.originalprice;
+				})
+				 //总促销计算
+				this.promotionsList.forEach(promotions =>{
+					// 凑单满减
+					if(promotions.mode*1===2 && promotions.type*1===2){
+						let total = 0;
+						 promotions.productList.forEach(pros=>{
+							if (this.submitIds.includes(pros.productId*1)){
+								total += pros.number * pros.price;
+							}
+						});
+						if(total>=promotions.touchPrice){
+							totalPrice -= promotions.reducedPrice;
+							reducedPrice += promotions.reducedPrice;
+						}
+					}
+				});
+				//最后统计商品原价
+				this.totalOriginalPrice = originalPrice;
+				//最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
+				this.reducedPrice = reducedPrice;
+				//最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减			
+				this.allPrice = totalPrice ;
 			},
 			totalCount(){//计算总数量
 			    this.allCount = 0

+ 83 - 104
pages/tabBar/cart/cart.vue

@@ -195,6 +195,7 @@
 				pullFlag: true,
 				pageSize: 10,
 				pageNum: 1,
+				submitIds:[]
 			}
 		},
 		onLoad(){
@@ -303,6 +304,16 @@
 			},
 			ischeck(item,pro){//为未选中的时候改变为true,反之为true
 				pro.productsChecked = !pro.productsChecked;
+				if(pro.productsChecked) {
+					if(!this.submitIds.includes(pro.productID*1)){
+						this.submitIds.push(pro.productID);
+					}
+				} else {
+					var lent = this.submitIds.indexOf(pro.productID*1);
+					if(lent >=0 ){
+						this.submitIds.splice(lent, 1);
+					}
+				}
 				this.updateProductCheckedAllBtn(item);
 				this.updateCheckAllBtn();
 				
@@ -355,8 +366,15 @@
 				item.cartList.forEach(pros=>{
 					if(item.checked) {
 						pros.productsChecked = true;
+						if(!this.submitIds.includes(pros.productId*1)){
+							this.submitIds.push(pros.productId);
+						}
 					} else {
 						pros.productsChecked = false;
+						var lent = this.submitIds.indexOf(pros.productId*1);
+						if(lent >=0 ){
+							this.submitIds.splice(lent, 1);
+						}
 					}
 				})
 			},
@@ -383,32 +401,30 @@
 				this.updateBothCheckBtn();     
 			},
 			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
-				let prosPrice=0;
-				let touchPrice = 0; 
+				let touchPrice = 0;
 				let reducedPrice = 0;//商铺合计满减价
-				let totalOriginalPrice = 0;//商铺合计原价
-				let productsList=[];
 				this.goodsList.map((item,index)=>{
-					productsList = item.cartList;
 					//计算店铺满减后店铺合计
 					if(item.promotions && item.promotions.mode == 2){
-						productsList.forEach(pros=>{
+						let prosPrice=0;
+						let totalOriginalPrice = 0;//商铺合计原价
+						item.cartList.forEach(pros=>{
 							prosPrice += pros.price*pros.number
-							totalOriginalPrice+= pros.price*pros.number;
-							if(prosPrice >= item.promotions.touchPrice){
-								item.totalPrice = prosPrice - item.promotions.reducedPrice  
-								item.reducedPrice = item.promotions.reducedPrice
-								item.totalOriginalPrice = totalOriginalPrice
-							}else{
-								item.reducedPrice = 0  //统计合计价格
-								item.totalPrice = prosPrice
-							}
+							totalOriginalPrice += pros.originalPrice*pros.number
 						})
+						if(prosPrice >= item.promotions.touchPrice){
+							item.totalPrice = prosPrice - item.promotions.reducedPrice  
+							item.reducedPrice = item.promotions.reducedPrice
+							item.totalOriginalPrice = totalOriginalPrice
+						}else{
+							item.reducedPrice = 0  //统计合计价格
+							item.totalPrice = prosPrice
+						}
 					}else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
 						let _totalPrice = 0;
 						let _reducedPrice = 0;
 						let _totalOriginalPrice =0;
-						productsList.forEach(pros=>{
+						item.cartList.forEach(pros=>{
 							let _price = pros.price*pros.number
 							_totalOriginalPrice += pros.price*pros.number;
 							if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
@@ -429,102 +445,65 @@
 				})
 			},
 			totalPeice(){//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
-				/*
-				*originalPrice:商品原价
-				*price:商品现价
-				*mode:促销商品满减计算 促销方式mode为 2 的单独做计算 当mode == 2时商品promotions字段为促销活动内容,
-				*touchPrice 为需要满金额 
-				*reducedPrice 为满减金额
-				**/ 
-			    this.allPrice = 0
-				let productsList =[];
-				//店铺满减
-				let prosPrice=0;
 				let totalPrice = 0;
-				let reducedPrice=0;//促销满减
-				let totalOriginalPrice=0;//促销原价
-				//凑单满减.单品满减				
-				let _totalPrice = 0;
-				let _promsPrice = 0;
-				let _reducedPrice = 0;
-				let _reducedPromsPrice = 0;
-				let _totalOriginalPrice =0;
-				// 正常商品
-				let _totalNonePrice = 0;
-				let _isFlag = false;
-				let _isShopFlag = false;
-			    this.goodsList.forEach((item,index)=>{
+				let reducedPrice = 0;
+				let originalPrice = 0;
+				this.goodsList.forEach((item,index)=>{
+					let supplierPrice = 0;
+					let supplierReducedPrice = 0;
+					item.totalprice = 0;
+					item.reducedprice = 0;
+					item.originalprice = 0;
 					item.cartList.forEach(pros=>{	
-						if(pros.productsChecked){							
-							if(item.promotions && item.promotions.mode == 2){
-								this.promotionsList.forEach(proms =>{
-									if (item.promotions.id == proms.id){
-										_isShopFlag = true;
-										prosPrice = pros.price*pros.number
-									}
-								})
-								if(_isShopFlag){
-									if(prosPrice >= item.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-										totalPrice = prosPrice -  item.promotions.reducedPrice  //统计合计价格
-										totalOriginalPrice += pros.originalPrice*pros.productCount //统计原商品价格
-										reducedPrice = item.promotions.reducedPrice	//统计总减金额
-									}else{
-										totalPrice += prosPrice	//未达满减的统计合计价格
-									}
-								}
-							}else if(pros.promotions && pros.promotions.type == 1 && pros.promotions.mode == 2){//以下为计算除店铺满减以外的单品满减
-								let _price = 0;
-								_price = pros.price*pros.number
-								_totalOriginalPrice += pros.originalPrice*pros.number; //统计原商品价格
-								if(_price >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-									_price = _price - pros.promotions.reducedPrice //商品满减后价格
-									_reducedPrice += pros.promotions.reducedPrice //统计总减金额
-								}else{
-									_reducedPrice = 0  //将满减金额置为0
+						if(pros.productsChecked){								
+							supplierPrice += pros.price*pros.number;
+							// 单品满减
+							if(pros.promotions && pros.promotions.type*1===1 && pros.promotions.mode*1===2){
+								// 单品满减-重新计算供应商总价/满减金额
+								if(pros.price*pros.number >= pros.promotions.touchPrice){
+									supplierPrice -= pros.promotions.reducedPrice;
+									supplierReducedPrice += pros.promotions.reducedPrice;
 								}
-								_totalPrice +=  _price //统计合计价格
-							}else if(pros.promotions && pros.promotions.type == 2 && pros.promotions.mode == 2){//凑单满减计算合计
-								let _price = 0;
-								let reducedPriceList =[];
-								let _promsReducedPrice = 0;
-								this.promotionsList.forEach(proms =>{
-									if(proms.type == 2 && proms.mode == 2){
-										reducedPriceList.push(proms.reducedPrice)
-									}
-									proms.productList.forEach(el =>{
-										if (pros.productId == el.productId){
-											_isFlag = true;
-											_price += pros.price*pros.number
-											_totalOriginalPrice += pros.originalPrice*pros.number; //统计原商品价格											
-										}
-									})
-								})	
-								_promsPrice += _price//统计合计价格
-								if(_promsPrice >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-									_reducedPromsPrice = _promsReducedPrice //统计总减金额
-								}else{
-									_reducedPromsPrice = 0  //将满减金额置为0
-								}
-								console.log(reducedPriceList)
-								// console.log(_promsPrice)
-								// console.log(_reducedPromsPrice)
-							}else{
-								_totalNonePrice += pros.price*pros.number; //正常商品的价格总计
 							}
 						}	
 					})
-			    })
-				if(_isFlag){
-					_promsPrice = _promsPrice - _reducedPromsPrice 
-				}
-				//总商品原价合计 =  店铺满减商品总原价 + 单品+凑单满减商品总原价
-				this.totalOriginalPrice = totalOriginalPrice + _totalOriginalPrice;
-				
+					// 店铺满减
+					if(item.promotions && item.promotions.mode*1===2){
+						// 店铺满减-计算供应商总价/满减金额
+						if(supplierPrice >= item.promotions.touchPrice){
+							supplierPrice -= item.promotions.reducedPrice;
+							supplierReducedPrice += item.promotions.reducedPrice;
+						}
+					}
+					item.totalprice = supplierPrice;
+					item.reducedprice = supplierReducedPrice;
+					item.originalprice = (supplierPrice+supplierReducedPrice);
+					totalPrice += item.totalprice;
+					reducedPrice += item.reducedprice;
+					originalPrice += item.originalprice;
+				})
+				 //总促销计算
+				this.promotionsList.forEach(promotions =>{
+					// 凑单满减
+					if(promotions.mode*1===2 && promotions.type*1===2){
+						let total = 0;
+						 promotions.productList.forEach(pros=>{
+							if (this.submitIds.includes(pros.productId*1)){
+								total += pros.number * pros.price;
+							}
+						});
+						if(total>=promotions.touchPrice){
+							totalPrice -= promotions.reducedPrice;
+							reducedPrice += promotions.reducedPrice;
+						}
+					}
+				});
+				//最后统计商品原价
+				this.totalOriginalPrice = originalPrice;
 				//最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
-				this.reducedPrice = reducedPrice + _reducedPrice + _reducedPromsPrice;
-				
+				this.reducedPrice = reducedPrice;
 				//最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减			
-				this.allPrice = totalPrice + _totalPrice + _totalNonePrice  + _promsPrice ;
+				this.allPrice = totalPrice ;
 			},
 			totalCount(){//计算总数量
 			    this.allCount = 0

+ 114 - 101
seller/pages/cart/cart.vue

@@ -157,7 +157,6 @@
 				reducedPrice:0,//满减
 				allPrice:0,//所有价格
 				allCount:0,//被选中的产品数量
-				isNnder:true,
 				isModallayer:false,
 				skeletonShow:true,
 				isshowDelbtn:false,
@@ -171,6 +170,9 @@
 				pullFlag: true,
 				pageSize: 10,
 				pageNum: 1,
+				submitIds:[],
+				depositIds : [6060,6061,6062,6063,6064],//定金商品ID
+				rechargeIds : [6065,6066,6067,6068,6069],//充值余额商品ID
 				isIphoneX:this.$store.state.isIphoneX
 			}
 		},
@@ -232,7 +234,7 @@
 						this.goodsList = resultsData.results;
 						this.goodsList.forEach((item,index) => {
 							let productsListLength = item.productsList.length,invalidLength = 0;
-							this.kindCount = productsListLength;
+							this.kindCount += productsListLength;
 							item.productsList.forEach(pros => {
 								pros.shopID = item.shopID;
 								pros.isStep = false
@@ -306,6 +308,16 @@
 			},
 			ischeck(item,pro){//为未选中的时候改变为true,反之为true
 				pro.productsChecked = !pro.productsChecked;
+				if(pro.productsChecked) {
+					if(!this.submitIds.includes(pro.productID*1)){
+						this.submitIds.push(pro.productID);
+					}
+				} else {
+					var lent = this.submitIds.indexOf(pro.productID*1);
+					if(lent >=0 ){
+						this.submitIds.splice(lent, 1);
+					}
+				}
 				this.updateProductCheckedAllBtn(item);
 				this.updateCheckAllBtn();
 			},
@@ -345,14 +357,18 @@
 				this.updateCheckAllBtn();
 			},
 			setProductChecked(item) {
-				let products = item.productsList;
-				products.forEach(pros=>{
+				item.productsList.forEach(pros=>{
 					if(item.checked) {
-						// 有效
-						this.isNnder = false;
 						pros.productsChecked = true;
+						if(!this.submitIds.includes(pros.productID*1)){
+							this.submitIds.push(pros.productID);
+						}
 					} else {
 						pros.productsChecked = false;
+						var lent = this.submitIds.indexOf(pros.productID*1);
+						if(lent >=0 ){
+							this.submitIds.splice(lent, 1);
+						}
 					}
 				})
 			},
@@ -375,32 +391,30 @@
 				this.updateBothCheckBtn();     
 			},
 			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
-				let prosPrice=0;
-				let touchPrice = 0; 
+				let touchPrice = 0;
 				let reducedPrice = 0;//商铺合计满减价
-				let totalOriginalPrice = 0;//商铺合计原价
-				let productsList=[];
 				this.goodsList.map((item,index)=>{
-					productsList = item.productsList;
 					//计算店铺满减后店铺合计
 					if(item.promotions && item.promotions.mode == 2){
-						productsList.forEach(pros=>{
+						let prosPrice=0;
+						let totalOriginalPrice = 0;//商铺合计原价
+						item.productsList.forEach(pros=>{
 							prosPrice += pros.retailPrice*pros.productCount
-							totalOriginalPrice += pros.retailPrice*pros.productCount;
-							if(prosPrice >= item.promotions.touchPrice){
-								item.totalPrice = prosPrice - item.promotions.reducedPrice  
-								item.reducedPrice = item.promotions.reducedPrice
-								item.totalOriginalPrice = totalOriginalPrice
-							}else{
-								item.reducedPrice = 0
-								item.totalPrice = prosPrice
-							}
+							totalOriginalPrice += pros.retailPrice*pros.productCount
 						})
+						if(prosPrice >= item.promotions.touchPrice){
+							item.totalPrice = prosPrice - item.promotions.reducedPrice  
+							item.reducedPrice = item.promotions.reducedPrice
+							item.totalOriginalPrice = totalOriginalPrice
+						}else{
+							item.reducedPrice = 0  //统计合计价格
+							item.totalPrice = prosPrice
+						}
 					}else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
 						let _totalPrice = 0;
 						let _reducedPrice = 0;
 						let _totalOriginalPrice =0;
-						productsList.forEach(pros=>{
+						item.productsList.forEach(pros=>{
 							let _price = pros.retailPrice*pros.productCount
 							_totalOriginalPrice += pros.retailPrice*pros.productCount;
 							if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
@@ -408,7 +422,7 @@
 									_price = _price - pros.promotions.reducedPrice
 									_reducedPrice += pros.promotions.reducedPrice
 								}
-								_totalPrice +=  _price							
+								_totalPrice += _price
 							}else{
 								_reducedPrice = 0;
 								_totalPrice += pros.retailPrice*pros.productCount;
@@ -421,89 +435,65 @@
 				})
 			},
 			totalPeice(){	//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
-				this.allPrice = 0
-				let productsList =[];
-				//店铺满减
-				let prosPrice=0;
 				let totalPrice = 0;
-				let reducedPrice=0;//促销满减
-				let totalOriginalPrice=0;//促销原价
-				//凑单满减.单品满减				
-				let _totalPrice = 0;
-				let _promsPrice = 0;
-				let _reducedPrice = 0;
-				let _reducedPromsPrice = 0;
-				let _totalOriginalPrice =0;
-				// 正常商品
-				let _totalNonePrice = 0;
-				let _isFlag = false;
-				let _isShopFlag = false;
-				/*
-				*originalPrice:商品原价
-				*price:商品现价
-				*mode:促销商品满减计算 促销方式mode为 2 的单独做计算 当mode == 2时商品promotions字段为促销活动内容,
-				*touchPrice 为需要满金额 
-				*reducedPrice 为满减金额
-				**/ 
+				let reducedPrice = 0;
+				let originalPrice = 0;
 				this.goodsList.forEach((item,index)=>{
+					let supplierPrice = 0;
+					let supplierReducedPrice = 0;
+					item.totalprice = 0;
+					item.reducedprice = 0;
+					item.originalprice = 0;
 					item.productsList.forEach(pros=>{	
-						if(pros.productsChecked){							
-							if(item.promotions && item.promotions.mode == 2){
-								this.promotionsList.forEach(proms =>{
-									if (item.promotions.id == proms.id){
-										_isShopFlag = true;
-										prosPrice += pros.retailPrice*pros.productCount
-									}
-								})
-								if(_isShopFlag){
-									if(prosPrice >= item.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-										totalPrice = prosPrice -  item.promotions.reducedPrice  //统计合计价格
-										totalOriginalPrice += pros.price1*pros.productCount //统计原商品价格
-										reducedPrice = item.promotions.reducedPrice	//统计总减金额
-									}else{
-										totalPrice += prosPrice	//未达满减的统计合计价格
-									}
-								}
-							}else if(pros.promotions && pros.promotions.type == 1 && pros.promotions.mode == 2){//以下为计算除店铺满减以外的单品满减
-								let _price = 0;
-								_price = pros.retailPrice*pros.productCount
-								_totalOriginalPrice += pros.price1*pros.productCount; //统计原商品价格
-								if(_price >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-									_price = _price - pros.promotions.reducedPrice //商品满减后价格
-									_reducedPrice += pros.promotions.reducedPrice //统计总减金额
-								}else{
-									_reducedPrice = 0  //将满减金额置为0
+						if(pros.productsChecked){								
+							supplierPrice += pros.retailPrice*pros.productCount;
+							// 单品满减
+							if(pros.promotions && pros.promotions.type*1===1 && pros.promotions.mode*1===2){
+								// 单品满减-重新计算供应商总价/满减金额
+								if(pros.retailPrice*pros.productCount >= pros.promotions.touchPrice){
+									supplierPrice -= pros.promotions.reducedPrice;
+									supplierReducedPrice += pros.promotions.reducedPrice;
 								}
-								_totalPrice +=  _price //统计合计价格
-							}else if(pros.promotions && pros.promotions.type == 2 && pros.promotions.mode == 2){//凑单满减计算合计
-								let _price = 0;
-								this.promotionsList.forEach(proms =>{
-									proms.products.forEach(el =>{
-										if (pros.productID == el.productID){
-											_isFlag = true;
-											_price += pros.retailPrice*pros.productCount
-											_totalOriginalPrice += pros.price1*pros.productCount; //统计原商品价格
-										}
-									})
-									if(_price >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
-										_reducedPromsPrice = pros.promotions.reducedPrice //统计总减金额
-									}else{
-										_reducedPromsPrice = 0  //将满减金额置为0
-									}
-								})	
-								_promsPrice += _price//统计合计价格
-							}else{
-								_totalNonePrice += pros.retailPrice*pros.productCount; //正常商品的价格总计
 							}
 						}	
 					})
+					// 店铺满减
+					if(item.promotions && item.promotions.mode*1===2){
+						// 店铺满减-计算供应商总价/满减金额
+						if(supplierPrice >= item.promotions.touchPrice){
+							supplierPrice -= item.promotions.reducedPrice;
+							supplierReducedPrice += item.promotions.reducedPrice;
+						}
+					}
+					item.totalprice = supplierPrice;
+					item.reducedprice = supplierReducedPrice;
+					item.originalprice = (supplierPrice+supplierReducedPrice);
+					totalPrice += item.totalprice;
+					reducedPrice += item.reducedprice;
+					originalPrice += item.originalprice;
 				})
-				if(_isFlag){
-					_promsPrice = _promsPrice - _reducedPromsPrice 
-				}
-				this.totalOriginalPrice = totalOriginalPrice + _totalOriginalPrice;
-				this.reducedPrice = reducedPrice + _reducedPrice + _reducedPromsPrice;
-				this.allPrice = totalPrice + _totalPrice + _promsPrice + _totalNonePrice;
+				 //总促销计算
+				this.promotionsList.forEach(promotions =>{
+					// 凑单满减
+					if(promotions.mode*1===2 && promotions.type*1===2){
+						let total = 0;
+						 promotions.products.forEach(pros=>{
+							if (this.submitIds.includes(pros.productID*1)){
+								total += pros.productCount * pros.retailPrice;
+							}
+						});
+						if(total>=promotions.touchPrice){
+							totalPrice -= promotions.reducedPrice;
+							reducedPrice += promotions.reducedPrice;
+						}
+					}
+				});
+				//最后统计商品原价
+				this.totalOriginalPrice = originalPrice;
+				//最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
+				this.reducedPrice = reducedPrice;
+				//最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减			
+				this.allPrice = totalPrice ;
 			},
 			totalCount(){//计算总数量
 			    this.allCount = 0
@@ -593,6 +583,8 @@
 			 },
 			toConfirmation(){//跳转确认订单页面
 				let setGoodsList=[];
+				let productIdList = [];
+				let productID = '';
 				this.goodsList.forEach(res=>{
 					let products = res.productsList
 					products.forEach(pros=>{
@@ -609,14 +601,36 @@
 					 * @获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
 					 * @获取勾选的商品分类ID拼接字符串格式逗号隔开,最后一个逗号去掉
 					 */
-					let productID = '';
 					this.goodsList.forEach(el=>{
 						el.productsList.forEach(pros=>{
 							if(pros.productsChecked){
-							   productID += pros.productID+','
+							   productIdList.push(pros.productID)
 							}
 						})
 					})
+					console.log(productIdList)
+					const isHasDepositlds = productIdList.filter(item =>this.depositIds.includes(item))
+					const isHasRechargeIds = productIdList.filter(item =>this.rechargeIds.includes(item))
+					console.log(isHasDepositlds)
+					console.log(isHasRechargeIds)
+					if(isHasDepositlds.length == 1){
+						productIdList.forEach(item =>{
+							productID += item +','
+						})
+					}else{
+						this.$util.modal('提示','缴纳定金商品或余额充值商品请单独下单!','确定','',false,() =>{})
+						return
+					}
+					if(isHasRechargeIds.length == 1){
+						productIdList.forEach(item =>{
+							productID += item +','
+						})
+					}else{
+						this.$util.modal('提示','缴纳定金商品或余额充值商品请单独下单!','确定','',false,() =>{})
+						return
+					}
+					
+					
 					let cartPramsData={
 							clubId:this.clubId,
 							allPrice:this.allPrice,
@@ -629,7 +643,6 @@
 			},
 			showDelManager(){//显示删除商品管理
 				this.isshowDelbtn = true;
-				this.isNnder = true;
 				if(this.isCheckAll) {
 					this.updateBothCheckBtn();	
 				} else {