hldy_app_mini/pages/Warehouse/index/index.vue

251 lines
7.3 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-09 16:25:02 +08:00
<leftcontent :list="arrlist" @navurl="navurl" :userInfo="userInfo"></leftcontent>
2025-12-26 10:07:35 +08:00
</view>
<view class="boxrt">
2026-02-10 17:27:00 +08:00
<index :isShow="menuop == 0" v-if="swipdex == 0" @swip="swip" />
<material :isShow="menuop == 1" v-if="swipdex == 1" ref="materials"></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&& !specialPage" ref="inventorys"
@changepages="changepages"></inventory>
<addtory :isShow="menuop == 6" v-if="swipdex == 6&&specialPage=='1'" :specialitem="specialitem" ></addtory>
<nurse :isshow="menuop == 7" v-if="swipdex==7&&uni.getStorageSync('nuId')" />
2026-01-07 16:06:12 +08:00
<!-- <invoicing :isshow="menuop == 8" v-if="swipdex==8&&uni.getStorageSync('nuId')" /> -->
2026-01-07 11:23:47 +08:00
<logistics :isshow="menuop == 9" v-if="swipdex==9&&uni.getStorageSync('nuId')" />
2026-01-07 16:06:12 +08:00
<invoicing :isshow="menuop == 10" v-if="swipdex==10&&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';
2026-02-10 17:27:00 +08:00
import { onShow, onLoad, onHide, onPageScroll, onBackPress } from "@dcloudio/uni-app"
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";
2026-02-10 17:27:00 +08:00
import addtory from "@/pages/procurement/addtory.vue";
2025-12-26 15:34:50 +08:00
import retstock from "@/pages/procurement/retstock.vue";
2026-02-10 17:27:00 +08:00
2026-01-07 16:06:12 +08:00
// import logistics from "@/pages/NursingNew/component/logistics/index.vue"
import invoicing from "@/pages/NursingNew/component/invoicing/index.vue"
import logistics from "@/pages/NursingNew/component/logistics/index.vue"
2026-01-07 11:23:47 +08:00
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-02-10 17:27:00 +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)
2026-02-10 17:27:00 +08:00
onBackPress(() => {
if (specialPage.value) {
specialPage.value--
return true; // 禁止返回手势返回
} else {
return false; // 禁止返回手势返回
}
})
const specialPage = ref(0)
const specialitem = ref({})
const changepages = (item : any) => {
specialPage.value = 1
specialitem.value = item
}
2025-12-30 08:42:53 +08:00
// onMounted(() => {
// // 处理响应式
// navurl(0)
// })
2026-01-05 11:01:11 +08:00
// onShow(()=>{
// navurl(0,arrlist[0])
// })
2026-02-10 17:27:00 +08:00
const navurl = (e : number, v : any) => {
2025-12-26 15:15:35 +08:00
// 最后一个直接返回
2026-01-05 15:32:51 +08:00
menuop.value = -1;
swipdex.value = -1;
2026-02-10 17:27:00 +08:00
setTimeout(() => {
switch (v.type) {
2026-01-05 11:01:11 +08:00
case 'sy':
2026-02-10 17:27:00 +08:00
swipdex.value = 0;
setTimeout(() => {
menuop.value = 0
}, 100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_cg':
2026-02-10 17:27:00 +08:00
swipdex.value = 1;
setTimeout(() => {
menuop.value = 1
}, 100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_jh':
2026-02-10 17:27:00 +08:00
swipdex.value = 2;
setTimeout(() => {
menuop.value = 3
}, 100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_wj':
2026-02-10 17:27:00 +08:00
swipdex.value = 3;
setTimeout(() => {
menuop.value = 3
}, 100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_ql':
2026-02-10 17:27:00 +08:00
swipdex.value = 4;
setTimeout(() => {
menuop.value = 4
}, 100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_th':
2026-02-10 17:27:00 +08:00
swipdex.value = 5;
setTimeout(() => {
menuop.value = 5
}, 100)
2026-01-05 11:01:11 +08:00
break;
case 'kf_pd':
2026-02-10 17:27:00 +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':
2026-02-10 17:27:00 +08:00
swipdex.value = 7;
setTimeout(() => {
menuop.value = 7;
}, 100)
console.log('护理矩阵')
2026-01-07 11:23:47 +08:00
break;
case 'kzgn_yljz':
2026-02-10 17:27:00 +08:00
swipdex.value = 7;
setTimeout(() => {
menuop.value = 7;
}, 100)
console.log('医疗矩阵')
2026-01-07 11:23:47 +08:00
break;
case 'kzgn_hqjz':
2026-02-10 17:27:00 +08:00
swipdex.value = 9;
setTimeout(() => {
menuop.value = 9;
}, 100)
console.log('后勤矩阵')
2026-01-07 11:23:47 +08:00
break;
case 'kzgn_kfjz':
2026-02-10 17:27:00 +08:00
swipdex.value = 10;
setTimeout(() => {
menuop.value = 10;
}, 100)
console.log('库房')
2026-01-07 11:23:47 +08:00
break;
2026-01-05 11:01:11 +08:00
case 'back':
2026-02-10 17:27:00 +08:00
uni.navigateBack()
2026-01-05 11:01:11 +08:00
break;
2026-02-10 17:27:00 +08:00
2026-01-05 11:01:11 +08:00
default:
break;
}
2026-02-10 17:27:00 +08:00
}, 10)
2026-01-05 11:01:11 +08:00
}
2026-02-10 17:27:00 +08:00
const arrlist = ref([])
2026-01-05 11:01:11 +08:00
const listarr = ref([])
2026-02-10 17:27:00 +08:00
const swip = () => {
2026-01-07 11:23:47 +08:00
let nuId = uni.getStorageSync('nuId');
2026-02-10 17:27:00 +08:00
getPermissionList({ employeesId: uni.getStorageSync('userInfo').employeesId }).then(res => {
res.result.forEach(item => {
if (item.nuId == nuId) {
listarr.value = item.dataList
2026-01-07 11:23:47 +08:00
}
})
2026-01-05 11:01:11 +08:00
})
let nuName = uni.getStorageSync('nuName')
2026-02-10 17:27:00 +08:00
queryPadPageList({ 'pageNo': -1, 'nuName': nuName }).then((res => {
2026-01-05 11:01:11 +08:00
let arr = res.result.records[0].permissionList;
2026-01-07 11:23:47 +08:00
arrlist.value = [
2026-02-10 17:27:00 +08:00
{ 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-07 11:23:47 +08:00
];
2026-01-05 11:01:11 +08:00
let tbr = [];
2026-02-10 17:27:00 +08:00
if (arr) {
arr.forEach((v, i) => {
let obj = listarr.value.find(item =>
2026-01-05 11:01:11 +08:00
item.menuCode == v.menuCode
);
2026-02-10 17:27:00 +08:00
if (obj) {
2026-01-05 11:01:11 +08:00
tbr.push(v)
}
})
2026-02-10 17:27:00 +08:00
tbr.forEach(item => {
let obj = tabbrarr.value.find(r =>
2026-01-05 11:01:11 +08:00
r.type == item.menuCode
);
2026-02-10 17:27:00 +08:00
if (obj) {
2026-01-05 11:01:11 +08:00
arrlist.value.push(obj);
}
2026-02-10 17:27:00 +08:00
})
2026-01-05 11:01:11 +08:00
}
2026-02-10 17:27:00 +08:00
let back = [
{ name: '返回', url: '/static/shouye/sy/f0.png', urls: '/static/shouye/sy/f1.png', type: 'back' },
2026-01-05 11:01:11 +08:00
]
arrlist.value.push(...back);
}))
2025-12-26 15:15:35 +08:00
}
2026-01-09 16:25:02 +08:00
const materials = ref<InstanceType<typeof ChildComponent>>();
const inventorys = ref<InstanceType<typeof ChildComponent>>()
const userInfo = ref({})
2026-02-10 17:27:00 +08:00
onShow(() => {
2026-01-09 16:25:02 +08:00
userInfo.value = uni.getStorageSync('userInfo');
2026-02-10 17:27:00 +08:00
if (menuop.value == 1) {
materials.value.gwcsx();
2026-01-09 16:25:02 +08:00
}
2026-02-10 17:27:00 +08:00
if (menuop.value == 6) {
2026-01-09 16:25:02 +08:00
inventorys.value.firstgetqueryCgdList()
}
})
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;
2026-02-05 16:34:40 +08:00
background-color: #f4f4f4;
2025-12-26 15:15:35 +08:00
overflow: hidden;
z-index: 12;
}
2025-12-26 15:34:50 +08:00
.left {
width: 8.2vw;
height: 100vh;
2026-02-10 17:27:00 +08:00
2025-12-26 15:34:50 +08:00
}
.boxrt {
width: calc(100vw - 8.2vw);
background: RGBA(239, 240, 244, 1);
display: flex;
2026-02-05 16:34:40 +08:00
// padding-left: 1vw;
padding-top: 0.8vw;
2025-12-26 15:34:50 +08:00
}
2025-12-26 10:07:35 +08:00
</style>