| | |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 质量管理模块 --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasQualityItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">质量管理</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in qualityItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 人力资源模块 --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasHumanResourcesItems"> |
| | |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "人员薪资", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "合同管理", |
| | | }, |
| | | ]); |
| | | const qualityItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "原材料检验", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "过程检验", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "出厂检验", |
| | | }, |
| | | ]); |
| | | const safetyItems = reactive([ |
| | | { |
| | |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/xunjianshangchuan@2x.png", |
| | | label: "巡检上传", |
| | | label: "巡检管理", |
| | | }, |
| | | ]); |
| | | |
| | |
| | | url: "/pages/equipmentManagement/upkeep/index", |
| | | }); |
| | | break; |
| | | case "巡检上传": |
| | | case "巡检管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/inspectionUpload/index", |
| | | }); |
| | |
| | | case "人员薪资": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/monthlyStatistics/index", |
| | | }); |
| | | break; |
| | | case "合同管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/contractManagement/index", |
| | | }); |
| | | break; |
| | | case "原材料检验": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/materialInspection/index", |
| | | }); |
| | | break; |
| | | case "过程检验": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/processInspection/index", |
| | | }); |
| | | break; |
| | | case "出厂检验": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/finalInspection/index", |
| | | }); |
| | | break; |
| | | default: |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | console.log(orderRow, "orderRow======@@@@@@@@"); |
| | | // 扫码成功后跳转到生产报工页面,并传递orderRow参数 |
| | | uni.navigateTo({ |
| | | url: `/pages/productionManagement/productionReport/index?orderRow=${orderRow}`, |
| | |
| | | }; |
| | | collectMenuTitles(routers); |
| | | |
| | | console.log("允许的菜单标题:", Array.from(allowedMenuTitles)); |
| | | console.log( |
| | | "过滤前 - 营销管理:", |
| | | marketingItems.length, |
| | | "采购管理:", |
| | | purchaseItems.length, |
| | | "协同办公:", |
| | | collaborationItems.length |
| | | ); |
| | | console.log( |
| | | "过滤前 - 安全生产:", |
| | | safetyItems.length, |
| | | "人力资源:", |
| | | humanResourcesItems.length, |
| | | "生产管控:", |
| | | productionItems.length, |
| | | "设备管理:", |
| | | equipmentItems.length |
| | | ); |
| | | |
| | | // 过滤营销管理菜单 |
| | | const originalMarketing = [ |
| | | { icon: "/static/images/icon/xiaoshoutaizhang@2x.png", label: "销售台账" }, |
| | |
| | | const originalHumanResources = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "打卡签到" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "人员薪资" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "合同管理" }, |
| | | ]; |
| | | const filteredHumanResources = originalHumanResources.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | |
| | | humanResourcesItems.length, |
| | | ...filteredHumanResources |
| | | ); |
| | | |
| | | // 过滤质量管理菜单 |
| | | const originalQuality = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "原材料检验" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "过程检验" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "出厂检验" }, |
| | | ]; |
| | | const filteredQuality = originalQuality.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | qualityItems.splice(0, qualityItems.length, ...filteredQuality); |
| | | |
| | | // 过滤生产管控菜单 |
| | | const originalProduction = [ |
| | |
| | | { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "运行管理" }, |
| | | { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "设备报修" }, |
| | | { icon: "/static/images/icon/shbeibaoyang@2x.png", label: "设备保养" }, |
| | | { icon: "/static/images/icon/xunjianshangchuan@2x.png", label: "巡检上传" }, |
| | | { icon: "/static/images/icon/xunjianshangchuan@2x.png", label: "巡检管理" }, |
| | | ]; |
| | | const filteredEquipment = originalEquipment.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | equipmentItems.splice(0, equipmentItems.length, ...filteredEquipment); |
| | | |
| | | console.log( |
| | | "过滤后 - 营销管理:", |
| | | marketingItems.length, |
| | | "采购管理:", |
| | | purchaseItems.length, |
| | | "协同办公:", |
| | | collaborationItems.length |
| | | ); |
| | | console.log( |
| | | "过滤后 - 安全生产:", |
| | | safetyItems.length, |
| | | "人力资源:", |
| | | humanResourcesItems.length, |
| | | "生产管控:", |
| | | productionItems.length, |
| | | "设备管理:", |
| | | equipmentItems.length |
| | | ); |
| | | console.log( |
| | | "生产管控菜单项:", |
| | | productionItems.map(item => item.label) |
| | | ); |
| | | }; |
| | | |
| | | // 检查模块是否有菜单项需要显示 |
| | |
| | | const hasPurchaseItems = computed(() => purchaseItems.length > 0); |
| | | const hasCollaborationItems = computed(() => collaborationItems.length > 0); |
| | | const hasSafetyItems = computed(() => safetyItems.length > 0); |
| | | const hasQualityItems = computed(() => qualityItems.length > 0); |
| | | const hasHumanResourcesItems = computed(() => humanResourcesItems.length > 0); |
| | | const hasProductionItems = computed(() => productionItems.length > 0); |
| | | const hasEquipmentItems = computed(() => equipmentItems.length > 0); |
| | |
| | | .content { |
| | | background: #f6f7fb; |
| | | min-height: 100vh; |
| | | padding: 12px; |
| | | // padding: 12px; |
| | | /* 为所有设备设置基础padding-top(包含安全区) */ |
| | | padding-top: calc(env(safe-area-inset-top) + 30px); |
| | | position: relative; |
| | |
| | | } |
| | | |
| | | .hero-section { |
| | | margin: 0 12px; |
| | | margin-bottom: 12px; |
| | | animation: fadeInUp 0.6s ease-out 0.1s both; |
| | | } |
| | |
| | | .hero-content { |
| | | position: relative; |
| | | z-index: 1; |
| | | |
| | | padding: 14px 14px 18px 14px; |
| | | margin: 0 12px; |
| | | height: 100%; |
| | | } |
| | | .hero-wave { |
| | |
| | | .common-module { |
| | | margin-bottom: 12px; |
| | | background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%); |
| | | border-radius: 14px; |
| | | // border-radius: 14px; |
| | | padding: 12px; |
| | | box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06); |
| | | border: none; |
| | |
| | | .common-module { |
| | | margin-bottom: 12px; |
| | | background: #ffffff; |
| | | border-radius: 16px; |
| | | padding: 12px; |
| | | // border-radius: 16px; |
| | | // padding: 0px; |
| | | padding: 12px 0; |
| | | box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06); |
| | | border: 1px solid rgba(148, 163, 184, 0.18); |
| | | position: relative; |
| | |
| | | } |
| | | |
| | | .module-header { |
| | | margin-bottom: 10px; |
| | | margin-bottom: 18px; |
| | | padding-left: 18px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | |
| | | } |
| | | |
| | | .icon-container { |
| | | width: 52px; |
| | | height: 52px; |
| | | width: 48px; |
| | | height: 48px; |
| | | border-radius: 14px; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | } |
| | | |
| | | .item-label { |
| | | font-size: 12px; |
| | | font-size: 22rpx; |
| | | margin-top: 4px; |
| | | margin-bottom: 6px; |
| | | margin-bottom: 20px; |
| | | } |
| | | .grid-text { |
| | | font-size: 0.875rem; |