From 3a8bdf86a5bac80a172c434ff92c99adfb42c54b Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Mon, 9 Dec 2024 09:34:07 +0800 Subject: [PATCH] FWHL-75 --- .../productscrapRequestMain/index.vue | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 900f61ccf..cecb4643c 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -141,6 +141,7 @@ import * as StdcostpriceApi from '@/api/wms/stdcostprice' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as BomDismantleApi from "@/api/wms/bomDismantle" import * as BomApi from "@/api/wms/bom"; +import * as SwitchApi from '@/api/wms/switch' import * as BalanceApi from "@/api/wms/balance"; import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' @@ -356,11 +357,6 @@ const buttonOperationClick = async (row, label, index,isSave = false)=> { }else{ isShowFooterButtton.value = true isShowReduceButtonSelection.value = true - ProdcutscrapBomScrap.allSchemas.tableFormColumns.forEach(item=>{ - if(item.field=='qty'){ - item.tableForm.disabled = false - } - }) bomSearchData.value = '' bomTableList.value = detatableDataBom.tableList detailBomRef.value.open('create', row, null,'viewDetail')//查看明细数据 @@ -785,6 +781,22 @@ const openForm =async (type: string, row?: number) => { defaultButtons.formSaveBtn({ hide : mainStatus.value != 1 }), // 保存 defaultButtons.formCloseBtn(null) // 关闭 ] + try { + let switch1 = await SwitchApi.getByCode('productscrapBomEditSwitch') + console.log('switch',switch1) + ProdcutscrapBomScrap.allSchemas.tableFormColumns.map((bomItem) => { + if (bomItem.field == 'qty') { + bomItem.tableForm.disabled = switch1=='FALSE' + } + }) + } catch { + ProdcutscrapBomScrap.allSchemas.tableFormColumns.map((bomItem) => { + if (bomItem.field == 'qty') { + bomItem.tableForm.disabled = false + } + }) + } + if(type == 'create'){ ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => { if(item.field == 'productionLineCode'){