bonus-material-app/src/pages/work/index.vue

449 lines
12 KiB
Vue
Raw Normal View History

2024-11-18 09:05:38 +08:00
<template>
<view class="content">
2025-06-15 17:22:44 +08:00
<view class="new-purchase" >
2025-02-14 18:07:29 +08:00
<div class="title-text">
<div></div>
<div class="purchase-title">信息采集</div>
</div>
<view
class="purchase-item"
:key="index"
@tap="onNavigateTo(item.url)"
v-for="(item, index) in newInfoList"
>
<image :src="item.iconSrc" mode="scaleToFill" />
<text>
{{ item.title }}
</text>
</view>
2025-06-15 15:28:56 +08:00
</view>
2025-02-14 18:07:29 +08:00
2025-06-15 17:22:44 +08:00
<view class="new-purchase" >
2025-02-14 18:07:29 +08:00
<div class="title-text">
<div></div>
<div class="purchase-title">新购管理</div>
</div>
2024-11-19 10:32:24 +08:00
<view
class="purchase-item"
:key="index"
@tap="onNavigateTo(item.url)"
2024-11-18 09:05:38 +08:00
v-for="(item, index) in newPurchaseList"
2024-11-19 10:32:24 +08:00
>
<image :src="item.iconSrc" mode="scaleToFill" />
<text>
{{ item.title }}
</text>
</view>
2025-06-15 15:28:56 +08:00
</view>
2025-06-15 17:22:44 +08:00
<view class="new-purchase" >
2025-02-14 18:07:29 +08:00
<div class="title-text">
<div></div>
2025-06-15 17:22:44 +08:00
<div class="purchase-title" >仓储管理</div>
2025-02-14 18:07:29 +08:00
</div>
2024-11-19 10:32:24 +08:00
<view
class="purchase-item"
2024-11-18 09:05:38 +08:00
:key="index"
@tap="onNavigateTo(item.url)"
2024-11-19 10:32:24 +08:00
v-for="(item, index) in pickingList"
2024-11-18 09:05:38 +08:00
>
2024-11-19 10:32:24 +08:00
<image :src="item.iconSrc" mode="scaleToFill" />
<text>
{{ item.title }}
</text>
</view>
2024-11-18 09:05:38 +08:00
</view>
2025-02-14 18:07:29 +08:00
2025-06-15 17:22:44 +08:00
<view class="new-purchase" >
2025-02-14 18:07:29 +08:00
<div class="title-text">
<div></div>
2025-02-15 13:22:20 +08:00
<div class="purchase-title">修试管理</div>
2025-02-14 18:07:29 +08:00
</div>
2024-12-31 15:37:54 +08:00
<view
class="purchase-item"
:key="index"
@tap="onNavigateTo(item.url)"
2025-02-14 18:07:29 +08:00
v-for="(item, index) in repairList"
2024-12-31 15:37:54 +08:00
>
<image :src="item.iconSrc" mode="scaleToFill" />
<text>
{{ item.title }}
</text>
</view>
</view>
2025-06-15 15:28:56 +08:00
2025-06-15 17:22:44 +08:00
<view class="new-purchase" >
2025-02-14 18:07:29 +08:00
<div class="title-text">
<div></div>
<div class="purchase-title">配件管理</div>
</div>
2024-11-21 10:47:48 +08:00
<view
class="purchase-item"
:key="index"
@tap="onNavigateTo(item.url)"
2025-02-14 18:07:29 +08:00
v-for="(item, index) in partList"
2024-11-21 10:47:48 +08:00
>
<image :src="item.iconSrc" mode="scaleToFill" />
2025-06-15 15:28:56 +08:00
<text style="white-space: nowrap; font-size: 26rpx">
2024-11-21 10:47:48 +08:00
{{ item.title }}
</text>
</view>
</view>
2025-06-15 15:28:56 +08:00
2025-06-15 17:22:44 +08:00
<view class="new-purchase" >
2025-02-14 18:07:29 +08:00
<div class="title-text">
<div></div>
<div class="purchase-title">标准箱管理</div>
</div>
2025-06-15 15:28:56 +08:00
<view
class="purchase-item"
:key="index"
2024-12-19 18:27:18 +08:00
@tap="onNavigateTo(item.url)"
2025-06-15 15:28:56 +08:00
v-for="(item, index) in boxList"
>
2024-12-19 18:27:18 +08:00
<image :src="item.iconSrc" mode="scaleToFill" />
<text>
{{ item.title }}
</text>
</view>
2025-06-15 15:28:56 +08:00
</view>
2025-06-25 18:16:48 +08:00
2025-06-25 09:33:01 +08:00
<view class="new-purchase" >
<div class="title-text">
<div></div>
<div class="purchase-title">材料站管理</div>
</div>
<view
class="purchase-item"
:key="index"
@tap="onNavigateTo(item.url)"
2025-06-25 09:33:01 +08:00
v-for="(item, index) in materialsStationList"
>
<image :src="item.iconSrc" mode="scaleToFill" />
<text>
{{ item.title }}
</text>
</view>
</view>
2024-11-18 09:05:38 +08:00
</view>
</template>
<script setup>
2025-06-15 17:22:44 +08:00
import { ref,computed } from 'vue'
import { onShow,onLoad } from '@dcloudio/uni-app'
const urlPermissions = ref([])
onShow((options) => {
urlPermissions.value = uni.getStorageSync('urlPermissions')
console.log("yyyyyyy",urlPermissions.value)
})
2025-02-14 18:07:29 +08:00
// 信息采集
const newInfoList = ref([
{
title: '编码采集',
2025-06-25 18:16:48 +08:00
url: '/pages/repair/wsMaInfo/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/bianMa.png',
},
{
title: '盘点绑定',
2025-06-15 17:22:44 +08:00
url: '/pages/new-purchase/entry/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/panDian.png',
},
{
title: '日期更新',
2025-06-25 17:50:19 +08:00
url: '/pages/dateUpdate/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/panDian.png',
},
2025-06-15 15:28:56 +08:00
{
2025-02-14 18:07:29 +08:00
title: '铭牌更新',
2025-06-30 18:01:49 +08:00
url: '/pages/nameplateUpdate/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/minPai.png',
},
])
2025-06-15 17:22:44 +08:00
// 使用计算属性筛选 newInfoList 中的数据
const newInfoListTwo = computed(() => {
return newInfoList.value.filter(item => urlPermissions.value.includes(item.url))
})
2024-11-19 10:32:24 +08:00
// 新购
2024-11-18 09:05:38 +08:00
const newPurchaseList = ref([
2024-11-19 10:32:24 +08:00
{
title: '新购验收',
url: '/pages/new-purchase/accept/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/purchaseAccept.png',
2024-11-19 10:32:24 +08:00
},
2024-11-18 16:52:12 +08:00
// { title: '新购到货', url: '/pages/new-purchase/bind/index' },
2024-11-19 10:32:24 +08:00
{
title: '新购绑定',
url: '/pages/new-purchase/bind/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/purchaseBind.png',
2024-11-19 10:32:24 +08:00
},
{
title: '新购入库',
url: '/pages/new-purchase/entry/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/purchaseBind.png',
2024-11-19 10:32:24 +08:00
},
])
2025-06-15 17:22:44 +08:00
// 使用计算属性筛选 newInfoList 中的数据
const newPurchaseListTwo = computed(() => {
return newPurchaseList.value.filter(item => urlPermissions.value.includes(item.url))
})
2025-02-14 18:07:29 +08:00
// 仓储
2024-11-19 10:32:24 +08:00
const pickingList = ref([
2025-06-14 17:30:37 +08:00
{
title: '电子签名',
url: '/pages/picking/outbound/sign',
iconSrc: '../../static/workbench/backCreate.png',
},
2024-11-19 10:32:24 +08:00
{
title: '领料出库',
url: '/pages/picking/outbound/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/backCreate.png',
},
2025-04-30 17:06:33 +08:00
{
title: '领料审核',
url: '/pages/picking/review/index',
iconSrc: '../../static/workbench/backCreate.png',
},
2025-03-21 18:17:00 +08:00
// {
// title: '退料创建',
// url: '',
2025-03-18 16:56:04 +08:00
// iconSrc: '../../static/workbench/backCreate.png',
2025-06-15 15:28:56 +08:00
// },
2025-03-21 18:17:00 +08:00
{
title: '退料接收',
url: '/pages/back/index',
iconSrc: '../../static/workbench/backCreate.png',
},
2025-02-14 18:07:29 +08:00
{
title: '修试入库',
url: '/pages/repair/testedInBound/index',
iconSrc: '../../static/workbench/backCreate.png',
2024-11-19 10:32:24 +08:00
},
2024-11-18 09:05:38 +08:00
])
2024-12-31 15:37:54 +08:00
2025-06-15 17:22:44 +08:00
// 使用计算属性筛选 newInfoList 中的数据
const pickingListTwo = computed(() => {
return pickingList.value.filter(item => urlPermissions.value.includes(item.url))
})
2024-12-31 15:37:54 +08:00
// 配件
const partList = ref([
{
title: '配件领料',
url: '/pages/part/part-lease/index',
2025-02-21 02:49:16 +08:00
iconSrc: '../../static/workbench/partIn.png',
2025-02-15 13:22:20 +08:00
},
2025-06-15 15:40:39 +08:00
{
title: '配件新购验收',
url: '/pages/part/parts-accept/index',
iconSrc: '../../static/workbench/partIn.png',
},
2025-02-15 13:22:20 +08:00
{
title: '配件新购入库',
2025-06-15 15:40:39 +08:00
url: '/pages/part/entry/index',
2025-02-15 13:22:20 +08:00
iconSrc: '../../static/workbench/partIn.png',
},
2025-03-18 16:56:04 +08:00
// {
// title: '配件领用申请',
// url: '',
// iconSrc: '../../static/workbench/partApprove.png',
// }
2025-06-15 15:28:56 +08:00
])
2024-12-31 15:37:54 +08:00
2025-06-15 17:22:44 +08:00
// 使用计算属性筛选 newInfoList 中的数据
const partListTwo = computed(() => {
return partList.value.filter(item => urlPermissions.value.includes(item.url))
})
// 维修
2024-11-21 10:47:48 +08:00
const repairList = ref([
2025-06-12 19:14:19 +08:00
{
2025-06-15 15:28:56 +08:00
title: '机具定损',
url: '/pages/repair/equipAssessment/index',
iconSrc: '../../static/workbench/repair.png',
},
2024-11-21 10:47:48 +08:00
{
title: '维修',
url: '/pages/repair/repairManage/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/repair.png',
},
2025-06-25 18:16:48 +08:00
{
title: '现场维修',
url: '/pages/repair/fieldMaintenance/index',
iconSrc: '../../static/workbench/repair.png',
},
{
title: '修试审核',
url: '/pages/repair/testExamine/index',
2025-02-14 18:07:29 +08:00
iconSrc: '../../static/workbench/repair.png',
2024-11-21 10:47:48 +08:00
},
2025-02-14 18:07:29 +08:00
// {
// title: '修试入库',
// url: '/pages/repair/testedInBound/index',
// iconSrc: '../../static/workbench/fix.png',
// },
2025-06-15 15:28:56 +08:00
{
title: '报废审核',
url: '/pages/repair/scrapExamine/index',
iconSrc: '../../static/workbench/repair.png',
},
2024-11-21 10:47:48 +08:00
])
2024-11-18 09:05:38 +08:00
2025-06-15 17:22:44 +08:00
// 使用计算属性筛选 newInfoList 中的数据
const repairListTwo = computed(() => {
return repairList.value.filter(item => urlPermissions.value.includes(item.url))
})
2024-12-19 18:27:18 +08:00
// 标准箱
const boxList = ref([
{
title: '标准箱管理',
url: '/pages/standardBox/index',
2025-02-15 13:22:20 +08:00
iconSrc: '../../static/workbench/boxManage.png',
2024-12-19 18:27:18 +08:00
},
{
title: '标准箱移交',
url: '/pages/standardBox/transferBox',
2025-02-15 13:22:20 +08:00
iconSrc: '../../static/workbench/boxHandOver.png',
2024-12-19 18:27:18 +08:00
},
{
title: '标准箱接收',
url: '/pages/standardBox/acceptBox',
2025-02-15 13:22:20 +08:00
iconSrc: '../../static/workbench/boxRecept.png',
2024-12-19 18:27:18 +08:00
},
])
2025-06-25 09:33:01 +08:00
// 材料站
const materialsStationList = ref([
{
title: '材料站管理',
url: '/pages/materialsStation/index/index',
iconSrc: '../../static/workbench/repair.png',
},
])
2025-06-15 17:22:44 +08:00
// 使用计算属性筛选 newInfoList 中的数据
const boxListTwo = computed(() => {
return boxList.value.filter(item => urlPermissions.value.includes(item.url))
})
2025-02-15 13:22:20 +08:00
// // 库存查询
// const searchList = ref([
// {
// title: '机具查询',
// url: '/pages/stquery/deviceStatusRecord/index',
// iconSrc: '../../static/workbench/fix.png',
// },
2025-06-15 15:28:56 +08:00
2025-02-15 13:22:20 +08:00
// ])
2025-02-15 13:22:20 +08:00
// // 设备信息查询
// const deviceList = ref([
// {
// title: '二维码',
// url: '/pages/devicesSearch/qrSearch',
// iconSrc: '../../static/workbench/fetchMaterialOutStore.png',
// },
// {
// title: 'OCR',
// url: '/pages/devicesSearch/ocrSearch',
// iconSrc: '../../static/workbench/fetchMaterialOutStore.png',
// },
// {
// title: '设备编号',
// url: '/pages/devicesSearch/codeSearch',
// iconSrc: '../../static/workbench/fetchMaterialOutStore.png',
// },
// ])
2024-11-18 09:05:38 +08:00
const onNavigateTo = (url) => {
2025-06-15 15:28:56 +08:00
uni.setStorageSync('scrollTop', null)
2025-06-15 16:13:33 +08:00
uni.setStorageSync('currentPage', 1)
2024-11-18 09:05:38 +08:00
uni.navigateTo({ url })
}
</script>
<style lang="scss">
2024-11-19 10:32:24 +08:00
page {
overflow: hidden;
2025-06-15 15:28:56 +08:00
overflow-y: auto;
2024-11-19 10:32:24 +08:00
}
.content {
padding: 24rpx;
min-height: 100vh;
background-color: #f7f8fa;
// 功能区块样式
.new-purchase {
background-color: #fff;
border-radius: 20rpx;
2025-04-14 14:40:10 +08:00
padding: 10rpx 8rpx;
margin-bottom: 8rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
2024-11-19 10:32:24 +08:00
display: flex;
flex-wrap: wrap;
2025-02-14 18:07:29 +08:00
// 标题样式
.purchase-title {
font-size: 32rpx;
font-weight: 600;
color: #262626;
}
.title-text {
2025-04-14 14:40:10 +08:00
margin-top: 5px;
2025-02-15 13:22:20 +08:00
padding: 0px 0;
2025-02-14 18:07:29 +08:00
display: flex;
align-items: center;
// font-size: 14px;
font-weight: bold;
letter-spacing: 1px;
2025-06-15 15:28:56 +08:00
width: 100%;
2025-02-14 18:07:29 +08:00
}
.title-text div:first-child {
width: 5px;
2025-04-14 14:40:10 +08:00
height: 10px;
2025-02-14 18:07:29 +08:00
margin-right: 8px;
background-color: #2d73cf;
}
// 功能项样式
.purchase-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
2025-02-15 13:22:20 +08:00
padding: 4rpx 0;
transition: all 0.3s ease;
&:active {
transform: scale(0.95);
opacity: 0.8;
}
// 图标样式
image {
2025-04-14 14:40:10 +08:00
width: 120rpx;
height: 120rpx;
margin-bottom: 2rpx;
}
2024-11-18 09:05:38 +08:00
// 文字样式
text {
font-size: 28rpx;
color: #262626;
font-weight: 500;
}
2024-11-19 10:32:24 +08:00
}
2024-11-18 09:05:38 +08:00
}
}
</style>