删除与批量删除接口增加判断是否全选,全选删除后返回前一个页面

dev_2022-03-03
e 3 years ago
parent e57444affb
commit 8ab97df167
  1. 14
      src/views/customer/customer.vue
  2. 14
      src/views/order/Order.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 => {})

@ -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 => {
});

Loading…
Cancel
Save