update 物料配方“
This commit is contained in:
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user