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