update 物料配方“

This commit is contained in:
lb
2023-02-20 13:48:49 +08:00
parent 7d0c66ad73
commit 0f0226eaa1
5 changed files with 77 additions and 17 deletions

View File

@@ -216,15 +216,45 @@ export default {
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
type: 'error',
duration: 1500
})
type: "error",
duration: 1500,
});
}
});
break;
}
case "view-attachment": {
this.openDialog(data, false, { key: "attachment" });
break;
}
case "view-recipe": {
this.openDialog(data, false, { key: "attr" });
break;
}
case "copy": {
return this.$http
.post(this.urls.copyUrl, data, {
headers: {
"Content-Type": "application/json",
},
})
.then(({ data: res }) => {
if (res.code === 0) {
this.$message({
message: "复制成功!",
type: "success",
duration: 1500,
});
this.getList();
}
})
.catch((errMsg) => {
this.$message({
message: errMsg,
type: "error",
duration: 1500,
});
});
}
}
},
@@ -237,17 +267,24 @@ export default {
break;
case "查询": {
const params = {};
this.listQueryExtra?.map(cond => {
this.listQueryExtra?.map((cond) => {
if (!!payload[cond]) {
params[cond] = payload[cond]
params[cond] = payload[cond];
} else {
params[cond] = ''
params[cond] = "";
}
});
console.log("查询", params);
this.getList(params);
break;
}
case "同步":
this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
if (res.code === 0) {
this.getList();
}
});
break;
}
},