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();