From 600f8b5fe81bb88816d17efb1b36b275ff9c2a14 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Wed, 25 Sep 2024 11:30:08 +0800 Subject: [PATCH] =?UTF-8?q?HL-6059=E7=89=A9=E6=96=99=E9=9A=94=E7=A6=BB?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=80=89=E6=8B=A9=E6=97=B6=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E4=BB=A3=E7=A0=81=E6=88=96=E8=80=85?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TableForm/src/TableForm.vue | 10 ++++++++-- .../inventorymoveRequestMainOKHOLD/index.vue | 16 ++++++++++++++++ .../inventorymoveRequestMain.data.ts | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index 7f95c9ddd..eec0dcf8c 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -118,7 +118,7 @@ /> @@ -672,7 +672,7 @@ const handleAddTable = () => { } // 输入框聚焦 const inpuFocus = (headerItem, row, index) => { - if (headerItem?.tableForm?.isInpuFocusShow) { + if (headerItem?.tableForm?.isInpuFocusShow||showInputSearch(headerItem, row)) { emit('inpuFocus', headerItem, row, index) } } @@ -721,6 +721,12 @@ const batchAdd = () => { } emit('batchAdd', keyWord.value) } + + +const showInputSearch = (headerItem, row) => { + // 子表单独控制显示 + return Boolean(row['isInpuFocusShow_' + headerItem.field]) +} const disabledInput = (headerItem, row) => { if (headerItem.tableForm?.isInpuFocusShow) { if (headerItem.tableForm?.enterSearch) { diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue index c44f33115..3afaa74f6 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue @@ -60,6 +60,7 @@ @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @clearInput="clearInput" /> @@ -361,6 +362,11 @@ const getDefaultToLocationCode = async ()=>{ formRef.value.formRef.formModel["toLocationCode"] = res.list[0]['code'] } } +const clearInput = (field, row, index) => { + if(field=='supplierCode'){ + row['supplierName'] = '' + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { @@ -379,9 +385,19 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['uom'] = item['uom'] newRow['qty'] = item['qty'] newRow['toInventoryStatus'] = "HOLD" // 物料隔离申请 + newRow['supplierCode'] = item['supplierCode'] + newRow['supplierName'] = item['supplierName'] + if(!newRow['supplierCode']){ + newRow.disabled_supplierCode = false + newRow.isInpuFocusShow_supplierCode = true + }else{ + newRow.disabled_supplierCode = true + newRow.isInpuFocusShow_supplierCode = false + } tableData.value.push(newRow) }) } else if(formField == 'supplierCode'){ + row[formField] = val[0][searchField] row['supplierName'] = val[0]['name'] } else{ row[formField] = val[0][searchField] diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts index bd14001f4..d3b81dfd5 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts @@ -1138,7 +1138,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( width: 150, }, tableForm: { - isInpuFocusShow: true, // 开启查询弹窗 + // isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择供应商', searchField: 'code', searchTitle: '供应商信息',