Ver Fonte

commit -m 协销促销活动

zhengjinyi há 4 anos atrás
pai
commit
9a37306812

+ 0 - 146
api/seller.js

@@ -168,91 +168,6 @@ export function getSellerClubOrderList(params) {
 		})
 	})
 }
-/**
- *@协销帮机构下单购物车商品加减数量
- *@param clubId 机构的clubId
- *@param serviceProviderId 	协销ID
- */
-export function sellerAddProductNum(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/seller/addProductNum',params,true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *@协销帮机构下单获取购物车数量
- *@param clubId 机构的clubId
- *@param serviceProviderId 	协销ID
- */
-export function getSellerProductNum(params) {
-	return new Promise(function(resolve,reject) {
-		request.get('/seller/productNum',params,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *@协销帮机构下单购物车删除商品
- *@param sellerCartIds 	购物车ID
- */
-export function deleteSellerCart(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/seller/deleteSellerCart',params,true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *@协销帮机构下单去结算初始化
- *@param clubId 	机构ID
- *@param serviceProviderId 协销ID
- *@param productIds 	商品ID
- */
-export function sellerSettlement(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/seller/settlement',params,true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-
-/**
- *@协销帮机构下单提交订单
- *@param orderSource 2,//提交来源
- *@param clubUserId//机构UserID
- *@param cartType	//从购物车提交
- *@param serviceProviderId//帮下单协销ID
- *@param addressId//地址ID
- *@param orderInfo//商品信息
- *@param payInfo//订单信息
- *@param orderInvoice//发票信息
- */
-export function sellerCreateOrderSubmit(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/seller/order/submit',params,true,res => {
-			resolve(res)
-		})
-	})
-}
-
-
 /**
  *@协销帮机构下单商品搜索
  *@param clubUserId 机构的userID
@@ -289,51 +204,6 @@ export function getcombinationProduct(params) {
 		})
 	})
 }
-/**
- *@协销商品搜索
- *@param clubId 会所的ID
- *@param serviceProviderId 页码 
- */
-export function getSellerShoppingInfo(params) {
-	return new Promise(function(resolve,reject) {
-		request.get('/seller/shoppingInfo',params,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *@协销购物车
- *@param clubId 会所ID
- *@param serviceProviderId 页码
- */
-export function shoppingCartAddCart(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/seller/addCart',params, true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-// 组合商品添加购物车
-export function getCartAddCart(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/seller/batchAddCart',params, true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-
 /**
  *@协销购物车删除商品
  *@param clubId 会所ID
@@ -350,22 +220,6 @@ export function shoppingCartDelete(params) {
 		})
 	})
 }
-/**
- *@协销购物车删除商品
- *@param clubId 会所ID
- *@param serviceProviderId 页码
- */
-export function getshoppingCartInfo(params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet('/shoppingCart/shoppingInfo',params,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
 /**
  *@协销购物车商品增减
  *@param clubId 会所ID

+ 2 - 2
common/config/config.js

@@ -2,9 +2,9 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.2.68:8008'	 //本地IP联调地址
-	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
+	URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境

+ 6 - 5
components/cm-module/creatOrder/goodsList.vue

@@ -5,7 +5,7 @@
 			<view v-for="(item, index) in goodsData" :key="index" class="goods-item">
 				<view class="shoptitle">
 					<view v-if="item.promotions" class="floor-item-act">
-						<view class="floor-tags" @click.stop="clickPopupShow(item,2)">{{item.promotions.name}}</view>	
+						<view class="floor-tags">{{item.promotions.name}}</view>	
 					</view>
 					<view class="title-text">{{item.name}}</view> 
 				</view>
@@ -211,7 +211,7 @@
 			.pros-product{
 				width: 468rpx;
 				height: 100%;
-				line-height: 36rpx;
+				line-height: 40rpx;
 				font-size: $font-size-26;	
 				position: relative;
 				.producttitle{
@@ -227,7 +227,8 @@
 					margin-bottom: 8rpx;
 				}
 				.productspec{
-					height: 36rpx;
+					height: 40rpx;
+					line-height: 40rpx;
 					color: #999999;
 					text-overflow:ellipsis;
 					display: -webkit-box;
@@ -237,11 +238,11 @@
 					overflow: hidden;
 				}
 				.productprice{
-					height: 48rpx;
+					height: 54rpx;
 					width: 100%;
 					float: left;
 					.price{
-						line-height: 48rpx;
+						line-height: 54rpx;
 						font-size: $font-size-28;
 						width: 48%;
 						color: #FF2A2A;

+ 364 - 0
components/cm-module/creatOrder/sellerGoodsList.vue

@@ -0,0 +1,364 @@
+<template name="goods">
+	<view class="goods-template">
+		 <!-- 商品列表 -->
+		<view class="goods-list">
+			<view v-for="(item, index) in goodsData" :key="index" class="goods-item">
+				<view class="shoptitle">
+					<view v-if="item.promotions" class="floor-item-act">
+						<view class="floor-tags">{{item.promotions.name}}</view>	
+					</view>
+					<view class="title-text">{{item.name}}</view> 
+				</view>
+				<view class="productlist" v-for="(pros,idx) in item.productsList" :key="idx">
+					<view class="goods-pros-t">
+						<view class="pros-img">
+							<image :src="pros.mainImage" alt="" />
+							<text class="tips" v-if="pros.giftType == 2 || pros.giftType == 1">赠品</text>
+						</view>
+						<view class="pros-product">
+							<view class="producttitle">{{pros.name}}</view>
+							<view class="productspec"  v-if="pros.productCategory!=2">规格:{{pros.unit}}</view>
+							<view class="productspec" v-if="pros.productCode!=''&&pros.productCode!=null">
+								<view >商品编码:{{pros.productCode}}</view>
+							</view>
+							<view class="productprice">
+								<view class="price"><text>¥{{pros.retailPrice | NumFormat}}</text></view>
+								<view class="count"><text class="small">x</text>{{pros.productCount}}</view>
+							</view>
+							<view class="floor-item-act" v-if="pros.promotions!=null">
+								<view v-if="PromotionsFormat(pros.promotions)" class="floor-tags">
+									{{pros.promotions.name}}
+									<text v-if ="pros.promotions!=null">
+										:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
+									</text>
+								</view>
+								<view v-else class="floor-tags">{{pros.promotions.name}}</view>	
+							</view>
+						</view>	
+					</view>
+				</view>	
+				<view class="goods-pros-m">
+					<view class="m-text">留言:</view>
+					<view class="m-input">
+						<input type="text" 
+						   v-model="remark[index]" 
+						   @change="changeHandle(index)"
+						   placeholder-class="placeholder"  
+						   maxlength="50" 
+						   placeholder="选填,最多不超过50个汉字"/>
+						</view>
+				</view>
+				<view class="goods-pros-b">
+					<view class="sum-none" v-if="item.reducedPrice>0">
+						<text class="money-sign">¥</text>
+						<text class="money">{{ item.totalPrice | NumFormat }}</text>
+						<text class="money-reduced">减<text>¥{{ item.reducedPrice | NumFormat}}</text></text>
+					</view>
+					<view class="sum">合计:<text class="money">¥{{ ( item.totalPrice -item.reducedPrice ) | NumFormat }}</text></view>
+				</view>
+			</view>
+		</view>	
+	</view>
+</template>
+
+<script>
+	export default{
+		name:"goods",
+		props:{
+			goodsData:{
+				type:Array
+			}
+		},
+		data() {
+			return{
+				remark:[]
+			}
+		},
+		created(){
+			
+		},
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		},	
+		watch: {
+			goodsData: {
+				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
+					this.goodsData = el
+				},
+				deep: true
+			}
+		},
+		computed: {
+
+		},
+		methods:{
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			},
+			changeHandle (index) {//输入框的值被改变后
+				this.goodsData[index].note = this.remark[index]
+				this.$emit('handleGoodList',this.goodsData)
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.goods-template{
+		width: 100%;
+		height: auto;
+		background: #FFFFFF;
+		float: left;
+		margin-top: 24rpx;
+		.goods-list{
+			width: 100%;
+			height: auto;	
+			background:#F7F7F7;
+			.goods-item{
+				width: 702rpx;
+				padding: 0 24rpx;
+				background: #FFFFFF;
+				margin-bottom: 24rpx;
+				&:last-child{
+					margin-bottom: 0;
+				}
+			}
+			.shoptitle{
+				display: flex;
+				align-items: center;
+				height: 80rpx;
+				line-height: 80rpx;
+				.title-text{
+					width: 100%;
+					overflow: hidden;
+					text-overflow:ellipsis;
+					white-space: nowrap;
+					float: left;
+					font-size: $font-size-28;
+					color: $text-color;
+					text-align: left;
+					line-height: 56rpx;
+					font-weight: bold;
+				}
+				.floor-item-act{
+					height: 56rpx;
+					text-align: center;
+					box-sizing: border-box;
+					float: left;
+					padding: 12rpx 0;
+					margin-right: 12rpx;
+					.floor-tags{
+						float: left;
+						height: 36rpx;
+						border-radius: 4rpx;
+						background-color: rgba(225, 86, 22, 0.1);
+						line-height: 36rpx;
+						color: $color-system;
+						text-align: center;
+						display: inline-block;
+						padding:0 16rpx;
+						font-size: $font-size-20;
+					}
+				}
+			}
+			.productlist{
+				width: 100%;
+				height: auto;
+			}	
+			.goods-pros-t{
+				display: flex;
+				align-items: center;
+				width: 100%;
+				height: auto;
+				padding:12rpx 0;
+				.pros-img{
+					width: 210rpx;
+					height: 100%;
+					border-radius: 10rpx;
+					margin:0 26rpx 0 0;
+					position: relative;
+					.tips{
+						display: inline-block;
+						width: 80rpx;
+						height: 40rpx;
+						background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
+						line-height: 40rpx;
+						text-align: center;
+						font-size: $font-size-24;
+						color: #FFFFFF;
+						border-radius:10rpx 0 10rpx 0 ;
+						position: absolute;
+						top:0;
+						left: 0;
+					}
+					image{
+						width: 210rpx;
+						height: 210rpx;
+						border-radius: 10rpx;
+						border:1px solid #f3f3f3;
+					}
+				}
+			}
+			.pros-product{
+				width: 468rpx;
+				height: 100%;
+				line-height: 40rpx;
+				font-size: $font-size-26;	
+				position: relative;
+				.producttitle{
+					width: 100%;
+					display: inline-block;
+					height: auto;							
+					text-overflow:ellipsis;
+					display: -webkit-box;
+					word-break: break-all;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					overflow: hidden;
+					margin-bottom: 8rpx;
+				}
+				.productspec{
+					height: 40rpx;
+					color: #999999;
+					line-height: 40rpx;
+					text-overflow:ellipsis;
+					display: -webkit-box;
+					word-break: break-all;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					overflow: hidden;
+				}
+				.productprice{
+					height: 54rpx;
+					line-height: 54rpx;
+					width: 100%;
+					float: left;
+					.price{
+						line-height: 54rpx;
+						font-size: $font-size-28;
+						width: 48%;
+						color: #FF2A2A;
+						float: left;
+					}
+					.count{
+						height: 100%;
+						float: right;
+						position: relative;
+						.small{
+							color: #666666;
+						}
+					}
+				}
+				.floor-item-act{
+					width: 100%;
+					height: 56rpx;
+					text-align: center;
+					box-sizing: border-box;
+					float: left;
+					padding:0 0 10rpx 0;
+					.floor-tags{
+						float: left;
+						height: 36rpx;
+						border-radius: 4rpx;
+						background-color: rgba(225, 86, 22, 0.1);
+						line-height: 36rpx;
+						color: $color-system;
+						text-align: center;
+						display: inline-block;
+						padding:0 16rpx;
+						font-size: $font-size-20;
+					}
+				}
+			}
+			.goods-pros-m{
+				height: 76rpx;
+				line-height: 76rpx;
+				font-size: $font-size-26;
+				color: $text-color;
+				margin-top: 12rpx;
+				.m-text{
+					width: 62rpx;
+					float: left;
+					padding-right: 20rpx;
+					font-weight:bold;
+				}
+				.m-input{
+					display: -webkit-box;
+					display: -webkit-flex;
+					display: flex;
+					-webkit-box-align: center;
+					-webkit-align-items: center;
+					align-items: center;
+					position: relative;
+					width: 580rpx;
+					height: 36rpx;
+					padding: 20rpx;
+					background: #F7F7F7;
+					border-radius: 10rpx;
+					input{
+						width: 100%;
+						height: 100%;
+						background: #F7F7F7;
+						font-size: $font-size-26;
+						line-height: 36rpx;
+						color: #333333;
+						min-height: 36rpx;
+					}
+				}
+			}
+			.goods-pros-b{
+				width:100%;
+				height: auto;
+				padding: 10rpx 0;
+				.sum-none{
+					width: 100%;
+					height: 48rpx;
+					line-height: 48rpx;
+					color: $text-color;
+					float: left;
+					text-align: right;
+					.money{
+						font-size: $font-size-26;
+						color: #999999;
+						text-decoration: line-through;
+					}
+					.money-sign{
+						font-size: $font-size-26;
+						color: #999999;
+						text-decoration: line-through;
+					}
+					.money-reduced{
+						margin-left: 10rpx;
+						font-size: $font-size-26;
+						color: $color-system;
+						.iconfont{
+							font-size: $font-size-34;
+						}
+					}
+				}
+				.sum{
+					width: 100%;
+					height: 48rpx;
+					font-size: $font-size-28;
+					line-height: 48rpx;
+					color: $text-color;
+					display: flex;
+					justify-content: flex-end;
+					.money{
+						color: #FF2A2A;
+						font-size: $font-size-28;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 64 - 38
components/cm-module/listTemplate/buyagainList.vue

@@ -11,18 +11,27 @@
 						<text class="list-details-miniQuantity">起订量:{{item.ladderPriceFlag == '1' ? item.maxBuyNumber : item.minBuyNumber}}</text>
 						<view class="list-details-price">
 							<view class="list-shop">
-								<view class="list-price" >
-									<text class="price-view activity" v-if="item.isShowActFlg">活</text>
-									<text class="price-view ladder" v-if="item.ladderPriceFlag == 1">阶</text>
-									<text class="price-larger">¥{{item.retailPrice.toFixed(2)}}</text>
-								</view>
 								<view class="list-price-none" v-if="item.repurchasePriceState">
 									<text class="price-none">¥{{item.discountPrice}}</text>
 									<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
 								</view>
+								<view class="list-price" v-else>
+									<text class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">¥{{item.retailPrice | NumFormat}}</text>
+								</view>
 							</view>
 							<button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>
 						</view>
+						<view class="list-details-price" v-if="item.actStatus==1">
+							<view class="floor-item-act">
+								<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+									{{item.promotions.name}}<text>:¥{{ item.retailPrice | NumFormat }}</text>
+								</view>
+								<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
+							</view>
+							<view class="floor-item-act" v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+								<view class="floor-tags">阶梯价格</view>	
+							</view>
+						</view>	
 					</view>
 				</view>
 				<view v-if="showLoading && productList.length > 4 && !showRegularBtn">
@@ -97,6 +106,11 @@
 				this.getProductAgainInfo()
 			})
 		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
@@ -172,10 +186,19 @@
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`);
 				this.isModallayer = false;
 			},
-			
 			repurchModel(){
 				this.$util.modal('','此商品的价格有变化,原来的购买价已不适用','知道了','',false,() =>{})
 			},
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			},
 			onShowClose () {//输入框失去焦点时触发
 				if(this.searchInputVal != ''){
 					this.isShowClose = true
@@ -225,7 +248,7 @@
 		}
 	}
 	.all-type-list-content {
-		height: 240rpx;
+		height: auto;
 		padding: 24rpx;
 		background: #fff;
 		margin-bottom: 2rpx;
@@ -268,9 +291,26 @@
 	}
 	.list-details-price {
 		width: 100%;
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;		
+		float: left;
+		.floor-item-act{
+			height: 54rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: left;
+			.floor-tags{
+				float: left;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				margin-top: 9rpx;
+				font-size: $font-size-20;
+			}
+		}
 		.price-icon {
 			width: 22rpx;
 			height: 28rpx;
@@ -302,38 +342,22 @@
 				color: #FF2A2A;
 			}
 		}
-		
 		.list-shop{
-			width: 100%;
 			height: auto;
-			flex: 6;
+			float: left;
 			.list-price {
 				width: 100%;
 				color: #FF2A2A;
 				float: left;
-				line-height:36rpx ;
+				line-height:54rpx ;
 				align-items: center;
 				justify-content: center;
 				.price-larger {
-					margin-top: 20rpx;
 					font-size: $font-size-30;
 					display: inline-block;
-				}
-				.price-view{
-					display: inline-block;
-					width: 40rpx;
-					border-radius: 10rpx;
-					font-size: $font-size-22;
-					text-align: center;
-					color: #FFFFFF;
-					height: 36rpx;
-					line-height: 36rpx;
-					margin-right: 8rpx;
-					&.ladder{
-						background: linear-gradient(135deg,rgba(255,0,0,1) 0%,rgba(242,143,49,1) 100%);
-					}
-					&.activity{
-						background: linear-gradient(135deg,rgba(128,0,255,1) 0%,rgba(242,49,153,1) 100%);
+					&.none{
+						text-decoration: line-through;
+						color: #999999;
 					}
 				}
 			}
@@ -352,15 +376,17 @@
 			}
 		}
 		.add-cart-btn {
-			flex: 4;
-			width: 156rpx;
-			height: 64rpx;
-			line-height: 64rpx;
-			border-radius: 32rpx;
+			float: right;
+			width: 140rpx;
+			height: 54rpx;
+			line-height: 54rpx;
+			border-radius: 27rpx;
 			color: #fff;
-			font-size: 26rpx;
+			font-size: 24rpx;
 			margin-right: 0;
-			background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+			background:#FFFFFF;
+			border: 1px solid #C9C9C9;
+			color: $text-color;
 		}
 	}
 	.cart-icon {

+ 139 - 93
components/cm-module/listTemplate/immediatelyList.vue

@@ -41,20 +41,29 @@
 								<view>商品编码:{{item.p_code}}</view>
 							</view>
 							<view class="list-details-price">
-								<view v-if="priceLoading" class="list-price-loding">正在获取价格...</view>
-								<view v-else class="list-shop">
-									<view class="list-price">
-										<text class="price-larger">¥{{item.price ? item.price :'0.00'}}</text>
-										<text class="price-view activity" v-if="item.isShowActFlg">活</text>
-										<text class="price-view ladder" v-if="item.ladderPriceFlag == '1'" @click.stop="alertjieti(item)">阶</text>
+								<template v-if="priceLoading">
+									<view class="list-price-loding">正在获取价格...</view>
+								</template>
+								<template v-else>
+									<view class="list-shop">
+										<view class="list-price">
+											<text class="price-larger" :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">¥{{item.price | NumFormat}}</text>
+										</view>
 									</view>
-									<view class="list-price-none" v-if="item.repurchasePriceState">
-										<text class="price-none">¥{{item.discountPrice}}</text>
-										<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
+									<button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>
+								</template>
+							</view>
+							<view class="list-details-price" v-if="item.actStatus==1">
+								<view class="floor-item-act">
+									<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
+										{{item.promotions.name}}<text>:¥{{ item.price | NumFormat }}</text>
 									</view>
+									<view class="floor-tags" v-else>{{item.promotions.name}}</view>	
 								</view>
-								<button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>
-							</view>
+								<view class="floor-item-act" v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
+									<view class="floor-tags">阶梯价格</view>	
+								</view>
+							</view>	
 						</view>
 					</view>
 					<view v-if="showLoading && listData.length > 4 && !showRegularBtn">
@@ -73,24 +82,35 @@
 								<text class="list-details-title zuhe_list_text">商品编码:{{pros.productCode}}</text>
 								<text class="list-details-specs zuhe_list_text" @click.stop="navToDetailPage(pros.productID)">{{pros.name}}</text>
 								<view class="list-details-price zuhe_list_price">
-									<view class="list-shop">
+									<view class="list-shop com">
 										<view class="list-price zuhe_list_price" >
-											<view class="zuhe_price-larger zuhe_list_text" >价格:¥{{pros.retailPrice.toFixed(2)}}</view>
-											<view :style="{'overflow':'hidden'}">
-											<view class="price-two zuhe_list_text" >总价:<text class="zuhe_list_zj">¥ {{pros.totalPrice.toFixed(2)}}</text></view>
-											<text class="price-view ladder zuhe-price-ladder" v-if="pros.ladderPriceFlag == '1'" @click.stop="alertjieti(pros)">阶</text>
-											<text class="price-view activity" v-if="pros.actStatus == '1'">活动价</text>
+											<view class="zuhe_price-larger zuhe_list_text" >
+												<view class="list-price-none" v-if="pros.repurchasePriceState">
+													<text class="price-none">价格:¥{{pros.discountPrice}}</text>
+													<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
+												</view>
+												<view class="price-larger">价格:¥{{ pros.retailPrice | NumFormat }}</view>
 											</view>
-										</view>
-										<view class="list-price-none" v-if="pros.repurchasePriceState">
-											<text class="price-none">价格:¥{{pros.discountPrice}}</text>
-											<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
-										</view>
-										<view class="count">
-											<view class="number-box">
-												<view  class="iconfont icon-jianhao"  @click.stop="changeCountSub(item,pros)"></view>
-												<input class="btn-input" type="number" maxlength='6' v-model="pros.initProductNum" @blur="changeNnmber($event,item,pros)">
-												<view  class="iconfont icon-jiahao"   @click.stop="changeCountAdd(item,pros)"></view>
+											<view class="zuhe_price-larger zuhe_list_text" >
+												<view class="floor-item-act" v-if="pros.actStatus==1">
+													<view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
+														{{pros.promotions.name}}<text>:¥{{ pros.price | NumFormat }}</text>
+													</view>
+													<view class="floor-tags" v-else>{{pros.promotions.name}}</view>	
+												</view>
+												<view class="floor-item-act" v-if="pros.actStatus ==0  &&  pros.ladderPriceFlag==1">
+													<view class="floor-tags">阶梯价格</view>	
+												</view>
+												<view class="count">
+													<view class="number-box">
+														<view  class="iconfont icon-jianhao"  @click.stop="changeCountSub(item,pros)"></view>
+														<input class="btn-input" type="number" maxlength='6' v-model="pros.initProductNum" @blur="changeNnmber($event,item,pros)">
+														<view  class="iconfont icon-jiahao"   @click.stop="changeCountAdd(item,pros)"></view>
+													</view>
+												</view>	
+											</view>
+											<view class="list-price-all" :style="{'overflow':'hidden'}">
+												<view class="price-two zuhe_list_text" >总价:<text class="zuhe_list_zj">¥ {{ pros.totalPrice | NumFormat }}</text></view>
 											</view>
 										</view>
 									</view>
@@ -103,7 +123,7 @@
 									<text>种类:{{item.productKind}}</text>
 									<text >总数:{{item.productTotalNum}}</text>
 								</view>
-								<text>总额:<text class="foot_text">{{item.productTotalAmount.toFixed(2)}}</text></text>
+								<text>总额:<text class="foot_text">{{ item.productTotalAmount | NumFormat }}</text></text>
 							</view>
 							<button type="default" class="buycart" @click.stop="operationHanld(item)">加入购物车</button>
 						</view>
@@ -205,6 +225,11 @@
 			this.getProductAgainInfo()
 			this.isFocus = true
 		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
@@ -242,10 +267,10 @@
 						this.showEmpty = false;
 						if(loadMore) {
 							this.listData = [...this.listData,...resList];
-							this.setProductPrice()
+							this.getProductPrice()
 						} else {
 							this.listData = [...resList];
-							this.setProductPrice()
+							this.getProductPrice()
 							this.showSkeleton = false;
 						}
 						// 防上拉暴滑
@@ -268,47 +293,31 @@
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			setProductPrice(){//获取价格
+			getProductPrice(){//获取商品或者活动价格
 				let productIdArr = [];
-				this.listData.map(item=>{
-					productIdArr.push(item.p_id) 
+				let productIds ='';
+				this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
+					productIdArr.push(item.p_id)
 				})
-				this.productIds = productIdArr.join(",");
-				this.ProductService.querySearchProductPrice({userId: this.clubUserId,productIds:this.productIds}).then(response =>{
-					if (response.data) {
-						let priceList = response.data,isActFlg;
-						this.listData.map(item=>{
-							for (let i = 0; i < priceList.length; i++) {
-								if(priceList[i].actStatus == 1){
-									isActFlg = true
-								}else if(priceList[i].actStatus == 1 && priceList[i].ladderPriceFlag == '1'){
-									isActFlg = true
-								}else{
-									isActFlg = false
-								}
-								let priceObj ={
-										step:priceList[i].step,
-										actStatus:priceList[i].actStatus,
-										costCheckFlag:priceList[i].costCheckFlag,
-										costPrice:priceList[i].costPrice,
-										costProportional:priceList[i].costProportional,
-										ladderPriceFlag:priceList[i].ladderPriceFlag,
-										price:Number(priceList[i].price).toFixed(2),
-										minBuyNumber:priceList[i].minBuyNumber,
-										isShowActFlg:isActFlg
-								}
-								if( item.p_id == priceList[i].productId ){
-									Object.assign(item,priceObj)
-								}
-							}
-						});
-						
-					}
+				productIds = productIdArr.join(",");
+				this.ProductService.querySearchProductPrice({userId: this.clubUserId,productIds:productIds}).then(response =>{
+					this.listData = this.ReturnNewProducts(this.listData,response.data);
 					this.priceLoading = false;
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
+			ReturnNewProducts(Array,list){//合并字段
+				let NewArray = []
+				Array.map(item=>{
+					for (let i = 0; i < list.length; i++) {
+						if( item.p_id == list[i].productId ){
+							NewArray.push(Object.assign(item,list[i])) 
+						}
+					}
+				});
+				return NewArray
+			},
 			searchOpertor(tabIndex){//搜索商品
 				if(tabIndex == 0){
 					if(this.searchInputVal == ''){
@@ -463,6 +472,7 @@
 			changeTab(index){
 				this.tabIndex = index;
 				if(index == 0){
+					this.pageNum = 1
 					this.getProductAgainInfo()
 				}else{
 					this.getcombinationProduct()
@@ -504,6 +514,16 @@
 				let name = this.$reg.interceptHtmlFn(text)
 				return name
 			},
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			},
 			btnClick() {
 				this.$emit('goCartPage')
 			},
@@ -551,7 +571,7 @@
 		height: 64rpx;
 		background: #EFAF00 !important;
 		color: #fff;
-		font-size: 28rpx;
+		font-size: 26rpx;
 		border-radius: 36rpx;
 		text-align: center;
 		line-height: 64rpx;
@@ -742,7 +762,7 @@
 		.list-details-specs {
 			width: 100%;
 			display: inline-block;
-			margin-top: 8rpx;
+			margin: 5rpx 0;
 			color: #666666;
 		}
 		.list-details-miniQuantity {
@@ -753,9 +773,25 @@
 	}
 	.list-details-price {
 		width: 100%;
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;		
+		.floor-item-act{
+			height: 54rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: left;
+			.floor-tags{
+				float: left;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				margin-top: 9rpx;
+				font-size: $font-size-20;
+			}
+		}
 		.price-icon {
 			width: 22rpx;
 			height: 28rpx;
@@ -788,33 +824,44 @@
 			}
 		}
 		.list-price-loding{
-			flex: 6;
 			font-size:$font-size-24;
-			line-height: 64rpx;
+			line-height: 54rpx;
 			color: #FF2A2A;
 		}
 		.list-shop{
-			width: 100%;
-			height: auto;
-			flex: 6;
+			float: left;
 			overflow: hidden;
+			&.com{
+				width: 100%;
+			}
 			.list-price {
-				// width: 100%;
 				color: #FF2A2A;
 				float: left;
-				line-height:36rpx ;
+				line-height:54rpx ;
 				align-items: center;
 				justify-content: center;
 				.price-larger {
-					margin-top: 20rpx;
-					font-size: $font-size-30;
+					font-size: $font-size-26;
 					display: inline-block;
-					margin-right: 20rpx;
+					&.none{
+						text-decoration: line-through;
+						color: #999999;
+					}
+				}
+				.list-price-all{
+					width: 100%;
+					float: left;
 				}
 				.zuhe_price-larger{
+					width: 100%;
+					float: left;
+					height: 54rpx;
 					color: #666666;
-					// float: left;
-					// margin-right: 85rpx;
+					.price-larger{
+						float: left;
+						margin-right: 20rpx;
+					}
+					
 				}
 				.price-two{
 					color: #666666;
@@ -848,12 +895,11 @@
 				margin-top: 5rpx;
 			}
 			.zuhe_list_price{
-				width: 400rpx;
+				width: 100%;
 				overflow: hidden;
 				margin-top: 10rpx;
 			}
 			.count{
-				margin-top: 50rpx;
 				float: right;
 				border: 1px solid #EEEEEE;
 				border-radius: 10rpx;
@@ -898,16 +944,16 @@
 		}
 		.add-cart-btn {
 			flex: 4;
-			width: 156rpx;
-			height: 64rpx;
-			line-height: 64rpx;
-			border-radius: 32rpx;
-			color: #333333;
-			font-size: 26rpx;
+			width: 140rpx;
+			height: 54rpx;
+			line-height: 54rpx;
+			border-radius: 27rpx;
+			color: #fff;
+			font-size: 24rpx;
 			margin-right: 0;
-			// background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
-			background: #FFFFFF;
-			border: 2rpx solid #C9C9C9;
+			background:#FFFFFF;
+			border: 1px solid #C9C9C9;
+			color: $text-color;
 		}
 		.zuhe_btn{
 			float: right;
@@ -917,6 +963,6 @@
 		display: block !important;
 	}
 	.zuhe_list_text{
-		margin-top: 10rpx;
+		margin-top: 0;
 	}
 </style>

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

@@ -22,6 +22,7 @@
 									<text class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">¥{{item.retailPrice | NumFormat}}</text>
 								</view>
 							</view>
+							<button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>
 						</view>
 						<view class="list-details-price" v-if="item.actStatus==1">
 							<view class="floor-item-act">
@@ -33,7 +34,6 @@
 							<view class="floor-item-act" v-if="item.actStatus ==0  &&  item.ladderPriceFlag==1">
 								<view class="floor-tags">阶梯价格</view>	
 							</view>
-							<button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>
 						</view>	
 					</view>
 				</view>
@@ -345,20 +345,17 @@
 				color: #FF2A2A;
 			}
 		}
-		
 		.list-shop{
-			width: 100%;
 			height: auto;
-			flex: 6;
+			float: left;
 			.list-price {
 				width: 100%;
 				color: #FF2A2A;
 				float: left;
-				line-height:36rpx ;
+				line-height:54rpx ;
 				align-items: center;
 				justify-content: center;
 				.price-larger {
-					margin-top: 20rpx;
 					font-size: $font-size-30;
 					display: inline-block;
 					&.none{
@@ -382,7 +379,7 @@
 			}
 		}
 		.add-cart-btn {
-			flex: 4;
+			float: right;
 			width: 140rpx;
 			height: 54rpx;
 			line-height: 54rpx;

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

@@ -37,11 +37,11 @@
 							<view class="floor-item-act" v-if="pros.productPromotion!=null" >
 								<view v-if="PromotionsFormat(pros.productPromotion)" class="floor-tags" @click.stop="clickPopupShow(pros.productPromotion)">
 									{{pros.productPromotion.name}}
-									<text v-if ="pros.productPromotion!=null">
+									<text v-if ="pros.productPromotion!=null && pros.productPromotion.type !=3">
 										:¥{{ pros.productPromotion == null ? '0.00' : pros.productPromotion.touchPrice | NumFormat}}
 									</text>
 								</view>
-								<view v-else class="floor-tags" @click.stop="clickPopupShow(pros.productPromotion)">{{pros.productPromotion.name}}</view>	
+								<view v-else-if="pros.productPromotion.type !=3" class="floor-tags" @click.stop="clickPopupShow(pros.productPromotion)">{{pros.productPromotion.name}}</view>	
 							</view>
 							<view class="product-view">
 								<view class="view-num">合计:¥{{pros.totalFee | NumFormat}}</view>

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

@@ -173,7 +173,7 @@
 						width: 72rpx;
 						height: 30rpx;
 						background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
-						border-radius: 15rpx;
+						border-radius: 4rpx;
 						line-height: 30rpx;
 						font-size: $font-size-24;
 						text-align: center;
@@ -185,7 +185,7 @@
 						width: 72rpx;
 						height: 30rpx;
 						background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
-						border-radius: 15rpx;
+						border-radius: 4rpx;
 						line-height: 30rpx;
 						font-size: $font-size-24;
 						text-align: center;

+ 18 - 19
pages/goods/cart.vue

@@ -29,9 +29,11 @@
 											<view class="checkbox iconfont" :class="[pros.productsChecked ? 'icon-gouxuanl':'icon-weigouxuan']">
 											</view>
 										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productId)"	><image :src="pros.image ? pros.image:''" alt="" /></view>
+										<view class="pros-img" @click.stop="navToListPage(pros.productId)">
+											<image :src="pros.image ? pros.image:''" alt="" />
+										</view>
 										<view class="pros-product">
-											<view class="producttitle" @click.stop="navToListPage(pros.productId)"	>{{pros.name}}</view>
+											<view class="producttitle" @click.stop="navToListPage(pros.productId)">{{pros.name}}</view>
 											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
 											<view class="productprice">
 												<!--使用过滤器对总价改变-->
@@ -51,11 +53,11 @@
 											<view v-show="pros.actStatus==1" class="floor-item-act">
 												<view v-if="PromotionsFormat(pros.promotions)"  class="floor-tags" @click.stop="clickPopupShow(pros,1)">
 													{{pros.promotions.name}}
-													<text v-if ="pros.promotions!=null">
+													<text v-if ="pros.promotions!=null && pros.promotions.type!=3">
 														:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
 													</text>
 												</view>
-												<view v-else class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
+												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
 											</view>
 											<view  v-if="pros.actStatus == null  &&  pros.ladderFlag == 1" class="floor-item-act">
 												<view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>	
@@ -110,7 +112,6 @@
 							<button class="checkbox iconfont" :class="[isCheckAll?'icon-gouxuan':'icon-weigouxuan']"></button> 
 							<view class="text">全选</view>
 						</view>
-			
 						<view class="sum">
 							<view class="sum-none" v-if="reducedPrice>0">
 								<text class="money-sign">¥</text>
@@ -180,7 +181,6 @@
 				handlerPros:{},//监听单挑促销商品
 				failureList:[],	//失效商品列表
 				goodsList:[],	//购物车的商品
-				promotionsList:[],//促销列表
 				delGoodsList:'',//要删除的商品
 				setGoodData:'', //确认订单的商品
 				isCheckAll:false,//是否全选
@@ -261,7 +261,6 @@
 					this.skeletonShow = false
 					let data = response.data
 					this.kindCount = data.kindCount
-					this.promotionsList = data.promotions
 					this.$store.commit('updateAllNum',data.kindCount)
 					if( data.list.length > 0 || data.invalid.length > 0){
 						this.isEmpty =false
@@ -460,23 +459,23 @@
 						if(pros.productsChecked){
 							if(item.promotions && item.promotions.mode == 2){
 								prosPrice = pros.price*pros.number
-								if(prosPrice >= item.promotions.touchPrice){
-									totalPrice += prosPrice - item.promotions.reducedPrice  
-									totalOriginalPrice += pros.originalPrice*pros.number
-									reducedPrice += item.promotions.reducedPrice
+								if(prosPrice >= item.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
+									totalPrice += prosPrice - item.promotions.reducedPrice  //统计合计价格
+									totalOriginalPrice += pros.originalPrice*pros.number //统计原商品价格
+									reducedPrice += item.promotions.reducedPrice	//统计总减金额
 								}else{
-									totalPrice += prosPrice
+									totalPrice += prosPrice	//未达满减的统计合计价格
 								}
 							}else if(pros.promotions && pros.promotions.mode == 2){//以下为计算除店铺满减以外的单品满减以及正常商品
 								let _price = pros.price*pros.number
-								_totalOriginalPrice += pros.originalPrice*pros.number;
-								if(_price >= pros.promotions.touchPrice){
-									_price = _price - pros.promotions.reducedPrice
-									_reducedPrice += pros.promotions.reducedPrice
+								_totalOriginalPrice += pros.originalPrice*pros.number; //统计原商品价格
+								if(_price >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
+									_price = _price - pros.promotions.reducedPrice //商品满减后价格
+									_reducedPrice += pros.promotions.reducedPrice //统计总减金额
 								}
-								_totalPrice +=  _price
+								_totalPrice +=  _price //统计合计价格
 							}else{
-								_totalNonePrice += pros.price*pros.number;
+								_totalNonePrice += pros.price*pros.number; //正常商品的价格总计
 							}
 						}	
 					})
@@ -969,7 +968,7 @@
 			align-items: center;
 			width: 100%;
 			height: 210rpx;
-			padding:0 0 26rpx 0;
+			padding:0 0 20rpx 0;
 			.checkbox-box{
 				padding: 10rpx;
 			}

+ 4 - 4
pages/search/search-order.vue

@@ -69,11 +69,11 @@
 											<view class="floor-item-act" v-if="pros.productPromotion!=null">
 												<view v-if="PromotionsFormat(pros.productPromotion)"  class="floor-tags">
 													{{pros.productPromotion.name}}
-													<text v-if ="pros.productPromotion!=null">
+													<text v-if ="pros.productPromotion!=null && pros.productPromotion.type !=3">
 														:¥{{ pros.productPromotion == null ? '0.00' : pros.productPromotion.touchPrice | NumFormat}}
 													</text>
 												</view>
-												<view v-else class="floor-tags">{{pros.productPromotion.name}}</view>	
+												<view v-else-if="pros.productPromotion.type !=3" class="floor-tags">{{pros.productPromotion.name}}</view>	
 											</view>
 										</view>	
 									</view>
@@ -689,7 +689,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;
@@ -700,7 +700,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;

+ 14 - 15
pages/tabBar/cart/cart.vue

@@ -25,8 +25,7 @@
 									<view class="goods-pros-t">
 										<!--选择商品-->
 										<view class="checkbox-box" @click.stop="ischeck(item,pros)">
-											<view class="checkbox iconfont" :class="[pros.productsChecked ? 'icon-gouxuanl':'icon-weigouxuan']">
-											</view>
+											<view class="checkbox iconfont" :class="[pros.productsChecked ? 'icon-gouxuanl':'icon-weigouxuan']"></view>
 										</view>
 										<view class="pros-img" @click.stop="navToListPage(pros.productId)"	><image :src="pros.image ? pros.image:''" alt="" /></view>
 										<view class="pros-product">
@@ -50,11 +49,11 @@
 											<view v-show="pros.actStatus==1" class="floor-item-act">
 												<view v-if="PromotionsFormat(pros.promotions)"  class="floor-tags" @click.stop="clickPopupShow(pros,1)">
 													{{pros.promotions.name}}
-													<text v-if ="pros.promotions!=null">
+													<text v-if ="pros.promotions!=null && pros.promotions.type!=3">
 														:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
 													</text>
 												</view>
-												<view v-else class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
+												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
 											</view>
 											<view  v-if="pros.actStatus == null  &&  pros.ladderFlag == 1" class="floor-item-act">
 												<view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>	
@@ -452,23 +451,23 @@
 						if(pros.productsChecked){
 							if(item.promotions && item.promotions.mode == 2){
 								prosPrice = pros.price*pros.number
-								if(prosPrice >= item.promotions.touchPrice){
-									totalPrice += prosPrice - item.promotions.reducedPrice  
-									totalOriginalPrice += pros.originalPrice*pros.number
-									reducedPrice += item.promotions.reducedPrice
+								if(prosPrice >= item.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
+									totalPrice += prosPrice - item.promotions.reducedPrice  //统计合计价格
+									totalOriginalPrice += pros.originalPrice*pros.number //统计原商品价格
+									reducedPrice += item.promotions.reducedPrice	//统计总减金额
 								}else{
-									totalPrice += prosPrice
+									totalPrice += prosPrice	//未达满减的统计合计价格
 								}
 							}else if(pros.promotions && pros.promotions.mode == 2){//以下为计算除店铺满减以外的单品满减以及正常商品
 								let _price = pros.price*pros.number
-								_totalOriginalPrice += pros.originalPrice*pros.number;
-								if(_price >= pros.promotions.touchPrice){
-									_price = _price - pros.promotions.reducedPrice
-									_reducedPrice += pros.promotions.reducedPrice
+								_totalOriginalPrice += pros.originalPrice*pros.number; //统计原商品价格
+								if(_price >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
+									_price = _price - pros.promotions.reducedPrice //商品满减后价格
+									_reducedPrice += pros.promotions.reducedPrice //统计总减金额
 								}
-								_totalPrice +=  _price
+								_totalPrice +=  _price //统计合计价格
 							}else{
-								_totalNonePrice += pros.price*pros.number;
+								_totalNonePrice += pros.price*pros.number; //正常商品的价格总计
 							}
 						}	
 					})

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

@@ -56,14 +56,14 @@
 														<text class="small">x</text>{{pros.num}}
 													</view>
 												</view>
-												<view class="floor-item-act" v-if="pros.productPromotion!=null">
+												<view class="floor-item-act" v-if=" pros.productPromotion!=null ">
 													<view v-if="PromotionsFormat(pros.productPromotion)"  class="floor-tags">
 														{{pros.productPromotion.name}}
-														<text v-if ="pros.productPromotion!=null">
+														<text v-if ="pros.productPromotion!=null && pros.productPromotion.type !=3">
 															:¥{{ pros.productPromotion == null ? '0.00' : pros.productPromotion.touchPrice | NumFormat}}
 														</text>
 													</view>
-													<view v-else class="floor-tags">{{pros.productPromotion.name}}</view>	
+													<view v-else-if="pros.productPromotion.type !=3" class="floor-tags">{{pros.productPromotion.name}}</view>	
 												</view>
 											</view>	
 										</view>
@@ -650,7 +650,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;
@@ -661,7 +661,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;

+ 2 - 3
seller/pages/cart/buyagain.vue

@@ -40,7 +40,6 @@
 
 <script>
 	import buyagainList from '@/components/cm-module/listTemplate/buyagainList'
-	import { getSellerProductNum,shoppingCartAddCart } from "@/api/seller.js" 
 	export default{
 		components:{
 			buyagainList
@@ -69,7 +68,7 @@
 		},
 		methods:{
 			getClubProductNum(){
-				getSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
+				this.SellerService.GetSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
 					this.$refs.productList.cartQuantity = response.data
 				})
 			},
@@ -149,7 +148,7 @@
 						serviceProviderId:this.serviceProviderId,
 						num:this.number
 					}
-				shoppingCartAddCart(params).then(response => {
+				this.SellerService.ShoppingCartAddCart(params).then(response => {
 					this.specClass = 'hide';
 					this.$util.msg('加入购物车成功',1500,true,'success')
 					this.getClubProductNum()

+ 345 - 107
seller/pages/cart/cart.vue

@@ -1,7 +1,11 @@
 <template>
 	<view class="container cart clearfix">	
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
-		<view class="container-cart-main tui-skeleton">
+		<view class="foot-check-delbtn" v-if="!isshowDelbtn && goodsList.length>0" :style="{top:CustomBar+'px'}">
+			<view class="foot-text">共<text>{{kindCount}}</text>件商品</view>
+			<view class="delBtn" @tap.stop="showDelManager">删除</view>
+		</view>
+		<view class="container-cart-main tui-skeleton" :style="{paddingTop:isshowDelbtn ? '0rpx':'80rpx'}">
 			<view v-if="!isEmpty" class="container-cart">
 				<scroll-view class="cart-content"  scroll-y  @scrolltolower="toLower">
 					<view class="goods-list">
@@ -9,25 +13,23 @@
 							<view class="shoptitle">
 								<!--选择商店的全部商品 :disabled="isNnder"-->
 								<view class="checkbox-box" @click.stop="checkShop(item)">
-									<button class="checkbox iconfont" 
-											:class="[item.checked ?'icon-gouxuanl':'icon-weigouxuan']">
-									</button>
+									<view class="checkbox iconfont" :class="[item.checked ?'icon-gouxuanl':'icon-weigouxuan']"></view>
+								</view>
+								<view v-if="item.promotions" class="floor-item-act">
+									<view class="floor-tags" @click.stop="clickPopupShow(item,2)">{{item.promotions.name}}</view>	
 								</view>
 								<view class="text">{{item.name}}</view> 
 							</view>
 							<view class="productlist">
-								<view 	class="goods-pros" 
-										v-for="(pros,idx) in item.productsList" 
-										:key="idx"														
-								>
+								<view 	class="goods-pros" v-for="(pros,idx) in item.productsList" :key="idx">
 									<view class="goods-pros-t">
 										<!--选择商品-->
 										<view class="checkbox-box" @click.stop="ischeck(item,pros,idx)">
-											<button class="checkbox iconfont" 
-													:class="[pros.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']">
-											</button>
+											<view class="checkbox iconfont" :class="[pros.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']"></view>
+										</view>
+										<view class="pros-img" @click.stop="navToListPage(pros.productID)">
+											<image :src="pros.mainImage ? pros.mainImage :''" alt="" />
 										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productID)"><image :src="pros.mainImage ? pros.mainImage :''" alt="" /></view>
 										<view class="pros-product">
 											<view class="producttitle" @click.stop="navToListPage(pros.productID)"	>
 												{{pros.name}}
@@ -38,9 +40,7 @@
 											</view>
 											<view class="productprice">
 												<!--使用过滤器对总价改变-->
-												<view class="price"><text>¥</text>
-														{{pros.retailPrice ? pros.retailPrice.toFixed(2) : ''}}
-												</view>
+												<view class="price"><text>¥</text>{{ pros.retailPrice  |  NumFormat}}</view>
 												<view class="count" :class="[isshowDelbtn ? 'none':'show']">
 													<text class="count-tips step" v-if="pros.isStep">购买量必须为起订量的整数倍</text>
 													<view class="number-box">
@@ -50,12 +50,29 @@
 													</view>
 												</view>
 											</view>
+											<view v-show="pros.actStatus==1" class="floor-item-act">
+												<view v-if="PromotionsFormat(pros.promotions)"  class="floor-tags" @click.stop="clickPopupShow(pros,1)">
+													{{pros.promotions.name}}
+													<text v-if ="pros.promotions!=null && pros.promotions.type!=3">
+														:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
+													</text>
+												</view>
+												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
+											</view>
+											<view  v-if="pros.actStatus == null  &&  pros.ladderFlag == 1" class="floor-item-act">
+												<view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>	
+											</view>
 										</view>	
 									</view>
 								</view>
 							</view>	
-							<view class="goods-pros-b" :class="[isshowDelbtn ? 'none':'show']" >
-								<view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice.toFixed(2)}}</text></view>
+							<view class="goods-pros-b clearfix" :class="[isshowDelbtn ? 'none':'show']" >
+								<view class="sum-none" v-if="item.reducedPrice>0">
+									<text class="money-sign">¥</text>
+									<text class="money">{{ item.totalOriginalPrice | NumFormat }}</text>
+									<text class="money-reduced">减<text>¥{{ item.reducedPrice | NumFormat}}</text></text>
+								</view>
+								<view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice | NumFormat}}</text></view>
 							</view>
 						</view>
 					</view>	
@@ -71,13 +88,19 @@
 							<button class="checkbox iconfont" :class="[isCheckAll?'icon-gouxuan':'icon-weigouxuan']"></button> 
 							<view class="text">全选</view>
 						</view>
-						<view class="foot-check-delbtn">
-							<button class="delBtn" @tap.stop="showDelManager">删除</button>
+						<view class="sum">
+							<view class="sum-none" v-if="reducedPrice>0">
+								<text class="money-sign">¥</text>
+								<text class="money">{{ totalOriginalPrice | NumFormat }}</text>
+								<text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
+							</view>
+							<view class="sum-price" :class="reducedPrice == 0 ? 'none' : ''">
+								总价:<text class="money-sign">¥</text><text class="money">{{allPrice | NumFormat}}</text>
+							</view>
 						</view>
-						<view class="sum">总价:<text class="money-sign">¥</text><text class="money">{{allPrice.toFixed(2)}}</text></view>
 					</view>
 					<view v-if="!isshowDelbtn" class="footer-ri" >
-						<view class="btn" @tap="toConfirmation">去结算({{allCount}})</view>
+						<view class="btn hanld-btn" @tap="toConfirmation">去结算({{allCount}})</view>
 					</view>
 					<view v-else class="footer-del">
 						<view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
@@ -92,6 +115,8 @@
 				</view>
 			</view>
 		</view>
+		<!-- 促销活动弹窗 -->
+		<activi-popup :product="handlerPros" :popupShow="popupShow"></activi-popup>
 		<!-- 透明模态层 -->
 		<modal-layer v-if='modallayer'></modal-layer>
 	</view>
@@ -100,26 +125,32 @@
 	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 { getSellerShoppingInfo,sellerAddProductNum, deleteSellerCart } from "@/api/seller.js" 
 	
 	export default{
 		components:{
 			tuiSkeleton,
 			tuiLoadmore,
 			tuiNomore,
+			activiPopup,
 			modalLayer
 		},
 		data(){
 			return{
 				clubId:'',	//机构ID
+				kindCount:0,
 				serviceProviderId:'',//协销ID
 				isStock:'',
+				popupShow:false,
+				handlerPros:{},//监听单挑促销商品
 				goodsList:[],	//购物车的商品
 				delGoodsList:'',//要删除的商品
 				setGoodData:'', //确认订单的商品
 				isCheckAll:false,//是否全选
+				totalOriginalPrice:0,//所有原价价
+				reducedPrice:0,//满减
 				allPrice:0,//所有价格
 				allCount:0,//被选中的产品数量
 				isNnder:true,
@@ -145,8 +176,11 @@
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
-		filters:{//单件商品的价格 × 数量
-		    totalprice(val,count){
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		    totalprice(val,count){//单件商品的价格 × 数量
 		        return (val * count).toFixed(2)
 		    }
 		},	
@@ -163,6 +197,10 @@
 			initLogin(){
 				this.$api.redirectTo('/pages/login/login?type=4')
 			},
+			clickPopupShow(pros,type){//显示活动弹窗
+				this.popupShow = true;
+				this.handlerPros = pros;
+			},
 			setScrollHeight() {
 				// 窗口高度-footer高度
 				const {windowHeight, pixelRatio} = uni.getSystemInfoSync();
@@ -179,7 +217,7 @@
 			},
 			initGetCartGoodsList(){//初始化购物车 index:1
 				let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize}
-				getSellerShoppingInfo(params).then(response =>{
+				 this.SellerService.GetSellerShoppingInfo(params).then(response =>{
 					this.skeletonShow = false
 					this.$store.commit('updateAllNum',response.data.cartQuantity)
 					const resultsData = response.data.pageDate;	
@@ -189,6 +227,7 @@
 						this.goodsList = resultsData.results;
 						this.goodsList.forEach((item,index) => {
 							let productsListLength = item.productsList.length,invalidLength = 0;
+							this.kindCount = productsListLength;
 							item.productsList.forEach(pros => {
 								pros.shopID = item.shopID;
 								pros.isStep = false
@@ -201,6 +240,7 @@
 								}
 							})
 						})
+						this.totalShopPeice()
 						this.pullFlag = false;
 						setTimeout(()=>{this.pullFlag = true;},500)
 						if(this.hasNextPage){
@@ -225,7 +265,7 @@
 			getOnReachBottomData(){//上拉加载
 				this.pageNum+=1
 				let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:this.pageNum,pageSize:this.pageSize}
-				getSellerShoppingInfo(params).then(response =>{
+				this.SellerService.GetSellerShoppingInfo(params).then(response =>{
 					let resultsData = response.data.pageDate
 					this.hasNextPage = resultsData.hasNextPage;
 					this.goodsList = this.goodsList.concat(resultsData.results)
@@ -243,6 +283,7 @@
 							}
 						})
 					})
+					this.totalShopPeice()
 					this.pullFlag = false;// 防上拉暴滑
 					setTimeout(()=>{this.pullFlag = true;},500)
 					if(this.hasNextPage){
@@ -329,31 +370,99 @@
 			},
 			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
 				let prosPrice=0;
-				let validPrice =0;
-				let validList=[];
+				let touchPrice = 0; 
+				let reducedPrice = 0;//商铺合计满减价
+				let totalOriginalPrice = 0;//商铺合计原价
 				let productsList=[];
 				this.goodsList.map((item,index)=>{
-					productsList=item.productsList;
-					prosPrice=productsList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
-					productsList.forEach(pros =>{
-						item.totalPrice = prosPrice
-					})
+					productsList = item.productsList;
+					//计算店铺满减后店铺合计
+					if(item.promotions && item.promotions.mode == 2){
+						productsList.forEach(pros=>{
+							prosPrice += pros.retailPrice*pros.productCount
+							totalOriginalPrice+= pros.retailPrice*pros.productCount;
+							if(prosPrice >= item.promotions.touchPrice){
+								item.totalPrice = prosPrice - item.promotions.reducedPrice  
+								item.reducedPrice = item.promotions.reducedPrice
+								item.totalOriginalPrice = totalOriginalPrice
+							}else{
+								item.totalPrice = prosPrice
+							}
+						})
+					}else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
+						let _totalPrice = 0;
+						let _reducedPrice = 0;
+						let _totalOriginalPrice =0;
+						productsList.forEach(pros=>{
+							let _price = pros.retailPrice*pros.productCount
+							_totalOriginalPrice += pros.retailPrice*pros.productCount;
+							if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
+								if(_price >= pros.promotions.touchPrice){
+									_price = _price - pros.promotions.reducedPrice
+									_reducedPrice += pros.promotions.reducedPrice
+								}
+								_totalPrice +=  _price							
+							}else{
+								_totalPrice += pros.retailPrice*pros.productCount;
+							}
+						})
+						item.reducedPrice = _reducedPrice
+						item.totalOriginalPrice = _totalOriginalPrice
+						item.totalPrice = _totalPrice
+					}
 				})
 			},
 			totalPeice(){	//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
 			    this.allPrice = 0
-				let prosPrice=0;
-				let validPrice=0;
-				let validList =[];
 				let productsList =[];
+				//店铺满减
+				let prosPrice=0;
+				let totalPrice = 0;
+				let reducedPrice=0;//促销满减
+				let totalOriginalPrice=0;//促销原价
+				//凑单满减.单品满减
+				let _totalPrice = 0;
+				let _reducedPrice = 0;
+				let _totalOriginalPrice =0;
+				// 正常商品
+				let _totalNonePrice = 0;
+				/*
+				*originalPrice:商品原价
+				*price:商品现价
+				*mode:促销商品满减计算 促销方式mode为 2 的单独做计算 当mode == 2时商品promotions字段为促销活动内容,
+				*touchPrice 为需要满金额 
+				*reducedPrice 为满减金额
+				**/ 
 			    this.goodsList.forEach((item,index)=>{
-					productsList=item.productsList;
-					productsList.forEach(pros=>{	
+					item.productsList.forEach(pros=>{	
 						if(pros.productsChecked){
-							prosPrice+=pros.retailPrice*pros.productCount;
-							this.allPrice = prosPrice
+							if(item.promotions && item.promotions.mode == 2){
+								prosPrice = pros.retailPrice*pros.productCount
+								totalOriginalPrice += pros.price1*pros.productCount //统计原商品价格
+								if(prosPrice >= item.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
+									totalPrice += prosPrice - item.promotions.reducedPrice  //统计合计价格
+									reducedPrice += item.promotions.reducedPrice	//统计总减金额
+								}else{
+									totalPrice += prosPrice	//未达满减的统计合计价格
+								}
+								console.log(totalOriginalPrice)
+							}else if(pros.promotions && pros.promotions.mode == 2){//以下为计算除店铺满减以外的单品满减以及正常商品
+								let _price = pros.retailPrice*pros.productCount
+								_totalOriginalPrice += pros.price1*pros.productCount; //统计原商品价格
+								if(_price >= pros.promotions.touchPrice){//判断如果商品合计价格已满足满减活动,计算价格
+									_price = _price - pros.promotions.reducedPrice //商品满减后价格
+									_reducedPrice += pros.promotions.reducedPrice //统计总减金额
+								}
+								console.log(_totalOriginalPrice)
+								_totalPrice +=  _price //统计合计价格
+							}else{
+								_totalNonePrice += pros.retailPrice*pros.productCount; //正常商品的价格总计
+							}
 						}	
 					})
+					this.totalOriginalPrice = totalOriginalPrice + _totalOriginalPrice;
+					this.reducedPrice = reducedPrice +_reducedPrice;
+					this.allPrice = totalPrice + _totalPrice + _totalNonePrice;
 			    })
 			},
 			totalCount(){//计算总数量
@@ -435,7 +544,7 @@
 			},
 			updateShoppogNum(pros){//加减购物车商品更新到后台
 				let params ={id:pros.sellerCartId,productID:pros.productID,num:pros.productCount}
-				sellerAddProductNum(params).then(response =>{
+				this.SellerService.SellerAddProductNum(params).then(response =>{
 					this.isshowDelbtn = false;
 					this.initGetCartGoodsList();
 				}).catch(error =>{
@@ -474,7 +583,7 @@
 							allCount:this.allCount,
 							productID:productID.substring(0,productID.lastIndexOf(',')),
 							productCount:''
-					}
+						}
 					this.$api.navigateTo(`/seller/pages/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
 				}
 			},
@@ -510,7 +619,7 @@
 					return
 				}else{				
 					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
-						deleteSellerCart({sellerCartIds:this.delGoodsList}).then(response =>{
+						this.SellerService.DeleteSellerCart({sellerCartIds:this.delGoodsList}).then(response =>{
 							this.$util.msg('删除成功',2000);
 							setTimeout(()=>{
 								this.isshowDelbtn = false;
@@ -527,6 +636,16 @@
 					url
 				})
 			},
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			},
 			navToListPage(id){
 				this.isModallayer = true;
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
@@ -593,6 +712,46 @@
 	.empty-container.show{
 		display: flex;
 	}
+	.foot-check-delbtn{
+		width: 100%;
+		height: 80rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		box-sizing: border-box;
+		padding: 15rpx 24rpx;
+		background-color: #F7F7F7;
+		z-index: 9999;
+		.foot-text{
+			font-size: $font-size-26;
+			height: 50rpx;
+			line-height: 50rpx;
+			color: $text-color;
+			float: left;
+			padding-left: 10rpx;
+			text{
+				color: $color-system;
+				margin: 0 6rpx;
+			}
+		}
+		.delBtn{
+			width: 100rpx;
+			display: inline-block;
+			padding: 0 15rpx;
+			font-size: $font-size-26;
+			height: 50rpx;
+			line-height: 50rpx;
+			border-radius: 30rpx;
+			background:#FFFFFF;
+			border: 1px solid #C9C9C9;
+			color: #999999;
+			float: right;
+			text-align: center;
+			&.none{
+				display: none;	
+			}
+		}
+	}
 	.checkbox-box{
 		display: flex;
 		align-items: center;
@@ -638,18 +797,42 @@
 			display: flex;
 			align-items: center;
 			height: 80rpx;
-			// border-bottom: 1px solid #EBEBEB;
 			line-height: 80rpx;
 			.checkbox-box{
 				padding: 10rpx;
 			}
 			.text{
-				margin-left: 37rpx;
+				width: 450rpx;
+				display: block;
+				overflow: hidden;
+				text-overflow:ellipsis;
+				white-space: nowrap;
+				margin-left: 20rpx;
 				font-size: $font-size-28;
 				color: $text-color;
 				text-align: left;
 				font-weight: bold;
 			}
+			.floor-item-act{
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding:10rpx 0;
+				margin-left: 20rpx;
+				.floor-tags{
+					float: right;
+					height: 36rpx;
+					border-radius: 4rpx;
+					background-color: rgba(225, 86, 22, 0.1);
+					line-height: 36rpx;
+					color: $color-system;
+					text-align: center;
+					display: inline-block;
+					padding:0 16rpx;
+					font-size: $font-size-20;
+				}
+			}
 		}
 		.goods-pros{
 			width: 100%;
@@ -659,40 +842,68 @@
 			display: flex;
 			align-items: center;
 			width: 100%;
-			height: 217rpx;
-			padding:0 0 26rpx 0;
+			height: auto;
+			padding:0 0 20rpx 0;
 			.checkbox-box{
-				padding: 10rpx
+				padding: 10rpx;
 			}
 			.pros-img{
 				width: 210rpx;
-				height: 100%;
+				height: 210rpx;
 				border-radius: 10rpx;
-				margin:0 26rpx 0 38rpx;
+				margin:0 20rpx;
 				border:1px solid #f3f3f3;
 				image{
-					width: 100%;
-					height: 100%;
+					width: 210rpx;
+					height: 210rpx;
 					border-radius: 10rpx;
 				}
 			}
 		}
 		.goods-pros-b{
-			width:622rpx;
-			margin-left: 84rpx;
-			height: 40rpx;
-			padding:0 0 26rpx 0;
-			// border-top: 1px solid #EBEBEB;
+			width:100%;
+			height: auto;
+			padding:0 0 24rpx 0;
+			box-sizing: border-box;
 			&.show{
 				display: block;
 			}
 			&.none{
 				display: none;
 			}
+			.sum-none{
+				width: 100%;
+				height: 48rpx;
+				line-height: 48rpx;
+				color: $text-color;
+				float: left;
+				text-align: right;
+				.money{
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
+				}
+				.money-sign{
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
+				}
+				.money-reduced{
+					margin-left: 10rpx;
+					font-size: $font-size-26;
+					color: $color-system;
+					.iconfont{
+						font-size: $font-size-34;
+					}
+				}
+			}
 			.sum{
+				width: 100%;
+				height: 40rpx;
 				font-size: $font-size-28;
 				line-height: 40rpx;
 				color: $text-color;
+				float: left;
 				display: flex;
 				justify-content: flex-end;
 				.money{
@@ -750,18 +961,18 @@
 				color: #666666;
 			}
 			.productprice{
-				height: 48rpx;
-				position: absolute;
 				width: 100%;
-				bottom: 0;
+				height: 48rpx;
+				margin: 10rpx 0 0 0;
 				.price{
 					line-height: 48rpx;
 					font-size: $font-size-28;
-					// width: 48%;
+					width: 48%;
 					color: #FF2A2A;
 					float: left;
 					&.disabled{
 						color: #999999;
+						text-decoration: line-through;
 					}
 					.money-sign{
 						font-size: $font-size-24;
@@ -822,7 +1033,7 @@
 							font-weight: bold;
 						}
 						.btn-input{
-							width: 90rpx;
+							width: 62rpx;
 							height: 48rpx;
 							line-height: 48rpx;
 							background: #F8F8F8;
@@ -846,6 +1057,27 @@
 					}
 				}
 			}
+			.floor-item-act{
+				width: 100%;
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding:0 0 10rpx 0;
+				margin-left: 10rpx;
+				.floor-tags{
+					float: left;
+					height: 36rpx;
+					border-radius: 4rpx;
+					background-color: rgba(225, 86, 22, 0.1);
+					line-height: 36rpx;
+					color: $color-system;
+					text-align: center;
+					display: inline-block;
+					padding:0 16rpx;
+					font-size: $font-size-20;
+				}
+			}
 		}
 	}
 	.footer{
@@ -854,15 +1086,12 @@
 		height: 110rpx;
 		position: fixed;
 		bottom: 0rpx;
-		z-index: 10;
+		z-index: 100;
 		.footer-le{
-			width: 490rpx;
+			width: 520rpx;
 			height: 100%;
-			padding:0 30rpx;
+			padding:0 24rpx;
 			float: left;
-			.text{
-				font-weight: bold;
-			}
 			.foot-check{
 				width: 100rpx;
 				float: left;
@@ -877,51 +1106,60 @@
 					float: right;
 				}
 			}
-			.foot-check-delbtn{
-				float: left;
-				.delBtn{
-					margin: 0;
-					padding: 0;
-					display: flex;
-					flex-direction: column;
-					align-items: center;
-					box-sizing: border-box;
-					font-size: $font-size-24;
-					text-align: center;
-					text-decoration: none;
-					border-radius: 0;
-					-webkit-tap-highlight-color: transparent;
-					overflow: hidden;
-					background-color:#FFFFFF;
-					color: #FF2A2A;
-					padding: 0 24rpx;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					line-height: 110rpx;
-					font-weight: bold;
-					&.none{
-						display: none;	
-					}
-				}
-			}
 			.sum{
-				font-size: $font-size-28;
-				line-height: 110rpx;
-				color: $text-color;
-				display: flex;
-				justify-content: flex-end;
-				.money{
-					color: #FF2A2A;
+				width: 380rpx;
+				height: 110rpx;
+				float: right;
+				box-sizing: border-box;
+				padding: 10rpx;
+				.sum-none{
+					width: 100%;
+					height: 45rpx;
+					line-height: 45rpx;
+					color: $text-color;
+					float: left;
+					text-align: right;
+					.money{
+						font-size: $font-size-24;
+						color: #999999;
+						text-decoration: line-through;
+					}
+					.money-sign{
+						font-size: $font-size-24;
+						color: #999999;
+						text-decoration: line-through;
+					}
+					.money-reduced{
+						margin-left: 10rpx;
+						font-size: $font-size-24;
+						color: $color-system;
+					}
 				}
-				.money-sign{
-					font-size: $font-size-24;
-					color: #FF2A2A;
+				.sum-price{
+					text-align: right;
+					width: 100%;
+					height: 45rpx;
+					line-height: 45rpx;
+					font-size: $font-size-30;
+					color: $text-color;
+					float: left;
+					font-weight: normal;
+					&.none{
+						height: 90rpx;
+						line-height: 90rpx;
+					}
+					.money{
+						color: #FF2A2A;
+					}
+					.money-sign{
+						font-size: $font-size-24;
+						color: #FF2A2A;
+					}
 				}
 			}
 		}
 		.footer-ri{
-			width: 200rpx;
+			width: 180rpx;
 			height: 100%;
 			background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
 			float: right;

+ 3 - 4
seller/pages/cart/immediately.vue

@@ -88,7 +88,6 @@
 
 <script>
 	import immediatelyList from '@/components/cm-module/listTemplate/immediatelyList'
-	import { getSellerProductNum ,shoppingCartAddCart,getCartAddCart} from "@/api/seller.js"
 	import { querySearchProductLadderPrice } from "@/api/product.js"
 	export default{
 		components:{
@@ -128,7 +127,7 @@
 		},
 		methods:{
 			getClubProductNum(){
-				getSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
+				this.SellerService.GetSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
 					this.$refs.productList.cartQuantity = response.data
 				})
 			},
@@ -258,7 +257,7 @@
 						serviceProviderId:this.serviceProviderId,
 						productInfo:productInfo
 					}
-				getCartAddCart({'params':JSON.stringify(params)}).then(response => {
+				this.SellerService.ShoppingCartBatchAddCart({'params':JSON.stringify(params)}).then(response => {
 					this.specClasszuhe = 'hide';
 					this.$util.msg('加入购物车成功',1500,true,'success');
 					this.getClubProductNum();
@@ -283,7 +282,7 @@
 						serviceProviderId:this.serviceProviderId,
 						num:this.number
 					}
-				shoppingCartAddCart(params).then(response => {
+				this.SellerService.ShoppingCartAddCart(params).then(response => {
 					this.specClass = 'hide';
 					this.$util.msg('加入购物车成功',1500,true,'success')
 					this.getClubProductNum();

+ 1 - 2
seller/pages/cart/second.vue

@@ -41,7 +41,6 @@
 
 <script>
 	import secondHand from '@/components/cm-module/listTemplate/secondHand'
-	import { getSellerProductNum ,shoppingCartAddCart,getCartAddCart} from "@/api/seller.js"
 	import { querySearchProductLadderPrice } from "@/api/product.js"
 	export default{
 		components:{
@@ -79,7 +78,7 @@
 		},
 		methods:{
 			getClubProductNum(){
-				getSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
+				this.SellerService.GetSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
 					this.$refs.productList.cartQuantity = response.data
 				})
 			},

+ 84 - 29
seller/pages/order/create-order.vue

@@ -5,7 +5,7 @@
 		<!-- 地址选择 -->
 		<choice-address ref="choiceAddress" v-if="isAddress" :addressData="addressData"></choice-address>
 		<!-- 商品 -->
-		<goods-list ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></goods-list>
+		<seller-goodsList ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></seller-goodsList>
 		<!-- 发票信息 -->
 		<seller-invoice ref="invoice" 
 						v-if="isRequest" 
@@ -27,7 +27,7 @@
 				<view class="balabce-t-ri">
 					<view class="money">
 						<text>可用余额:</text>
-						<text>¥{{userMoney.toFixed(2)}}</text>
+						<text>¥{{ userMoney | NumFormat }}</text>
 					</view>
 					<view class="checkbox-box">
 						<button class="checkbox iconfont" 
@@ -42,7 +42,7 @@
 			</view>
 			<view class="balabce-b" :class="{'balabce-b--hide':!ischecked}">	
 				<view class="balabce-b-text animation" :style="{'transform':ischecked?'translateY(0)':'translateY(-50%)','-webkit-transform':ischecked?'translateY(0)':'translateY(-50%)'}">
-					<text>当前使用:¥{{deductMoney.toFixed(2)}},剩余:¥{{surplusMoney.toFixed(2)}}</text>
+					<text>当前使用:¥{{deductMoney | NumFormat}},剩余:¥{{ surplusMoney | NumFormat }}</text>
 				</view>
 			</view>
 		</view>
@@ -53,7 +53,12 @@
 					<text>共{{allCount}}件商品</text>
 				</view>
 				<view class="footer-price">
-					<text>总价:<text class="price">¥{{payAllPrice.toFixed(2)}}</text></text>
+					<view class="sum-none" v-if="reducedPrice > 0">
+						<text class="money-sign">¥</text>
+						<text class="money">{{ totalOriginalPrice | NumFormat }}</text>
+						<text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
+					</view>
+					<view class="sum" :class="reducedPrice == 0 ? 'none' : ''">总价:<text class="price">¥{{payAllPrice | NumFormat}}</text></view>
 				</view>
 			</view>
 			<view class="footer-submit" @click.stop="orderSubmitMit">提交订单</view>
@@ -63,16 +68,15 @@
 
 <script>
 	import choiceAddress from '@/components/cm-module/creatOrder/sellerAddress'  
-	import goodsList from '@/components/cm-module/creatOrder/goodsList'
+	import sellerGoodsList from '@/components/cm-module/creatOrder/sellerGoodsList'
 	import sellerInvoice from '@/components/cm-module/creatOrder/sellerInvoice'
 	import sellerFreight from '@/components/cm-module/creatOrder/sellerFreight'
 	import freightAlert from '@/components/cm-module/modelAlert/freightAlert.vue'
 	import modalLayer from "@/components/modal-layer"
-	import { sellerSettlement,sellerCreateOrderSubmit } from "@/api/seller.js" 
 	export default {
 		components:{
 			choiceAddress,
-			goodsList,
+			sellerGoodsList,
 			sellerInvoice,
 			sellerFreight,
 			freightAlert,
@@ -91,6 +95,8 @@
 				submitState:'',  		  //提交状态
 				balanceDeductionFlag:2,   //勾选余额的状态(1使用,2不使用)
 				allCount:1,				  //订单提交总数量
+				totalOriginalPrice:0,	  //订单总原价(划线部分)
+				reducedPrice:0,			  //满减金额
 				payAllPrice:0.00,		  //订单提交总金额
 				allPrice:0.00,			  //订单总金额
 				surplusMoney:0.00,		  //显示勾选后的剩余抵扣
@@ -131,6 +137,11 @@
 				this.clubUserId = resolve.userID
 			})
 		},
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		},
 		methods: {
 			getInitProdcutCrearOrder(option){//二手下单初始化查询
 				this.$api.getStorage().then((resolve) =>{
@@ -146,16 +157,19 @@
 					})
 				})
 			},
-			getInitCrearOrder(option){//协销购物车获取订单商品信息
+			getInitCrearOrder(option){//协销购物车跳转确认订单初始化信息
 				this.$api.getStorage().then((resolve) =>{
 					this.serviceProviderId = resolve.serviceProviderID
 					let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,count:this.productCount,productIds:this.productIds}
-					sellerSettlement(params).then(response =>{
-						let resData = response.data
+					this.SellerService.SellerSettlement(params).then(response =>{
+						let data = response.data
 						this.isRequest = true
-						this.goodsData = resData.shopList
-						this.userMoney = resData.userMoney
-						this.rechargeGoods = resData.rechargeGoods
+						this.goodsData = data.shopList
+						this.userMoney = data.userMoney
+						this.reducedPrice = data.reducedPrice
+						this.totalOriginalPrice = data.reducedPrice + data.totalAmount
+						this.rechargeGoods = data.rechargeGoods
+						this.allPrice = this.payAllPrice = data.totalAmount
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
 					})
@@ -239,7 +253,6 @@
 				}
 			},
 			attributeNofreight(){//计算没有邮费的支付价格
-				console.log(this.ischecked)
 				if(this.ischecked){
 					if(this.userMoney>this.payAllPrice){
 						this.payAllPrice = 0.00
@@ -286,6 +299,7 @@
 						productInfo.push({
 							productId:item.productID,
 							productNum:item.productCount,
+							productType:item.giftType,
 							presentNum:0
 						})
 					})				
@@ -310,18 +324,22 @@
 						orderInvoice:this.invoiceData //发票信息
 					}
 				this.modalLayer = true;	
-				sellerCreateOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
-					if(response.code == 1){
+				this.SellerService.SellerCreateOrderSubmit({'params':JSON.stringify(params)}).then(response =>{
+					const data = response.data;
+					if(data.code === '1'){
 						this.$util.msg('支付成功',2000,true,'success')
 						setTimeout(() =>{
-							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${response.data.orderID}`)
+							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
 						},2000)
-					}else if(response.code == 2){
-						this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${response.data.orderID}`)
 					}else{
-						this.$util.msg(response.msg,2000);
+						this.$util.msg('订单提交成功',2000,true,'success')
+						setTimeout(()=>{
+							this.$api.redirectTo(`/seller/pages/order/order-details?type=cash&orderID=${data.orderID}`)
+						},2000)
 					}
-				}).catch(error =>{})
+				}).catch(error =>{
+					this.$util.msg(response.msg,2000);
+				})
 			},
 			handFreightAlertShow(){//显示邮费弹窗
 				this.isfreightTip = true;
@@ -467,31 +485,68 @@
 		z-index: 998;
 		color: $text-color;
 		.footer-le{
-			width:550rpx;
+			width:570rpx;
 			height:100%;
 			float: left;
 		}
 		.footer-count{
 			float: left;
 			padding-left: 24rpx;
-			font-weight: bold;
+			width:180rpx;
+			box-sizing: border-box;
+			font-size: $font-size-26;
 		}
 		.footer-price{
+			width:370rpx;
 			float: right;
 			text-align: right;
 			color: $text-color;
-			font-weight: bold;
-			padding-right: 24rpx;
-			.price{
-				font-size: $font-size-32;
-				color: #FF2A2A;
+			padding: 10rpx 20rpx 10rpx 0;
+			box-sizing: border-box;
+			.sum-none{
+				width: 100%;
+				height: 45rpx;
+				line-height: 45rpx;
+				color: $text-color;
+				float: left;
+				text-align: right;
+				.money{
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
+				}
+				.money-sign{
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
+				}
+				.money-reduced{
+					margin-left: 10rpx;
+					font-size: $font-size-26;
+					color:$color-system;
+				}
 			}
+			.sum{
+				width: 100%;
+				height: 45rpx;
+				line-height: 45rpx;
+				float: left;
+				&.none{
+					height: 90rpx;
+					line-height: 90rpx;
+				}
+				.price{
+					font-size: $font-size-32;
+					color: #FF2A2A;
+				}
+			}
+			
 		}
 		.footer-submit{
 			display:flex;
 			align-items:center;
 			justify-content: center;
-			width: 200rpx;
+			width: 180rpx;
 			height: 100%;
 			color: #FFFFFF;
 			background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);

+ 107 - 30
seller/pages/order/order-historylist.vue

@@ -32,37 +32,51 @@
 									</view>
 									<view class="order-title-b">
 										<view class="order-title-btxt tui-skeleton-fillet">下单时间:{{order.orderTime}}</view>
-										<view class="order-title-tip tui-skeleton-fillet">{{orderStateExp(order.status)}}</view>
+										<view class="order-title-tip tui-skeleton-fillet">{{StateExpFormat(order.status)}}</view>
 									</view>
 								</view>
 								<block v-for="(shop,index) in order.shopOrderList" :key="index">
 									<view class="goods-title">
-										<view class="title-logo tui-skeleton-fillet"><image :src="shop.shopLogo" mode=""></image></view>
+										<view v-if="shop.shopPromotion" class="floor-item-act">
+											<view class="floor-tags">{{shop.shopPromotion.name}}</view>	
+										</view>
 										<view class="title-text tui-skeleton-fillet">{{shop.shopName}}</view>
 									</view>
 									<view class="goods-item" v-for="(pros,prosIndex) in shop.orderProductList" :key="prosIndex">
 										<view class="goods-pros-t">
-											<view class="pros-img tui-skeleton-fillet"><image :src="pros.productImage" alt="" /></view>
-											<view class="pros-product">
+											<view class="pros-img tui-skeleton-fillet">
+												<image :src="pros.productImage" alt="" />
+												<text class="tips" v-if="pros.productType ==2 || pros.productType ==1">赠品</text>
+											</view>
+											<view class="pros-product clearfix">
 												<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">
-														<text>¥{{pros.price.toFixed(2)}}</text>
+														<text>¥{{ pros.price | NumFormat }}</text>
 													</view>
 													<view class="count tui-skeleton-fillet">
 														<text class="small">x</text>{{pros.num}}
 													</view>
 												</view>
+												<view class="floor-item-act" v-if="pros.productPromotion!=null">
+													<view v-if="PromotionsFormat(pros.productPromotion)"  class="floor-tags">
+														{{pros.productPromotion.name}}
+														<text v-if ="pros.productPromotion!=null && pros.productPromotion.type !=3 ">
+															:¥{{ pros.productPromotion == null ? '0.00' : pros.productPromotion.touchPrice | NumFormat}}
+														</text>
+													</view>
+													<view v-else-if="pros.productPromotion.type !=3" class="floor-tags">{{pros.productPromotion.name}}</view>	
+												</view>
 											</view>	
 										</view>
 									</view>	
 								</block>
 								<view class="order-footer">
-									<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{orderPriceToFixed(order.discountFee)}}</view>
+									<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{ order.discountFee | NumFormat }}</view>
 									<view class="order-footer-bot">
 										<view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
-										<view class="money tui-skeleton-fillet">应付总额:¥{{orderPriceToFixed(order.payableAmount)}}</view>
+										<view class="money tui-skeleton-fillet">应付总额:¥{{ order.payableAmount | NumFormat }}</view>
 									</view>
 								</view>
 								<!-- 底部button -->
@@ -171,6 +185,11 @@
 				}
 			});
 		},
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		},
 		methods: {
 			// 滚动切换标签样式
 			onChange (e) {
@@ -234,7 +253,7 @@
 						getSellerClubOrderList(params).then(response =>{
 							let orderList = response.data.results.filter(item=>{
 								//添加不同状态下订单的表现形式
-								item = Object.assign(item, this.orderStateExp(item.listType));
+								item = Object.assign(item, this.StateExpFormat(item.listType));
 								return item;
 							});
 							orderItem.orderList =[];
@@ -360,8 +379,18 @@
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			},
 			//订单状态文字和颜色
-			orderStateExp (state){
+			StateExpFormat (state){
 				let stateText = '',
 					stateTextObject={
 						0:'待确认',
@@ -543,7 +572,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;
@@ -555,7 +584,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;
@@ -594,25 +623,39 @@
 	}
 	.goods-title{
 		width: 100%;
-		height: 48rpx;
+		height: 56rpx;
 		float: left;
-		margin-top: 24rpx;
-		.title-logo{
-			width: 48rpx;
-			height: 48rpx;
+		margin-top:10rpx;
+		.floor-item-act{
+			height: 56rpx;
+			text-align: center;
+			box-sizing: border-box;
 			float: left;
-			image{
-				width: 48rpx;
-				height: 48rpx;
+			padding: 10rpx 0;
+			margin-right: 12rpx;
+			.floor-tags{
+				float: left;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				font-size: $font-size-20;
 			}
 		}
 		.title-text{
+			width: 400rpx;
+			overflow: hidden;
+			text-overflow:ellipsis;
+			white-space: nowrap;
 			float: left;
-			margin-left: 16rpx;
 			font-size: $font-size-28;
 			color: $text-color;
 			text-align: left;
-			line-height: 48rpx;
+			line-height: 56rpx;
 			font-weight: bold;
 		}
 	}
@@ -621,30 +664,45 @@
 		height: auto;
 	}	
 	.goods-pros-t{
-		display: flex;
-		align-items: center;
 		width: 100%;
-		height: 217rpx;
+		height: auto;
 		padding:24rpx 0;
 		.pros-img{
+			float: left;
 			width: 210rpx;
 			height: 100%;
 			border-radius: 10rpx;
 			margin:0 26rpx 0 0;
-			border:1px solid #f3f3f3;
+			position: relative;
+			.tips{
+				display: inline-block;
+				width: 80rpx;
+				height: 40rpx;
+				background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
+				line-height: 40rpx;
+				text-align: center;
+				font-size: $font-size-24;
+				color: #FFFFFF;
+				border-radius:10rpx 0 10rpx 0 ;
+				position: absolute;
+				top:0;
+				left: 0;
+			}
 			image{
-				width: 100%;
-				height: 100%;
+				width: 210rpx;
+				height: 210rpx;
 				border-radius: 10rpx;
+				border:1px solid #f3f3f3;
 			}
 		}
 	}
 	.pros-product{
-		width: 468rpx;
+		width: 460rpx;
 		height: 100%;
 		line-height: 36rpx;
 		font-size: $font-size-26;	
 		position: relative;
+		float: left;
 		.producttitle{
 			width: 100%;
 			display: inline-block;
@@ -663,9 +721,8 @@
 		}
 		.productprice{
 			height: 48rpx;
-			position: absolute;
 			width: 100%;
-			bottom: 0;
+			float: left;
 			.price{
 				line-height: 48rpx;
 				font-size: $font-size-28;
@@ -683,6 +740,26 @@
 				}
 			}
 		}
+		.floor-item-act{
+			width: 100%;
+			height: 56rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: left;
+			padding:0 0 10rpx 0;
+			.floor-tags{
+				float: left;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				font-size: $font-size-20;
+			}
+		}
 	}
 	.order-footer{
 		width: 100%;

+ 107 - 30
seller/pages/order/order-list.vue

@@ -40,37 +40,51 @@
 									</view>
 									<view class="order-title-b">
 										<view class="order-title-btxt tui-skeleton-fillet">下单时间:{{order.orderTime}}</view>
-										<view class="order-title-tip tui-skeleton-fillet">{{orderStateExp(order.status)}}</view>
+										<view class="order-title-tip tui-skeleton-fillet">{{StateExpFormat(order.status)}}</view>
 									</view>
 								</view>
 								<block v-for="(shop,index) in order.shopOrderList" :key="index">
 									<view class="goods-title">
-										<view class="title-logo tui-skeleton-fillet"><image :src="shop.shopLogo" mode=""></image></view>
+										<view v-if="shop.shopPromotion" class="floor-item-act">
+											<view class="floor-tags">{{shop.shopPromotion.name}}</view>	
+										</view>
 										<view class="title-text tui-skeleton-fillet">{{shop.shopName}}</view>
 									</view>
 									<view class="goods-item" v-for="(pros,prosIndex) in shop.orderProductList" :key="prosIndex">
 										<view class="goods-pros-t">
-											<view class="pros-img tui-skeleton-fillet"><image :src="pros.productImage" alt="" /></view>
-											<view class="pros-product">
+											<view class="pros-img tui-skeleton-fillet">
+												<image :src="pros.productImage" alt="" />
+												<text class="tips" v-if="pros.productType ==2 || pros.productType ==1">赠品</text>
+											</view>
+											<view class="pros-product clearfix">
 												<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">
-														<text>¥{{pros.price.toFixed(2)}}</text>
+														<text>¥{{pros.price | NumFormat}}</text>
 													</view>
 													<view class="count tui-skeleton-fillet">
 														<text class="small">x</text>{{pros.num}}
 													</view>
 												</view>
+												<view class="floor-item-act" v-if="pros.productPromotion!=null">
+													<view v-if="PromotionsFormat(pros.productPromotion)"  class="floor-tags">
+														{{pros.productPromotion.name}}
+														<text v-if ="pros.productPromotion!=null && pros.productPromotion.type !=3 ">
+															:¥{{ pros.productPromotion == null ? '0.00' : pros.productPromotion.touchPrice | NumFormat}}
+														</text>
+													</view>
+													<view v-else-if="pros.productPromotion.type !=3" class="floor-tags">{{pros.productPromotion.name}}</view>	
+												</view>
 											</view>	
 										</view>
 									</view>	
 								</block>
 								<view class="order-footer">
-									<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{orderPriceToFixed(order.discountFee)}}</view>
+									<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{ order.discountFee | NumFormat }}</view>
 									<view class="order-footer-bot">
 										<view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
-										<view class="money tui-skeleton-fillet">应付总额:¥{{orderPriceToFixed(order.payableAmount)}}</view>
+										<view class="money tui-skeleton-fillet">应付总额:¥{{ order.payableAmount | NumFormat }}</view>
 									</view>
 								</view>
 								<!-- 底部button -->
@@ -187,6 +201,11 @@
 				}
 			});
 		},
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		},
 		methods: {
 			// 滚动切换标签样式
 			onChange (e) {
@@ -256,7 +275,7 @@
 						getSellerOrderList(params).then(response =>{
 							let orderList = response.data.results.filter(item=>{
 								//添加不同状态下订单的表现形式
-								item = Object.assign(item, this.orderStateExp(item.listType));
+								item = Object.assign(item, this.StateExpFormat(item.listType));
 								return item;
 							});
 							orderItem.orderList =[];
@@ -388,8 +407,18 @@
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			},
 			//订单状态文字和颜色
-			orderStateExp (state){
+			StateExpFormat (state){
 				let stateText = '',
 					stateTextObject={
 						0:'待确认',
@@ -600,7 +629,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;
@@ -611,7 +640,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;
@@ -649,25 +678,39 @@
 	}
 	.goods-title{
 		width: 100%;
-		height: 48rpx;
+		height: 56rpx;
 		float: left;
-		margin-top: 24rpx;
-		.title-logo{
-			width: 48rpx;
-			height: 48rpx;
+		margin-top:10rpx;
+		.floor-item-act{
+			height: 56rpx;
+			text-align: center;
+			box-sizing: border-box;
 			float: left;
-			image{
-				width: 48rpx;
-				height: 48rpx;
+			padding: 10rpx 0;
+			margin-right: 12rpx;
+			.floor-tags{
+				float: left;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				font-size: $font-size-20;
 			}
 		}
 		.title-text{
+			width: 400rpx;
+			overflow: hidden;
+			text-overflow:ellipsis;
+			white-space: nowrap;
 			float: left;
-			margin-left: 16rpx;
 			font-size: $font-size-28;
 			color: $text-color;
 			text-align: left;
-			line-height: 48rpx;
+			line-height: 56rpx;
 			font-weight: bold;
 		}
 	}
@@ -676,30 +719,45 @@
 		height: auto;
 	}	
 	.goods-pros-t{
-		display: flex;
-		align-items: center;
 		width: 100%;
-		height: 217rpx;
+		height: auto;
 		padding:24rpx 0;
 		.pros-img{
+			float: left;
 			width: 210rpx;
 			height: 100%;
 			border-radius: 10rpx;
 			margin:0 26rpx 0 0;
-			border:1px solid #f3f3f3;
+			position: relative;
+			.tips{
+				display: inline-block;
+				width: 80rpx;
+				height: 40rpx;
+				background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
+				line-height: 40rpx;
+				text-align: center;
+				font-size: $font-size-24;
+				color: #FFFFFF;
+				border-radius:10rpx 0 10rpx 0 ;
+				position: absolute;
+				top:0;
+				left: 0;
+			}
 			image{
-				width: 100%;
-				height: 100%;
+				width: 210rpx;
+				height: 210rpx;
 				border-radius: 10rpx;
+				border:1px solid #f3f3f3;
 			}
 		}
 	}
 	.pros-product{
-		width: 468rpx;
+		width: 460rpx;
 		height: 100%;
 		line-height: 36rpx;
 		font-size: $font-size-26;	
 		position: relative;
+		float: left;
 		.producttitle{
 			width: 100%;
 			display: inline-block;
@@ -718,9 +776,8 @@
 		}
 		.productprice{
 			height: 48rpx;
-			position: absolute;
 			width: 100%;
-			bottom: 0;
+			float: left;
 			.price{
 				line-height: 48rpx;
 				font-size: $font-size-28;
@@ -738,6 +795,26 @@
 				}
 			}
 		}
+		.floor-item-act{
+			width: 100%;
+			height: 56rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: left;
+			padding:0 0 10rpx 0;
+			.floor-tags{
+				float: left;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				font-size: $font-size-20;
+			}
+		}
 	}
 	.order-footer{
 		width: 100%;

+ 87 - 24
seller/pages/search/search-order.vue

@@ -39,37 +39,51 @@
 								</view>
 								<view class="order-title-b">
 									<view class="order-title-btxt tui-skeleton-fillet">下单时间:{{order.orderTime}}</view>
-									<view class="order-title-tip tui-skeleton-fillet">{{orderStateExp(order.status)}}</view>
+									<view class="order-title-tip tui-skeleton-fillet">{{StateExpFormat(order.status)}}</view>
 								</view>
 							</view>
 							<block v-for="(shop,index) in order.shopOrderList" :key="index">
 								<view class="goods-title">
-									<view class="title-logo tui-skeleton-fillet"><image :src="shop.shopLogo" mode=""></image></view>
+									<view v-if="shop.shopPromotion" class="floor-item-act">
+										<view class="floor-tags">{{shop.shopPromotion.name}}</view>	
+									</view>
 									<view class="title-text tui-skeleton-fillet">{{shop.shopName}}</view>
 								</view>
 								<view class="goods-item" v-for="(pros,prosIndex) in shop.orderProductList" :key="prosIndex">
 									<view class="goods-pros-t">
-										<view class="pros-img tui-skeleton-fillet"><image :src="pros.productImage" alt="" /></view>
-										<view class="pros-product">
+										<view class="pros-img tui-skeleton-fillet">
+											<image :src="pros.productImage" alt="" />
+											<text class="tips" v-if="pros.productType ==2 || pros.productType ==1">赠品</text>
+										</view>
+										<view class="pros-product clearfix">
 											<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">
-													<text>¥{{pros.price.toFixed(2)}}</text>
+													<text>¥{{ pros.price | NumFormat }}</text>
 												</view>
 												<view class="count tui-skeleton-fillet">
 													<text class="small">x</text>{{pros.num}}
 												</view>
 											</view>
+											<view class="floor-item-act" v-if="pros.productPromotion!=null">
+												<view v-if="PromotionsFormat(pros.productPromotion)"  class="floor-tags">
+													{{pros.productPromotion.name}}
+													<text v-if ="pros.productPromotion!=null && pros.productPromotion.type !=3 ">
+														:¥{{ pros.productPromotion == null ? '0.00' : pros.productPromotion.touchPrice | NumFormat }}
+													</text>
+												</view>
+												<view v-else-if="pros.productPromotion.type !=3" class="floor-tags">{{pros.productPromotion.name}}</view>	
+											</view>
 										</view>	
 									</view>
 								</view>	
 							</block>
 							<view class="order-footer">
-								<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{orderPriceToFixed(order.discountFee)}}</view>
+								<view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{ order.discountFee | NumFormat }}</view>
 								<view class="order-footer-bot">
 									<view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
-									<view class="money tui-skeleton-fillet">待付总额:¥{{orderPriceToFixed(order.pendingPayments)}}</view>
+									<view class="money tui-skeleton-fillet">待付总额:¥{{ order.pendingPayments | NumFormat}}</view>
 								</view>
 							</view>
 							<!-- 底部button -->
@@ -156,6 +170,11 @@
 		onLoad() {
 		  this.initGetSerachRecord()
 		},
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		},
 		methods:{
 			subMitSearch() {
 				if (this.searchInputVal == '') {
@@ -234,7 +253,7 @@
 					if(_responseData && _responseData.length > 0){
 						let filrerData = _responseData.filter(item=>{
 							//添加不同状态下订单的表现形式
-							item = Object.assign(item, this.orderStateExp(item.state));
+							item = Object.assign(item, this.StateExpFormat(item.state));
 							return item;
 						});
 						this.orderList =[];
@@ -357,8 +376,18 @@
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			},
 			//订单状态文字和颜色
-			orderStateExp (state){
+			StateExpFormat (state){
 				let stateText = '',
 					stateTextObject={
 						4:'交易完成',
@@ -653,7 +682,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;
@@ -664,7 +693,7 @@
 				width: 72rpx;
 				height: 30rpx;
 				background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
-				border-radius: 15rpx;
+				border-radius: 4rpx;
 				line-height: 30rpx;
 				font-size: $font-size-22;
 				text-align: center;
@@ -702,25 +731,39 @@
 	}
 	.goods-title{
 		width: 100%;
-		height: 48rpx;
+		height: 56rpx;
 		float: left;
-		margin-top: 24rpx;
-		.title-logo{
-			width: 48rpx;
-			height: 48rpx;
+		margin-top:10rpx;
+		.floor-item-act{
+			height: 56rpx;
+			text-align: center;
+			box-sizing: border-box;
 			float: left;
-			image{
-				width: 48rpx;
-				height: 48rpx;
+			padding: 10rpx 0;
+			margin-right: 12rpx;
+			.floor-tags{
+				float: left;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				font-size: $font-size-20;
 			}
 		}
 		.title-text{
+			width: 400rpx;
+			overflow: hidden;
+			text-overflow:ellipsis;
+			white-space: nowrap;
 			float: left;
-			margin-left: 16rpx;
 			font-size: $font-size-28;
 			color: $text-color;
 			text-align: left;
-			line-height: 48rpx;
+			line-height: 56rpx;
 			font-weight: bold;
 		}
 	}
@@ -748,11 +791,12 @@
 		}
 	}
 	.pros-product{
-		width: 468rpx;
+		width: 460rpx;
 		height: 100%;
 		line-height: 36rpx;
 		font-size: $font-size-26;	
 		position: relative;
+		float: left;
 		.producttitle{
 			width: 100%;
 			display: inline-block;
@@ -771,9 +815,8 @@
 		}
 		.productprice{
 			height: 48rpx;
-			position: absolute;
 			width: 100%;
-			bottom: 0;
+			float: left;
 			.price{
 				line-height: 48rpx;
 				font-size: $font-size-28;
@@ -791,6 +834,26 @@
 				}
 			}
 		}
+		.floor-item-act{
+			width: 100%;
+			height: 56rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: left;
+			padding:0 0 10rpx 0;
+			.floor-tags{
+				float: left;
+				height: 36rpx;
+				border-radius: 4rpx;
+				background-color: rgba(225, 86, 22, 0.1);
+				line-height: 36rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding:0 16rpx;
+				font-size: $font-size-20;
+			}
+		}
 	}
 	.order-footer{
 		width: 100%;

+ 2 - 2
services/ajax.env.js

@@ -2,9 +2,9 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.2.68:8008'	 //本地IP联调地址
-	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
+	URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境

+ 83 - 2
services/sellse.service.js

@@ -1,5 +1,7 @@
 /**
- * 这是协销用户业务的服务
+ * explain: 这是协销用户业务的服务
+ * Author: zhjy
+ * Time: 2020-09-24
  */
 export default class SellerService {
 	constructor(AjaxService) {
@@ -25,9 +27,17 @@ export default class SellerService {
 	GetSettlementBySencondProduct (data = {}) {
 		return this.AjaxService.post({ url:'/seller/settlementBySencondProduct', data, isLoading: true })
 	}
+	/**
+	 *@协销-二手商品详情
+	 *@param productId:商品ID(数字类型,必传)
+	 */
 	ProductDetail (data={}){//商品详情
 		return this.AjaxService.get({ url:'/product/getSecondHandProductDetail', data, isLoading: true })
 	}
+	/**
+	 *@协销-二手商品推荐
+	 *@param productId:商品ID(数字类型,必传)
+	 */
 	ProductRecommend (data={}){//相关推荐
 		return this.AjaxService.get({ url:'/product/getSecondHandProductRecommend', data, isLoading: true })
 	}
@@ -40,6 +50,77 @@ export default class SellerService {
 	getSellerOrderList (data={}){
 		return this.AjaxService.get({ url:'/seller/searchOrder', data, isLoading: true })
 	}
-	
+	/*协销下单购物车->api*/
+	/**
+	 *@单一商品加入购物车
+	 *@param clubId 会所的ID
+	 *@param serviceProviderId 协销ID
+	 */
+	ShoppingCartAddCart (data = {}) {
+		return this.AjaxService.post({ url:'/seller/addCart', data, isLoading: true })
+	}
+	/**
+	 *@组合商品加入购物车
+	 *@param clubId 会所的ID
+	 *@param serviceProviderId 协销ID
+	 */
+	ShoppingCartBatchAddCart (data = {}) {
+		return this.AjaxService.post({ url:'/seller/batchAddCart', data, isLoading: true })
+	}
+	/**
+	 *@协销帮机构下单获取购物车数量
+	 *@param clubId 会所的ID
+	 *@param serviceProviderId 协销ID
+	 */
+	GetSellerProductNum (data = {}) {
+		return this.AjaxService.get({ url:'/seller/productNum', data, isLoading: false })
+	}
+	/**
+	 *@协销帮机构下单购物车商品加减数量
+	 *@param clubId 机构的clubId
+	 *@param serviceProviderId 	协销ID
+	 */
+	SellerAddProductNum (data = {}) {
+		return this.AjaxService.post({ url:'/seller/addProductNum', data, isLoading: true })
+	}
+	/**
+	 *@协销帮机构下单购物车删除商品
+	 *@param sellerCartIds 购物车ID
+	 */
+	DeleteSellerCart (data = {}) {
+		return this.AjaxService.post({ url:'/seller/deleteSellerCart', data, isLoading: true })
+	}
+	/**
+	 *@协销帮机构下单获取购物车列表
+	 *@param clubId 会所的ID
+	 *@param serviceProviderId 协销ID
+	 */
+	GetSellerShoppingInfo (data = {}) {
+		return this.AjaxService.get({ url:'/seller/shoppingInfo', data, isLoading: false })
+	}
+	/*协销下单订单->api*/
+	/**
+	 *@协销帮机构下单去结算初始化
+	 *@param clubId 机构ID
+	 *@param serviceProviderId 协销ID
+	 *@param productIds 商品ID
+	 */
+	SellerSettlement (data = {}) {
+		return this.AjaxService.post({ url:'/seller/settlement', data, isLoading: true })
+	}
+	/**
+	 *@协销帮机构下单提交订单
+	 *@param orderSource 2,//提交来源
+	 *@param clubUserId//机构UserID
+	 *@param cartType	//从购物车提交
+	 *@param serviceProviderId//帮下单协销ID
+	 *@param addressId//地址ID
+	 *@param orderInfo//商品信息
+	 *@param payInfo//订单信息
+	 *@param orderInvoice//发票信息
+	 */
+	SellerCreateOrderSubmit (data = {}) {
+		return this.AjaxService.post({ url:'/seller/order/submit', data, isLoading: true })
+	}
 	
 }