菜谱管理

This commit is contained in:
zzyuan 2025-05-29 17:54:17 +08:00
parent 5fd26b998b
commit b69fd56ced
2 changed files with 18 additions and 18 deletions

View File

@ -1159,15 +1159,15 @@ export default {
"recipeId": this.dialogQueryParams.recipeId "recipeId": this.dialogQueryParams.recipeId
} }
getMenuRecipeDetailApi(param).then((response) => { getMenuRecipeDetailApi(param).then((response) => {
if(response.length>0){ if(response.data.length>0){
for (let i = 0; i < response.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.dialogDetailList.forEach(item=>{ this.dialogDetailList.forEach(item=>{
if(item.mealtimeType==response[i].mealtimeType){ if(item.mealtimeType==response.data[i].mealtimeType){
response[i].dishesList.forEach(dish=>{ response.data[i].dishesList.forEach(dish=>{
this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100)) this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100))
this.$set(dish,'price',Number(dish.price/100)) this.$set(dish,'price',Number(dish.price/100))
}); });
item.dishesList = response[i].dishesList item.dishesList = response.data[i].dishesList
} }
}) })
} }
@ -1329,11 +1329,11 @@ export default {
"recipeId": this.dialogQueryParams.recipeId "recipeId": this.dialogQueryParams.recipeId
} }
getMenuRecipeDetailApi(param).then((response) => { getMenuRecipeDetailApi(param).then((response) => {
if(response.length>0){ if(response.data.length>0){
for (let i = 0; i < response.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.dialogDetailList.forEach(item=>{ this.dialogDetailList.forEach(item=>{
if(item.mealtimeType==response[i].mealtimeType){ if(item.mealtimeType==response.data[i].mealtimeType){
item.dishesList = response[i].dishesList; item.dishesList = response.data[i].dishesList;
} }
}) })
} }

View File

@ -1363,15 +1363,15 @@ export default {
"recipeId": this.dialogQueryParams.recipeId "recipeId": this.dialogQueryParams.recipeId
} }
getMenuRecipeDetailApi(param).then((response) => { getMenuRecipeDetailApi(param).then((response) => {
if(response.length>0){ if(response.data.length>0){
for (let i = 0; i < response.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.dialogDetailList.forEach(item=>{ this.dialogDetailList.forEach(item=>{
if(item.mealtimeType==response[i].mealtimeType){ if(item.mealtimeType==response.data[i].mealtimeType){
response[i].dishesList.forEach(dish=>{ response.data[i].dishesList.forEach(dish=>{
this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100)) this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100))
this.$set(dish,'price',Number(dish.price/100)) this.$set(dish,'price',Number(dish.price/100))
}); });
item.dishesList = response[i].dishesList; item.dishesList = response.data[i].dishesList;
} }
}) })
} }
@ -1533,11 +1533,11 @@ export default {
"recipeId": this.dialogQueryParams.recipeId "recipeId": this.dialogQueryParams.recipeId
} }
getMenuRecipeDetailApi(param).then((response) => { getMenuRecipeDetailApi(param).then((response) => {
if(response.length>0){ if(response.data.length>0){
for (let i = 0; i < response.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.dialogDetailList.forEach(item=>{ this.dialogDetailList.forEach(item=>{
if(item.mealtimeType==response[i].mealtimeType){ if(item.mealtimeType==response.data[i].mealtimeType){
item.dishesList = response[i].dishesList; item.dishesList = response.data[i].dishesList;
} }
}) })
} }