diff --git a/src/api/dish/menu.js b/src/api/dish/menu.js index eb7eac1a..61b28f0f 100644 --- a/src/api/dish/menu.js +++ b/src/api/dish/menu.js @@ -85,7 +85,7 @@ export function addMenuRecipeApi(data) { //菜谱-编辑 export function editMenuRecipeApi(data) { return request({ - url: '/smart-canteen/cook_recipe', + url: '/smart-canteen/cook_recipe/edit', method: 'post', headers: { "merchant-id":"378915229716713472", diff --git a/src/api/superStore/super.js b/src/api/superStore/super.js index a513e401..74ca7048 100644 --- a/src/api/superStore/super.js +++ b/src/api/superStore/super.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 仓库 export function drpWareHousePageApi(data) { return request({ - url: '/smart-canteen/warehouse_info/list', + url: '/smart-canteen/supply_warehouse_info/list', method: 'get', headers: { "merchant-id":"378915229716713472", diff --git a/src/views/dish/menu/detail.vue b/src/views/dish/menu/detail.vue index 5da7e430..a52b4aa2 100644 --- a/src/views/dish/menu/detail.vue +++ b/src/views/dish/menu/detail.vue @@ -126,19 +126,19 @@
菜品分类
- -
@@ -166,7 +166,7 @@
菜品分类
- {{ item.dishesTypeName }} + {{ item.dishesTypeName }}
@@ -542,7 +542,7 @@ export default { // 查询菜品 queryDish:{ salesMode:null, - dishesTypeId:null, + typeId:null, dishesName:'' }, typeOptions:[], @@ -843,9 +843,9 @@ export default { this.dishesList=item.dishesList; this.dishesTypeList=[] this.dishesList.forEach(dish=>{ - let index = this.dishesTypeList.findIndex(v=>v.dishesTypeId==dish.dishesTypeId) + let index = this.dishesTypeList.findIndex(v=>v.typeId==dish.typeId) if(index==-1){ - this.dishesTypeList.push({dishesTypeId:dish.dishesTypeId,dishesTypeName:dish.dishesTypeName}) + this.dishesTypeList.push({typeId:dish.typeId,dishesTypeName:dish.dishesTypeName}) } }) this.choseDishesType(this.dishesTypeList[0]) @@ -859,7 +859,7 @@ export default { "canteenId":this.baseInfo.canteenId, "stallId":this.baseInfo.stallId, "salesMode":this.queryDish.salesMode, - "typeIds":[this.queryDish.dishesTypeId], + "typeIds":[this.queryDish.typeId], "dishesName":this.queryDish.dishesName, "pageNum":1, "pageSize":100 @@ -894,9 +894,9 @@ export default { } }) //判断是否为新菜品类型 - let typeIndex = this.dishesTypeList.findIndex(v=>v.dishesTypeId==obj.dishesTypeId) + let typeIndex = this.dishesTypeList.findIndex(v=>v.typeId==obj.typeId) if(typeIndex==-1){ - this.dishesTypeList.push({dishesTypeId:obj.dishesTypeId,dishesTypeName:obj.dishesTypeName}) + this.dishesTypeList.push({typeId:obj.typeId,dishesTypeName:obj.dishesTypeName}) } }else{ this.dishesList.splice(index,1) @@ -912,15 +912,15 @@ export default { }, //选中菜品类型-更新右侧表格数据 choseDishesType(item){ - this.dishesType = item.dishesTypeId; + this.dishesType = item.typeId; this.dishesTableList = [] this.dishesList.forEach(dish=>{ - if(dish.dishesTypeId==item.dishesTypeId){ + if(dish.typeId==item.typeId){ this.dishesTableList.push(dish) } }) if(this.dishesTableList.length==0){//单个菜品分类中无菜品时,删除该分类 - let typeIndex = this.dishesTypeList.findIndex(v=>v.dishesTypeId==item.dishesTypeId) + let typeIndex = this.dishesTypeList.findIndex(v=>v.typeId==item.typeId) if(typeIndex>-1){ this.dishesTypeList.splice(typeIndex,1) } @@ -940,7 +940,7 @@ export default { } }) if(this.dishesTableList.length==0){//单个菜品分类中无菜品时,删除该分类 - let typeIndex = this.dishesTypeList.findIndex(v=>v.dishesTypeId==item.dishesTypeId) + let typeIndex = this.dishesTypeList.findIndex(v=>v.typeId==item.typeId) if(typeIndex>-1){ this.dishesTypeList.splice(typeIndex,1) } diff --git a/src/views/dish/menu/edit.vue b/src/views/dish/menu/edit.vue index 05b6b343..55a2220e 100644 --- a/src/views/dish/menu/edit.vue +++ b/src/views/dish/menu/edit.vue @@ -126,19 +126,19 @@
菜品分类
- -
@@ -166,7 +166,7 @@
菜品分类
- {{ item.dishesTypeName }} + {{ item.dishesTypeName }}
@@ -543,7 +543,7 @@ export default { // 查询菜品 queryDish:{ salesMode:null, - dishesTypeId:null, + typeId:null, dishesName:'' }, typeOptions:[], @@ -707,11 +707,11 @@ export default { } getMenuRecipeDetailApi(param).then((response) => { // console.log(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.detailList.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; item.dishesList.forEach(dish=>{ this.$set(dish,'price',Number(dish.price/100)) this.$set(dish,'salePrice',Number(dish.salePrice/100)||0) @@ -730,11 +730,11 @@ export default { } getMenuRecipeTemplateDetailApi(param).then((response) => { // console.log(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.detailList.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 item.dishesList.forEach(dish=>{ this.$set(dish,'price',Number(dish.price/100)) this.$set(dish,'salePrice',Number(dish.salePrice/100)||0) @@ -753,11 +753,11 @@ export default { } getMenuRecipeTemplateDetailApi(param).then((response) => { // console.log(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.detailList.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 item.dishesList.forEach(dish=>{ this.$set(dish,'price',Number(dish.price/100)) this.$set(dish,'salePrice',Number(dish.salePrice/100)||0) @@ -1045,9 +1045,9 @@ export default { this.dishesList=item.dishesList; this.dishesTypeList=[] this.dishesList.forEach(dish=>{ - let index = this.dishesTypeList.findIndex(v=>v.dishesTypeId==dish.dishesTypeId) + let index = this.dishesTypeList.findIndex(v=>v.typeId==dish.typeId) if(index==-1){ - this.dishesTypeList.push({dishesTypeId:dish.dishesTypeId,dishesTypeName:dish.dishesTypeName}) + this.dishesTypeList.push({typeId:dish.typeId,dishesTypeName:dish.dishesTypeName}) } }) this.choseDishesType(this.dishesTypeList[0]) @@ -1061,7 +1061,7 @@ export default { "canteenId":this.baseInfo.canteenId, "stallId":this.baseInfo.stallId, "salesMode":this.queryDish.salesMode, - "typeIds":[this.queryDish.dishesTypeId], + "typeIds":[this.queryDish.typeId], "dishesName":this.queryDish.dishesName, "pageNum":1, "pageSize":100 @@ -1096,9 +1096,9 @@ export default { } }) //判断是否为新菜品类型 - let typeIndex = this.dishesTypeList.findIndex(v=>v.dishesTypeId==obj.dishesTypeId) + let typeIndex = this.dishesTypeList.findIndex(v=>v.typeId==obj.typeId) if(typeIndex==-1){ - this.dishesTypeList.push({dishesTypeId:obj.dishesTypeId,dishesTypeName:obj.dishesTypeName}) + this.dishesTypeList.push({typeId:obj.typeId,dishesTypeName:obj.dishesTypeName}) } }else{ this.dishesList.splice(index,1) @@ -1114,15 +1114,15 @@ export default { }, //选中菜品类型-更新右侧表格数据 choseDishesType(item){ - this.dishesType = item.dishesTypeId; + this.dishesType = item.typeId; this.dishesTableList = [] this.dishesList.forEach(dish=>{ - if(dish.dishesTypeId==item.dishesTypeId){ + if(dish.typeId==item.typeId){ this.dishesTableList.push(dish) } }) if(this.dishesTableList.length==0){//单个菜品分类中无菜品时,删除该分类 - let typeIndex = this.dishesTypeList.findIndex(v=>v.dishesTypeId==item.dishesTypeId) + let typeIndex = this.dishesTypeList.findIndex(v=>v.typeId==item.typeId) if(typeIndex>-1){ this.dishesTypeList.splice(typeIndex,1) } @@ -1142,7 +1142,7 @@ export default { } }) if(this.dishesTableList.length==0){//单个菜品分类中无菜品时,删除该分类 - let typeIndex = this.dishesTypeList.findIndex(v=>v.dishesTypeId==item.dishesTypeId) + let typeIndex = this.dishesTypeList.findIndex(v=>v.typeId==item.typeId) if(typeIndex>-1){ this.dishesTypeList.splice(typeIndex,1) } @@ -1412,11 +1412,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; } }) } @@ -1458,11 +1458,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; } }) } @@ -1608,11 +1608,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/index.vue b/src/views/dish/menu/index.vue index 16eb13d4..5c4d23a9 100644 --- a/src/views/dish/menu/index.vue +++ b/src/views/dish/menu/index.vue @@ -146,7 +146,7 @@ diff --git a/src/views/superstore/super/index.vue b/src/views/superstore/super/index.vue index 81d201f0..ac518816 100644 --- a/src/views/superstore/super/index.vue +++ b/src/views/superstore/super/index.vue @@ -443,13 +443,13 @@ }, handleTreeChange(e){ console.log(e) - // let param = { - // areaId:e - // } - // drpWareHousePageApi(param).then(response => { - // this.wareHouseOptions = response.rows - // this.queryParams.warehouseId = null - // }); + let param = { + areaId:e + } + drpWareHousePageApi(param).then(response => { + this.wareHouseOptions = response.rows + this.queryParams.warehouseId = null + }); }, getWareHouse() { drpWareHousePageApi({}).then(response => {