@ -437,6 +437,8 @@ const actions = {
|
||||
const result = await updateDishesDetailApi(params);
|
||||
if (result.code === 200) {
|
||||
commit("updateRecipesDishesDetail", payload);
|
||||
} else {
|
||||
return new Promise((res, rej) => rej(result.msg));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -374,14 +374,13 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除菜品编号为"' + ids + '"的数据项?', "警告", {
|
||||
this.$confirm('是否确认删除菜品「' + row.name + '」的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(function () {
|
||||
return delDishes(ids);
|
||||
return delDishes(row.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
|
@ -664,14 +664,13 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除食材编号为"' + ids + '"的数据项?', "警告", {
|
||||
this.$confirm("是否确认删除食材「" + row.name + "」的数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(function () {
|
||||
return delIngredient(ids);
|
||||
return delIngredient(row.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
|
@ -504,6 +504,8 @@ export default {
|
||||
igdId: data.igdId,
|
||||
weight,
|
||||
actionType: "weight",
|
||||
}).catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
handleOnCustomUnitChange(data, { cusWeight, cusUnit }) {
|
||||
@ -517,6 +519,8 @@ export default {
|
||||
cusWeight,
|
||||
cusUnit,
|
||||
actionType: "unit",
|
||||
}).catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
handleOnDishesConfirm({ type, data }) {
|
||||
@ -547,6 +551,8 @@ export default {
|
||||
id,
|
||||
type,
|
||||
actionType: "menuType",
|
||||
}).catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
handleOnMenuTypeClick(data) {
|
||||
@ -560,6 +566,8 @@ export default {
|
||||
id,
|
||||
igdId,
|
||||
actionType: "delIgd",
|
||||
}).catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
handleOnEditRemark(data) {
|
||||
@ -573,6 +581,8 @@ export default {
|
||||
id,
|
||||
remark,
|
||||
actionType: "remark",
|
||||
}).catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
...mapActions([
|
||||
|
Reference in New Issue
Block a user