瀏覽代碼

修复测试问题

zhengjinyi 3 年之前
父節點
當前提交
573b80778a

+ 51 - 30
components/cm-module/cart-components/index.vue

@@ -505,6 +505,7 @@ export default {
 			pageSize: 10,
 			pageNum: 1,
 			submitIds: [],
+			checkenProsList:[],
 			popupShow: false,
 			popupShow0: false,
 			popupShow1: false,
@@ -518,7 +519,7 @@ export default {
 				source: 2
 			},
 			productCouponList: [], // 优惠券弹窗列表
-			isCouponEmpty: false
+			isCouponEmpty: false,
 		}
 	},
 	created() {
@@ -574,7 +575,9 @@ export default {
 			this.skeletonShow = true //预加载圆圈
 			this.isCheckAll = false //是否全选
 			this.submitIds = []
+			this.checkenProsList = []
 			this.couponPrice = 0
+			this.reducedPrice = 0
 			this.totalDiscountAmount = 0
 			this.isDiscount = false
 			this.eligibleCoupons = []
@@ -677,11 +680,13 @@ export default {
 			if (pro.isChecked) {
 				if (!this.submitIds.includes(pro.productId * 1)) {
 					this.submitIds.push(pro.productId)
+					this.checkenProsList.push(pro)
 				}
 			} else {
 				var lent = this.submitIds.indexOf(pro.productId * 1)
 				if (lent >= 0) {
 					this.submitIds.splice(lent, 1)
+					this.checkenProsList.splice(lent, 1)
 				}
 			}
 			this.updateProductCheckedAllBtn(item)
@@ -740,12 +745,14 @@ export default {
 					pros.isChecked = true
 					if (!this.submitIds.includes(pros.productId * 1)) {
 						this.submitIds.push(pros.productId)
+						this.checkenProsList.push(pros)
 					}
 				} else {
 					pros.isChecked = false
 					var lent = this.submitIds.indexOf(pros.productId * 1)
 					if (lent >= 0) {
 						this.submitIds.splice(lent, 1)
+						this.checkenProsList.splice(lent, 1)
 					}
 				}
 			})
@@ -792,7 +799,7 @@ export default {
 					})
 					if(item.promotions.discount == 1){// 支持促销叠加条件的店铺满减 执行
 						prosDiscountNum = parseInt(prosPrice/item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
-						console.log('店铺满减促销叠加通道叠加次数',prosDiscountNum)
+						console.log('店铺满减促销叠加通道叠加次数',`${prosDiscountNum}次`)
 						if (prosPrice >= item.promotions.touchPrice) {// 满足店铺满减条件下执行
 							item.totalPrice = prosPrice - item.promotions.reducedPrice*prosDiscountNum
 							item.reducedPrice = item.promotions.reducedPrice*prosDiscountNum
@@ -802,7 +809,7 @@ export default {
 							item.totalPrice = prosPrice
 						}
 					}else{
-						console.log('店铺满减促销叠加通道')
+						console.log('店铺满减促销叠加通道')
 						if (prosPrice >= item.promotions.touchPrice) {// 满足店铺满减条件下执行
 							item.totalPrice = prosPrice - item.promotions.reducedPrice
 							item.reducedPrice = item.promotions.reducedPrice
@@ -816,18 +823,18 @@ export default {
 					//以下为计算除店铺满减以外的单品满减以及正常商品合计
 					let _totalPrice = 0
 					let _reducedPrice = 0
-					let _discountNum = 0
+					let discountNum = 0
 					let _totalOriginalPrice = 0
 					item.cartList.forEach(pros => {
 						let _price = pros.price * pros.number
 						_totalOriginalPrice += _price
 						if (pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2) {
 							if(pros.promotions.discount == 1){
-								_discountNum = parseInt(_price/pros.promotions.touchPrice)
-								console.log('单品满减促销叠加通道叠加次数',_discountNum)
+								discountNum = parseInt(_price/pros.promotions.touchPrice)
+								console.log('单品满减促销叠加通道叠加次数',`${discountNum}次`)
 								if (_price >= pros.promotions.touchPrice) {
-									_price = _price - pros.promotions.reducedPrice*_discountNum
-									_reducedPrice += pros.promotions.reducedPrice*_discountNum
+									_price = _price - pros.promotions.reducedPrice*discountNum
+									_reducedPrice += pros.promotions.reducedPrice*discountNum
 								}
 								_totalPrice += _price
 							}else{
@@ -876,12 +883,12 @@ export default {
 						if (pros.promotions && pros.promotions.type * 1 === 1 && pros.promotions.mode * 1 === 2) {
 							let _price = pros.price * pros.number
 							if(pros.promotions.discount == 1){
-								let _discountNum = parseInt(_price/pros.promotions.touchPrice)
-								console.log('单品满减促销叠加通道叠加次数',_discountNum)
+								let discountNum = parseInt(_price/pros.promotions.touchPrice)
+								console.log('单品满减促销叠加通道叠加次数',`${discountNum}次`)
 								// 单品满减-重新计算供应商总价/满减金额
 								if ( _price >= pros.promotions.touchPrice) {
-									supplierPrice -= pros.promotions.reducedPrice*_discountNum
-									supplierReducedPrice += pros.promotions.reducedPrice*_discountNum
+									supplierPrice -= pros.promotions.reducedPrice*discountNum
+									supplierReducedPrice += pros.promotions.reducedPrice*discountNum
 								}
 							}else{
 								console.log(' 单品满减非促销叠加通道')
@@ -898,7 +905,7 @@ export default {
 				if (item.promotions && item.promotions.mode * 1 === 2) {
 					if(item.promotions.discount == 1){// 支持促销叠加条件的店铺满减 执行
 						let prosDiscountNum = parseInt(supplierPrice/item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
-						console.log('店铺满减促销叠加通道叠加次数',prosDiscountNum)
+						console.log('店铺满减促销叠加通道叠加次数',`${prosDiscountNum}次`)
 						if (supplierPrice >= item.promotions.touchPrice) {
 							supplierPrice -= item.promotions.reducedPrice*prosDiscountNum
 							supplierReducedPrice += item.promotions.reducedPrice*prosDiscountNum
@@ -924,16 +931,25 @@ export default {
 			this.promotionsList.forEach(promotions => {
 				// 凑单满减
 				if (promotions.mode === 2 && promotions.type === 2) {
-					let total = 0
+					let collecTotal = 0
+					let collecDiscountNum = 0
 					promotions.productList.forEach(pros => {
-						if (this.submitIds.includes(pros.productId * 1)) {
-							total += pros.number * pros.price
-						}
+						collecTotal += this.collecTotalPrice(pros)
 					})
-					if (total >= promotions.touchPrice) {
-						totalPrice -= promotions.reducedPrice
-						reducedPrice += promotions.reducedPrice
-					}
+					if(promotions.discount == 1){// 支持凑单满减促销叠加条件的执行
+						collecDiscountNum += parseInt(collecTotal/promotions.touchPrice) // 凑单满减促销叠加次数 = 凑单商品合计价格/凑单满减促销价格
+						console.log('凑单促销满减叠加通道叠加次数',`${collecDiscountNum}次`)
+						if (collecTotal >= promotions.touchPrice) {
+							totalPrice -= promotions.reducedPrice*collecDiscountNum
+							reducedPrice += promotions.reducedPrice*collecDiscountNum
+						}
+					}else{  
+						console.log('凑单促销满减非叠加通道') 
+						if (collecTotal >= promotions.touchPrice) {
+							totalPrice -= promotions.reducedPrice
+							reducedPrice += promotions.reducedPrice
+						}
+					} 
 				}
 			})
 			// 最后勾选的超级会员优惠价
@@ -944,9 +960,9 @@ export default {
 			this.reducedPrice = reducedPrice
 			// 最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减
 			this.allPrice = totalPrice
-			console.log('最后统计商品原价', this.totalOriginalPrice)
-			console.log('最后满减金额', this.reducedPrice)
-			console.log('最终合计价格', this.allPrice)
+			console.log('最后统计商品原价', `${this.totalOriginalPrice}元`)
+			console.log('最后满减金额', `${this.reducedPrice}元`)
+			console.log('最终合计价格', `${this.allPrice}元`)
 			// 计算优惠券
 			if (this.totalCouponList.length > 0) {
 				let eligibleCoupons = this.calculationCoupon()
@@ -960,13 +976,18 @@ export default {
 			}
 			// 最终优惠金额 = 促销优惠金额 + 优惠券优惠金额 + 超级会员优惠金额 
 			this.totalDiscountAmount = this.reducedPrice + this.couponPrice + this.svipReducedPrice
-			console.log('最终优惠金额', this.totalDiscountAmount)
+			console.log('最终优惠金额', `${this.totalDiscountAmount}元`)
 			// 控制显示优惠明细
-			if (this.totalDiscountAmount > 0) {
-				this.isDiscount = true
-			} else {
-				this.isDiscount = false
-			}
+			this.isDiscount = this.totalDiscountAmount > 0 ? true : false
+		},
+		collecTotalPrice(pros){// 凑单满减计算勾选的凑单商品总价
+			let price 
+			this.checkenProsList.find(el => {
+				if(pros.productId == el.productId ){
+					price = el.number * el.price
+				}
+			})
+			return price
 		},
 		totalCount() {
 			//计算总数量

+ 326 - 311
components/cm-module/creatOrder/coupon.vue

@@ -1,8 +1,7 @@
 <template name="coupon">
 	<view class="coupon-template">
 		<view class="coupon-title" @tap.stop="showPopup">
-			<text class="text">优惠券:</text>
-			<text class="text-coupon">-¥{{ coupon.couponAmount | NumFormat }}</text>
+			<text class="text">优惠券:</text> <text class="text-coupon">-¥{{ coupon.couponAmount | NumFormat }}</text>
 			<text class="iconfont icon-xiayibu"></text>
 		</view>
 		<!-- 优惠券 -->
@@ -13,16 +12,18 @@
 					<view class="title-r" @click="showExchangePopup">兑换优惠券</view>
 				</view>
 				<div class="tui-popup-main coupon">
-					<scroll-view class="tui-popup-scroll"  scroll-y="true">
-						<view v-for="(coupon,index) in dataList" :key="index" class="coupon-list"  @click.stop="checkedCoupon(index)">
+					<scroll-view class="tui-popup-scroll" scroll-y="true">
+						<view
+							v-for="(coupon, index) in dataList"
+							:key="index"
+							class="coupon-list"
+							@click.stop="checkedCoupon(index)"
+						>
 							<view class="list-cell-le">
 								<view class="coupon-maxMoney">
-									<text class="small">¥</text>
-									{{ coupon.couponAmount }}
-								</view>
-								<view class="coupon-minMoney">
-									满{{ coupon.touchPrice }}可用
+									<text class="small">¥</text> {{ coupon.couponAmount }}
 								</view>
+								<view class="coupon-minMoney"> 满{{ coupon.touchPrice }}可用 </view>
 							</view>
 							<view class="list-cell-ri">
 								<view class="list-cell-top">
@@ -32,19 +33,32 @@
 										</view>
 										<view class="list-cell-texts">
 											<text v-if="coupon.couponType == 0">
-												{{ coupon.productType && coupon.productType == 1 ? '全商城商品通用' : '仅可购买指定商品'  }}
+												{{
+													coupon.productType && coupon.productType == 1
+														? '全商城商品通用'
+														: '仅可购买指定商品'
+												}}
 											</text>
 											<text v-if="coupon.couponType == 1">
-												{{ coupon.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
+												{{
+													coupon.categoryType == 1
+														? '仅限购买产品类商品'
+														: '仅限购买仪器类商品'
+												}}
 											</text>
-											<text v-if="coupon.couponType == 3">仅限购买店铺【{{ coupon.shopName }}】的商品</text>
-											<text v-if="coupon.couponType == 4 || coupon.couponType == 2">全商城商品通用</text>
+											<text v-if="coupon.couponType == 3"
+												>仅限购买店铺【{{ coupon.shopName }}】的商品</text
+											>
+											<text v-if="coupon.couponType == 4 || coupon.couponType == 2"
+												>全商城商品通用</text
+											>
 										</view>
 									</view>
 									<view class="list-cell-btn">
 										<view class="list-cell-checkbox">
-											<view class="checkbox iconfont"											 
-												  :class="[ coupon.ischecked ? 'icon-yixuanze' : 'icon-weixuanze' ]"
+											<view
+												class="checkbox iconfont"
+												:class="[coupon.ischecked ? 'icon-yixuanze' : 'icon-weixuanze']"
 											>
 											</view>
 										</view>
@@ -55,346 +69,347 @@
 						</view>
 					</scroll-view>
 				</div>
-				<view class="tui-right-flex tui-popup-btn">
-					<view class="tui-flex-1">
-						<view class="tui-button" @click="hidePopup">确定</view>
-					</view>
+				<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+					<view class="tui-flex-1"> <view class="tui-button" @click="hidePopup">确定</view> </view>
 				</view>
-			</view>	
-		</tui-bottom-popup>	
+			</view>
+		</tui-bottom-popup>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'coupon',
-		props:{
-			couponList:{
-				type:Array
+export default {
+	name: 'coupon',
+	props: {
+		couponList: {
+			type: Array
+		}
+	},
+	data() {
+		return {
+			popupShow: false,
+			isIphoneX: this.$store.state.isIphoneX,
+			checkedIndex: 0,
+			dataList: [],
+			coupon: {
+				couponAmount: 0,
+				clubCouponId: 0
 			}
+		}
+	},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			return Number(value).toFixed(2)
 		},
-		data() {
-			return{
-				popupShow:false,
-				isIphoneX:this.$store.state.isIphoneX,
-				checkedIndex:0,
-				dataList:[],
-				coupon:{
-					couponAmount:0,
-					clubCouponId:0,
-				},
+		TypeFormat(value) {
+			switch (value) {
+				case 0:
+					return '活动券'
+					break
+				case 1:
+					return '品类券'
+					break
+				case 2:
+					return '用户专享券'
+					break
+				case 3:
+					return '店铺券'
+					break
+				case 4:
+					return '新用户券'
+					break
 			}
-		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2)
+		}
+	},
+	created() {
+		this.initData(this.couponList)
+	},
+	watch: {
+		couponList: {
+			handler: function(el) {
+				//监听对象的变换使用 function,箭头函数容易出现this指向不正确
+				console.log(el)
+				this.couponList = el
 			},
-			TypeFormat(value) {
-				switch (value) {
-					case 0:
-						return  '活动券'
-						break
-					case 1:
-						return  '品类券'
-						break
-					case 2:
-						return  '用户专享券'
-						break
-					case 3:
-						return  '店铺券'
-						break
-					case 4:
-						return  '新用户券'
-						break
-				}
-			}
-		},	
-		created(){
-			this.initData(this.couponList)
-		},
-		watch: {
-			couponList: {
-				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
-					console.log(el)
-					this.couponList = el
-				},
-				deep: true
+			deep: true
+		}
+	},
+	methods: {
+		initData(data) {
+			if (data.length > 0) {
+				data.forEach((el, index) => {
+					this.dataList.push(Object.assign({}, el, { ischecked: false }))
+				})
+				this.coupon.couponAmount = data[0].couponAmount
+				this.dataList[0].ischecked = true
 			}
 		},
-		methods:{
-			initData(data){
-				if(data.length>0){
-					data.forEach((el,index) => {
-						this.dataList.push(Object.assign({},el,{ischecked:false}))
-					})
-					this.coupon.couponAmount = data[0].couponAmount
-					this.dataList[0].ischecked = true
+		checkedCoupon(idx) {
+			// 选择优惠券
+			this.checkedIndex = idx
+			this.dataList.forEach((el, index) => {
+				if (this.checkedIndex == index) {
+					el.ischecked = !el.ischecked
+				} else {
+					el.ischecked = false
 				}
-			},
-			checkedCoupon(idx){// 选择优惠券
-				this.checkedIndex = idx
-				this.dataList.forEach((el,index) => {
-					if(this.checkedIndex == index){
-						el.ischecked = !el.ischecked
-					}else{
-						el.ischecked = false
-					}
-				})
-			},
-			showExchangePopup(){
-				this.popupShow = false
-				this.$parent.isExchangePopup = true
-			},
-			showPopup(){
-				this.popupShow = true
-			},
-			hidePopup(){
-				this.popupShow = false
-				let coupon = {
-						couponAmount:0,
-						clubCouponId:0,
-					}
-				this.dataList.forEach((el,index) => {
-					if(el.ischecked){
-						coupon.couponAmount = el.couponAmount
-						coupon.clubCouponId = el.clubCouponId
-					}
-				})
-				this.coupon = coupon
-				this.$emit('handleChoiceaCoupon',this.coupon)
+			})
+		},
+		showExchangePopup() {
+			this.popupShow = false
+			this.$parent.isExchangePopup = true
+		},
+		showPopup() {
+			this.popupShow = true
+		},
+		hidePopup() {
+			this.popupShow = false
+			let coupon = {
+				couponAmount: 0,
+				clubCouponId: 0
 			}
+			this.dataList.forEach((el, index) => {
+				if (el.ischecked) {
+					coupon.couponAmount = el.couponAmount
+					coupon.clubCouponId = el.clubCouponId
+				}
+			})
+			this.coupon = coupon
+			this.$emit('handleChoiceaCoupon', this.coupon)
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.coupon-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		.coupon-title{
-			width: 702rpx;
-			padding: 0 24rpx;
-			height: 88rpx;
-			line-height: 88rpx;
-			position: relative;
-			.text{
-				font-size: $font-size-28;
-				color: $text-color;
-			}
-			.text-coupon{
-				display: inline-block;
-				float: right;
-				padding-right: 30rpx;
-				line-height: 88rpx;
-				font-size: 28rpx;
-				color: #f94b4b;
-			}
-			.iconfont{
-				width: 50rpx;
-				height: 88rpx;
-				line-height: 88rpx;
-				color: #999999;
-				display: block;
-				position: absolute;
-				right: 0;
-				top: 0;
-			}
-		}
-	}	
-	.tui-popup-box {
+.coupon-template {
+	width: 100%;
+	height: auto;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	.coupon-title {
+		width: 702rpx;
+		padding: 0 24rpx;
+		height: 88rpx;
+		line-height: 88rpx;
 		position: relative;
-		box-sizing: border-box;
-		min-height: 220rpx;
-		padding:24rpx 24rpx 0 24rpx;
-		.title{
-			font-size: $font-size-34;
+		.text {
+			font-size: $font-size-28;
 			color: $text-color;
+		}
+		.text-coupon {
+			display: inline-block;
+			float: right;
+			padding-right: 30rpx;
 			line-height: 88rpx;
-			text-align: center;
-			float: left;
-			width: 100%;
+			font-size: 28rpx;
+			color: #f94b4b;
+		}
+		.iconfont {
+			width: 50rpx;
 			height: 88rpx;
-			display: flex;
-			box-sizing: border-box;
-			padding: 0 24rpx;
-			.title-l{
-				flex: 1;
-				text-align: left;
-			}
-			.title-r{
-				flex: 1;
-				text-align: right;
-				color: #f94b4b;
-			}
+			line-height: 88rpx;
+			color: #999999;
+			display: block;
+			position: absolute;
+			right: 0;
+			top: 0;
 		}
-		.tui-popup-main{
+	}
+}
+.tui-popup-box {
+	position: relative;
+	box-sizing: border-box;
+	min-height: 220rpx;
+	padding: 24rpx 24rpx 0 24rpx;
+	.title {
+		font-size: $font-size-34;
+		color: $text-color;
+		line-height: 88rpx;
+		text-align: center;
+		float: left;
+		width: 100%;
+		height: 88rpx;
+		display: flex;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+		.title-l {
+			flex: 1;
+			text-align: left;
+		}
+		.title-r {
+			flex: 1;
+			text-align: right;
+			color: #f94b4b;
+		}
+	}
+	.tui-popup-main {
+		width: 100%;
+		float: left;
+		padding-top: 10rpx;
+		.tui-popup-scroll {
 			width: 100%;
-			float: left;
-			padding-top: 10rpx;
-			.tui-popup-scroll{
+			height: 600rpx;
+			.coupon-list {
 				width: 100%;
-				height: 600rpx;
-				.coupon-list{
-					width: 100%;
-					height: 200rpx;
-					margin-bottom: 24rpx;
+				height: 200rpx;
+				margin-bottom: 24rpx;
+				box-sizing: border-box;
+				background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
+				background-size: cover;
+				.list-cell-le {
+					width: 224rpx;
+					height: 100%;
 					box-sizing: border-box;
-					background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
-					background-size: cover;
-					.list-cell-le{
-						width: 224rpx;
-						height: 100%;
-						box-sizing: border-box;
-						padding: 37rpx 0;
-						float: left;
-						.coupon-maxMoney{
-							width: 100%;
-							height: 78rpx;
-							line-height: 78rpx;
-							font-size: 56rpx;
-							color: #FFFFFF;
-							text-align: center;
-							.small{
-								font-size: $font-size-24;
-							}
-						}
-						.coupon-minMoney{
-							width: 100%;
-							height: 33rpx;
-							line-height: 33rpx;
+					padding: 37rpx 0;
+					float: left;
+					.coupon-maxMoney {
+						width: 100%;
+						height: 78rpx;
+						line-height: 78rpx;
+						font-size: 56rpx;
+						color: #ffffff;
+						text-align: center;
+						.small {
 							font-size: $font-size-24;
-							color: #FFFFFF;
-							text-align: center;
 						}
 					}
-					.list-cell-ri{
-						width: 478rpx;
-						height: 100%;
-						box-sizing: border-box;
-						padding: 20rpx 24rpx 0 24rpx;
-						float: right;
-						.list-cell-top{
-							width: 100%;
-							height: 121rpx;
+					.coupon-minMoney {
+						width: 100%;
+						height: 33rpx;
+						line-height: 33rpx;
+						font-size: $font-size-24;
+						color: #ffffff;
+						text-align: center;
+					}
+				}
+				.list-cell-ri {
+					width: 478rpx;
+					height: 100%;
+					box-sizing: border-box;
+					padding: 20rpx 24rpx 0 24rpx;
+					float: right;
+					.list-cell-top {
+						width: 100%;
+						height: 121rpx;
+						float: left;
+						border-bottom: 1px solid #e1e1e1;
+						.list-cell-type {
+							width: 286rpx;
+							height: 100%;
 							float: left;
-							border-bottom: 1px solid #e1e1e1;
-							.list-cell-type{
-								width: 286rpx;
-								height: 100%;
-								float: left;
-								.list-cell-tags{
-									width: 100%;
+							.list-cell-tags {
+								width: 100%;
+								height: 32rpx;
+								margin-bottom: 7rpx;
+								.tags {
+									display: inline-block;
+									padding: 0 10rpx;
 									height: 32rpx;
-									margin-bottom: 7rpx;
-									.tags{
-										display: inline-block;
-										padding: 0 10rpx;
-										height: 32rpx;
-										line-height: 32rpx;
-										background-color: #ffdcce;
-										color: #f94b4b;
-										font-size: $font-size-20;
-										border-radius: 8rpx;
-										text-align: center;
-										float: left;
-									}
-								}
-								.list-cell-texts{
-									width: 100%;
-									height: auto;
-									line-height:35rpx;
-									text-overflow:ellipsis;
-									display: -webkit-box;
-									word-break: break-all;
-									-webkit-box-orient: vertical;
-									-webkit-line-clamp: 2;
-									overflow: hidden;
-									font-size: 26rpx;
-									color: #333333;
+									line-height: 32rpx;
+									background-color: #ffdcce;
+									color: #f94b4b;
+									font-size: $font-size-20;
+									border-radius: 8rpx;
+									text-align: center;
+									float: left;
 								}
 							}
-							.list-cell-btn{
-								width: 128rpx;
-								height: 100%;
-								float: right;
-								.list-cell-checkbox{
-									width: 100%;
-									height: 50%;
-									.checkbox{
-										width: 40rpx;
-										line-height: 60rpx;
-										float: right;
-										box-sizing: border-box;
-										text-align: center;
-										text-decoration: none;
-										-webkit-tap-highlight-color: transparent;
-										overflow: hidden;
-										color: #f94b4b;
-									}
-								}
+							.list-cell-texts {
+								width: 100%;
+								height: auto;
+								line-height: 35rpx;
+								text-overflow: ellipsis;
+								display: -webkit-box;
+								word-break: break-all;
+								-webkit-box-orient: vertical;
+								-webkit-line-clamp: 2;
+								overflow: hidden;
+								font-size: 26rpx;
+								color: #333333;
 							}
 						}
-						.list-cell-time{
-							width: 100%;
-							height: 58rpx;
-							line-height: 58rpx;
-							text-align: left;
-							font-size: $font-size-20;
-							color: #999999;
+						.list-cell-btn {
+							width: 128rpx;
+							height: 100%;
+							float: right;
+							.list-cell-checkbox {
+								width: 100%;
+								height: 50%;
+								.checkbox {
+									width: 40rpx;
+									line-height: 60rpx;
+									float: right;
+									box-sizing: border-box;
+									text-align: center;
+									text-decoration: none;
+									-webkit-tap-highlight-color: transparent;
+									overflow: hidden;
+									color: #f94b4b;
+								}
+							}
 						}
 					}
+					.list-cell-time {
+						width: 100%;
+						height: 58rpx;
+						line-height: 58rpx;
+						text-align: left;
+						font-size: $font-size-20;
+						color: #999999;
+					}
 				}
-			}	
-			.tui-popup-coupon{
+			}
+		}
+		.tui-popup-coupon {
+			width: 100%;
+			height: 500rpx;
+			box-sizing: border-box;
+			padding: 30rpx 20rpx;
+			.tui-popup-h1 {
 				width: 100%;
-				height: 500rpx;
-				box-sizing: border-box;
-				padding:30rpx 20rpx;
-				.tui-popup-h1{
-					width: 100%;
+				height: 66rpx;
+				display: flex;
+				align-items: center;
+				.tui-popup-text {
+					flex: 1;
 					height: 66rpx;
-					display: flex;
-					align-items: center;
-					.tui-popup-text{
-						flex: 1;
-						height: 66rpx;
-						line-height: 66rpx;
-						font-size: $font-size-30;
-						color: #333333;
-						&.red{
-							color: #f94b4b;
-						}
-						&.bold{
-							font-weight: bold;
-						}
-						&.left{
-							text-align: left;
-						}
-						&.right{
-							text-align: right;
-						}
+					line-height: 66rpx;
+					font-size: $font-size-30;
+					color: #333333;
+					&.red {
+						color: #f94b4b;
+					}
+					&.bold {
+						font-weight: bold;
+					}
+					&.left {
+						text-align: left;
+					}
+					&.right {
+						text-align: right;
 					}
 				}
 			}
+	}
 		}
-		.tui-popup-btn {
+	.tui-popup-btn {
+		width: 100%;
+		height: auto;
+		float: left;
+		margin-top: 24rpx;
+		.tui-button {
 			width: 100%;
-			height: auto;
-			float: left;
-			margin-top: 24rpx;
-			.tui-button{
-				width: 100%;
-				height: 88rpx;
-				background: $btn-confirm;
-				line-height: 88rpx;
-				text-align: center;
-				color: #FFFFFF;
-				font-size: $font-size-28;
-				border-radius: 44rpx;
-			}
+			height: 88rpx;
+			background: $btn-confirm;
+			line-height: 88rpx;
+			text-align: center;
+			color: #ffffff;
+			font-size: $font-size-28;
+			border-radius: 44rpx;
 		}
-	}		
+	}
+}
 </style>

+ 359 - 340
components/cm-module/creatOrder/sellerCoupon.vue

@@ -1,8 +1,7 @@
 <template name="coupon">
 	<view class="coupon-template">
 		<view class="coupon-title" @tap.stop="showPopup">
-			<text class="text">优惠券:</text>
-			<text class="text-coupon">-¥{{ coupon.couponAmount | NumFormat }}</text>
+			<text class="text">优惠券:</text> <text class="text-coupon">-¥{{ coupon.couponAmount | NumFormat }}</text>
 			<text class="iconfont icon-xiayibu"></text>
 		</view>
 		<!-- 优惠券 -->
@@ -13,21 +12,27 @@
 					<view class="title-r" @click="showExchangePopup">兑换优惠券</view>
 				</view>
 				<div class="tui-popup-main coupon">
-					<scroll-view class="tui-popup-scroll"  scroll-y="true">
+					<scroll-view class="tui-popup-scroll" scroll-y="true">
 						<view class="coupon-empty" v-if="isCouponEmpty">
-							<image class="empty-container-image" :src="StaticUrl+'/icon/icon-coupon-empty@2x.png'"></image>
+							<image
+								class="empty-container-image"
+								:src="StaticUrl + '/icon/icon-coupon-empty@2x.png'"
+							></image>
 							<text class="error-text">暂无可用优惠券~</text>
 						</view>
 						<template>
-							<view v-for="(coupon,index) in dataList" :key="index" class="coupon-list"  @click.stop="checkedCoupon(index)" v-if="dataList.length>0">
+							<view
+								v-for="(coupon, index) in dataList"
+								:key="index"
+								class="coupon-list"
+								@click.stop="checkedCoupon(index)"
+								v-if="dataList.length > 0"
+							>
 								<view class="list-cell-le">
 									<view class="coupon-maxMoney">
-										<text class="small">¥</text>
-										{{ coupon.couponAmount }}
-									</view>
-									<view class="coupon-minMoney">
-										满{{ coupon.touchPrice }}可用
+										<text class="small">¥</text> {{ coupon.couponAmount }}
 									</view>
+									<view class="coupon-minMoney"> 满{{ coupon.touchPrice }}可用 </view>
 								</view>
 								<view class="list-cell-ri">
 									<view class="list-cell-top">
@@ -37,19 +42,32 @@
 											</view>
 											<view class="list-cell-texts">
 												<text v-if="coupon.couponType == 0">
-													{{ coupon.productType && coupon.productType == 1 ? '全商城商品通用' : '仅可购买指定商品'  }}
+													{{
+														coupon.productType && coupon.productType == 1
+															? '全商城商品通用'
+															: '仅可购买指定商品'
+													}}
 												</text>
 												<text v-if="coupon.couponType == 1">
-													{{ coupon.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
+													{{
+														coupon.categoryType == 1
+															? '仅限购买产品类商品'
+															: '仅限购买仪器类商品'
+													}}
 												</text>
-												<text v-if="coupon.couponType == 3">仅限购买店铺【{{ coupon.shopName }}】的商品</text>
-												<text v-if="coupon.couponType == 4 || coupon.couponType == 2">全商城商品通用</text>
+												<text v-if="coupon.couponType == 3"
+													>仅限购买店铺【{{ coupon.shopName }}】的商品</text
+												>
+												<text v-if="coupon.couponType == 4 || coupon.couponType == 2"
+													>全商城商品通用</text
+												>
 											</view>
 										</view>
 										<view class="list-cell-btn">
 											<view class="list-cell-checkbox">
-												<view class="checkbox iconfont"											 
-													  :class="[coupon.ischecked ?'icon-yixuanze':'icon-weixuanze']"
+												<view
+													class="checkbox iconfont"
+													:class="[coupon.ischecked ? 'icon-yixuanze' : 'icon-weixuanze']"
 												>
 												</view>
 											</view>
@@ -61,377 +79,378 @@
 						</template>
 					</scroll-view>
 				</div>
-				<view class="tui-right-flex tui-popup-btn">
-					<view class="tui-flex-1">
-						<view class="tui-button" @click="hidePopup">确定</view>
-					</view>
+				<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+					<view class="tui-flex-1"> <view class="tui-button" @click="hidePopup">确定</view> </view>
 				</view>
-			</view>	
-		</tui-bottom-popup>	
+			</view>
+		</tui-bottom-popup>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'coupon',
-		props:{
-			couponList:{
-				type:Array
+export default {
+	name: 'coupon',
+	props: {
+		couponList: {
+			type: Array
+		}
+	},
+	data() {
+		return {
+			StaticUrl: this.$Static, //静态图片路径
+			isIphoneX: this.$store.state.isIphoneX,
+			popupShow: false,
+			isCouponEmpty: false,
+			checkedIndex: null,
+			dataList: [],
+			coupon: {
+				couponAmount: 0,
+				clubCouponId: 0
 			}
+		}
+	},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			return Number(value).toFixed(2)
 		},
-		data() {
-			return{
-				StaticUrl:this.$Static, //静态图片路径
-				isIphoneX:this.$store.state.isIphoneX,
-				popupShow:false,
-				isCouponEmpty:false,
-				checkedIndex:null,
-				dataList:[],
-				coupon:{
-					couponAmount:0,
-					clubCouponId:0,
-				},
+		TypeFormat(value) {
+			switch (value) {
+				case 0:
+					return '活动券'
+					break
+				case 1:
+					return '品类券'
+					break
+				case 2:
+					return '用户专享券'
+					break
+				case 3:
+					return '店铺券'
+					break
+				case 4:
+					return '新用户券'
+					break
 			}
-		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2)
+		}
+	},
+	created() {
+		this.initData(this.couponList)
+	},
+	watch: {
+		couponList: {
+			handler: function(el) {
+				//监听对象的变换使用 function,箭头函数容易出现this指向不正确
+				console.log(el)
+				this.couponList = el
 			},
-			TypeFormat(value) {
-				switch (value) {
-					case 0:
-						return  '活动券'
-						break
-					case 1:
-						return  '品类券'
-						break
-					case 2:
-						return  '用户专享券'
-						break
-					case 3:
-						return  '店铺券'
-						break
-					case 4:
-						return  '新用户券'
-						break
-				}
+			deep: true
+		}
+	},
+	methods: {
+		initData(data) {
+			if (data.length > 0) {
+				data.forEach((el, index) => {
+					this.dataList.push(Object.assign({}, el, { ischecked: false }))
+				})
+				this.coupon.couponAmount = data[0].couponAmount
+				this.dataList[0].ischecked = true
+				this.isCouponEmpty = false
+			} else {
+				this.isCouponEmpty = true
 			}
-		},	
-		created(){
-			this.initData(this.couponList)
 		},
-		watch: {
-			couponList: {
-				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
-					console.log(el)
-					this.couponList = el
-				},
-				deep: true
+		checkedCoupon(idx) {
+			// 选择优惠券
+			this.checkedIndex = idx
+			this.dataList.forEach((el, index) => {
+				if (this.checkedIndex == index) {
+					el.ischecked = !el.ischecked
+				} else {
+					el.ischecked = false
+				}
+			})
+		},
+		showExchangePopup() {
+			this.popupShow = false
+			this.$parent.isExchangePopup = true
+		},
+		showPopup() {
+			if (this.$parent.rebatecheck) {
+				this.$util.msg('返佣订单不能使用优惠券', 2000)
+			} else {
+				this.popupShow = true
 			}
 		},
-		methods:{
-			initData(data){
-				if(data.length>0){
-					data.forEach((el,index) => {
-						this.dataList.push(Object.assign({},el,{ischecked:false}))
-					})
-					this.coupon.couponAmount = data[0].couponAmount
-					this.dataList[0].ischecked = true
-					this.isCouponEmpty = false
-				}else{
-					this.isCouponEmpty = true
-				}
-			},
-			checkedCoupon(idx){// 选择优惠券
-				this.checkedIndex = idx
-				this.dataList.forEach((el,index) => {
-					if(this.checkedIndex == index){
-						el.ischecked = !el.ischecked
-					}else{
-						el.ischecked = false
-					}
-				})
-			},
-			showExchangePopup(){
-				this.popupShow = false
-				this.$parent.isExchangePopup = true
-			},
-			showPopup(){
-				if(this.$parent.rebatecheck){
-					this.$util.msg('返佣订单不能使用优惠券',2000)
-				}else{
-					this.popupShow = true
-				}
-			},
-			hidePopup(){
-				this.popupShow = false
-				let coupon = {
-						couponAmount:0,
-						clubCouponId:0,
-					}
-				this.dataList.forEach((el,index) => {
-					if(el.ischecked){
-						coupon.couponAmount = el.couponAmount
-						coupon.clubCouponId = el.clubCouponId
-					}
-				})
-				this.coupon = coupon
-				this.$emit('handleChoiceaCoupon',this.coupon)
+		hidePopup() {
+			this.popupShow = false
+			let coupon = {
+				couponAmount: 0,
+				clubCouponId: 0
 			}
+			this.dataList.forEach((el, index) => {
+				if (el.ischecked) {
+					coupon.couponAmount = el.couponAmount
+					coupon.clubCouponId = el.clubCouponId
+				}
+			})
+			this.coupon = coupon
+			this.$emit('handleChoiceaCoupon', this.coupon)
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.coupon-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		.coupon-title{
-			width: 702rpx;
-			padding: 0 24rpx;
-			height: 88rpx;
-			line-height: 88rpx;
-			position: relative;
-			.text{
-				font-size: $font-size-28;
-				color: $text-color;
-				font-weight: bold;
-			}
-			.text-coupon{
-				display: inline-block;
-				float: right;
-				padding-right: 30rpx;
-				line-height: 88rpx;
-				font-size: 28rpx;
-				color: #f94b4b;
-			}
-			.iconfont{
-				width: 50rpx;
-				height: 88rpx;
-				line-height: 88rpx;
-				color: #999999;
-				display: block;
-				position: absolute;
-				right: 0;
-				top: 0;
-			}
-		}
-	}	
-	.tui-popup-box {
+.coupon-template {
+	width: 100%;
+	height: auto;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	.coupon-title {
+		width: 702rpx;
+		padding: 0 24rpx;
+		height: 88rpx;
+		line-height: 88rpx;
 		position: relative;
-		box-sizing: border-box;
-		min-height: 220rpx;
-		padding:24rpx 24rpx 0 24rpx;
-		.title{
-			font-size: $font-size-34;
+		.text {
+			font-size: $font-size-28;
 			color: $text-color;
+			font-weight: bold;
+		}
+		.text-coupon {
+			display: inline-block;
+			float: right;
+			padding-right: 30rpx;
 			line-height: 88rpx;
-			text-align: center;
-			float: left;
-			width: 100%;
+			font-size: 28rpx;
+			color: #f94b4b;
+		}
+		.iconfont {
+			width: 50rpx;
 			height: 88rpx;
-			display: flex;
-			box-sizing: border-box;
-			padding: 0 24rpx;
-			.title-l{
-				flex: 1;
-				text-align: left;
-			}
-			.title-r{
-				flex: 1;
-				text-align: right;
-				color: #f94b4b;
-			}
+			line-height: 88rpx;
+			color: #999999;
+			display: block;
+			position: absolute;
+			right: 0;
+			top: 0;
+		}
+	}
+}
+.tui-popup-box {
+	position: relative;
+	box-sizing: border-box;
+	min-height: 220rpx;
+	padding: 24rpx 24rpx 0 24rpx;
+	.title {
+		font-size: $font-size-34;
+		color: $text-color;
+		line-height: 88rpx;
+		text-align: center;
+		float: left;
+		width: 100%;
+		height: 88rpx;
+		display: flex;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+		.title-l {
+			flex: 1;
+			text-align: left;
 		}
-		.tui-popup-main{
+		.title-r {
+			flex: 1;
+			text-align: right;
+			color: #f94b4b;
+		}
+	}
+	.tui-popup-main {
+		width: 100%;
+		float: left;
+		padding-top: 10rpx;
+		.tui-popup-scroll {
 			width: 100%;
-			float: left;
-			padding-top: 10rpx;
-			.tui-popup-scroll{
+			height: 600rpx;
+			.coupon-empty {
 				width: 100%;
 				height: 600rpx;
-				.coupon-empty{
-					width: 100%;
-					height: 600rpx;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					flex-direction: column;
-					position: fixed;
-					background: $bg-color;
-					.empty-container-image{
-						width: 150rpx;
-						height: 150rpx;
-						margin-bottom: 0;
-						margin-top: 0;
-					}
-					.error-text{
-						font-size: $font-size-28;
-						color: #999999;
-						line-height: 88rpx;
-					}
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				flex-direction: column;
+				position: fixed;
+				background: $bg-color;
+				.empty-container-image {
+					width: 150rpx;
+					height: 150rpx;
+					margin-bottom: 0;
+					margin-top: 0;
 				}
-				.coupon-list{
-					width: 100%;
-					height: 200rpx;
-					margin-bottom: 24rpx;
+				.error-text {
+					font-size: $font-size-28;
+					color: #999999;
+					line-height: 88rpx;
+				}
+			}
+			.coupon-list {
+				width: 100%;
+				height: 200rpx;
+				margin-bottom: 24rpx;
+				box-sizing: border-box;
+				background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
+				background-size: cover;
+				.list-cell-le {
+					width: 224rpx;
+					height: 100%;
 					box-sizing: border-box;
-					background: url(https://static.caimei365.com/app/img/icon/icon-coupon-uesb@2x.png);
-					background-size: cover;
-					.list-cell-le{
-						width: 224rpx;
-						height: 100%;
-						box-sizing: border-box;
-						padding: 37rpx 0;
-						float: left;
-						.coupon-maxMoney{
-							width: 100%;
-							height: 78rpx;
-							line-height: 78rpx;
-							font-size: 56rpx;
-							color: #FFFFFF;
-							text-align: center;
-							.small{
-								font-size: $font-size-24;
-							}
-						}
-						.coupon-minMoney{
-							width: 100%;
-							height: 33rpx;
-							line-height: 33rpx;
+					padding: 37rpx 0;
+					float: left;
+					.coupon-maxMoney {
+						width: 100%;
+						height: 78rpx;
+						line-height: 78rpx;
+						font-size: 56rpx;
+						color: #ffffff;
+						text-align: center;
+						.small {
 							font-size: $font-size-24;
-							color: #FFFFFF;
-							text-align: center;
 						}
 					}
-					.list-cell-ri{
-						width: 478rpx;
-						height: 100%;
-						box-sizing: border-box;
-						padding: 20rpx 24rpx 0 24rpx;
-						float: right;
-						.list-cell-top{
-							width: 100%;
-							height: 121rpx;
+					.coupon-minMoney {
+						width: 100%;
+						height: 33rpx;
+						line-height: 33rpx;
+						font-size: $font-size-24;
+						color: #ffffff;
+						text-align: center;
+					}
+				}
+				.list-cell-ri {
+					width: 478rpx;
+					height: 100%;
+					box-sizing: border-box;
+					padding: 20rpx 24rpx 0 24rpx;
+					float: right;
+					.list-cell-top {
+						width: 100%;
+						height: 121rpx;
+						float: left;
+						border-bottom: 1px solid #e1e1e1;
+						.list-cell-type {
+							width: 286rpx;
+							height: 100%;
 							float: left;
-							border-bottom: 1px solid #e1e1e1;
-							.list-cell-type{
-								width: 286rpx;
-								height: 100%;
-								float: left;
-								.list-cell-tags{
-									width: 100%;
+							.list-cell-tags {
+								width: 100%;
+								height: 32rpx;
+								margin-bottom: 7rpx;
+								.tags {
+									display: inline-block;
+									padding: 0 10rpx;
 									height: 32rpx;
-									margin-bottom: 7rpx;
-									.tags{
-										display: inline-block;
-										padding: 0 10rpx;
-										height: 32rpx;
-										line-height: 32rpx;
-										background-color: #ffdcce;
-										color: #f94b4b;
-										font-size: $font-size-20;
-										border-radius: 8rpx;
-										text-align: center;
-										float: left;
-									}
-								}
-								.list-cell-texts{
-									width: 100%;
-									height: auto;
-									line-height:35rpx;
-									text-overflow:ellipsis;
-									display: -webkit-box;
-									word-break: break-all;
-									-webkit-box-orient: vertical;
-									-webkit-line-clamp: 2;
-									overflow: hidden;
-									font-size: 26rpx;
-									color: #333333;
+									line-height: 32rpx;
+									background-color: #ffdcce;
+									color: #f94b4b;
+									font-size: $font-size-20;
+									border-radius: 8rpx;
+									text-align: center;
+									float: left;
 								}
 							}
-							.list-cell-btn{
-								width: 128rpx;
-								height: 100%;
-								float: right;
-								.list-cell-checkbox{
-									width: 100%;
-									height: 50%;
-									.checkbox{
-										width: 40rpx;
-										line-height: 60rpx;
-										float: right;
-										box-sizing: border-box;
-										text-align: center;
-										text-decoration: none;
-										-webkit-tap-highlight-color: transparent;
-										overflow: hidden;
-										color: #f94b4b;
-									}
-								}
+							.list-cell-texts {
+								width: 100%;
+								height: auto;
+								line-height: 35rpx;
+								text-overflow: ellipsis;
+								display: -webkit-box;
+								word-break: break-all;
+								-webkit-box-orient: vertical;
+								-webkit-line-clamp: 2;
+								overflow: hidden;
+								font-size: 26rpx;
+								color: #333333;
 							}
 						}
-						.list-cell-time{
-							width: 100%;
-							height: 58rpx;
-							line-height: 58rpx;
-							text-align: left;
-							font-size: $font-size-20;
-							color: #999999;
+						.list-cell-btn {
+							width: 128rpx;
+							height: 100%;
+							float: right;
+							.list-cell-checkbox {
+								width: 100%;
+								height: 50%;
+								.checkbox {
+									width: 40rpx;
+									line-height: 60rpx;
+									float: right;
+									box-sizing: border-box;
+									text-align: center;
+									text-decoration: none;
+									-webkit-tap-highlight-color: transparent;
+									overflow: hidden;
+									color: #f94b4b;
+								}
+							}
 						}
 					}
+					.list-cell-time {
+						width: 100%;
+						height: 58rpx;
+						line-height: 58rpx;
+						text-align: left;
+						font-size: $font-size-20;
+						color: #999999;
+					}
 				}
-			}	
-			.tui-popup-coupon{
+			}
+		}
+		.tui-popup-coupon {
+			width: 100%;
+			height: 500rpx;
+			box-sizing: border-box;
+			padding: 30rpx 20rpx;
+			.tui-popup-h1 {
 				width: 100%;
-				height: 500rpx;
-				box-sizing: border-box;
-				padding:30rpx 20rpx;
-				.tui-popup-h1{
-					width: 100%;
+				height: 66rpx;
+				display: flex;
+				align-items: center;
+				.tui-popup-text {
+					flex: 1;
 					height: 66rpx;
-					display: flex;
-					align-items: center;
-					.tui-popup-text{
-						flex: 1;
-						height: 66rpx;
-						line-height: 66rpx;
-						font-size: $font-size-30;
-						color: #333333;
-						&.red{
-							color: #f94b4b;
-						}
-						&.bold{
-							font-weight: bold;
-						}
-						&.left{
-							text-align: left;
-						}
-						&.right{
-							text-align: right;
-						}
+					line-height: 66rpx;
+					font-size: $font-size-30;
+					color: #333333;
+					&.red {
+						color: #f94b4b;
+					}
+					&.bold {
+						font-weight: bold;
+					}
+					&.left {
+						text-align: left;
+					}
+					&.right {
+						text-align: right;
 					}
 				}
 			}
 		}
-		.tui-popup-btn {
+	}
+	.tui-popup-btn {
+		width: 100%;
+		height: auto;
+		float: left;
+		margin-top: 24rpx;
+		.tui-button {
 			width: 100%;
-			height: auto;
-			float: left;
-			margin-top: 24rpx;
-			.tui-button{
-				width: 100%;
-				height: 88rpx;
-				background: $btn-confirm;
-				line-height: 88rpx;
-				text-align: center;
-				color: #FFFFFF;
-				font-size: $font-size-28;
-				border-radius: 44rpx;
-			}
+			height: 88rpx;
+			background: $btn-confirm;
+			line-height: 88rpx;
+			text-align: center;
+			color: #ffffff;
+			font-size: $font-size-28;
+			border-radius: 44rpx;
 		}
-	}		
+	}
+}
 </style>

+ 1 - 3
components/cm-module/listTemplate/buyagainList.vue

@@ -136,7 +136,6 @@ export default {
 			showRegularBtn: false,
 			isPrecedence: false,
 			windowWidth: '',
-			windowHeight: ''
 		}
 	},
 	created() {
@@ -158,13 +157,12 @@ export default {
 			// 初始化
 			const userInfo = await this.$api.getStorage()
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
-			this.userId = clubInfo.userId ? userInfo.userId : 0
+			this.userId = clubInfo.userId ? clubInfo.userId : 0
 			if (userInfo.userIdentity == 1) {
 				this.actasFlag = userInfo.userIdentity
 			} else {
 				this.actasFlag = 2
 			}
-			console.log('actasFlag', this.actasFlag)
 			this.getProductAgainInfo(false)
 		},
 		scrolltolower() {

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

@@ -325,7 +325,7 @@ export default {
 			const userInfo = await this.$api.getStorage()
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
 			this.identity = userInfo.userIdentity ? userInfo.userIdentity : 0
-			this.clubUserId = clubInfo.clubId ? clubInfo.clubId : 0
+			this.clubUserId = clubInfo.userId ? clubInfo.userId : 0
 			this.getProductAgainInfo()
 		},
 		scrolltolower(tabIndex) {

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

@@ -164,7 +164,7 @@ export default {
 		async initGetStotage() {
 			// 初始化
 			const userInfo = await this.$api.getStorage()
-			this.userId = userInfo.clubId ? userInfo.clubId : 0
+			this.userId = userInfo.userId ? userInfo.userId : 0
 			if (userInfo.userIdentity == 1) {
 				this.actasFlag = userInfo.userIdentity
 			} else {

+ 7 - 7
components/cm-module/productDetails/recommend.vue

@@ -3,7 +3,7 @@
 	<view class="recommend clearfix">
 		<view class="recommend-empty" v-if="isEmpty">暂无相关推荐商品</view>
 		<view class="recommend-list" v-else>
-			<view class="row-list" v-for="(pros, idx) in recommendList" :key="idx" @click.stop="navToDetailPage(pros.id)">
+			<view class="row-list" v-for="(pros, idx) in recommendList" :key="idx" @click.stop="navToDetailPage(pros.productId)">
 				<view class="list-image"><image :src="pros.image" mode=""></image></view>
 				<view class="list-name">{{pros.name}}</view>
 			</view>
@@ -12,10 +12,10 @@
 </template>
 
 <script>
-	import { mapState,mapMutations} from 'vuex';
+	import { mapState,mapMutations} from 'vuex'
 	import authorize from '@/common/config/authorize.js'
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+	import tuiNomore from '@/components/tui-components/nomore/nomore'
 	
 	export default{
 		name:'recommend',
@@ -46,7 +46,7 @@
 		created() {
 			this.productID = this.queryProductid
 			this.$api.getStorage().then((resolve) => {
-				this.userId = resolve.userId ? resolve.userId : 0;
+				this.userId = resolve.userId ? resolve.userId : 0
 				this.infoRecommend(this.queryProductid,this.queryType)
 			})	
 		},
@@ -68,8 +68,8 @@
 			},
 			//轮播图切换修改背景色
 			swiperChange(e) {
-				const index = e.detail.current;
-				this.current = index;
+				const index = e.detail.current
+				this.current = index
 			},
 			navToDetailPage(id) {//跳转商品详情页
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`)

+ 2 - 1
components/cm-module/scrollTop/scrollTop.vue

@@ -44,7 +44,7 @@
 				uni.pageScrollTo({
 				    scrollTop: 0,
 				    duration: 600
-				});
+				})
 			},
 			handleContact(e){
 				console.log(e.detail.path)
@@ -60,6 +60,7 @@
 		height: 200rpx;
 		position: fixed;
 		right: 20rpx;
+		z-index: 999;
 		.icon{
 			width: 80rpx;
 			height: 80rpx;

+ 2 - 2
pages/goods/goods-classify.vue

@@ -509,6 +509,7 @@ export default {
 			this.isRequest = true
 			this.GetProductListInfo()
 			this.GetProductOneClassly()
+			this.getCommoditySearchQUeryBrand()
 			console.log(this.classifyID)
 		},
 		GetProductOneClassly() {
@@ -707,7 +708,6 @@ export default {
 			} else if (index == 4) {
 				console.log('type', this.listQuery.id)
 				this.searchClickFn()
-				this.getCommoditySearchQUeryBrand()
 			}
 		},
 		handSearchList() {
@@ -829,7 +829,7 @@ export default {
 		choiceActiType() {
 			// 选择筛选项促销商品
 			this.isChoiceActiType = !this.isChoiceActiType
-			if (this.isChoiceNewType) {
+			if (this.isChoiceActiType) {
 				this.listQuery.promotionFlag = 1
 			} else {
 				this.listQuery.promotionFlag = 0

+ 22 - 14
pages/goods/goods-supporting.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container product clearfix">
-		<view class="product-content" :style="{ paddingBottom: popupShow ? '136rpx' : '0' }">
+		<view class="product-content" :style="{ paddingBottom: popupShow ? '150rpx' : '0' }">
 			<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
 				<!-- 空白页 -->
 				<view class="empty-container" v-if="isEmpty">
@@ -13,7 +13,7 @@
 				<!-- 列表 -->
 				<view class="tui-cart-cell  tui-mtop" v-for="(pros, index) in productList" :key="index">
 					<view class="tui-goods-item">
-						<view class="tui-goods-main">
+						<view class="tui-goods-main" :class="{'none': index === productList.length -1 }">
 							<view class="tui-goods-checkBox">
 								<view
 									class="checkbox iconfont"
@@ -299,7 +299,7 @@ export default {
 				productId: 0,
 				source: 2,
 				pageNum:1,
-				pageSize:10
+				pageSize:50
 			},
 			productList: [],
 			handleData: {},
@@ -351,10 +351,10 @@ export default {
 				.then(response => {
 					let data = response.data 
 					this.hasNextPage = data.hasNextPage
-					this.productList = data.results.map((el, index) => {
-						el.isChecked = false
-						el.number = el.minBuyNumber
-						return el
+					this.productList = data.results.map((pros, index) => {
+						pros.isChecked = false
+						pros.number = pros.minBuyNumber
+						return pros
 					})
 					this.pullFlag = false
 					setTimeout(() => {
@@ -385,10 +385,14 @@ export default {
 					let data = response.data
 					if (data.results && data.results.length > 0) {
 						this.hasNextPage = data.hasNextPage
-						let list = data.results.map((el, index) => {
-							el.isChecked = false
-							el.number = el.minBuyNumber
-							return el
+						let list = data.results.map((pros, index) => {
+							if(this.isAllChecked && !this.disabledChecked(pros)){
+								pros.isChecked = true
+							}else{
+								pros.isChecked = false
+							}
+							pros.number = pros.minBuyNumber
+							return pros
 						})
 						this.productList = this.productList.concat(list)
 						this.pullFlag = false // 防上拉暴滑
@@ -508,15 +512,16 @@ export default {
 			this.updateBothCheckBtn()
 		},
 		checkedSoperv(pros) {
-			//选择
+			// 勾选商品
 			if(this.disabledChecked(pros)){
+				this.$util.msg('该商品暂不能购买', 2000)
 				return
 			}
 			pros.isChecked = !pros.isChecked
 			this.updateCheckAllBtn()
 		},
 		PromotionsFormat(promo) {
-			//促销活动类型数据处理
+			//优惠价促销活动类型数据处理
 			if (promo != null) {
 				if (promo.type == 1 && promo.mode == 1) {
 					return true
@@ -540,7 +545,7 @@ export default {
 			if (pros.number <= pros.minBuyNumber) {
 				pros.number = pros.minBuyNumber
 				this.isQuantity = true
-				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
+				this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`, 2000)
 				return
 			} else {
 				if (pros.step == 2) {
@@ -679,6 +684,9 @@ page {
 		height: 100%;
 		border-bottom: 1px solid #ebebeb;
 		padding-bottom: 24rpx;
+		&.none{
+			border-bottom: none;
+		}
 	}
 }
 .tui-goods-checkBox {

+ 7 - 6
pages/goods/product.vue

@@ -172,9 +172,10 @@
 					<!-- 配套商品 -->
 					<view
 						class="product-supporting"
-						v-if="isShowSupportingList"
+						v-if="isShowSupportingList && supportingList.length>0"
+						@click.stop="handleSupporting"
 					>
-						<view class="product-supporting-title">配套商品({{ supportingNum }}})</view>
+						<view class="product-supporting-title">配套商品({{ supportingNum }})</view>
 						<view class="product-supporting-list">
 							<view
 								class="list"
@@ -184,7 +185,7 @@
 							>
 								<image class="list-image" :src="supporting.image" mode=""></image>
 							</view>
-							<text class="iconfont icon-xiayibu" @click.stop="handleSupporting"></text>
+							<text class="iconfont icon-xiayibu"></text>
 						</view>
 					</view>
 					<!-- 优惠券 -->
@@ -335,7 +336,7 @@
 						</div>
 						<view
 							class="tui-right-flex tui-popup-btn"
-							:style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }"
+							:style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }"
 						>
 							<view class="tui-flex-1"> <view class="tui-button" @click="hidePopup(0)">收起</view> </view>
 						</view>
@@ -456,7 +457,7 @@
 						</div>
 						<view
 							class="tui-right-flex tui-popup-btn"
-							:style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }"
+							:style="{ paddingBottom: isIphoneX ? '68rpx' : '.34rpx' }"
 						>
 							<view class="tui-flex-1"> <view class="tui-button" @click="hidePopup(1)">收起</view> </view>
 						</view>
@@ -1492,7 +1493,7 @@ page {
 				border: 0;
 				margin: 0;
 				padding: 8rpx 0;
-				z-index: 980;
+				z-index: 20;
 				.icon-fenxiang1 {
 					font-size: $font-size-34;
 				}

+ 43 - 25
pages/search/search.vue

@@ -6,24 +6,6 @@
 					<view class="search-tab-btn" @click="topBubble">
 						<text>{{ tabValue }}</text> <text class="iconfont icon-xiangxiajiantou"></text>
 					</view>
-					<tui-bubble-popup
-						:show="show"
-						:mask="true"
-						position="absolute"
-						direction="top"
-						@close="topBubble"
-						width="140rpx"
-						left="10rpx"
-						bottom="0rpx"
-						translateY="100%"
-						triangleRight="60rpx"
-						triangleTop="-22rpx"
-						:maskBgColor="maskBgColor"
-					>
-						<view class="tui-menu-item" @tap="selectTabs(1)">产品</view>
-						<!-- <view class="tui-menu-item" @tap="selectTabs(2)">供应商</view> -->
-						<view class="tui-menu-item" @tap="selectTabs(3)">项目仪器</view>
-					</tui-bubble-popup>
 				</view>
 				<view class="gosearch-btn">
 					<text class="iconfont icon-sousuo"></text>
@@ -108,6 +90,27 @@
 				</view>
 			</view>
 		</view>
+		<!-- 小下拉 -->
+		<view class="search-main-bubble" v-if="showBubblePopup">
+			<tui-bubble-popup
+				:show="showBubblePopup"
+				:mask="true"
+				position="absolute"
+				direction="top"
+				@close="topBubble"
+				width="140rpx"
+				left="10rpx"
+				top="-150rpx"
+				translateY="100%"
+				triangleRight="60rpx"
+				triangleTop="-22rpx"
+				:maskBgColor="maskBgColor"
+			>
+				<view class="tui-menu-item" @tap="selectTabs(1)">产品</view>
+				<!-- <view class="tui-menu-item" @tap="selectTabs(2)">供应商</view> -->
+				<view class="tui-menu-item" @tap="selectTabs(3)">项目仪器</view>
+			</tui-bubble-popup>
+		</view>
 		<!-- 搜索历史记录 -->
 		<view class="search-container-history" v-if="!isShowWrapper">
 			<view :class="'s-' + themeClass" v-if="serachRecordList.length > 0">
@@ -445,7 +448,7 @@ export default {
 			userId: 0,
 			tabValue: '产品',
 			themeClass: 'block',
-			show: false,
+			showBubblePopup: false,
 			vipFlag: 0,
 			userIdentity: 0,
 			actasFlag: 2,
@@ -597,7 +600,9 @@ export default {
 				switch (this.searchKeyType) {
 					case 1:
 						this.listData = []
+						this.brandParam.keyword = this.listQuery.keyword
 						this.setSearchHistoryAdd()
+						this.getCommoditySearchQUeryBrand()
 						this.getListFromServer()
 						this.isFocus = false
 						// 友盟埋点商品搜索点击
@@ -777,7 +782,6 @@ export default {
 			} else if (index == 4) {
 				this.brandParam.keyword = this.listQuery.keyword
 				this.showRightDrawer()
-				this.getCommoditySearchQUeryBrand()
 			}
 		},
 		showRightDrawer() {
@@ -888,7 +892,7 @@ export default {
 		},
 		selectTabs(index) {
 			//选择搜索项
-			this.show = false
+			this.showBubblePopup = false
 			this.searchKeyType = index
 			switch (index) {
 				case 1:
@@ -947,8 +951,9 @@ export default {
 			}
 		},
 		topBubble() {
+			console.log('1111111111')
 			//显隐搜索项
-			this.show = !this.show
+			this.showBubblePopup = !this.showBubblePopup
 		}
 	},
 	onShareAppMessage(res) {
@@ -973,6 +978,19 @@ export default {
 page {
 	background-color: #f7f7f7 !important;
 }
+.search-main-bubble{
+	width: 100%;
+	height: 88rpx;
+	position: fixed;
+	top: 88rpx;
+	left: 0;
+	z-index: 1200;
+	box-sizing: border-box;
+	line-height: 70rpx;
+	color: #666666;
+	font-size: $font-size-24;
+	text-align: center;
+}
 .search-main {
 	width: 100%;
 	height: 88rpx;
@@ -980,7 +998,7 @@ page {
 	top: 0;
 	left: 0;
 	background: #ffffff;
-	z-index: 1001;
+	z-index: 990;
 	box-sizing: border-box;
 	.tui-header-tab {
 		height: 88rpx;
@@ -1199,9 +1217,9 @@ page {
 	width: 100%;
 	min-height: 300rpx;
 	position: fixed;
-	top: 180rpx;
+	top: 88rpx;
 	left: 0;
-	z-index: 888;
+	z-index: 999;
 }
 .s-block {
 	background: #ffffff;

+ 63 - 32
pages/seller/cart/cart.vue

@@ -307,11 +307,13 @@ export default {
 			pullUpOn: true,
 			pullFlag: true,
 			submitIds: [],
+			checkenProsList:[],
 			depositIds: [6060, 6061, 6062, 6063, 6064], //定金商品ID
 			rechargeIds: [6065, 6066, 6067, 6068, 6069], //充值余额商品ID
 			isIphoneX: this.$store.state.isIphoneX,
 			vipFlag: 0,
-			userIdentity: 0
+			userIdentity: 0,
+			isCheckedProductStatus:false,
 		}
 	},
 	onLoad() {
@@ -553,11 +555,14 @@ export default {
 			if (pro.isChecked) {
 				if (!this.submitIds.includes(pro.productId * 1)) {
 					this.submitIds.push(pro.productId)
+					this.checkenProsList.push(pro)
 				}
+				this.isCheckedProductStatus = true
 			} else {
 				var lent = this.submitIds.indexOf(pro.productId * 1)
 				if (lent >= 0) {
 					this.submitIds.splice(lent, 1)
+					this.checkenProsList.splice(lent, 1)
 				}
 			}
 			this.updateProductCheckedAllBtn(item)
@@ -607,12 +612,15 @@ export default {
 					pros.isChecked = true
 					if (!this.submitIds.includes(pros.productId * 1)) {
 						this.submitIds.push(pros.productId)
+						this.checkenProsList.push(pros)
 					}
+					this.isCheckedProductStatus = true
 				} else {
 					pros.isChecked = false
 					var lent = this.submitIds.indexOf(pros.productId * 1)
 					if (lent >= 0) {
 						this.submitIds.splice(lent, 1)
+						this.checkenProsList.splice(lent, 1)
 					}
 				}
 			})
@@ -652,7 +660,7 @@ export default {
 					})
 					if(item.promotions.discount == 1){// 支持促销叠加条件的店铺满减 执行
 						prosDiscountNum = parseInt(prosPrice/item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
-						console.log('店铺满减促销叠加通道叠加次数',prosDiscountNum)
+						console.log('店铺满减促销叠加通道叠加次数',`${prosDiscountNum}次`)
 						if (prosPrice >= item.promotions.touchPrice) {// 满足店铺满减条件下执行
 							item.totalPrice = prosPrice - item.promotions.reducedPrice*prosDiscountNum
 							item.reducedPrice = item.promotions.reducedPrice*prosDiscountNum
@@ -676,18 +684,18 @@ export default {
 					//以下为计算除店铺满减以外的单品满减以及正常商品合计
 					let _totalPrice = 0
 					let _reducedPrice = 0
-					let _discountNum = 0
+					let discountNum = 0
 					let _totalOriginalPrice = 0
 					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) {
 							if(pros.promotions.discount == 1){
-								_discountNum = parseInt(_price/pros.promotions.touchPrice)
-								console.log('单品满减促销叠加通道叠加次数',_discountNum)
+								discountNum = parseInt(_price/pros.promotions.touchPrice)
+								console.log('单品满减促销叠加通道叠加次数',`${discountNum}次`)
 								if (_price >= pros.promotions.touchPrice) {
-									_price = _price - pros.promotions.reducedPrice*_discountNum
-									_reducedPrice += pros.promotions.reducedPrice*_discountNum
+									_price = _price - pros.promotions.reducedPrice*discountNum
+									_reducedPrice += pros.promotions.reducedPrice*discountNum
 								}
 								_totalPrice += _price
 							}else{
@@ -722,18 +730,19 @@ export default {
 				item.originalprice = 0
 				item.cartList.forEach(pros => {
 					if (pros.isChecked) {
+						this.isCheckedProductStatus = true
 						supplierPrice += pros.price * pros.number
 						// 单品满减
 						if (pros.promotions && pros.promotions.type * 1 === 1 && pros.promotions.mode * 1 === 2) {
 							// 单品满减-重新计算供应商总价/满减金额
 							let _price = pros.price * pros.number
 							if(pros.promotions.discount == 1){
-								let _discountNum = parseInt(_price/pros.promotions.touchPrice)
-								console.log('促销叠加通道叠加次数',_discountNum)
+								let discountNum = parseInt(_price/pros.promotions.touchPrice)
+								console.log('单品满减促销叠加通道叠加次数',`${discountNum}次`)
 								// 单品满减-重新计算供应商总价/满减金额
 								if ( _price >= pros.promotions.touchPrice) {
-									supplierPrice -= pros.promotions.reducedPrice*_discountNum
-									supplierReducedPrice += pros.promotions.reducedPrice*_discountNum
+									supplierPrice -= pros.promotions.reducedPrice*discountNum
+									supplierReducedPrice += pros.promotions.reducedPrice*discountNum
 								}
 							}else{
 								console.log('非促销叠加通道')
@@ -751,7 +760,7 @@ export default {
 					// 店铺满减-计算供应商总价/满减金额
 					if(item.promotions.discount == 1){// 支持促销叠加条件的店铺满减 执行
 						let prosDiscountNum = parseInt(supplierPrice/item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
-						console.log('店铺满减促销叠加通道叠加次数',prosDiscountNum)
+						console.log('店铺满减促销叠加通道叠加次数',`${prosDiscountNum}次`)
 						if (supplierPrice >= item.promotions.touchPrice) {
 							supplierPrice -= item.promotions.reducedPrice*prosDiscountNum
 							supplierReducedPrice += item.promotions.reducedPrice*prosDiscountNum
@@ -771,29 +780,51 @@ export default {
 				totalPrice += item.totalprice
 				reducedPrice += item.reducedprice
 				originalPrice += item.originalprice
+				console.log('totalPrice',totalPrice)
+				console.log('originalPrice',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(this.isCheckedProductStatus){
+				// 总促销计算
+				this.promotionsList.forEach(promotions => {
+					// 凑单满减
+					if (promotions.mode === 2 && promotions.type === 2) {
+						let collecTotal = 0
+						let collecDiscountNum = 0
+						promotions.productList.forEach(pros => {
+							collecTotal += this.collecTotalPrice(pros)
+						})
+						if(promotions.discount == 1){// 支持凑单满减促销叠加条件的执行
+							collecDiscountNum += parseInt(collecTotal/promotions.touchPrice) // 凑单满减促销叠加次数 = 凑单商品合计价格/凑单满减促销价格
+							console.log('凑单促销满减叠加通道叠加次数',`${collecDiscountNum}次`)
+							if (collecTotal >= promotions.touchPrice) {
+								totalPrice -= promotions.reducedPrice*collecDiscountNum
+								reducedPrice += promotions.reducedPrice*collecDiscountNum
+							}
+						}else{  
+							console.log('凑单促销满减非叠加通道') 
+							if (collecTotal >= promotions.touchPrice) {
+								totalPrice -= promotions.reducedPrice
+								reducedPrice += promotions.reducedPrice
+							}
 						}
-					})
-					if (total >= promotions.touchPrice) {
-						totalPrice -= promotions.reducedPrice
-						reducedPrice += promotions.reducedPrice
 					}
+				})
+				//最后统计商品原价
+				this.totalOriginalPrice = originalPrice
+				//最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
+				this.reducedPrice = reducedPrice
+				//最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减
+				this.allPrice = totalPrice
+			}
+		},
+		collecTotalPrice(pros){// 凑单满减计算勾选的凑单商品总价
+			let price 
+			this.checkenProsList.find(el => {
+				if(pros.productId == el.productId ){
+					price = el.number * el.price
 				}
 			})
-			//最后统计商品原价
-			this.totalOriginalPrice = originalPrice
-			//最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
-			this.reducedPrice = reducedPrice
-			//最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减
-			this.allPrice = totalPrice
+			return price
 		},
 		totalCount() {
 			//计算总数量
@@ -886,8 +917,8 @@ export default {
 			})
 				.then(response => {
 					this.isshowDelbtn = false
-					this.isCheckAll = false
-					this.initGetCartGoodsList()
+					// this.isCheckAll = false
+					// this.initGetCartGoodsList()
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)

+ 1 - 2
pages/seller/order/create-order.vue

@@ -545,10 +545,10 @@
 					this.confirmParam.clubCouponId = 0
 					this.confirmParam.orderSeen = 2
 					this.$refs.clubVisible.orderVisibleText = '不可见'
+					this.$refs.clubVisible.current = 1
 					this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
 					this.totalDiscountAmount = this.reducedPrice + this.couponAmount
 					this.$refs.coupon.coupon.couponAmount = 0
-					console.log('返佣订单勾选freightData',this.freightData)
 					this.$refs.freight.infoData(this.freightData)
 					this.$refs.freight.freightData  = this.freightData
 					this.handleFreightData = this.freightData
@@ -562,7 +562,6 @@
 					}
 					this.totalDiscountAmount = this.reducedPrice + this.couponAmount 
 					this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
-					// this.$refs.freight.infoData(this.handleFreightData)
 				}
 			},
 			

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

@@ -347,7 +347,7 @@ export default {
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
 			const userInfo = await this.$api.getStorage()
 			this.clubId = clubInfo.clubId ? clubInfo.clubId : 0
-			this.userId = clubInfo.clubId ? clubInfo.clubId : 0
+			this.userId = clubInfo.userId ? clubInfo.userId : 0
 			this.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
 			this.getOrderDatainit(this.currentTab)
 		},

+ 17 - 6
pages/tabBar/user/user.vue

@@ -462,7 +462,6 @@ export default {
 				.then(response => {
 					let data = response.data
 					this.userMoney = this.filtersMoney(data.user.ableUserMoney)
-					console.log('userMoney', this.userMoney)
 					this.userIdentity = data.user.userIdentity //机构等级
 					if (this.userIdentity == 2) {
 						this.name = data.club.name //资质机构名称
@@ -484,16 +483,26 @@ export default {
 					this.couponNum = data.couponNum // 优惠券数量
 					this.isModify = data.isModify // 是否显示采美豆
 					this.contactNumber = data.contactNumber // 联系电话
+					let clubInfo = { name: this.name, image: this.headpic, userId: data.user.userId }
+					uni.setStorage({ key: 'clubInfo', data: clubInfo })
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		UserClubOrderCount(){
+			//获取订单状态数量
+			this.OrderService.UserClubOrderCount({ userId: this.userId })
+				.then(response => {
+					let data = response.data
 					this.confirmedCount = this.showBadge(data.confirmedCount) //待确认
 					this.paymentCount = this.showBadge(data.paymentCount) //待付款
 					this.waitShipmentsCount = this.showBadge(data.waitShipmentsCount) //待收货
 					this.shipmentsCount = this.showBadge(data.shipmentsCount) //已发货
 					this.salesReturnCount = this.showBadge(data.salesReturnCount) //退货/款
-					let clubInfo = { name: this.name, image: this.headpic, userId: data.user.userId }
-					uni.setStorage({ key: 'clubInfo', data: clubInfo })
 				})
 				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+					console.log('获取订单状态数量异常~')
 				})
 		},
 		GetInitBeansInfo() {
@@ -671,6 +680,7 @@ export default {
 		//下拉刷新
 		if (this.hasLogin) {
 			this.getClubObtainCenter()
+			this.UserClubOrderCount()
 			uni.stopPullDownRefresh()
 		} else {
 			uni.stopPullDownRefresh()
@@ -683,10 +693,11 @@ export default {
 				.then(resolve => {
 					this.userId = resolve.userId ? resolve.userId : 0
 					this.getClubObtainCenter()
+					this.UserClubOrderCount()
 					this.GetInitBeansInfo()
 				})
-				.catch(reject => {
-					console.log('异常处理=========>', reject)
+				.catch(error => {
+					console.log('异常处理=========>', error)
 				})
 		} else {
 			this.getPhone()

+ 21 - 22
pages/user/collection/collection.vue

@@ -327,7 +327,7 @@ export default {
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
 			this.GetProductListInfo()
-			this.shoppingHeaderCartNumber()
+			this.ProductCartNumber()
 		},
 		GetProductListInfo() {
 			this.productList = []
@@ -392,13 +392,13 @@ export default {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
-		shoppingHeaderCartNumber() {
+		ProductCartNumber() {
 			// 获取用户购物车储量
-			this.ProductService.shoppingHeaderCartNumber({
+			this.ProductService.ProductCartNumber({
 				userId: this.listQuery.userId
 			})
 				.then(response => {
-					this.cartQuantity = response.data.length
+					this.cartQuantity = response.data
 				})
 				.catch(error => {
 					console.log('获取购物车数量失败')
@@ -498,7 +498,7 @@ export default {
 		changeCountAdd() {
 			//popup弹窗数量增加按钮
 			if (this.buyRetailPriceStep == 2) {
-				this.number += this.minBuyNumber
+				this.number += this.handleData.minBuyNumber
 			} else {
 				this.number++
 			}
@@ -506,14 +506,14 @@ export default {
 		},
 		changeCountSub() {
 			//popup弹窗数量减按钮
-			if (this.number <= this.minBuyNumber) {
-				this.number = this.minBuyNumber
+			if (this.number <= this.handleData.minBuyNumber) {
+				this.number = this.handleData.minBuyNumber
 				this.isQuantity = true
-				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
+				this.$util.msg(`该商品最小起订量为${this.handleData.minBuyNumber}`, 2000)
 				return
 			} else {
 				if (this.buyRetailPriceStep == 2) {
-					this.number -= this.minBuyNumber
+					this.number -= this.handleData.minBuyNumber
 				} else {
 					this.number--
 				}
@@ -524,13 +524,13 @@ export default {
 		changeNumber(e) {
 			let _value = e.detail.value
 			if (!this.$api.isNumber(_value)) {
-				this.number = this.minBuyNumber
-			} else if (_value < this.minBuyNumber) {
-				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
-				this.number = this.minBuyNumber
-			} else if (_value % this.minBuyNumber != 0) {
+				this.number = this.handleData.minBuyNumber
+			} else if (_value < this.handleData.minBuyNumber) {
+				this.$util.msg(`该商品最小起订量为${this.handleData.minBuyNumber}`, 2000)
+				this.number = this.handleData.minBuyNumber
+			} else if (_value % this.handleData.minBuyNumber != 0) {
 				this.$util.msg('购买量必须为起订量的整数倍', 2000)
-				this.number = this.minBuyNumber
+				this.number = this.handleData.minBuyNumber
 			} else {
 				this.number = e.detail.value
 				this.calculatPerice()
@@ -550,26 +550,25 @@ export default {
 			//跳转确认订单页面
 			this.popupShow1 = false
 			let productStp = {
-				allPrice: this.number * this.buyRetailPrice,
-				allCount: this.number,
-				productID: this.handleData.productId,
+				productIds: this.handleData.productId,
 				productCount: this.number
 			}
+			console.log('productStp',productStp)
 			this.$api.navigateTo(
-				`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({ data: productStp })}`
+				`/pages/user/order/create-order?type=1&data=${JSON.stringify({ data: productStp })}`
 			)
 		},
 		getAddProductCart() {
 			//增加购物车成功和toast弹窗提示成功
 			this.ProductService.shoppingAddCart({
-				productID: this.handleData.productId,
-				userID: this.listQuery.userId,
+				productId: this.handleData.productId,
+				userId: this.listQuery.userId,
 				productCount: this.number
 			})
 				.then(response => {
 					this.popupShow1 = false
 					this.$util.msg('加入购物车成功', 1500, true, 'success')
-					this.shoppingHeaderCartNumber()
+					this.ProductCartNumber()
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)

+ 1 - 1
pages/user/order/create-order.vue

@@ -267,7 +267,7 @@
 						this.CartCreateOrderInfo()
 						break
 					case '3':// 组合商品立即购买
-						this.confirmParam.cartType = 1
+						this.confirmParam.cartType = 2
 						this.confirmType = 2
 						this.supportParm.productInfo = JSON.stringify(data.data) 
 						this.GetOrderClubProductSupporting()

+ 3 - 3
pages/user/regularPurchase/regularPurchase.vue

@@ -153,11 +153,11 @@ export default {
 			//跳转确认订单页面
 			this.specClass = 'hide'
 			let productStp = {
-					productIds:this.handleData.productId,
-					productCount: this.number
+				productIds: this.handleData.productId,
+				productCount: this.number
 			}
 			this.$api.navigateTo(
-				`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({ data: productStp })}`
+				`/pages/user/order/create-order?type=1&data=${JSON.stringify({ data: productStp })}`
 			)
 			setTimeout(() => {
 				this.specClass = 'none'

+ 12 - 0
services/order.service.js

@@ -285,4 +285,16 @@ export default class OrderService {
             isHost:true
         })
     }
+	/**
+	 * @机构个人中心订单状态数量
+	 * @param:userId 用户ID(必填)
+	 */
+    UserClubOrderCount (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/count', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
 }