菜谱新增修改

This commit is contained in:
zzyuan 2025-03-14 18:20:29 +08:00
parent ea20f7636b
commit 6f1c2db60a
3 changed files with 25 additions and 9 deletions

View File

@ -114,6 +114,18 @@ export function addMenuRecipeApi(data) {
})
}
//菜谱-删除
export function removeMenuRecipeApi(data) {
return request({
url: '/smart-canteen/api/v2/menurecipe/remove/recipes',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
})
}

View File

@ -94,9 +94,9 @@
</div>
</el-card>
</div>
<div style="width: 100%;height: 80px;padding: 10px;background: #FFF;border-radius: 10px;">
<div style="width: 100%;height: 80px;padding: 10px;background: #FFF;border-radius: 10px;display: flex;align-items: center;justify-content: center;">
<el-button type="primary" @click="confirmSubmit"> </el-button>
<el-button @click=""> </el-button>
<el-button @click="jumpList"> </el-button>
</div>
@ -423,6 +423,12 @@ export default {
this.getTypeData()
},
methods: {
//
jumpList() {
const obj = { path: "/dish/menuDetail" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/dish/menu" }); //
},
//
getAreaTreeData() {
systemAreaTreeApi({}).then((response) => {
@ -756,9 +762,8 @@ export default {
param.recipeDateList = this.weekDateList
}
console.log(param)
addMenuRecipeApi(param).then((response) => {
this.$store.dispatch("/dish/menuDetail", this.$route); //
this.$router.replace({ path: "/dish/menu" }); //
addMenuRecipeApi(param).then((response) => {
this.jumpList()
});
},
//

View File

@ -140,7 +140,7 @@
<script>
import { mealTimeListApi,menuTypeListApi,systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/dish/menu";
import { getCurrentRecipeListApi, getPageRecipeListApi } from "@/api/dish/menu";
import { getCurrentRecipeListApi, getPageRecipeListApi,removeMenuRecipeApi } from "@/api/dish/menu";
export default {
name: "",
dicts: [],
@ -324,10 +324,9 @@
},
/** 删除按钮操作 */
handleDelete(row) {
console.log(row)
var that = this
console.log(row)
this.$modal.confirm('是否确认删除数据项?').then(function() {
// return removeMenuDishesSuitApi(row.suitId)
return removeMenuRecipeApi([row.recipe])
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");