菜谱新增修改
This commit is contained in:
parent
ea20f7636b
commit
6f1c2db60a
|
|
@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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" }); // 要打开的页面
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//日期
|
//日期
|
||||||
|
|
|
||||||
|
|
@ -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("删除成功");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue