From 979bd2c4a2e1a0b001c1cf8ea619dc9bbf48bfd7 Mon Sep 17 00:00:00 2001 From: Ledo Date: Thu, 26 Jun 2025 15:45:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E6=A1=86=E5=8D=95=E9=80=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/heli/materialplan/storageLog.vue | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/materialplan/storageLog.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/materialplan/storageLog.vue index 51c8f3e..9cf4a1e 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/materialplan/storageLog.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/materialplan/storageLog.vue @@ -22,7 +22,9 @@ - + @@ -114,12 +116,28 @@ const getList = async () => { } const clickItem = ref([]) const handleCurrentChange = (val) => { - multipleTableRef.value!.clearSelection() clickItem.value = val; + if(val.length > 1){ + multipleTableRef.value!.clearSelection() + multipleTableRef.value!.toggleRowSelection(val.pop()) + } + +} +const clickRow = (row) => { + // 单选选中行 + if ( clickItem.value[0] == row) { + // 取消 + clickItem.value = []; + multipleTableRef.value!.clearSelection() + } else { + // 选择 + clickItem.value.push(row); + multipleTableRef.value!.clearSelection() + multipleTableRef.value!.toggleRowSelection(row, true); + } + } - multipleTableRef.value!.toggleRowSelection(val, undefined) -}; /** 搜索按钮操作 */ const handleQuery = () => { queryParams.pageNo = 1 @@ -162,7 +180,8 @@ const emit = defineEmits(['success']) // emit('success', multipleSelection.value) const success = () =>{ dialogVisible.value = false; - emit('success',rowid.value,clickItem.value.storageOkQty,clickItem.value.id,clickItem.value.matCode) + console.log(clickItem.value) + emit('success',rowid.value,clickItem.value[0].storageOkQty,clickItem.value[0].id,clickItem.value[0].matCode) } const handleRg = async (rgid) => { pnCurrentList.value =[]