From 8ab97df167752b39585b29cec897075bb8bdcd17 Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Wed, 29 Dec 2021 10:11:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8E=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=98=AF=E5=90=A6=E5=85=A8=E9=80=89=EF=BC=8C=E5=85=A8?= =?UTF-8?q?=E9=80=89=E5=88=A0=E9=99=A4=E5=90=8E=E8=BF=94=E5=9B=9E=E5=89=8D?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/customer/customer.vue | 14 ++++++++++++++ src/views/order/Order.vue | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/views/customer/customer.vue b/src/views/customer/customer.vue index fb964cc..33d7f0b 100644 --- a/src/views/customer/customer.vue +++ b/src/views/customer/customer.vue @@ -199,6 +199,13 @@ export default { }).then(() => { this.$post(this.api.delCustomers,[row.customerId]).then(res => { this.$message.success('删除成功') + if(this.listData.length == 2){ + + }else{ + if(this.page > 1){ + this.page = this.page-1 + } + } this.getData() }).catch(res => {}) }).catch(() => {}) @@ -217,6 +224,13 @@ export default { }).then(() => { this.$post(this.api.delCustomers,delList).then(res => { this.multipleSelection = []; + if(delList.length == this.listData.length){ + + }else{ + if(this.page > 1){ + this.page = this.page-1 + } + } this.$message.success('删除成功') this.getData() }).catch(res => {}) diff --git a/src/views/order/Order.vue b/src/views/order/Order.vue index f32cbe1..51a85f8 100644 --- a/src/views/order/Order.vue +++ b/src/views/order/Order.vue @@ -260,6 +260,13 @@ export default { arr.push(row.orderId); this.$post(this.api.orderDelete, { ids: arr }).then(res => { this.$message.success("删除成功"); + if(this.orderData.length == 2){ + + }else{ + if(this.pageNo > 1){ + this.pageNo = this.pageNo-1 + } + } this.getData(); }).catch(res => { }); @@ -289,6 +296,13 @@ export default { this.$post(this.api.orderDelete, { ids: this.multipleSelection }).then(res => { this.multipleSelection = []; this.$message.success("删除成功"); + if(this.multipleSelection.length == this.orderData.length){ + + }else{ + if(this.pageNo > 1){ + this.pageNo = this.pageNo-1 + } + } this.getData(); }).catch(err => { });