|
|
@ -64,6 +64,7 @@ import download from '@/utils/download' |
|
|
|
import { FixedAssets,FixedAssetsRules } from './fixedAssets.data' |
|
|
|
import * as FixedAssetsApi from '@/api/eam/basic/fixedAssets' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import { checkPermi } from '@/utils/permission' |
|
|
|
// import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
|
// import Detail from '@/components/Detail/src/Detail.vue' |
|
|
@ -179,12 +180,16 @@ const formsSuccess = async (formType,data) => { |
|
|
|
matchingRole = userStore.getUser.id |
|
|
|
} |
|
|
|
if (formType === 'create') { |
|
|
|
if(!checkPermi(['gdzc_admin'])){ |
|
|
|
data.manageDept = matchingRole |
|
|
|
} |
|
|
|
await FixedAssetsApi.createFixedAssets(data) |
|
|
|
|
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|
if(!checkPermi(['gdzc_admin'])){ |
|
|
|
data.manageDept = matchingRole |
|
|
|
} |
|
|
|
await FixedAssetsApi.updateFixedAssets(data) |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
} |
|
|
|