fix:批量流转二次确定

This commit is contained in:
faiz 2024-10-12 17:48:52 +08:00
parent f0b435c4dd
commit 1142d443b9
1 changed files with 33 additions and 21 deletions

View File

@ -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;