From c6e8299ccdb48b15039f5bec5ca66112d9211de4 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Wed, 3 Sep 2025 18:45:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E6=A1=86=E7=A1=AE=E8=AE=A4=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../materialClerkConfirms/confirmDetails.vue | 21 ++++++++++++++++- src/pages/repair/testedInBound/details.vue | 23 +++++++++++++++++-- src/pages/standardBox/acceptBox.vue | 8 +++---- src/pages/standardBox/codeList.vue | 19 ++++++++++++++- src/pages/standardBox/transferBox.vue | 21 +++++++++++++++-- 5 files changed, 82 insertions(+), 10 deletions(-) diff --git a/src/pages/materialsStation/materialClerkConfirms/confirmDetails.vue b/src/pages/materialsStation/materialClerkConfirms/confirmDetails.vue index 08c2b6f..3955601 100644 --- a/src/pages/materialsStation/materialClerkConfirms/confirmDetails.vue +++ b/src/pages/materialsStation/materialClerkConfirms/confirmDetails.vue @@ -27,7 +27,9 @@ - + @@ -44,6 +46,8 @@ const total = ref(0) const remark = ref('') const popup = ref() const loading = ref(false) +const countdown = ref(0) +const timer = ref(null) const finish = computed(() => { if (total.value === tableList.value.length) return true @@ -77,12 +81,27 @@ const handleDetails = (item) => { } const penPopup = () => { popup.value.open() + if (timer.value) { + clearInterval(timer.value) + timer.value = null + } + countdown.value = 3 + timer.value = setInterval(() => { + if (countdown.value > 0) { + countdown.value-- + } else { + clearInterval(timer.value) + timer.value = null + countdown.value = 0 + } + }, 1000) } const closePopup = () => { popup.value.close() } const confirmRemark = () => { console.log('opts:', opts.value) + if (countdown.value > 0) return const params = { id: opts.value.id, leaseSignId: opts.value.leaseSignId, diff --git a/src/pages/repair/testedInBound/details.vue b/src/pages/repair/testedInBound/details.vue index 5024065..25aedfd 100644 --- a/src/pages/repair/testedInBound/details.vue +++ b/src/pages/repair/testedInBound/details.vue @@ -101,7 +101,7 @@ 取消 - 确定 + 确定{{ countdown > 0 ? '(' + countdown + ')' : '' }} @@ -124,7 +124,7 @@ 取消 - 确定 + 确定{{ countdown > 0 ? '(' + countdown + ')' : '' }} @@ -147,6 +147,9 @@ const rejectNumPopup = ref(null); const inBoundNum = ref(0) const rejectBoundNum = ref(0) const rejectReason = ref('') +const countdown = ref(0) +const timer = ref(null) + // 获取列表详情 const getDetailsData = async () => { let param = { @@ -192,6 +195,20 @@ const onClick=async (e,item)=> { } } if (item.manageType == 1) {//数量 + if (timer.value) { + clearInterval(timer.value) + timer.value = null + } + countdown.value = 3 + timer.value = setInterval(() => { + if (countdown.value > 0) { + countdown.value-- + } else { + clearInterval(timer.value) + timer.value = null + countdown.value = 0 + } + }, 1000) if(e.index==0){ // console.log(item) if(item.status==0){//入库 @@ -215,6 +232,7 @@ const onClick=async (e,item)=> { const confirmNumInBound = async () => { console.log(inBoundNum.value) + if (countdown.value > 0) return if(inBoundNum.value==0){ uni.showToast({ title: '入库数量需大于0!',icon: 'none'}) }else{ @@ -238,6 +256,7 @@ const closePopup = () => { const rejectNumInBound = async () => { console.log(rejectBoundNum.value) + if (countdown.value > 0) return try { uni.showLoading({ title: '操作中...', mask: true }) if(rejectBoundNum.value==0){ diff --git a/src/pages/standardBox/acceptBox.vue b/src/pages/standardBox/acceptBox.vue index c1d59d6..4ebfbfa 100644 --- a/src/pages/standardBox/acceptBox.vue +++ b/src/pages/standardBox/acceptBox.vue @@ -165,7 +165,7 @@ const onClick=(e,item, itemIndex)=> { } } }) - }, 300) + }, 500) }else{//驳回 console.log(item) setTimeout(() => { @@ -174,8 +174,8 @@ const onClick=(e,item, itemIndex)=> { content: '是否确认驳回移交?', confirmText: '确定', cancelText: '取消', - success: async (res) => { - if (res.confirm) { + success: async (resp) => { + if (resp.confirm) { let param = { boxId:item.boxId } @@ -195,7 +195,7 @@ const onClick=(e,item, itemIndex)=> { } } }) - }, 300) + }, 500) } } swipeRef.value[itemIndex].closeAll() diff --git a/src/pages/standardBox/codeList.vue b/src/pages/standardBox/codeList.vue index 3d33cce..0dac19d 100644 --- a/src/pages/standardBox/codeList.vue +++ b/src/pages/standardBox/codeList.vue @@ -73,7 +73,7 @@ 取消 - 确定 + 确定{{ countdown > 0 ? '(' + countdown + ')' : '' }} @@ -176,6 +176,8 @@ const focusTimeout = ref(null) const systemInfo = ref(null) const screenHeight = ref(null) const screenWidth = ref(null) +const countdown = ref(0) +const timer = ref(null) const getCodeList = () => { console.log(boxInfo.value) @@ -822,11 +824,26 @@ const onChangeChecked = (item) => { } const transfer = () => { keeperPopup.value.open('bottom'); + if (timer.value) { + clearInterval(timer.value) + timer.value = null + } + countdown.value = 3 + timer.value = setInterval(() => { + if (countdown.value > 0) { + countdown.value-- + } else { + clearInterval(timer.value) + timer.value = null + countdown.value = 0 + } + }, 1000) } const closePopup = () => { keeperPopup.value.close(); } const confirmTransfer = () => { + if (countdown.value > 0) return if(transferUser.value!=""){ let param = { "boxId":boxInfo.value.boxId, diff --git a/src/pages/standardBox/transferBox.vue b/src/pages/standardBox/transferBox.vue index 984897b..ecd690f 100644 --- a/src/pages/standardBox/transferBox.vue +++ b/src/pages/standardBox/transferBox.vue @@ -94,7 +94,7 @@ 取消 - 确定 + 确定{{ countdown > 0 ? '(' + countdown + ')' : '' }} @@ -142,6 +142,8 @@ const keeperPopup = ref(null); const transferItem = ref({}); const keeperList = ref([]) const transferUser = ref("") +const countdown = ref(0) +const timer = ref(null) // 查询参数 const queryParams = ref({ startTime: dateArray.value[0] || '', @@ -305,6 +307,20 @@ const getKeeperList = (item) => { console.log(keeperList) } keeperPopup.value.open('bottom'); + if (timer.value) { + clearInterval(timer.value) + timer.value = null + } + countdown.value = 3 + timer.value = setInterval(() => { + if (countdown.value > 0) { + countdown.value-- + } else { + clearInterval(timer.value) + timer.value = null + countdown.value = 0 + } + }, 1000) }).catch(error => { console.log(error) }) @@ -331,6 +347,7 @@ const onChangeChecked = (item) => { } const confirmTransfer = () => { + if (countdown.value > 0) return if(transferUser.value!=""){ let param = { @@ -674,7 +691,7 @@ const finish = computed(() => { display: flex; align-items: center;justify-content: space-between; .handle-box-btn{ - width: 60px; + min-width: 60px; height: 32px;line-height: 32px; text-align: center; border-radius: 5px;