Quellcode durchsuchen

commit sku 测试优化

zhengjinyi vor 2 Jahren
Ursprung
Commit
270dffa3ad

+ 2 - 0
components/cm-module/cart-components/cm-unit-popup.vue

@@ -157,6 +157,8 @@ export default {
 		this.addParams.count = this.skuList[0].minBuyNumber
 		this.handleMinNumber = this.skuList[0].minBuyNumber
 		this.handleStock = this.skuList[0].stock
+		this.skuProduct.price = this.skuList[0].price;
+		this.isBtnDisable = this.skuList[0].stock === 0;
 		this.initData()
 	},
 	computed: {

+ 73 - 33
components/cm-module/cart-components/index.vue

@@ -39,6 +39,7 @@
 								<view class="checkbox-box" @click.stop="handleCheckShop(item)">
 									<view
 										class="checkbox iconfont"
+										:style="{color : item.isDisable ? '#efefef' : ''}"
 										:class="[item.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
 									></view>
 								</view>
@@ -59,6 +60,7 @@
 										<view class="checkbox-box" @click.stop="handlsCkecdPros(item, pros)">
 											<view
 												class="checkbox iconfont"
+												:style="{color : pros.isDisable ? '#EFEFEF' : ''}"
 												:class="[pros.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
 											></view>
 										</view>
@@ -234,7 +236,7 @@
 				<template v-if="pathType == 0">
 					<view class="footer">
 						<view class="footer-le">
-							<view class="foot-check checkbox-box" @tap.stop="checkAll()">
+							<view class="foot-check checkbox-box" @tap.stop="handleCheckAll">
 								<button
 									class="checkbox iconfont"
 									:class="[isCheckAll ? 'icon-yixuanze' : 'icon-weixuanze']"
@@ -768,7 +770,9 @@ export default {
 		},
 		handlsCkecdPros(item, pro) {
 			//为未选中的时候改变为true,反之为true
-			if(pro.isDisable){ return }
+			if (!this.isshowDelbtn) {
+				if(pro.isDisable){ return }
+			}
 			pro.isChecked = !pro.isChecked
 			if (pro.isChecked) {
 				if (!this.submitIds.includes(pro.skuId * 1)) {
@@ -828,25 +832,44 @@ export default {
 		},
 		handleCheckShop(supplier) {
 			//与单选商品类似
-			if(supplier.isDisable){ return }
+			if (!this.isshowDelbtn) {
+				if(supplier.isDisable){ return }
+			}
 			supplier.isChecked = !supplier.isChecked
 			this.setProductChecked(supplier)
 			this.updateCheckAllBtn()
 		},
 		setProductChecked(supplier) {
 			supplier.cartList.forEach(pros => {
-				if (supplier.isChecked && (pros.stock !== 0 || pros.number < pros.stock)) {
-					pros.isChecked = true
-					if (!this.submitIds.includes(pros.skuId * 1)) {
-						this.submitIds.push(pros.skuId)
-						this.checkenProsList.push(pros)
+				if (this.isshowDelbtn) {
+					if (supplier.isChecked) {
+						pros.isChecked = true
+						if (!this.submitIds.includes(pros.skuId * 1)) {
+							this.submitIds.push(pros.skuId)
+							this.checkenProsList.push(pros)
+						}
+					} else {
+						pros.isChecked = false
+						let lent = this.submitIds.indexOf(pros.skuId * 1)
+						if (lent >= 0) {
+							this.submitIds.splice(lent, 1)
+							this.checkenProsList.splice(lent, 1)
+						}
 					}
-				} else {
-					pros.isChecked = false
-					let lent = this.submitIds.indexOf(pros.skuId * 1)
-					if (lent >= 0) {
-						this.submitIds.splice(lent, 1)
-						this.checkenProsList.splice(lent, 1)
+				}else{
+					if (supplier.isChecked && (pros.stock !== 0 || pros.number < pros.stock)) {
+						pros.isChecked = true
+						if (!this.submitIds.includes(pros.skuId * 1)) {
+							this.submitIds.push(pros.skuId)
+							this.checkenProsList.push(pros)
+						}
+					} else {
+						pros.isChecked = false
+						let lent = this.submitIds.indexOf(pros.skuId * 1)
+						if (lent >= 0) {
+							this.submitIds.splice(lent, 1)
+							this.checkenProsList.splice(lent, 1)
+						}
 					}
 				}
 			})
@@ -864,7 +887,11 @@ export default {
 				})
 			} else {
 				this.goodsList.forEach(supplier => {
-					supplier.isChecked = this.isCheckAll && !supplier.isDisabled
+					if(supplier.isDisable){ 
+						supplier.isChecked = false
+					}else{
+						supplier.isChecked = this.isCheckAll && !supplier.isDisabled
+					}
 					this.setProductChecked(supplier)
 				})
 			}
@@ -1233,9 +1260,32 @@ export default {
 				})
 			}
 		},
+		setCartisDisable(){// 删除取消设置不能选的商品
+			this.goodsList = this.goodsList.map(suppler=>{
+				suppler.isDisable = false
+				suppler.cartList.forEach(pros => {
+					pros.isDisable = false
+				})
+				return suppler
+			})
+		},
+		clearCartisDisable(){// 取消删除设置不能选的商品
+			this.goodsList = this.goodsList.map((supplier) => {
+				supplier.cartList.forEach(pros => {
+					if(pros.stock === 0 || pros.number > pros.stock ){
+					    supplier.isDisable = true
+					    pros.isDisable = true
+					}else{
+					    pros.isDisable = false
+					}
+				})
+				return supplier
+			})
+		},
 		showDelManager() {
 			//显示删除商品管理
 			this.isshowDelbtn = true
+			this.setCartisDisable()
 			if (this.isCheckAll) {
 				this.updateBothCheckBtn()
 			} else {
@@ -1260,25 +1310,15 @@ export default {
 		hideDelManage() {
 			//隐藏删除商品管理
 			this.isshowDelbtn = false
-			let isFailureLayer,
-				newFailureList = []
-			if (this.isCheckAll) {
-				this.updateBothCheckBtn()
-			} else {
-				// 失效商品取消勾选
-				this.goodsList = this.goodsList.map(suppler=>{
-					if (suppler.isDisabled) {
-						suppler.isChecked = false
-					}
-					suppler.cartList.forEach(pros => {
-						if (pros.validFlag == 3) {
-							pros.isChecked = false
-						}
-					})
-					return suppler
+			this.isCheckAll = false
+			this.clearCartisDisable()
+			this.goodsList = this.goodsList.map(suppler=>{
+				suppler.isChecked = false
+				suppler.cartList.forEach(pros => {
+						pros.isChecked = false
 				})
-				this.updateCheckAllBtn()
-			}
+				return suppler
+			})
 			this.failureList = this.failureList.map(el=>{
 				if (el.failureState == 1 || el.failureState == 2) {
 					el.isFailureLayer = true

+ 1 - 0
components/cm-module/productDetails/cm-unit-popup.vue

@@ -189,6 +189,7 @@ export default {
 			this.handleStock = this.skuList[0].stock
 			//处理禁用按钮商品
 			this.isBtnDisabled = this.isDisabledFlag(this.skuProduct)
+			this.isBtnDisabled = this.skuList[0].stock === 0 
 		},
 		isDisabledFlag(pros) {
 			// 非会员

+ 5 - 11
pages/goods/components/cm-prams-popup.vue

@@ -5,10 +5,6 @@
 			<view class="title">商品参数</view>
 			<div class="tui-popup-main">
 				<scroll-view class="tui-popup-scroll" scroll-y="true">
-					<view class="content-tr">
-						<view class="content-td">起订量</view>
-						<view class="content-th">{{ product.minBuyNumber }}</view>
-					</view>
 					<view class="content-tr">
 						<view class="content-td">品牌</view>
 						<view class="content-th">{{
@@ -23,16 +19,12 @@
 					</view>
 					<view class="content-tr">
 						<view class="content-td">包装规格</view>
-						<view class="content-th">{{ product.unit }}</view>
+						<view class="content-th">{{ skuStext }}</view>
 					</view>
 					<view class="content-tr">
 						<view class="content-td">商品编码</view>
 						<view class="content-th">{{ product.productCode }}</view>
 					</view>
-					<view class="content-tr">
-						<view class="content-td">库存</view>
-						<view class="content-th">{{ product.stock }}</view>
-					</view>
 					<view
 						class="content-tr"
 						v-if="product.parametersList.length > 0"
@@ -68,11 +60,13 @@
 		},
 		data() {
 			return{
-				data:[]
+				data:[],
+				skuStext:''
 			}
 		},
 		created() {
-			console.log('111111',this.product)
+			let newArray = this.product.skus
+			this.skuStext = newArray.map(item =>{ return item.unit }).join(',')
 		},
 		methods:{
 			hidePopup(){

+ 0 - 15
pages/goods/components/cm-price.vue

@@ -22,9 +22,6 @@
 						</view>
 					</template>
 				</view>
-				<view v-if="product.actStatus == 0 && product.ladderPriceFlag === 1" class="floor-item-act">
-					<view class="floor-tags" @click.stop="clickPopupShow()">阶梯价格</view>
-				</view>
 				<view class="floor-item-btn"> <view class="btn" @click.stop="loginClick">登录查看价格</view> </view>
 			</view>
 		</template>
@@ -66,9 +63,6 @@
 							</view>
 						</template>
 					</view>
-					<view v-if="product.actStatus == 0 && product.ladderPriceFlag == 1" class="floor-item-act">
-						<view class="floor-tags" @click.stop="clickPopupShow()">阶梯价格</view>
-					</view>
 				</view>
 			</template>
 			<!-- 资质机构  -->
@@ -111,9 +105,6 @@
 							</view>
 						</template>
 					</view>
-					<view v-if="product.actStatus == 0 && product.ladderPriceFlag == 1" class="floor-item-act">
-						<view class="floor-tags" @click.stop="clickPopupShow()">阶梯价格</view>
-					</view>
 				</view>
 			</template>
 			<!-- 供应商  -->
@@ -157,9 +148,6 @@
 								</view>
 							</template>
 						</view>
-						<view v-if="product.actStatus == 0 && product.ladderPriceFlag == 1" class="floor-item-act">
-							<view class="floor-tags" @click.stop="clickPopupShow()">阶梯价格</view>
-						</view>
 					</view>
 				</template>
 				<template v-else>
@@ -222,9 +210,6 @@
 								</view>
 							</template>
 						</view>
-						<view v-if="product.actStatus == 0 && product.ladderPriceFlag == 1" class="floor-item-act">
-							<view class="floor-tags" @click.stop="clickPopupShow()">阶梯价格</view>
-						</view>
 					</view>
 				</template>
 			</template>

+ 20 - 4
pages/goods/components/cm-unit-popup.vue

@@ -143,16 +143,19 @@ export default {
 	methods: {
 		async initData(data) {
 			const userInfo = await this.$api.getStorage()
-			if (userInfo.userIdentity == 0 || userInfo.userIdentity == 2 || userInfo.userIdentity == 4) {
-				this.isShowButton = true
-			} else {
+			if (userInfo.userIdentity == 1 || userInfo.userIdentity == 3) {
 				this.isShowButton = false
+			} else {
+				this.isShowButton = true 
 			}
 			this.skuList = this.skuProduct.skus
 			this.productCount = this.skuList[0].minBuyNumber
 			this.handleMinNumber = this.skuList[0].minBuyNumber
 			this.handleStock = this.skuList[0].stock
-			if(this.skuList[0].ladderPriceList){ this.isShowLadder = true }
+			if(this.skuList[0].ladderPriceList){ 
+				this.isShowLadder = true 
+				this.ladderPriceList = this.skuList[0].ladderPriceList
+			}
 		},
 		//popup弹窗数量增加按钮
 		changeCountAdd() {
@@ -165,6 +168,7 @@ export default {
 			} else {
 				this.productCount++
 			}
+			this.totalLadderPrice()
 		},
 		//popup弹窗数量减按钮
 		changeCountSub() {
@@ -179,6 +183,7 @@ export default {
 				} else {
 					this.productCount--
 				}
+				this.totalLadderPrice()
 				this.isQuantity = false
 			}
 		},
@@ -197,6 +202,17 @@ export default {
 			}else{
 				this.productCount = e.detail.value
 			}
+			this.totalLadderPrice()
+		},
+		totalLadderPrice() {
+			//单独处理活动价格和阶梯价格
+			if(this.ladderPriceList.length>0){
+				this.ladderPriceList.forEach((ladder, index) => {
+					if (this.productCount >= ladder.buyNum) {
+						this.$parent.skuProduct.price = ladder.buyPrice
+					}
+				})
+			}
 		},
 		handleConfirm(type) {
 			if (this.hasLogin) {

+ 2 - 0
pages/goods/goods-supporting.vue

@@ -640,11 +640,13 @@ export default {
 			return false
 		},
 		handleBtnConfirm(data){
+			this.handlePros.skuId = sku.skuId
 			this.handlePros.unit = data.unit
 			this.handlePros.number = data.number
 			console.log('handlePros',this.handlePros)
 		},
 		handleSkuClick(sku){
+			this.handlePros.skuId = sku.skuId
 			this.handlePros.unit = sku.unit
 			this.handlePros.number = sku.minBuyNumber
 			this.handlePros.price = sku.price

+ 11 - 159
pages/goods/product.vue

@@ -177,19 +177,19 @@
 						<view class="none-text">此商品已{{ goodsData.disabledText }},请浏览以下推荐商品~</view>
 					</view>
 					<!-- 选择规格 -->
-					<view class="product-parameter" v-if="isShowButton" @click="showPopup(3)">
+					<view class="product-parameter" v-if="isShowButton || userIdentity === 1" @click="showPopup(3)">
 						<text class="title">选择:</text> <text class="name">共{{ skusCount }}种规格可选</text>
 						<text class="iconfont icon-xiayibu"></text>
 					</view>
 					<!-- 参数 -->
 					<view class="product-parameter" @click="showPopup(0)" v-if="!goodsData.isNoneDisabled">
-						<text class="title">参数:</text> <text class="name">品牌 起订量 分类...</text>
+						<text class="title">参数:</text> <text class="name">品牌 分类...</text>
 						<text class="iconfont icon-xiayibu"></text>
 					</view>
 					<!-- 配套商品 -->
 					<view
 						class="product-supporting"
-						v-if="isShowSupportingList && supportingList.length > 0"
+						v-if="!goodsData.isNoneDisabled && isShowSupportingList && supportingList.length > 0"
 						@click.stop="handleSupporting"
 					>
 						<view class="product-supporting-title">配套商品({{ supportingNum }})</view>
@@ -545,53 +545,6 @@
 						</view>
 					</view>
 				</view>
-				<!--底部选择模态层弹窗组件 -->
-				<tui-bottom-popup :radius="true" :show="popupShow3" @close="hidePopup(3)">
-					<view class="tui-popup-box clearfix">
-						<view class="tui-shopping-main" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
-							<view class="layer-smimg"> <image :src="product.mainImage" mode=""></image> </view>
-							<view class="layer-nunbox">
-								<view class="layer-nunbox-t" v-if="product.step === 2">
-									<view class="text">*该商品只能以起订量的整数倍购买</view>
-								</view>
-								<view class="layer-nunbox-t">
-									<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)"
-										/>
-										<view
-											class="iconfont icon-jiahao"
-											:class="[isStock == true ? 'disabled' : '']"
-											@click="changeCountAdd()"
-										></view>
-									</view>
-								</view>
-								<view class="layer-nunbox-b">
-									<view class="text"
-										>单价: <text class="p sm">¥</text>
-										<text class="p bg">{{ buyRetailPrice.toFixed(2) }}</text>
-									</view>
-								</view>
-							</view>
-						</view>
-						<view
-							class="tui-right-flex tui-popup-btn"
-							:style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }"
-						>
-							<view class="tui-flex-1"> <view class="tui-button" @click="btnConfirm">确定</view> </view>
-						</view>
-					</view>
-				</tui-bottom-popup>
 				<!-- 侧边 -->
 				<scroll-top :isScrollTop="isScrollTop" :bottom="200" v-show="tabCurrentIndex !== 3"></scroll-top>
 			</view>
@@ -922,7 +875,6 @@ export default {
 					this.ladderPriceFlag = this.product.ladderPriceFlag
 					this.html = this.adaptRichTextImg(this.product)
 					this.stock = this.product.stock
-					this.buyRetailPriceStep = this.product.step
 					this.number = this.product.minBuyNumber
 					this.minBuyNumber = this.product.minBuyNumber
 
@@ -937,10 +889,9 @@ export default {
 					//拆分金额并转千分位格式显示
 					if (this.product.price != null) {
 						this.retailPrice = this.product.price.toFixed(2)
-						this.buyRetailPrice = this.product.price
 					}
 					//处理下架商品和售罄商品
-					if (this.product.validFlag == 3 || this.stock == 0) {
+					if (this.product.validFlag == 3 || this.product.saleOutFlag === 1) {
 						this.isNoneDisabled = true
 						this.disabled = true
 					} else {
@@ -975,7 +926,7 @@ export default {
 					if (this.product.validFlag == 10) {
 						this.goodsData.disabledText = '停售'
 					}
-					if (this.stock == 0) {
+					if (this.product.saleOutFlag === 1) {
 						this.goodsData.disabledText = '售罄'
 					}
 					console.log(this.disabled)
@@ -1317,116 +1268,13 @@ export default {
 		btnGetConfirm(type) {
 			//加入购物车&&立即购买点击
 			if (this.hasLogin) {
-				switch (type) {
-					case 'add':
-						// 友盟埋点商品详情加入购物车点击事件
-						if (process.env.NODE_ENV != 'development') {
-							this.$uma.trackEvent('Um_Event_ProductAddCart', {
-								Um_Key_PageName: '加入购物车',
-								Um_Key_SourcePage: '商品详情',
-								Um_Key_ProductID: `${this.product.productId}`
-							})
-						}
-						if (this.ladderPriceFlag) {
-							this.processActivityPrice()
-						}
-						break
-					case 'buy':
-						// 友盟埋点商品详情立即购买点击事件
-						if (process.env.NODE_ENV != 'development') {
-							this.$uma.trackEvent('Um_Event_ProductBuyConfirm', {
-								Um_Key_PageName: '立即购买',
-								Um_Key_SourcePage: '商品详情',
-								Um_Key_ProductID: `${this.product.productId}`
-							})
-						}
-						break
-				}
-				this.isBtnType = type
+				this.btnType = type
 				this.popupShow3 = true
+				this.unitPopupType = 1
 			} else {
 				this.$api.navigateTo('/pages/login/login?type=1')
 			}
 		},
-		//popup弹窗数量增加按钮
-		changeCountAdd() {
-			if (this.buyRetailPriceStep == 2) {
-				this.number += this.minBuyNumber
-			} else {
-				this.number++
-			}
-			this.processActivityPrice()
-		},
-		//popup弹窗数量减按钮
-		changeCountSub() {
-			if (this.number <= this.minBuyNumber) {
-				this.number = this.minBuyNumber
-				this.isQuantity = true
-				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
-				return
-			} else {
-				if (this.buyRetailPriceStep == 2) {
-					this.number -= this.minBuyNumber
-				} else {
-					this.number--
-				}
-				this.processActivityPrice()
-				this.isQuantity = false
-			}
-		},
-		changeNumber(e) {
-			let _value = e.detail.value
-			if (!this.$api.isNumber(_value)) {
-				this.number = this.minBuyNumber
-			} else if (_value < this.minBuyNumber) {
-				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
-				this.number = this.minBuyNumber
-			} else if (_value % this.minBuyNumber != 0) {
-				this.$util.msg('购买量必须为起订量的整数倍', 2000)
-				this.number = this.minBuyNumber
-			} else {
-				this.number = e.detail.value
-			}
-			this.processActivityPrice()
-		},
-		processActivityPrice() {
-			//单独处理活动价格和阶梯价格
-			if ((this.ladderPriceFlag == '0' && this.product.actStatus == 0) || this.product.actStatus == 1) {
-				this.buyRetailPrice = this.product.price
-			} else {
-				this.ladderPriceList.forEach((item, index) => {
-					if (this.number >= item.buyNum) {
-						this.buyRetailPrice = item.buyPrice
-					}
-				})
-			}
-		},
-		btnConfirm() {
-			//加入购物车&&立即购买跳转订单页并关闭弹窗
-			// 友盟埋点商品详情确认购买商品点击事件
-			if (process.env.NODE_ENV != 'development') {
-				this.$uma.trackEvent('Um_Event_ProductShoppingConfirm', {
-					Um_Key_PageName: '商品购买确认',
-					Um_Key_SourcePage: '商品详情',
-					Um_Key_ProductID: `${this.product.productId}`
-				})
-			}
-			if (this.isBtnType == 'add') {
-				this.getAddProductCart()
-				this.popupShow3 = false
-			} else {
-				this.toConfirmation()
-			}
-		},
-		toConfirmation() {
-			//跳转确认订单页面
-			let productStp = {
-				productIds: this.product.productId,
-				productCount: this.number
-			}
-			this.$api.navigateTo(`/pages/user/order/create-order?type=1&data=${JSON.stringify({ data: productStp })}`)
-			this.popupShow3 = false
-		},
 		getAddProductCart() {
 			//增加购物车成功和toast弹窗提示成功
 			this.ProductService.shoppingAddCart({
@@ -1526,6 +1374,10 @@ export default {
 						this.$api.navigateTo('/pages/login/login')
 					}
 					break
+				case 3:
+					this.popupShow3 = true
+					this.unitPopupType = 2
+					break
 			}
 		},
 		hidePopup(index) {

+ 192 - 92
pages/seller/cart/cart.vue

@@ -63,7 +63,7 @@
 												<view class="cart-sku-temp" @click.stop="handleShouUnitPopup(pros)">
 													<view class="cart-sku-text">重新选择商品规格</view>
 													<view class="cart-sku-btn">重选</view>
-												</view>	
+												</view>
 											</template>
 											<template v-else>
 												<view class="productprice">
@@ -79,7 +79,8 @@
 													>
 														<text>¥</text>
 														{{
-															(PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+															(PromotionsFormat(pros.promotions) ||
+															pros.svipProductFlag == 1
 																? pros.originalPrice
 																: pros.price) | NumFormat
 														}}
@@ -119,7 +120,9 @@
 														>
 															{{ pros.promotions.name }}
 															<text
-																v-if="pros.promotions != null && pros.promotions.type != 3"
+																v-if="
+																	pros.promotions != null && pros.promotions.type != 3
+																"
 															>
 																:¥{{
 																	pros.promotions == null
@@ -143,7 +146,9 @@
 													</template>
 													<template v-if="pros.svipProductFlag == 1">
 														<view class="svip-tags">
-															<view class="tags" :class="{ none: vipFlag != 1 }">SVIP</view>
+															<view class="tags" :class="{ none: vipFlag != 1 }"
+																>SVIP</view
+															>
 															<view class="price" v-if="isShowVipFlag(pros)">{{
 																pros.svipPriceTag
 															}}</view>
@@ -262,24 +267,24 @@
 		</view>
 		<!-- 选择规格弹窗 -->
 		<cm-unit-popup
-			v-if="popupShow1"
-			:popupShow="popupShow1"
+			v-if="popupShow"
+			:popupShow="popupShow"
 			:skuProduct="handlePros"
 			@skuBtnConfirm="handleBtnConfirm"
+			@handleFuction="handleFuctionData"
 		></cm-unit-popup>
 		<!-- 促销活动弹窗 -->
-		<activi-popup :product="handlerPros" :popupShow="popupShow"></activi-popup>
+		<activi-popup :product="handlerPros" :popupShow="popupShow1"></activi-popup>
 		<!-- 透明模态层 -->
 		<modal-layer v-if="modallayer"></modal-layer>
-		
 	</view>
 </template>
 <script>
 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 activiPopup from './components/cm-activipopu'
 import modalLayer from '@/components/modal-layer'
-import cmUnitPopup from './components/cm-unit-popup.vue'
+import cmUnitPopup from './components/cm-unit-cart-popup'
 import cartMixins from './mixins/cartMixins.js'
 import apisMixins from './mixins/apisMixins.js'
 import { mapState, mapMutations } from 'vuex'
@@ -291,7 +296,7 @@ const defaultListQuery = {
 	pageSize: 10 // 条数
 }
 export default {
-	mixins: [apisMixins,cartMixins],
+	mixins: [apisMixins, cartMixins],
 	components: {
 		tuiLoadmore,
 		tuiNomore,
@@ -305,7 +310,7 @@ export default {
 			isStock: '',
 			popupShow: false,
 			popupShow1: false,
-			handlePros:{},
+			handlePros: {},
 			listQuery: Object.assign({}, defaultListQuery), // 购物车立即结算确认订单参数
 			handlerPros: {}, //监听单挑促销商品
 			promotionsList: [], //促销活动列表
@@ -330,13 +335,13 @@ export default {
 			pullUpOn: true,
 			pullFlag: true,
 			submitIds: [],
-			checkenProsList:[],
+			checkenProsList: [],
 			depositIds: [6060, 6061, 6062, 6063, 6064], //定金商品ID
 			rechargeIds: [6065, 6066, 6067, 6068, 6069], //充值余额商品ID
 			isIphoneX: this.$store.state.isIphoneX,
 			vipFlag: 0,
 			userIdentity: 0,
-			isCheckedProductStatus:false,
+			isCheckedProductStatus: false
 		}
 	},
 	onLoad() {
@@ -388,7 +393,7 @@ export default {
 		},
 		clickPopupShow(pros, type) {
 			//显示活动弹窗
-			this.popupShow = true
+			this.popupShow1 = true
 			this.handlerPros = pros
 		},
 		failureToProduct(failure) {
@@ -446,12 +451,18 @@ export default {
 					if (dataPage.list && dataPage.list.length > 0) {
 						this.hasNextPage = dataPage.hasNextPage
 						this.goodsList = dataPage.list
-						this.goodsList.forEach((item, index) => {
-							let cartListLength = item.cartList.length,
+						this.goodsList.forEach((supplier, index) => {
+							let cartListLength = supplier.cartList.length,
 								invalidLength = 0
-							item.cartList.forEach(pros => {
-								pros.shopId = item.shopId
+							supplier.cartList.forEach(pros => {
+								pros.shopId = supplier.shopId
 								pros.isStep = false
+								if (pros.stock === 0 || pros.number > pros.stock) {
+									supplier.isDisable = true
+									pros.isDisable = true
+								} else {
+									pros.isDisable = false
+								}
 								if (pros.step === 2) {
 									if (pros.number % pros.min != 0) {
 										pros.number = pros.min
@@ -516,11 +527,11 @@ export default {
 						supplier.cartList.forEach(pros => {
 							pros.shopId = supplier.shopId
 							pros.isStep = false
-							if(pros.stock === 0 || pros.number > pros.stock ){
-							    supplier.isDisable = true
-							    pros.isDisable = true
-							}else{
-							    pros.isDisable = false
+							if (pros.stock === 0 || pros.number > pros.stock) {
+								supplier.isDisable = true
+								pros.isDisable = true
+							} else {
+								pros.isDisable = false
 							}
 							if (pros.step === 2) {
 								if (pros.number % pros.min != 0) {
@@ -558,13 +569,16 @@ export default {
 				this.kindCount = response.data
 			})
 		},
-		handleCheckFailure(failure) {//  选择失效商品
+		handleCheckFailure(failure) {
+			//  选择失效商品
 			failure.isChecked = !failure.isChecked
 			this.updateCheckAllBtn()
 		},
 		handlsCkecdPros(item, pro) {
 			//为未选中的时候改变为true,反之为true
-			if(pro.isDisable){ return }
+			if (!this.isshowDelbtn) {
+				if (pro.isDisable) { return }
+			}
 			pro.isChecked = !pro.isChecked
 			if (pro.isChecked) {
 				if (!this.submitIds.includes(pro.skuId * 1)) {
@@ -616,25 +630,46 @@ export default {
 		},
 		handleCheckShop(supplier) {
 			//与单选商品类似
-			if(supplier.isDisable){ return }
+			if (!this.isshowDelbtn) {
+				if (supplier.isDisable) {
+					return
+				}
+			}
 			supplier.isChecked = !supplier.isChecked
 			this.setProductChecked(supplier)
 			this.updateCheckAllBtn()
 		},
 		setProductChecked(supplier) {
 			supplier.cartList.forEach(pros => {
-				if (supplier.isChecked && (pros.stock !== 0 || pros.number < pros.stock)) {
-					pros.isChecked = true
-					if (!this.submitIds.includes(pros.skuId * 1)) {
-						this.submitIds.push(pros.skuId)
-						this.checkenProsList.push(pros)
+				if (this.isshowDelbtn) {
+					if (supplier.isChecked) {
+						pros.isChecked = true
+						if (!this.submitIds.includes(pros.skuId * 1)) {
+							this.submitIds.push(pros.skuId)
+							this.checkenProsList.push(pros)
+						}
+					} else {
+						pros.isChecked = false
+						let lent = this.submitIds.indexOf(pros.skuId * 1)
+						if (lent >= 0) {
+							this.submitIds.splice(lent, 1)
+							this.checkenProsList.splice(lent, 1)
+						}
 					}
 				} else {
-					pros.isChecked = false
-					let lent = this.submitIds.indexOf(pros.skuId * 1)
-					if (lent >= 0) {
-						this.submitIds.splice(lent, 1)
-						this.checkenProsList.splice(lent, 1)
+					if (supplier.isChecked && (pros.stock !== 0 || pros.number < pros.stock)) {
+						pros.isChecked = true
+						if (!this.submitIds.includes(pros.skuId * 1)) {
+							this.submitIds.push(pros.skuId)
+							this.checkenProsList.push(pros)
+						}
+					} else {
+						pros.isChecked = false
+						let lent = this.submitIds.indexOf(pros.skuId * 1)
+						if (lent >= 0) {
+							this.submitIds.splice(lent, 1)
+							this.checkenProsList.splice(lent, 1)
+						}
 					}
 				}
 			})
@@ -646,9 +681,17 @@ export default {
 					supplier.isChecked = this.isCheckAll
 					this.setProductChecked(supplier)
 				})
+				//删除按钮 全选包括失效商品勾选
+				this.failureList.forEach(failureItem => {
+					failureItem.isChecked = this.isCheckAll
+				})
 			} else {
 				this.goodsList.forEach(supplier => {
-					supplier.isChecked = this.isCheckAll
+					if(supplier.isDisable){
+						supplier.isChecked = false
+					}else{
+						supplier.isChecked = this.isCheckAll && !supplier.isDisabled
+					}
 					this.setProductChecked(supplier)
 				})
 			}
@@ -665,27 +708,30 @@ export default {
 			this.goodsList.map((item, index) => {
 				//计算店铺满减后店铺合计
 				if (item.promotions && item.promotions.mode == 2) {
-					let prosPrice = 0	// 店铺价格合计
+					let prosPrice = 0 // 店铺价格合计
 					let prosDiscountNum = 0 // 店铺促销叠加次数
 					let totalOriginalPrice = 0 //店铺原价合计
 					item.cartList.forEach(pros => {
 						prosPrice += pros.price * pros.number
 						totalOriginalPrice += pros.price * pros.number
 					})
-					if(item.promotions.discount == 1){// 支持促销叠加条件的店铺满减 执行
-						prosDiscountNum = parseInt(prosPrice/item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
-						console.log('店铺满减促销叠加通道叠加次数',`${prosDiscountNum}次`)
-						if (prosPrice >= item.promotions.touchPrice) {// 满足店铺满减条件下执行
-							item.totalPrice = prosPrice - item.promotions.reducedPrice*prosDiscountNum
-							item.reducedPrice = item.promotions.reducedPrice*prosDiscountNum
+					if (item.promotions.discount == 1) {
+						// 支持促销叠加条件的店铺满减 执行
+						prosDiscountNum = parseInt(prosPrice / item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
+						console.log('店铺满减促销叠加通道叠加次数', `${prosDiscountNum}次`)
+						if (prosPrice >= item.promotions.touchPrice) {
+							// 满足店铺满减条件下执行
+							item.totalPrice = prosPrice - item.promotions.reducedPrice * prosDiscountNum
+							item.reducedPrice = item.promotions.reducedPrice * prosDiscountNum
 							item.totalOriginalPrice = totalOriginalPrice
 						} else {
 							item.reducedPrice = 0 //统计合计价格
 							item.totalPrice = prosPrice
 						}
-					}else{
+					} else {
 						console.log('店铺满减非促销叠加通道')
-						if (prosPrice >= item.promotions.touchPrice) {// 满足店铺满减条件下执行
+						if (prosPrice >= item.promotions.touchPrice) {
+							// 满足店铺满减条件下执行
 							item.totalPrice = prosPrice - item.promotions.reducedPrice
 							item.reducedPrice = item.promotions.reducedPrice
 							item.totalOriginalPrice = totalOriginalPrice
@@ -704,15 +750,15 @@ export default {
 						let _price = pros.price * pros.number
 						_totalOriginalPrice += pros.price * pros.number
 						if (pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2) {
-							if(pros.promotions.discount == 1){
-								discountNum = parseInt(_price/pros.promotions.touchPrice)
-								console.log('单品满减促销叠加通道叠加次数',`${discountNum}次`)
+							if (pros.promotions.discount == 1) {
+								discountNum = parseInt(_price / pros.promotions.touchPrice)
+								console.log('单品满减促销叠加通道叠加次数', `${discountNum}次`)
 								if (_price >= pros.promotions.touchPrice) {
-									_price = _price - pros.promotions.reducedPrice*discountNum
-									_reducedPrice += pros.promotions.reducedPrice*discountNum
+									_price = _price - pros.promotions.reducedPrice * discountNum
+									_reducedPrice += pros.promotions.reducedPrice * discountNum
 								}
 								_totalPrice += _price
-							}else{
+							} else {
 								console.log('单品满减非促销叠加通道')
 								if (_price >= pros.promotions.touchPrice) {
 									_price = _price - pros.promotions.reducedPrice
@@ -750,18 +796,18 @@ export default {
 						if (pros.promotions && pros.promotions.type * 1 === 1 && pros.promotions.mode * 1 === 2) {
 							// 单品满减-重新计算供应商总价/满减金额
 							let _price = pros.price * pros.number
-							if(pros.promotions.discount == 1){
-								let discountNum = parseInt(_price/pros.promotions.touchPrice)
-								console.log('单品满减促销叠加通道叠加次数',`${discountNum}次`)
+							if (pros.promotions.discount == 1) {
+								let discountNum = parseInt(_price / pros.promotions.touchPrice)
+								console.log('单品满减促销叠加通道叠加次数', `${discountNum}次`)
 								// 单品满减-重新计算供应商总价/满减金额
-								if ( _price >= pros.promotions.touchPrice) {
-									supplierPrice -= pros.promotions.reducedPrice*discountNum
-									supplierReducedPrice += pros.promotions.reducedPrice*discountNum
+								if (_price >= pros.promotions.touchPrice) {
+									supplierPrice -= pros.promotions.reducedPrice * discountNum
+									supplierReducedPrice += pros.promotions.reducedPrice * discountNum
 								}
-							}else{
+							} else {
 								console.log('非促销叠加通道')
 								// 单品满减-重新计算供应商总价/满减金额
-								if ( _price >= pros.promotions.touchPrice) {
+								if (_price >= pros.promotions.touchPrice) {
 									supplierPrice -= pros.promotions.reducedPrice
 									supplierReducedPrice += pros.promotions.reducedPrice
 								}
@@ -772,14 +818,15 @@ export default {
 				// 店铺满减
 				if (item.promotions && item.promotions.mode * 1 === 2) {
 					// 店铺满减-计算供应商总价/满减金额
-					if(item.promotions.discount == 1){// 支持促销叠加条件的店铺满减 执行
-						let prosDiscountNum = parseInt(supplierPrice/item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
-						console.log('店铺满减促销叠加通道叠加次数',`${prosDiscountNum}次`)
+					if (item.promotions.discount == 1) {
+						// 支持促销叠加条件的店铺满减 执行
+						let prosDiscountNum = parseInt(supplierPrice / item.promotions.touchPrice) // 店铺满减促销叠加次数 = 店铺合计价格/满减促销价格
+						console.log('店铺满减促销叠加通道叠加次数', `${prosDiscountNum}次`)
 						if (supplierPrice >= item.promotions.touchPrice) {
-							supplierPrice -= item.promotions.reducedPrice*prosDiscountNum
-							supplierReducedPrice += item.promotions.reducedPrice*prosDiscountNum
+							supplierPrice -= item.promotions.reducedPrice * prosDiscountNum
+							supplierReducedPrice += item.promotions.reducedPrice * prosDiscountNum
 						}
-					}else{
+					} else {
 						console.log('店铺满减非促销叠加通道')
 						// 店铺满减-计算供应商总价/满减金额
 						if (supplierPrice >= item.promotions.touchPrice) {
@@ -794,10 +841,10 @@ export default {
 				totalPrice += item.totalprice
 				reducedPrice += item.reducedprice
 				originalPrice += item.originalprice
-				console.log('totalPrice',totalPrice)
-				console.log('originalPrice',originalPrice)
+				console.log('totalPrice', totalPrice)
+				console.log('originalPrice', originalPrice)
 			})
-			if(this.isCheckedProductStatus){
+			if (this.isCheckedProductStatus) {
 				// 总促销计算
 				this.promotionsList.forEach(promotions => {
 					// 凑单满减
@@ -807,15 +854,16 @@ export default {
 						promotions.productList.forEach(pros => {
 							collecTotal += this.collecTotalPrice(pros)
 						})
-						if(promotions.discount == 1){// 支持凑单满减促销叠加条件的执行
-							collecDiscountNum += parseInt(collecTotal/promotions.touchPrice) // 凑单满减促销叠加次数 = 凑单商品合计价格/凑单满减促销价格
-							console.log('凑单促销满减叠加通道叠加次数',`${collecDiscountNum}次`)
+						if (promotions.discount == 1) {
+							// 支持凑单满减促销叠加条件的执行
+							collecDiscountNum += parseInt(collecTotal / promotions.touchPrice) // 凑单满减促销叠加次数 = 凑单商品合计价格/凑单满减促销价格
+							console.log('凑单促销满减叠加通道叠加次数', `${collecDiscountNum}次`)
 							if (collecTotal >= promotions.touchPrice) {
-								totalPrice -= promotions.reducedPrice*collecDiscountNum
-								reducedPrice += promotions.reducedPrice*collecDiscountNum
+								totalPrice -= promotions.reducedPrice * collecDiscountNum
+								reducedPrice += promotions.reducedPrice * collecDiscountNum
 							}
-						}else{  
-							console.log('凑单促销满减非叠加通道') 
+						} else {
+							console.log('凑单促销满减非叠加通道')
 							if (collecTotal >= promotions.touchPrice) {
 								totalPrice -= promotions.reducedPrice
 								reducedPrice += promotions.reducedPrice
@@ -831,10 +879,11 @@ export default {
 				this.allPrice = totalPrice
 			}
 		},
-		collecTotalPrice(pros){// 凑单满减计算勾选的凑单商品总价
-			let price 
+		collecTotalPrice(pros) {
+			// 凑单满减计算勾选的凑单商品总价
+			let price
 			this.checkenProsList.find(el => {
-				if(pros.productId == el.productId ){
+				if (pros.productId == el.productId) {
 					price = el.number * el.price
 				}
 			})
@@ -922,9 +971,32 @@ export default {
 				})
 			}
 		},
+		setCartisDisable(){// 删除取消设置不能选的商品
+			this.goodsList = this.goodsList.map(suppler=>{
+				suppler.isDisable = false
+				suppler.cartList.forEach(pros => {
+					pros.isDisable = false
+				})
+				return suppler
+			})
+		},
+		clearCartisDisable(){// 取消删除设置不能选的商品
+			this.goodsList = this.goodsList.map((supplier) => {
+				supplier.cartList.forEach(pros => {
+					if(pros.stock === 0 || pros.number > pros.stock ){
+					    supplier.isDisable = true
+					    pros.isDisable = true
+					}else{
+					    pros.isDisable = false
+					}
+				})
+				return supplier
+			})
+		},
 		showDelManager() {
 			//显示删除商品管理
 			this.isshowDelbtn = true
+			this.setCartisDisable()
 			if (this.isCheckAll) {
 				this.updateBothCheckBtn()
 			} else {
@@ -934,11 +1006,15 @@ export default {
 		hideDelManage() {
 			//隐藏删除商品管理
 			this.isshowDelbtn = false
-			if (this.isCheckAll) {
-				this.updateBothCheckBtn()
-			} else {
-				this.updateCheckAllBtn()
-			}
+			this.isCheckAll = false
+			this.clearCartisDisable()
+			this.goodsList = this.goodsList.map(suppler=>{
+				suppler.isChecked = false
+				suppler.cartList.forEach(pros => {
+						pros.isChecked = false
+				})
+				return suppler
+			})
 		},
 		goNavto(url) {
 			uni.navigateTo({
@@ -969,10 +1045,11 @@ export default {
 				}
 			}
 		},
-		handleShouUnitPopup(pros){// 规格弹窗
-			this.popupShow1 = true
+		handleShouUnitPopup(pros) {
+			// 规格弹窗
+			this.popupShow = true
 			this.handlePros = pros
-		},
+		}
 	},
 	onReachBottom() {
 		if (this.hasNextPage) {
@@ -998,7 +1075,7 @@ page {
 }
 .cart-content {
 	position: relative;
-	padding-bottom: 74rpx;
+	padding-bottom: 100rpx;
 }
 .container-cart-main.none {
 	display: none;
@@ -1176,16 +1253,16 @@ page {
 				height: 210rpx;
 				border-radius: 10rpx;
 			}
-			.pros-type{
+			.pros-type {
 				width: 64rpx;
 				height: 64rpx;
 				text-align: justify;
 				box-sizing: border-box;
 				padding: 10rpx;
 				border-radius: 0 0 8rpx 8rpx;
-				background-color: #33CCBF;
+				background-color: #33ccbf;
 				font-size: $font-size-22;
-				color: #FFFFFF;
+				color: #ffffff;
 				line-height: 25rpx;
 				position: absolute;
 				top: 0;
@@ -1293,6 +1370,29 @@ page {
 		.productCode {
 			color: #666666;
 		}
+		.cart-sku-temp {
+			width: 100%;
+			height: 48rpx;
+			margin: 30rpx 0 0 0;
+			.cart-sku-text {
+				font-size: 28rpx;
+				line-height: 48rpx;
+				color: #666666;
+				float: left;
+			}
+			.cart-sku-btn {
+				padding: 0 16rpx;
+				text-align: center;
+				line-height: 40rpx;
+				font-size: 24rpx;
+				box-sizing: border-box;
+				border: 1px solid #e15616;
+				color: #e15616;
+				float: left;
+				border-radius: 20rpx;
+				margin-left: 16rpx;
+			}
+		}
 		.productprice {
 			width: 100%;
 			height: 48rpx;

+ 263 - 0
pages/seller/cart/components/cm-activipopu.vue

@@ -0,0 +1,263 @@
+<template name="cm-price">
+	<!--促销活动弹窗提示-->
+	<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
+		<view class="tui-popup-box clearfix">
+			<template v-if="product.actStatus == null  &&  product.ladderFlag == 1">
+				<view class="tui-scrollview-box">
+					<view class="ladder-main clearfix">
+						<view class="ladder-item">
+							<view class="ladder-item-td">起订量</view>
+							<view class="ladder-item-td">价格</view>
+						</view>
+						<view class="ladder-item" v-for="(ladd, index) in product.ladderPrices" :key="index">
+							<view class="ladder-item-td">{{ ladd.numRange }}</view>
+							<view class="ladder-item-td">{{ ladd.buyPrice | NumFormat }}</view>
+						</view>
+					</view>
+				</view>	
+			</template>	
+			<template v-else>
+				<view class="tui-scrollview-box">
+					<view class="box-text">
+						<text>促销时间:</text>
+						<text class="txt" v-if="product.promotions.status == 1">不限时</text>
+						<text class="txt" v-else>{{ product.promotions.beginTime }} ~ {{ product.promotions.endTime }}</text>
+					</view>
+					<view class="box-title" v-show="product.promotions.mode ==2">
+						<text>购买{{product.promotions.name}}商品,满</text>
+						<text class="txt">¥{{product.promotions == null ? '0.00' : product.promotions.touchPrice | NumFormat}}</text>减
+						<text class="txt">¥{{product.promotions == null ? '0.00' : product.promotions.reducedPrice | NumFormat}}</text>
+					</view>
+					<view class="box-title" v-show="product.promotions.mode==3">
+						<text>购买{{product.promotions.name}}商品,满</text>
+						<text class="txt">¥{{product.promotions.touchPrice}}</text>赠送商品
+					</view>
+					<view class="box-product" v-show="product.promotions.mode==3">
+						<view class="box-product-main"  v-for="(item, index) in product.promotions.giftList" :key="index">
+							<view class="image"><image :src="item.image" mode=""></image></view>
+							<view class="info">
+								<view class="name">{{ item.name }}</view>
+								<view class="num">X{{ item.number }}</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</template>
+			<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
+				<view class="tui-flex-1">
+					<view class="tui-button" v-if="product.promotions.type == 2" @click="goGoodActiveFn(product.promotions.id)">更多凑单商品</view>
+					<view class="tui-button" v-else @click="hidePopup()">了解</view>
+				</view>
+			</view>
+		</view>	
+	</tui-bottom-popup>
+</template>
+
+<script>
+	import { mapState,mapMutations } from 'vuex'
+	export default{
+		name:'cm-price',
+		props:{
+			product:{
+				type:Object,
+			},
+			popupShow:{
+				type:Boolean,
+				default:false
+			}
+		},
+		data() {
+			return{
+				isIphoneX:this.$store.state.isIphoneX,
+			}
+		},
+		filters: {
+			NumFormat:function(text) {//处理金额
+				return Number(text).toFixed(2);
+			},
+		},
+		created() {
+			console.log(this.product)
+		},
+		computed: {
+			...mapState(['hasLogin','isWxAuthorize'])
+		},
+		methods:{
+			hidePopup(){
+				this.$parent.popupShow1 = false
+			},
+			goGoodActiveFn(id){
+				this.$parent.popupShow1 = false
+				this.$api.navigateTo('/pages/goods/goods-active?id='+id)
+			}
+		},
+		
+	}
+</script>
+
+<style lang="scss">	
+	.tui-flex-1 {
+		flex: 1;
+	}
+	.tui-popup-box {
+		position: relative;
+		box-sizing: border-box;
+		min-height: 220rpx;
+		padding:24rpx 24rpx 0 24rpx;
+	}
+	.tui-scrollview-box{
+		width: 100%;
+		height: auto;
+		float: left;
+		box-sizing: border-box;
+		.ladder-main{
+			width: 100%;
+			min-height: 240rpx;
+			border: 1px solid rgba(225,86,22,0.3);
+			border-radius: 10rpx;
+			.ladder-item{
+				width: 100%;
+				height: 80rpx;
+				float: left;
+				border-bottom: 1px solid rgba(225,86,22,0.3);
+				&:nth-child(1){
+					.ladder-item-td{
+						color: #333333;
+					}
+				}
+				&:last-child{
+					border-bottom: none;
+				}
+				.ladder-item-td{
+					width:50%;
+					text-align: center;
+					line-height: 80rpx;
+					font-size: $font-size-24;
+					color: $color-system;
+					box-sizing: border-box;
+					float: left;
+					&:nth-child(1){
+						border-right: 1px solid rgba(225,86,22,0.3);
+					}
+				}
+			}
+		}
+		.box-title{
+			font-size: $font-size-26;
+			color: $text-color;
+			text-align: left;
+			line-height: 56rpx;
+			.txt{
+				color: $color-system;
+				margin: 0 8rpx;
+			}
+		}
+		.box-text{
+			font-size: $font-size-26;
+			color: $text-color;
+			text-align: left;
+			line-height: 56rpx;
+			.txt{
+				color: $color-system;
+			}
+		}
+		.box-product{
+			width: 100%;
+			height: auto;
+			margin-top: 20rpx;
+			.title{
+				font-size: $font-size-24;
+				color: $text-color;
+				text-align: left;
+				line-height: 54rpx;
+			}
+			.box-product-main{
+				width: 100%;
+				height: 136rpx;
+				float: left;
+				margin: 10rpx 0;
+				.image{
+					width: 134rpx;
+					height: 134rpx;
+					border: 1px solid #EBEBEB;
+					float: left;
+					image{
+						width: 100%;
+						height: 100%;
+						display: block;
+					}
+				}
+				.info{
+					width: 540rpx;
+					height: 134rpx;
+					float: left;
+					margin-left: 16rpx;
+					position: relative;
+					.name{
+						width: 100%;
+						float: left;
+						line-height: 40rpx;
+						font-size: $font-size-28;
+						color: $text-color;
+						-o-text-overflow: ellipsis;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						word-break: break-all;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 2;
+						overflow: hidden;
+					}
+					.num{
+						width: 100%;
+						height: 44rpx;
+						font-size: $font-size-24;
+						color: $text-color;
+						text-align: left;
+						line-height: 44rpx;
+						position: absolute;
+						bottom: 0;
+						left: 0;
+					}
+				}
+			}
+		}
+	}
+	
+	.tui-popup-btn {
+		width: 100%;
+		height: auto;
+		float: left;
+		margin-top: 24rpx;
+		.tui-button{
+			width: 100%;
+			height: 88rpx;
+			background: $btn-confirm;
+			line-height: 88rpx;
+			text-align: center;
+			color: #FFFFFF;
+			font-size: $font-size-28;
+			border-radius: 44rpx;
+		}
+	}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 464 - 0
pages/seller/cart/components/cm-unit-cart-popup.vue

@@ -0,0 +1,464 @@
+<template name="cm-parameter">
+	<!-- 相关规格 -->
+	<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup">
+		<view class="tui-popup-box clearfix">
+			<view class="tui-shopping-main" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+				<view class="tui-sku-title">
+					<view class="tui-sku-image"> <image :src="skuProduct.image" mode=""></image> </view>
+					<view class="tui-sku-price">
+						<view class="sku-price-viw">
+							<view
+								class="sku-price-text"
+								:class="
+									PromotionsFormat(skuProduct.promotions) || skuProduct.svipProductFlag == 1
+										? 'none'
+										: ''
+								"
+							>
+								¥{{
+									(PromotionsFormat(skuProduct.promotions) || skuProduct.svipProductFlag == 1
+										? skuProduct.originalPrice
+										: skuProduct.price) | NumFormat
+								}}
+							</view>
+						</view>
+						<view class="sku-price-vip">
+							<view class="floor-item-act">
+								<view class="coupon-tags" v-if="skuProduct.couponsLogo">优惠券</view>
+								<template v-if="skuProduct.actStatus == 1 && skuProduct.promotions">
+									<view v-if="PromotionsFormat(skuProduct.promotions)" class="floor-tags">
+										{{ skuProduct.promotions.name }}
+										<text v-if="skuProduct.promotions != null && skuProduct.promotions.type != 3">
+											:¥{{
+												skuProduct.promotions == null
+													? '0.00'
+													: skuProduct.promotions.touchPrice | NumFormat
+											}}
+										</text>
+									</view>
+									<view v-else-if="skuProduct.promotions.type != 3" class="floor-tags">
+										{{ skuProduct.promotions.name }}
+									</view>
+								</template>
+								<template v-if="skuProduct.actStatus == null && skuProduct.ladderFlag == 1">
+									<view class="floor-tags">阶梯价格</view>
+								</template>
+								<template v-if="skuProduct.svipProductFlag == 1">
+									<view class="svip-tags">
+										<view class="tags">SVIP</view>
+										<view class="price">{{ skuProduct.svipPriceTag }}</view>
+									</view>
+								</template>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="tui-sku-unit">
+					<view class="sku-unit-h1">规格:</view>
+					<view class="sku-unit-li">
+						<view
+							class="unit-li"
+							v-for="(sku, index) in skuList"
+							@click="handleChoisSku(sku, index)"
+							:key="index"
+							:class="skuIndex === index ? 'active' : ''"
+						>
+							{{ sku.unit }} <text class="tips" v-if="sku.stock === 0">缺货</text>
+						</view>
+					</view>
+				</view>
+				<view class="sku-unit-nunbox">
+					<view class="sku-unit-nunbox" v-if="skuProduct.step === 2">
+						<view class="text">*该商品只能以起订量的整数倍购买</view>
+					</view>
+					<view class="sku-unit-nunbox-t">
+						<view class="sku-unit-nunbox-text">购买数量:</view>
+						<view class="sku-unit-nunbox-num">
+							<view class="number-box">
+								<view
+									class="iconfont icon-jianhao"
+									@click="changeCountSub"
+									:class="[isQuantity == true ? 'disabled' : '']"
+								></view>
+								<input
+									class="btn-input"
+									type="number"
+									v-model="productCount"
+									maxlength="4"
+									@blur="changeNumber($event)"
+								/>
+								<view
+									class="iconfont icon-jiahao"
+									@click="changeCountAdd"
+									:class="[isStock == true ? 'disabled' : '']"
+								></view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+				<view class="tui-modal-flex">
+					<button
+						class="tui-modal-button confirm"
+						:class="[isBtnDisabled ? 'disabled' : '']"
+						:disabled="isBtnDisabled"
+						@click="handleBuyConfirm"
+					>
+						加入购物车
+					</button>
+				</view>
+			</view>
+		</view>
+	</tui-bottom-popup>
+</template>
+
+<script>
+import { mapState, mapMutations } from 'vuex'
+export default {
+	name: 'cm-unit-popup',
+	props: {
+		skuProduct: {
+			type: Object
+		},
+		popupShow: {
+			type: Boolean,
+			default: false
+		},
+		type: {
+			type: Number,
+			default: 1
+		}
+	},
+	data() {
+		return {
+			skuIndex: 0,
+			userIdentity: 0,
+			productCount: 0,
+			isStock: false, //
+			isQuantity: false,
+			handleStock: 0, // 规格库存
+			handleMinNumber: 1, // 规格起订量
+			skuList: [],
+			addParams: {
+				serviceProviderId: 0, //协销Id
+				oldSkuId: 0,
+				newSkuId: 0,
+				clubId: 0,
+				productCount: 1
+			},
+			isBtnDisabled: false
+		}
+	},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			return Number(value).toFixed(2)
+		}
+	},
+	created() {
+		this.initData()
+	},
+	computed: {
+		...mapState(['hasLogin'])
+	},
+	methods: {
+		async initData(data) {
+			const clubInfo = await this.$api.getComStorage('orderUserInfo')
+			const userInfo = await this.$api.getStorage()
+			this.userIdentity = userInfo.userIdentity
+			this.skuList = this.skuProduct.skus
+			this.addParams.oldSkuId = this.skuProduct.skuId
+			this.addParams.newSkuId = this.skuList[0].skuId
+			this.isBtnDisabled = this.skuList[0].stock === 0
+			this.productCount = this.skuList[0].minBuyNumber
+			this.skuProduct.price = this.skuList[0].price
+			this.addParams.clubId = clubInfo.clubId ? clubInfo.clubId : 0
+			this.addParams.serviceProviderId = userInfo.serviceProviderId
+		},
+		PromotionsFormat(promo) {
+			//促销活动类型数据处理
+			if (promo != null) {
+				if (promo.type == 1 && promo.mode == 1) {
+					return true
+				} else {
+					return false
+				}
+			}
+			return false
+		},
+		//popup弹窗数量增加按钮
+		changeCountAdd() {
+			if (this.productCount === this.handleStock) {
+				this.isStock = true
+				return
+			}
+			if (this.skuProduct.step == 2) {
+				this.productCount += this.handleMinNumber
+			} else {
+				this.productCount++
+			}
+		},
+		//popup弹窗数量减按钮
+		changeCountSub() {
+			if (this.productCount <= this.handleMinNumber) {
+				this.productCount = this.handleMinNumber
+				this.isQuantity = true
+				this.$util.msg(`该商品最小起订量为${this.handleMinNumber}`, 2000)
+				return
+			} else {
+				if (this.skuProduct.step == 2) {
+					this.productCount -= this.handleMinNumber
+				} else {
+					this.productCount--
+				}
+				this.isQuantity = false
+			}
+		},
+		changeNumber(e) {
+			let _value = e.detail.value
+			if (!this.$api.isNumber(_value)) {
+				this.productCount = this.handleMinNumber
+			} else if (_value < this.handleMinNumber) {
+				this.$util.msg(`该商品最小起订量为${this.handleMinNumber}`, 2000)
+				this.productCount = this.handleMinNumber
+			} else if (_value % this.handleMinNumber != 0) {
+				this.$util.msg('购买量必须为起订量的整数倍', 2000)
+				this.productCount = this.handleMinNumber
+			} else if (_value > this.handleStock) {
+				this.productCount = this.handleStock
+			} else {
+				this.productCount = e.detail.value
+			}
+		},
+		handleBuyConfirm() {
+			this.addParams.productCount = this.productCount
+			this.handleAddClubCart(this.addParams)
+		},
+		handleAddClubCart(params) {
+			//增加购物车成功和toast弹窗提示成功
+			this.SellerService.orderSellerCkeckSku(params)
+				.then(response => {
+					this.$parent.popupShow = false
+					this.$util.msg('加入购物车成功', 1500, true, 'success')
+					this.$parent.getClubProductNum()
+					this.$emit('handleFuction')
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		handleChoisSku(sku, index) {
+			// 选择SKU
+			this.skuIndex = index
+			this.productCount = this.addParams.productCount = this.handleMinNumber = sku.minBuyNumber
+			this.addParams.newSkuId = sku.skuId
+			this.handleStock = sku.stock
+			this.skuProduct.price = sku.price
+			this.skuProduct.originalPrice = sku.originalPrice
+			this.isBtnDisabled = sku.stock === 0
+			this.$emit('skuClick', sku)
+		},
+		hidePopup() {
+			this.$parent.popupShow = false
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.tui-popup-box {
+	padding: 40rpx 24rpx 0 24rpx;
+}
+.tui-shopping-main {
+	width: 100%;
+	.tui-sku-title {
+		width: 100%;
+		height: 136rpx;
+		float: left;
+		margin-bottom: 30rpx;
+		.tui-sku-image {
+			width: 138rpx;
+			height: 138rpx;
+			float: left;
+			border-radius: 8rpx;
+			margin-right: 30rpx;
+			box-sizing: border-box;
+			border: 1px dashed #e1e1e1;
+			image {
+				width: 134rpx;
+				height: 134rpx;
+				border-radius: 10rpx;
+			}
+		}
+		.tui-sku-price {
+			height: 136rpx;
+			float: left;
+			.sku-price-viw {
+				width: 100%;
+				height: 40rpx;
+				margin-bottom: 24rpx;
+				.sku-price-text {
+					font-size: 28rpx;
+					line-height: 40rpx;
+					color: #f94b4b;
+					font-weight: bold;
+					.sku-price-l {
+						float: left;
+						font-weight: normal;
+					}
+					&.none {
+						text-decoration: line-through;
+						color: #999999;
+						font-weight: normal;
+					}
+				}
+			}
+			.sku-price-vip {
+				width: 100%;
+				height: 40rpx;
+			}
+		}
+	}
+	.tui-sku-unit {
+		width: 100%;
+		height: auto;
+		float: left;
+		.sku-unit-h1 {
+			font-size: 28rpx;
+			line-height: 40rpx;
+			color: #333333;
+			font-weight: bold;
+		}
+		.sku-unit-li {
+			width: 100%;
+			height: auto;
+			.unit-li {
+				padding: 0 24rpx;
+				line-height: 48rpx;
+				text-align: center;
+				font-size: 24rpx;
+				color: #666666;
+				background: #f5f5f5;
+				float: left;
+				margin-right: 16rpx;
+				margin-top: 12rpx;
+				margin-bottom: 12rpx;
+				border-radius: 24rpx;
+				position: relative;
+				box-sizing: border-box;
+				border: 1px solid #f5f5f5;
+				&.active {
+					border-color: $color-system;
+					background: #fff1eb;
+					color: $color-system;
+					.tips {
+						background: #e15616;
+					}
+				}
+				.tips {
+					padding: 0 10rpx;
+					line-height: 32rpx;
+					text-align: center;
+					font-size: 22rpx;
+					color: #ffffff;
+					background: #cccccc;
+					float: left;
+					border-radius: 16rpx;
+					position: absolute;
+					right: -12rpx;
+					top: -15rpx;
+				}
+			}
+		}
+	}
+	.sku-unit-nunbox {
+		justify-content: space-between;
+		align-items: center;
+		width: 100%;
+		height: auto;
+		float: left;
+		margin-top: 30rpx;
+		.sku-unit-nunbox-t {
+			width: 100%;
+			height: 44rpx;
+			position: relative;
+			margin-bottom: 20rpx;
+			.text {
+				font-size: $font-size-24;
+				line-height: 48rpx;
+				color: #999999;
+			}
+			.sku-unit-nunbox-text {
+				line-height: 44rpx;
+				font-size: $font-size-28;
+				float: left;
+				font-weight: bold;
+			}
+			.sku-unit-nunbox-num {
+				float: right;
+				.number-box {
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					border: 2rpx solid #ffe6dc;
+					border-radius: 30rpx;
+					height: 48rpx;
+					margin-left: 20rpx;
+					.iconfont {
+						font-size: $font-size-24;
+						padding: 0 18rpx;
+						color: #999999;
+						text-align: center;
+						line-height: 48rpx;
+						font-weight: bold;
+						background: #fef6f3;
+						&.icon-jianhao {
+							border-radius: 30rpx 0 0 30rpx;
+						}
+						&.icon-jiahao {
+							border-radius: 0 30rpx 30rpx 0;
+						}
+					}
+					.btn-input {
+						width: 62rpx;
+						height: 48rpx;
+						line-height: 48rpx;
+						background: #ffffff;
+						border-radius: 4rpx;
+						text-align: center;
+						font-size: $font-size-28;
+					}
+				}
+			}
+		}
+	}
+}
+.tui-popup-btn {
+	width: 100%;
+	float: left;
+	.tui-modal-flex {
+		width: 100%;
+		height: 84rpx;
+		margin-top: 40rpx;
+		display: flex;
+		.tui-modal-button {
+			flex: 1;
+			line-height: 84rpx;
+			font-size: $font-size-28;
+			text-align: center;
+			border-radius: 42rpx;
+			padding: 0;
+			margin: 0 15rpx;
+			box-sizing: border-box;
+			&.confirm {
+				background: $btn-confirm;
+				color: #ffffff;
+				&.disabled {
+					background: linear-gradient(135deg, rgba(242, 143, 49, 0.5) 0%, rgba(225, 86, 22, 0.5) 100%);
+				}
+			}
+		}
+	}
+}
+</style>

+ 8 - 10
pages/seller/cart/components/cm-unit-popup.vue

@@ -102,6 +102,7 @@
 					<button
 						class="tui-modal-button confirm"
 						:class="[isBtnDisabled ? 'disabled' : '']"
+						:disabled="isBtnDisabled"
 						@click="handleBuyConfirm"
 					>
 						加入购物车
@@ -134,7 +135,6 @@ export default {
 			skuIndex: 0,
 			userIdentity: 0,
 			productCount: 0,
-			buyRetailPriceStep: 1,
 			isStock: false, //
 			isQuantity: false,
 			handleStock: 0, // 规格库存
@@ -169,16 +169,11 @@ export default {
 			this.userIdentity = userInfo.userIdentity
 			this.skuList = this.skuProduct.skus
 			this.isBtnDisabled = this.skuList[0].stock === 0
+			this.productCount = this.skuList[0].minBuyNumber
+			this.skuProduct.price = this.skuList[0].price
+			this.addParams.skuId = this.skuList[0].skuId
 			this.addParams.clubId = clubInfo.clubId ? clubInfo.clubId : 0
 			this.addParams.serviceProviderId = userInfo.serviceProviderId
-			this.addParams.skuId = this.skuProduct.skuId
-			this.productCount = this.skuProduct.minBuyNumber
-			this.buyRetailPriceStep = this.skuProduct.step
-			if (this.skuProduct.ladderPriceFlag == 1) {
-				this.addParams.productCount = this.skuProduct.maxBuyNumber ? this.skuProduct.maxBuyNumber : 1
-			} else {
-				this.addParams.productCount = this.skuProduct.minBuyNumber
-			}
 		},
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理
@@ -246,6 +241,7 @@ export default {
 					this.$parent.popupShow = false
 					this.$util.msg('加入购物车成功', 1500, true, 'success')
 					this.$parent.getClubProductNum()
+					this.$emit('handleFuction')
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
@@ -254,9 +250,11 @@ export default {
 		handleChoisSku(sku, index) {
 			// 选择SKU
 			this.skuIndex = index
-			this.addParams.productCount = this.handleMinNumber = sku.minBuyNumber
+			this.productCount = this.addParams.productCount = this.handleMinNumber = sku.minBuyNumber
 			this.addParams.skuId = sku.skuId
 			this.handleStock = sku.stock
+			this.skuProduct.price = sku.price
+			this.skuProduct.originalPrice = sku.originalPrice
 			this.isBtnDisabled = sku.stock === 0
 			this.$emit('skuClick', sku)
 		},

+ 6 - 16
pages/seller/cart/components/immediatelyList.vue

@@ -533,10 +533,10 @@ export default {
 			//商品数量加加
 			if (pros.initProductNum == 0) {
 				pros.initProductNum = pros.minBuyNumber
-				// this.processActivityPrice(pros)
+				this.processActivityPrice(pros)
 			} else if (pros.initProductNum >= pros.minBuyNumber) {
 				pros.initProductNum++
-				// this.processActivityPrice(pros)
+				this.processActivityPrice(pros)
 			}
 			this.totalPeice(item)
 			this.totalCount(item)
@@ -549,10 +549,10 @@ export default {
 				return
 			} else if (pros.initProductNum == pros.minBuyNumber) {
 				pros.initProductNum = 0
-				// this.processActivityPrice(pros)
+				this.processActivityPrice(pros)
 			} else {
 				pros.initProductNum--
-				// this.processActivityPrice(pros)
+				this.processActivityPrice(pros)
 			}
 			this.totalPeice(item)
 			this.totalCount(item)
@@ -568,7 +568,7 @@ export default {
 				pros.initProductNum = pros.minBuyNumber
 			} else {
 				pros.initProductNum = parseInt(e.detail.value)
-				// this.processActivityPrice(pros)
+				this.processActivityPrice(pros)
 			}
 			this.totalPeice(item)
 			this.totalCount(item)
@@ -612,17 +612,7 @@ export default {
 		},
 		processActivityPrice(pros) {
 			//单独处理活动价格和阶梯价格
-			let ladderPriceList = pros.ladderPrices
-			if (pros.ladderPriceFlag == '0' || pros.actStatus == 1) {
-				pros.totalPrice = pros.initProductNum * pros.price
-			} else {
-				ladderPriceList.forEach((item, index) => {
-					if (pros.initProductNum >= item.buyNum) {
-						pros.price = item.buyPrice
-						pros.totalPrice = pros.initProductNum * item.buyPrice
-					}
-				})
-			}
+			pros.totalPrice = pros.initProductNum * pros.price
 		},
 		operationHanld(prop) {
 			this.$emit('operationConfim', prop)

+ 5 - 5
pages/seller/cart/immediately.vue

@@ -100,7 +100,7 @@ export default {
 			buyNumRangeShow: '', //起订量范围
 			buyPrice: '', //起订量范围价格
 			buyRetailPriceStep: 1,
-			supporAddParams:{
+			supporAddParams: {
 				clubId: 0,
 				serviceProviderId: 0,
 				productInfo: '',
@@ -120,11 +120,11 @@ export default {
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
 			const userInfo = await this.$api.getStorage()
 			this.clubId = this.supporAddParams.clubId = clubInfo.clubId ? clubInfo.clubId : 0
-			this.serviceProviderId =  this.supporAddParams.serviceProviderId = userInfo.serviceProviderId
+			this.serviceProviderId = this.supporAddParams.serviceProviderId = userInfo.serviceProviderId
 			this.getClubProductNum()
 		},
 		handleSkuClick(sku) {
-			this.handleData.price = sku.price
+			// this.handleData.price = sku.price
 		},
 		getClubProductNum() {
 			// 获取协销下机构购物车数量
@@ -178,13 +178,13 @@ export default {
 			let productInfo = []
 			this.handleData.combinationProductList.forEach(pros => {
 				if (pros.initProductNum > 0) {
-					productInfo.push( { skuId: pros.skuId,count: pros.initProductNum } )
+					productInfo.push({ skuId: pros.skuId, count: pros.initProductNum })
 				}
 			})
 			this.supporAddParams.productInfo = JSON.stringify(productInfo)
 			this.handleCartBatchAddCart(this.supporAddParams)
 		},
-		handleCartBatchAddCart(params){
+		handleCartBatchAddCart(params) {
 			this.SellerService.ShoppingCartBatchAddCart(params)
 				.then(response => {
 					this.specClasszuhe = 'hide'

+ 3 - 0
pages/seller/cart/mixins/cartMixins.js

@@ -96,6 +96,9 @@ const cartMixins = {
             this.$util.modal('', '确定清空全部失效商品吗?', '确定', '取消', true, () => {
                 this.apiSellerDeleteCart({ cartIds: delCartIds , serviceProviderId: this.listQuery.serviceProviderId })
             })
+        },
+        handleFuctionData(){
+            this.initGetCartGoodsList()
         }
     }
 }

+ 284 - 264
pages/seller/order/components/sellerGoodsList.vue

@@ -1,15 +1,15 @@
 <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 class="floor-tags">{{ item.promotions.name }}</view>
 					</view>
-					<view class="title-text">{{item.shopName}}</view> 
+					<view class="title-text">{{ item.shopName }}</view>
 				</view>
-				<view class="productlist" v-for="(pros,idx) in item.cartList" :key="idx">
+				<view class="productlist" v-for="(pros, idx) in item.cartList" :key="idx">
 					<view class="goods-pros-t">
 						<view class="pros-img">
 							<image :src="pros.image" alt="" />
@@ -17,23 +17,31 @@
 						</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 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.price | NumFormat }}</text></view>
+								<view class="price"
+									><text>¥{{ pros.price | NumFormat }}</text></view
+								>
 								<view class="count"><text class="small">x</text>{{ pros.number }}</view>
 							</view>
 							<view class="floor-item-act">
 								<template v-if="pros.actStatus == 1 && pros.promotions">
 									<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}}
+										{{ pros.promotions.name }}
+										<text v-if="pros.promotions != null">
+											:¥{{
+												pros.promotions == null
+													? '0.00'
+													: pros.promotions.touchPrice | NumFormat
+											}}
 										</text>
 									</view>
-									<view v-else-if="pros.promotions.type !=3" class="floor-tags">{{ pros.promotions.name }}</view>	
+									<view v-else-if="pros.promotions.type != 3" class="floor-tags">{{
+										pros.promotions.name
+									}}</view>
 								</template>
 								<template v-if="pros.svipProductFlag == 1">
 									<view class="svip-tags">
@@ -42,308 +50,320 @@
 									</view>
 								</template>
 							</view>
-						</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>
+						<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">
+					<view class="sum-none" v-if="item.reducedPrice > 0">
 						<text class="money-sign">¥</text>
 						<text class="money">{{ item.originalPrice | NumFormat }}</text>
-						<text class="money-reduced">减<text>¥{{ item.reducedPrice | NumFormat}}</text></text>
+						<text class="money-reduced"
+							>减<text>¥{{ item.reducedPrice | NumFormat }}</text></text
+						>
 					</view>
-					<view class="sum">合计:<text class="money">¥{{ ( item.originalPrice -item.reducedPrice ) | NumFormat }}</text></view>
+					<view class="sum" v-if="secondflag"
+						>合计:<text class="money"
+							>¥{{ (item.originalPrice - item.reducedPrice) | NumFormat }}</text
+						></view
+					>
 				</view>
 			</view>
-		</view>	
+		</view>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'goods',
-		props:{
-			goodsData:{
-				type:Array
-			}
-		},
-		data() {
-			return{
-				remark:[]
-			}
+export default {
+	name: 'goods',
+	props: {
+		goodsData: {
+			type: Array
 		},
-		created(){
-			
-		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2)
+		secondflag: {
+			type: Boolean,
+			default: true
+		}
+	},
+	data() {
+		return {
+			remark: []
+		}
+	},
+	created() {},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			return Number(value).toFixed(2)
+		}
+	},
+	watch: {
+		goodsData: {
+			handler: function(el) {
+				//监听对象的变换使用 function,箭头函数容易出现this指向不正确
+				this.goodsData = el
 			},
-		},	
-		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
-					}
+			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)
 			}
+			return false
 		},
+		changeHandle(index) {
+			//输入框的值被改变后
+			this.goodsData[index].note = this.remark[index]
+			this.$emit('handleGoodList', this.goodsData)
+		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.goods-template{
+.goods-template {
+	width: 100%;
+	height: auto;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	.goods-list {
 		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;
-				}
+		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: 400rpx;
-					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;
-				}
+		}
+		.shoptitle {
+			display: flex;
+			align-items: center;
+			height: 80rpx;
+			line-height: 80rpx;
+			.title-text {
+				width: 400rpx;
+				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;
 			}
-			.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;
-					}
-				}
+			.floor-item-act {
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding: 12rpx 0;
+				margin-right: 12rpx;
 			}
-			.pros-product{
-				width: 468rpx;
+		}
+		.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%;
-				line-height: 40rpx;
-				font-size: $font-size-26;	
+				border-radius: 10rpx;
+				margin: 0 26rpx 0 0;
 				position: relative;
-				.producttitle{
-					width: 100%;
+				.tips {
 					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{
+					width: 80rpx;
 					height: 40rpx;
-					color: #999999;
+					background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
 					line-height: 40rpx;
-					text-overflow:ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-					overflow: hidden;
+					text-align: center;
+					font-size: $font-size-24;
+					color: #ffffff;
+					border-radius: 10rpx 0 10rpx 0;
+					position: absolute;
+					top: 0;
+					left: 0;
 				}
-				.productprice{
-					height: 54rpx;
+				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;
-					width: 100%;
+					font-size: $font-size-28;
+					width: 48%;
+					color: #ff2a2a;
 					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;
-						}
+				}
+				.count {
+					height: 100%;
+					float: right;
+					position: relative;
+					.small {
+						color: #666666;
 					}
 				}
-				.floor-item-act{
+			}
+			.floor-item-act {
+				width: 100%;
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding: 0 0 10rpx 0;
+			}
+		}
+		.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: 576rpx;
+				height: 36rpx;
+				padding: 20rpx;
+				background: #fff;
+				border-radius: 10rpx;
+				border: 2rpx solid #b2b2b2;
+				input {
 					width: 100%;
-					height: 56rpx;
-					text-align: center;
-					box-sizing: border-box;
-					float: left;
-					padding:0 0 10rpx 0;
+					height: 100%;
+					// background: #F7F7F7;
+					font-size: $font-size-26;
+					line-height: 36rpx;
+					color: #333333;
+					min-height: 36rpx;
 				}
 			}
-			.goods-pros-m{
-				height: 76rpx;
-				line-height: 76rpx;
-				font-size: $font-size-26;
+		}
+		.goods-pros-b {
+			width: 100%;
+			height: auto;
+			padding: 10rpx 0;
+			.sum-none {
+				width: 100%;
+				height: 48rpx;
+				line-height: 48rpx;
 				color: $text-color;
-				margin-top: 12rpx;
-				.m-text{
-					width: 62rpx;
-					float: left;
-					padding-right: 20rpx;
-					font-weight:bold;
+				float: left;
+				text-align: right;
+				.money {
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
 				}
-				.m-input{
-					display: -webkit-box;
-					display: -webkit-flex;
-					display: flex;
-					-webkit-box-align: center;
-					-webkit-align-items: center;
-					align-items: center;
-					position: relative;
-					width: 576rpx;
-					height: 36rpx;
-					padding: 20rpx;
-					background: #fff;
-					border-radius: 10rpx;
-					border: 2rpx solid #b2b2b2;
-					input{
-						width: 100%;
-						height: 100%;
-						// background: #F7F7F7;
-						font-size: $font-size-26;
-						line-height: 36rpx;
-						color: #333333;
-						min-height: 36rpx;
-					}
+				.money-sign {
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
 				}
-			}
-			.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;
-						}
+				.money-reduced {
+					margin-left: 10rpx;
+					font-size: $font-size-26;
+					color: $color-system;
+					.iconfont {
+						font-size: $font-size-34;
 					}
 				}
-				.sum{
-					width: 100%;
-					height: 48rpx;
+			}
+			.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;
-					line-height: 48rpx;
-					color: $text-color;
-					display: flex;
-					justify-content: flex-end;
-					.money{
-						color: #FF2A2A;
-						font-size: $font-size-28;
-					}
 				}
 			}
 		}
 	}
+}
 </style>

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

@@ -3,7 +3,7 @@
 		<!-- 地址选择 -->
 		<choice-address ref="choiceAddress" v-if="isAddress" :addressData="addressData"></choice-address>
 		<!-- 商品 -->
-		<seller-goodsList ref='goods' v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></seller-goodsList>
+		<seller-goodsList ref='goods' v-if="isRequest" :secondflag="secondflag" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList"></seller-goodsList>
 		<!-- 返佣订单 -->
 		<view class="order-return" v-if="goodsData.length==1 && secondflag">
 			<view class="order-return-main" @click="handleRebateFlag">

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

@@ -161,7 +161,7 @@
 					userId:0			// 用户Id
 				},
 				postageParam: {// 邮费计算参数
-					productIds:0,		// 商品Id(逗号隔开)
+					skuIds:0,		// 商品Id(逗号隔开)
 					userId:0,			// 用户Id
 					townId:0			// 地区Id
 				},	
@@ -315,19 +315,19 @@
 				}
 				this.orderShouldPayFee = this.allPrice - this.couponAmount
 				this.totalDiscountAmount = this.reducedPrice + this.couponAmount
-				this.postageParam.productIds = this.getProductIds(data.list)
+				this.postageParam.skuIds = this.getProductIds(data.list)
 				this.getAddressData()
 			},
-			// 获取订单商品id列表
+			// 获取订单SKUId列表
 			getProductIds(list){
-				const productIds = []
+				const skuId = []
 				list.forEach(function(supplier){
 					supplier.cartList.forEach(function(product){
-						productIds.push(product.productId)
+						skuId.push(product.skuId)
 					})
 				})
 				// console.log(list);
-				return productIds.join(',')
+				return skuId.join(',')
 			},
 			
 			getFreightData(){// 获取邮费信息

+ 14 - 0
services/sellse.service.js

@@ -221,6 +221,20 @@ export default class SellerService {
               
         })
     }
+    /*协销下单购物车->api*/
+    /**
+	 *@重选sku
+	 *@param clubId 会所的ID
+	 *@param serviceProviderId 协销ID
+	 */
+    orderSellerCkeckSku (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/seller/check/sku', 
+            data, 
+            isLoading: true ,
+              
+        })
+    }
     /**
 	 *@组合商品加入购物车
 	 *@param clubId 会所的ID