权限功能完善

This commit is contained in:
BianLzhaoMin 2024-08-27 16:26:55 +08:00
parent ab57988c81
commit bd9c463855
2 changed files with 240 additions and 203 deletions

View File

@ -50,20 +50,43 @@
class="llsp"
@click="jumpUrl('fetchExam')"
v-if="
store.includes('service:auditing') || store.includes('*')
store.includes('picking:auditing:fgs') ||
store.includes('*:*:*') ||
store.includes('picking:auditing:sgb') ||
store.includes('picking:auditing:jjnb') ||
store.includes('picking:auditing:tsnb')
">
<h4>{{ waitList.leaseNum }}</h4>
<h5>领料待审批</h5>
</view>
<view class="tlsp" @click="jumpUrl('exitExam')">
<view
class="tlsp"
@click="jumpUrl('exitExam')"
v-if="
store.includes('return:auditing:auditing') ||
store.includes('*:*:*') ||
store.includes('return:auditing:auditing:batch')
">
<h4>{{ waitList.backNum }}</h4>
<h5>退料待审批</h5>
</view>
<view class="bfsh" @click="jumpUrl('crashExam')">
<view
class="bfsh"
@click="jumpUrl('crashExam')"
v-if="
store.includes('service:auditing') ||
store.includes('*:*:*') ||
store.includes('service:batch:auditing')
">
<h4>{{ waitList.scrapNum }}</h4>
<h5>报废待审核</h5>
</view>
<view class="sysh" @click="jumpUrl('testExam')">
<view
class="sysh"
@click="jumpUrl('testExam')"
v-if="
store.includes('scrap:auditing') || store.includes('*:*:*')
">
<h4>{{ waitList.trialNum }}</h4>
<h5>试验检验待审核</h5>
</view>

View File

@ -1,211 +1,225 @@
<template>
<view>
<view class="upper-search">
<h4>{{ companyName }}</h4>
<uni-easyinput prefixIcon="search" v-model="iptVal" placeholder="搜索" @iconClick="iconClick"></uni-easyinput>
</view>
<h4 class="tit">业务办理</h4>
<view class="secs">
<view @click="jumpUrl('fetchMaterial')">
<image src="/static/fetchMaterial.png" mode=""></image>
<span>领料申请</span>
</view>
<view @click="jumpUrl('exitMaterial')">
<image src="/static/exitMaterial.png" mode=""></image>
<span>退料申请</span>
</view>
</view>
<h4 class="tit">移动办公</h4>
<view class="secs">
<view
v-for="(part, index) in benchList"
:key="index"
@click="jumpUrl(part.url)"
>
<image :src="part.pic" mode=""></image>
<span>{{ part.name }}</span>
</view>
</view>
<h4 class="tit">查询</h4>
<view class="secs">
<view @click="jumpUrl('searchProjUsing')">
<image src="/static/searchProjUsing.png" mode=""></image>
<span>工程在用</span>
</view>
<view @click="jumpUrl('searchFetchRecord')">
<image src="/static/searchFetchRecord.png" mode=""></image>
<span>领用记录</span>
</view>
</view>
</view>
<view>
<view class="upper-search">
<h4>{{ companyName }}</h4>
<uni-easyinput
prefixIcon="search"
v-model="iptVal"
placeholder="搜索"
@iconClick="iconClick"></uni-easyinput>
</view>
<h4 class="tit">业务办理</h4>
<view class="secs">
<view
@click="jumpUrl('fetchMaterial')"
v-if="
store.includes('picking:apply:apply') ||
store.includes('*:*:*')
">
<image src="/static/fetchMaterial.png" mode=""></image>
<span>领料申请</span>
</view>
<view
@click="jumpUrl('exitMaterial')"
v-if="
store.includes('return:apply:apply') ||
store.includes('*:*:*')
">
<image src="/static/exitMaterial.png" mode=""></image>
<span>退料申请</span>
</view>
</view>
<h4 class="tit">移动办公</h4>
<view class="secs">
<view
v-for="(part, index) in benchList"
:key="index"
@click="jumpUrl(part.url)">
<image :src="part.pic" mode=""></image>
<span>{{ part.name }}</span>
</view>
</view>
<h4 class="tit">查询</h4>
<view class="secs">
<view @click="jumpUrl('searchProjUsing')">
<image src="/static/searchProjUsing.png" mode=""></image>
<span>工程在用</span>
</view>
<view @click="jumpUrl('searchFetchRecord')">
<image src="/static/searchFetchRecord.png" mode=""></image>
<span>领用记录</span>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
companyName: uni.getStorageSync('companyName'),
iptVal: '',
benchList: [
{
name: '领料审批',
pic: '/static/fetchExam.png',
url: 'fetchExam'
},
{
name: '退料审批',
pic: '/static/exitExam.png',
url: 'exitExam'
},
{
name: 'RFID绑定',
pic: '/static/rfidBinding.png',
url: 'rfidBinding'
},
{
name: '二维码绑定',
pic: '/static/qrcodeBinding.png',
url: 'qrcodeBinding'
},
{
name: '综合服务中心审核',
pic: '/static/serviceCenterExam.png',
url: 'serviceCenterExam'
},
{
name: '新购入库',
pic: '/static/newInStore.png',
url: 'newInStore'
},
/* {
export default {
data() {
return {
companyName: uni.getStorageSync("companyName"),
iptVal: "",
benchList: [
{
name: "领料审批",
pic: "/static/fetchExam.png",
url: "fetchExam",
isShow: "",
},
{
name: "退料审批",
pic: "/static/exitExam.png",
url: "exitExam",
},
{
name: "RFID绑定",
pic: "/static/rfidBinding.png",
url: "rfidBinding",
},
{
name: "二维码绑定",
pic: "/static/qrcodeBinding.png",
url: "qrcodeBinding",
},
{
name: "综合服务中心审核",
pic: "/static/serviceCenterExam.png",
url: "serviceCenterExam",
},
{
name: "新购入库",
pic: "/static/newInStore.png",
url: "newInStore",
},
/* {
name: '退料入库',
pic: '/static/backMaterialInStore.png',
url: 'backMaterialInStore'
}, */
{
name: '修试入库',
pic: '/static/repairTestInStore.png',
url: 'repairTestInStore'
},
{
name: '领料出库',
pic: '/static/fetchMaterialOutStore.png',
url: 'fetchMaterialOutStore'
},
{
name: '退料接收',
pic: '/static/backMaterialReceive.png',
url: 'backMaterialReceive'
},
{
name: '维修',
pic: '/static/fix.png',
url: 'fix'
},
{
name: '预报废审核',
pic: '/static/preCrashExam.png',
url: 'preCrashExam'
},
{
name: '预报废列表',
pic: '/static/preCrashList.png',
url: 'preCrashList'
},
{
name: '报废审核',
pic: '/static/crashExam.png',
url: 'crashExam'
},
{
name: '试验检验审核',
pic: '/static/testExam.png',
url: 'testExam'
},
{
name: 'IOT设备绑定',
pic: '/static/testExam.png',
url: 'IOTBinding'
}
]
}
},
methods: {
iconClick () {
console.log(this.iptVal);
},
jumpUrl (path) {
if (path == 'qrcodeBinding') {
uni.scanCode({
success: (res) => {
const fixedCode = res.result.split('=')[1]
console.log(fixedCode);
if (!fixedCode) {
uni.showToast({
icon: 'none',
title: '未识别到设备!'
})
} else {
uni.navigateTo({
url: `/pages/qrcodeBindPage/qrcodeBindPage?code=${fixedCode}`
})
}
}
})
} else {
uni.navigateTo({
url: `/pages/${path}/${path}`
})
}
},
toast () {
uni.showToast({
icon: 'none',
title: '敬请期待!'
})
}
}
}
{
name: "修试入库",
pic: "/static/repairTestInStore.png",
url: "repairTestInStore",
},
{
name: "领料出库",
pic: "/static/fetchMaterialOutStore.png",
url: "fetchMaterialOutStore",
},
{
name: "退料接收",
pic: "/static/backMaterialReceive.png",
url: "backMaterialReceive",
},
{
name: "维修",
pic: "/static/fix.png",
url: "fix",
},
{
name: "预报废审核",
pic: "/static/preCrashExam.png",
url: "preCrashExam",
},
{
name: "预报废列表",
pic: "/static/preCrashList.png",
url: "preCrashList",
},
{
name: "报废审核",
pic: "/static/crashExam.png",
url: "crashExam",
},
{
name: "试验检验审核",
pic: "/static/testExam.png",
url: "testExam",
},
{
name: "IOT设备绑定",
pic: "/static/testExam.png",
url: "IOTBinding",
},
],
};
},
methods: {
iconClick() {
console.log(this.iptVal);
},
jumpUrl(path) {
if (path == "qrcodeBinding") {
uni.scanCode({
success: (res) => {
const fixedCode = res.result.split("=")[1];
console.log(fixedCode);
if (!fixedCode) {
uni.showToast({
icon: "none",
title: "未识别到设备!",
});
} else {
uni.navigateTo({
url: `/pages/qrcodeBindPage/qrcodeBindPage?code=${fixedCode}`,
});
}
},
});
} else {
uni.navigateTo({
url: `/pages/${path}/${path}`,
});
}
},
toast() {
uni.showToast({
icon: "none",
title: "敬请期待!",
});
},
},
};
</script>
<style lang="scss">
body{
background: url('/static/workspace-bgd.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
.upper-search{
width: 85%;
margin: 6vh auto;
color: #fff;
h4{
margin-bottom: 1vh;
}
}
.tit{
width: 85%;
margin: 4vh auto;
margin-bottom: 2vh;
}
.secs{
width: 90%;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
view{
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 2vh;
image{
width: 50%;
height: 6vh;
margin-bottom: 10rpx;
}
span{
font-size: 20rpx;
}
}
}
body {
background: url("/static/workspace-bgd.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.upper-search {
width: 85%;
margin: 6vh auto;
color: #fff;
h4 {
margin-bottom: 1vh;
}
}
.tit {
width: 85%;
margin: 4vh auto;
margin-bottom: 2vh;
}
.secs {
width: 90%;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
view {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 2vh;
image {
width: 50%;
height: 6vh;
margin-bottom: 10rpx;
}
span {
font-size: 20rpx;
}
}
}
</style>