hldy_app/component/storeroom/index.vue

553 lines
13 KiB
Vue
Raw Normal View History

2025-04-07 17:34:20 +08:00
<template>
2025-04-08 17:33:14 +08:00
<view class="index-content-other" v-show="isShow" :style="transition?{opacity: `1`}:{opacity: `0`}">
2025-04-07 17:34:20 +08:00
<view class="index-content-right">
<!-- 解决margin重叠问题 -->
<view class="index-right-height"></view>
<view class="index-right-title">
<view class="index-right-name">
货品名称
</view>
<input class="index-right-input" placeholder="请输入货品名称" />
<view class="index-right-name">
货品编码
</view>
<input class="index-right-input" placeholder="请输入货品编码" />
<view class="index-right-name">
拼音检索
</view>
<input class="index-right-input" placeholder="请输入货品拼音" />
2025-04-09 17:20:13 +08:00
2025-04-07 17:34:20 +08:00
<view class="index-right-button-all">
2025-04-09 17:20:13 +08:00
<view class="first-bgc">
<image class="bgc-img" src="/static/index/Warehousing/firstbutton.png" />
</view>
<view class="second-bgc">
<image class="bgc-img" src="/static/index/Warehousing/secondbutton.png" />
</view>
<view :class="!isWarning? `third-bgc`:`bgc-white`" @click="isWarning=!isWarning">
<view class="red-pao" v-show="!isWarning">
{{ 99 + `+` }}
</view>
<image class="bgc-img" src="/static/index/Warehousing/thirdbutton.png" />
</view>
<view class="fourth-bgc">
<image class="fourth-bgc-img" src="/static/index/Warehousing/fourthbutton.png" />
<view class="fourth-bgc-font">
请购单
</view>
</view>
<view v-for="(item,index) in buttonList" :key="index">
2025-04-07 17:34:20 +08:00
<view class="index-right-button">
<image class="index-right-button-img" :src="item.url" />
<view class="index-right-button-font">
{{item.name}}
</view>
</view>
</view>
</view>
</view>
<view class="swiper-contain">
<scroll-view scroll-y style="height: 98%;" :show-scrollbar="false">
<view class="swiper-flex">
<view v-for="(item,index) in [1,1,1,1,1,1,1,1,1,1,1,1,1]" :key="index">
<view class="swiper-card">
<view class="swiper-card-left">
<view class="swiper-card-left-white">
<image class="swiper-card-left-white-img" :src="`/static/index/project3.png`"
@click="opendetail" />
</view>
2025-04-09 17:20:13 +08:00
</view>
<view class="swiper-card-right">
<view class="swiper-right-title">
<view class="swiper-title-font">纸尿裤-拉拉裤</view>
<view class="swiper-title-font-button">
护理类
</view>
</view>
<view class="swiper-heng"></view>
<view class="swiper-font">
规格型号800mm*690mm
</view>
<view class="swiper-double">
<view class="swiper-littlefont">
采购单位
</view>
<view class="swiper-littlefont" style="margin-left: 10rpx;" v-show="isWarning">
库存
<view style="color: rgb(18,169,51);"></view>
1000
</view>
</view>
<view class="swiper-double">
<view class="swiper-littlefont">
库存数量
<view class="blackfont">
50
</view>
</view>
<view class="swiper-littlefont" style="margin-left: 10rpx;" v-show="isWarning">
库存
<view style="color: rgb(248,122,85);"></view>
5
</view>
</view>
2025-04-07 17:34:20 +08:00
<view class="swiper-left-buttons">
2025-04-10 17:20:44 +08:00
<view class="swiper-left-button-blue" @click="openBuy">
2025-04-07 17:34:20 +08:00
请购
</view>
<view class="swiper-left-button">
出入库
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="index-content-down">
长春市朝阳区久泰开运养老服务有限公司
</view>
2025-04-10 17:20:44 +08:00
2025-04-07 17:34:20 +08:00
</view>
2025-04-10 17:20:44 +08:00
<!-- 详情的的弹出层 -->
2025-04-07 17:34:20 +08:00
<view v-show="detailisopen && isShow" class="popup-detail" @click="detailisopen=false">
<view class="popup-detail-content" :style="{ opacity: detailisopacity ? 1 : 0 }" @click.stop>
2025-04-10 17:20:44 +08:00
<info />
2025-04-07 17:34:20 +08:00
</view>
</view>
2025-04-10 17:20:44 +08:00
<!-- 请购的的弹出层 -->
<view v-show="plsBuyIsopen && isShow" class="popup-detail" @click="plsBuyIsopen=false">
<view class="popup-detail-content" :style="{ opacity: plsBuyisopacity ? 1 : 0 }" @click.stop>
<plsbuy />
</view>
</view>
<Drawer ref="drawer">
<shoppingCar />
</Drawer>
<ball :isShow="isShow && !detailisopen && !plsBuyIsopen" @click="clickBall" />
2025-04-07 17:34:20 +08:00
</template>
<script setup lang="ts">
2025-04-09 17:20:13 +08:00
import { ref, onMounted, onBeforeUnmount, computed, nextTick, defineProps, watch } from 'vue';
2025-04-10 17:20:44 +08:00
import ball from "@/component/storeroom/ball.vue";
import info from "@/component/storeroom/info.vue"
import plsbuy from "@/component/storeroom/plsbuy.vue"
import Drawer from "@/component/public/Drawer.vue"
import shoppingCar from "./shoppingCar/index.vue"
2025-04-07 17:34:20 +08:00
const props = defineProps({
isShow: {
type: Boolean,
required: true,
},
});
2025-04-10 17:20:44 +08:00
2025-04-08 17:33:14 +08:00
// 使用watch监听isShow变化
const transition = ref(true);
2025-04-10 17:20:44 +08:00
const drawer = ref(null);
2025-04-08 17:33:14 +08:00
watch(
2025-04-09 17:20:13 +08:00
() => props.isShow,
(newVal, oldVal) => {
// 当旧值为false新值为true时延迟0.2秒调用方法
if (!oldVal && newVal) {
transition.value = false;
setTimeout(() => {
transition.value = true;
}, 50)
}
}
2025-04-08 17:33:14 +08:00
)
2025-04-07 17:34:20 +08:00
// 表格弹窗
const detailisopen = ref(false);
const detailisopacity = ref(false);
2025-04-10 17:20:44 +08:00
// 请购弹窗
const plsBuyIsopen = ref(false);
const plsBuyisopacity = ref(false);
2025-04-09 17:20:13 +08:00
const isWarning = ref(false);
2025-04-07 17:34:20 +08:00
// 初始化左侧菜单列表
const buttonList = ref([
2025-04-09 17:20:13 +08:00
// { url: '/static/index/Warehousing/zuoce.png', name: '请购单' },
2025-04-07 17:34:20 +08:00
{ url: '/static/index/Warehousing/sousuo.png', name: '查询' },
{ url: '/static/index/Warehousing/chongzhi.png', name: '重置' },
2025-04-09 17:20:13 +08:00
2025-04-07 17:34:20 +08:00
]);
const opendetail = () => {
detailisopen.value = true;
detailisopacity.value = false;
setTimeout(() => {
detailisopacity.value = true
}, 200)
}
2025-04-10 17:20:44 +08:00
const openBuy = () => {
plsBuyIsopen.value = true;
plsBuyisopacity.value = false;
setTimeout(() => {
plsBuyisopacity.value = true
}, 200)
}
const clickBall = () =>{
drawer.value.openDrawer();
}
2025-04-07 17:34:20 +08:00
</script>
<style scoped lang="less">
.index-content-other {
width: calc(100% - 170rpx);
height: 100%;
2025-04-08 17:33:14 +08:00
transition: opacity 1s ease;
2025-04-07 17:34:20 +08:00
}
.index-content-right {
height: calc(100% - 100rpx);
width: calc(100% - 60rpx);
background-color: rgba(255, 255, 255, 0.5);
/* 白色背景透明度为 10% */
background-image: url('/static/index/mountain.png');
background-position: 70% 45%;
border-radius: 50rpx;
box-shadow: 4rpx 8rpx 16rpx 4rpx rgba(0, 0, 0, 0.3);
2025-04-10 17:20:44 +08:00
// border-radius: 1rpx solid #fff;
2025-04-07 17:34:20 +08:00
.index-right-height {
height: 20rpx;
}
.index-right-title {
margin-left: 30rpx;
width: calc(100% - 60rpx);
height: 120rpx;
background: linear-gradient(to right, #C4E0FD, #D5CDFF, #D9ECFF);
border-radius: 35rpx;
border: 2rpx solid #fff;
display: flex;
align-items: center;
.index-right-name {
margin-left: 20rpx;
margin-right: 10rpx;
color: #19233B;
font-size: 30rpx;
}
.index-right-input {
font-size: 27rpx;
2025-04-09 17:20:13 +08:00
width: 240rpx;
2025-04-07 17:34:20 +08:00
border: 2rpx #a0adc8 solid;
padding: 15rpx 0 15rpx 20rpx;
background-color: rgb(234, 243, 254);
border-radius: 10rpx;
}
.index-right-button-all {
height: 100%;
margin-left: auto;
display: flex;
align-items: center;
.index-right-button {
height: 70rpx;
background: linear-gradient(to right bottom, #00c9ff, #0076ff);
color: #fff;
font-size: 30rpx;
display: flex;
align-items: center;
border-radius: 10rpx;
border: 1rpx solid #fff;
2025-04-09 17:20:13 +08:00
margin-right: 10rpx;
2025-04-07 17:34:20 +08:00
.index-right-button-img {
width: 45rpx;
height: 45rpx;
margin: 0 5rpx 0 10rpx;
}
.index-right-button-font {
margin-right: 20rpx;
}
}
}
}
}
.index-content-down {
width: calc(100% - 60rpx);
height: 100rpx;
display: flex;
justify-content: flex-end;
align-items: center;
}
.swiper-contain {
width: 100%;
margin-left: 10rpx;
// width: calc(100% - 60rpx);
height: calc(100% - 140rpx);
.swiper-flex {
display: flex;
flex-wrap: wrap;
.swiper-card {
margin: 20rpx 0 0 20rpx;
2025-04-09 17:20:13 +08:00
width: 666rpx;
height: 345rpx;
2025-04-07 17:34:20 +08:00
border: 2rpx solid #fff;
border-radius: 30rpx;
background: url("/static/index/clearmountain.png") center/cover, rgba(255, 255, 255, 0.5);
background-blend-mode: screen;
isolation: isolate;
box-shadow: 2rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.3);
display: flex;
.swiper-card-left {
height: 100%;
width: 400rpx;
.swiper-card-left-white {
2025-04-09 17:20:13 +08:00
margin: 27rpx 0 20rpx 30rpx;
width: 200rpx;
height: 280rpx;
2025-04-07 17:34:20 +08:00
background-color: rgba(255, 255, 255, 0.3);
display: flex;
border-radius: 30rpx;
justify-content: center;
align-items: center;
.swiper-card-left-white-img {
2025-04-09 17:20:13 +08:00
width: 200rpx;
height: 200rpx;
2025-04-07 17:34:20 +08:00
}
}
}
.swiper-card-right {
height: 100%;
2025-04-09 17:20:13 +08:00
width: 600rpx;
2025-04-07 17:34:20 +08:00
.swiper-right-title {
margin-top: 35rpx;
2025-04-09 17:20:13 +08:00
width: 100%;
2025-04-07 17:34:20 +08:00
display: flex;
justify-content: space-between;
.swiper-title-font {
font-weight: 700;
2025-04-09 17:20:13 +08:00
font-size: 30rpx;
}
.swiper-title-font-button {
padding: 5rpx 15rpx;
background: linear-gradient(to right bottom, #0076ff, #00c9ff);
color: #fff;
border-radius: 10rpx;
margin-right: 20rpx;
margin-top: -3rpx;
font-size: 25rpx;
2025-04-07 17:34:20 +08:00
}
.swiper-title-mark {
background-color: rgb(214, 212, 245);
color: #19233B;
padding: 5rpx 25rpx;
font-size: 30rpx;
border-radius: 25rpx;
margin-right: 20rpx;
}
}
}
}
}
}
.swiper-heng {
2025-04-09 17:20:13 +08:00
width: 90rpx;
2025-04-07 17:34:20 +08:00
height: 10rpx;
border-radius: 30rpx;
2025-04-09 17:20:13 +08:00
margin-bottom: 0rpx;
}
.swiper-font {
color: #596278;
font-size: 26rpx;
margin-top: 15rpx;
display: flex;
}
.swiper-littlefont {
color: #596278;
font-size: 26rpx;
margin-top: 15rpx;
display: flex;
width: 50%;
2025-04-07 17:34:20 +08:00
}
.popup-detail {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
backdrop-filter: blur(1rpx);
background-color: rgba(89, 109, 154, 0.4);
/* 添加毛玻璃效果 */
z-index: 999;
.popup-detail-content {
display: flex;
width: 1500rpx;
height: 900rpx;
background: url("/static/index/lightbgcnew.png") center/cover, rgba(255, 255, 255, 0.5);
background-blend-mode: screen;
border: 2rpx solid #fff;
/* 使用 screen 混合模式,让图像与白色混合变淡 */
border-radius: 30rpx;
box-shadow: 10rpx 10rpx 20rpx rgba(0, 0, 0, 0.1);
transition: opacity 0.4s ease;
2025-04-10 17:20:44 +08:00
2025-04-07 17:34:20 +08:00
}
}
2025-04-09 17:20:13 +08:00
.blackfont {
font-weight: 600;
color: red;
}
.swiper-left-buttons {
display: flex;
margin-top: 10rpx;
.swiper-left-button {
display: flex;
justify-content: center;
align-items: center;
2025-04-10 17:20:44 +08:00
width: 160rpx;
height: 70rpx;
2025-04-09 17:20:13 +08:00
border-radius: 20rpx;
background: linear-gradient(to bottom, #D5E0F8, #ECF6FF);
border: 1rpx #fff solid;
color: #364464;
box-shadow: 2rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.3);
}
.swiper-left-button-blue {
display: flex;
justify-content: center;
align-items: center;
2025-04-10 17:20:44 +08:00
width: 160rpx;
height: 70rpx;
2025-04-09 17:20:13 +08:00
border-radius: 20rpx;
background: linear-gradient(to right bottom, #00c9ff, #0076ff);
color: #fff;
border: 1rpx #fff solid;
2025-04-10 17:20:44 +08:00
margin-right: 20rpx;
2025-04-09 17:20:13 +08:00
box-shadow: 2rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.3);
}
}
.bgc-img {
width: 50rpx;
height: 50rpx;
}
.first-bgc {
width: 80rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to right top, #fda64b, #ffcc80);
border-radius: 20rpx;
border: 2rpx #fff solid;
margin-right: 10rpx;
}
.second-bgc {
width: 80rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to right top, #ffcc80, #fcb398);
border-radius: 20rpx;
border: 2rpx #fff solid;
margin-right: 10rpx;
}
.third-bgc {
width: 80rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to right top, #869af3, #98abff);
border-radius: 20rpx;
border: 2rpx #fff solid;
margin-right: 10rpx;
position: relative;
}
2025-04-10 17:20:44 +08:00
.bgc-white {
2025-04-09 17:20:13 +08:00
width: 80rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(255, 255, 255, 0.3);
border-radius: 20rpx;
border: 2rpx #fff solid;
margin-right: 10rpx;
position: relative;
}
2025-04-10 17:20:44 +08:00
2025-04-09 17:20:13 +08:00
.fourth-bgc {
width: 170rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to right top, #869af3, #98abff);
border-radius: 20rpx;
border: 2rpx #fff solid;
margin-right: 10rpx;
.fourth-bgc-img {
width: 30rpx;
height: 40rpx;
margin: 0 10rpx;
2025-04-10 17:20:44 +08:00
;
2025-04-09 17:20:13 +08:00
}
.fourth-bgc-font {
color: #fff;
margin-right: 10rpx;
}
}
.swiper-double {
width: 90%;
display: flex;
}
2025-04-10 17:20:44 +08:00
2025-04-09 17:20:13 +08:00
.red-pao {
position: absolute;
top: -10rpx;
right: -10rpx;
padding: 3rpx 10rpx;
background-color: #FF4C4E;
color: #fff;
font-size: 20rpx;
border-radius: 20rpx;
z-index: 101;
}
2025-04-10 17:20:44 +08:00
2025-04-07 17:34:20 +08:00
</style>