diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue index 5f6cfd7b7..deda16647 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue @@ -331,6 +331,32 @@ const handleReAdd = async (id: number) => { /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { + UnplannedissueRequestMain.allSchemas.formSchema.forEach((item) => { + if(type == "update"){ + if (item.field == 'costCenterCode') { + //成本中心代码 + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + if (item.field == 'reasonCodeRequisition') { + //领用原因代码 + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + + }else{ + if (item.field == 'costCenterCode') { + //成本中心代码 + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'reasonCodeRequisition') { + //领用原因代码 + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + } + }) tableData.value = [] // 重置明细数据 formRef.value.open(type, row) } diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index 6356d6b13..1433448b5 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -349,6 +349,32 @@ const handleReAdd = async (id: number) => { /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { + UnplannedissueRequestMain.allSchemas.formSchema.forEach((item) => { + if(type == "update"){ + if (item.field == 'costCenterCode') { + //成本中心代码 + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + if (item.field == 'reasonCodeRequisition') { + //领用原因代码 + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + + }else{ + if (item.field == 'costCenterCode') { + //成本中心代码 + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'reasonCodeRequisition') { + //领用原因代码 + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + } + }) tableData.value = [] // 重置明细数据 formRef.value.open(type, row) } diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 7710b396a..99dc8fae0 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -566,6 +566,45 @@ const handleHandle = async (id: number) => { /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { + + UnplannedreceiptRequestMain.allSchemas.formSchema.forEach((item) => { + if(type == "update"){ + if (item.field == 'costCenterCode') { + //成本中心代码 + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + if (item.field == 'reasonCodeRequisition') { + //领用原因代码 + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + if (item.field == 'toWarehouseCode') { + //到仓库代码 + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + + + }else{ + if (item.field == 'costCenterCode') { + //成本中心代码 + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'reasonCodeRequisition') { + //领用原因代码 + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'toWarehouseCode') { + //到仓库代码 + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + } + }) + tableData.value = [] // 重置明细数据 formRef.value.open(type, row) }