hldy_app_mini/pages/Warehouse/index/index.vue

221 lines
6.1 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 15:32:51 +08:00
<index :isShow="menuop == 0" v-if="swipdex == 0" @swip="swip"/>
<material :isShow="menuop == 1" v-if="swipdex == 1"></material>
<picking :isShow="menuop == 2" v-if="swipdex == 2"></picking>
<finish :isShow="menuop == 3" v-if="swipdex == 3"></finish>
<outbound :isShow="menuop == 4" v-if="swipdex == 4"></outbound>
<retstock :isShow="menuop == 5" v-if="swipdex == 5"></retstock>
<inventory :isShow="menuop == 6" v-if="swipdex == 6"></inventory>
2026-01-07 11:23:47 +08:00
<nurse :isshow="menuop == 7" v-if="swipdex==7&&uni.getStorageSync('nuId')" />
<doctorask :isshow="menuop == 8" v-if="swipdex==8&&uni.getStorageSync('nuId')" />
<logistics :isshow="menuop == 9" v-if="swipdex==9&&uni.getStorageSync('nuId')" />
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";
2026-01-07 11:23:47 +08:00
import logistics from "@/pages/NursingNew/component/nurse/logistics.vue"
import doctorask from "@/pages/NursingNew/component/doctorask/doctorask.vue"
import nurse from "@/pages/NursingNew/component/nurse/index.vue"
2025-12-26 15:34:50 +08:00
2025-12-26 15:15:35 +08:00
const tabbrarr = ref([
2026-01-07 11:23:47 +08:00
{ name: '护理矩阵', url: '/static/shouye/sy/n0.png', urls: '/static/shouye/sy/n1.png' ,type:'kzgn_hljz'},
{ name: '医疗矩阵', url: '/static/shouye/sy/y0.png', urls: '/static/shouye/sy/y1.png' ,type:'kzgn_yljz'},
{ name: '后勤矩阵', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' ,type:'kzgn_hqjz'},
{ name: '库房矩阵', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' ,type:'kzgn_kfjz'},
2025-12-26 15:15:35 +08:00
])
2026-01-05 11:01:11 +08:00
const menuop = ref(0)
2026-01-05 15:32:51 +08:00
const swipdex = 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)
2026-01-05 15:32:51 +08:00
menuop.value = -1;
swipdex.value = -1;
2026-01-05 11:01:11 +08:00
setTimeout(()=>{
switch (v.type){
case 'sy':
2026-01-05 15:32:51 +08:00
swipdex.value = 0;
setTimeout(()=>{
menuop.value = 0
},100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_cg':
2026-01-05 15:32:51 +08:00
swipdex.value = 1;
setTimeout(()=>{
menuop.value = 1
},100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_jh':
2026-01-05 15:32:51 +08:00
swipdex.value = 2;
setTimeout(()=>{
menuop.value = 3
},100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_wj':
2026-01-05 15:32:51 +08:00
swipdex.value = 3;
setTimeout(()=>{
menuop.value = 3
},100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_ql':
2026-01-05 15:32:51 +08:00
swipdex.value = 4;
setTimeout(()=>{
menuop.value = 4
},100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_th':
2026-01-05 15:32:51 +08:00
swipdex.value = 5;
setTimeout(()=>{
menuop.value = 5
},100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_pd':
2026-01-05 15:32:51 +08:00
swipdex.value = 6;
setTimeout(()=>{
menuop.value = 6
},100)
2026-01-05 11:01:11 +08:00
break;
2026-01-07 11:23:47 +08:00
case 'kzgn_hljz':
swipdex.value = 7;
setTimeout(()=>{
menuop.value =7;
},100)
console.log('护理矩阵')
break;
case 'kzgn_yljz':
swipdex.value = 8;
setTimeout(()=>{
menuop.value = 8;
},100)
console.log('医疗矩阵')
break;
case 'kzgn_hqjz':
swipdex.value = 9;
setTimeout(()=>{
menuop.value = 9;
},100)
console.log('后勤矩阵')
break;
case 'kzgn_kfjz':
swipdex.value = 7;
setTimeout(()=>{
menuop.value =7;
},100)
console.log('库房')
break;
2026-01-05 11:01:11 +08:00
case 'back':
uni.navigateBack()
break;
default:
break;
}
},10)
}
2026-01-07 11:23:47 +08:00
const arrlist = ref([ ])
2026-01-05 11:01:11 +08:00
const listarr = ref([])
const swip = ()=>{
2026-01-07 11:23:47 +08:00
let nuId = uni.getStorageSync('nuId');
2026-01-05 11:01:11 +08:00
getPermissionList({employessId:uni.getStorageSync('userInfo').employessId}).then(res=>{
2026-01-07 11:23:47 +08:00
console.log(res)
console.log(nuId)
res.result.forEach(item=>{
if(item.nuId == nuId){
listarr.value = item.dataList
}
})
2026-01-05 11:01:11 +08:00
})
let nuName = uni.getStorageSync('nuName')
queryPadPageList({'pageNo':-1,'nuName':nuName}).then((res => {
let arr = res.result.records[0].permissionList;
2026-01-07 11:23:47 +08:00
arrlist.value = [
{ name: '首页', url: '/static/shouye/ck/h0.png', urls: '/static/shouye/ck/h1.png' ,type:'sy'},
{ 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'},
{ 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'},
];
2026-01-05 11:01:11 +08:00
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>