|
|
@ -489,20 +489,21 @@ const submitForm = async (formType, submitData) => { |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
await PreparetoissueMainApi.createPreparetoissueMain(data).then((res) => { |
|
|
|
await PreparetoissueMainApi.createPreparetoissueMain(data).then(async (res) => { |
|
|
|
if (res.status == '6') { |
|
|
|
// 生成发料申请 |
|
|
|
PreparetoissueMainApi.generateIssueRequest(res.number) |
|
|
|
await PreparetoissueMainApi.generateIssueRequest(res.number) |
|
|
|
} |
|
|
|
getList() |
|
|
|
}) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|
await PreparetoissueMainApi.updatePreparetoissueMain(data) |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
} |
|
|
|
formRef.value.dialogVisible = false |
|
|
|
// 刷新当前列表 |
|
|
|
getList() |
|
|
|
} finally { |
|
|
|
formRef.value.formLoading = false |
|
|
|
} |
|
|
|