Browse Source

HL-5891@王宇飞 报错提示时 loading 取消

hella_online_20240911
yufei_wang 3 months ago
parent
commit
122150dc5d
  1. 31
      src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue

31
src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue

@ -196,22 +196,25 @@ const formsSuccess = async (formType,data) => {
if(data.activeTime==0)data.activeTime = null; if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null; if(data.expireTime==0)data.expireTime = null;
basicFormRef.value.formLoading = true basicFormRef.value.formLoading = true
if (formType === 'create') { try {
if(routeName.value.includes('SCP')){ if (formType === 'create') {
await SupplieritemApi.createSupplieritemSCP(data) if(routeName.value.includes('SCP')){
}else{ await SupplieritemApi.createSupplieritemSCP(data)
await SupplieritemApi.createSupplieritem(data) }else{
} await SupplieritemApi.createSupplieritem(data)
message.success(t('common.createSuccess')) }
} else { message.success(t('common.createSuccess'))
if(routeName.value.includes('SCP')){ } else {
await SupplieritemApi.updateSupplieritemSCP(data) if(routeName.value.includes('SCP')){
}else{ await SupplieritemApi.updateSupplieritemSCP(data)
await SupplieritemApi.updateSupplieritem(data) }else{
await SupplieritemApi.updateSupplieritem(data)
}
message.success(t('common.updateSuccess'))
} }
message.success(t('common.updateSuccess')) } finally {
basicFormRef.value.formLoading = false
} }
basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
if (formType === 'create') { if (formType === 'create') {
getList() getList()

Loading…
Cancel
Save