2023-12-20 15:15:23 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<view class="upper-user">
|
|
|
|
|
|
<view class="user-lef">
|
|
|
|
|
|
<image src="/static/bg1.jpg" mode=""></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="user-rig">
|
|
|
|
|
|
<view>你好!{{ username }}</view>
|
|
|
|
|
|
<view>欢迎使用智慧仓储管理系统</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="sliders">
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h2>{{ todayDatas.dayLeaseNum }}</h2>
|
|
|
|
|
|
<span>当日领料</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h2>{{ todayDatas.dayBackNum }}</h2>
|
|
|
|
|
|
<span>当日退料</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h2>{{ todayDatas.dayInputNum }}</h2>
|
|
|
|
|
|
<span>当日入库</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h2>{{ todayDatas.dayOutNum }}</h2>
|
|
|
|
|
|
<span>当日出库</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="sections">
|
|
|
|
|
|
<view @click="jumpUrl('fetchMaterial')">
|
|
|
|
|
|
<image src="/static/getMaterial.png" mode=""></image>
|
|
|
|
|
|
<span>领料申请</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view @click="jumpUrl('exitMaterial')">
|
|
|
|
|
|
<image src="/static/exitMaterial.png" mode=""></image>
|
|
|
|
|
|
<span>退料申请</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- <view @click="toast">
|
|
|
|
|
|
<image src="/static/getWorkMaterial.png" mode=""></image>
|
|
|
|
|
|
<span>工器具领料申请</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view @click="toast">
|
|
|
|
|
|
<image src="/static/exitWorkMaterial.png" mode=""></image>
|
|
|
|
|
|
<span>工器具退料申请</span>
|
|
|
|
|
|
</view> -->
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<h4 style="width: 90%; margin: 3vh auto;">待办事项</h4>
|
|
|
|
|
|
<view class="wait-do">
|
|
|
|
|
|
<view class="llsp">
|
|
|
|
|
|
<h4>{{ waitList.leaseNum }}</h4>
|
|
|
|
|
|
<h5>领料待审批</h5>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="tlsp">
|
|
|
|
|
|
<h4>{{ waitList.backNum }}</h4>
|
|
|
|
|
|
<h5>退料待审批</h5>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="bfsh">
|
|
|
|
|
|
<h4>{{ waitList.scrapNum }}</h4>
|
|
|
|
|
|
<h5>报废待审核</h5>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="sysh">
|
|
|
|
|
|
<h4>{{ waitList.trialNum }}</h4>
|
|
|
|
|
|
<h5>实验检验待审核</h5>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<h4 style="width: 90%; margin: 3vh auto; display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
|
<span>通知公告</span>
|
|
|
|
|
|
<text @click="seeMore" style="color: #5297FF; font-weight: normal; font-size: 12px;">查看更多>></text>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="single-notice"
|
|
|
|
|
|
v-for="(notice, index) in noticeList"
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
@click="noticeDetail(notice.noticeId)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<view class="notice-lef">
|
|
|
|
|
|
<image src="/static/notice.png" mode=""></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="notice-rig">
|
|
|
|
|
|
<h4>{{ notice.noticeTitle }}</h4>
|
|
|
|
|
|
<h5>{{ notice.createTime }}</h5>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import { authPath, basePath, publicPath, systemPath } from '../../public';
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
username: uni.getStorageSync('userInfo').username,
|
|
|
|
|
|
noticeList: [],
|
|
|
|
|
|
todayDatas: {
|
|
|
|
|
|
dayLeaseNum: '',
|
|
|
|
|
|
dayBackNum: '',
|
|
|
|
|
|
dayInputNum: '',
|
|
|
|
|
|
dayOutNum: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
waitList: {
|
|
|
|
|
|
lldsp: '',
|
|
|
|
|
|
tldsp: '',
|
|
|
|
|
|
bfdsh: '',
|
|
|
|
|
|
sydsh: ''
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad() {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
seeMore () {
|
|
|
|
|
|
console.log('查看更多');
|
|
|
|
|
|
},
|
|
|
|
|
|
noticeDetail (id) {
|
|
|
|
|
|
console.log(id);
|
|
|
|
|
|
},
|
|
|
|
|
|
jumpUrl (path) {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/${path}/${path}`
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
toast () {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '敬请期待!'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
|
|
|
|
|
|
|
|
|
console.log(uni.getStorageSync('token'));
|
|
|
|
|
|
console.log(uni.getStorageSync('userInfo'));
|
|
|
|
|
|
let that = this
|
|
|
|
|
|
that.noticeList = []
|
|
|
|
|
|
// 获取公告内容
|
2023-12-23 23:21:42 +08:00
|
|
|
|
that.$api.index.noticeCont().then(res => {
|
2023-12-23 11:54:30 +08:00
|
|
|
|
console.log(res);
|
2023-12-20 15:15:23 +08:00
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
that.noticeList = res.data.data
|
|
|
|
|
|
}
|
|
|
|
|
|
}).catch(err => {
|
2023-12-23 11:54:30 +08:00
|
|
|
|
console.log(err);
|
2023-12-20 15:15:23 +08:00
|
|
|
|
})
|
|
|
|
|
|
// 获取待办事项
|
2023-12-23 23:21:42 +08:00
|
|
|
|
that.$api.index.waitDo().then(res => {
|
|
|
|
|
|
console.log(res);
|
2023-12-20 15:15:23 +08:00
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
that.waitList = res.data.data
|
|
|
|
|
|
}
|
|
|
|
|
|
}).catch(err => {
|
2023-12-23 23:21:42 +08:00
|
|
|
|
console.log(err);
|
2023-12-20 15:15:23 +08:00
|
|
|
|
})
|
|
|
|
|
|
// 获取关键数据
|
2023-12-23 23:21:42 +08:00
|
|
|
|
that.$api.index.keyData().then(res => {
|
|
|
|
|
|
console.log(res);
|
2023-12-20 15:15:23 +08:00
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
that.todayDatas = res.data.data
|
|
|
|
|
|
}
|
|
|
|
|
|
}).catch(err => {
|
2023-12-23 23:21:42 +08:00
|
|
|
|
console.log(err);
|
2023-12-20 15:15:23 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
body{
|
|
|
|
|
|
background: url('/static/bgd.png');
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.upper-user{
|
|
|
|
|
|
width: 85%;
|
|
|
|
|
|
margin: 8vh auto;
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 15rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
.user-lef{
|
|
|
|
|
|
width: 15%;
|
|
|
|
|
|
height: 6vh;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
image{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.user-rig{
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding-left: 20rpx;
|
|
|
|
|
|
view{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
view:first-child{
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
view:last-child{
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
letter-spacing: 6rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.sliders{
|
|
|
|
|
|
width: 85%;
|
|
|
|
|
|
height: 5vh;
|
|
|
|
|
|
margin: 4vh auto;
|
|
|
|
|
|
margin-bottom: 2vh;
|
|
|
|
|
|
border-radius: 15rpx 15rpx 0 0;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.1);
|
|
|
|
|
|
backdrop-filter: blur(2px);
|
|
|
|
|
|
border: 1px solid #B3D3FF;
|
|
|
|
|
|
padding: 20rpx 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
view{
|
|
|
|
|
|
width: 25%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
border-right: 1px solid #CDE2FF;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
h2{
|
|
|
|
|
|
font-size: 22px;
|
|
|
|
|
|
}
|
|
|
|
|
|
span{
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
view:last-child{
|
|
|
|
|
|
border-right: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.sections{
|
|
|
|
|
|
width: 90%;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
view{
|
|
|
|
|
|
width: 25%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
image{
|
|
|
|
|
|
width: 50%;
|
|
|
|
|
|
height: 6vh;
|
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
span{
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.wait-do{
|
|
|
|
|
|
width: 90%;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
view{
|
|
|
|
|
|
width: 48%;
|
|
|
|
|
|
height: 13vh;
|
|
|
|
|
|
margin-bottom: 15rpx;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 25rpx;
|
|
|
|
|
|
h4{
|
|
|
|
|
|
margin-bottom: 5rpx;
|
|
|
|
|
|
font-size: 22px;
|
|
|
|
|
|
}
|
|
|
|
|
|
h5{
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.llsp{
|
|
|
|
|
|
background: url('/static/llsp.png');
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.tlsp{
|
|
|
|
|
|
background: url('/static/tlsp.png');
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.bfsh{
|
|
|
|
|
|
background: url('/static/bfsh.png');
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.sysh{
|
|
|
|
|
|
background: url('/static/sysh.png');
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.single-notice{
|
|
|
|
|
|
width: 90%;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
border-bottom: 1px solid #DEE3EA;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 20rpx 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
.notice-lef{
|
|
|
|
|
|
width: 12%;
|
|
|
|
|
|
height: 5.5vh;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
image{
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.notice-rig{
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding-left: 20rpx;
|
|
|
|
|
|
h4{
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
h5{
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #8F9298;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|