You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

276 lines
5.4 KiB
Vue

4 months ago
<template>
<view class="wholeSales">
<view class="top">
<text>批发规格</text>
<view>
<u-picker
ref='uPicker'
:show="show"
:columns="columns"
@cancel="show = false"
4 months ago
@confirm="confirm"
4 months ago
>
</u-picker>
<view @click="show = true" class="openBtn">
4 months ago
{{columns[0][index]}}
4 months ago
<u-icon name="arrow-down-fill"></u-icon>
</view>
</view>
</view>
<view class="body">
<view class="item" v-for="item in clist">
<view class="type-price">
<text class="ctype">{{item.type}}</text>
<text class="price">{{item.price}}</text>
</view>
<view class="bottom">
<text class="bottom-text">批发重量</text>
<u-number-box v-model="item.value" @change='valChange' button-size="30" ></u-number-box>
</view>
</view>
</view>
4 months ago
<view class="wholeSales-bottom">
<view class="tip">
当前未满足 50 斤最低起批量无法下单
4 months ago
</view>
4 months ago
<view class="inputBtnCon">
<view class="left">
4 months ago
<view class="left-top">
<text class="allValue">{{allValue}}</text>
</view>
<view class="left-bottom">共计金额</view>
4 months ago
</view>
<view class="allPrice">
<text >{{allPrice}}</text>
</view>
<button class="inputBtn">批发下单</button>
4 months ago
</view>
</view>
</view>
</template>
<script>
4 months ago
import index from '../../../uni_modules/uview-ui'
4 months ago
export default {
data(){
return{
clist:[{
type:'6.0公',
price:'50.60',
value:0
},
{
type:'5.5公',
price:'50.60',
value:0
},
{
type:'5.0公',
price:'50.60',
value:0
},
{
type:'6.0母',
price:'50.60',
value:0
},
{
type:'6.0公',
price:'50.60',
value:0
},
{
type:'6.0公',
price:'50.60',
value:0
},
{
type:'6.0公',
price:'50.60',
value:0
},
{
type:'6.0公',
price:'50.60',
value:0
}],
4 months ago
allValue:28888,
allPrice:28888.888,
4 months ago
show:false,
columns:[
["50规格","49规格","38规格"],
],
4 months ago
index:0
4 months ago
}
},
methods:{
valChange(e){
4 months ago
// console.log('当前值为:' + e.value)
4 months ago
},
4 months ago
confirm(e){
// console.log('confirm', e)
this.show = false
this.index=e.indexs[0]
// console.log('confirm.indexs', e.indexs[0])
// console.log('数组的当前值', this.columns[0][index])
4 months ago
}
}
}
</script>
<style lang="scss">
.wholeSales{
min-height: 100vh;
4 months ago
width: 750rpx;
4 months ago
background: #FFFFFF;
4 months ago
box-sizing: border-box;
4 months ago
border-radius: 20rpx 20rpx 0rpx 0rpx;
.top{
height: 92rpx;
display: flex;
>text{
font-weight: 400;
font-size: 28rpx;
color: #AFAFAF;
margin: 32rpx 0 0 32rpx;
}
.openBtn{
width: 220rpx;
height: 56rpx;
background: #EDEEEF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
display: flex;
justify-content: space-between;
padding: 8rpx 20rpx;
margin: 24rpx 0 12rpx 18rpx;
box-sizing: border-box;
font-weight: 600;
font-size: 28rpx;
color: #222222;
}
}
.body{
4 months ago
padding-left: 38rpx;
4 months ago
.item{
margin: 0 auto;
width: 676rpx;
height: 140rpx;
border-bottom: 2rpx solid rgba(0,0,0,0.06);
display: flex;
flex-direction: column;
justify-content: space-between;
flex-wrap: wrap;
margin-top: 24rpx;
padding-bottom: 28rpx;
box-sizing: border-box;
.type-price{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.ctype{
font-weight: 600;
font-size: 32rpx;
color: #222222;
width: 90rpx;
text-align-last: justify;
}
.price{
font-family: OPPOSans, OPPOSans;
font-weight: bold;
font-size: 32rpx;
color: #FF0000;
&::before{
content: '¥';
font-size: 24rpx;
margin-right: 4rpx;
}
}
}
.bottom{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.bottom-text{
font-weight: 400;
font-size: 24rpx;
color: #AFAFAF;
margin-top: 34rpx;
}
}
}
}
4 months ago
.wholeSales-bottom{
position: fixed;
bottom: 0;
z-index: 100;
}
.tip{
width: 750rpx;
height: 72rpx;
background: #FFF7E8;
border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 0rpx solid #FFF7E8;
font-weight: 400;
font-size: 28rpx;
color: #FF7D00;
justify-content: center;
padding: 16rpx 0 16rpx 32rpx;
box-sizing: border-box;
}
4 months ago
.inputBtnCon{
4 months ago
width: 750rpx;
4 months ago
height: 184rpx;
background: #FFFFFF;
display: flex;
4 months ago
justify-content: space-between;
padding-left: 36rpx;
box-sizing: border-box;
4 months ago
.left{
height: 74rpx;
font-weight: 400;
font-size: 24rpx;
color: rgba(0,0,0,0.3);
margin-top: 42rpx;
text-align-last:justify;
4 months ago
.left-top{
.allValue{
font-weight: 600;
font-size: 30rpx;
color: #222222;
}
4 months ago
}
}
.allPrice{
margin-top: 46rpx;
height: 68rpx;
font-weight: 500;
font-size: 48rpx;
color: #FF2D46;
line-height: 67rpx;
text-align: right;
&::before{
content: '¥';
font-size: 24rpx;
margin-right: 4rpx;
}
}
.inputBtn{
4 months ago
width: 280rpx;
4 months ago
height: 92rpx;
background: linear-gradient( 91deg, #43A1FF 0%, #2F80F9 100%), #FFFFFF;
border-radius: 24rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
margin-top: 24rpx;
4 months ago
margin-left: 4rpx;
margin-right: 36rpx;
4 months ago
padding-top: 10rpx;
box-sizing: border-box;
4 months ago
}
}
}
</style>