|
@@ -218,21 +218,34 @@ export default {
|
|
|
outStockHandler() {
|
|
|
this.$refs.form.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
- let payLoad = { ...this.form };
|
|
|
- console.log(this.form);
|
|
|
- if (!this.form.id) {
|
|
|
- return;
|
|
|
- }
|
|
|
- delete payLoad.documentTypeName;
|
|
|
- let res = await noticeOutStorage(payLoad);
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("出库成功");
|
|
|
- this.currentIndex = 0;
|
|
|
- await this.initData();
|
|
|
- this.refreshHandler();
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
+ this.$confirm("是否确认出库?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ let payLoad = { ...this.form };
|
|
|
+ console.log(this.form);
|
|
|
+ if (!this.form.id) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ delete payLoad.documentTypeName;
|
|
|
+ let res = await noticeOutStorage(payLoad);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("出库成功");
|
|
|
+ this.currentIndex = 0;
|
|
|
+ await this.initData();
|
|
|
+ this.refreshHandler();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消出库",
|
|
|
+ });
|
|
|
+ });
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|