Browse Source

[SBBJ-1150]供应商、备件修改编号不可编辑

master
zengqinyuan 2 weeks ago
parent
commit
34194d40b0
  1. 16
      src/views/eam/basic/item/index.vue
  2. 14
      src/views/eam/basic/supplier/index.vue

16
src/views/eam/basic/item/index.vue

@ -55,6 +55,7 @@
import Detail from '@/components/Detail/src/Detail.vue'
import { SearchTable } from '@/components/SearchTable'
import { getAccessToken } from '@/utils/auth'
import {LocationArea} from "@/views/eam/basic/locationArea/locationArea.data";
defineOptions({ name: 'Item' })
@ -224,6 +225,21 @@
const basicFormRef = ref()
const openForm = (type : string, row ?: any) => {
console.log(row)
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

14
src/views/eam/basic/supplier/index.vue

@ -47,6 +47,7 @@
import Detail from '@/components/Detail/src/Detail.vue'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
import * as LocationApi from "@/api/eam/basic/location";
import {LocationArea} from "@/views/eam/basic/locationArea/locationArea.data";
defineOptions({ name: 'Supplier' })
@ -132,6 +133,19 @@
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type : string, row ?: any) => {
if(type=='create'){
Supplier.allSchemas.formSchema.forEach(item =>{
if(item.field == "number"){
item.componentProps.disabled = false
}
})
} else if(type=='update'){
Supplier.allSchemas.formSchema.forEach(item =>{
if(item.field == "number"){
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row)
}

Loading…
Cancel
Save