update 进行中订单--查看批次--删除
This commit is contained in:
parent
9a01934fac
commit
ac1db4ee1d
@ -41,7 +41,7 @@
|
||||
@destroy="editDialogVisible = false" />
|
||||
<!-- footer -->
|
||||
<div slot="footer">
|
||||
<el-button @click="handleBtnClick({ name: 'cancel' })">取消</el-button>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -191,6 +191,32 @@ export default {
|
||||
});
|
||||
break;
|
||||
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;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user