diff --git a/src/views/dish/menu/detail.vue b/src/views/dish/menu/detail.vue index c0656c77..5da7e430 100644 --- a/src/views/dish/menu/detail.vue +++ b/src/views/dish/menu/detail.vue @@ -126,13 +126,21 @@
菜品分类
- + + +
菜品名称
@@ -182,9 +190,9 @@ - + @@ -851,7 +859,7 @@ export default { "canteenId":this.baseInfo.canteenId, "stallId":this.baseInfo.stallId, "salesMode":this.queryDish.salesMode, - "dishesTypeId":this.queryDish.dishesTypeId, + "typeIds":[this.queryDish.dishesTypeId], "dishesName":this.queryDish.dishesName, "pageNum":1, "pageSize":100 @@ -876,7 +884,7 @@ export default { let dish = Object.assign({}, obj) this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100)) this.$set(dish,'price',Number(dish.price/100)) - this.$set(dish,'remanentNum',dish.remanentNum||99999) + this.$set(dish,'supplyNum',dish.supplyNum||99999) this.$set(dish,'limitNum',dish.limitNum||99999) this.dishesList.push(dish) //反显选中样式 @@ -1095,7 +1103,7 @@ export default { stallId:this.dialogQueryParams.stallId, } getPageRecipeListApi(param).then((response) => { - this.recipeOptions = response.data||[] + this.recipeOptions = response.rows||[] this.dialogQueryParams.recipeId = null this.dialogQueryParams.recipeType = null; this.dialogQueryParams.applyDate = null; @@ -1200,11 +1208,11 @@ export default { "recipeId": this.dialogQueryParams.recipeId } getMenuRecipeTemplateDetailApi(param).then((response) => { - if(response.length>0){ - for (let i = 0; i < response.length; i++) { + if(response.data.length>0){ + for (let i = 0; i < response.data.length; i++) { this.dialogDetailList.forEach(item=>{ - if(item.mealtimeType==response[i].mealtimeType){ - item.dishesList = response[i].dishesList; + if(item.mealtimeType==response.data[i].mealtimeType){ + item.dishesList = response.data[i].dishesList; } }) } @@ -1246,11 +1254,11 @@ export default { "recipeId": this.dialogQueryParams.recipeId } getMenuRecipeTemplateDetailApi(param).then((response) => { - if(response.length>0){ - for (let i = 0; i < response.length; i++) { + if(response.data.length>0){ + for (let i = 0; i < response.data.length; i++) { this.dialogDetailList.forEach(item=>{ - if(item.mealtimeType==response[i].mealtimeType){ - item.dishesList = response[i].dishesList; + if(item.mealtimeType==response.data[i].mealtimeType){ + item.dishesList = response.data[i].dishesList; } }) } diff --git a/src/views/dish/menu/edit.vue b/src/views/dish/menu/edit.vue index fa3090ec..601879e9 100644 --- a/src/views/dish/menu/edit.vue +++ b/src/views/dish/menu/edit.vue @@ -126,13 +126,21 @@
菜品分类
- + + +
菜品名称
@@ -183,9 +191,9 @@ - + @@ -1054,7 +1062,7 @@ export default { "canteenId":this.baseInfo.canteenId, "stallId":this.baseInfo.stallId, "salesMode":this.queryDish.salesMode, - "dishesTypeId":this.queryDish.dishesTypeId, + "typeIds":[this.queryDish.dishesTypeId], "dishesName":this.queryDish.dishesName, "pageNum":1, "pageSize":100 @@ -1079,7 +1087,7 @@ export default { let dish = Object.assign({}, obj) this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100)) this.$set(dish,'price',Number(dish.price/100)) - this.$set(dish,'remanentNum',dish.remanentNum||99999) + this.$set(dish,'supplyNum',dish.supplyNum||99999) this.$set(dish,'limitNum',dish.limitNum||99999) this.dishesList.push(dish) //反显选中样式 @@ -1300,7 +1308,7 @@ export default { stallId:this.dialogQueryParams.stallId, } getPageRecipeListApi(param).then((response) => { - this.recipeOptions = response.data||[] + this.recipeOptions = response.rows||[] this.dialogQueryParams.recipeId = null this.dialogQueryParams.recipeType = null; this.dialogQueryParams.applyDate = null; diff --git a/src/views/dish/menu/index.vue b/src/views/dish/menu/index.vue index 0ea1b24c..4e1c2583 100644 --- a/src/views/dish/menu/index.vue +++ b/src/views/dish/menu/index.vue @@ -146,7 +146,7 @@ @@ -516,14 +516,14 @@ this.queryParams.pageNum = this.queryParams.pageNum this.queryParams.pageSize = this.queryParams.pageSize if(this.activeName=='currentRecipe'){ - getCurrentRecipeListApi(this.queryParams).then(response => { - this.tableListData = response.rows; - this.total = Number(response.total); - this.loading = false; - }); + // getCurrentRecipeListApi(this.queryParams).then(response => { + // this.tableListData = response.rows; + // this.total = Number(response.total); + // this.loading = false; + // }); }else if(this.activeName=='pageRecipe'){ getPageRecipeListApi(this.queryParams).then(response => { - this.tableListData = response.data; + this.tableListData = response.rows; this.total = Number(response.total); this.loading = false; }); @@ -537,14 +537,14 @@ }, /** 修改按钮操作 */ handleUpdate(row) { - let param = { - recipeId:row.recipeId - } - getPageRecipeListApi(param).then(response => { - let obj = response.data[0] + // let param = { + // recipeId:row.recipeId + // } + // getPageRecipeListApi(param).then(response => { + // let obj = response.rows[0] - this.$router.push({ path: "/dish/menuEdit",query: {pageJson:JSON.stringify(obj)} }); - }); + this.$router.push({ path: "/dish/menuEdit",query: {pageJson:JSON.stringify(row)} }); + // }); }, /** 查看设备 */ handleDevice(row) { @@ -592,7 +592,7 @@ } getPageRecipeListApi(param).then(response => { // console.log(response.records) - this.recipeOptionsData = response.data + this.recipeOptionsData = response.rows this.resetForm("menuForm"); this.openMenu=true });