hldy_app_mini/pages/Warehouse/index/index.vue

152 lines
4.2 KiB
Vue
Raw Normal View History

2025-12-25 14:40:18 +08:00
<template>
<view>
<view class="flex">
2025-12-26 10:07:35 +08:00
<view class="left">
2026-01-05 11:01:11 +08:00
<leftcontent :list="arrlist" @navurl="navurl"></leftcontent>
2025-12-26 10:07:35 +08:00
</view>
<view class="boxrt">
2026-01-05 11:01:11 +08:00
<index :isShow="menuop == 0" v-if="menuop == 0" @swip="swip"/>
<material :isShow="menuop == 1" v-if="menuop == 1"></material>
<picking :isShow="menuop == 2" v-if="menuop == 2"></picking>
<finish :isShow="menuop == 3" v-if="menuop == 3"></finish>
<outbound :isShow="menuop == 4" v-if="menuop == 4"></outbound>
<retstock :isShow="menuop == 5" v-if="menuop == 5"></retstock>
<inventory :isShow="menuop == 6" v-if="menuop == 6"></inventory>
2025-12-26 10:07:35 +08:00
</view>
2025-12-25 14:40:18 +08:00
</view>
</view>
</template>
<script setup lang="ts">
2025-12-26 15:15:35 +08:00
import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue';
2025-12-30 08:42:53 +08:00
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
2026-01-05 11:01:11 +08:00
import { queryPadPageList ,getPermissionList} from '@/pages/watch/api/lunpan.js'
2025-12-26 15:15:35 +08:00
import leftcontent from "@/pages/NursingNew/component/leftcontent/leftcontent.vue"
import material from "@/pages/procurement/material.vue";
import index from "./component/index.vue"
2025-12-26 10:07:35 +08:00
2025-12-26 15:34:50 +08:00
import picking from "../picking.vue";
import finish from "@/pages/Warehouse/finish.vue"
import outbound from "@/pages/procurement/outbound.vue";
import inventory from "@/pages/procurement/inventory.vue";
import retstock from "@/pages/procurement/retstock.vue";
2025-12-26 15:15:35 +08:00
const tabbrarr = ref([
2026-01-05 11:01:11 +08:00
{ name: '采购', url: '/static/shouye/ck/c0.png', urls: '/static/shouye/ck/c1.png' ,type:'kf_cg'},
{ name: '拣货', url: '/static/shouye/ck/j0.png', urls: '/static/shouye/ck/j1.png' ,type:'kf_jh'},
{ name: '完结', url: '/static/shouye/ck/w0.png', urls: '/static/shouye/ck/w1.png' ,type:'kf_wj'},
2026-01-05 14:28:16 +08:00
{ name: '请领出库', url: '/static/shouye/ck/q0.png', urls: '/static/shouye/ck/q1.png' ,type:'kf_ql'},
{ name: '退货入库', url: '/static/shouye/ck/t0.png', urls: '/static/shouye/ck/t1.png' ,type:'kf_th'},
{ name: '库存盘点', url: '/static/shouye/ck/p0.png', urls: '/static/shouye/ck/p1.png' ,type:'kf_pd'},
2025-12-26 15:15:35 +08:00
])
2026-01-05 11:01:11 +08:00
const menuop = ref(0)
2025-12-30 08:42:53 +08:00
// onMounted(() => {
// // 处理响应式
// navurl(0)
// })
2026-01-05 11:01:11 +08:00
// onShow(()=>{
// navurl(0,arrlist[0])
// })
const navurl = (e : number,v:any) => {
2025-12-26 15:15:35 +08:00
// 最后一个直接返回
2026-01-05 11:01:11 +08:00
console.log(v)
2025-12-30 08:42:53 +08:00
menuop.value = -1
2026-01-05 11:01:11 +08:00
setTimeout(()=>{
switch (v.type){
case 'sy':
menuop.value = 0
break;
case 'kf_cg':
menuop.value = 1
break;
case 'kf_jh':
menuop.value = 2
break;
case 'kf_wj':
menuop.value = 3
break;
case 'kf_ql':
menuop.value = 4
break;
case 'kf_th':
menuop.value = 5
break;
case 'kf_pd':
menuop.value = 6
break;
case 'back':
uni.navigateBack()
break;
default:
break;
}
},10)
}
const arrlist = ref([
{ name: '首页', url: '/static/shouye/ck/h0.png', urls: '/static/shouye/ck/h1.png' ,type:'sy'}
])
const listarr = ref([])
const swip = ()=>{
getPermissionList({employessId:uni.getStorageSync('userInfo').employessId}).then(res=>{
listarr.value = res.result;
})
let nuName = uni.getStorageSync('nuName')
queryPadPageList({'pageNo':-1,'nuName':nuName}).then((res => {
let arr = res.result.records[0].permissionList;
arrlist.value = [{ name: '首页', url: '/static/shouye/ck/h0.png', urls: '/static/shouye/ck/h1.png' ,type:'sy'}];
let tbr = [];
if(arr){
arr.forEach((v,i)=>{
let obj = listarr.value.find(item=>
item.menuCode == v.menuCode
);
if(obj){
tbr.push(v)
}
})
tbr.forEach(item=>{
let obj = tabbrarr.value.find(r=>
r.type == item.menuCode
);
if(obj){
arrlist.value.push(obj);
}
})
}
let back =[
{ name: '返回', url: '/static/shouye/sy/f0.png', urls: '/static/shouye/sy/f1.png' ,type:'back'},
]
arrlist.value.push(...back);
}))
2025-12-26 15:15:35 +08:00
}
2025-12-25 14:40:18 +08:00
</script>
<style scoped lang="less">
2025-12-26 15:15:35 +08:00
.flex {
display: flex;
position: relative;
width: 100%;
height: 100vh;
background-color: #eff0f4;
overflow: hidden;
z-index: 12;
}
2025-12-26 15:34:50 +08:00
.left {
width: 8.2vw;
height: 100vh;
2025-12-26 17:14:23 +08:00
2025-12-26 15:34:50 +08:00
}
.boxrt {
width: calc(100vw - 8.2vw);
background: RGBA(239, 240, 244, 1);
display: flex;
2025-12-26 17:14:23 +08:00
padding-left: 1vw;
padding-top: 2.5vw;
2025-12-26 15:34:50 +08:00
}
2025-12-26 10:07:35 +08:00
</style>