This commit is contained in:
zmj 2024-04-18 23:59:06 +08:00
parent 63a0a9194e
commit 794beec9df
4 changed files with 193 additions and 6 deletions

View File

@ -1570,6 +1570,13 @@
"navigationBarTitleText": "价格与规格",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsSearch",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]

View File

@ -3,7 +3,8 @@
<u--form :model="model1" :rules="rules" ref="uForm" labelPosition="top"
:labelStyle="{fontWeight:'bold',fontSize:'32rpx'}" labelWidth='100'>
<u-form-item label="想卖什么" prop="userInfo.name" ref="item1">
<u-form-item label="想卖什么" prop="userInfo.name" ref="item1"
@click="navgo('/pages/product/addGoodDetail/goodsSearch')">
<view class="borders">
<u--textarea v-model="model1.userInfo.name" placeholder="请描述您想卖的货品名称,如:红富士苹果、宁夏西瓜、梨。"></u--textarea>
</view>
@ -102,6 +103,11 @@
uni.navigateTo({
url: '/pages/product/addGoodDetail/addGoodDetail'
})
},
navgo(url) {
uni.navigateTo({
url
})
}
},

View File

@ -3,8 +3,44 @@
<u-button icon="plus" text="新增规格" class="custom-style" iconColor='#38BE41'></u-button>
<view class="card">
<view class="card-head">
规格1
<view class="card-head card-li">
<text>规格1</text>
<view class="" style="width: 300rpx;">
<u--input placeholder="请输入规格名称" v-model="text"></u--input>
</view>
</view>
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
<view class="" style="display: flex;align-items: center;justify-content: space-between;">
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入商品单价" v-model="text"></u--input>
<view class="" style="flex: 1;text-align: center;">
/
</view>
<u--input style=" flex: 2;width:100rpx;background-color: #F6F6F6;" placeholder="请输入计量单位"
v-model="text"></u--input>
</view>
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
<view class=" card-li">
<text>商品库存</text>
<view class="" style="width: 300rpx;">
<u--input placeholder="请填写库存数量" v-model="text"></u--input>
</view>
</view>
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
<view class=" card-li">
<text>条形码</text>
<view class="" style="width: 300rpx;">
<u--input placeholder="请填写商品条形码" v-model="text"></u--input>
</view>
</view>
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
<view class="card-li">
<view style="display: flex;">
<u-icon name="trash" style='margin-right: 8rpx;'></u-icon>
</view>
<view class="" style="display: flex;align-items: center;">
<u-switch v-model="value" type='primaryy' activeColor="#38BE41"></u-switch>
<text style="margin-left: 8rpx;">启用</text>
</view>
</view>
</view>
@ -12,6 +48,15 @@
</template>
<script>
export default {
data() {
return {
text: "",
value: ""
}
}
}
</script>
<style lang='scss'>
@ -35,6 +80,13 @@
background-color: white;
border-radius: 16rpx 16rpx 16rpx 16rpx;
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
position: relative;
.card-li {
display: flex;
justify-content: space-between;
align-items: center;
}
}
@ -43,10 +95,12 @@
content: '';
position: absolute;
font-size: 32rpx;
left: 10rpx;
width: 2rpx;
left: 20rpx;
width: 8rpx;
height: 32rpx;
background-color: red;
top: 50rpx;
background-color: #40AE36;
border-radius: 4rpx 4rpx 4rpx 4rpx;
}
}

View File

@ -0,0 +1,120 @@
<template>
<view class="content">
<view class="" style="padding: 30rpx;">
<u-search v-model="keyword" :showAction="true" actionText="搜索" :animation="true"></u-search>
</view>
<view class="" v-if='!keyword' style="padding-left: 44rpx;">
<view style="margin: 60rpx 0 30rpx 14rpx;">
常用分类
</view>
<view class="types">
<view class="types-li">
地方大
</view>
<view class="types-li">
地方撒
</view>
<view class="types-li">
地方撒旦
</view>
<view class="types-li">
地方撒大苏
</view>
<view class="types-li">
地方
</view>
<view class="types-li">
地方撒大苏
</view>
</view>
<view style="margin: 60rpx 0 30rpx 14rpx;">
热门分类
</view>
<view class="types">
<view class="types-li">
地方大
</view>
<view class="types-li">
地方撒
</view>
<view class="types-li">
地方撒旦
</view>
<view class="types-li">
地方撒大苏
</view>
<view class="types-li">
地方
</view>
<view class="types-li">
地方撒大苏
</view>
</view>
</view>
<view class="" v-else style="margin: 10rpx 0 0 30rpx;">
<view class="keyword-li" v-for='item in 10'>
元神--启动
<u-line direction="row" color="#ECECEC"></u-line>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
keyword: ""
}
}
}
</script>
<style lang='scss'>
.MediumFont {
font-family: PingFangFamily;
}
.RegularFont {
font-family: PingFangRegular;
}
.content {
box-sizing: border-box;
background-color: #FFFFFF;
min-height: 100vh;
position: relative;
font-size: 28rpx;
font-family: PingFangFamily;
.types {
display: flex;
flex-wrap: wrap;
.types-li {
background-color: #F6F6F6;
border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 16rpx 24rpx;
margin-bottom: 46rpx;
margin-right: 20rpx;
}
}
.keyword-li {
padding-right: 30rpx;
/* background-color: #F6F6F6; */
height: 100rpx;
line-height: 100rpx;
}
.keyword-li:active {
background-color: #F6F6F6;
}
}
</style>