From 441ddd816f0e69d52c049564d27f3c57e4d8af03 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Sun, 31 Aug 2025 14:57:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/standardBox/acceptBox.vue | 121 ++++++++++++++------------ src/pages/standardBox/transferBox.vue | 18 ++-- 2 files changed, 72 insertions(+), 67 deletions(-) diff --git a/src/pages/standardBox/acceptBox.vue b/src/pages/standardBox/acceptBox.vue index d4d18b5..c1d59d6 100644 --- a/src/pages/standardBox/acceptBox.vue +++ b/src/pages/standardBox/acceptBox.vue @@ -45,8 +45,8 @@
- - + +
{{ item.boxCode }} @@ -98,6 +98,8 @@ import { onLoad, onShow } from '@dcloudio/uni-app' import { debounce } from 'lodash-es' import { getPurchaseList } from '@/services/purchase.js' import { getQrCodeBoxListApi,appReceiveApi,appTransferRejectApi } from '@/services/standard.js' + +const swipeRef = ref(null) const total = ref(0) // 数据总量 const active = ref(1) // tap索引 const tableList = ref([]) // 列表数据源 @@ -124,7 +126,7 @@ const onChangeDate = (val) => { } //点击事件 -const onClick=(e,item)=> { +const onClick=(e,item, itemIndex)=> { if(item.status==4){ if(e.index==0){ uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` }) @@ -134,64 +136,69 @@ const onClick=(e,item)=> { uni.navigateTo({ url: `/pages/standardBox/codeView?boxInfo=${JSON.stringify(item)}` }) }else if(e.index==1){//接收 console.log(item) - uni.showModal({ - title: '提示', - content: '是否确认接收?', - confirmText: '确定', - cancelText: '取消', - success: async (modalRes) => { - if (modalRes.confirm) { - let param = { - boxId:item.boxId - } - - const res = await appReceiveApi(param) - console.log("yyyyyyyyyyy",res) - if (res.code == 200) { - uni.showToast({ - title: '接收成功', - icon: 'none', - }) - setTimeout(() => { - getTableList(true) - }, 500) - }else{ - console.log("xxxxxxxxxxxxxxxxxxxxxxxxx") - uni.showToast({ title: '接收失败', icon: 'none' }) - } - } - } - }) + setTimeout(() => { + uni.showModal({ + title: '提示', + content: '是否确认接收?', + confirmText: '确定', + cancelText: '取消', + success: async (modalRes) => { + if (modalRes.confirm) { + let param = { + boxId:item.boxId + } + + const res = await appReceiveApi(param) + console.log("yyyyyyyyyyy",res) + if (res.code == 200) { + uni.showToast({ + title: '接收成功', + icon: 'none', + }) + setTimeout(() => { + getTableList(true) + }, 500) + }else{ + console.log("xxxxxxxxxxxxxxxxxxxxxxxxx") + uni.showToast({ title: '接收失败', icon: 'none' }) + } + } + } + }) + }, 300) }else{//驳回 console.log(item) - uni.showModal({ - title: '提示', - content: '是否确认驳回移交?', - confirmText: '确定', - cancelText: '取消', - success: async (res) => { - if (res.confirm) { - let param = { - boxId:item.boxId - } - // console.log(param) - const res = await appTransferRejectApi(param) - if (res.code === 200) { - uni.showToast({ - title: '驳回成功', - icon: 'none', - }) - setTimeout(() => { - getTableList(true) - }, 500) - }else{ - uni.showToast({ title: '驳回失败', icon: 'none' }) - } - } - } - }) + setTimeout(() => { + uni.showModal({ + title: '提示', + content: '是否确认驳回移交?', + confirmText: '确定', + cancelText: '取消', + success: async (res) => { + if (res.confirm) { + let param = { + boxId:item.boxId + } + // console.log(param) + const res = await appTransferRejectApi(param) + if (res.code === 200) { + uni.showToast({ + title: '驳回成功', + icon: 'none', + }) + setTimeout(() => { + getTableList(true) + }, 500) + }else{ + uni.showToast({ title: '驳回失败', icon: 'none' }) + } + } + } + }) + }, 300) } } + swipeRef.value[itemIndex].closeAll() } //左滑选择项1 diff --git a/src/pages/standardBox/transferBox.vue b/src/pages/standardBox/transferBox.vue index 03e50b1..984897b 100644 --- a/src/pages/standardBox/transferBox.vue +++ b/src/pages/standardBox/transferBox.vue @@ -45,8 +45,8 @@
- - + +
{{ item.boxCode }} @@ -90,7 +90,7 @@ - + 取消 @@ -125,11 +125,12 @@