first
This commit is contained in:
51
pageStoringWine/index/compoents/my-tags.vue
Normal file
51
pageStoringWine/index/compoents/my-tags.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<view class="u-flex u-flex-wrap">
|
||||
<view class="tag-item u-m-r-32" @tap="changeActive(index)" :class="{active:index===active}" v-for="(item,index) in list" :key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
const props=defineProps({
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
defaultIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
|
||||
let active=ref(props.defaultIndex)
|
||||
|
||||
function changeActive(index){
|
||||
active.value=index
|
||||
}
|
||||
const emits=defineEmits(['change'])
|
||||
|
||||
watch(()=>active.value,(newval)=>{
|
||||
emits('change',active.value)
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.tag-item {
|
||||
padding: 8rpx 22rpx;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
background: #F7F7FA;
|
||||
&.active {
|
||||
background: #E6F0FF;
|
||||
color: $my-main-color;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
88
pageStoringWine/index/compoents/recoder-item.vue
Normal file
88
pageStoringWine/index/compoents/recoder-item.vue
Normal file
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<view class="recoder-item bg-fff default-box-padding border-r-18">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="u-flex user-head-img">
|
||||
<image lazy-load src="@/static/uni.png" class="user-head-img" mode=""></image>
|
||||
</view>
|
||||
<view class="u-flex-1 u-flex u-row-between u-p-l-24">
|
||||
<view class="color-666">13416472917</view>
|
||||
<view class="u-font-32 font-bold">
|
||||
<text class="color-999">已过期</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-24 goods border-bottom u-p-b-24">
|
||||
<view class="u-flex bg-gray u-p-10 border-r-12">
|
||||
<view class="u-flex goods-img">
|
||||
<image lazy-load src="@/static/uni.png" class="goods-img" mode=""></image>
|
||||
</view>
|
||||
<view class="u-flex-1 u-p-l-24">
|
||||
<view class="font-bold">言力经典330ml</view>
|
||||
<view class="color-999 u-m-t-16">剩余:9瓶</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-24">
|
||||
<view class="u-flex">
|
||||
<text class="color-999">取酒码</text>
|
||||
<text class="font-bold u-m-l-24">3920240529160807875</text>
|
||||
</view>
|
||||
<view class="u-flex u-m-t-16">
|
||||
<text class="color-999">到期时间</text>
|
||||
<text class="font-bold u-m-l-24">2024-06-18 16:08:07</text>
|
||||
</view>
|
||||
<view class="u-flex u-m-t-16">
|
||||
<text class="color-999">最新记录</text>
|
||||
<text class="font-bold u-m-l-24">取出1瓶,还剩下9瓶</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-right u-m-t-24">
|
||||
<view class="u-m-r-30">
|
||||
<my-button shape="circle" plain width="160" height="60" type="cancel"><view>取酒</view></my-button>
|
||||
</view>
|
||||
<my-button shape="circle" width="180" height="60"><view>查看详情</view></my-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import myButton from '@/components/my-components/my-button'
|
||||
import go from '@/commons/utils/go.js'
|
||||
function toDetail(){
|
||||
go.to('PAGES_STORING_WINE_RECORD_DETAIL',{id:1})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.border-bottom{
|
||||
border-color: rgb(245, 245, 245);
|
||||
}
|
||||
$head-img-size:80rpx;
|
||||
.recoder-item {
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.user-head-img {
|
||||
width: $head-img-size;
|
||||
height: $head-img-size;
|
||||
background-color: rgb(204, 204, 204);
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.goods{
|
||||
padding-left: calc( $head-img-size + 24rpx);
|
||||
.goods-img{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background-color: rgb(204, 204, 204);
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
110
pageStoringWine/index/index.vue
Normal file
110
pageStoringWine/index/index.vue
Normal file
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<view class="min-page bg-gray u-font-28 color-333">
|
||||
<view class="top bg-fff default-box-padding">
|
||||
<view class="tab">
|
||||
<my-tabs @change="tabsChange" :list="pageData.tabs.list" :defaultIndex="pageData.tabs.active"></my-tabs>
|
||||
</view>
|
||||
<view class="u-m-t-32">
|
||||
<my-search :placeholder="pageData.tabs.active===0?'搜索用户昵称/手机号/酒名':'搜索酒名' "></my-search>
|
||||
</view>
|
||||
<view class="u-m-t-24" v-if="pageData.tabs.active===0">
|
||||
<my-tags :list="pageData.status.list" @change="statusChange"></my-tags>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="default-box-padding">
|
||||
<template v-if="wineRecoders.list.length">
|
||||
<view v-for="(item,index) in wineRecoders.list" :key="index">
|
||||
<recoder-item></recoder-item>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<my-empty text="暂没有存酒记录"></my-empty>
|
||||
</template>
|
||||
<view style="height: 200rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="u-fixed bottom u-flex bg-fff ">
|
||||
<view class="u-flex-1 u-relative border-r">
|
||||
<my-button bgColor="#333" color="#fff" borderRadius="100rpx 0 0 100rpx" shape="circle" plain type="primary"
|
||||
@tap="">存酒</my-button>
|
||||
</view>
|
||||
<view class="u-flex-1">
|
||||
<my-button bgColor="#333" color="#fff" borderRadius="0 0 0 0" plain type="primary" @tap="">添加酒品</my-button>
|
||||
</view>
|
||||
<view class="u-flex-1">
|
||||
<my-button borderRadius="0 100rpx 100rpx 0" shape="circle" type="primary" @tap="">
|
||||
<view class="u-flex">
|
||||
<uni-icons type="scan" color="#fff" size="16"></uni-icons>
|
||||
<text class="u-m-l-12">取酒</text>
|
||||
</view>
|
||||
</my-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive
|
||||
} from 'vue';
|
||||
import myTabs from '@/components/my-components/my-tabs'
|
||||
import myEmpty from '@/components/my-components/my-empty'
|
||||
import myButton from '@/components/my-components/my-button'
|
||||
import myTags from './compoents/my-tags'
|
||||
import recoderItem from './compoents/recoder-item'
|
||||
import mySearch from '@/components/my-components/my-search'
|
||||
const pageData = reactive({
|
||||
searchValue: ' ',
|
||||
tabs: {
|
||||
list: ['存酒记录', '可存酒管理'],
|
||||
active: 0
|
||||
},
|
||||
status: {
|
||||
list: ['全部', '储存中', '已取完', '已过期'],
|
||||
active: 0
|
||||
}
|
||||
})
|
||||
|
||||
function tabsChange(i) {
|
||||
pageData.tabs.active = i
|
||||
}
|
||||
|
||||
function statusChange(i) {
|
||||
pageData.status.active = i
|
||||
}
|
||||
|
||||
const wineRecoders = reactive({
|
||||
list: [1, 3, 4, 5]
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.border-r{
|
||||
position: relative;
|
||||
&::after{
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 14rpx;
|
||||
bottom: 14rpx;
|
||||
width: 2rpx;
|
||||
background-color: rgba(255, 255, 255, 0.19);
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
background-color: transparent;
|
||||
bottom: 100rpx;
|
||||
left: 28rpx;
|
||||
right: 28rpx;
|
||||
}
|
||||
|
||||
.top {
|
||||
.tab {
|
||||
padding: 0 140rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
12
pageStoringWine/record-details/record-details.vue
Normal file
12
pageStoringWine/record-details/record-details.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
22
pageStoringWine/storing-wine/storing-wine.vue
Normal file
22
pageStoringWine/storing-wine/storing-wine.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user