From 977e54ffa1574265e5ac204a075f77318e6907a0 Mon Sep 17 00:00:00 2001 From: xs Date: Mon, 20 Jan 2025 19:15:06 +0800 Subject: [PATCH] =?UTF-8?q?1.1.3=20=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BD=A6=E9=97=B4=E5=88=86=E8=A1=A8=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/planInfo/types.ts | 14 ++++++++++++++ src/views/mes/planInfo/index.vue | 15 +++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/api/mes/planInfo/types.ts b/src/api/mes/planInfo/types.ts index 434d4cf..3836334 100644 --- a/src/api/mes/planInfo/types.ts +++ b/src/api/mes/planInfo/types.ts @@ -154,6 +154,10 @@ export interface PlanInfoVO { */ remark: string; + /** + * 车间ID + */ + workshopId: number; } export interface PlanInfoForm extends BaseEntity { @@ -312,6 +316,11 @@ export interface PlanInfoForm extends BaseEntity { */ remark?: string; + /** + * 车间ID + */ + workshopId?: number; + } export interface PlanInfoQuery extends PageQuery { @@ -466,6 +475,11 @@ export interface PlanInfoQuery extends PageQuery { */ modelCode?: string; + /** + * 车间ID + */ + workshopId?: number; + /** * 日期范围参数 */ diff --git a/src/views/mes/planInfo/index.vue b/src/views/mes/planInfo/index.vue index 648d704..e441b05 100644 --- a/src/views/mes/planInfo/index.vue +++ b/src/views/mes/planInfo/index.vue @@ -368,6 +368,8 @@ const bomSelectRef = ref(); const materialOpen = ref(false); const materialSelectRef = ref(); +const workshopId = ref(); + /*获取班次下拉框*/ const getShiftSelect = async () => { let res = await getBaseShiftInfoList(null); @@ -466,6 +468,7 @@ const initFormData: PlanInfoForm = { modelCode: undefined, remark: undefined, materialBoMName: undefined, + workshopId: undefined } const data = reactive>({ form: {...initFormData}, @@ -502,6 +505,7 @@ const data = reactive>({ shiftId: undefined, classTeamId: undefined, modelCode: undefined, + workshopId: undefined, params: { } }, @@ -523,6 +527,15 @@ const data = reactive>({ const { queryParams, form, rules } = toRefs(data); +const getWorkshopId = async () => { + const router = useRouter(); + workshopId.value = router.currentRoute._rawValue.query && router.currentRoute._rawValue.query.workshopId; + queryParams.value.workshopId = workshopId.value; + console.log("----") + console.log(queryParams); + console.log(workshopId.value); +} + /** 查询生产工单信息列表 */ const getList = async () => { loading.value = true; @@ -541,6 +554,7 @@ const cancel = () => { /** 表单重置 */ const reset = () => { form.value = {...initFormData}; + form.value.workshopId = workshopId.value; planInfoFormRef.value?.resetFields(); } @@ -642,6 +656,7 @@ const submitMaterialForm = () => { } onMounted(() => { + getWorkshopId(); getShiftSelect(); getClassTeamSelect(); getProcessSelect();