diff --git a/src/views/wms/purchaseclaimRequestMain/index.vue b/src/views/wms/purchaseclaimRequestMain/index.vue index 761e75d51..b302c23a9 100644 --- a/src/views/wms/purchaseclaimRequestMain/index.vue +++ b/src/views/wms/purchaseclaimRequestMain/index.vue @@ -48,6 +48,7 @@ @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" + @submitForm="submitForm" /> @@ -269,6 +270,20 @@ const handleDeleteTable = (item, index) => { tableData.value.splice(index, 1) } +// 主子数据 提交 +const submitForm = async (formType, data) => { + data.details = tableData.value // 拼接子表数据参数 + if (formType === 'create') { + await PurchaseclaimRequestMainApi.createPurchaseclaimRequestMain(data) + message.success(t('common.createSuccess')) + } else { + await PurchaseclaimRequestMainApi.updatePurchaseclaimRequestMain(data) + message.success(t('common.updateSuccess')) + } + // 刷新当前列表 + getList() +} + /** 导入 */ const importFormRef = ref() const handleImport = () => {