update 进行中订单--查看批次--删除

This commit is contained in:
lb 2023-07-21 16:08:07 +08:00
parent 9a01934fac
commit ac1db4ee1d

View File

@ -41,7 +41,7 @@
@destroy="editDialogVisible = false" /> @destroy="editDialogVisible = false" />
<!-- footer --> <!-- footer -->
<div slot="footer"> <div slot="footer">
<el-button @click="handleBtnClick({ name: 'cancel' })">取消</el-button> <el-button @click="handleClose">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -191,6 +191,32 @@ export default {
}); });
break; break;
case "delete": case "delete":
//
return this.$confirm("确定删除该批次?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",
})
.then(() => {
this.$http({
url: "/pms/blenderBatch",
method: "DELETE",
data: [`${data.id}`],
}).then(({ data: res }) => {
if (res.code === 0) {
this.$message.success("删除成功!");
this.getBatchList();
} else {
throw new Error(res.msg);
}
});
})
.catch((err) => {
if (err == "cancel") return;
this.$message[typeof err == "object" ? "error" : "info"](
typeof err == "object" && "message" in err ? err.message : err
);
});
break; break;
} }
}, },