|
@@ -4,6 +4,9 @@
|
|
|
:search-status="true"
|
|
|
@operationConfim="hanldOperationConfim"
|
|
|
@goCartPage="hanldToCartPage"
|
|
|
+ :tabBars="tabBars"
|
|
|
+ :tabIndex="tabIndex"
|
|
|
+ @changetab="hanldChangeTab"
|
|
|
>
|
|
|
</immediately-list>
|
|
|
<!--底部选择模态层弹窗组件 -->
|
|
@@ -16,7 +19,7 @@
|
|
|
<image :src="handleData.mainImage" mode=""></image>
|
|
|
</view>
|
|
|
<view class="layer-nunbox">
|
|
|
- <view class="layer-nunbox-m">商品编码:{{item.price1Text}}</view>
|
|
|
+ <view class="layer-nunbox-m">商品编码:{{productCode}}</view>
|
|
|
<view class="layer-nunbox-t">
|
|
|
<view class="layer-nunbox-text">数量:</view>
|
|
|
<view class="number-box">
|
|
@@ -34,30 +37,28 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
- <view class="button add" @click="getAddProductCart">加入购物车</view>
|
|
|
+ <view class="button add" @click="getAddProductCart">{{buttonText}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
+ </view>
|
|
|
<!-- 加入购物车 -->
|
|
|
- <view class="popup spec" :class="specClass" @touchmove.stop.prevent="discard" @tap="hideSpec">
|
|
|
+ <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">
|
|
|
+ <view class="content zuhe-content">
|
|
|
<view class="number-left">
|
|
|
- <text>种类:</text>
|
|
|
- <text>数量:</text>
|
|
|
+ <text>种类:1312</text>
|
|
|
+ <text>数量:132454</text>
|
|
|
</view>
|
|
|
<view class="number-right">
|
|
|
<view class="text">
|
|
|
- 总额:
|
|
|
+ 总额:<text class="number-right-text">¥1321552</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
- <view class="button add" @click="getAddProductCart">确定</view>
|
|
|
+ <view class="button add" @click="">确定</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -80,12 +81,16 @@
|
|
|
lastPageType: '',
|
|
|
lastPageVal: '',
|
|
|
specClass: '',//规格弹窗css类,控制开关动画
|
|
|
+ specClasszuhe:'',//组合加购物车弹窗
|
|
|
+ productCode:'',
|
|
|
handleData:{},
|
|
|
isQuantity:false,
|
|
|
isStock:false,
|
|
|
minBuyNumber:0,
|
|
|
number:0,
|
|
|
- buyRetailPrice:0
|
|
|
+ buyRetailPrice:0,
|
|
|
+ hanldChangeTabIndex:0,
|
|
|
+ buttonText:'加入购物车'
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -97,12 +102,28 @@
|
|
|
this.$refs.productList.cartQuantity = response.data
|
|
|
})
|
|
|
},
|
|
|
+ hanldChangeTab(index){
|
|
|
+ console.log(this.$refs.productList.tabIndex)
|
|
|
+ if(index == 1){
|
|
|
+ this.$refs.productList.getcombinationProduct()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addCart(data){
|
|
|
+ this.specClasszuhe = 'show';
|
|
|
+ },
|
|
|
hanldOperationConfim(data){//显示选择数量确认弹窗
|
|
|
this.specClass = 'show';
|
|
|
this.handleData = data
|
|
|
+ this.productCode = data.productCode
|
|
|
this.number = data.minBuyNumber
|
|
|
this.minBuyNumber = data.minBuyNumber
|
|
|
this.buyRetailPrice = data.retailPrice;
|
|
|
+ if(this.$refs.productList.tabIndex == 1){
|
|
|
+ this.number = 0
|
|
|
+ this.buttonText ='确定'
|
|
|
+ }else{
|
|
|
+ this.buttonText ='加入购物车';
|
|
|
+ }
|
|
|
},
|
|
|
hideSpec() {//关闭选择数量确认弹窗
|
|
|
this.specClass = 'hide';
|
|
@@ -110,6 +131,12 @@
|
|
|
this.specClass = 'none';
|
|
|
}, 200);
|
|
|
},
|
|
|
+ hideSpecs(){
|
|
|
+ this.specClasszuhe='hide';
|
|
|
+ setTimeout(() => {
|
|
|
+ this.specClasszuhe='none';
|
|
|
+ }, 200);
|
|
|
+ },
|
|
|
changeCountAdd(){//popup弹窗数量增加按钮
|
|
|
this.number++
|
|
|
this.calculatPerice()
|
|
@@ -183,6 +210,19 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
+ .zuhe-content{
|
|
|
+ display: inherit;
|
|
|
+ line-height: 100rpx
|
|
|
+ }
|
|
|
+ .number-left{
|
|
|
+ margin-right: 60rpx
|
|
|
+ }
|
|
|
+ .number-left text{
|
|
|
+ margin-left: 30rpx;
|
|
|
+ }
|
|
|
+ .number-right-text{
|
|
|
+ color: #FF2A2A;
|
|
|
+ }
|
|
|
page {
|
|
|
background: $sub-bg-color;
|
|
|
.all-type-list-wrapper {
|
|
@@ -407,4 +447,9 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .zuhe .layer{
|
|
|
+ bottom: -260rpx;
|
|
|
+ height: 200rpx;
|
|
|
+ }
|
|
|
</style>
|