| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 工艺设计 --> |
| | | <view class="common-module design-module" |
| | | v-if="hasDesignItems"> |
| | | <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 designItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <DownloadProgressMask /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { ref, onMounted, nextTick, reactive, computed } from "vue"; |
| | | import { userLoginFacotryList } from "@/api/login"; |
| | | import { getProductWorkOrderById } from "@/api/productionManagement/productionReporting"; |
| | | import DownloadProgressMask from "@/components/DownloadProgressMask.vue"; |
| | | import modal from "@/plugins/modal"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | |
| | |
| | | currentStatus.value = statusList[statusIndex]; |
| | | }, 3000); |
| | | }; |
| | | // 工艺设计功能数据 |
| | | const designItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/xiaoshoubaojia.svg", |
| | | label: "基础参数", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/xiaoshoubaojia.svg", |
| | | label: "工序管理", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/xiaoshoubaojia.svg", |
| | | label: "BOM", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/xiaoshoubaojia.svg", |
| | | label: "工艺路线", |
| | | }, |
| | | ]); |
| | | |
| | | // 营销管理功能数据 |
| | | const marketingItems = reactive([ |
| | |
| | | { |
| | | icon: "/static/images/icon/caigouguanli.svg", |
| | | label: "采购退货", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/gongyingshangdangan.svg", |
| | | label: "供应商档案", |
| | | }, |
| | | ]); |
| | | |
| | |
| | | const archiveManagementItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/gongyingshangdangan.svg", |
| | | label: "供应商档案", |
| | | label: "借阅登记", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/hetongguanli.svg", |
| | | label: "归还登记", |
| | | }, |
| | | ]); |
| | | |
| | |
| | | |
| | | // 生产管控功能数据 |
| | | const productionItems = reactive([ |
| | | // { |
| | | // icon: "/static/images/icon/shengchandingdan@2x.svg", |
| | | // label: "生产订单", |
| | | // }, |
| | | { |
| | | icon: "/static/images/icon/shengchandingdan@2x.svg", |
| | | label: "生产订单", |
| | | }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaigong@2x.svg", |
| | | // label: "生产派工", |
| | |
| | | // icon: "/static/images/icon/shengchanpaichan@2x.svg", |
| | | // label: "工序排产", |
| | | // }, |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong.svg", |
| | | label: "主生产计划", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong.svg", |
| | | label: "生产报工", |
| | |
| | | url: "/pages/productionManagement/workOrder/index", |
| | | }); |
| | | break; |
| | | case "主生产计划": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/mainProductionPlan/index", |
| | | }); |
| | | break; |
| | | case "生产报工": |
| | | getcode(); |
| | | break; |
| | |
| | | url: "/pages/customerService/afterSalesHandling/index", |
| | | }); |
| | | break; |
| | | case "借阅登记": |
| | | uni.navigateTo({ |
| | | url: "/pages/fileManagement/borrow/index", |
| | | }); |
| | | break; |
| | | case "归还登记": |
| | | uni.navigateTo({ |
| | | url: "/pages/fileManagement/return/index", |
| | | }); |
| | | break; |
| | | case "基础参数": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionDesign/basicParameters/index", |
| | | }); |
| | | break; |
| | | case "工序管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionDesign/processManagement/index", |
| | | }); |
| | | break; |
| | | case "BOM": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionDesign/bom/index", |
| | | }); |
| | | break; |
| | | default: |
| | | uni.showToast({ |
| | | title: `点击了${item.label}`, |
| | |
| | | const workData = workRes.data; |
| | | console.log("工单数据:", workData); |
| | | |
| | | orderRow = JSON.stringify({ |
| | | id: workData.id || workOrderId, |
| | | planQuantity: workData.planQuantity - workData.completeQuantity, |
| | | productProcessRouteItemId: |
| | | workData.productProcessRouteItemId || |
| | | workData.产品工艺路线项ID || |
| | | "", |
| | | }); |
| | | orderRow = JSON.stringify(workData); |
| | | |
| | | console.log("构造的orderRow:", orderRow); |
| | | } else { |
| | |
| | | |
| | | // 定义菜单配置映射 |
| | | const menuMapping = { |
| | | collaboration: { target: collaborationItems, specialMapping: { "规章制度": "规章制度管理" } }, |
| | | archiveManagement: { target: archiveManagementItems, specialMapping: { "供应商档案": "供应商管理" } }, |
| | | collaboration: { |
| | | target: collaborationItems, |
| | | specialMapping: { 规章制度: "规章制度管理" }, |
| | | }, |
| | | purchase: { specialMapping: { 供应商档案: "供应商管理" } }, |
| | | }; |
| | | console.log(allowedMenuTitles) |
| | | console.log(allowedMenuTitles); |
| | | // 通用过滤函数 |
| | | const filterArray = (targetArray, specialMapping) => { |
| | | const filtered = targetArray.filter(item => { |
| | |
| | | |
| | | // 过滤各个模块 |
| | | filterArray(marketingItems); |
| | | filterArray(purchaseItems); |
| | | filterArray(purchaseItems, menuMapping.purchase.specialMapping); |
| | | filterArray(financeManagementItems); |
| | | filterArray(archiveManagementItems, menuMapping.archiveManagement.specialMapping); |
| | | filterArray(collaborationItems, menuMapping.collaboration.specialMapping); |
| | | filterArray(safetyItems); |
| | | filterArray(humanResourcesItems); |
| | |
| | | filterArray(qualityItems); |
| | | filterArray(productionItems); |
| | | filterArray(equipmentItems); |
| | | filterArray(archiveManagementItems); |
| | | }; |
| | | |
| | | // 检查模块是否有菜单项需要显示 |
| | | const hasMarketingItems = computed(() => marketingItems.length > 0); |
| | | const hasDesignItems = computed(() => designItems.length > 0); |
| | | const hasPurchaseItems = computed(() => purchaseItems.length > 0); |
| | | const hasFinanceManagementItems = computed(() => financeManagementItems.length > 0); |
| | | const hasArchiveManagementItems = computed(() => archiveManagementItems.length > 0); |
| | | const hasAfterSalesServiceItems = computed(() => afterSalesServiceItems.length > 0); |
| | | const hasFinanceManagementItems = computed( |
| | | () => financeManagementItems.length > 0 |
| | | ); |
| | | const hasAfterSalesServiceItems = computed( |
| | | () => afterSalesServiceItems.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 hasWarehouseLogisticsItems = computed(() => warehouseLogisticsItems.length > 0); |
| | | const hasWarehouseLogisticsItems = computed( |
| | | () => warehouseLogisticsItems.length > 0 |
| | | ); |
| | | const hasProductionItems = computed(() => productionItems.length > 0); |
| | | const hasEquipmentItems = computed(() => equipmentItems.length > 0); |
| | | const hasArchiveManagementItems = computed( |
| | | () => archiveManagementItems.length > 0 |
| | | ); |
| | | |
| | | onMounted(() => { |
| | | // 每次进入首页都强制刷新用户信息和路由权限,不做本地缓存判断 |