|
|
@ -165,12 +165,19 @@ const formsSuccess = async (formType,data) => { |
|
|
|
} |
|
|
|
if(data.activeTime==0)data.activeTime = null; |
|
|
|
if(data.expireTime==0)data.expireTime = null; |
|
|
|
if (formType === 'create') { |
|
|
|
await CustomerDeliveryForecastApi.createCustomerDeliveryForecast(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|
await CustomerDeliveryForecastApi.updateCustomerDeliveryForecast(data) |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
|
|
basicFormRef.value.formLoading = true |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
await CustomerDeliveryForecastApi.createCustomerDeliveryForecast(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|
await CustomerDeliveryForecastApi.updateCustomerDeliveryForecast(data) |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
} |
|
|
|
} finally { |
|
|
|
basicFormRef.value.formLoading = false |
|
|
|
|
|
|
|
} |
|
|
|
basicFormRef.value.dialogVisible = false |
|
|
|
getList() |
|
|
|