Administrator 5 年之前
父节点
当前提交
720f719ad4
共有 1 个文件被更改,包括 17 次插入9 次删除
  1. 17 9
      components/cm-module/listTemplate/immediatelyList.vue

+ 17 - 9
components/cm-module/listTemplate/immediatelyList.vue

@@ -69,8 +69,8 @@
 			<view :class="tabIndex"  v-if="tabIndex === 1">
 				<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y>
 					<view class="all-zuhe-list" v-for="(item,index) in combinationProduct" :key="index" :id="item.id">
-						<view class="zuhe_title" :class="index==0 ? 'active' : ''">{{item.name}}</view>
-						<view v-for="(pros,proIndex) in item.combinationProductList" :class="index==0 ? 'stylecontent' : ''" :key="proIndex" :id="pros.productID" class="zuhe-list-content commodity-list" >
+						<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>
@@ -78,9 +78,9 @@
 									<view class="list-shop">
 										<view class="list-price zuhe_list_price" >
 											<text class="zuhe_price-larger zuhe_list_text" >价格:¥{{pros.retailPrice.toFixed(2)}}</text>
-											<text class="price-two zuhe_list_text" @click.stop="alertjieti(pros)">
+											<text class="price-two zuhe_list_text" >
 												总价:<text class="zuhe_list_zj">¥ {{pros.totalPrice.toFixed(2)}}</text>
-											<text class="price-view ladder" v-if="pros.ladderPriceFlag == '1'" >阶</text>
+											<text class="price-view ladder" v-if="pros.ladderPriceFlag == '1'" @click.stop="alertjieti(pros)">阶</text>
 											</text>
 											<text class="price-view activity" v-if="pros.actStatus == '1'">活动价</text>
 										</view>
@@ -104,7 +104,7 @@
 								<!--  -->
 								<text>种类:{{item.productKind}}</text>
 								<text >总数:{{item.productTotalNum}}</text>
-								<text>总额:{{item.productTotalAmount}}</text>
+								<text>总额:{{item.productTotalAmount.toFixed(2)}}</text>
 							</view>
 							<button type="default" class="buycart" @click.stop="operationHanld(item)">加入购物车</button>
 						</view>
@@ -192,6 +192,7 @@
 					if(tabIndex ==0){
 						this.getProductAgainInfo(true);
 					}else if(tabIndex==1){
+						console.log('tabindex11111')
 						getcombinationProduct(true);
 					}
 					
@@ -325,10 +326,13 @@
 				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)
@@ -368,14 +372,16 @@
 				})
 				// console.log(prosAllCount)
 			},	
-			totalKind(item){
+			totalKind(item){//计算商品种类
 				let productsList =[];
 				let checkList = [];
 				productsList=item.combinationProductList;
 				productsList.forEach(pros=>{	
 					if(pros.initProductNum>0){
 						checkList.push(pros)
-						item.productKind = checkList.length
+						item.productKind = checkList.length;
+					}else{
+						item.productKind = checkList.length;
 					}
 				})
 			},
@@ -463,6 +469,7 @@
 		text-align: center;
 		line-height: 64rpx;
 		bottom: -25rpx;
+		margin-right: 30rpx
 	}
 	.price-none{
 		font-size: 24rpx;
@@ -685,6 +692,7 @@
 			width: 100%;
 			height: auto;
 			flex: 6;
+			overflow: hidden;
 			.list-price {
 				// width: 100%;
 				color: #FF2A2A;
@@ -732,7 +740,7 @@
 				margin-left:10rpx;
 			}
 			.zuhe_list_price{
-				width: 70%;
+				width: 470rpx;
 				overflow: hidden;
 			}
 			.count{