diff --git a/src/views/eam/basic/assetsAccount/index.vue b/src/views/eam/basic/assetsAccount/index.vue index 3d09d5a..82b9880 100644 --- a/src/views/eam/basic/assetsAccount/index.vue +++ b/src/views/eam/basic/assetsAccount/index.vue @@ -78,6 +78,7 @@ import * as AssetsAccountApi from '@/api/eam/basic/assetsAccount' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { checkPermi } from '@/utils/permission' import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue"; +import {Item} from "@/views/eam/basic/item/item.data"; // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' @@ -170,7 +171,19 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { - + if(type=='create'){ + Item.allSchemas.formSchema.forEach(item =>{ + if(item.field == "number"){ + item.componentProps.disabled = false + } + }) + } else if(type=='update'){ + Item.allSchemas.formSchema.forEach(item =>{ + if(item.field == "number"){ + item.componentProps.disabled = true + } + }) + } if (type == 'view') { showView.value = true urls.value = row.filePathList diff --git a/src/views/eam/basic/fixedAssets/index.vue b/src/views/eam/basic/fixedAssets/index.vue index fb2d5f6..6fd023d 100644 --- a/src/views/eam/basic/fixedAssets/index.vue +++ b/src/views/eam/basic/fixedAssets/index.vue @@ -78,6 +78,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { checkPermi } from '@/utils/permission' import { hasPermi } from '@/directives/permission/hasPermi' import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue"; +import {Item} from "@/views/eam/basic/item/item.data"; // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' @@ -174,11 +175,24 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type=='create'){ + Item.allSchemas.formSchema.forEach(item =>{ + if(item.field == "number"){ + item.componentProps.disabled = false + } + }) + } else if(type=='update'){ + Item.allSchemas.formSchema.forEach(item =>{ + if(item.field == "number"){ + item.componentProps.disabled = true + } + }) + } if (type == 'view') { showView.value = true urls.value = row.filePathList viewKey.value += 1 - }else if (type == 'update') { + }else if (type == 'update') { row['upload']= row.filePathList?.map((item: any) => { return {url:item} })