From cf004c5e7fd6a83527ef7117365fae2b90ff9b86 Mon Sep 17 00:00:00 2001 From: yinq Date: Fri, 7 Feb 2025 16:07:39 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=AE=A1=E5=88=92=E5=85=B3=E8=81=94?= =?UTF-8?q?=E6=9C=BA=E5=8F=B0=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/planInfo/types.ts | 4 +++- src/views/mes/baseStationInfo/index.vue | 2 +- src/views/mes/planInfo/index.vue | 29 ++++++++++++++++--------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/api/mes/planInfo/types.ts b/src/api/mes/planInfo/types.ts index 3836334..1be68af 100644 --- a/src/api/mes/planInfo/types.ts +++ b/src/api/mes/planInfo/types.ts @@ -289,7 +289,7 @@ export interface PlanInfoForm extends BaseEntity { /** * 完成标识(0正常 1降级 2超额) */ - finishFlag?: string; + finishFlag?: string | []; /** * 优先级 @@ -321,6 +321,8 @@ export interface PlanInfoForm extends BaseEntity { */ workshopId?: number; + materialBoMName?: string | number; + } export interface PlanInfoQuery extends PageQuery { diff --git a/src/views/mes/baseStationInfo/index.vue b/src/views/mes/baseStationInfo/index.vue index 86ad027..6e442d4 100644 --- a/src/views/mes/baseStationInfo/index.vue +++ b/src/views/mes/baseStationInfo/index.vue @@ -184,7 +184,7 @@ {{ dict.label }} diff --git a/src/views/mes/planInfo/index.vue b/src/views/mes/planInfo/index.vue index e441b05..f778b49 100644 --- a/src/views/mes/planInfo/index.vue +++ b/src/views/mes/planInfo/index.vue @@ -227,13 +227,13 @@ >{{dict.label}} - + @@ -338,6 +338,7 @@ import BomSelect from '@/views/mes/materialBom/addBom.vue'; import MaterialSelect from '@/views/mes/baseMaterialInfo/addMaterial.vue'; import { getProcessInfoList } from '@/api/mes/baseProcessInfo'; import { getStationInfoList } from '@/api/mes/baseStationInfo'; +import { getProdBaseMachineInfoList } from '@/api/mes/prodBaseMachineInfo'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { mes_import_flag, active_flag, mes_plan_status, mes_release_type, mes_finish_flag, mes_model_code } = toRefs(proxy?.useDict('mes_import_flag', 'active_flag', 'mes_plan_status', 'mes_release_type', 'mes_finish_flag', 'mes_model_code')); @@ -362,7 +363,7 @@ const dialog = reactive({ const shiftList = ref([]); const classTeamList = ref([]); const processList = ref([]); -let stationList = ref([]); +let releaseList = ref([]); const materialBomOpen = ref(false); const bomSelectRef = ref(); const materialOpen = ref(false); @@ -389,9 +390,9 @@ const getProcessSelect = async () => { }; /*获取工位下拉框*/ -const getStationSelect = async () => { - let res = await getStationInfoList(null); - stationList.value = res.data; +const getReleaseSelect = async () => { + let res = await getProdBaseMachineInfoList({ processId: form.value.processId}); + releaseList.value = res.data; }; // 列显隐信息 @@ -660,7 +661,15 @@ onMounted(() => { getShiftSelect(); getClassTeamSelect(); getProcessSelect(); - getStationSelect(); + getReleaseSelect(); getList(); }); + +// 监听 processId 的变化 +watch( + () => form.value.processId, (newValue, oldValue) => { + // 监听到变化时执行的函数 + getReleaseSelect(); // 调用你的方法 + } +);