From 7106c23be879dfc79b64c69a5ac6ee9f24f80562 Mon Sep 17 00:00:00 2001 From: lonewolfyx <877085893@qq.com> Date: Fri, 6 Mar 2026 15:30:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96table=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=E4=BB=A5=E5=8F=8A=E4=BA=8C=E6=AC=A1=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/work/BusinessApproval/index.vue | 108 +++++++++++++++++++------- 1 file changed, 78 insertions(+), 30 deletions(-) diff --git a/pages/work/BusinessApproval/index.vue b/pages/work/BusinessApproval/index.vue index 7bd82a9..5b965f8 100644 --- a/pages/work/BusinessApproval/index.vue +++ b/pages/work/BusinessApproval/index.vue @@ -57,10 +57,10 @@ > 序号 - 商业公司 - 货主 - 合同编号 - 订单金额 + 商业公司 + 货主 + 合同编号 + 订单金额 {{ index + 1 }} @@ -130,6 +130,7 @@ const handleQuery = async () => { const selected = ref([]) const totalMoney = ref(0) +const popup = ref() // const handleSelect = (payload) => { // const {checked, data} = payload // const id = data.saleid @@ -155,35 +156,82 @@ onMounted(async () => { const handleBack = async () => { - submitLoading.value = true - await Promise.allSettled( - selected.value.map(id => - managerRefuse({ - saleIds: id, - actionType: new Date().getDate() < 25 ? '1' : '0' - }) - ) - ) - selected.value = [] - totalMoney.value = 0 - await handleQuery() - submitLoading.value = false + uni.showModal({ + title: '提示', + content: '是否要进行回退?', + success: async function (res) { + if (res.confirm) { + uni.showLoading({ + title: '加载中' + }); + await Promise.allSettled( + selected.value.map(id => + managerRefuse({ + saleIds: id, + actionType: new Date().getDate() < 25 ? '1' : '0' + }) + ) + ) + selected.value = [] + totalMoney.value = 0 + await handleQuery() + + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + uni.hideLoading() + } else if (res.cancel) { + uni.showToast({ + title: '用户取消操作', + icon: 'none', + duration: 2000 + }); + + } + } + }); } const handleSubmit = async () => { - submitLoading.value = true - await Promise.allSettled( - selected.value.map(id => - managerConfirm({ - saleIds: id, - actionType: new Date().getDate() < 25 ? '1' : '0' - }) - ) - ) - selected.value = [] - totalMoney.value = 0 - await handleQuery() - submitLoading.value = false + uni.showModal({ + title: '提示', + content: '是否要进行审核?', + success: async function (res) { + if (res.confirm) { + uni.showLoading({ + title: '加载中' + }); + + await Promise.allSettled( + selected.value.map(id => + managerConfirm({ + saleIds: id, + actionType: new Date().getDate() < 25 ? '1' : '0' + }) + ) + ) + selected.value = [] + totalMoney.value = 0 + await handleQuery() + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + uni.hideLoading() + } else if (res.cancel) { + uni.showToast({ + title: '用户取消操作', + icon: 'none', + duration: 2000 + }); + + } + } + }); + } const selectionChange = (payload) => {