hldy_app/pages/Warehouse/Warehouse.vue

562 lines
11 KiB
Vue
Raw Normal View History

2025-10-11 15:28:53 +08:00
<template>
2025-10-15 10:38:32 +08:00
<view :class="darkFans?`darkbackgroundContainer`:`backgroundContainer`" v-show="isShow">
2025-10-11 15:28:53 +08:00
<view class="wareaitem">
2025-10-13 16:06:44 +08:00
<view class="wareaitem-item">
2025-10-15 10:38:32 +08:00
<view class="tp" :class="'itemact'+(index+1)" v-for="(item,index) in animArray" :key='index'
@click.stop="housactive(index)">
2025-10-22 16:52:41 +08:00
<!-- <image :src="'/static/index/warehouse/active/w'+index+'.png'" mode="aspectFill"
v-if="housedex!=index"></image> -->
2025-10-28 15:53:27 +08:00
<donghua :width="item.width" :height="item.height" :links="item.url" :playing="index == housedex" />
2025-10-14 15:47:30 +08:00
<!-- <image :src="'/static/index/warehouse/active/i'+index+'.png'" mode="aspectFill" v-if="housedex==index"></image> -->
2025-10-13 16:06:44 +08:00
</view>
2025-10-15 10:38:32 +08:00
<view class="tp" :class="'wareitem'+index" v-for="(item,index) in 12" :key='index'>
2025-10-14 15:47:30 +08:00
<image :src="'/static/index/warehouse/w'+index+'.png'" mode="aspectFill"></image>
2025-10-13 16:06:44 +08:00
</view>
2025-10-15 10:38:32 +08:00
<view class="tp ys">
<image :src="'/static/index/warehouse/i7.png'" mode="aspectFill"></image>
2025-10-13 16:06:44 +08:00
</view>
2025-10-15 10:38:32 +08:00
<view class="tp gifs">
2025-10-13 16:06:44 +08:00
<image src="/static/index/warehouse/ys.gif" mode="aspectFill"></image>
</view>
2025-10-15 10:38:32 +08:00
<view class="tp wclik" @click.stop="housactive(1)">
<!-- 采购增加层级高度方便点击 -->
2025-10-13 16:06:44 +08:00
</view>
2025-10-11 15:28:53 +08:00
</view>
2025-10-29 08:51:56 +08:00
<view class="annotation" :class="'annotation'+(i+1)" v-for="(v,i) in ['付款','采购','拣货','结账','护理单元','监控室']"
2025-10-28 17:32:22 +08:00
:key='i' @click="onlyjump(i)">
2025-10-15 16:42:36 +08:00
<view> </view>
2025-10-11 15:28:53 +08:00
<view class="tp">
2025-10-15 16:42:36 +08:00
<text>{{v}}</text>
2025-10-11 15:28:53 +08:00
<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-28 17:32:22 +08:00
<view @click="onlyjump(5)" class="zhanwei"></view>
2025-10-15 10:38:32 +08:00
2025-10-14 15:47:30 +08:00
<arrowkeys @movecard="movecard" :getblue="getblue" :moveleft="45" />
2025-10-13 16:06:44 +08:00
<view class="operationbtn">
2025-10-15 10:38:32 +08:00
<view v-for="(v,i) in ['请领出库','退货入库','库存盘点','实时监控']" @tap="onTap(i)"
2025-10-15 16:42:36 +08:00
:class="beblue === i ? 'click-box-target' : 'click-box'">
2025-10-28 17:32:22 +08:00
<image
:src="beblue === i?'/static/index/warehouse/ku/rq'+i+'.png':'/static/index/warehouse/ku/rs'+i+'.png'"
mode="aspectFill"></image>
{{v}}
</view>
2025-10-13 16:06:44 +08:00
</view>
2025-10-11 15:28:53 +08:00
</view>
</view>
</template>
<script setup lang="ts">
2025-10-15 10:38:32 +08:00
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-15 10:38:32 +08:00
const props = defineProps({
isShow: {
type: Boolean,
required: true,
},
});
const housedex = ref(-1);
2025-10-28 15:53:27 +08:00
2025-10-15 10:38:32 +08:00
const housactive = (index : number) => {
if (index > 5) { return }
housedex.value = index;
2025-10-28 17:32:22 +08:00
console.log("index", index)
2025-10-29 09:08:02 +08:00
// 只有中心的四个有动画.....所以点不到监控室
2025-10-28 17:32:22 +08:00
if (index === 5) {
uni.navigateTo({
url: "/pages/watch/full"
})
}
2025-10-15 10:38:32 +08:00
}
2025-10-28 15:53:27 +08:00
onMounted(()=>{
housedex.value = 1
})
2025-10-15 10:38:32 +08:00
const navurl = ref('');
const movecard = (type : number) => {
2025-10-21 16:54:18 +08:00
// console.log(type,housedex.value)
2025-10-15 10:38:32 +08:00
switch (type) {
case 0:
// 上
housedex.value > 0 ? housedex.value-- : housedex.value = 3
break;
case 1:
housedex.value > 2 ? housedex.value = 0 : housedex.value++
// →
break;
case 2:
housedex.value > 2 ? housedex.value = 0 : housedex.value++
// 下
break;
case 3:
housedex.value > 0 ? housedex.value-- : housedex.value = 3
// ←
break;
case 4:
// 确定
console.log('选中' + housedex.value)
if (housedex.value == 1) {
navurl.value = 'pages/Warehouse/procurement'
}
2025-10-21 16:54:18 +08:00
if (housedex.value == 3) {
navurl.value = 'pages/Warehouse/purchaseorder'
}
2025-10-15 10:38:32 +08:00
uni.navigateTo({
url: '/' + navurl.value
})
break;
case 5:
// 返回
uni.navigateBack()
break;
default:
break;
2025-10-14 15:47:30 +08:00
}
2025-10-15 10:38:32 +08:00
}
2025-10-28 17:32:22 +08:00
const onlyjump = (index : number) => {
console.log("点击了哪个图标", index)
if (index > 5) { return }
if(index<4){
housedex.value = index;
}
if (index === 5) {
uni.navigateTo({
url: "/pages/watch/full"
})
}
}
2025-10-15 10:38:32 +08:00
const beblue = ref<number>(-1);
let clickResetTimer : ReturnType<typeof setTimeout> | null = null;
// 单击(或短按)
function onTap(dir : number) {
clearClickResetTimer()
2025-10-29 08:51:56 +08:00
console.log("?????",dir)
2025-10-15 10:38:32 +08:00
beblue.value = dir
clickResetTimer = setTimeout(() => {
beblue.value = -1
clickResetTimer = null
}, 500)
2025-10-22 16:52:41 +08:00
switch (dir) {
case 0:
2025-10-28 17:32:22 +08:00
2025-10-22 16:52:41 +08:00
break
case 1:
2025-10-28 17:32:22 +08:00
2025-10-22 16:52:41 +08:00
break
case 2:
2025-10-28 17:32:22 +08:00
2025-10-29 08:51:56 +08:00
break
case 3:
2025-10-22 16:52:41 +08:00
uni.navigateTo({
2025-10-28 17:32:22 +08:00
url: "/pages/watch/full"
2025-10-22 16:52:41 +08:00
})
break
}
2025-10-15 10:38:32 +08:00
}
function clearClickResetTimer() {
if (clickResetTimer) {
clearTimeout(clickResetTimer)
clickResetTimer = null
}
}
// 通用的生成函数
function genPaths(base, prefix, count, ext = 'png', startIndex = 0, pad = false) {
return Array.from({ length: count }, (_, i) => {
const idx = pad
? String(i + startIndex).padStart(2, '0')
: i + startIndex
return `${base}/${prefix}${idx}.${ext}`
})
}
const animArray = ref([
{
url: genPaths(
'/static/index/warehouse/animation',
'remit0',
5, // 张数
'png',
1, // 起始索引为 1
false // 不补零
),
2025-10-14 15:47:30 +08:00
width: '29vw',
height: '21vw'
2025-10-15 10:38:32 +08:00
},
2025-10-14 15:47:30 +08:00
{
url: genPaths(
'/static/index/warehouse/animation',
'buy0',
5, // 张数
'png',
1, // 起始索引为 1
false // 不补零
),
width: '26vw',
height: '16vw'
2025-10-15 10:38:32 +08:00
},
2025-10-14 15:47:30 +08:00
{
url: genPaths(
'/static/index/warehouse/animation',
2025-10-28 17:09:50 +08:00
'Pick0',
4, // 张数
2025-10-14 15:47:30 +08:00
'png',
1, // 起始索引为 1
false // 不补零
),
2025-10-28 17:09:50 +08:00
width: '17vw',
height: '13vw'
2025-10-15 10:38:32 +08:00
},
2025-10-14 15:47:30 +08:00
{
url: genPaths(
'/static/index/warehouse/animation',
2025-10-28 17:09:50 +08:00
'checkout0',
5, // 张数
2025-10-14 15:47:30 +08:00
'png',
1, // 起始索引为 1
false // 不补零
),
2025-10-28 17:09:50 +08:00
width: '24vw',
height: '16vw'
},
2025-10-15 10:38:32 +08:00
])
2025-10-11 15:28:53 +08:00
</script>
2025-10-15 10:38:32 +08:00
<style lang="less" scoped>
.wareaitem {
2025-10-11 15:28:53 +08:00
width: 100%;
height: 100%;
position: fixed;
top: 0;
2025-10-15 10:38:32 +08:00
left: 0;
2025-10-14 15:47:30 +08:00
background: url('/static/index/warehouse/bg.png')no-repeat;
2025-10-15 10:38:32 +08:00
background-size: cover cover;
.tp {
image {
2025-10-11 15:28:53 +08:00
width: 100%;
height: 100%;
}
}
2025-10-15 10:38:32 +08:00
.operationbtn {
2025-10-15 16:42:36 +08:00
width: 22vw;
2025-10-13 16:06:44 +08:00
height: 10vw;
position: absolute;
2025-10-14 15:47:30 +08:00
right: 1.5vw;
2025-10-13 16:06:44 +08:00
bottom: 2vw;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
2025-10-15 10:38:32 +08:00
>view {
2025-10-15 16:42:36 +08:00
width: 10vw;
2025-10-13 16:06:44 +08:00
height: 4vw;
border-radius: 1vw;
2025-10-15 10:38:32 +08:00
border: 2rpx solid #D9DADC;
2025-10-13 16:06:44 +08:00
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
2025-10-14 15:47:30 +08:00
font-size: 1.3vw;
2025-10-13 16:06:44 +08:00
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-28 17:32:22 +08:00
image {
2025-10-15 16:42:36 +08:00
width: 1.6vw;
height: 1.6vw;
margin-right: .2vw;
}
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +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-15 10:38:32 +08:00
2025-10-13 16:06:44 +08:00
.click-box-target {
2025-10-15 16:42:36 +08:00
background: #FFFFFF;
2025-10-28 17:32:22 +08:00
box-shadow: 0px 0px 3vw 0px rgba(12, 102, 209, 0.33) inset;
2025-10-15 16:42:36 +08:00
// box-shadow: 0rpx 0rpx 3vw 0rpx rgba(38,137,255,0.44) inset;
color: rgba(108, 132, 160, 1) !important;
2025-10-13 16:06:44 +08:00
animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1);
transform-origin: center center;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +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;
}
2025-10-15 10:38:32 +08:00
2025-10-13 16:06:44 +08:00
@keyframes scalePulse {
2025-10-15 10:38:32 +08:00
0% {
transform: scale(1);
}
25% {
transform: scale(0.94);
}
65% {
transform: scale(1.08);
}
100% {
transform: scale(1);
}
2025-10-13 16:06:44 +08:00
}
}
2025-10-15 10:38:32 +08:00
.wareaitem-item {
2025-10-13 16:06:44 +08:00
width: 100%;
height: 100%;
position: fixed;
top: 0;
2025-10-14 15:47:30 +08:00
left: -2vw;
2025-10-15 10:38:32 +08:00
2025-10-13 16:06:44 +08:00
.itemact1 {
2025-10-14 15:47:30 +08:00
width: 29vw;
height: 21vw;
top: 23vw;
left: 6vw;
2025-10-13 16:06:44 +08:00
z-index: 31;
2025-10-15 10:38:32 +08:00
}
.itemact2 {
2025-10-14 15:47:30 +08:00
width: 26vw;
height: 16vw;
2025-10-11 15:28:53 +08:00
top: 15vw;
2025-10-14 15:47:30 +08:00
left: 41vw;
2025-10-13 16:06:44 +08:00
z-index: 27;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
2025-10-28 17:09:50 +08:00
.itemact4 {
2025-10-14 15:47:30 +08:00
width: 24vw;
height: 16vw;
top: 28vw;
left: 46vw;
z-index: 55;
2025-10-15 10:38:32 +08:00
}
2025-10-28 17:09:50 +08:00
.itemact3{
2025-10-14 15:47:30 +08:00
width: 17vw;
2025-10-13 16:06:44 +08:00
height: 13vw;
2025-10-14 15:47:30 +08:00
top: 22vw;
2025-10-11 15:28:53 +08:00
left: 67vw;
2025-10-14 15:47:30 +08:00
z-index: 36;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
.wclik {
2025-10-14 15:47:30 +08:00
width: 22vw;
height: 14vw;
top: 16vw;
left: 44vw;
2025-10-13 16:06:44 +08:00
z-index: 47;
}
2025-10-15 10:38:32 +08:00
.gifs {
2025-10-14 15:47:30 +08:00
width: 41vw;
2025-10-15 10:38:32 +08:00
height: 20vw;
2025-10-14 15:47:30 +08:00
top: 21.6vw;
left: 27.5vw;
2025-10-13 16:06:44 +08:00
z-index: 29;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
.ys {
width: 11vw;
height: 8vw;
top: 24.2vw;
left: 57.9vw;
z-index: 28;
2025-10-13 16:06:44 +08:00
}
2025-10-15 10:38:32 +08:00
.wareitem1 {
width: 86vw;
height: 44vw;
top: 1vw;
left: 10.5vw;
z-index: 15;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
.wareitem4 {
width: 11vw;
height: 7vw;
top: 30.9vw;
left: 60vw;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
.wareitem6 {
width: 17vw;
height: 12vw;
top: 28vw;
right: -2vw;
z-index: 35;
}
.wareitem5 {
width: 18vw;
height: 15vw;
top: 37vw;
left: 73vw;
z-index: 35;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
.wareitem8 {
width: 26vw;
height: 8vw;
top: 29.7vw;
left: 21.8vw;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
.wareitem11 {
width: 3vw;
height: 3vw;
top: 24.5vw;
left: 60vw;
z-index: 35;
2025-10-13 16:06:44 +08:00
}
2025-10-15 10:38:32 +08:00
.wareitem10 {
width: 55vw;
height: 27vw;
top: 38vw;
left: 20vw;
z-index: 36;
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
>view {
position: absolute;
}
}
.annotation1 {
2025-10-15 16:42:36 +08:00
top: 21.5vw;
left: 19.5vw;
2025-10-15 10:38:32 +08:00
}
.annotation2 {
top: 13vw;
left: 47vw;
}
.annotation3 {
2025-10-29 08:51:56 +08:00
top: 18vw;
left: 70vw;
2025-10-15 10:38:32 +08:00
}
.annotation4 {
2025-10-29 08:51:56 +08:00
top: 24vw;
left: 49.3vw;
2025-10-15 10:38:32 +08:00
}
.annotation5 {
2025-10-15 16:42:36 +08:00
top: 34vw;
2025-10-15 10:38:32 +08:00
left: 74vw;
}
.annotation6 {
2025-10-15 16:42:36 +08:00
top: 24vw;
2025-10-15 10:38:32 +08:00
right: 6vw;
}
// title
.annotation {
width: 7vw;
height: 8vw;
z-index: 20;
position: fixed;
>view {
position: relative;
2025-10-28 17:32:22 +08:00
2025-10-15 10:38:32 +08:00
&:nth-child(2) {
2025-10-15 16:42:36 +08:00
width: 6.5vw;
height: 3.2vw;
2025-10-15 10:38:32 +08:00
z-index: 2;
margin: -2rpx auto 0;
z-index: 2;
2025-10-15 16:42:36 +08:00
display: flex;
align-items: center;
justify-content: center;
2025-10-28 17:32:22 +08:00
image {
2025-10-15 16:42:36 +08:00
position: absolute;
top: 0;
left: 0;
}
2025-10-28 17:32:22 +08:00
text {
2025-10-15 16:42:36 +08:00
position: relative;
font-weight: 400;
font-size: 1.1vw;
color: #fff;
z-index: 3;
margin-top: -0.5vw;
}
2025-10-15 10:38:32 +08:00
}
&:nth-child(3) {
width: 3vw;
height: 5vw;
z-index: 1;
margin: -1vw auto 0;
2025-10-13 16:06:44 +08:00
}
}
2025-10-15 10:38:32 +08:00
}
2025-10-11 15:28:53 +08:00
}
2025-10-15 10:38:32 +08:00
.backgroundContainer {
2025-10-11 15:28:53 +08:00
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;
}
2025-10-28 17:32:22 +08:00
.zhanwei {
position: absolute;
top: 40vh;
right: 3vw;
width: 13vw;
height: 13vw;
}
2025-10-15 10:38:32 +08:00
</style>