diff --git a/src/views/foodManage/purchaseManage/productionPlan/edit.vue b/src/views/foodManage/purchaseManage/productionPlan/edit.vue index addf27ae..197fe0fd 100644 --- a/src/views/foodManage/purchaseManage/productionPlan/edit.vue +++ b/src/views/foodManage/purchaseManage/productionPlan/edit.vue @@ -52,8 +52,8 @@ - 多天重复 - 多天不重复 + 多天重复 + 多天不重复 @@ -95,10 +95,10 @@
- {{dish.dishesName}} - - + {{dish.dishesName}} + +
@@ -332,6 +332,8 @@ export default { //查询查询食堂下拉结构 getProductionPlanInfoApi(param).then((response) => { this.baseInfo = response.data; + this.dialogType = response.data.productionPlanType; + this.ifRepeat = response.data.ifRepeat; getCanteenByAreaApi({areaId:this.baseInfo.areaId}).then((response) => { this.canteenOptions=response.rows||[]; this.$set(this.baseInfo,"canteenId",this.baseInfo.canteenId) @@ -344,14 +346,25 @@ export default { this.recipeOptions = response.rows||[] this.$set(this.baseInfo,"recipeId",this.baseInfo.recipeId) }); - - - - - - - + var resDetailList = response.data.productionPlanDetailVOList; + this.dateRange=[resDetailList[0].detailDate,resDetailList[resDetailList.length-1].detailDate] + this.dateRangeList = this.getDateRange(this.dateRange[0],this.dateRange[1]) + this.dateRangeIndex = 0 + this.dateRangeRadio = this.formatDate(this.dateRange[0]); + for (let i = 0; i < resDetailList.length; i++) { + this.dateRangeList.forEach(item=>{ + if(resDetailList[i].detailDate==item.applyDate){ + item.detailList.forEach(subItem=>{ + if(resDetailList[i].mealtimeType==subItem.mealtimeType){ + this.$set(resDetailList[i],'number',resDetailList[i].dishesNum) + subItem.dishesList.push(resDetailList[i]) + } + }) + } + }) + } + this.detailList = this.dateRangeList[0].detailList; }); }, //区域树