382 lines
9.1 KiB
Vue
382 lines
9.1 KiB
Vue
<template>
|
|
<view class="content">
|
|
<u--form :model="model1" :rules="rules" ref="uForm" labelPosition="left"
|
|
:labelStyle="{fontSize:'32rpx',color:'#444444'}" labelWidth='120' borderBottom>
|
|
|
|
<view class="description">
|
|
产品属性
|
|
</view>
|
|
<view class="label-cls">
|
|
<u-form-item label="产地" prop="userInfo.name" ref="item1">
|
|
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
|
@click="showPouple=true,popType='place'">
|
|
<view style="margin-right: 10rpx;line-height: 25rpx;">请选择</view>
|
|
<u-icon name="arrow-right"></u-icon>
|
|
</view>
|
|
</u-form-item>
|
|
|
|
<u-form-item label="商品等级" prop="userInfo.name" ref="item1">
|
|
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
|
@click="showPouple=true,popType='leval'">
|
|
<view style="margin-right: 10rpx;line-height: 25rpx;">请选择</view>
|
|
<u-icon name="arrow-right"></u-icon>
|
|
</view>
|
|
</u-form-item>
|
|
<u-form-item label="货品包装" prop="userInfo.name" ref="item1">
|
|
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
|
|
@click="showPouple=true,popType='packing'">
|
|
<view style="margin-right: 10rpx;line-height: 25rpx;">请选择</view>
|
|
<u-icon name="arrow-right"></u-icon>
|
|
</view>
|
|
</u-form-item>
|
|
</view>
|
|
<view class="description" style="display: flex;justify-content: space-between;align-items: center">
|
|
<text>产品属性</text>
|
|
<view class="attr-custom">
|
|
<u-icon name="plus" color='#20B128' style="margin-right: 8rpx;font-weight: bold;"></u-icon> 自定义
|
|
</view>
|
|
</view>
|
|
<view class="label-cls"
|
|
style="display: flex;padding: 20rpx 20rpx 20rpx 2rpx;justify-content: space-between;">
|
|
<view class="" style="display: flex;width: 70%;align-items: center;">
|
|
<u--input placeholder="请填写属性名称" border="surround" v-model="value"></u--input>
|
|
<u-line direction="col" length="40rpx" color="#CECECE"></u-line>
|
|
<u--input placeholder="请填写属性值" border="surround" v-model="value"></u--input>
|
|
<u-line direction="col" length="40rpx" color="#CECECE"></u-line>
|
|
</view>
|
|
<view style="color: #777777;display: flex; align-items: center;">
|
|
<u-icon name="trash" style='margin-right: 8rpx;'></u-icon> 删除
|
|
</view>
|
|
</view>
|
|
</u--form>
|
|
<view class="submit-btn">
|
|
<u-button type="primary" shape="circle" text="保存"></u-button>
|
|
</view>
|
|
|
|
|
|
<u-popup :show="showPouple" @close="showPouple=false" @open="showPouple=true" :round="10">
|
|
<view class="RegularFont" style="padding: 42rpx 40rpx">
|
|
<view class="pop-head">
|
|
<text>取消</text>
|
|
<text style="font-size:32rpx ;color:#333333 ;">商品产地</text>
|
|
<text>确定</text>
|
|
</view>
|
|
<!-- 地区 -->
|
|
<view v-if="popType=='place'">
|
|
<view class="Positioning " style="color: #989898;margin-bottom: 30rpx;">
|
|
<view class="" style="display: flex;">
|
|
<u-icon name="map" style='margin-right: 8rpx;'></u-icon>
|
|
<text>四川得分手段解决客户</text>
|
|
</view>
|
|
<view class="">
|
|
刷新定位
|
|
</view>
|
|
</view>
|
|
<u-line color="#CECECE"></u-line>
|
|
<view class="province">
|
|
<view class="province-li" @click='positionType=0'
|
|
:style="{color:positionType==0?'#20B128':'#707070'} ">
|
|
四川省
|
|
</view>
|
|
<view class="province-li" @click='positionType=1'
|
|
:style="{color:positionType==1?'#20B128':'#707070'} ">
|
|
泸州市
|
|
</view>
|
|
<view class="province-li" @click='positionType=2'
|
|
:style="{color:positionType==2?'#20B128':'#707070'} ">
|
|
牛马谭
|
|
</view>
|
|
<view class="province-line" :style="{left:positionType*130+30+'rpx'}" />
|
|
</view>
|
|
<u-line color="#CECECE"></u-line>
|
|
<view class="" style="color:#989898;font-size:24rpx ;margin-top: 40rpx;">
|
|
请选择省份
|
|
</view>
|
|
<view class="position-content">
|
|
<view class="position-li" v-for="item in 20">
|
|
<text>
|
|
四川省
|
|
</text>
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
<!-- 地区结束 -->
|
|
|
|
<!-- 商品等级 -->
|
|
<view v-if="popType=='leval'" style="height: 500rpx;">
|
|
<u-transition :show="show" mode="slide-right">
|
|
<view class="goods-leval" v-show="show">
|
|
<view class="goods-leval-li" v-for='item in 10'>
|
|
一等平
|
|
</view>
|
|
<view class="goods-leval-li act">
|
|
二等平
|
|
</view>
|
|
<view class="goods-leval-li " style="display: flex;color:#38BE41 ;">
|
|
<u-icon name="plus" color="#38BE41" style='margin-right: 8rpx;'
|
|
@click="show=!show"></u-icon> 自定义
|
|
</view>
|
|
</view>
|
|
</u-transition>
|
|
<u-transition :show="!show" mode="slide-left">
|
|
<view class="transition" @click="show=!show">
|
|
<!-- 大师傅士大夫士大夫撒旦 -->
|
|
<u--textarea v-model="value1" placeholder="请输入商品等级"></u--textarea>
|
|
</view>
|
|
</u-transition>
|
|
</view>
|
|
<!-- 商品等级结束 -->
|
|
|
|
<!-- 商品包装 -->
|
|
<view v-if="popType=='packing'" style="height: 500rpx;">
|
|
<u-transition :show="show" mode="slide-right">
|
|
<view class="goods-leval">
|
|
<view class="goods-leval-li" v-for='item in 10'>
|
|
纸箱子
|
|
</view>
|
|
<view class="goods-leval-li act">
|
|
木箱子
|
|
</view>
|
|
<view class="goods-leval-li " style="display: flex;color:#38BE41 ;" @click="show=!show">
|
|
<u-icon name="plus" color="#38BE41" style='margin-right: 8rpx;'></u-icon> 自定义
|
|
</view>
|
|
</view>
|
|
</u-transition>
|
|
<u-transition :show="!show" mode="slide-left">
|
|
<view class="transition" @click="show=!show">
|
|
<u--textarea v-model="value1" placeholder="请输入商品等级"></u--textarea>
|
|
</view>
|
|
</u-transition>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
|
|
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
|
|
data() {
|
|
return {
|
|
show: true,
|
|
popType: 'leval',
|
|
showPouple: true,
|
|
showSex: false,
|
|
positionType: 0,
|
|
model1: {
|
|
userInfo: {
|
|
name: '',
|
|
sex: '',
|
|
},
|
|
},
|
|
value1: "",
|
|
value: '',
|
|
range: [{
|
|
value: 0,
|
|
text: "篮球"
|
|
},
|
|
{
|
|
value: 1,
|
|
text: "足球"
|
|
},
|
|
{
|
|
value: 2,
|
|
text: "游泳"
|
|
},
|
|
],
|
|
text: "",
|
|
text1: "",
|
|
value1: "",
|
|
checkboxValue1: [],
|
|
checkboxList1: [{
|
|
name: '到店核销',
|
|
},
|
|
{
|
|
name: '快递配送',
|
|
},
|
|
|
|
],
|
|
rules: {
|
|
// 'userInfo.name': {
|
|
// type: 'string',
|
|
// required: true,
|
|
// message: '请填写姓名',
|
|
// trigger: ['blur', 'change']
|
|
// },
|
|
// 'userInfo.sex': {
|
|
// type: 'string',
|
|
// max: 1,
|
|
// required: true,
|
|
// message: '请选择男或女',
|
|
// trigger: ['blur', 'change']
|
|
// },
|
|
},
|
|
radio: '',
|
|
switchVal: false
|
|
};
|
|
},
|
|
methods: {
|
|
sexSelect(e) {
|
|
this.model1.userInfo.sex = e.name
|
|
this.$refs.uForm.validateField('userInfo.sex')
|
|
},
|
|
navgo(url) {
|
|
uni.navigateTo({
|
|
url
|
|
})
|
|
},
|
|
getLocation() {
|
|
uni.getLocation({
|
|
type: 'wgs84',
|
|
success: function(res) {
|
|
console.log(res);
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
},
|
|
mounted() {
|
|
// this.getLocation()
|
|
}
|
|
|
|
};
|
|
</script>
|
|
|
|
<style lang='scss'>
|
|
.MediumFont {
|
|
font-family: PingFangFamily;
|
|
}
|
|
|
|
.RegularFont {
|
|
font-family: PingFangRegular;
|
|
}
|
|
|
|
.content {
|
|
box-sizing: border-box;
|
|
padding: 30rpx;
|
|
background-color: #F1F1F1;
|
|
min-height: 100vh;
|
|
position: relative;
|
|
font-size: 28rpx;
|
|
font-family: PingFangFamily;
|
|
}
|
|
|
|
.label-cls {
|
|
background-color: white;
|
|
padding: 8rpx 30rpx;
|
|
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
|
}
|
|
|
|
.description {
|
|
background-color: #F1F1F1;
|
|
padding: 30rpx 0rpx;
|
|
font-size: 28rpx;
|
|
color: #777777;
|
|
width: 690rpx;
|
|
}
|
|
|
|
.attr-custom {
|
|
display: flex;
|
|
align-items: center;
|
|
border: 1px solid #38BE41;
|
|
background-color: #E0EFE1;
|
|
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
|
padding: 7rpx 10rpx;
|
|
color: #20B128;
|
|
|
|
}
|
|
|
|
.submit-btn {
|
|
position: fixed;
|
|
bottom: 50rpx;
|
|
width: 670rpx;
|
|
}
|
|
|
|
.pop-head {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
color: #20B128;
|
|
margin-bottom: 42rpx;
|
|
}
|
|
|
|
.Positioning {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.province {
|
|
display: flex;
|
|
position: relative;
|
|
|
|
.province-li {
|
|
color: #707070;
|
|
font-size: 32rpx;
|
|
margin: 30rpx 40rpx 30rpx 0;
|
|
}
|
|
|
|
.province-line {
|
|
position: absolute;
|
|
height: 2px;
|
|
width: 40rpx;
|
|
background-color: #20B128;
|
|
bottom: 20rpx;
|
|
left: 30rpx;
|
|
transition: 500ms;
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
.position-content {
|
|
height: 600rpx;
|
|
overflow-y: auto;
|
|
|
|
.position-li {
|
|
font-size: 28rpx;
|
|
color: #707070;
|
|
margin-top: 30rpx;
|
|
}
|
|
}
|
|
|
|
.goods-leval {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-around;
|
|
overflow-y: auto;
|
|
|
|
.goods-leval-li {
|
|
margin-right: 20rpx;
|
|
padding: 10rpx 40rpx;
|
|
height: 60rpx;
|
|
margin-bottom: 20rpx;
|
|
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
|
background-color: #F1F1F1;
|
|
}
|
|
|
|
.act {
|
|
color: #20B128;
|
|
background-color: #E8F7E9;
|
|
border: 1px solid #20B128;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
/* .toast {
|
|
position: absolute;
|
|
color: white;
|
|
background-color: #20B128;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 20rpx;
|
|
|
|
|
|
} */
|
|
</style> |