From 29d7297bc29c3bee828ac478f4e0ebd68250b1e1 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Mon, 17 Jun 2024 19:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D=E7=82=B9?= =?UTF-8?q?=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/XButton/src/ButtonBase.vue | 13 +++++++++++-- .../productreceiptAssembleRequestMain/index.vue | 13 +++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/XButton/src/ButtonBase.vue b/src/components/XButton/src/ButtonBase.vue index 4ebcad026..e9486efe3 100644 --- a/src/components/XButton/src/ButtonBase.vue +++ b/src/components/XButton/src/ButtonBase.vue @@ -74,8 +74,6 @@ const emit = defineEmits(['buttonBaseClick', 'updataTableColumns']) let timer = ref(null) const buttonBaseClick = (val, item, $event) => { if(!timer.value){ - clearButtonBlurHandle($event) //解决el-button点击后颜色不恢复问题 - emit('buttonBaseClick', val, item, $event) timer.value = setTimeout(()=>{ if(timer.value){ console.log('清空timer',timer.value) @@ -83,8 +81,19 @@ const buttonBaseClick = (val, item, $event) => { timer.value = null } },2000) + clearButtonBlurHandle($event) //解决el-button点击后颜色不恢复问题 + emit('buttonBaseClick', val, item, $event) + } } + +onUnmounted(() => { + if(timer.value){ + console.log('清空timer',timer.value) + clearTimeout(timer.value) + timer.value = null + } +}) const popoverVisible = ref(false) // 关闭页面 const closeRowDrop = () => { diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 19b7a87d4..45187dc30 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -441,20 +441,21 @@ const buttonTableClick = async (val, row) => { }) } else if (val == 'mainHandle') { // 处理 + tableObject.loading = true // 判断 是否已创建标签 let isCreateLabel = false - await PackageApi.getPackagePage({ + let res = await PackageApi.getPackagePage({ requestNumber: row.number - }).then(res => { - if (res) { - if (res.list.length > 0) isCreateLabel = true - } }) + if (res&&res.list.length > 0) { + isCreateLabel = true + } if (!isCreateLabel) { message.warning('请先创建标签') + tableObject.loading = false + return } - tableObject.loading = true ProductreceiptRequestMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) tableObject.loading = false