Browse Source

commit - 修复订单模块问题

zhengjinyi 3 years ago
parent
commit
395f104325

+ 6 - 6
components/cm-module/orderDetails/goodsList.vue

@@ -92,7 +92,7 @@
 
 <script>
 	export default{
-		name:"goods",
+		name:'goods',
 		props:{
 			shopOrderData:{
 				type:Array
@@ -111,15 +111,15 @@
 		},
 		filters:{
 			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
+				return Number(value).toFixed(2)
 			},
 			formatIncludedTax(value) {
 				if (value === '1') {
-				  return '不含税 ';
+				  return '不含税 '
 				} else if (value === '2') {
-				  return '含税';
+				  return '含税'
 				} else {
-				  return '';
+				  return ''
 				}
 			},
 		},	
@@ -134,7 +134,7 @@
 				if(pros.validFlag == 9){
 					return
 				}else{
-					this.$api.navigateTo(`/pages/goods/product?id=${pros.productID}`)
+					this.$api.navigateTo(`/pages/goods/product?id=${pros.productId}`)
 				}
 			},	
 			clickPopupShow(pros){

+ 2 - 2
components/cm-module/orderDetails/orderButton.vue

@@ -22,7 +22,7 @@
 
 <script>
 	export default{
-		name:"button",
+		name:'button',
 		props:{
 			status:{
 				type:Number
@@ -102,7 +102,7 @@
 			btnConfirm(type,order){
 				let data = {
 						type:type,
-						orderId:order.orderID,
+						orderId:order.orderId,
 						order:order
 					}
 				this.$emit('buttonConfirm',data)

+ 4 - 4
components/cm-module/orderDetails/sellerDetaileButton.vue

@@ -18,7 +18,7 @@
 
 <script>
 	export default{
-		name:"button",
+		name:'button',
 		props:{
 			status:{
 				type:Number
@@ -65,7 +65,7 @@
 			}
 		},
 		created(){
-			console.log(this.rechargeGoods);
+			console.log(this.rechargeGoods)
 			this.initData(this.status)
 		},
 		computed: {
@@ -106,8 +106,8 @@
 				this.shareCode = code
 			},
 			onShareCode(){
-				if(this.order.onlinePayFlag!= '1'){
-					this.PayService.PayOrderCheckoutCounter({orderId:this.order.orderID}).then(response =>{
+				if(this.order.onlinePayFlag!= 1){
+					this.PayService.PayOrderCheckoutCounter({orderId:this.order.orderId}).then(response =>{
 						let data = response.data.order
 						this.invoiceStatus =  data.invoiceStatus
 						//判断线上线下显示

+ 5 - 4
pages/seller/cart/buyagain.vue

@@ -70,7 +70,7 @@ export default {
 			isQuantity: false,
 			isStock: false,
 			minBuyNumber: 0,
-			number: 0,
+			number: 1,
 			buyRetailPrice: 0,
 			buyRetailPriceStep: 1
 		}
@@ -94,9 +94,9 @@ export default {
 			this.buyRetailPrice = data.price
 			this.buyRetailPriceStep = data.step
 			if (this.handleData.ladderPriceFlag == 1) {
-				this.number = data.maxBuyNumber
+				this.number = data.maxBuyNumber ? data.maxBuyNumber : 1
 			} else {
-				this.number = data.minBuyNumber
+				this.number = data.minBuyNumber ? data.minBuyNumber : 1
 			}
 		},
 		hideSpec() {
@@ -165,7 +165,8 @@ export default {
 				productId: this.handleData.productId,
 				clubId: this.clubID,
 				serviceProviderId: this.serviceProviderId,
-				num: this.number
+				productCount: this.number,
+				type:1
 			}
 			this.SellerService.ShoppingCartAddCart(params)
 				.then(response => {

+ 136 - 135
pages/seller/cart/cart.vue

@@ -159,12 +159,12 @@
 	</view>
 </template>
 <script>
-	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import activiPopup from "@/components/cm-module/productDetails/cm-activipopu"
-	import modalLayer from "@/components/modal-layer"
-	import { mapState,mapMutations } from 'vuex';
+	import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
+	import activiPopup from '@/components/cm-module/productDetails/cm-activipopu'
+	import modalLayer from '@/components/modal-layer'
+	import { mapState,mapMutations } from 'vuex'
 	const defaultListQuery = {
 			clubId:0, 	// 机构Id
 			serviceProviderId:0, //协销Id
@@ -172,7 +172,7 @@
 			pageNum:1,		// 页码
 			pageSize:10,	// 条数
 
-		};
+		}
 	export default{
 		components:{
 			tuiSkeleton,
@@ -216,14 +216,14 @@
 			}
 		},
 		onLoad(){
-			this.setScrollHeight();
+			this.setScrollHeight()
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
 		filters:{
 			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
+				return Number(value).toFixed(2)
 			},
 		    totalprice(val,count){//单件商品的价格 × 数量
 		        return (val * count).toFixed(2)
@@ -237,7 +237,7 @@
 				this.submitIds = []
 				this.$api.getStorage().then((resolve) => {
 					this.listQuery.serviceProviderId = resolve.serviceProviderId ? resolve.serviceProviderId : 0
-					this.initGetCartGoodsList();
+					this.initGetCartGoodsList()
 					this.getClubProductNum()
 				})	
 			},
@@ -245,8 +245,8 @@
 				this.$api.redirectTo('/pages/login/login?type=4')
 			},
 			clickPopupShow(pros,type){//显示活动弹窗
-				this.popupShow = true;
-				this.handlerPros = pros;
+				this.popupShow = true
+				this.handlerPros = pros
 			},
 			failureToProduct(failure){
 				if(failure.status == 1){
@@ -256,7 +256,7 @@
 					this.$util.msg('商品已停售,不能查看',2000)
 					return
 				}else{
-					this.isModallayer = true;
+					this.isModallayer = true
 					this.$api.navigateTo(`/pages/goods/product?id=${failure.productId}`)
 				}
 			},
@@ -271,7 +271,7 @@
 						stateText = stateTextObject[key]
 					}
 				})
-				return stateText;
+				return stateText
 			},
 			deletefailureList(){
 				this.failureList.forEach(failure=>{ this.delGoodsList += failure.sellerCartId+',' })
@@ -279,10 +279,10 @@
 					console.log(this.delGoodsList)
 					this.SellerService.SellerCartdelete({sellerCartIds:this.delGoodsList}).then(response =>{
 						console.log(response)
-						this.$util.msg('删除成功',2000);
+						this.$util.msg('删除成功',2000)
 						setTimeout(()=>{
-							this.isshowDelbtn = false;
-							this.initGetCartGoodsList();
+							this.isshowDelbtn = false
+							this.initGetCartGoodsList()
 						},2000)
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -291,14 +291,14 @@
 			},
 			setScrollHeight() {
 				// 窗口高度-footer高度
-				const {windowHeight, pixelRatio} = uni.getSystemInfoSync();
+				const {windowHeight, pixelRatio} = uni.getSystemInfoSync()
 				setTimeout(()=> {
-					const query = uni.createSelectorQuery().in(this);
-					query.selectAll('.footer').boundingClientRect();
+					const query = uni.createSelectorQuery().in(this)
+					query.selectAll('.footer').boundingClientRect()
 					query.exec(res => {
-						this.windowHeight = windowHeight;
+						this.windowHeight = windowHeight
 						if(res[0][0]) {
-							this.scrollHeight = windowHeight - res[0][0].height;
+							this.scrollHeight = windowHeight - res[0][0].height
 						}
 					})
 				}, 500)
@@ -308,7 +308,7 @@
 					this.skeletonShow = false
 					let data = response.data
 					let dataPage = data.pageDate
-					this.promotionsList = data.promotionsList;
+					this.promotionsList = data.promotionsList
 					
 					if(dataPage.list.length > 0||data.invalidProductList.length>0){
 						this.isEmpty =false
@@ -316,12 +316,12 @@
 						this.isEmpty =true
 					}
 					if(dataPage.list && dataPage.list.length > 0){
-						this.hasNextPage = dataPage.hasNextPage;
-						this.goodsList = dataPage.list;
+						this.hasNextPage = dataPage.hasNextPage
+						this.goodsList = dataPage.list
 						this.goodsList.forEach((item,index) => {
-							let cartListLength = item.cartList.length,invalidLength = 0;
+							let cartListLength = item.cartList.length,invalidLength = 0
 							item.cartList.forEach(pros => {
-								pros.shopId = item.shopId;
+								pros.shopId = item.shopId
 								pros.isStep = false
 								if(pros.step === 2){
 									if(pros.number % pros.min != 0){
@@ -333,8 +333,8 @@
 							})
 						})
 						this.totalShopPeice()
-						this.pullFlag = false;
-						setTimeout(()=>{this.pullFlag = true;},500)
+						this.pullFlag = false
+						setTimeout(()=>{this.pullFlag = true},500)
 						if(this.hasNextPage){
 							this.pullUpOn = false
 							this.nomoreText = '上拉显示更多'
@@ -347,10 +347,10 @@
 							}
 						}
 					} else {
-						this.goodsList = [];
+						this.goodsList = []
 					}
 					if( response.data.invalidProductList && response.data.invalidProductList.length > 0){
-						let newFailureList = [],isFailureLayer;
+						let newFailureList = [],isFailureLayer
 						response.data.invalidProductList.forEach((failure,index) => {
 							if(failure.validFlag == 0 || failure.validFlag == 10) {
 								isFailureLayer = true
@@ -359,26 +359,26 @@
 							}
 							newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
 						})
-						this.failureList = newFailureList;
+						this.failureList = newFailureList
 						console.log(this.failureList)
 					} else {
-						this.failureList = [];
+						this.failureList = []
 					}
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},		
 			getOnReachBottomData(){//上拉加载
 				this.listQuery.pageNum+=1
 				this.SellerService.GetSellerShoppingInfo(this.listQuery).then(response =>{
 					let resultsData = response.data.pageDate
-					this.promotionsList = response.data.promotionsList;
-					this.hasNextPage = resultsData.hasNextPage;
+					this.promotionsList = response.data.promotionsList
+					this.hasNextPage = resultsData.hasNextPage
 					this.goodsList = this.goodsList.concat(resultsData.results)
 					this.goodsList.forEach((item,index) => {
-						let productsListLength = item.cartList.length,invalidLength = 0;
+						let productsListLength = item.cartList.length,invalidLength = 0
 						item.cartList.forEach(pros => {
-							pros.shopId = item.shopId;
+							pros.shopId = item.shopId
 							pros.isStep = false
 							if(pros.step === 2){
 								if(pros.number % pros.min != 0){
@@ -390,8 +390,8 @@
 						})
 					})
 					this.totalShopPeice()
-					this.pullFlag = false;// 防上拉暴滑
-					setTimeout(()=>{this.pullFlag = true;},500)
+					this.pullFlag = false// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true},500)
 					if(this.hasNextPage){
 						this.pullUpOn = false
 						this.nomoreText = '上拉显示更多'
@@ -401,7 +401,7 @@
 						this.nomoreText = '已至底部'
 					}
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			getClubProductNum(){// 获取协销下机构购物车数量
@@ -415,67 +415,67 @@
 				})
 			},
 			ischeck(item,pro){//为未选中的时候改变为true,反之为true
-				pro.isChecked = !pro.isChecked;
+				pro.isChecked = !pro.isChecked
 				if(pro.isChecked) {
 					if(!this.submitIds.includes(pro.productId*1)){
-						this.submitIds.push(pro.productId);
+						this.submitIds.push(pro.productId)
 					}
 				} else {
-					var lent = this.submitIds.indexOf(pro.productId*1);
+					var lent = this.submitIds.indexOf(pro.productId*1)
 					if(lent >=0 ){
-						this.submitIds.splice(lent, 1);
+						this.submitIds.splice(lent, 1)
 					}
 				}
-				this.updateProductCheckedAllBtn(item);
-				this.updateCheckAllBtn();
+				this.updateProductCheckedAllBtn(item)
+				this.updateCheckAllBtn()
 			},
 			updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
 				let productsList = item.cartList,
 					productsCheckedLength = 0,
-					disabledLength = 0;
+					disabledLength = 0
 				if(this.isshowDelbtn) {
 					productsList.forEach(pros => {
 						if(pros.isChecked) {
-							productsCheckedLength++;
+							productsCheckedLength++
 						}
 					})
 				} else {
 					productsList.forEach(pros => {
 						if(pros.isChecked) {
-							productsCheckedLength++;
+							productsCheckedLength++
 						}
 					})
 				}
-				item.isChecked = productsCheckedLength === productsList.length - disabledLength;
+				item.isChecked = productsCheckedLength === productsList.length - disabledLength
 			},
 			updateCheckAllBtn() {// 全选勾选判断
 				let goodsCheckedLength = 0,
 					disabledListLength = 0,
-					goodsList = this.goodsList;
+					goodsList = this.goodsList
 				goodsList.forEach(item => {
 					if(item.isChecked) {
-						goodsCheckedLength++;
+						goodsCheckedLength++
 					}
 				})
-				this.isCheckAll = goodsCheckedLength === goodsList.length - disabledListLength;
+				this.isCheckAll = goodsCheckedLength === goodsList.length - disabledListLength
 			},
 			checkShop(item){//与单选商品类似
-				item.isChecked = !item.isChecked;
-				this.setProductChecked(item);
-				this.updateCheckAllBtn();
+				item.isChecked = !item.isChecked
+				this.setProductChecked(item)
+				this.updateCheckAllBtn()
 			},
 			setProductChecked(item) {
 				item.cartList.forEach(pros=>{
 					if(item.isChecked) {
-						pros.isChecked = true;
+						pros.isChecked = true
 						if(!this.submitIds.includes(pros.productId*1)){
-							this.submitIds.push(pros.productId);
+							this.submitIds.push(pros.productId)
 						}
 					} else {
-						pros.isChecked = false;
-						var lent = this.submitIds.indexOf(pros.productId*1);
+						pros.isChecked = false
+						var lent = this.submitIds.indexOf(pros.productId*1)
 						if(lent >=0 ){
-							this.submitIds.splice(lent, 1);
+							this.submitIds.splice(lent, 1)
 						}
 					}
 				})
@@ -484,28 +484,28 @@
 				if(this.isshowDelbtn) {
 					// 当管理删除按钮出现时,失效的商品可被选择
 					this.goodsList.forEach((item)=>{
-						item.isChecked = this.isCheckAll;
-						this.setProductChecked(item);
+						item.isChecked = this.isCheckAll
+						this.setProductChecked(item)
 					})
 				} else {
 					this.goodsList.forEach((item)=>{
-						item.isChecked = this.isCheckAll;
-						this.setProductChecked(item);
+						item.isChecked = this.isCheckAll
+						this.setProductChecked(item)
 					})
 				}
 			},
 			checkAll(){//全选方法内调用方法
-			    this.isCheckAll = !this.isCheckAll;
-				this.updateBothCheckBtn();     
+			    this.isCheckAll = !this.isCheckAll
+				this.updateBothCheckBtn()     
 			},
 			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
-				let touchPrice = 0;
-				let reducedPrice = 0;//商铺合计满减价
+				let touchPrice = 0
+				let reducedPrice = 0//商铺合计满减价
 				this.goodsList.map((item,index)=>{
 					//计算店铺满减后店铺合计
 					if(item.promotions && item.promotions.mode == 2){
-						let prosPrice=0;
-						let totalOriginalPrice = 0;//商铺合计原价
+						let prosPrice=0
+						let totalOriginalPrice = 0//商铺合计原价
 						item.cartList.forEach(pros=>{
 							prosPrice += pros.price*pros.number
 							totalOriginalPrice += pros.price*pros.number
@@ -519,12 +519,12 @@
 							item.totalPrice = prosPrice
 						}
 					}else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
-						let _totalPrice = 0;
-						let _reducedPrice = 0;
-						let _totalOriginalPrice =0;
+						let _totalPrice = 0
+						let _reducedPrice = 0
+						let _totalOriginalPrice =0
 						item.cartList.forEach(pros=>{
 							let _price = pros.price*pros.number
-							_totalOriginalPrice += pros.price*pros.number;
+							_totalOriginalPrice += pros.price*pros.number
 							if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
 								if(_price >= pros.promotions.touchPrice){
 									_price = _price - pros.promotions.reducedPrice
@@ -532,8 +532,8 @@
 								}
 								_totalPrice += _price
 							}else{
-								_reducedPrice = 0;
-								_totalPrice += pros.price*pros.number;
+								_reducedPrice = 0
+								_totalPrice += pros.price*pros.number
 							}
 						})
 						item.reducedPrice = _reducedPrice
@@ -543,24 +543,24 @@
 				})
 			},
 			totalPeice(){	//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
-				let totalPrice = 0;
-				let reducedPrice = 0;
-				let originalPrice = 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;
+					let supplierPrice = 0
+					let supplierReducedPrice = 0
+					item.totalprice = 0
+					item.reducedprice = 0
+					item.originalprice = 0
 					item.cartList.forEach(pros=>{	
 						if(pros.isChecked){								
-							supplierPrice += pros.price*pros.number;
+							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;
+									supplierPrice -= pros.promotions.reducedPrice
+									supplierReducedPrice += pros.promotions.reducedPrice
 								}
 							}
 						}	
@@ -569,51 +569,51 @@
 					if(item.promotions && item.promotions.mode*1===2){
 						// 店铺满减-计算供应商总价/满减金额
 						if(supplierPrice >= item.promotions.touchPrice){
-							supplierPrice -= item.promotions.reducedPrice;
-							supplierReducedPrice += item.promotions.reducedPrice;
+							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;
+					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;
+						let total = 0
 						 promotions.products.forEach(pros=>{
 							if (this.submitIds.includes(pros.productId*1)){
-								total += pros.number * pros.price;
+								total += pros.number * pros.price
 							}
-						});
+						})
 						if(total>=promotions.touchPrice){
-							totalPrice -= promotions.reducedPrice;
-							reducedPrice += promotions.reducedPrice;
+							totalPrice -= promotions.reducedPrice
+							reducedPrice += promotions.reducedPrice
 						}
 					}
-				});
+				})
 				//最后统计商品原价
-				this.totalOriginalPrice = originalPrice;
+				this.totalOriginalPrice = originalPrice
 				//最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
-				this.reducedPrice = reducedPrice;
+				this.reducedPrice = reducedPrice
 				//最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减			
-				this.allPrice = totalPrice ;
+				this.allPrice = totalPrice 
 			},
 			totalCount(){//计算总数量
 			    this.allCount = 0
 				let prosAllCount=0
 				let validCount = 0
-				let validList =[];
-				let productsList =[];
+				let validList =[]
+				let productsList =[]
 			    this.goodsList.forEach(item=>{
 					productsList = item.cartList
 					productsList.forEach(pros=>{
 						if(pros.isChecked){
-							prosAllCount+=parseInt(pros.number);
+							prosAllCount+=parseInt(pros.number)
 							this.allCount = prosAllCount
 						}
 					})
@@ -631,12 +631,12 @@
 					this.isStock = false
 				}
 				this.updateShoppogNum(pros)
-				this.totalShopPeice();
+				this.totalShopPeice()
 			},
 			changeCountSub(item,pros){//商品数量减减
 				if(pros.number<=pros.min){
 					pros.number= pros.min
-					this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
+					this.$util.msg(`该商品最小起订量为${pros.min}`,2000)
 					return
 				}else{
 					if(pros.step === 2){
@@ -648,14 +648,14 @@
 					this.processActivityPrice(pros)
 				}
 				this.updateShoppogNum(pros)
-				this.totalShopPeice();
+				this.totalShopPeice()
 			},
 			changeNnmber(e,item,pros){//输入商品数量更新
-				let _value = e.detail.value;
+				let _value = e.detail.value
 				if(!this.$api.isNumber(_value)){
 					pros.number = pros.min
 				}else if(_value < pros.min){	
-					this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
+					this.$util.msg(`该商品最小起订量为${pros.min}`,2000)
 					pros.number = pros.min
 				}else if(_value % pros.min != 0){
 					pros.isStep = true
@@ -666,10 +666,10 @@
 					this.processActivityPrice(pros)
 				}
 				this.updateShoppogNum(pros)
-				this.totalShopPeice();
+				this.totalShopPeice()
 			},
 			processActivityPrice(pros){//单独处理活动价格和阶梯价格
-				let ladderPriceList = pros.ladderPrices;
+				let ladderPriceList = pros.ladderPrices
 				if(pros.ladderFlag == 0 || pros.actStatus == 1){
 					pros.price = pros.price
 				}else{
@@ -688,16 +688,17 @@
 						serviceProviderId:this.listQuery.serviceProviderId,
 					}
 				).then(response =>{
-					this.isshowDelbtn = false;
-					this.initGetCartGoodsList();
+					this.isshowDelbtn = false
+					this.isCheckAll = false
+					this.initGetCartGoodsList()
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			 },
 			toConfirmation(){//跳转确认订单页面
-				let setGoodsList=[];
-				let productIdList = [];
-				let productIds = '';
+				let setGoodsList=[]
+				let productIdList = []
+				let productIds = ''
 				this.goodsList.forEach(res=>{
 					let products = res.cartList
 					products.forEach(pros=>{
@@ -707,7 +708,7 @@
 					})
 				})
 				if(setGoodsList == ''){
-					this.$util.msg("请先选择结算商品~",2000);
+					this.$util.msg('请先选择结算商品~',2000)
 					return
 				}else{
 					/**
@@ -749,23 +750,23 @@
 				}
 			},
 			showDelManager(){//显示删除商品管理
-				this.isshowDelbtn = true;
+				this.isshowDelbtn = true
 				if(this.isCheckAll) {
-					this.updateBothCheckBtn();	
+					this.updateBothCheckBtn()	
 				} else {
-					this.updateCheckAllBtn();
+					this.updateCheckAllBtn()
 				}
 			},
 			hideDelManage(){//隐藏删除商品管理			
-				this.isshowDelbtn = false;
+				this.isshowDelbtn = false
 				if(this.isCheckAll) {
-					this.updateBothCheckBtn();	
+					this.updateBothCheckBtn()	
 				} else {
-					this.updateCheckAllBtn();
+					this.updateCheckAllBtn()
 				}
 			},
 			deleteList(){//删除购物车商品	
-				this.delGoodsList=[];
+				this.delGoodsList=[]
 				this.goodsList.forEach(delitem=>{
 					let products = delitem.cartList
 					products.forEach(pros=>{
@@ -780,7 +781,7 @@
 					}
 				})
 				if(this.delGoodsList.length == 0){
-					this.$util.msg("请选择要删除的商品~",2000);
+					this.$util.msg('请选择要删除的商品~',2000)
 					return
 				}else{				
 					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
@@ -790,10 +791,10 @@
 								serviceProviderId:this.listQuery.serviceProviderId
 							}
 						).then(response =>{
-							this.$util.msg('删除成功',2000);
+							this.$util.msg('删除成功',2000)
 							setTimeout(()=>{
-								this.isshowDelbtn = false;
-								this.initGetCartGoodsList();
+								this.isshowDelbtn = false
+								this.initGetCartGoodsList()
 							},2000)
 						}).catch(error =>{
 							this.$util.msg(error.msg,2000)
@@ -817,7 +818,7 @@
 				return false
 			},
 			navToListPage(id){
-				this.isModallayer = true;
+				this.isModallayer = true
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
 			}
 		},

+ 29 - 29
pages/seller/order/order-details.vue

@@ -83,7 +83,7 @@
 	import orderButton from '@/components/cm-module/orderDetails/sellerDetaileButton'	 //底部按钮
 	import shareAlert from '@/components/cm-module/modelAlert/sellerShareAlert.vue'			 //分享弹窗
 	import orderModel from '@/components/cm-module/modelAlert/order-alert'			 //付款弹窗
-	import activiPopup from "@/components/cm-module/orderDetails/activipopu"		//促销活动弹窗
+	import activiPopup from '@/components/cm-module/orderDetails/activipopu'		//促销活动弹窗
 	
 	export default {
 		components:{
@@ -148,7 +148,7 @@
 		},
 		onLoad(option){
 			console.log(option)
-			this.shareType = option.type;
+			this.shareType = option.type
 			this.orderId = option.orderId
 			this.clubUserId = option.userId
 			if(this.shareType ==='share'){
@@ -164,7 +164,7 @@
 		},
 		filters:{
 			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
+				return Number(value).toFixed(2)
 			},
 			TextFormat(status) {//处理金额
 				let HtmlText,
@@ -185,7 +185,7 @@
 						32:'已付款部分发货',
 						33:'已付款已发货',
 						111:'待付款待发货',
-					};
+					}
 				
 				Object.keys(typeTextObject).forEach(key => {
 					if(key == status){
@@ -206,7 +206,7 @@
 						userId : this.clubUserId,
 					}
 				).then(response =>{
-					let data = response.data;
+					let data = response.data
 					this.isRequest = true
 					this.userId = data.order.userId
 					this.shareCode = data.shareCode
@@ -238,28 +238,28 @@
 			handShowAlert(data){//判断点击的按钮类型并执行...
 				switch(data.type){
 					case 'query':
-						this.isModalLayer = true;
+						this.isModalLayer = true
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break
 					case 'delete':
-						this.handOrderDetele();
-						break;
+						this.handOrderDetele()
+						break
 					case 'cancel':
-						this.handCenceConfirm();
-						break;
+						this.handCenceConfirm()
+						break
 					case 'confirm':
 						this.handOrderConfirm(data)
-						break;
+						break
 					case 'balance':
 						this.getOrderPaymentValidation(data)
-						break;
+						break
 					case 'again':
-						this.handOrderAgain(data.orderId);
+						this.handOrderAgain(data.orderId)
 						break		
 				}
 			},
 			handOrderAgain(orderId){
-				this.aganOrderId = orderId;
+				this.aganOrderId = orderId
 				this.SellerService.SellerCreateOrderAgain(
 					{
 						confirmFlag:0,	
@@ -268,14 +268,14 @@
 					}
 				).then(res =>{
 					if(res.code==0){
-						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds,userID:res.data.userId})
-						this.$api.navigateTo('/pages/seller/cart/cart');
+						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.productIds,userID:res.data.userId})
+						this.$api.navigateTo('/pages/seller/cart/cart')
 					}
 				}).catch(error =>{
 					if(error.code== -3){
-						this.showAgan = true;
-						this.promptitle = error.msg;
-						this.failList = error.data;
+						this.showAgan = true
+						this.promptitle = error.msg
+						this.failList = error.data
 					}else if(error.code== -2){
 						this.$util.modal('',error.msg,'确定','',false,() =>{})
 					}else{
@@ -284,7 +284,7 @@
 				})
 			},
 			closeBtn(){//
-				this.showAgan = false;
+				this.showAgan = false
 			},
 			cancelBtn(){// 再来一单弹窗
 				this.SellerService.SellerCreateOrderAgain(
@@ -295,15 +295,15 @@
 					}
 				).then(res =>{
 					if(res.code==0){
-						this.$api.navigateTo('/pages/seller/cart/cart');
-						this.showAgan = false;
+						this.$api.navigateTo('/pages/seller/cart/cart')
+						this.showAgan = false
 					}
 				})
 			},
 			handOrderConfirm(data){//确认订单
 				this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
 					this.OrderService.AffirmOrder({orderId:this.orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						this.initOrderDetaileData()
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -319,7 +319,7 @@
 						}).catch(error =>{
 							this.$util.msg(error.msg,2000)
 						})	
-						break;
+						break
 				}
 			},
 			getOrderPaymentValidation(data){//监听根据付款状态做操作
@@ -329,7 +329,7 @@
 					if(dataCode == -1){
 						this.$util.modal('','订单已申请全部退款,无需再付款!','确定','',false,() =>{})
 					}else{
-						this.isPayModel = true;
+						this.isPayModel = true
 						this.modelType = 3
 					}
 				}).catch(error =>{
@@ -339,7 +339,7 @@
 			handOrderDetele(){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
 					this.OrderService.DeleteOrder({orderId:this.orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							if(this.shareType ==='share'){
 								this.$api.navigateTo('/pages/seller/index/index')
@@ -355,7 +355,7 @@
 			handCenceConfirm(){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
 					this.OrderService.CancelOrder({orderId:this.orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						this.initOrderDetaileData()
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
@@ -394,11 +394,11 @@
 			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
-				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
 				return headerBtnPosi
 			},
 			setSysteminfo(){
-				let systeminfo;
+				let systeminfo
 				uni.getSystemInfo({ // 获取设备信息
 					success: (res) => {
 						systeminfo = res

+ 57 - 57
pages/seller/order/order-historylist.vue

@@ -158,12 +158,12 @@
 <script>
 	import headerBack from '@/components/cm-module/headerNavbar/header-back' 	// 自定义顶部导航
 	import btSearch from '@/components/uni-search/bt-search.vue'				// 搜索
-	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
 	import orderButton from '@/components/cm-module/orderDetails/sellerOrderButton' // 操作按钮
-	import modalLayer from "@/components/modal-layer"
-	import empty from "@/components/empty";
+	import modalLayer from '@/components/modal-layer'
+	import empty from '@/components/empty'
 	import shareAlert from '@/components/cm-module/modelAlert/sellerShareAlert'		// 分享弹窗
 	
 	export default {
@@ -192,7 +192,7 @@
 								{type:1,text:'机构自主订单'},
 								{type:2,text:'协销订单'}
 							],			 
-				winHeight: "", //窗口高度
+				winHeight: '', //窗口高度
 				clubId:0,		//机构ID
 				userId:0,
 				currentTab: 0, //预设当前项的值
@@ -229,14 +229,14 @@
 			this.initDataInfo()
 			uni.getSystemInfo({//  高度自适应
 				success: function(res) {
-					let calc = res.windowHeight;
-					self.winHeight = calc-82;
+					let calc = res.windowHeight
+					self.winHeight = calc-82
 				}
-			});
+			})
 		},
 		filters:{
 			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
+				return Number(value).toFixed(2)
 			},
 		},
 		methods: {
@@ -249,15 +249,15 @@
 				this.getOrderDatainit(this.currentTab)
 			},
 			onChange (e) {// 滚动切换标签样式
-				let index = e.target.current || e.detail.current;
+				let index = e.target.current || e.detail.current
 				if (this.isClickChange) {
-					this.currentTab = index;
-					this.isClickChange = false;
-					return;
+					this.currentTab = index
+					this.isClickChange = false
+					return
 				}
-				this.isClickChange = false;
-				this.currentTab = index; 
-				this.checkCor();
+				this.isClickChange = false
+				this.currentTab = index 
+				this.checkCor()
 				this.pageNum = 1
 				this.pullUpOn = true //切换时隐藏
 				this.loadding =  false //切换时隐藏
@@ -266,11 +266,11 @@
 			},
 			// 点击标题切换当前页时改变样式
 			onClickTab (e) {
-				let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current;
+				let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
 				if (this.currentTab === tabIndex) {
-					return false;
+					return false
 				} else {
-					this.isClickChange = true;
+					this.isClickChange = true
 					this.currentTab = tabIndex
 					this.pageNum = 1
 					this.pullUpOn = true //切换时隐藏
@@ -298,10 +298,10 @@
 			},
 			getOrderDatainit(index,source){
 				setTimeout(()=>{this.skeletonShow = false},1500)
-				let orderItem = this.orderTabBar[index];
-				let listType = orderItem.listType;
+				let orderItem = this.orderTabBar[index]
+				let listType = orderItem.listType
 				if(source === 'tabChange' && orderItem.loaded === true){//tab切换只有第一次需要加载数据
-					return;
+					return
 				}
 				setTimeout(()=>{
 					this.SellerService.GetSellerClubOrderList(
@@ -317,16 +317,16 @@
 						let data  = response.data
 						let orderList = data.list.filter(item=>{
 							//添加不同状态下订单的表现形式
-							item = Object.assign(item, this.StateExpFormat(item.listType));
-							return item;
-						});
-						orderItem.orderList =[];
+							item = Object.assign(item, this.StateExpFormat(item.listType))
+							return item
+						})
+						orderItem.orderList =[]
 						orderList.forEach(item=>{
-							orderItem.orderList.push(item);
+							orderItem.orderList.push(item)
 						})
 						//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-						this.$set(orderItem, 'loaded', true);
-						this.hasNextPage = data.hasNextPage;
+						this.$set(orderItem, 'loaded', true)
+						this.hasNextPage = data.hasNextPage
 						if(this.hasNextPage){
 							this.pullUpOn = false
 							this.nomoreText = '上拉显示更多'
@@ -339,9 +339,9 @@
 							}
 						}
 					}).catch(error =>{
-						this.$util.msg(error.msg,2000);
+						this.$util.msg(error.msg,2000)
 					})
-				}, 600);	
+				}, 600)	
 			}, 
 			getOnReachBottomData(index){//上拉加载
 				this.pageNum += 1
@@ -355,12 +355,12 @@
 						pageSize:this.pageSize,
 					}
 				).then(response =>{
-					let orderItem = this.orderTabBar[index];
+					let orderItem = this.orderTabBar[index]
 					let data = response.data
-					this.hasNextPage = data.hasNextPage;
+					this.hasNextPage = data.hasNextPage
 					orderItem.orderList = orderItem.orderList.concat(data.list)
-					this.pullFlag = false;// 防上拉暴滑
-					setTimeout(()=>{this.pullFlag = true;},500)
+					this.pullFlag = false// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true},500)
 					if(this.hasNextPage){
 						this.pullUpOn = false
 						this.nomoreText = '上拉显示更多'
@@ -377,12 +377,12 @@
 				if(this.hasNextPage){
 					this.loadding = true
 					this.pullUpOn = true
-					this.getOnReachBottomData(this.currentTab);
+					this.getOnReachBottomData(this.currentTab)
 				}	
 			},
 			detail(order) {//订单详情跳转
-				this.isModalLayer = true;	
-				this.$api.navigateTo(`/pages/seller/order/order-details?listType=${this.currentTab}&orderID=${order.orderID}&userId=${order.userID}`)
+				this.isModalLayer = true	
+				this.$api.navigateTo(`/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${order.userId}`)
 			},
 			handButtonConfirm(data) {//获取点击
 				this.handShowAlert(data)
@@ -391,25 +391,25 @@
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'query':
-						this.isModalLayer = true;
+						this.isModalLayer = true
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break
 					case 'delete':
-						this.handOrderDetele(data.orderId);
+						this.handOrderDetele(data.orderId)
 						break
 					case 'cancel':
 						this.handCenceConfirm(data.orderId)
 						break
 					case 'confirm':
-						this.handOrderConfirm(data.orderId);
+						this.handOrderConfirm(data.orderId)
 						break
 					case 'again':
-						this.handOrderAgain(data.orderId);
+						this.handOrderAgain(data.orderId)
 						break		
 				}
 			},
 			handOrderAgain(orderId){// 再来一单
-				this.aganOrderId = orderId;
+				this.aganOrderId = orderId
 				this.SellerService.SellerCreateOrderAgain(
 					{
 						confirmFlag:0,	
@@ -418,8 +418,8 @@
 					}
 				).then(res =>{
 					if(res.code==0){
-						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds})
-						this.$api.navigateTo('/pages/seller/cart/cart');
+						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.productIds,userID:res.data.userId})
+						this.$api.navigateTo('/pages/seller/cart/cart')
 					}
 				}).catch(error =>{
 					if(error.code== -3){
@@ -434,7 +434,7 @@
 				})
 			},
 			closeBtn(){//
-				this.showAgan = false;
+				this.showAgan = false
 			},
 			cancelBtn(){// 再来一单弹窗
 				this.SellerService.SellerCreateOrderAgain(
@@ -445,15 +445,15 @@
 					}
 				).then(res =>{
 					if(res.code==0){
-						this.$api.navigateTo('/pages/seller/cart/cart');
-						this.showAgan = false;
+						this.$api.navigateTo('/pages/seller/cart/cart')
+						this.showAgan = false
 					}
 				})
 			},
 			handOrderConfirm (orderId){//确认订单
 				this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
 					this.OrderService.AffirmOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -465,7 +465,7 @@
 			handOrderDetele(orderId){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
 					this.OrderService.DeleteOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -477,7 +477,7 @@
 			handCenceConfirm(orderId){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
 					this.OrderService.CancelOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -536,19 +536,19 @@
 						stateText = stateTextObject[key]
 					}
 				})
-				return stateText;
+				return stateText
 			},
 			orderPriceToFixed (n){
-				let price ='';
-				price = n.toFixed(2);
+				let price =''
+				price = n.toFixed(2)
 				return price
 			},
 		},
 		onPageScroll(e) {
-			this.scrollTop = e.scrollTop;
+			this.scrollTop = e.scrollTop
 		},
 		onShow() {
-			this.isModalLayer = false;
+			this.isModalLayer = false
 		}
 	}
 </script>

+ 54 - 54
pages/seller/order/order-list.vue

@@ -161,12 +161,12 @@
 <script>
 	import headerBack from '@/components/cm-module/headerNavbar/header-back' 		//自定义顶部导航
 	import btSearch from '@/components/uni-search/bt-search.vue'				//搜索
-	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
 	import orderButton from '@/components/cm-module/orderDetails/sellerOrderButton' //操作按钮
-	import modalLayer from "@/components/modal-layer"
-	import empty from "@/components/empty";
+	import modalLayer from '@/components/modal-layer'
+	import empty from '@/components/empty'
 	import shareAlert from '@/components/cm-module/modelAlert/sellerShareAlert'			 //分享弹窗
 
 	
@@ -204,7 +204,7 @@
 					title: '我的订单 ', // 导航栏中间的标题
 				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
-				winHeight: "", //窗口高度
+				winHeight: '', //窗口高度
 				currentTab: 0, //预设当前项的值
 				screenTab:0,   //筛选预设当前项的值
 				scrollLeft: 0 ,//tab标题的滚动条位置
@@ -236,34 +236,34 @@
 			}
 		},
 		onLoad(option) {
-			let self = this;
+			let self = this
 			if(option.type ==='detele'){self.isDelete = true}
 			self.currentTab = option.listType
 			self.getHeaderTopHeight()//设置自定义导航高度
 			//  高度自适应
 			uni.getSystemInfo({
 				success: function(res) {
-					let calc = res.windowHeight;
-					self.winHeight = calc-self.CustomBar-82;
+					let calc = res.windowHeight
+					self.winHeight = calc-self.CustomBar-82
 				}
-			});
+			})
 			this.$api.getStorage().then((resolve) =>{
 				this.userId = resolve.userId ? resolve.userId : 0
 			})
 		},
 		filters:{
 			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
+				return Number(value).toFixed(2)
 			},
 		},
 		methods: {
 			// 滚动切换标签样式
 			onChange (e) {
-				let index = e.target.current || e.detail.current;
+				let index = e.target.current || e.detail.current
 				if (this.isClickChange) {
-					this.currentTab = index;
+					this.currentTab = index
 					this.isClickChange = false
-					return;
+					return
 				}
 				this.isClickChange = false
 				this.currentTab = index
@@ -276,9 +276,9 @@
 			},
 			// 点击标题切换当前页时改变样式
 			onClickTab (e) {
-				let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current;
+				let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
 				if (this.currentTab === tabIndex) {
-					return false;
+					return false
 				} else {
 					this.isClickChange = true
 					this.currentTab = tabIndex
@@ -307,10 +307,10 @@
 			},
 			getOrderDatainit(index,source){
 				setTimeout(()=>{this.skeletonShow = false},1500)
-				let orderItem = this.orderTabBar[index];
-				let listType = orderItem.listType;
+				let orderItem = this.orderTabBar[index]
+				let listType = orderItem.listType
 				if(source === 'tabChange' && orderItem.loaded === true){//tab切换只有第一次需要加载数据
-					return;
+					return
 				}
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
@@ -328,16 +328,16 @@
 							if(data.list && data.list.length>0){
 								let orderList = data.list.filter(item=>{
 									//添加不同状态下订单的表现形式
-									item = Object.assign(item, this.StateExpFormat(item.listType));
-									return item;
-								});
-								orderItem.orderList =[];
+									item = Object.assign(item, this.StateExpFormat(item.listType))
+									return item
+								})
+								orderItem.orderList =[]
 								orderList.forEach(item=>{
-									orderItem.orderList.push(item);
+									orderItem.orderList.push(item)
 								})
 								//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-								this.$set(orderItem, 'loaded', true);
-								this.hasNextPage = data.hasNextPage;
+								this.$set(orderItem, 'loaded', true)
+								this.hasNextPage = data.hasNextPage
 								if(this.hasNextPage){
 									this.pullUpOn = false
 									this.nomoreText = '上拉显示更多'
@@ -351,10 +351,10 @@
 								}
 							}
 						}).catch(error =>{
-							this.$util.msg(error.msg,2000);
+							this.$util.msg(error.msg,2000)
 						})
 					})
-				}, 600);	
+				}, 600)	
 			}, 
 			getOnReachBottomData(index){//上拉加载
 				this.SellerService.GetSellerOrderList(
@@ -366,12 +366,12 @@
 						pageSize:this.pageSize,
 					}
 				).then(response =>{
-					let orderItem = this.orderTabBar[index];
+					let orderItem = this.orderTabBar[index]
 					let data = response.data
-					this.hasNextPage =data.hasNextPage;
+					this.hasNextPage =data.hasNextPage
 					orderItem.orderList = orderItem.orderList.concat(data.list)
-					this.pullFlag = false;// 防上拉暴滑
-					setTimeout(()=>{this.pullFlag = true;},500)
+					this.pullFlag = false// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true},500)
 					if(this.hasNextPage){
 						this.pullUpOn = false
 						this.nomoreText = '上拉显示更多'
@@ -388,11 +388,11 @@
 				if(this.hasNextPage){
 					this.loadding = true
 					this.pullUpOn = true
-					this.getOnReachBottomData(this.currentTab);
+					this.getOnReachBottomData(this.currentTab)
 				}	
 			},
 			detail(order) {//订单详情跳转
-				this.isModalLayer = true;	
+				this.isModalLayer = true	
 				this.$api.navigateTo(`/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${order.userId}`)
 			},
 			handButtonConfirm(data) {//获取点击
@@ -402,25 +402,25 @@
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'query':
-						this.isModalLayer = true;
+						this.isModalLayer = true
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break
 					case 'delete':
-						this.handOrderDetele(data.orderId);
+						this.handOrderDetele(data.orderId)
 						break
 					case 'cancel':
 						this.handCenceConfirm(data.orderId)
 						break
 					case 'confirm':
-						this.handOrderConfirm(data.orderId);
+						this.handOrderConfirm(data.orderId)
 						break
 					case 'again':
-						this.handOrderAgain(data.orderId);
+						this.handOrderAgain(data.orderId)
 						break	
 				}
 			},
 			handOrderAgain(orderId){
-				this.aganOrderId = orderId;
+				this.aganOrderId = orderId
 				this.SellerService.SellerCreateOrderAgain(
 					{
 						confirmFlag:0,	
@@ -429,8 +429,8 @@
 					}
 				).then(res =>{
 					if(res.code==0){
-						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds})
-						this.$api.navigateTo('/pages/seller/cart/cart');
+						this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.productIds,userID:res.data.userId})
+						this.$api.navigateTo('/pages/seller/cart/cart')
 					}
 				}).catch(error =>{
 					if(error.code== -3){
@@ -445,7 +445,7 @@
 				})
 			},
 			closeBtn(){//
-				this.showAgan = false;
+				this.showAgan = false
 			},
 			cancelBtn(){// 再来一单弹窗
 				this.SellerService.SellerCreateOrderAgain(
@@ -456,15 +456,15 @@
 					}
 				).then(res =>{
 					if(res.code==0){
-						this.$api.navigateTo('/pages/seller/cart/cart');
-						this.showAgan = false;
+						this.$api.navigateTo('/pages/seller/cart/cart')
+						this.showAgan = false
 					}
 				})
 			},
 			handOrderConfirm (orderId){//确认订单
 				this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
 					this.OrderService.AffirmOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -476,7 +476,7 @@
 			handOrderDetele(orderId){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
 					this.OrderService.DeleteOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -488,7 +488,7 @@
 			handCenceConfirm(orderId){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
 					this.OrderService.CancelOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -547,11 +547,11 @@
 						stateText = stateTextObject[key]
 					}
 				})
-				return stateText;
+				return stateText
 			},
 			orderPriceToFixed (n){
-				let price ='';
-				price = n.toFixed(2);
+				let price =''
+				price = n.toFixed(2)
 				return price
 			},
 			getHeaderTopHeight (){ // 状态栏高度
@@ -571,11 +571,11 @@
 			},
 			setHeaderBtnPosi (){
 				// 获得胶囊按钮位置信息
-				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
 				return headerBtnPosi
 			},
 			setSysteminfo (){
-				let systeminfo;
+				let systeminfo
 				uni.getSystemInfo({ // 获取设备信息
 					success: (res) => {
 						systeminfo = res
@@ -585,10 +585,10 @@
 			}
 		},
 		onPageScroll(e) {
-			this.scrollTop = e.scrollTop;
+			this.scrollTop = e.scrollTop
 		},
 		onShow() {
-			this.isModalLayer = false;
+			this.isModalLayer = false
 			this.getOrderDatainit(this.currentTab)
 		}
 	}

+ 65 - 65
pages/user/order/order-list.vue

@@ -118,12 +118,12 @@
 <script>
 	import headerBack from '@/components/cm-module/headerNavbar/header-back' 		 	 //自定义导航
 	import btSearch from '@/components/uni-search/bt-search.vue'						//搜索
-	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
 	import orderButton from '@/components/cm-module/orderDetails/orderListButton'		 //按钮
-	import modalLayer from "@/components/modal-layer"
-	import empty from "@/components/empty";
+	import modalLayer from '@/components/modal-layer'
+	import empty from '@/components/empty'
 	import shareAlert from '@/components/cm-module/modelAlert/shareAlert'			 //分享弹窗
 	import orderModel from '@/components/cm-module/modelAlert/order-alert'			 //付款弹窗
 	import activityBean from '@/components/cm-module/activity/activityBean.vue'
@@ -160,7 +160,7 @@
 					showSearch: 1,
 					title: '我的订单', // 导航栏 中间的标题
 				},
-				winHeight: "", //窗口高度
+				winHeight: '', //窗口高度
 				currentTab: 0, //预设当前项的值
 				scrollLeft: 0 ,//tab标题的滚动条位置
 				userId:0,
@@ -191,7 +191,7 @@
 			}
 		},
 		onLoad(e) {
-			let self = this;
+			let self = this
 			if(e.type ==='detele'){this.isDelete = true}
 			this.currentTab = e.state
 			this.isOnloadFlag = true
@@ -199,14 +199,14 @@
 			//  高度自适应
 			uni.getSystemInfo({
 				success: function(res) {
-					let calc = res.windowHeight;
-					self.winHeight = calc - self.CustomBar;
+					let calc = res.windowHeight
+					self.winHeight = calc - self.CustomBar
 				}
-			});
+			})
 		},
 		filters:{
 			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
+				return Number(value).toFixed(2)
 			},
 		},	
 		methods: {
@@ -215,15 +215,15 @@
 			},
 			// 滚动切换标签样式
 			onChange: function(e) {
-				let index = e.target.current || e.detail.current;
+				let index = e.target.current || e.detail.current
 				if (this.isClickChange) {
-					this.currentTab = index;
-					this.isClickChange = false;
-					return;
+					this.currentTab = index
+					this.isClickChange = false
+					return
 				}
-				this.isClickChange = false;
-				this.currentTab = index; 
-				this.checkCor();
+				this.isClickChange = false
+				this.currentTab = index 
+				this.checkCor()
 				this.pageNum = 1
 				this.pullUpOn = true //切换时隐藏
 				this.loadding =  false //切换时隐藏
@@ -234,11 +234,11 @@
 			},
 			// 点击标题切换当前页时改变样式
 			onClickTab: function(e) {
-				let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current;
+				let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
 				if (this.currentTab === tabIndex) {
-					return false;
+					return false
 				} else {
-					this.isClickChange = true;
+					this.isClickChange = true
 					this.currentTab = tabIndex
 					this.pageNum = 1
 					this.pullUpOn = true //切换时隐藏
@@ -268,29 +268,29 @@
 					this.skeletonShow = false
 					this.isOnloadFlag = false
 				},1500)
-				let orderItem = this.orderTabBar[index];
+				let orderItem = this.orderTabBar[index]
 				if(source === 'tabChange' && orderItem.loaded === true){
 					//tab切换只有第一次需要加载数据
-					return;
+					return
 				}
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
 						this.userId = resolve.userId ? resolve.userId : 0
-						let params = {orderState:index,userId:this.userId,pageNum:1,pageSize:this.pageSize};
+						let params = {orderState:index,userId:this.userId,pageNum:1,pageSize:this.pageSize}
 						this.OrderService.QueryOrderList(params).then(response =>{
 							let data = response.data
 							let orderList = data.list.filter(item=>{
 								//添加不同状态下订单的表现形式
-								item = Object.assign(item, this.StateExpFormat(item.status));
-								return item;
-							});
-							orderItem.orderList =[];
+								item = Object.assign(item, this.StateExpFormat(item.status))
+								return item
+							})
+							orderItem.orderList =[]
 							orderList.forEach(item=>{
-								orderItem.orderList.push(item);
+								orderItem.orderList.push(item)
 							})
 							//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-							this.$set(orderItem, 'loaded', true);
-							this.hasNextPage = data.hasNextPage;
+							this.$set(orderItem, 'loaded', true)
+							this.hasNextPage = data.hasNextPage
 							if(this.hasNextPage){
 								this.pullUpOn = false
 								this.nomoreText = '上拉显示更多'
@@ -303,21 +303,21 @@
 								}
 							}
 						}).catch(error =>{
-							this.$util.msg(error.msg,2000);
+							this.$util.msg(error.msg,2000)
 						})
 					})
-				}, 600);	
+				}, 600)	
 			}, 
 			getOnReachBottomData(index){//上拉加载
 				this.pageNum+=1
-				let params = {orderState:index,userId:this.userId,pageNum:this.pageNum,pageSize:this.pageSize};
+				let params = {orderState:index,userId:this.userId,pageNum:this.pageNum,pageSize:this.pageSize}
 				this.OrderService.QueryOrderList(params).then(response =>{
 					let data = response.data
-					let orderItem = this.orderTabBar[index];
-					this.hasNextPage = data.hasNextPage;
+					let orderItem = this.orderTabBar[index]
+					this.hasNextPage = data.hasNextPage
 					orderItem.orderList = orderItem.orderList.concat(data.list)
-					this.pullFlag = false;// 防上拉暴滑
-					setTimeout(()=>{this.pullFlag = true;},500)
+					this.pullFlag = false// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true},500)
 					if(this.hasNextPage){
 						this.pullUpOn = false
 						this.nomoreText = '上拉显示更多'
@@ -334,11 +334,11 @@
 				if(this.hasNextPage){
 					this.loadding = true
 					this.pullUpOn = true
-					this.getOnReachBottomData(this.currentTab);
+					this.getOnReachBottomData(this.currentTab)
 				}	
 			},
 			detail(orderId) {//订单详情跳转
-				this.isModalLayer = true;	
+				this.isModalLayer = true	
 				this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderId=${orderId}`)
 			},
 			handButtonConfirm(data) {//获取点击
@@ -348,27 +348,27 @@
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'delete':
-						this.handOrderDetele(data.orderId);
+						this.handOrderDetele(data.orderId)
 						break
 					case 'cancel':
 						this.handCenceConfirm(data.orderId)
 						break
 					case 'query':
-						this.isModalLayer = true;
+						this.isModalLayer = true
 						this.$api.navigateTo('/pages/user/order/order-logistics?orderId='+data.orderId)
 						break
 					case 'confirm':
-						this.handOrderConfirm(data.orderId);
+						this.handOrderConfirm(data.orderId)
 						break
 					case 'pay':
-						this.hanldOrderData = data.order;
+						this.hanldOrderData = data.order
 						this.getOrderPaymentValidation(data)
 						break
 					case 'confirmation':
-						this.handOrderConfirmation(data.orderId);
+						this.handOrderConfirmation(data.orderId)
 						break
 					case 'payment':
-						this.hanldConfirmFn(data.orderId);
+						this.hanldConfirmFn(data.orderId)
 						break	
 				}
 			},
@@ -378,16 +378,16 @@
 					this.payModelData = response.data
 					switch(dataCode){
 						case 1:
-							this.isPayModel = true;
+							this.isPayModel = true
 							this.modelType = 1
-							break;
+							break
 						case 2:
-							this.isPayModel = true;
+							this.isPayModel = true
 							this.modelType = 2
-							break;
+							break
 						case -1:
 							this.$util.modal('','订单已申请全部退款,无需再付款!','确定','',false,() =>{})
-							break;
+							break
 						default:
 							if(response.data.onlinePayFlag == '1'){
 								this.$api.navigateTo(`/pages/user/order/order-payment?type=onlinePay&Amount=${response.data.pendingPayments}&orderId=${data.orderId}`)
@@ -425,8 +425,8 @@
 			},
 			hanldConfirmFn (orderId){//确认打款供应商
 				this.$util.modal('提示','确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好?','确定','取消',true,() =>{
-					this.OrderService.confirmpayment({orderId:orderId}).then(response =>{
-						this.$util.msg('确认成功',2000,true,'success');
+					this.OrderService.confirmpayment({orderId:orderId,userId:this.userId}).then(response =>{
+						this.$util.msg('确认成功',2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -449,7 +449,7 @@
 			handOrderConfirmation (orderId){//确认订单
 				this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
 					this.OrderService.AffirmOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -461,7 +461,7 @@
 			handOrderDetele(orderId){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
 					this.OrderService.DeleteOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -473,7 +473,7 @@
 			handCenceConfirm(orderId){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
 					this.OrderService.CancelOrder({orderId:orderId}).then(response =>{
-						this.$util.msg(response.msg,2000,true,'success');
+						this.$util.msg(response.msg,2000,true,'success')
 						setTimeout(() => {
 							this.getOrderDatainit(this.currentTab)
 						},2000)
@@ -496,8 +496,8 @@
 				}
 			},
 			orderPriceToFixed (n){
-				let price ='';
-				price = n.toFixed(2);
+				let price =''
+				price = n.toFixed(2)
 				return price
 			},
 			getHeaderTopHeight (){ // 状态栏高度
@@ -517,11 +517,11 @@
 			},
 			setHeaderBtnPosi (){
 				// 获得胶囊按钮位置信息
-				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
 				return headerBtnPosi
 			},
 			setSysteminfo (){
-				let systeminfo;
+				let systeminfo
 				uni.getSystemInfo({ // 获取设备信息
 					success: (res) => {
 						systeminfo = res
@@ -558,13 +558,13 @@
 						32:'已付款部分发货',
 						33:'已付款已发货',
 						111:'待付款待发货'
-					};
+					}
 				Object.keys(stateTextObject).forEach(function(key){
 					if(key == state){
 						HtmlStateText = stateTextObject[key]
 					}
-				});
-				return HtmlStateText;
+				})
+				return HtmlStateText
 			},
 			handleBeanlClick(){//关闭采美豆弹窗
 				this.isActivityBean = false
@@ -572,10 +572,10 @@
 			},
 		},
 		onPageScroll(e) {
-			this.scrollTop = e.scrollTop;
+			this.scrollTop = e.scrollTop
 		},
 		onShow() {
-			this.isModalLayer = false;
+			this.isModalLayer = false
 			this.getOrderDatainit(this.currentTab)
 		}
 	}