zhengjinyi 4 лет назад
Родитель
Сommit
8ae9118edf

+ 2 - 2
components/cm-custom/ws-custom.vue

@@ -103,14 +103,14 @@
 			      	});
 					
 				}else{
-					uni.navigateTo({
+					uni.redirectTo({
 			        	url: self.path
 			      	})
 				}
 		      	
 		    },
 		    _goHome: function () {
-		      	uni.redirectTo({
+		      	uni.reLaunch({
 		        	url: '/pages/index/index'
 		      	})
 		    }

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

@@ -257,7 +257,7 @@
 						color: #ff2a2a;
 						text-align: center;
 						display: inline-block;
-						padding:0 16rpx;
+						padding:0 5rpx;
 						font-size: $font-size-20;
 						border: 1px solid #ff2a2a;
 						float: left;

+ 10 - 0
components/cm-module/headerNavbar/header-back.vue

@@ -35,6 +35,9 @@
 			isDelete:{
 				type:Boolean
 			},
+			isConfim:{
+				type:Boolean
+			},
 			isUsertype:{
 				type:Number
 			}
@@ -104,6 +107,8 @@
 					this._goHome()
 				}else if(this.isDelete){
 					this._goUser()
+				}else if(this.isConfim){
+					this._goOrderList()
 				}else{
 					uni.navigateBack({
 			        	delta: 1
@@ -119,6 +124,11 @@
 		      	uni.navigateTo({
 		        	url: '/pages/index/index'
 		      	})
+		    }, 
+			_goOrderList: function () {
+		      	uni.navigateTo({
+		        	url: '/pages/user/order/order-list?state=0'
+		      	})
 		    },
 			_goSearchPath:function () {
 				this.$emit('goSearchPath')

+ 1 - 1
components/cm-module/listTemplate/classifyProductList.vue

@@ -337,7 +337,7 @@
 				color: $color-system;
 				text-align: center;
 				display: inline-block;
-				padding:0 16rpx;
+				padding:0 5rpx;
 				font-size: $font-size-20;
 				margin-left: 15rpx;
 				border: 1px solid #E15616;

+ 1 - 1
components/cm-module/listTemplate/immediatelyList.vue

@@ -773,7 +773,7 @@ export default {
 			color: $color-system;
 			text-align: center;
 			display: inline-block;
-			padding: 0 16rpx;
+			padding:0 5rpx;
 			font-size: $font-size-20;
 			margin-left: 15rpx;
 			border: 1px solid #e15616;

+ 4 - 15
components/cm-module/listTemplate/productList.vue

@@ -56,7 +56,7 @@
 								<view class="floor-tags">阶梯价格</view>
 							</view>
 						</view>
-						<text class="list-details-miniQuantity">起订量:{{ item.ladderPriceFlag == '1' ? item.maxBuyNumber : item.minBuyNumber}}</text>
+						<text class="list-details-miniQuantity">起订量:{{ item.minBuyNumber }}</text>
 						<text class="list-details-specs">规格:{{ item.unit != null ? item.unit : '' }}</text>
 						<view class="list-details-price">
 							<view class="list-shop">
@@ -157,9 +157,7 @@ export default {
 		const userInfo = uni.getStorageSync('userInfo')
 		this.organizeId = userInfo.organizeId
 		// 获取商品列表
-		this.productList = await this.getGoodsList()
-		// 购物车数量统计
-		this.getCartQuantity()
+		this.productList = await this.getGoodsList()		
 	},
 	filters: {
 		//处理金额
@@ -167,16 +165,7 @@ export default {
 			return Number(text).toFixed(2)
 		}
 	},
-	methods: {
-		// 获取购物车商品数量
-		getCartQuantity() {
-			const clubInfo = uni.getStorageSync('clubInfo')
-			this.userId = clubInfo.userId
-			this.SellerService.CartQuantity({ userId: this.userId }).then(res => {
-				this.cartQuantity = res.data
-			})
-		},
-
+	methods: {		
 		// 上拉加载更多
 		async scrolltolower() {
 			if (!this.hasNextPage) {
@@ -382,7 +371,7 @@ export default {
 			color: #ff2a2a;
 			text-align: center;
 			display: inline-block;
-			padding:0 16rpx;
+			padding:0 5rpx;
 			font-size: $font-size-20;
 			border: 1px solid #ff2a2a;
 			float: left;

+ 21 - 5
components/cm-module/orderDetails/goodsList.vue

@@ -7,8 +7,7 @@
 					<view v-if="item.shopPromotion" class="floor-item-act">
 						<view class="floor-tags" @click.stop="clickPopupShow(item.shopPromotion)">{{item.shopPromotion.name}}</view>	
 					</view>
-					<view class="title-text" v-if="information.secondHandOrderFlag==1">{{item.shopName}}<label class="paymenttext" v-if="information.affirmPaymentFlag==1">已确认打款供应商</label></view>
-					<view class="title-text" v-else @click="goShophome(item.shopID)">{{item.shopName}}<label class="iconfont icon-jinrudianpu"></label></view> 
+					<view class="title-text" v-else>{{item.shopName}}</view> 
 				</view>
 				<view class="productlist" v-for="(pros,idx) in item.orderProductList" :key="idx">
 					<view class="goods-pros-t " @click="details(pros)">
@@ -25,7 +24,7 @@
 								<view class="view-num red" v-if="pros.productType ==2 || pros.productType ==1">
 									<text>¥0.00</text>
 								</view>
-								<view class="view-num red" v-else>¥{{pros.price | NumFormat}}</view>
+								<view class="view-num red" v-else :class="PromotionsFormat(pros.productPromotion) ? 'disabled' : ''">¥{{pros.price | NumFormat}}</view>
 							</view>
 							<view class="floor-item-act" v-if="pros.productPromotion!=null" >
 								<view v-if="PromotionsFormat(pros.productPromotion)" class="floor-tags" @click.stop="clickPopupShow(pros.productPromotion)">
@@ -56,7 +55,15 @@
 						</view>
 						<view class="product-view">
 							<view class="view-num">折后单价</view>
-							<view class="view-right">¥{{pros.discountPrice | NumFormat}}</view>
+							<view class="view-right">
+								<text v-if="PromotionsFormat(pros.productPromotion)" 
+									  :class="PromotionsFormat(pros.productPromotion) ? 'disabled' : ''">
+									  ¥{{pros.discountPrice | NumFormat}}
+								</text>
+								<text>
+									¥{{(PromotionsFormat(pros.productPromotion) ? pros.productPromotion.touchPrice : pros.discountPrice)  | NumFormat}}
+								</text>
+							</view>
 						</view>
 						<view class="product-view allPrice">
 							<view class="view-num">合计</view>
@@ -263,6 +270,11 @@
 					.view-right{
 						color: #666666;
 						float: right;
+						.disabled{
+							color: #999999;
+							text-decoration: line-through;
+							margin-right: 10rpx;
+						}
 					}
 				}
 				
@@ -290,6 +302,10 @@
 						&.red{
 							color: #FF2000;
 							font-weight: bold;
+							&.disabled{
+								color: #999999;
+								text-decoration: line-through;
+							}
 						}
 					}
 				}
@@ -346,7 +362,7 @@
 						color: #ff2a2a;
 						text-align: center;
 						display: inline-block;
-						padding:0 16rpx;
+						padding:0 5rpx;
 						font-size: $font-size-20;
 						border: 1px solid #ff2a2a;
 						float: left;

+ 1 - 1
components/cm-module/productDetails/cm-activipopu.vue

@@ -2,7 +2,7 @@
 	<!--促销活动弹窗提示-->
 	<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
 		<view class="tui-popup-box clearfix">
-			<template v-if="product.actStatus == null  &&  product.ladderFlag == 1">
+			<template v-if="product.actStatus == null  &&  product.ladderPriceFlag == 1">
 				<view class="tui-scrollview-box">
 					<view class="ladder-main clearfix">
 						<view class="ladder-item">

+ 16 - 6
pages/goods/list.vue

@@ -58,6 +58,7 @@ export default {
 	data() {
 		return {
 			userId: '',
+			isRequest:false,
 			specClass: '', //规格弹窗css类,控制开关动画
 			handleData: {},
 			isQuantity: false,
@@ -81,11 +82,8 @@ export default {
 			this.minBuyNumber = data.minBuyNumber
 			this.buyRetailPrice = data.retailPrice
 			this.buyRetailPriceStep = data.step
-			if (this.handleData.ladderPriceFlag == '1') {
-				this.number = data.maxBuyNumber
-			} else {
-				this.number = data.minBuyNumber
-			}
+			this.number = data.minBuyNumber
+			console.log(this.handleData)
 		},
 		//关闭选择数量确认弹窗
 		hideSpec() {
@@ -131,7 +129,7 @@ export default {
 				this.$util.msg(`购买量必须为起订量的整数倍`, 2000)
 				this.number = this.minBuyNumber
 			} else {
-				this.number = e.detail.value
+				this.number = _value
 				this.calculatPerice()
 			}
 		},
@@ -163,7 +161,19 @@ export default {
 			.catch(error => {
 				this.$util.msg(error.msg, 2000)
 			})
+		},
+		// 获取购物车商品数量
+		getCartQuantity() {
+			const clubInfo = uni.getStorageSync('clubInfo')
+			this.userId = clubInfo.userId
+			this.SellerService.CartQuantity({ userId: this.userId }).then(res => {
+				this.$refs.productList.cartQuantity = res.data
+			})
 		}
+	},
+	onShow() {
+		// 购物车数量统计
+		this.getCartQuantity()
 	}
 }
 </script>

+ 1 - 1
pages/goods/product.vue

@@ -1060,7 +1060,7 @@ page {
 				line-height: 28rpx;
 				text-align: center;
 				display: inline-block;
-				padding: 0 16rpx;
+				padding:0 5rpx;
 				font-size: $font-size-20;
 				margin-left: 15rpx;
 				color: #ff2a2a;

+ 3 - 7
pages/user/cart/cart.vue

@@ -396,7 +396,6 @@
 					item.reducedPrice = _reducedPrice
 					item.totalOriginalPrice = _totalOriginalPrice
 					item.totalPrice = _totalPrice
-					console.log(item.totalPrice)
 				})
 			},
 			totalPeice(){//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
@@ -490,14 +489,11 @@
 				if(!this.$api.isNumber(_value)){
 					pros.productCount = pros.minBuyNumber
 				}else if(_value < pros.minBuyNumber){	
-					console.log('111111')
 					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
 					pros.productCount = pros.minBuyNumber
 				}else if(_value % pros.minBuyNumber != 0){
-					console.log('22222222')
 					pros.productCount = pros.minBuyNumber
 				}else{
-					console.log('33333333')
 					pros.productCount = _value
 					this.processActivityPrice(pros)
 				}
@@ -505,13 +501,13 @@
 				this.totalShopPeice();
 			},
 			processActivityPrice(pros){//单独处理活动价格和阶梯价格
-				let ladderPriceList = pros.ladderPrices;
+				let ladderPriceList = pros.ladderPriceList;
 				if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
 					pros.price = pros.price
 				}else{
 					ladderPriceList.forEach((item,index)=>{
 						if(pros.productCount>=item.buyNum){
-							pros.price = item.buyPrice
+							pros.retailPrice = item.buyPrice
 						}
 					})
 				}
@@ -1135,7 +1131,7 @@
 					color: #ff2a2a;
 					text-align: center;
 					display: inline-block;
-					padding:0 16rpx;
+					padding:0 5rpx;
 					font-size: $font-size-20;
 					border: 1px solid #ff2a2a;
 					float: left;

+ 7 - 1
pages/user/order/order-details.vue

@@ -1,7 +1,11 @@
 <template>
 	<view class="container details clearfix" :style="{paddingBottom :isIphoneX ? (130+68)+'rpx' : '130rpx'}">
 		<!-- 自定义返回 -->
-		<header-back :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :isShare='isOrderShare'></header-back>
+		<header-back :systeminfo='systeminfo' 
+					 :navbar-data='nvabarData' 
+					 :headerBtnPosi ="headerBtnPosi" 
+					 :isShare='isOrderShare'>
+		</header-back>
 		<view class="container-details" :style="{paddingTop:navbarHeight+'px'}">
 			<view class="status-text">
 				<view class="view-type">{{ information.status | TextFormat }}</view>
@@ -81,6 +85,7 @@
 				onlinePayFlag:'',
 				isRequest:false,			//是否加载完成渲染子组件
 				isOrderShare:false,
+				isConfim:false,
 				isShareModal:false,
 				modelType:0,
 				orderInfo:{},
@@ -124,6 +129,7 @@
 				this.isOrderShare = true
 			}else if(option.type === 'confim' ||option.type === 'search'){
 				this.state = 0
+				this.isConfim = true
 			}else{
 				this.state = option.state
 			}

+ 9 - 2
pages/user/order/order-historylist.vue

@@ -44,7 +44,10 @@
 												<view class="producttitle tui-skeleton-fillet">{{pros.name}}</view>
 												<view class="productspec tui-skeleton-fillet" v-if="pros.productCategory != 2">规格:{{pros.productUnit ? pros.productUnit : ''}}</view>
 												<view class="productprice">
-													<view class="price tui-skeleton-fillet">
+													<view class="price " v-if="pros.productType ==2 || pros.productType ==1">
+														<text>¥0.00</text>
+													</view>
+													<view class="price tui-skeleton-fillet" :class="PromotionsFormat(pros.productPromotion) ? 'disabled' : ''">
 														<text>¥{{ pros.price | NumFormat }}</text>
 													</view>
 													<view class="count tui-skeleton-fillet">
@@ -740,6 +743,10 @@
 				color: #FF2A2A;
 				float: left;
 				font-weight: bold;
+				&.disabled{
+					color: #999999;
+					text-decoration: line-through;
+				}
 			}
 			.count{
 				height: 100%;
@@ -765,7 +772,7 @@
 				color: #ff2a2a;
 				text-align: center;
 				display: inline-block;
-				padding:0 16rpx;
+				padding:0 5rpx;
 				font-size: $font-size-20;
 				border: 1px solid #ff2a2a;
 				float: left;

+ 6 - 2
pages/user/order/order-list.vue

@@ -48,7 +48,7 @@
 													<view class="price " v-if="pros.productType ==2 || pros.productType ==1">
 														<text>¥0.00</text>
 													</view>
-													<view class="price tui-skeleton-fillet" v-else>
+													<view class="price tui-skeleton-fillet" v-else :class="PromotionsFormat(pros.productPromotion) ? 'disabled' : ''">
 														<text>¥{{pros.price | NumFormat}}</text>
 													</view>
 													<view class="count tui-skeleton-fillet">
@@ -766,6 +766,10 @@
 				color: #FF2A2A;
 				float: left;
 				font-weight: bold;
+				&.disabled{
+					color: #999999;
+					text-decoration: line-through;
+				}
 			}
 			.count{
 				height: 100%;
@@ -791,7 +795,7 @@
 				color: #ff2a2a;
 				text-align: center;
 				display: inline-block;
-				padding:0 16rpx;
+				padding:0 5rpx;
 				font-size: $font-size-20;
 				border: 1px solid #ff2a2a;
 				float: left;

+ 1 - 0
pages/user/order/order-logistics.vue

@@ -196,6 +196,7 @@
 					width: 48rpx;
 					height: 48rpx;
 					float: left;
+					border: 1px solid #E1E1E1;
 					image{
 						width: 48rpx;
 						height: 48rpx;

+ 9 - 2
pages/user/order/search-order.vue

@@ -55,7 +55,10 @@
 											<view class="producttitle tui-skeleton-fillet">{{pros.name}}</view>
 											<view class="productspec tui-skeleton-fillet" v-if="pros.productCategory!=2">规格:{{pros.productUnit}}</view>
 											<view class="productprice">
-												<view class="price tui-skeleton-fillet">
+												<view class="price " v-if="pros.productType ==2 || pros.productType ==1">
+													<text>¥0.00</text>
+												</view>
+												<view v-else class="price tui-skeleton-fillet" :class="PromotionsFormat(pros.productPromotion) ? 'disabled' : ''">
 													<text>¥{{pros.price | NumFormat}}</text>
 												</view>
 												<view class="count tui-skeleton-fillet">
@@ -846,6 +849,10 @@
 				color: #FF2A2A;
 				float: left;
 				font-weight: bold;
+				&.disabled{
+					color: #999999;
+					text-decoration: line-through;
+				}
 			}
 			.count{
 				height: 100%;
@@ -871,7 +878,7 @@
 				color: #ff2a2a;
 				text-align: center;
 				display: inline-block;
-				padding:0 16rpx;
+				padding:0 5rpx;
 				font-size: $font-size-20;
 				border: 1px solid #ff2a2a;
 				float: left;

+ 2 - 2
pages/user/order/success.vue

@@ -10,8 +10,8 @@
 					<text>{{ successText }}</text>
 				</view>
 				<view class="cash-btn">
-					<view class="btn btn-pay" @click="this.$api.navigateTo(`/pages/user/order/order-payment?type=payfirm&orderId=${orderId}`)">支付订单</view>
-					<view class="btn btn-open" @click="this.$api.navigateTo('/pages/user/order/order-details?type=confim&orderId='+orderId)">查看订单</view>
+					<view class="btn btn-pay" @click="this.$api.redirectTo(`/pages/user/order/order-payment?type=payfirm&orderId=${orderId}`)">支付订单</view>
+					<view class="btn btn-open" @click="this.$api.redirectTo('/pages/user/order/order-details?type=confim&orderId='+orderId)">查看订单</view>
 				</view>
 			</view>
 		</view>