Forráskód Böngészése

Merge branches 'developerA' and 'master' of git.caimei365.com:caimei-repository/caimei-applets-caimei

# Conflicts:
#	common/config/config.js
jun.li@caimei365.com 5 éve
szülő
commit
8c4622d8a4

+ 31 - 0
api/seller.js

@@ -271,6 +271,24 @@ export function getSellerProduct(params) {
 		})
 	})
 }
+/**
+ *@协销帮机构下单组合商品搜索
+ *@param clubUserId 机构的userID
+ *@param pageNum 	页码
+ *@param pageSize 	条数
+ *@param searchWord 搜索关键词
+ */
+export function getcombinationProduct(params) {
+	return new Promise(function(resolve,reject) {
+		request.lodingGet('/seller/combinationProduct/search',params,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
 /**
  *@协销商品搜索
  *@param clubId 会所的ID
@@ -303,6 +321,19 @@ export function shoppingCartAddCart(params) {
 		})
 	})
 }
+// 组合商品添加购物车
+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

+ 9 - 0
components/cm-module/creatOrder/goodsList.vue

@@ -13,6 +13,9 @@
 						<view class="pros-product">
 							<view class="producttitle">{{pros.name}}</view>
 							<view class="productspec">规格:{{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.toFixed(2)}}</text>
@@ -167,6 +170,12 @@
 				.productspec{
 					height: 36rpx;
 					color: #999999;
+					text-overflow:ellipsis;
+					display: -webkit-box;
+					word-break: break-all;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					overflow: hidden;
 				}
 				.productprice{
 					height: 48rpx;

+ 146 - 0
components/cm-module/listTemplate/ZuheList.vue

@@ -0,0 +1,146 @@
+<template>
+	<view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
+		<view class="good-search clearfix" v-if="searchStatus">
+			<view id="shop">
+				<view class="style addstyle ">单一商品</view>
+				<view class="style zuhe">组合商品</view>
+			</view>
+			<view class="search-from name">
+				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
+				<input class="input" 
+					   type="text" 
+					   focus
+					   confirm-type="search" 
+					   v-model="searchInputVal" 
+					   placeholder="请输入商品关键词" 
+					   @input="onShowClose" 
+					   @confirm="searchOpertor"
+					   maxlength="20"/>
+				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
+			</view>
+			<view class="search-btn">
+				<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
+			</view>
+		</view>
+		<list-skeleton v-if="showSkeleton"></list-skeleton>
+	</view>
+</template>
+<script>
+	export default {
+		components: {
+			
+		},
+		data() {
+			return {
+				
+			};
+		},
+	}
+		
+</script>
+
+<style>
+.commodity-list-wrapper {
+		scroll-view {
+			height: 100%;
+		}
+		.style{
+			width: 128rpx;
+			height: 64rpx;
+			background: #fff;
+			font-size: 26rpx;
+			display: inline-block;
+			border-radius: 10rpx;
+			text-align: center;
+			line-height: 64rpx;
+			border: 2rpx solid #EEEEEE;
+			position: relative;
+			margin-right: 12rpx;
+			}
+		.danyi i{
+			color: #E15616;	
+			position: absolute;
+			top: 20rpx;
+			right: 4rpx;
+			font-weight: bold
+			}
+		.addstyle{
+				background: linear-gradient(-42deg, transparent 28rpx, #E15616 0) top right;
+				color: #FFFFFF;
+			}
+		.show-more-btn {
+			width: 276rpx;
+			height: 52rpx;
+			line-height: 52rpx;
+			border: 2rpx solid #D8D8D8;
+			background: #F7F7F7;
+			font-size: 26rpx;
+			margin: 26rpx 0;
+			position: absolute;
+			left: 50%;
+			margin-left: -138rpx;
+		}
+	}
+	.good-search{
+		height: 64rpx;
+		width: 702rpx;
+		padding: 24rpx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		margin-bottom: 20rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+		.search-from{
+			width: 330rpx;
+			height: 64rpx;
+			background: #F7F7F7;
+			border-radius: 14rpx;
+			float: left;
+			position: relative;
+			.input{
+				// width: 500rpx;
+				height: 64rpx;
+				float: left;
+				line-height: 64rpx;
+				color: $text-color;
+				font-size: $font-size-24;
+			}
+			.icon-iconfonticonfontsousuo1{
+				width: 64rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				text-align: center;
+				display: block;
+				font-size: $font-size-38;
+				float: left;
+				color: #999999;
+			}
+			.icon-shanchu1{
+				font-size: $font-size-32;
+				color: #999999;
+				position: absolute;
+				width: 64rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				top: 0;
+				right: 0;
+				text-align: center;
+				z-index: 10;
+			}
+		}
+		.search-btn{
+			// width: 90rpx;
+			line-height: 64rpx;
+			text-align: center;
+			font-size: $font-size-28;
+			color: $color-system;
+			float: left;
+			background: #FFFFFF;
+			margin-left: 10rpx
+		}
+	 }
+	}
+</style>

+ 2 - 1
components/cm-module/listTemplate/commodityList.vue

@@ -7,6 +7,7 @@
 				<view class="list-details-info">
 					<text class="list-details-title">{{item.name}}</text>
 					<text class="list-details-specs">规格:{{item.unit}}</text>
+					<view class="list-details-specs" v-if="item.productCode!=''&&item.productCode!=null">商品编码:{{item.productCode}}</view>
 					<text class="list-details-miniQuantity" v-if="fromRegularPurchasePage">起订量:{{item.minBuyNumber}}</text>
 					<view class="list-details-price">
 						<view v-if="hasLogin"class="list-price">
@@ -270,7 +271,7 @@
 		}
 		.list-details-specs {
 			margin-top: 8rpx;
-			color: #999999;
+			color: #666666;
 		}
 		.list-details-miniQuantity {
 			margin-top: 7rpx;

+ 503 - 103
components/cm-module/listTemplate/immediatelyList.vue

@@ -1,57 +1,121 @@
 <template>
 	<view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
-		<view class="good-search clearfix" v-if="searchStatus">
-			<view class="search-from name">
-				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
-				<input class="input" 
-					   type="text" 
-					   focus
-					   confirm-type="search" 
-					   v-model="searchInputVal" 
-					   placeholder="请输入商品关键词" 
-					   @input="onShowClose" 
-					   @confirm="searchOpertor"
-					   maxlength="20"/>
-				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
-			</view>
-			<view class="search-btn">
-				<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
-			</view>
+		<view class="good-search clearfix" v-if="searchStatus">
+			<view class="nav-tab-bar u-f-ajc">
+				<block v-for="(tab,index) in tabBars" :key='tab.id' :class="{ current: tabIndex === index }">
+					<view class="tabstyle u-f-ajc" :class="{'addstyle':tabIndex==index}" @tap="changeTab(index)">{{tab.name}}
+					<i v-if='(tabIndex==index)' class='nav-tab-line iconfont icon-gou'></i>
+					</view>
+				</block>
+			</view>
+			<view class="search-from name">
+				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
+					<input class="input"  
+						   type="text" 
+						   focus
+						   confirm-type="search" 
+						   v-model="searchInputVal" 
+						   placeholder="请输入商品关键词" 
+						   @input="onShowClose" 
+						   @confirm="searchOpertor(tabIndex)"
+						   maxlength="20"/>
+				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText(tabIndex)"></text>
+			</view>
+			<view class="search-btn" :class="tabIndex">
+				<button class="search-btn" type="default" @click.stop="searchOpertor(tabIndex)" >搜索</button>
+			</view>
 		</view>
 		<list-skeleton v-if="showSkeleton"></list-skeleton>
 		<view class="empty-container" v-if="isShowEmpty" >
 			<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"></image>
 			<text class="error-text">{{isShowEmptyText}}</text>
 		</view>
-		<view class="product-container" v-else :style="{paddingTop:searchStatus?'112rpx':''}">
-			<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="productList.length > 0">
-				<view v-for="(item,index) in productList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)">
-					<image mode='widthFix' :src="item.mainImage"  class="list-img" alt="list-img"></image>
-					<view class="list-details-info">
-						<text class="list-details-title">{{item.name}}</text>
-						<text class="list-details-specs">规格:{{item.unit?item.unit:''}}</text>
-						<text class="list-details-miniQuantity">起订量:{{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>
-							<button class="add-cart-btn" @click.stop="operationHanld(item)">选择数量</button>
-						</view>
-					</view>
-				</view>
-				<view v-if="showLoading && productList.length > 4 && !showRegularBtn">
-					<view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
-					<view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
-				</view>
-			</scroll-view>
+		<!-- 单一商品 -->
+		<view class="product-container" v-else >
+			<view :class="tabIndex" v-if="tabIndex === 0"  :style="{paddingTop:searchStatus?'128rpx':''}">
+				<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower(tabIndex)" scroll-y v-if="productList.length > 0">
+					<view v-for="(item,index) in productList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)"  >
+					    <image mode='widthFix' :src="item.mainImage"  class="list-img" alt="list-img"></image>
+						<view class="list-details-info">
+							<text class="list-details-title">{{item.name}}</text>
+							<text class="list-details-specs">规格:{{item.unit?item.unit:''}}</text>
+							<text class="list-details-miniQuantity list-details-specs">起订量:{{item.minBuyNumber}}</text>
+							<view class="list-details-specs" v-if="item.productCode!=''&&item.productCode!=null">
+								<view>商品编码:{{item.productCode}}</view>
+							</view>
+							<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-larger"  >¥{{item.retailPrice.toFixed(2)}}</text>
+										<text class="price-view ladder" v-if="item.ladderPriceFlag == '1'" @click.stop="alertjieti(item)">阶</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>
+								<button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>
+							</view>
+						</view>
+					</view>
+					<view v-if="showLoading && productList.length > 4 && !showRegularBtn">
+						<view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
+						<view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
+					</view>
+				</scroll-view>
+			</view>
+			<!-- 组合商品 -->
+			<view :class="tabIndex"  v-if="tabIndex === 1">
+				<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower(tabIndex)" scroll-y>
+					<view class="all-zuhe-list" v-for="(item,index) in combinationProduct" :key="index" :id="item.id" :style="{paddingTop:searchStatus?'112rpx':''}" >
+						<view class="zuhe_title" :class="index%2==0 ? 'active' : ''">{{item.name}}</view>
+						<view v-for="(pros,proIndex) in item.combinationProductList" :class="index%2==0 ? 'stylecontent' : ''" :key="proIndex" :id="pros.productID" class="zuhe-list-content commodity-list" >
+							<view class="list-details-info" >
+								<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-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>
+										</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>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="foot_conten" >
+							<view class="zuhe_foot-box">
+								<view class="">
+									<text>种类:{{item.productKind}}</text>
+									<text >总数:{{item.productTotalNum}}</text>
+								</view>
+								<text>总额:<text class="foot_text">{{item.productTotalAmount.toFixed(2)}}</text></text>
+							</view>
+							<button type="default" class="buycart" @click.stop="operationHanld(item)">加入购物车</button>
+						</view>
+					</view>
+					<view v-if="showLoading && combinationProduct.length > 4 && !showRegularBtn">
+						<view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
+						<view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
+					</view>
+				</scroll-view>
+			</view>
 		</view>
 		<view class="cart-icon" @click="toCartPage">
 			<text v-if="cartQuantity > 0" class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
@@ -60,7 +124,7 @@
 			<image src='../../../static/icon-cart-active@3x.png' mode="widthFix"></image>
 		</view>
 		<!-- 透明模态层 -->
-		<modal-layer v-if='isModallayer'></modal-layer>
+		<modal-layer v-if='isModallayer'></modal-layer>
 	</view>
 </template>
 
@@ -68,7 +132,7 @@
 	import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
 	import modalLayer from "@/components/modal-layer"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
-	import { getSellerProduct  } from "@/api/seller.js"
+	import { getSellerProduct,getcombinationProduct } from "@/api/seller.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'productList',
@@ -94,18 +158,29 @@
 				isShowEmptyText: '搜索相关商品',
 				clubUserId: '',
 				scrollHeight: '',
-				productList: [],
+				productList: [],
+				combinationProduct:[],
+				zuheProductList:[],//组合商品列表
 				showLoading: false,
 				loadingNow: true,
 				loadingText: '上拉加载更多',
-				pageSize: 10,
+				pageSize: 10,
+				zuhepageSize:5,
 				pageNum: 1,
 				hasNextPage: false,
 				pullFlag: true,
 				fromRegularPurchasePage: false,
 				cartQuantity: 0,
 				showRegularBtn: false,
-				isPrecedence:false,
+				isPrecedence:false,
+				ladderPriceList:[],//是否 阶梯,
+				tabIndex:0,
+				goodsList:[],
+				tabBars:[
+					{name:'单一',id:'danyi'},
+					{name:'组合',id:'zuhe'}
+				],
+				 isShow: false,
 			}
 		},
 		created() {
@@ -118,15 +193,19 @@
 			...mapState(['hasLogin','userInfo'])
 		},
 		methods:{
-			scrolltolower() {
-				if(this.hasNextPage && this.pullFlag) {
-					this.getProductAgainInfo(true);
+			scrolltolower(tabIndex) {
+				if(this.hasNextPage && this.pullFlag) {
+					if(tabIndex ==0){
+						this.getProductAgainInfo(true);
+					}else if(tabIndex==1){
+						this.getcombinationProduct(true);
+					}
 				}
 			},
 			setScrollHeight() {
 				const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
 				this.windowHeight = windowHeight - 1;
-				this.scrollHeight = windowHeight - 1;
+				this.scrollHeight = windowHeight - 1;
 			},
 			getProductAgainInfo(loadMore) {
 				this.showLoading = true;
@@ -137,7 +216,7 @@
 				let params = {clubUserId:this.clubUserId,pageNum:this.pageNum,pageSize:this.pageSize,searchWord:this.searchInputVal}
 				getSellerProduct(params).then(response =>{
 					this.isShowWrapper = true
-					const responseData = response.data;
+					const responseData = response.data;
 					if(responseData.results && responseData.results.length > 0){
 						this.hasNextPage = responseData.hasNextPage;
 						this.isShowEmpty = false;
@@ -172,7 +251,8 @@
 							this.showLoading = true;
 							this.loadingNow = false;
 						}
-					} else {
+					} else {
+						console.log('111111111')
 						this.isShowEmpty = true;
 						this.isShowEmptyText ='暂无相关商品'
 					}
@@ -180,17 +260,164 @@
 					this.$util.msg(error.msg,2000);
 				})
 			},
-			searchOpertor(){//搜索商品
-				if(this.searchInputVal == ''){
-					this.$util.msg('请输入商品关键词',2000)
-				}else{
-					this.pageNum = 1
-					this.showSkeleton = true;
-					this.getProductAgainInfo();
+			searchOpertor(tabIndex){//搜索商品
+				if(tabIndex == 0){
+					if(this.searchInputVal == ''){
+						this.$util.msg('请输入商品关键词',2000)
+					}else{
+						this.pageNum = 1
+						this.showSkeleton = true;
+						this.getProductAgainInfo();
+					}
+				}else{
+					this.pageNum = 1
+					this.showSkeleton = true;
+					this.getcombinationProduct();
 				}
-			},
-			operationHanld(prop){
-				this.$emit('operationConfim',prop)
+			},
+			getcombinationProduct(loadMore){//组合搜索商品
+				this.showLoading = true;
+				this.loadingNow = true;
+				this.loadingText = '加载中';
+				this.isShowEmpty = false;				
+				if(loadMore) {this.pageNum += 1;}
+				let params = {clubUserId:this.clubUserId,pageNum:this.pageNum,pageSize:this.zuhepageSize,searchWord:this.searchInputVal}
+				getcombinationProduct(params).then(response =>{
+					this.isShowWrapper = true
+					const responseData = response.data;
+					if(responseData.results && responseData.results.length > 0){
+						this.hasNextPage = responseData.hasNextPage;
+						
+						this.isShowEmpty = false;
+						if(loadMore) {
+							this.combinationProduct = [...this.combinationProduct,...responseData.results];
+						} else {
+							this.combinationProduct = [...responseData.results];
+							
+							this.showSkeleton = false;
+						}
+						// 防上拉暴滑
+						this.pullFlag = false;
+						setTimeout(()=>{
+							this.pullFlag = true;
+						},500)
+						// 底部提示文案
+						if(this.hasNextPage) {
+							this.loadingText = '上拉加载更多';
+						} else {
+							this.showLoading = true;
+							this.loadingNow = false;
+						}
+					} else {
+						this.isShowEmpty = true;
+						this.isShowEmptyText ='暂无相关商品'
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			changeCountAdd(item,pros){//商品数量加加
+				if(pros.initProductNum == 0){
+					pros.initProductNum = pros.minBuyNumber
+					this.processActivityPrice(pros)
+				}else if(pros.initProductNum >= pros.minBuyNumber){
+					pros.initProductNum++
+					this.processActivityPrice(pros)
+				}
+				this.totalPeice(item)
+				this.totalCount(item)
+				this.totalKind(item)
+			},
+			changeCountSub(item,pros){//商品数量减减
+				if(pros.initProductNum==0){
+					this.$util.msg(`采购数量不能小于0`,2000);
+					return
+				}else if(pros.initProductNum == pros.minBuyNumber){
+					pros.initProductNum = 0;
+					this.processActivityPrice(pros);
+				}else{
+					pros.initProductNum--
+					this.processActivityPrice(pros)
+					}
+				this.totalPeice(item)
+				this.totalCount(item)
+				this.totalKind(item)
+			},
+			changeNnmber(e,item,pros){//输入商品数量更新
+				let _value = e.detail.value;
+				if(!this.$api.isNumber(_value)){
+					pros.initProductNum = pros.minBuyNumber
+				}else if(_value < pros.minBuyNumber){	
+					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
+					pros.initProductNum = pros.minBuyNumber
+				}else{
+					pros.initProductNum = parseInt(e.detail.value)
+					this.processActivityPrice(pros)
+				}
+				this.totalPeice(item)
+				this.totalCount(item)
+				this.totalKind(item)
+			},
+			totalPeice(item){	//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
+				let prosPrice=0;
+				let productsList =[];
+				productsList=item.combinationProductList;
+				productsList.forEach(pros=>{	
+					prosPrice+=pros.retailPrice*pros.initProductNum;
+					item.productTotalAmount = prosPrice;
+				})
+				// console.log(prosPrice)
+			},
+			totalCount(item){//计算总数量
+				let prosAllCount=0
+				let productsList =[];
+				productsList = item.combinationProductList
+				productsList.forEach(pros=>{
+					prosAllCount+=parseInt(pros.initProductNum);
+					item.productTotalNum = prosAllCount
+				})
+				// console.log(prosAllCount)
+			},	
+			totalKind(item){//计算商品种类
+				let productsList =[];
+				let checkList = [];
+				productsList=item.combinationProductList;
+				productsList.forEach(pros=>{	
+					if(pros.initProductNum>0){
+						checkList.push(pros)
+						item.productKind = checkList.length;
+					}else{
+						item.productKind = checkList.length;
+					}
+				})
+			},
+			processActivityPrice(pros){//单独处理活动价格和阶梯价格
+				let ladderPriceList = pros.ladderPriceList;
+				if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
+					pros.totalPrice = pros.initProductNum*pros.retailPrice
+				}else{
+					ladderPriceList.forEach((item,index)=>{
+						if(pros.initProductNum>=item.buyNum){
+							pros.retailPrice = item.buyPrice
+							pros.totalPrice = pros.initProductNum*item.buyPrice
+						}
+					})
+				}
+			},
+			operationHanld(prop){
+				this.$emit('operationConfim',prop);
+			},
+			alertjieti(pros){
+				this.$emit('alertjietiConfim',pros);
+			},
+			changeTab(index){
+				this.tabIndex = index;
+				if(index == 0){
+					this.loadingNow = false
+					this.isShowEmpty = true;
+					this.isShowEmptyText ='暂无相关商品'
+				}
+				this.$emit('changetab',index);
 			},
 			navToDetailPage(id) {
 				this.isModallayer = true;
@@ -207,18 +434,107 @@
 				if(this.searchInputVal != ''){
 					this.isShowClose = true
 				}else{					
-					this.isShowClose = false
+					this.isShowClose = false
 				}
 			},
-			delInputText(){//清除输入框内容
-				this.searchInputVal = ''
-				this.isShowClose = false
+			delInputText(tabIndex){//清除输入框内容
+				if(tabIndex==0){
+					this.searchInputVal = '';
+					this.productList =[];
+					this.isShowClose = false;
+					this.loadingNow = false;
+					this.isShowEmpty = true;
					this.isShowEmptyText ='暂无相关商品'
+				}else{
+					this.searchInputVal = '';
+					this.isShowClose = false;
+					this.getcombinationProduct();
+				}
 			}
 		}
 	}
 </script>
 
-<style lang="scss">
+<style lang="scss">
+	
+	.all-zuhe-list{
+		background: #FFFFFF;
+	}
+	.foot_conten{
+		width: 655rpx;
+		background: #fff;
+		font-size: 28rpx;
+		height: 80rpx;
+		// line-height: 80rpx;
+		display: inherit;
+		padding: 10px;
+		overflow: hidden;
+		margin: 20rpx auto;
+	}
+	.zuhe_foot-box{
+		float: left;
+		overflow: hidden;
+		white-space: nowrap;
+		// text-overflow: ellipsis;
+		width: 490rpx;
+	}
+	.zuhe_foot-box text{
+		margin-right: 36rpx;
+	}
+	.foot_text{
+		color: #FF2A2A;
+	}
+	.foot_conten .buycart{
+		width: 162rpx;
+		height: 64rpx;
+		background: #EFAF00 !important;
+		color: #fff;
+		font-size: 28rpx;
+		border-radius: 36rpx;
+		text-align: center;
+		line-height: 64rpx;
+		float: right;
+	}
+	.price-none{
+		font-size: 24rpx;
+		color: #666666;
+		}
+	.zuhe_title{
+		background:#FFFFFF;
+		height: 76rpx;
+		font-size: 28rpx;
+		color: #1675E1;
+		border-bottom: 4rpx solid #1675E1 ;
+		line-height: 76rpx;
+		padding-left: 30rpx;
+		&.active{
+			color: #E15616;
+			border-bottom: 4rpx solid #E15616;
+		}
+	}
+	.icon-gou{
+		color: #E15616;	
+		position: absolute;
+		top: 30rpx;
+		right: 0rpx;
+		font-weight: bold
+	}
+	.addstyle{
+		background: linear-gradient(-42deg, transparent 28rpx, #E15616 0) top right;
+		color: #FFFFFF;
+	}
+	.tabstyle{
+		width: 128rpx;
+		height: 76rpx;
+		font-size: 26rpx;
+		display: inline-block;
+		border-radius: 10rpx;
+		text-align: center;
+		line-height: 76rpx;
+		border: 2rpx solid #EEEEEE;
+		position: relative;
+		margin-right: 12rpx;
+		
+		}
 	.commodity-list-wrapper {
 		scroll-view {
 			height: 100%;
@@ -237,8 +553,8 @@
 		}
 	}
 	.good-search{
-		height: 64rpx;
-		width: 702rpx;
+		height: 80rpx;
+		width: 100%;
 		padding: 24rpx;
 		background: #FFFFFF;
 		display: flex;
@@ -249,24 +565,24 @@
 		left: 0;
 		z-index: 999;
 		.search-from{
-			width: 582rpx;
-			height: 64rpx;
+			width: 326rpx;
+			height: 80rpx;
 			background: #F7F7F7;
 			border-radius: 14rpx;
 			float: left;
 			position: relative;
 			.input{
-				width: 500rpx;
-				height: 64rpx;
+				// width: 500rpx;
+				height: 80rpx;
 				float: left;
-				line-height: 64rpx;
+				line-height: 80rpx;
 				color: $text-color;
 				font-size: $font-size-24;
 			}
 			.icon-iconfonticonfontsousuo1{
 				width: 64rpx;
-				height: 64rpx;
-				line-height: 64rpx;
+				height: 80rpx;
+				line-height: 80rpx;
 				text-align: center;
 				display: block;
 				font-size: $font-size-38;
@@ -277,9 +593,9 @@
 				font-size: $font-size-32;
 				color: #999999;
 				position: absolute;
-				width: 64rpx;
-				height: 64rpx;
-				line-height: 64rpx;
+				width: 120rpx;
+				height: 80rpx;
+				line-height: 80rpx;
 				top: 0;
 				right: 0;
 				text-align: center;
@@ -287,17 +603,18 @@
 			}
 		}
 		.search-btn{
-			width: 120rpx;
+			// width: 120rpx;
 			line-height: 64rpx;
 			text-align: center;
 			font-size: $font-size-28;
 			color: $color-system;
 			float: left;
-			background: #FFFFFF;
+			background: #FFFFFF;
+			margin-left: 10rpx;
 		}
 	}
 	.all-type-list-content {
-		height: 240rpx;
+		// height: 240rpx;
 		padding: 24rpx;
 		background: #fff;
 		margin-bottom: 2rpx;
@@ -305,15 +622,32 @@
 		flex-direction: row;
 		box-sizing: content-box;
 		.list-img {
-			width: 240rpx;
-			height: 240rpx !important;
+			width: 312rpx;
+			height: 207rpx !important;
 			margin-right: 26rpx;
 			border-radius: 10rpx;
 			border: 2rpx solid #f3f3f3;
 		}
-	}
+	}
+	.zuhe-list-content{
+		width: 655rpx;
+		// height: 214rpx;
+		background: #fff;
+		border: 2rpx solid #DEF4FF;
+		display: flex;
+		flex-direction: row;
+		box-sizing: content-box;
+		margin-top: 10rpx;
+		border-radius: 14rpx;
+		margin: 10rpx auto;
+		padding: 20rpx;
+		&.stylecontent{
+			border: 2rpx solid #FFF0DE;
+		}
+	}
+	
 	.list-details-info {
-		width: 442rpx;
+		width: 100%;
 		flex-direction: column;
 		font-size: 26rpx;
 		position: relative;
@@ -330,7 +664,7 @@
 			width: 100%;
 			display: inline-block;
 			margin-top: 8rpx;
-			color: #999999;
+			color: #666666;
 		}
 		.list-details-miniQuantity {
 			width: 100%;
@@ -380,9 +714,10 @@
 		.list-shop{
 			width: 100%;
 			height: auto;
-			flex: 6;
+			flex: 6;
+			overflow: hidden;
 			.list-price {
-				width: 100%;
+				// width: 100%;
 				color: #FF2A2A;
 				float: left;
 				line-height:36rpx ;
@@ -391,13 +726,27 @@
 				.price-larger {
 					margin-top: 20rpx;
 					font-size: $font-size-30;
-					display: inline-block;
+					display: inline-block;
+					margin-right: 20rpx;
+				}
+				.zuhe_price-larger{
+					color: #666666;
+					// float: left;
+					// margin-right: 85rpx;
+				}
+				.price-two{
+					color: #666666;
+					float: left;
+					
+				}
+				.zuhe_list_zj{
+					color: #FF2A2A;
 				}
 				.price-view{
 					display: inline-block;
-					width: 78rpx;
-					border-radius: 18rpx;
-					font-size: $font-size-20;
+					width: 40rpx;
+					border-radius: 10rpx;
+					font-size: $font-size-24;
 					text-align: center;
 					color: #FFFFFF;
 					height: 36rpx;
@@ -410,7 +759,47 @@
 						background: linear-gradient(135deg,rgba(128,0,255,1) 0%,rgba(242,49,153,1) 100%);
 					}
 				}
-			}
+			}
+			.zuhe_list_price .price-view{
+				margin-left:20rpx;
+				float: left;
+				margin-top: 5rpx;
+			}
+			.zuhe_list_price{
+				width: 400rpx;
+				overflow: hidden;
+				margin-top: 10rpx;
+			}
+			.count{
+				margin-top: 50rpx;
+				float: right;
+				border: 1px solid #EEEEEE;
+				border-radius: 10rpx;
+				.number-box{
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					.iconfont{
+						font-size: $font-size-24;
+						padding:0 16rpx;
+						color: $text-color;
+						text-align: center;
+						line-height: 48rpx;
+						font-weight: bold;
+					}
+					.btn-input{
+						width: 100rpx;
+						height: 48rpx;
+						line-height: 48rpx;
+						background: #F8F8F8;
+						border-radius: 4rpx;
+						text-align: center;
+						font-size: $font-size-24;
+						border-right: 1px solid #EEEEEE;
+						border-left: 1px solid #EEEEEE;
+					}
+				}
+			}
 			.list-price-none{
 				width: 100%;
 				.price-none{
@@ -431,12 +820,20 @@
 			height: 64rpx;
 			line-height: 64rpx;
 			border-radius: 32rpx;
-			color: #fff;
+			color: #333333;
 			font-size: 26rpx;
 			margin-right: 0;
-			background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
-		}
+			// background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+			background: #FFFFFF;
+			border: 2rpx solid #C9C9C9;
+		}
+		.zuhe_btn{
+			float: right;
+		}
 	}
+	.zuhe_list_price{
+		display: block !important;
+	}
 	.cart-icon {
 		width: 92rpx;
 		height: 92rpx;
@@ -459,5 +856,8 @@
 			top: -10rpx;
 			right: 0;
 		}
-	}
+	}
+	.zuhe_list_text{
+		margin-top: 10rpx;
+	}
 </style>

+ 10 - 2
components/cm-module/productDetails/cm-attributes.vue

@@ -14,7 +14,10 @@
 		<view class="wrap-info">
 			<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''">
 				<view class="info-viewL tui-skeleton-fillet">品牌:<text>{{product.brandName == null? '其他' : product.brandName}}</text></view>
-				<view class="info-viewR tui-skeleton-fillet">包装规格:<text>{{product.unit}}</text></view>														
+				<view class="info-viewR tui-skeleton-fillet">包装规格:<text>{{product.unit}}</text></view>		
+			</view>
+			<view class="info-viewT" v-if="product.productCode!=''&&product.productCode!=null">
+				<view class="info-viewL tui-skeleton-fillet">商品编码:<text>{{product.productCode}}</text></view>
 			</view>
 		</view>
 		<view class="wrap-seve" :class="goodsData.isNoneDisabled ? 'none' : ''">
@@ -54,7 +57,12 @@
 </script>
 
 <style lang="scss">	
-
+	.bmCode{
+	float: left;
+	width: 702rpx;
+	padding: 20rpx 24rpx 0 24rpx;
+	border-bottom: 1px solid #F8F8F8	
+	}
 </style>
 
 

+ 146 - 0
components/cm-module/zuheList/ZuheList.vue

@@ -0,0 +1,146 @@
+<template>
+	<view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
+		<view class="good-search clearfix" v-if="searchStatus">
+			<view id="shop">
+				<view class="style addstyle ">单一商品</view>
+				<view class="style zuhe">组合商品</view>
+			</view>
+			<view class="search-from name">
+				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
+				<input class="input" 
+					   type="text" 
+					   focus
+					   confirm-type="search" 
+					   v-model="searchInputVal" 
+					   placeholder="请输入商品关键词" 
+					   @input="onShowClose" 
+					   @confirm="searchOpertor"
+					   maxlength="20"/>
+				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
+			</view>
+			<view class="search-btn">
+				<button class="search-btn" type="default" @click.stop="searchOpertor">搜索2</button>
+			</view>
+		</view>
+		<list-skeleton v-if="showSkeleton"></list-skeleton>
+	</view>
+</template>
+<script>
+	export default {
+		components: {
+			
+		},
+		data() {
+			return {
+				
+			};
+		},
+	}
+		
+</script>
+
+<style>
+.commodity-list-wrapper {
+		scroll-view {
+			height: 100%;
+		}
+		.style{
+			width: 128rpx;
+			height: 64rpx;
+			background: #fff;
+			font-size: 26rpx;
+			display: inline-block;
+			border-radius: 10rpx;
+			text-align: center;
+			line-height: 64rpx;
+			border: 2rpx solid #EEEEEE;
+			position: relative;
+			margin-right: 12rpx;
+			}
+		.danyi i{
+			color: #E15616;	
+			position: absolute;
+			top: 20rpx;
+			right: 4rpx;
+			font-weight: bold
+			}
+		.addstyle{
+				background: linear-gradient(-42deg, transparent 28rpx, #E15616 0) top right;
+				color: #FFFFFF;
+			}
+		.show-more-btn {
+			width: 276rpx;
+			height: 52rpx;
+			line-height: 52rpx;
+			border: 2rpx solid #D8D8D8;
+			background: #F7F7F7;
+			font-size: 26rpx;
+			margin: 26rpx 0;
+			position: absolute;
+			left: 50%;
+			margin-left: -138rpx;
+		}
+	}
+	.good-search{
+		height: 64rpx;
+		width: 702rpx;
+		padding: 24rpx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		margin-bottom: 20rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+		.search-from{
+			width: 330rpx;
+			height: 64rpx;
+			background: #F7F7F7;
+			border-radius: 14rpx;
+			float: left;
+			position: relative;
+			.input{
+				// width: 500rpx;
+				height: 64rpx;
+				float: left;
+				line-height: 64rpx;
+				color: $text-color;
+				font-size: $font-size-24;
+			}
+			.icon-iconfonticonfontsousuo1{
+				width: 64rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				text-align: center;
+				display: block;
+				font-size: $font-size-38;
+				float: left;
+				color: #999999;
+			}
+			.icon-shanchu1{
+				font-size: $font-size-32;
+				color: #999999;
+				position: absolute;
+				width: 64rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				top: 0;
+				right: 0;
+				text-align: center;
+				z-index: 10;
+			}
+		}
+		.search-btn{
+			// width: 90rpx;
+			line-height: 64rpx;
+			text-align: center;
+			font-size: $font-size-28;
+			color: $color-system;
+			float: left;
+			background: #FFFFFF;
+			margin-left: 10rpx
+		}
+	 }
+	}
+</style>

+ 10 - 0
pages.json

@@ -449,5 +449,15 @@
 		"navigationBarTitleText": "采美采购商城",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"backgroundColor": "#FFFFFF"
+	},
+	"condition" : { //模式配置,仅开发期间生效
+		"current": 0, //当前激活的模式(list 的索引项)
+		"list": [
+			{
+				"name": "", //模式名称
+				"path": "", //启动页面,必选
+				"query": "" //启动参数,在页面的onLoad函数里面得到
+			}
+		]
 	}
 }

+ 8 - 0
pages/goods/product.vue

@@ -32,6 +32,9 @@
 						<view class="p-title tui-skeleton-fillet">
 							{{product.name == undefined ? '' : product.name}}
 						</view>
+						<view class="productRemarks" v-if="product.productRemarks!=''&&product.productRemarks!=null">
+							<view class="">{{product.productRemarks}}</view>
+						</view>
 						<view class="wrap-top-price" v-if="!goodsData.isNoneDisabled">
 							<view v-if="!hasLogin" class="p-login grade  tui-skeleton-fillet">
 								<text class="p-no">价格:</text>
@@ -538,6 +541,11 @@
 	page{
 		background-color: #F7F7F7;
 	}
+	.productRemarks{
+		color: #FF2A2A;
+		font-size: 24rpx;
+		margin-bottom: 16rp
+	}
 	.banner-section{
 		width: 100%;
 		height: 750rpx;

+ 4 - 1
pages/search/search.vue

@@ -28,6 +28,9 @@
 						<text class="list-details-title">{{item.name}}</text>
 						<text class="list-details-specs">规格:{{item.unit}}</text>
 						<text class="list-details-miniQuantity" v-if="fromRegularPurchasePage">起订量:{{item.minBuyNumber}}</text>
+						<view class="list-details-specs" v-if="item.productCode!=''&&item.productCode!=null">
+							<view>商品编码:{{item.productCode}}</view>
+						</view>
 						<view class="list-details-price">
 							<view v-if="!hasLogin" class="list-login-now">
 								<text class="p-no">价格:</text>
@@ -474,7 +477,7 @@
 		}
 		.list-details-specs {
 			margin-top: 8rpx;
-			color: #999999;
+			color: #666666;
 		}
 		.list-details-miniQuantity {
 			margin-top: 7rpx;

+ 16 - 3
seller/pages/cart/cart.vue

@@ -33,6 +33,9 @@
 												{{pros.name}}
 											</view>
 											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
+											<view class="productspec" v-if="pros.productCode!=''&&pros.productCode!=null">
+												<view bgcolor="#666666">商品编码:{{pros.productCode}}</view>
+											</view>
 											<view class="productprice">
 												<!--使用过滤器对总价改变-->
 												<view class="price"><text>¥</text>
@@ -41,7 +44,7 @@
 												<view class="count" :class="[isshowDelbtn ? 'none':'show']">
 													<view class="number-box">
 														<view  class="iconfont icon-jianhao"  @click="changeCountSub(item,pros)"></view>
-														<input class="btn-input" type="number" maxlength='4' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
+														<input class="btn-input" type="number" maxlength='6' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
 														<view  class="iconfont icon-jiahao"   @click="changeCountAdd(item,pros)"></view>
 													</view>
 												</view>
@@ -696,6 +699,16 @@
 			.productspec{
 				height: 36rpx;
 				color: #999999;
+				text-overflow:ellipsis;
+				display: -webkit-box;
+				word-break: break-all;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+				margin-top: 10rpX;
+			}
+			.productCode{
+				color: #666666;
 			}
 			.productprice{
 				height: 48rpx;
@@ -705,7 +718,7 @@
 				.price{
 					line-height: 48rpx;
 					font-size: $font-size-28;
-					width: 48%;
+					// width: 48%;
 					color: #FF2A2A;
 					float: left;
 					&.disabled{
@@ -739,7 +752,7 @@
 							font-weight: bold;
 						}
 						.btn-input{
-							width: 62rpx;
+							width: 100rpx;
 							height: 48rpx;
 							line-height: 48rpx;
 							background: #F8F8F8;

+ 231 - 22
seller/pages/cart/immediately.vue

@@ -3,7 +3,12 @@
 		<immediately-list ref="productList" 
 						  :search-status="true" 
 						  @operationConfim="hanldOperationConfim"
-						  @goCartPage="hanldToCartPage">
+						  @alertjietiConfim ="hanldalertjietiConfim"
+						  @goCartPage="hanldToCartPage"
+						  :tabBars="tabBars"
+						  :tabIndex="tabIndex"
+						  @changetab="hanldChangeTab"
+						  >
 		</immediately-list>
 		<!--底部选择模态层弹窗组件 -->
 		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
@@ -15,16 +20,17 @@
 						<image :src="handleData.mainImage" mode=""></image>
 					</view>
 					<view class="layer-nunbox">
+						<view class="layer-nunbox-m" v-if="productCode!=''&&productCode!=null">商品编码:{{productCode}}</view>
 						<view class="layer-nunbox-t">
-							<view class="layer-nunbox-text">数量:</view>
+							<view class="layer-nunbox-text">数量</view>
 							<view class="number-box">
 								<view  class="iconfont icon-jianhao" :class="[isQuantity==true?'disabled':'']" @click="changeCountSub()"></view>
-								<input class="btn-input" type="number" v-model="number" maxlength='4'  @blur="changeNumber($event)">
+								<input class="btn-input" type="number" v-model="number" maxlength='6'  @blur="changeNumber($event)">
 								<view  class="iconfont icon-jiahao"  :class="[isStock==true?'disabled':'']" @click="changeCountAdd()"></view>
 							</view>
 						</view>
 						<view class="layer-nunbox-b">
-							<view class="text">单价:
+							<view class="text">单价
 								<text class="p sm">¥</text>
 								<text class="p bg">{{buyRetailPrice.toFixed(2)}}</text>
 							</view>
@@ -35,13 +41,56 @@
 					<view class="button add" @click="getAddProductCart">加入购物车</view>
 				</view>
 			</view>
+		</view>		
+		<!-- 组合加入购物车 -->
+		<view class="popup spec zuhe" :class="specClasszuhe"  @touchmove.stop.prevent="discard" @tap="hideSpecs">
+			<!-- 遮罩层 -->
+			<view class="mask"></view>
+			<view class="layer" @tap.stop="discard">
+				<view class="content zuhe-content">
+					<view class="number-left">
+						<text>种类:{{productKind}}</text>
+						<text>数量:{{productTotalNum}}</text>
+					</view>
+					<view class="number-right">
+						<view class="text">
+							总额:<text class="number-right-text">¥{{productTotalAmount.toFixed(2)}}</text>
+						</view>
+					</view>
+				</view>
+				<view class="btn">
+					<view class="button add" @click="getzuheCart">确定</view>
+				</view>
+			</view>
+		</view>
+		
+		<!--  -->
+		<view class="popup spec zuhe" :class="specClassjieti"  @touchmove.stop.prevent="discard" >
+			<view class="mask"></view>
+			<view class="jieti_box " @tap.stop="discard">
+				<view class="jieti_box_one">
+					<view class="jieti_left" >
+						<view>起订量</view>
+						<view class="ladder-a"  v-for="(item,index) in ladderPriceList" :key="index">
+							{{item.buyNumRangeShow}}
+						</view>
+					</view>
+					<view class="jieti_right" >
+						<view>价格</view>
+						<view class="" v-for="(item,index) in ladderPriceList" :key="index">¥ {{item.buyPrice.toFixed(2)}}</view>
+					</view>
+				</view>
+				<view class="addbtn" @tap="hideSpecjieti">
+					知道了
+				</view>
+			</view>
 		</view>
 	</view>
 </template>
 
 <script>
 	import immediatelyList from '@/components/cm-module/listTemplate/immediatelyList'
-	import { getSellerProductNum ,shoppingCartAddCart} from "@/api/seller.js" 
+	import { getSellerProductNum ,shoppingCartAddCart,getCartAddCart} from "@/api/seller.js" 
 	export default{
 		components:{
 			immediatelyList
@@ -55,12 +104,22 @@
 				lastPageType: '',
 				lastPageVal: '',
 				specClass: '',//规格弹窗css类,控制开关动画
+				specClasszuhe:'',//组合加购物车弹窗
+				specClassjieti:'',//阶梯展示弹窗
+				ladderPriceList:{},
+				productCode:'',
 				handleData:{},
 				isQuantity:false,
 				isStock:false,
 				minBuyNumber:0,
 				number:0,
-				buyRetailPrice:0
+				buyRetailPrice:0,
+				hanldChangeTabIndex:0,
+				productKind:0,
+				productTotalNum:0,
+				productTotalAmount:0,
+				buyNumRangeShow:'',//起订量范围
+				buyPrice:'',//起订量范围价格
 			}
 		},
 		onLoad() {
@@ -72,12 +131,33 @@
 					this.$refs.productList.cartQuantity = response.data
 				})
 			},
+			hanldChangeTab(index){
+				if(index == 1){
+					this.$refs.productList.getcombinationProduct()
+				}
+			},
+			hanldalertjietiConfim(data){
+				this.ladderPriceList = data.ladderPriceList
+				this.specClassjieti='show';
+			},
 			hanldOperationConfim(data){//显示选择数量确认弹窗
-				this.specClass = 'show';
 				this.handleData = data
-				this.number = data.minBuyNumber
-				this.minBuyNumber = data.minBuyNumber
-				this.buyRetailPrice = data.retailPrice;
+				if(this.$refs.productList.tabIndex == 1){
+					if(data.productKind ==0){
+						this.$util.msg(`请至少选购一种商品`,2000);
+					}else{
+						this.specClasszuhe = 'show';
+						this.productKind= data.productKind;
+						this.productTotalNum = data.productTotalNum;
+						this.productTotalAmount = data.productTotalAmount;
+					}
+				}else{
+					this.productCode = data.productCode
+					this.number = data.minBuyNumber
+					this.minBuyNumber = data.minBuyNumber
+					this.buyRetailPrice = data.retailPrice;
+					this.specClass = 'show';
+				}
 			},
 			hideSpec() {//关闭选择数量确认弹窗
 				this.specClass = 'hide';
@@ -85,6 +165,18 @@
 					this.specClass = 'none';
 				}, 200);
 			},
+			hideSpecs(){
+				this.specClasszuhe='hide';
+				setTimeout(() => {
+					this.specClasszuhe='none';
+				}, 200);
+			},
+			hideSpecjieti(){
+				this.specClassjieti='hide';
+				setTimeout(() => {
+					this.specClassjieti='none';
+				}, 200);
+			},
 			changeCountAdd(){//popup弹窗数量增加按钮
 				this.number++
 				this.calculatPerice()
@@ -124,6 +216,43 @@
 					this.buyRetailPrice = this.handleData.retailPrice;
 				}
 			},
+			getzuheCart(){//组合商品加入购物车
+			let productInfo=[];
+			let setGoodsList ={};
+			let productID = '';
+			let productNum ='';
+			this.handleData.combinationProductList.forEach(item =>{
+				if(item.initProductNum >0){
+					setGoodsList.productId = item.productID
+					setGoodsList.productNum =item.initProductNum
+					productInfo.push(JSON.parse(JSON.stringify(setGoodsList)))
+				}
+			})
+			
+			let params ={
+					clubId:this.clubID,
+					serviceProviderId:this.serviceProviderId,
+					productInfo
+				}
+				console.log(params)
+				getCartAddCart({'params':JSON.stringify(params)}).then(response => {
+					this.specClasszuhe = 'hide';
+					this.$util.msg('加入购物车成功',1500,true,'success');
+					this.getClubProductNum();
+					this.clearProduct();//清空
+					setTimeout(() => {this.specClasszuhe = 'none'}, 200)
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			clearProduct(){//成功加入购物车后清空所选值
+				this.handleData.productKind= 0;
+				this.handleData.productTotalNum = 0;
+				this.handleData.productTotalAmount = 0;
+				this.handleData.combinationProductList.forEach(item =>{
+					item.initProductNum = 0;
+				})
+			},
 			getAddProductCart(){//增加购物车成功和toast弹窗提示成功
 				let params ={
 						productId:this.handleData.productID,
@@ -134,7 +263,7 @@
 				shoppingCartAddCart(params).then(response => {
 					this.specClass = 'hide';
 					this.$util.msg('加入购物车成功',1500,true,'success')
-					this.getClubProductNum()
+					this.getClubProductNum();
 					setTimeout(() => {this.specClass = 'none'}, 200)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
@@ -160,6 +289,76 @@
 </script>
 
 <style lang="scss">
+	// 阶梯价格弹窗
+	.jieti_box{
+		width: 596rpx;
+		// height: 496rpx;
+		top: 10%;
+		right: 50%;
+		transform: translate(50%,50%);
+		position: absolute;
+		background:#FFFFFF;
+		color: #000;
+		font-size: 28rpx;
+		border-radius: 10rpx;
+		text-align: center;
+		line-height: 84rpx;
+		padding: 20rpx;
+		z-index: 99999;
+	}
+	.jieti_box_one{
+		// width: 548rpx;
+		overflow: hidden;
+		border: 2rpx solid #F5F5F5;
+		border-bottom: 0;
+		margin: auto;
+	}
+	.jieti_left{
+		width: 298rpx;
+		float: left;
+		}
+	.jieti_left view{
+		height: 84rpx;
+		border-bottom:2rpx solid #F5F5F5 ;
+		border-right:2rpx solid #F5F5F5  ;
+	}	
+	.ladder-a{
+		letter-spacing: 4rpx;
+	}
+	.jieti_right{
+			width: 294rpx;
+			float: right;
+		}
+	.jieti_right view{
+			height: 84rpx;
+			border-bottom:2rpx solid #F5F5F5;
+		}
+	.addbtn{
+			height: 84rpx;
+			background: linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+			text-align: center;
+			font-size: 28rpx;
+			color: #fff;
+			line-height: 84rpx;
+			border-radius: 10rpx;
+			margin: 20rpx auto
+		}
+	.zuhe-content{
+		display: inline-block;
+	}
+	.number-left{
+		float: left;
+	}
+	.number-right{
+		margin-left: 30rpx;
+		float: left;
+	}
+	.number-left text{
+		margin-left: 30rpx;
+	}
+	.number-right-text{
+		color: #FF2A2A;
+	}
 	page {
 		background: $sub-bg-color;
 		.all-type-list-wrapper {
@@ -242,10 +441,10 @@
 		.layer {
 			position: fixed;
 			z-index: 22;
-			bottom: -294rpx;
+			bottom: -360rpx;
 			width: 702rpx;
 			padding: 24rpx 24rpx 36rpx 24rpx;
-			height: 236rpx;
+			// height: 236rpx;
 			border-radius: 30rpx 30rpx 0 0;
 			background-color: #fff;
 			display: flex;
@@ -253,10 +452,11 @@
 			align-content: space-between;
 			.content {
 				width: 100%;
+				margin-top: 20rpx;
 			}
 			.btn {
 				width: 100%;
-				height: 88rpx;
+				// height: 88rpx;
 				display: flex;
 				.button {
 					width: 702rpx;
@@ -268,10 +468,13 @@
 					font-size: $font-size-28;
 					border-radius: 14rpx;
 					background: $btn-confirm;
+					margin-top: 20rpx;
 				}
 			}
 		}
-		
+		.layer-nunbox-m{
+			font-size: 28rpx;
+		}
 		&.show {
 			display: block;
 			.mask{
@@ -308,29 +511,30 @@
 			}
 		}
 		.layer-smimg{
-			width: 114rpx;
-			height: 114rpx;
+			width: 158rpx;
+			height: 158rpx;
 			float: left;
 			border-radius: 10rpx;
 			margin-right: 24rpx;
 			image{
-				width: 114rpx;
-				height: 114rpx;	
+				width: 158rpx;
+				height: 158rpx;	
 				border-radius: 10rpx;
 			}
 		}
 		.layer-nunbox{
 			justify-content: space-between;
 			align-items: center;
-			width: 536rpx;
+			width: 510rpx;
 			height: 88rpx;
-			padding: 13rpx 0 0 0;
+			padding: 10rpx 0 0 0;
 			float: left;
 			.layer-nunbox-t{
 				width: 100%;
 				height:44rpx;
 				position:relative;
 				display: flex;
+				margin-top: 10rpx;
 				.layer-nunbox-text{
 					line-height: 44rpx;
 					font-size: $font-size-28;
@@ -345,7 +549,7 @@
 						font-size: $text-color;
 					}
 					.btn-input{
-						width: 62rpx;
+						width: 100rpx;
 						height: 48rpx;
 						line-height: 48rpx;
 						background: #F8F8F8;
@@ -382,4 +586,9 @@
 			}
 		}
 	}	
+	
+	.zuhe .layer{
+		bottom: -270rpx;
+		height: 200rpx;
+	}
 </style>

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

@@ -270,7 +270,7 @@
 						freePostFlag:parseInt(this.freightData.freePostFlag)//运费形式
 					}
 				let params = {
-						orderSource:2,				  //提交来源
+						orderSource:6,				  //提交来源
 						clubUserId:this.clubUserId,   //机构UserID
 						cartType:this.cartType,		  //从购物车提交
 						serviceProviderId:this.serviceProviderId,//帮下单协销ID