feat: 修改配置文件和页面逻辑,优化商品采购和门店管理功能

This commit is contained in:
mkm 2024-09-23 18:46:46 +08:00
parent cf972be23f
commit 585e3e3b56
11 changed files with 2396 additions and 3 deletions

5
api/store.js Normal file
View File

@ -0,0 +1,5 @@
import request from '@/utils/request';
export const menuList = (data) => {
return request.get('/store/store/menu_list', data);
}

View File

@ -17,7 +17,7 @@ switch (env) {
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break; break;
case 'local': case 'local':
BASE_URL = 'http://192.168.1.5:8545'; BASE_URL = 'http://192.168.1.22:8545';
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break; break;
default: default:

View File

@ -40,7 +40,6 @@
</view> </view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> <up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty> </up-empty>
<!-- <button @click="test2">叫我按钮</button> -->
</up-transition> </up-transition>
<up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()"> <up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
<up-form labelPosition="left"> <up-form labelPosition="left">

View File

@ -211,6 +211,48 @@
{ {
"navigationBarTitleText" : "门店订单" "navigationBarTitleText" : "门店订单"
} }
},
{
"path" : "store/index",
"style" :
{
"navigationBarTitleText" : "门店管理"
}
},
{
"path" : "deliveryOrder/index",
"style" :
{
"navigationBarTitleText" : "每日配送统计"
}
},
{
"path" : "deliveryOrder/count",
"style" :
{
"navigationBarTitleText" : "累计配送统计"
}
},
{
"path" : "productSales/index",
"style" :
{
"navigationBarTitleText" : "每日销量统计"
}
},
{
"path" : "productSales/count",
"style" :
{
"navigationBarTitleText" : "累计销售统计"
}
},
{
"path" : "store_product/index",
"style" :
{
"navigationBarTitleText" : "商品库存"
}
} }
] ]
}, },

View File

@ -123,7 +123,7 @@
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell> <up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell> <up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
<up-cell title="商品列表" :isLink="true" url="pages/product/product" v-if="userInfo.system_store_id>0"></up-cell> <up-cell title="商品列表" :isLink="true" url="pages/product/product" v-if="userInfo.system_store_id>0"></up-cell>
<up-cell title="订单列表" :isLink="true" url="pagesOrder/delivery/index" v-if="userInfo.system_store_id>0"></up-cell> <up-cell title="门店管理" :isLink="true" url="pagesOrder/store/index"></up-cell>
<up-cell title="采购列表" :isLink="true" url="pageQuota/purchase_product_offer/index" v-if="userInfo.delivery_service_id>0"></up-cell> <up-cell title="采购列表" :isLink="true" url="pageQuota/purchase_product_offer/index" v-if="userInfo.delivery_service_id>0"></up-cell>
<up-cell title="我要批发" :isLink="true" url="pages/wholesale/index" v-if="userInfo.label_id==99"></up-cell> <up-cell title="我要批发" :isLink="true" url="pages/wholesale/index" v-if="userInfo.label_id==99"></up-cell>
</up-cell-group> </up-cell-group>

View File

@ -0,0 +1,303 @@
<template>
<view style="background-color: #ffffff;">
<up-sticky offset-top="0">
<view class="navbar">
<view style="width: 580rpx;">
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
:showAction="false"></up-search>
</view>
<view class="nav-item" @click="calendarShow=true">
<up-icon name="calendar" color="#2979ff" size="28"></up-icon>
<text>筛选日期</text>
</view>
</view> </up-sticky>
<view class="content">
<up-transition :show="true" mode="slide-left">
<view v-if="goodsList1.length>0">
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
<view class="card-content">
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
</view>
<view class="card-content-r">
<view class="title ellipsis">
{{item.store_name}}
</view>
<view>
单位:{{item.unit_name}}
</view>
<view>
规格:{{item.store_info}}
</view>
<view style="color: red;">
需求量 {{item.need_num}}
</view>
</view>
</view>
<view class="card-footer">
<up-button size="small" type="primary" shape="circle"
@click="cancleOrder(item)" v-if="item.buyer_confirm==0">确认已采购</up-button>
<up-button size="small" type="success" shape="circle"
v-else disabled >{{item.buyer_confirm_name}}</up-button>
</view>
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
</view>
</view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty>
</up-transition>
<up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
<up-form labelPosition="left">
<up-form-item label="名称">
<up-input v-model="formData.store_name" border="none"></up-input>
</up-form-item>
<up-form-item label="数量">
<up-input v-model="formData.nums" border="none" @change='changeInputPrice'></up-input>
</up-form-item>
<up-form-item label="单价">
<up-input v-model="formData.price" border="none" @change='changeInputPrice'></up-input>
</up-form-item>
<up-form-item label="总价">
<up-input v-model="formData.total_price" border="none"></up-input>
</up-form-item>
</up-form>
</up-modal>
</view>
</view>
<up-calendar :show="calendarShow" @confirm="calendarConfirm" @close="calendarShow=false" :closeOnClickOverlay="true"></up-calendar>
</template>
<script setup>
import {
ref,
reactive,
} from "vue"
import {
purchaseProductOfferLists,
purchaseProductOfferUpdate
} from "@/api/purchase_product_offer.js"
const test2 = () => {
console.log("点解")
uni.navigateTo({
url: '/pages/index/index'
})
}
const show = ref(false)
const calendarShow=ref(false)
const formData = ref({
"id": '',
"store_name": '',
'product_id': '',
'nums': '',
'price': '',
'total_price':''
})
const calendarConfirm=(e)=>{
console.log(e[0])
}
// tabsindex
const tabIndex = ref(1)
const {
windowWidth
} = uni.getSystemInfoSync();
const tabsLeft = ref(((windowWidth / 2) - 26) / 2)
const tabsRight = ref(tabsLeft.value + (windowWidth / 2))
// tabsindex
const priceBlur = (index, goodsList) => {
goodsList[index].price = Number(goodsList[index].price).toFixed(2)
}
//
const showGoods = ref(false)
const showGoods1 = ref(false)
const goodsList = ref([])
const goodsList1 = ref([])
const getGoodsList = async () => {
let res = await purchaseProductOfferLists({})
goodsList1.value = res.data.lists
}
const cancleOrder = (item) => {
show.value = true
formData.value.store_name = item['store_name']
formData.value.id = item['id']
formData.value.nums = item['need_num']
formData.value.product_id = item['product_id']
}
const offerUpdate = () => {
purchaseProductOfferUpdate(formData.value).then(res=>{
uni.$u.toast(res.msg);
show.value=false
getGoodsList()
})
}
const changeInputPrice=(e)=>{
if(formData.value.nums>0 && formData.value.price>0){
formData.value.total_price=formData.value.nums*formData.value.price
}
}
getGoodsList()
</script>
<style lang="scss">
.navbar {
padding: 0 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 22rpx;
color: #777;
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
image {
height: 40rpx;
width: 40rpx;
}
.badge {
position: absolute;
top: -10rpx;
right: 10rpx;
background-color: #FF0000;
color: #FFFFFF;
text-align: center;
width: 30rpx;
height: 30rpx;
border-radius: 30rpx;
font-size: 18rpx;
}
}
}
.head {
padding: 20rpx;
background-color: white;
position: relative;
.act {
color: #20B128;
}
.line {
width: 26px;
height: 5rpx;
background-color: #20B128;
border-radius: 50rpx;
position: absolute;
transition: 300ms;
}
}
.content {
padding: 20rpx;
padding-bottom: 150rpx;
.card {
width: 710rpx;
margin: 0 auto;
padding: 20rpx;
box-sizing: border-box;
background-color: white;
.card-content {
display: flex;
position: relative;
.card-content-l {
margin-right: 20rpx;
position: relative;
.status {
width: 152rpx;
height: 40rpx;
background-color: rgba(0, 0, 0, .3);
text-align: center;
color: white;
font-size: 24rpx;
line-height: 40rpx;
position: absolute;
bottom: 0;
}
}
.card-content-r {
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 30rpx;
width: 500rpx;
}
.need {
color: #777777;
font-size: 24rpx;
}
.ipt {
display: flex;
height: 56rpx;
}
}
.status-png {
position: absolute;
right: 20rpx;
}
}
.card-footer {
margin-top: 30rpx;
text-align: right;
font-size: 28rpx;
color: #060606;
}
}
.submit-btn {
position: fixed;
bottom: 50rpx;
width: 710rpx;
margin: 0 auto;
}
}
.detail {
width: 88rpx;
height: 88rpx;
border-radius: 88rpx;
text-align: center;
line-height: 88rpx;
background-color: #50C758;
color: white;
position: absolute;
bottom: 300rpx;
right: 20rpx;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -0,0 +1,303 @@
<template>
<view style="background-color: #ffffff;">
<up-sticky offset-top="0">
<view class="navbar">
<view style="width: 580rpx;">
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
:showAction="false"></up-search>
</view>
<view class="nav-item" @click="calendarShow=true">
<up-icon name="calendar" color="#2979ff" size="28"></up-icon>
<text>筛选日期</text>
</view>
</view> </up-sticky>
<view class="content">
<up-transition :show="true" mode="slide-left">
<view v-if="goodsList1.length>0">
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
<view class="card-content">
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
</view>
<view class="card-content-r">
<view class="title ellipsis">
{{item.store_name}}
</view>
<view>
单位:{{item.unit_name}}
</view>
<view>
规格:{{item.store_info}}
</view>
<view style="color: red;">
需求量 {{item.need_num}}
</view>
</view>
</view>
<view class="card-footer">
<up-button size="small" type="primary" shape="circle"
@click="cancleOrder(item)" v-if="item.buyer_confirm==0">确认已采购</up-button>
<up-button size="small" type="success" shape="circle"
v-else disabled >{{item.buyer_confirm_name}}</up-button>
</view>
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
</view>
</view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty>
</up-transition>
<up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
<up-form labelPosition="left">
<up-form-item label="名称">
<up-input v-model="formData.store_name" border="none"></up-input>
</up-form-item>
<up-form-item label="数量">
<up-input v-model="formData.nums" border="none" @change='changeInputPrice'></up-input>
</up-form-item>
<up-form-item label="单价">
<up-input v-model="formData.price" border="none" @change='changeInputPrice'></up-input>
</up-form-item>
<up-form-item label="总价">
<up-input v-model="formData.total_price" border="none"></up-input>
</up-form-item>
</up-form>
</up-modal>
</view>
</view>
<up-calendar :show="calendarShow" @confirm="calendarConfirm" @close="calendarShow=false" :closeOnClickOverlay="true"></up-calendar>
</template>
<script setup>
import {
ref,
reactive,
} from "vue"
import {
purchaseProductOfferLists,
purchaseProductOfferUpdate
} from "@/api/purchase_product_offer.js"
const test2 = () => {
console.log("点解")
uni.navigateTo({
url: '/pages/index/index'
})
}
const show = ref(false)
const calendarShow=ref(false)
const formData = ref({
"id": '',
"store_name": '',
'product_id': '',
'nums': '',
'price': '',
'total_price':''
})
const calendarConfirm=(e)=>{
console.log(e[0])
}
// tabsindex
const tabIndex = ref(1)
const {
windowWidth
} = uni.getSystemInfoSync();
const tabsLeft = ref(((windowWidth / 2) - 26) / 2)
const tabsRight = ref(tabsLeft.value + (windowWidth / 2))
// tabsindex
const priceBlur = (index, goodsList) => {
goodsList[index].price = Number(goodsList[index].price).toFixed(2)
}
//
const showGoods = ref(false)
const showGoods1 = ref(false)
const goodsList = ref([])
const goodsList1 = ref([])
const getGoodsList = async () => {
let res = await purchaseProductOfferLists({})
goodsList1.value = res.data.lists
}
const cancleOrder = (item) => {
show.value = true
formData.value.store_name = item['store_name']
formData.value.id = item['id']
formData.value.nums = item['need_num']
formData.value.product_id = item['product_id']
}
const offerUpdate = () => {
purchaseProductOfferUpdate(formData.value).then(res=>{
uni.$u.toast(res.msg);
show.value=false
getGoodsList()
})
}
const changeInputPrice=(e)=>{
if(formData.value.nums>0 && formData.value.price>0){
formData.value.total_price=formData.value.nums*formData.value.price
}
}
getGoodsList()
</script>
<style lang="scss">
.navbar {
padding: 0 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 22rpx;
color: #777;
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
image {
height: 40rpx;
width: 40rpx;
}
.badge {
position: absolute;
top: -10rpx;
right: 10rpx;
background-color: #FF0000;
color: #FFFFFF;
text-align: center;
width: 30rpx;
height: 30rpx;
border-radius: 30rpx;
font-size: 18rpx;
}
}
}
.head {
padding: 20rpx;
background-color: white;
position: relative;
.act {
color: #20B128;
}
.line {
width: 26px;
height: 5rpx;
background-color: #20B128;
border-radius: 50rpx;
position: absolute;
transition: 300ms;
}
}
.content {
padding: 20rpx;
padding-bottom: 150rpx;
.card {
width: 710rpx;
margin: 0 auto;
padding: 20rpx;
box-sizing: border-box;
background-color: white;
.card-content {
display: flex;
position: relative;
.card-content-l {
margin-right: 20rpx;
position: relative;
.status {
width: 152rpx;
height: 40rpx;
background-color: rgba(0, 0, 0, .3);
text-align: center;
color: white;
font-size: 24rpx;
line-height: 40rpx;
position: absolute;
bottom: 0;
}
}
.card-content-r {
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 30rpx;
width: 500rpx;
}
.need {
color: #777777;
font-size: 24rpx;
}
.ipt {
display: flex;
height: 56rpx;
}
}
.status-png {
position: absolute;
right: 20rpx;
}
}
.card-footer {
margin-top: 30rpx;
text-align: right;
font-size: 28rpx;
color: #060606;
}
}
.submit-btn {
position: fixed;
bottom: 50rpx;
width: 710rpx;
margin: 0 auto;
}
}
.detail {
width: 88rpx;
height: 88rpx;
border-radius: 88rpx;
text-align: center;
line-height: 88rpx;
background-color: #50C758;
color: white;
position: absolute;
bottom: 300rpx;
right: 20rpx;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -0,0 +1,303 @@
<template>
<view style="background-color: #ffffff;">
<up-sticky offset-top="0">
<view class="navbar">
<view style="width: 580rpx;">
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
:showAction="false"></up-search>
</view>
<view class="nav-item" @click="calendarShow=true">
<up-icon name="calendar" color="#2979ff" size="28"></up-icon>
<text>筛选日期</text>
</view>
</view> </up-sticky>
<view class="content">
<up-transition :show="true" mode="slide-left">
<view v-if="goodsList1.length>0">
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
<view class="card-content">
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
</view>
<view class="card-content-r">
<view class="title ellipsis">
{{item.store_name}}
</view>
<view>
单位:{{item.unit_name}}
</view>
<view>
规格:{{item.store_info}}
</view>
<view style="color: red;">
需求量 {{item.need_num}}
</view>
</view>
</view>
<view class="card-footer">
<up-button size="small" type="primary" shape="circle"
@click="cancleOrder(item)" v-if="item.buyer_confirm==0">确认已采购</up-button>
<up-button size="small" type="success" shape="circle"
v-else disabled >{{item.buyer_confirm_name}}</up-button>
</view>
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
</view>
</view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty>
</up-transition>
<up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
<up-form labelPosition="left">
<up-form-item label="名称">
<up-input v-model="formData.store_name" border="none"></up-input>
</up-form-item>
<up-form-item label="数量">
<up-input v-model="formData.nums" border="none" @change='changeInputPrice'></up-input>
</up-form-item>
<up-form-item label="单价">
<up-input v-model="formData.price" border="none" @change='changeInputPrice'></up-input>
</up-form-item>
<up-form-item label="总价">
<up-input v-model="formData.total_price" border="none"></up-input>
</up-form-item>
</up-form>
</up-modal>
</view>
</view>
<up-calendar :show="calendarShow" @confirm="calendarConfirm" @close="calendarShow=false" :closeOnClickOverlay="true"></up-calendar>
</template>
<script setup>
import {
ref,
reactive,
} from "vue"
import {
purchaseProductOfferLists,
purchaseProductOfferUpdate
} from "@/api/purchase_product_offer.js"
const test2 = () => {
console.log("点解")
uni.navigateTo({
url: '/pages/index/index'
})
}
const show = ref(false)
const calendarShow=ref(false)
const formData = ref({
"id": '',
"store_name": '',
'product_id': '',
'nums': '',
'price': '',
'total_price':''
})
const calendarConfirm=(e)=>{
console.log(e[0])
}
// tabsindex
const tabIndex = ref(1)
const {
windowWidth
} = uni.getSystemInfoSync();
const tabsLeft = ref(((windowWidth / 2) - 26) / 2)
const tabsRight = ref(tabsLeft.value + (windowWidth / 2))
// tabsindex
const priceBlur = (index, goodsList) => {
goodsList[index].price = Number(goodsList[index].price).toFixed(2)
}
//
const showGoods = ref(false)
const showGoods1 = ref(false)
const goodsList = ref([])
const goodsList1 = ref([])
const getGoodsList = async () => {
let res = await purchaseProductOfferLists({})
goodsList1.value = res.data.lists
}
const cancleOrder = (item) => {
show.value = true
formData.value.store_name = item['store_name']
formData.value.id = item['id']
formData.value.nums = item['need_num']
formData.value.product_id = item['product_id']
}
const offerUpdate = () => {
purchaseProductOfferUpdate(formData.value).then(res=>{
uni.$u.toast(res.msg);
show.value=false
getGoodsList()
})
}
const changeInputPrice=(e)=>{
if(formData.value.nums>0 && formData.value.price>0){
formData.value.total_price=formData.value.nums*formData.value.price
}
}
getGoodsList()
</script>
<style lang="scss">
.navbar {
padding: 0 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 22rpx;
color: #777;
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
image {
height: 40rpx;
width: 40rpx;
}
.badge {
position: absolute;
top: -10rpx;
right: 10rpx;
background-color: #FF0000;
color: #FFFFFF;
text-align: center;
width: 30rpx;
height: 30rpx;
border-radius: 30rpx;
font-size: 18rpx;
}
}
}
.head {
padding: 20rpx;
background-color: white;
position: relative;
.act {
color: #20B128;
}
.line {
width: 26px;
height: 5rpx;
background-color: #20B128;
border-radius: 50rpx;
position: absolute;
transition: 300ms;
}
}
.content {
padding: 20rpx;
padding-bottom: 150rpx;
.card {
width: 710rpx;
margin: 0 auto;
padding: 20rpx;
box-sizing: border-box;
background-color: white;
.card-content {
display: flex;
position: relative;
.card-content-l {
margin-right: 20rpx;
position: relative;
.status {
width: 152rpx;
height: 40rpx;
background-color: rgba(0, 0, 0, .3);
text-align: center;
color: white;
font-size: 24rpx;
line-height: 40rpx;
position: absolute;
bottom: 0;
}
}
.card-content-r {
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 30rpx;
width: 500rpx;
}
.need {
color: #777777;
font-size: 24rpx;
}
.ipt {
display: flex;
height: 56rpx;
}
}
.status-png {
position: absolute;
right: 20rpx;
}
}
.card-footer {
margin-top: 30rpx;
text-align: right;
font-size: 28rpx;
color: #060606;
}
}
.submit-btn {
position: fixed;
bottom: 50rpx;
width: 710rpx;
margin: 0 auto;
}
}
.detail {
width: 88rpx;
height: 88rpx;
border-radius: 88rpx;
text-align: center;
line-height: 88rpx;
background-color: #50C758;
color: white;
position: absolute;
bottom: 300rpx;
right: 20rpx;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -0,0 +1,303 @@
<template>
<view style="background-color: #ffffff;">
<up-sticky offset-top="0">
<view class="navbar">
<view style="width: 580rpx;">
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
:showAction="false"></up-search>
</view>
<view class="nav-item" @click="calendarShow=true">
<up-icon name="calendar" color="#2979ff" size="28"></up-icon>
<text>筛选日期</text>
</view>
</view> </up-sticky>
<view class="content">
<up-transition :show="true" mode="slide-left">
<view v-if="goodsList1.length>0">
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
<view class="card-content">
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
<image style="width: 152rpx;height: 152rpx;" :src="item.image" mode=""></image>
</view>
<view class="card-content-r">
<view class="title ellipsis">
{{item.store_name}}
</view>
<view>
单位:{{item.unit_name}}
</view>
<view>
规格:{{item.store_info}}
</view>
<view style="color: red;">
需求量 {{item.need_num}}
</view>
</view>
</view>
<view class="card-footer">
<up-button size="small" type="primary" shape="circle"
@click="cancleOrder(item)" v-if="item.buyer_confirm==0">确认已采购</up-button>
<up-button size="small" type="success" shape="circle"
v-else disabled >{{item.buyer_confirm_name}}</up-button>
</view>
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
</view>
</view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty>
</up-transition>
<up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
<up-form labelPosition="left">
<up-form-item label="名称">
<up-input v-model="formData.store_name" border="none"></up-input>
</up-form-item>
<up-form-item label="数量">
<up-input v-model="formData.nums" border="none" @change='changeInputPrice'></up-input>
</up-form-item>
<up-form-item label="单价">
<up-input v-model="formData.price" border="none" @change='changeInputPrice'></up-input>
</up-form-item>
<up-form-item label="总价">
<up-input v-model="formData.total_price" border="none"></up-input>
</up-form-item>
</up-form>
</up-modal>
</view>
</view>
<up-calendar :show="calendarShow" @confirm="calendarConfirm" @close="calendarShow=false" :closeOnClickOverlay="true"></up-calendar>
</template>
<script setup>
import {
ref,
reactive,
} from "vue"
import {
purchaseProductOfferLists,
purchaseProductOfferUpdate
} from "@/api/purchase_product_offer.js"
const test2 = () => {
console.log("点解")
uni.navigateTo({
url: '/pages/index/index'
})
}
const show = ref(false)
const calendarShow=ref(false)
const formData = ref({
"id": '',
"store_name": '',
'product_id': '',
'nums': '',
'price': '',
'total_price':''
})
const calendarConfirm=(e)=>{
console.log(e[0])
}
// tabsindex
const tabIndex = ref(1)
const {
windowWidth
} = uni.getSystemInfoSync();
const tabsLeft = ref(((windowWidth / 2) - 26) / 2)
const tabsRight = ref(tabsLeft.value + (windowWidth / 2))
// tabsindex
const priceBlur = (index, goodsList) => {
goodsList[index].price = Number(goodsList[index].price).toFixed(2)
}
//
const showGoods = ref(false)
const showGoods1 = ref(false)
const goodsList = ref([])
const goodsList1 = ref([])
const getGoodsList = async () => {
let res = await purchaseProductOfferLists({})
goodsList1.value = res.data.lists
}
const cancleOrder = (item) => {
show.value = true
formData.value.store_name = item['store_name']
formData.value.id = item['id']
formData.value.nums = item['need_num']
formData.value.product_id = item['product_id']
}
const offerUpdate = () => {
purchaseProductOfferUpdate(formData.value).then(res=>{
uni.$u.toast(res.msg);
show.value=false
getGoodsList()
})
}
const changeInputPrice=(e)=>{
if(formData.value.nums>0 && formData.value.price>0){
formData.value.total_price=formData.value.nums*formData.value.price
}
}
getGoodsList()
</script>
<style lang="scss">
.navbar {
padding: 0 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 22rpx;
color: #777;
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
image {
height: 40rpx;
width: 40rpx;
}
.badge {
position: absolute;
top: -10rpx;
right: 10rpx;
background-color: #FF0000;
color: #FFFFFF;
text-align: center;
width: 30rpx;
height: 30rpx;
border-radius: 30rpx;
font-size: 18rpx;
}
}
}
.head {
padding: 20rpx;
background-color: white;
position: relative;
.act {
color: #20B128;
}
.line {
width: 26px;
height: 5rpx;
background-color: #20B128;
border-radius: 50rpx;
position: absolute;
transition: 300ms;
}
}
.content {
padding: 20rpx;
padding-bottom: 150rpx;
.card {
width: 710rpx;
margin: 0 auto;
padding: 20rpx;
box-sizing: border-box;
background-color: white;
.card-content {
display: flex;
position: relative;
.card-content-l {
margin-right: 20rpx;
position: relative;
.status {
width: 152rpx;
height: 40rpx;
background-color: rgba(0, 0, 0, .3);
text-align: center;
color: white;
font-size: 24rpx;
line-height: 40rpx;
position: absolute;
bottom: 0;
}
}
.card-content-r {
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 30rpx;
width: 500rpx;
}
.need {
color: #777777;
font-size: 24rpx;
}
.ipt {
display: flex;
height: 56rpx;
}
}
.status-png {
position: absolute;
right: 20rpx;
}
}
.card-footer {
margin-top: 30rpx;
text-align: right;
font-size: 28rpx;
color: #060606;
}
}
.submit-btn {
position: fixed;
bottom: 50rpx;
width: 710rpx;
margin: 0 auto;
}
}
.detail {
width: 88rpx;
height: 88rpx;
border-radius: 88rpx;
text-align: center;
line-height: 88rpx;
background-color: #50C758;
color: white;
position: absolute;
bottom: 300rpx;
right: 20rpx;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

178
pagesOrder/store/index.vue Normal file
View File

@ -0,0 +1,178 @@
<template>
<view
style="--view-theme: rgb(32, 177, 40);--view-priceColor:#FF7600;--view-minorColor:rgba(108, 198, 94, 0.5);--view-minorColorT:rgba(66, 202, 77, 0.1);--view-bntColor:#FE960F;--view-gradient:#4DEA4D">
<view class='cash-withdrawal'>
<!-- #ifdef MP -->
<view class="accountTitle">
<view :style="{height:getHeight.barTop+'px'}"></view>
<view class="sysTitle acea-row row-center-wrapper" :style="{height:getHeight.barHeight+'px'}">
<text class="iconfont icon-ic_leftarrow" @click="goarrow"></text>
</view>
</view>
<view :style="{height:(getHeight.barTop+getHeight.barHeight)+'px'}"></view>
<!-- #endif -->
<view class="header">
<view class="headerCon">
<view class="money">000</view>
<view>可提现金额</view>
</view>
</view>
</view>
<view class="content">
<up-transition :show="true" mode="slide-left">
<view v-if="goodsList1.length>0">
<navigator :url="item.url" hover-class="navigator-hover" class="card" v-for="(item,index) in goodsList1" :key='index'>
<view class="card-content">
<view class="card-content-r">
<view class="title ellipsis">
{{item.name}}
</view>
</view>
</view>
</navigator>
</view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty>
</up-transition>
</view>
</view>
</template>
<script setup>
import {
ref,
reactive
} from 'vue';
import {
onLoad,
onShow
} from '@dcloudio/uni-app';
import {
menuList
} from "@/api/store"
const goodsList1 = ref([])
const getGoodsList = async () => {
let res = await menuList({})
goodsList1.value = res.data.menu
}
getGoodsList()
</script>
<style lang="scss">
.cash-withdrawal {
.accountTitle {
background: linear-gradient(90deg, var(--view-theme) 0%, var(--view-gradient) 100%);
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 99;
.sysTitle {
width: 100%;
position: relative;
font-weight: 500;
color: #fff;
font-size: 30rpx;
.iconfont {
position: absolute;
font-size: 36rpx;
left: 11rpx;
width: 60rpx;
}
}
}
.header {
width: 100%;
height: 310rpx;
background: linear-gradient(90deg, var(--view-theme) 0%, var(--view-gradient) 100%);
font-size: 30rpx;
font-weight: 400;
color: #F5F5F5;
text-align: center;
padding-top: 88rpx;
position: relative;
.headerCon {
background-image: url('../static/cashBg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: 278rpx;
}
.money {
font-size: 76rpx;
font-weight: 600;
color: #FFFFFF;
font-family: 'Regular';
margin-bottom: 16rpx;
}
}
}
.content {
padding: 20rpx;
padding-bottom: 150rpx;
.card {
width: 350rpx;
margin: 2rpx;
padding: 92rpx;
box-sizing: border-box;
background-color: white;
display: inline-block;
.card-content {
display: flex;
position: relative;
.card-content-l {
margin-right: 20rpx;
position: relative;
.status {
width: 152rpx;
height: 40rpx;
background-color: rgba(0, 0, 0, .3);
text-align: center;
color: white;
font-size: 24rpx;
line-height: 40rpx;
position: absolute;
bottom: 0;
}
}
.card-content-r {
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 30rpx;
width: 500rpx;
}
.need {
color: #777777;
font-size: 24rpx;
}
.ipt {
display: flex;
height: 56rpx;
}
}
}
}
}
</style>

View File

@ -0,0 +1,957 @@
<style lang="scss" scoped>
.share-btn {
display: flex;
align-items: center;
position: fixed;
width: 60rpx;
z-index: 20;
::v-deep.u-button {
border: 0;
border-color: transparent;
.u-icon__icon {
font-size: 60rpx !important;
color: #030303;
}
}
}
</style>
<template>
<view class="content">
<view class="navbar">
<view style="width: 100%;">
<up-search placeholder="请输入商品" @search="searchKeyword" @clear="searchKeyword" v-model="keyword"
:showAction="false"></up-search>
</view>
</view>
<view class='headScoll' ref='headscroll' :style="{ height: isScroll ? '0' : '170rpx' }">
<scroll-view class="head-view" scroll-x @scrolltolower="getgoodClassList(0)">
<view class="list">
<view class="item" :class="{ 'item-active': topActive === item.id }"
v-for="(item, index) in goodClassList" :key="index" @click="changeOne(item, index)">
<view class="c-img"><up-image height="100rpx" width="100rpx" :src="item.pic"></up-image></view>
<view class="c-text u-line-1">{{ item.name }}</view>
</view>
<view class="item" style="width: 80rpx;height: 20rpx;">
</view>
</view>
</scroll-view>
<view class="r-btn" @click="show = 1">
<view></view>
<view></view>
<up-icon name="list"></up-icon>
</view>
</view>
<viewPopup nav v-if="show === 1" @close="show = 0">
<view class="cateOne">
<view class="head-title">全部分类</view>
<scroll-view scroll-y style="height: 600rpx;">
<view class="list">
<view class="item" :class="{ 'item-active': topActive === item.id }"
v-for="(item, index) in goodClassList" :key="index" @click="changeOne(item, index)">
<view class="c-img"><up-image height="100rpx" width="100rpx" :src="item.pic"></up-image>
</view>
<view class="c-text u-line-1">{{ item.name }}</view>
</view>
</view>
</scroll-view>
</view>
</viewPopup>
<view class="scroll-box">
<scroll-view class="left" scroll-y @scrolltolower="getgoodClassList(topActive)">
<view class="item u-line-1" :class="{ 'item-active': leftActive === item.id }"
v-for="(item, index) in goodClassTow" :key="index" @click="changeTwo(item, index)">{{ item.name }}
</view>
<view style="width: 100%;height: 450rpx;"></view>
</scroll-view>
<view class="right">
<view class="classify">
<scroll-view style="height: 90rpx;" scroll-x @scrolltolower="getgoodClassList(leftActive)">
<view class="classify-list">
<view class="classify-list-item u-line-1"
:class="{ 'item-active': rightActive === item.id }"
v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
{{ item.name }}
</view>
<view style="width: 70rpx;flex-shrink: 0;"></view>
</view>
</scroll-view>
<view class="done" @click="show = 2">
<up-icon name="arrow-down"></up-icon>
</view>
<view class="order-by">
<view class="item" :class="{ 'order-active': where.order == '' }" @click="changeOrder('')">综合
</view>
<view class="item" style="display: flex;align-items: center;"
:class="{ 'order-active': where.order == 'desc' || where.order == 'asc' }"
@click="changeOrder(where.order == 'asc' ? 'desc' : 'asc')">
价格
<view style="color: black;">
<up-icon name="arrow-up-fill" :color="where.order=='asc'?'#20b128':'' "
size="8"></up-icon>
<up-icon name="arrow-down-fill" :color="where.order=='desc'?'#20b128':'' "
size="8"></up-icon>
</view>
</view>
<view class="item" :class="{ 'order-active': where.order == 'sales' }"
@click="changeOrder('sales')">销量
</view>
</view>
</view>
<viewPopup v-if="show === 2" @close="show = 0">
<view class="cateOne">
<scroll-view scroll-y style="height: 230rpx;" @scrolltolower="getgoodClassList(leftActive)">
<view class="classify-list">
<view class="classify-list-item u-line-1"
:class="{ 'item-active': rightActive === item.id }"
v-for="(item, index) in goodClassThree" :key="index"
@click="changeThree(item, index)">
{{ item.name }}
</view>
</view>
</scroll-view>
</view>
</viewPopup>
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView"
scroll-y @scrolltolower="loadMoreGood">
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id"
>
<view class="shop-img"
:style="{ backgroundImage: `url(${item.image}?x-oss-process=image/format,webp)` }">
</view>
<view class="shop-content">
<view class="goods-name" style="font-size: 28rpx;color: #060606;">
{{ item.store_name }}
</view>
<view class="shop-content-li" v-if="priceKey.off_activity==1">
<view class="shop-content-li-l">
售价
</view>
<view class="shop-content-li-r" style="color:#FC452F ;"><text
style="font-size: 30rpx;">{{item[priceKey.price]}}</text>/{{ item.unit_name }}
</view>
<view class="tag" v-if="item.tag">
<view class="icon" />
{{item.tag}}
</view>
</view>
<view class="shop-content-li" style="color: #999999;" v-if="priceKey.off_activity==1">
<view class="shop-content-li-l">原价</view>
<view class="shop-content-li-r line-through">{{item[priceKey.op_price]}}</view>
</view>
<view class="shop-content-li" v-else>
<view class="shop-content-li-l">售价</view>
<view class="shop-content-li-r" style="color:#FC452F ;"><text
style="font-size: 28rpx;">{{item[priceKey.op_price]}}</text>
</view>
</view>
<view class="shop-content-li" style="justify-content: space-between;"
v-if="item.store_info">
<view style="display: flex;">
<view class="shop-content-li-l">规格</view>
<view class="shop-content-li-r">{{ item.store_info }}</view>
</view>
</view>
<view class="shop-content-li" style="justify-content: space-between;" v-if="item.batch">
<view style="display: flex;">
<view class="shop-content-li-l">起批量</view>
<view class="shop-content-li-r">{{ item.batch }}{{ item.unit_name }}起卖</view>
</view>
<!-- <view class="btn">
<u--icon name="plus-circle-fill" size="20" color="#20b128"></u--icon>
</view> -->
</view>
</view>
</view>
<view style="width: 100%;height: 470rpx;"></view>
</scroll-view>
</view>
</view>
</view>
</template>
<script setup>
import {
onLoad,
onShow,
onShareAppMessage,
} from "@dcloudio/uni-app"
import {
reactive,
ref,
onMounted,
} from "vue"
import {
goodListApi,
storeProductWholesaleListApi,
goodClassListApi
} from "@/api/good.js"
import viewPopup from "@/components/viewPopup.vue"
import {
getCurrentInstance
} from 'vue';
import {
shopDetailApi
} from "@/api/multipleShop.js";
const priceKey = reactive({
off_activity: "",
op_price: "",
price: ""
})
const showModal = ref(false)
const navgo = (url) => {
showModal.value &&= false
uni.navigateTo({
url
})
}
/*商品列表滚动隐藏头部导航 */
const targetHeight = ref(0)
let scoHeight = 0
const isScroll = ref(false)
let lastScollTop = 0
const hideHeadView = (e) => {
if (e.detail.scrollTop < 100) return
if (e.detail.scrollTop <= 0 || e.detail.scrollTop > targetHeight.value)
return
isScroll.value = e.detail.scrollTop > lastScollTop
lastScollTop = e.detail.scrollTop
}
/*商品列表滚动隐藏头部导航结束 */
const show = ref(0);
const topActive = ref(0);
const changeOne = async (item, index) => {
where.value.top_cate_id = item.id
delete where.value.two_cate_id // id, , id,
topActive.value = item.id;
show.value = 0;
goodClassTow.value = item?.children || [];
goodClassThree.value = goodClassTow.value[0]?.children || [];
leftActive.value = goodClassTow.value[0]?.id || '';
rightActive.value = goodClassThree.value[0]?.id || '';
getGoodList();
if (!item.isLoading && item.id) getgoodClassList(topActive.value, 2); // , ,
}
const leftActive = ref(0);
const changeTwo = (item, index) => {
console.log(item)
where.value.two_cate_id = item.id
isScroll.value = false;
getWXDom(instance)
leftActive.value = item.id;
show.value = 0;
goodClassThree.value = item?.children || [];
rightActive.value = goodClassThree.value[0]?.id || '';
getGoodList();
if (!item.isLoading && item.id) getgoodClassList(leftActive.value, 3); // , ,
}
const rightActive = ref(0);
const changeThree = (item, index) => {
rightActive.value = item.id;
show.value = 0;
getGoodList();
}
const keyword = ref('');
const searchKeyword = () => {
where.value.name = keyword.value;
where.value.store_name = keyword.value;
getGoodList();
}
const changeOrder = (order) => {
switch (order) {
case 'asc':
where.value.field = 'price'
break;
case 'desc':
where.value.field = 'price'
break;
case 'sales':
where.value.field = 'sales'
break;
default:
where.value.field = ''
}
where.value.order = order;
getGoodList();
}
const where = ref({
page_no: 1,
page_size: 15,
name: '',
order: '',
store_name: '',
store_id: '',
field: "",
})
const loading = ref(true);
const goodList = ref([]);
const getGoodList = (loadmore = false) => {
loading.value = true;
let class_id = rightActive.value || leftActive.value || topActive.value || '';
let class_all = '';
// ,
if (rightActive.value == '') class_all = leftActive.value;
if (leftActive.value == '') class_all = topActive.value;
if (topActive.value == '') class_all = '';
if (class_all) class_id = ""; //
if (loadmore) where.value.page_no++;
else where.value.page_no = 1;
let data = {
...where.value,
class_all: class_all,
class: class_id,
cate_id: class_id,
source: 4,
// top_cate_id: "",
// two_cate_id: ""
}
storeProductWholesaleListApi(data).then(res => {
for (let key in res.data.extend) {
priceKey[key] = res.data.extend[key]
}
uni.setStorageSync("PRICE_KEY", JSON.stringify(priceKey))
if (loadmore) goodList.value.push(...res.data.lists);
else goodList.value = res.data.lists;
})
}
//
const loadMoreGood = () => {
getWXDom(instance)
getGoodList(true);
}
const goodClassList = ref([]); //
const goodClassTow = ref([]); //
const goodClassThree = ref([]); //
const classMap = new Map();
const getgoodClassList = (pid = 0, three = 1) => {
let page_no = classMap.get(pid) || 1;
goodClassListApi({
pid: pid,
page_no: page_no,
page_size: 30,
level: three,
source: 4 //
}).then(res => {
if (pid == 0) { //
if (!res.data?.lists?.length) return;
res.data?.lists?.unshift({
id: "",
name: "全部",
pic: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png",
children: []
})
res.data.lists = res.data.lists.map(item => {
if (!item.children) item.children = [];
item.children?.unshift({
id: "",
pid: item.id, //
name: "全部",
})
item.children = item.children.map(t => {
if (!t.children) t.children = [];
t.children?.unshift({
id: "",
pid: t.id,
name: "全部",
})
return t;
})
return item;
})
//
goodClassList.value = [...goodClassList.value, ...res.data?.lists];
goodClassTow.value = goodClassList.value[0]?.children || [];
goodClassThree.value = goodClassTow.value[0]?.children || [];
topActive.value = goodClassList.value[0]?.id;
leftActive.value = goodClassTow.value[0]?.id;
rightActive.value = goodClassThree.value[0]?.id;
} else {
let flag = 1;
goodClassList.value.forEach(item => { //
if (item.id == pid) {
if (!item.children) {
item.children = [];
item.children.unshift({
id: "",
pid: item.id,
name: "全部",
})
}
item.children = [...item.children, ...res.data.lists];
item.isLoading = true;
goodClassTow.value = item.children;
flag = 0;
}
})
if (flag) goodClassTow.value.forEach(item => { //
if (item.id == pid) {
if (!item.children) {
item.children = [];
item.children.unshift({
id: "",
pid: item.id,
name: "全部",
})
}
item.children = [...item.children, ...res.data.lists];
item.isLoading = true;
goodClassThree.value = item.children;
}
})
}
page_no++;
classMap.set(pid, page_no);
})
}
//
const btns = ref({
height: 0,
top: 0,
bottom: 0,
left: 0
});
onLoad(async (opt) => {
getAll()
// #ifndef H5
//
btns.value = uni.getMenuButtonBoundingClientRect();
// #endif
})
const getAll = () => {
getgoodClassList(0)
getGoodList()
}
let instance; //
const getWXDom = () => {
let query = uni.createSelectorQuery().in(instance).select("#drag_area");
query.fields({
size: true,
scrollOffset: true,
},
(data) => {
scoHeight = data.scrollHeight
targetHeight.value = data.scrollHeight - data.height
}
).exec();
}
onMounted(() => {
instance = getCurrentInstance(); //
setTimeout(() => {
getWXDom(instance)
}, 500)
})
</script>
<style lang="scss">
.content {
background-color: #fff;
}
.navbar {
padding: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 22rpx;
color: #777;
// margin-top: 40rpx;
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
image {
height: 40rpx;
width: 40rpx;
}
.badge {
position: absolute;
top: -10rpx;
right: 10rpx;
background-color: #FF0000;
color: #FFFFFF;
text-align: center;
width: 30rpx;
height: 30rpx;
border-radius: 30rpx;
font-size: 18rpx;
}
}
}
.head-view {
background-color: #fff;
height: 180rpx;
width: 750rpx;
.list {
height: 100%;
display: flex;
align-items: center;
padding: 0 20rpx;
font-size: 22rpx;
.item {
width: 120rpx;
flex-shrink: 0;
margin-right: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
.c-img {
height: 100rpx;
width: 100rpx;
flex-shrink: 0;
border-radius: 50%;
border: 2px solid transparent;
overflow: hidden;
}
.c-text {
width: 100%;
text-align: center;
box-sizing: border-box;
padding: 2rpx 4rpx 3rpx 4rpx;
border-radius: 50rpx;
margin-top: 5rpx;
}
}
.item-active {
.c-img {
border: 2px solid #20b128;
}
.c-text {
background-color: #20b128;
color: #fff;
}
}
}
}
.r-btn {
position: absolute;
right: 0;
top: 0;
height: 100%;
width: 60rpx;
font-size: 24rpx;
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-shadow: -10rpx 0 60rpx 1rpx rgba(0, 0, 0, 0.3);
}
.cateOne {
background-color: #fff;
.head-title {
color: #666666;
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
padding-left: 30rpx;
}
.list {
padding: 20rpx 20rpx;
font-size: 22rpx;
display: grid;
grid-template-columns: repeat(5, 1fr);
justify-content: center;
grid-gap: 20rpx;
.item {
width: 120rpx;
margin: 0 auto;
display: flex;
flex-direction: column;
align-items: center;
.c-img {
height: 100rpx;
width: 100rpx;
flex-shrink: 0;
border-radius: 50%;
border: 2px solid transparent;
overflow: hidden;
}
.c-text {
width: 100%;
text-align: center;
box-sizing: border-box;
padding: 2rpx 4rpx 3rpx 4rpx;
border-radius: 50rpx;
margin-top: 5rpx;
}
}
.item-active {
.c-img {
border: 2px solid #20b128;
}
.c-text {
background-color: #20b128;
color: #fff;
}
}
}
.classify-list {
padding: 20rpx 30rpx;
font-size: 22rpx;
display: grid;
grid-template-columns: repeat(3, 1fr);
justify-content: center;
grid-gap: 20rpx;
.classify-list-item {
flex-shrink: 0;
text-align: center;
width: 150rpx;
height: 42rpx;
line-height: 42rpx;
background: #F6F6F6;
border-radius: 22rpx 22rpx 22rpx 22rpx;
border: 1rpx solid transparent;
}
.item-active {
border: 1rpx solid #20b128;
color: #20b128;
background-color: rgba(#20b128, 0.1);
}
}
}
.scroll-box {
// background-color: red;
display: flex;
.left {
height: calc(100vh - var(--window-top) - var(--window-bottom) - 300rpx);
/* #ifdef H5 */
height: calc(100vh - 44px - 100rpx);
/* #endif */
width: 170rpx;
box-sizing: border-box;
background-color: #f6f6f6;
font-size: 24rpx;
.item {
height: 96rpx;
line-height: 96rpx;
text-align: center;
}
.item-active {
background-color: #fff;
position: relative;
color: #20b128;
&::before {
content: '';
background-color: #20b128;
width: 6rpx;
height: 48rpx;
border-radius: 10rpx;
position: absolute;
left: 0;
top: 50%;
transform: translate(0, -50%);
}
}
}
.right {
height: calc(100vh - var(--window-top) - 300rpx);
/* #ifdef H5 */
height: calc(100vh - 96px + 20rpx);
/* #endif */
width: 580rpx;
box-sizing: border-box;
position: relative;
overflow: hidden;
.classify {
height: 150rpx;
background-color: #fff;
border-bottom: 1rpx solid #f6f6f6;
position: relative;
font-size: 24rpx;
.classify-list {
display: flex;
padding: 20rpx;
.classify-list-item {
flex-shrink: 0;
text-align: center;
width: 108rpx;
height: 42rpx;
line-height: 42rpx;
background: #F6F6F6;
border-radius: 22rpx 22rpx 22rpx 22rpx;
margin-right: 20rpx;
border: 1rpx solid transparent;
}
.item-active {
border: 1rpx solid #20b128;
color: #20b128;
background-color: rgba(#20b128, 0.1);
}
}
.done {
height: 90rpx;
width: 60rpx;
position: absolute;
top: 0;
right: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
}
.order-by {
display: flex;
justify-content: flex-end;
align-items: center;
.item {
padding-right: 20rpx;
}
.order-active {
color: #20b128;
}
}
}
.list {
height: calc(100vh - var(--window-top) - 400rpx);
/* #ifdef H5 */
height: calc(100vh - 44px - 200rpx);
/* #endif */
.shop-item {
padding: 20rpx;
border-bottom: 1rpx solid #f6f6f6;
background-color: #fff;
display: flex;
.shop-img {
height: 164rpx;
width: 164rpx;
margin-right: 20rpx;
border-radius: 14rpx;
overflow: hidden;
background-size: 100% 100%;
// background-image: url();
}
.shop-content {
width: 380rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
position: relative;
.shop-content-li {
font-size: 22rpx;
color: #333333;
display: flex;
align-items: center;
vertical-align: middle;
.line-through {
text-decoration: line-through;
}
.shop-content-li-l {
font-size: 22rpx;
width: 70rpx;
text-align-last: justify;
margin-right: 6rpx;
}
}
.tag {
font-size: 16rpx;
color: #A17C3A;
background-color: #F3E7C0;
padding: 8rpx 4rpx;
margin-left: 4rpx;
display: flex;
align-items: center;
}
.shopconetent-btn {
position: absolute;
bottom: 0;
right: 0;
}
// .icon {
// background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/3b653202406260957228679.png');
// width: 17rpx;
// height: 14rpx;
// background-size: 100% 100%;
// margin: 5rpx;
// }
}
}
}
}
}
.fiexd-btn-box {
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
height: 140rpx;
height: calc(constant(safe-area-inset-bottom) + 140rpx);
/* 适用于iOS设备 */
height: calc(env(safe-area-inset-bottom) + 140rpx);
/* 适用于Android设备 */
padding-top: 40rpx;
.price-info {
.row {
display: flex;
font-size: 26rpx;
align-items: center;
&>view {
margin-right: 15rpx;
}
.price {
color: #F55726;
}
}
}
.btn {
width: 200rpx;
}
.cart {
position: absolute;
top: -40rpx;
left: 40rpx;
image {
width: 80rpx;
height: 80rpx;
}
.badge {
position: absolute;
top: 0;
right: 0;
background-color: #F55726;
color: #fff;
border-radius: 50%;
width: 26rpx;
height: 26rpx;
text-align: center;
line-height: 26rpx;
font-size: 18rpx;
}
}
}
.headScoll {
position: relative;
overflow: hidden;
transition: 400ms;
}
.store-info {
margin: 0 0 20rpx 20rpx;
margin-top: 20rpx;
}
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 630rpx;
height: 440rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/9c70c202406261048431851.png');
background-size: 100% 100%;
box-sizing: border-box;
text-align: center;
// padding: 30rpx;
padding: 50rpx 32rpx;
.rect-tit {
text-align: center;
font-size: 32rpx;
color: #333333;
margin-bottom: 60rpx;
}
.rect-contetn {
font-size: 30rpx;
color: #333333;
}
.rect-btn {
display: flex;
margin-top: 50rpx;
justify-content: space-around;
}
}
</style>