|
|
@ -44,8 +44,8 @@ |
|
|
|
@success="formsSuccess" |
|
|
|
:rules="SupplieritemRules" |
|
|
|
:formAllSchemas="Supplieritem.allSchemas" |
|
|
|
:apiUpdate="SupplieritemApi.updateSupplieritem" |
|
|
|
:apiCreate="SupplieritemApi.createSupplieritem" |
|
|
|
:apiUpdate="routeName.includes('SCP')?SupplieritemApi.updateSupplieritemSCP:SupplieritemApi.updateSupplieritem" |
|
|
|
:apiCreate="routeName.includes('SCP')?SupplieritemApi.createSupplieritemSCP:SupplieritemApi.createSupplieritem" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
:isBusiness="false" |
|
|
|
/> |
|
|
@ -189,10 +189,18 @@ const formsSuccess = async (formType,data) => { |
|
|
|
if(data.activeTime==0)data.activeTime = null; |
|
|
|
if(data.expireTime==0)data.expireTime = null; |
|
|
|
if (formType === 'create') { |
|
|
|
await SupplieritemApi.createSupplieritem(data) |
|
|
|
if(routeName.value.includes('SCP')){ |
|
|
|
await SupplieritemApi.createSupplieritemSCP(data) |
|
|
|
}else{ |
|
|
|
await SupplieritemApi.createSupplieritem(data) |
|
|
|
} |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|
await SupplieritemApi.updateSupplieritem(data) |
|
|
|
if(routeName.value.includes('SCP')){ |
|
|
|
await SupplieritemApi.updateSupplieritemSCP(data) |
|
|
|
}else{ |
|
|
|
await SupplieritemApi.updateSupplieritem(data) |
|
|
|
} |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
} |
|
|
|
basicFormRef.value.dialogVisible = false |
|
|
@ -221,7 +229,11 @@ const handleDelete = async (id: number) => { |
|
|
|
await message.delConfirm() |
|
|
|
tableObject.loading = true |
|
|
|
// 发起删除 |
|
|
|
await SupplieritemApi.deleteSupplieritem(id) |
|
|
|
if(routeName.value.includes('SCP')){ |
|
|
|
await SupplieritemApi.deleteSupplieritem(id) |
|
|
|
}else{ |
|
|
|
await SupplieritemApi.deleteSupplieritem(id) |
|
|
|
} |
|
|
|
tableObject.loading = false |
|
|
|
message.success(t('common.delSuccess')) |
|
|
|
// 刷新列表 |
|
|
|