From 34194d40b0bf1e0f1739d936f4b491f3c3de243d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E5=BA=86=E6=BA=90?= Date: Wed, 28 May 2025 14:14:25 +0800 Subject: [PATCH] =?UTF-8?q?[SBBJ-1150]=E4=BE=9B=E5=BA=94=E5=95=86=E3=80=81?= =?UTF-8?q?=E5=A4=87=E4=BB=B6=E4=BF=AE=E6=94=B9=E7=BC=96=E5=8F=B7=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/basic/item/index.vue | 16 ++++++++++++++++ src/views/eam/basic/supplier/index.vue | 14 ++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/views/eam/basic/item/index.vue b/src/views/eam/basic/item/index.vue index 804b741..ed71f47 100644 --- a/src/views/eam/basic/item/index.vue +++ b/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 diff --git a/src/views/eam/basic/supplier/index.vue b/src/views/eam/basic/supplier/index.vue index 05f8840..9508c16 100644 --- a/src/views/eam/basic/supplier/index.vue +++ b/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) }