菜谱新增修改

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> </div>
</el-card> </el-card>
</div> </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 type="primary" @click="confirmSubmit"> </el-button>
<el-button @click=""> </el-button> <el-button @click="jumpList"> </el-button>
</div> </div>
@ -423,6 +423,12 @@ export default {
this.getTypeData() this.getTypeData()
}, },
methods: { methods: {
//
jumpList() {
const obj = { path: "/dish/menuDetail" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/dish/menu" }); //
},
// //
getAreaTreeData() { getAreaTreeData() {
systemAreaTreeApi({}).then((response) => { systemAreaTreeApi({}).then((response) => {
@ -756,9 +762,8 @@ export default {
param.recipeDateList = this.weekDateList param.recipeDateList = this.weekDateList
} }
console.log(param) console.log(param)
addMenuRecipeApi(param).then((response) => { addMenuRecipeApi(param).then((response) => {
this.$store.dispatch("/dish/menuDetail", this.$route); // this.jumpList()
this.$router.replace({ path: "/dish/menu" }); //
}); });
}, },
// //

View File

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