菜谱下拉接口替换

This commit is contained in:
zzyuan 2025-07-15 16:26:59 +08:00
parent 652e437fcf
commit 827eb8694c
5 changed files with 25 additions and 21 deletions

View File

@ -74,6 +74,18 @@ export function getPageRecipeListApi(data) {
params: data params: data
}) })
} }
// 获取所有菜谱-不分页
export function getPageRecipeListAllApi(data) {
return request({
url: '/smart-canteen/cook_recipe/listAll',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params: data
})
}
//菜谱-新增 //菜谱-新增
export function addMenuRecipeApi(data) { export function addMenuRecipeApi(data) {

View File

@ -344,7 +344,7 @@
<script> <script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall"; import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { getmkteffectiveApi,getDishesByTypePageApi,addMenuRecipeApi,getPageRecipeListApi,getMenuRecipeDetailApi,getMenuRecipeTemplateDetailApi } from "@/api/dish/menu"; import { getmkteffectiveApi,getDishesByTypePageApi,addMenuRecipeApi,getPageRecipeListAllApi,getMenuRecipeDetailApi,getMenuRecipeTemplateDetailApi } from "@/api/dish/menu";
import { menuDishesTypeAllListApi } from "@/api/dish/dish"; import { menuDishesTypeAllListApi } from "@/api/dish/dish";
export default { export default {
@ -1107,7 +1107,7 @@ export default {
canteenId:this.dialogQueryParams.canteenId, canteenId:this.dialogQueryParams.canteenId,
stallId:this.dialogQueryParams.stallId, stallId:this.dialogQueryParams.stallId,
} }
getPageRecipeListApi(param).then((response) => { getPageRecipeListAllApi(param).then((response) => {
this.recipeOptions = response.rows||[] this.recipeOptions = response.rows||[]
this.dialogQueryParams.recipeId = null this.dialogQueryParams.recipeId = null
this.dialogQueryParams.recipeType = null; this.dialogQueryParams.recipeType = null;

View File

@ -344,7 +344,7 @@
<script> <script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall"; import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { mealTimeListApi,getmkteffectiveApi,getDishesByTypePageApi,editMenuRecipeApi,getPageRecipeListApi,getMenuRecipeDetailApi,getMenuRecipeTemplateDetailApi } from "@/api/dish/menu"; import { mealTimeListApi,getmkteffectiveApi,getDishesByTypePageApi,editMenuRecipeApi,getPageRecipeListAllApi,getMenuRecipeDetailApi,getMenuRecipeTemplateDetailApi } from "@/api/dish/menu";
import { menuDishesTypeAllListApi } from "@/api/dish/dish"; import { menuDishesTypeAllListApi } from "@/api/dish/dish";
export default { export default {
@ -1325,7 +1325,7 @@ export default {
canteenId:this.dialogQueryParams.canteenId, canteenId:this.dialogQueryParams.canteenId,
stallId:this.dialogQueryParams.stallId, stallId:this.dialogQueryParams.stallId,
} }
getPageRecipeListApi(param).then((response) => { getPageRecipeListAllApi(param).then((response) => {
this.recipeOptions = response.rows||[] this.recipeOptions = response.rows||[]
this.dialogQueryParams.recipeId = null this.dialogQueryParams.recipeId = null
this.dialogQueryParams.recipeType = null; this.dialogQueryParams.recipeType = null;

View File

@ -266,7 +266,7 @@
<script> <script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall"; import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { mealTimeListApi,menuTypeListApi } from "@/api/dish/menu"; import { mealTimeListApi,menuTypeListApi } from "@/api/dish/menu";
import { getCurrentRecipeListApi, getPageRecipeListApi,removeMenuRecipeApi,unbindMenuRecipeApi,menuUpLoadApi } from "@/api/dish/menu"; import { getCurrentRecipeListApi, getPageRecipeListApi,getPageRecipeListAllApi,removeMenuRecipeApi,unbindMenuRecipeApi,menuUpLoadApi } from "@/api/dish/menu";
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { downloadFileByUrl } from '@/utils/download' import { downloadFileByUrl } from '@/utils/download'
export default { export default {
@ -535,15 +535,8 @@
this.$router.push({ path: "/canteen/dish/menuDetail" }); this.$router.push({ path: "/canteen/dish/menuDetail" });
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
// let param = { this.$router.push({ path: "/canteen/dish/menuEdit",query: {pageJson:JSON.stringify(row)} });
// recipeId:row.recipeId
// }
// getPageRecipeListApi(param).then(response => {
// let obj = response.rows[0]
this.$router.push({ path: "/canteen/dish/menuEdit",query: {pageJson:JSON.stringify(row)} });
// });
}, },
/** 查看设备 */ /** 查看设备 */
handleDevice(row) { handleDevice(row) {
@ -585,11 +578,10 @@
//- //-
choseMenuRecipe(row){ choseMenuRecipe(row){
this.rowData = row this.rowData = row
let param = { let param = {
size:-1,
stallId:row.stallId stallId:row.stallId
} }
getPageRecipeListApi(param).then(response => { getPageRecipeListAllApi(param).then(response => {
// console.log(response.records) // console.log(response.records)
this.recipeOptionsData = response.rows this.recipeOptionsData = response.rows
this.resetForm("menuForm"); this.resetForm("menuForm");

View File

@ -207,7 +207,7 @@
<script> <script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall"; import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { getProductionPlanInfoApi, addProductionPlanApi, editProductionPlanApi } from "@/api/foodManage/purchaseManage"; import { getProductionPlanInfoApi, addProductionPlanApi, editProductionPlanApi } from "@/api/foodManage/purchaseManage";
import { getDishesByTypePageApi,getPageRecipeListApi,getMenuRecipeDetailApi } from "@/api/dish/menu"; import { getDishesByTypePageApi,getPageRecipeListAllApi,getMenuRecipeDetailApi } from "@/api/dish/menu";
import { menuDishesTypeAllListApi } from "@/api/dish/dish"; import { menuDishesTypeAllListApi } from "@/api/dish/dish";
export default { export default {
name: "ProductionPlanEdit", name: "ProductionPlanEdit",
@ -342,7 +342,7 @@ export default {
this.stallOptions=response.rows||[] this.stallOptions=response.rows||[]
this.$set(this.baseInfo,"stallId",this.baseInfo.stallId) this.$set(this.baseInfo,"stallId",this.baseInfo.stallId)
}); });
getPageRecipeListApi({areaId:this.baseInfo.areaId,canteenId:this.baseInfo.canteenId,stallId:this.baseInfo.stallId,}).then((response) => { getPageRecipeListAllApi({areaId:this.baseInfo.areaId,canteenId:this.baseInfo.canteenId,stallId:this.baseInfo.stallId,}).then((response) => {
this.recipeOptions = response.rows||[] this.recipeOptions = response.rows||[]
this.$set(this.baseInfo,"recipeId",this.baseInfo.recipeId) this.$set(this.baseInfo,"recipeId",this.baseInfo.recipeId)
}); });
@ -351,7 +351,7 @@ export default {
this.dateRangeList = this.getDateRange(this.dateRange[0],this.dateRange[1]) this.dateRangeList = this.getDateRange(this.dateRange[0],this.dateRange[1])
this.dateRangeIndex = 0 this.dateRangeIndex = 0
this.dateRangeRadio = this.formatDate(this.dateRange[0]); this.dateRangeRadio = this.formatDate(this.dateRange[0]);
for (let i = 0; i < resDetailList.length; i++) { for (let i = 0; i < resDetailList.length; i++) {
this.dateRangeList.forEach(item=>{ this.dateRangeList.forEach(item=>{
if(resDetailList[i].detailDate==item.applyDate){ if(resDetailList[i].detailDate==item.applyDate){
@ -415,7 +415,7 @@ export default {
canteenId:this.baseInfo.canteenId, canteenId:this.baseInfo.canteenId,
stallId:this.baseInfo.stallId, stallId:this.baseInfo.stallId,
} }
getPageRecipeListApi(param).then((response) => { getPageRecipeListAllApi(param).then((response) => {
this.recipeOptions = response.rows||[] this.recipeOptions = response.rows||[]
this.$set(this.baseInfo,"recipeId",null) this.$set(this.baseInfo,"recipeId",null)
}); });