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) { onCirculationSave(to_admin_id) {
this.$refs.ruleForm.validate(async (valid) => { this.$refs.ruleForm.validate(async (valid) => {
if (valid) { if (valid) {
// orderBack({ let res;
// sn: this.item3.sn, if (this.isAll) {
// os: this.item3.os, this.$confirm("是否批量流转订单", "提示", {
// to_admin_id: to_admin_id, confirmButtonText: "确定",
// }).then((res) => { cancelButtonText: "取消",
// this.applyVisible = false; type: "warning",
// this.isAll = false; }).then(async () => {
// this.getList(); res = await orderbackBatch({
// }); sn: this.sn,
let res = this.isAll
? await orderbackBatch({ sn: this.sn, to_admin_id: to_admin_id })
: orderBack({
sn: this.item3.sn,
os: this.item3.os,
to_admin_id: to_admin_id, to_admin_id: to_admin_id,
}); });
if (res.data) { if (res.data) {
this.$message({ this.$message({
message: "成功", message: "批量流转订单成功",
type: "success", type: "success",
});
this.applyVisible = false;
this.isAll = false;
this.getList();
}
}); });
this.applyVisible = false; } else {
this.isAll = false; res = await orderBack({
this.getList(); 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 { } else {
return false; return false;