|
@@ -69,8 +69,8 @@
|
|
<view :class="tabIndex" v-if="tabIndex === 1">
|
|
<view :class="tabIndex" v-if="tabIndex === 1">
|
|
<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y>
|
|
<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="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" >
|
|
<view class="list-details-info" >
|
|
<text class="list-details-title zuhe_list_text">商品编码:{{pros.productCode}}</text>
|
|
<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>
|
|
<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-shop">
|
|
<view class="list-price zuhe_list_price" >
|
|
<view class="list-price zuhe_list_price" >
|
|
<text class="zuhe_price-larger zuhe_list_text" >价格:¥{{pros.retailPrice.toFixed(2)}}</text>
|
|
<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="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>
|
|
<text class="price-view activity" v-if="pros.actStatus == '1'">活动价</text>
|
|
<text class="price-view activity" v-if="pros.actStatus == '1'">活动价</text>
|
|
</view>
|
|
</view>
|
|
@@ -104,7 +104,7 @@
|
|
<!-- -->
|
|
<!-- -->
|
|
<text>种类:{{item.productKind}}</text>
|
|
<text>种类:{{item.productKind}}</text>
|
|
<text >总数:{{item.productTotalNum}}</text>
|
|
<text >总数:{{item.productTotalNum}}</text>
|
|
- <text>总额:{{item.productTotalAmount}}</text>
|
|
|
|
|
|
+ <text>总额:{{item.productTotalAmount.toFixed(2)}}</text>
|
|
</view>
|
|
</view>
|
|
<button type="default" class="buycart" @click.stop="operationHanld(item)">加入购物车</button>
|
|
<button type="default" class="buycart" @click.stop="operationHanld(item)">加入购物车</button>
|
|
</view>
|
|
</view>
|
|
@@ -192,6 +192,7 @@
|
|
if(tabIndex ==0){
|
|
if(tabIndex ==0){
|
|
this.getProductAgainInfo(true);
|
|
this.getProductAgainInfo(true);
|
|
}else if(tabIndex==1){
|
|
}else if(tabIndex==1){
|
|
|
|
+ console.log('tabindex11111')
|
|
getcombinationProduct(true);
|
|
getcombinationProduct(true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -325,10 +326,13 @@
|
|
if(pros.initProductNum==0){
|
|
if(pros.initProductNum==0){
|
|
this.$util.msg(`采购数量不能小于0`,2000);
|
|
this.$util.msg(`采购数量不能小于0`,2000);
|
|
return
|
|
return
|
|
|
|
+ }else if(pros.initProductNum == pros.minBuyNumber){
|
|
|
|
+ pros.initProductNum = 0;
|
|
|
|
+ this.processActivityPrice(pros);
|
|
}else{
|
|
}else{
|
|
pros.initProductNum--
|
|
pros.initProductNum--
|
|
this.processActivityPrice(pros)
|
|
this.processActivityPrice(pros)
|
|
- }
|
|
|
|
|
|
+ }
|
|
this.totalPeice(item)
|
|
this.totalPeice(item)
|
|
this.totalCount(item)
|
|
this.totalCount(item)
|
|
this.totalKind(item)
|
|
this.totalKind(item)
|
|
@@ -368,14 +372,16 @@
|
|
})
|
|
})
|
|
// console.log(prosAllCount)
|
|
// console.log(prosAllCount)
|
|
},
|
|
},
|
|
- totalKind(item){
|
|
|
|
|
|
+ totalKind(item){//计算商品种类
|
|
let productsList =[];
|
|
let productsList =[];
|
|
let checkList = [];
|
|
let checkList = [];
|
|
productsList=item.combinationProductList;
|
|
productsList=item.combinationProductList;
|
|
productsList.forEach(pros=>{
|
|
productsList.forEach(pros=>{
|
|
if(pros.initProductNum>0){
|
|
if(pros.initProductNum>0){
|
|
checkList.push(pros)
|
|
checkList.push(pros)
|
|
- item.productKind = checkList.length
|
|
|
|
|
|
+ item.productKind = checkList.length;
|
|
|
|
+ }else{
|
|
|
|
+ item.productKind = checkList.length;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -463,6 +469,7 @@
|
|
text-align: center;
|
|
text-align: center;
|
|
line-height: 64rpx;
|
|
line-height: 64rpx;
|
|
bottom: -25rpx;
|
|
bottom: -25rpx;
|
|
|
|
+ margin-right: 30rpx
|
|
}
|
|
}
|
|
.price-none{
|
|
.price-none{
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
@@ -685,6 +692,7 @@
|
|
width: 100%;
|
|
width: 100%;
|
|
height: auto;
|
|
height: auto;
|
|
flex: 6;
|
|
flex: 6;
|
|
|
|
+ overflow: hidden;
|
|
.list-price {
|
|
.list-price {
|
|
// width: 100%;
|
|
// width: 100%;
|
|
color: #FF2A2A;
|
|
color: #FF2A2A;
|
|
@@ -732,7 +740,7 @@
|
|
margin-left:10rpx;
|
|
margin-left:10rpx;
|
|
}
|
|
}
|
|
.zuhe_list_price{
|
|
.zuhe_list_price{
|
|
- width: 70%;
|
|
|
|
|
|
+ width: 470rpx;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
.count{
|
|
.count{
|