diff --git a/admin/src/views/order/index.vue b/admin/src/views/order/index.vue index f982317e..77c7817e 100644 --- a/admin/src/views/order/index.vue +++ b/admin/src/views/order/index.vue @@ -859,30 +859,42 @@ export default { onCirculationSave(to_admin_id) { this.$refs.ruleForm.validate(async (valid) => { if (valid) { - // orderBack({ - // sn: this.item3.sn, - // os: this.item3.os, - // to_admin_id: to_admin_id, - // }).then((res) => { - // this.applyVisible = false; - // this.isAll = false; - // this.getList(); - // }); - let res = this.isAll - ? await orderbackBatch({ sn: this.sn, to_admin_id: to_admin_id }) - : orderBack({ - sn: this.item3.sn, - os: this.item3.os, + let res; + if (this.isAll) { + this.$confirm("是否批量流转订单", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(async () => { + res = await orderbackBatch({ + sn: this.sn, to_admin_id: to_admin_id, }); - if (res.data) { - this.$message({ - message: "成功", - type: "success", + if (res.data) { + this.$message({ + message: "批量流转订单成功", + type: "success", + }); + this.applyVisible = false; + this.isAll = false; + this.getList(); + } }); - this.applyVisible = false; - this.isAll = false; - this.getList(); + } else { + res = await orderBack({ + sn: this.item3.sn, + os: this.item3.os, + to_admin_id: to_admin_id, + }); + if (res.data) { + this.$message({ + message: "流转订单成功", + type: "success", + }); + this.applyVisible = false; + this.isAll = false; + this.getList(); + } } } else { return false;