diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 3bf03ae1b..88d886787 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -546,8 +546,8 @@ const buttonTableClick = async (val, row) => { } /** 添加/修改操作 */ const openForm = async (type: string, row?: number) => { - emit('detailOpenForm', type, row) formRef.value.open(type, row, masterParmas.value) + emit('detailOpenForm', type, row) } // form 提交 const submitForm = async (formType, data) => { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 3d0a69ba9..72ce34e21 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -68,6 +68,7 @@ :apiPage="ProductionreturnRequestDetailApi.getProductionreturnRequestDetailPage" :apiDelete="ProductionreturnRequestDetailApi.deleteProductionreturnRequestDetail" @searchTableSuccessDetail="searchTableSuccessDetail" + @detailOpenForm="detailOpenForm" /> @@ -463,6 +464,12 @@ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue) } +/** 详情操作——子表表单 */ +const detailOpenForm = (type, row) => { + nextTick(()=>{ + detailRef.value.formRef.formRef.formModel.batch = '000000' + }) +} /** 删除按钮操作 */ const handleDelete = async (id: number) => { @@ -518,6 +525,11 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + // 子表不能为空 + if (tableData.value.length == 0) { + formRef.value.formLoading = false + return message.warning('请添加明细数据!') + } // 合格退料 添加参数 isOK data.isOK = true try { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 321a78de5..6655eede6 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -406,6 +406,9 @@ export const ProductionreturnRequestMainRules = reactive({ directCreateRecord: [ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } ], + workshopCode: [ + { required: true, message: '请选择车间', trigger: 'change' } + ], }) /** diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index 7dfe7e824..c6cd01cb3 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -88,8 +88,8 @@