hldy_app/pages/Warehouse/Warehouse.vue

438 lines
8.7 KiB
Vue
Raw Normal View History

2025-10-11 15:28:53 +08:00
<template>
<view :class="darkFans?`darkbackgroundContainer`:`backgroundContainer`" v-show="isShow">
<view class="wareaitem">
2025-10-13 16:06:44 +08:00
<view class="wareaitem-item">
<view class="tp" v-for="(item,index) in 9" :key='index' >
<image :src="'/static/index/warehouse/w'+index+'.png'" mode="aspectFill"></image>
</view>
<view class="tp" :class="'itemact'+item" v-for="(item,index) in 7" :key='index' @click.stop="housactive(index)">
<image :src="'/static/index/warehouse/active/i'+index+'.png'" mode="aspectFill" v-if="index>5||housedex==index"></image>
</view>
<view class="tp ys" >
<image :src="'/static/index/warehouse/active/i7.png'" mode="aspectFill" ></image>
</view>
<view class="tp gifs" >
<image src="/static/index/warehouse/ys.gif" mode="aspectFill"></image>
</view>
<view class="tp w11" >
<image src="/static/index/warehouse/w11.png" mode="aspectFill"></image>
</view>
<view class="tp wclik" @click.stop="housactive(1)">
<!-- 采购增加层级高度方便点击 -->
</view>
2025-10-11 15:28:53 +08:00
</view>
2025-10-13 16:06:44 +08:00
<view class="annotation" :class="'annotation'+(i+1)" v-for="(v,i) in ['付款','采购','结账','拣货','护理单元','中控室']" :key='i'>
2025-10-11 15:28:53 +08:00
<view>{{v}}</view>
<view class="tp">
<image src="/static/index/warehouse/y1.png" mode="aspectFill"></image>
</view>
<view class="tp">
<image src="/static/index/warehouse/y0.png" mode="aspectFill"></image>
</view>
</view>
2025-10-13 16:06:44 +08:00
<arrowkeys @movecard="movecard" :getblue="getblue" :moveleft="125" />
<view class="operationbtn">
<view v-for="(v,i) in ['请领出库','退货入库','库存盘点','实时监控']"
@tap="onTap(i)"
:class="beblue === i ? 'click-box-target grad-text' : 'click-box'">{{v}}</view>
</view>
2025-10-11 15:28:53 +08:00
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick,defineProps } from 'vue';
const darkFans = ref(false);
2025-10-13 16:06:44 +08:00
const getblue = ref(false);
2025-10-11 15:28:53 +08:00
const props = defineProps({
isShow: {
type: Boolean,
required: true,
},
});
2025-10-13 16:06:44 +08:00
const housedex = ref(-1);
const housactive = (index : number) => {
if(index>5){return}
housedex.value = index;
console.log(index)
}
const movecard = (type : number) => {
console.log(type)
switch (type){
case 0:
// 上
housedex.value>0?housedex.value--:housedex.value = 5
break;
case 1:
housedex.value>4?housedex.value = 0:housedex.value++
// →
break;
case 2:
housedex.value>4?housedex.value = 0:housedex.value++
// 下
break;
case 3:
housedex.value>0?housedex.value--:housedex.value = 5
// ←
break;
case 4:
// 确定
break;
case 5:
// 返回
uni.navigateBack()
break;
default:
break;
}
}
const beblue = ref<number>(-1);
let clickResetTimer : ReturnType<typeof setTimeout> | null = null;
// 单击(或短按)
function onTap(dir : number) {
clearClickResetTimer()
beblue.value = dir
clickResetTimer = setTimeout(() => {
beblue.value = -1
clickResetTimer = null
}, 500)
}
function clearClickResetTimer() {
if (clickResetTimer) {
clearTimeout(clickResetTimer)
clickResetTimer = null
}
}
2025-10-11 15:28:53 +08:00
</script>
<style lang="less">
.wareaitem{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: rgba(255, 255, 255, 0.7);
.tp{
image{
width: 100%;
height: 100%;
}
}
2025-10-13 16:06:44 +08:00
.operationbtn{
width: 20vw;
height: 10vw;
position: absolute;
right: 3vw;
bottom: 2vw;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
2025-10-11 15:28:53 +08:00
>view{
2025-10-13 16:06:44 +08:00
width: 9vw;
height: 4vw;
border-radius: 1vw;
border: 2rpx solid #D9DADC;
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
font-size: 1vw;
color: #888D99;
margin: 0 0.3vw;
transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.25s ease;
-webkit-tap-highlight-color: transparent;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.click-box {
color: #888d99;
background: rgba(255, 255, 255, 0.43);
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.click-box-target {
color: transparent;
animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1);
transform-origin: center center;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.grad-text {
background: linear-gradient(90deg, #5b8bb3, #87a1bd);
background-size: 200% 100%;
background-position: 0% 50%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
transition: background-position 0.8s linear;
}
@keyframes scalePulse {
0% { transform: scale(1); }
25% { transform: scale(0.94); }
65% { transform: scale(1.08); }
100% { transform: scale(1); }
}
}
.wareaitem-item{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: url('/static/index/warehouse/bg.png')no-repeat;
background-size:cover cover;
.itemact1 {
width: 25vw;
height: 19vw;
top: 21vw;
left: 8vw;
z-index: 31;
}
.itemact2{
2025-10-11 15:28:53 +08:00
width: 20vw;
height: 13vw;
top: 15vw;
left: 43vw;
2025-10-13 16:06:44 +08:00
z-index: 27;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.itemact3{
2025-10-11 15:28:53 +08:00
width: 20vw;
height: 14vw;
top: 26vw;
left: 45vw;
2025-10-13 16:06:44 +08:00
z-index: 35;
}
.itemact4{
2025-10-11 15:28:53 +08:00
width: 11vw;
height: 9vw;
top: 23vw;
left: 63vw;
2025-10-13 16:06:44 +08:00
z-index: 36;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.itemact6{
width: 15vw;
height: 10vw;
2025-10-11 15:28:53 +08:00
top: 25vw;
left: 80vw;
2025-10-13 16:06:44 +08:00
z-index: 35;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.itemact5{
width: 16vw;
height: 13vw;
2025-10-11 15:28:53 +08:00
top: 31vw;
left: 67vw;
2025-10-13 16:06:44 +08:00
z-index: 35;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.itemact7{
2025-10-11 15:28:53 +08:00
width: 48vw;
height: 22vw;
2025-10-13 16:06:44 +08:00
top: 35vw;
left: 22vw;
z-index: 31;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.itemact8{
2025-10-11 15:28:53 +08:00
width: 11vw;
height: 8vw;
top: 22vw;
left: 56vw;
2025-10-13 16:06:44 +08:00
z-index: 17;
}
.itemact9{
width: 11vw;
height: 9vw;
top: 23vw;
left: 63vw;
z-index: 22;
}
.wclik{
width: 20vw;
height: 13vw;
top: 15vw;
left: 43vw;
z-index: 47;
}
.gifs{
width: 38vw;
height:19.5vw;
top: 19vw;
left: 26vw;
z-index: 29;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.w11{
2025-10-11 15:28:53 +08:00
width: 3vw;
2025-10-13 16:06:44 +08:00
height:3vw;
top: 22.5vw;
left: 58vw;
z-index: 35;
}
.ys{
width: 11vw;
height: 8vw;
top: 22vw;
left: 56vw;
z-index: 28;
}
>view{
position: absolute;
&:nth-child(1){
width: 25vw;
height: 19vw;
top: 21vw;
left: 8vw;
z-index: 30;
}
&:nth-child(2){
width: 72vw;
height: 36vw;
top: 3vw;
left: 13.5vw;
z-index: 15;
}
&:nth-child(3){
width: 20vw;
height: 13vw;
top: 15vw;
left: 43vw;
z-index: 20;
}
&:nth-child(4){
width: 20vw;
height: 14vw;
top: 26vw;
left: 45vw;
z-index: 10;
}
&:nth-child(5){
width: 11vw;
height: 7vw;
top: 27vw;
left: 58vw;
}
&:nth-child(6){
width: 11vw;
height: 9vw;
top: 23vw;
left: 63vw;
z-index: 31;
}
&:nth-child(7){
width: 15vw;
height: 10vw;
top: 25vw;
left: 80vw;
}
&:nth-child(8){
width: 16vw;
height: 13vw;
top: 31vw;
left: 67vw;
}
&:nth-child(9){
width: 25vw;
height: 8vw;
top: 27vw;
left: 19.8vw;
}
}
}
.annotation1{
top: 18.2vw;
left: 20.5vw;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.annotation2{
2025-10-11 15:28:53 +08:00
top: 12vw;
left: 48vw;
}
2025-10-13 16:06:44 +08:00
.annotation3{
top: 21vw;
left: 49vw;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.annotation4{
top: 17.5vw;
left: 65vw;
2025-10-11 15:28:53 +08:00
}
2025-10-13 16:06:44 +08:00
.annotation5{
top: 28vw;
left: 70vw;
}
.annotation6{
2025-10-11 15:28:53 +08:00
top: 21vw;
left: 83vw;
}
2025-10-13 16:06:44 +08:00
// title
.annotation {
width: 7vw;
height: 8vw;
z-index: 20;
position: fixed;
>view{
position: relative;
&:nth-child(1){
width: 7vw;
height: 2vw;
background: #F2F3F7;
box-shadow: 0rpx 0rpx 0rpx 0rpx rgba(182,186,196,0.35);
border: 2rpx solid #FFFFFF;
font-weight: 400;
font-size: 1vw;
color: #333333;
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
}
&:nth-child(2){
width: 4vw;
height: 2vw;
z-index: 2;
margin: -2rpx auto 0;
z-index: 2;
}
&:nth-child(3){
width: 3vw;
height: 5vw;
z-index: 1;
margin: -1vw auto 0;
}
}
}
2025-10-11 15:28:53 +08:00
}
.backgroundContainer {
display: flex;
flex-direction: column;
position: relative;
width: 100vw;
height: 100vh;
background-image: url('/static/index/lightbgcnew.png');
background-size: cover;
background-position: center center;
overflow: hidden;
}
//暗黑模式
.darkbackgroundContainer {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
position: relative;
background-image: url('/static/index/background.png');
background-size: cover;
background-position: center center;
overflow: hidden;
}
</style>