菜谱编辑
This commit is contained in:
		
							parent
							
								
									6495ac6626
								
							
						
					
					
						commit
						a780d041ff
					
				| 
						 | 
				
			
			@ -1167,7 +1167,13 @@ export default {
 | 
			
		|||
                if (valid) {  
 | 
			
		||||
                    let param = this.baseInfo
 | 
			
		||||
                    if(this.baseInfo.recipeType==1){
 | 
			
		||||
                        param.recipeDateList = this.dateRangeList
 | 
			
		||||
                        param.recipeDateList = []
 | 
			
		||||
                        this.dateRangeList.forEach(item=>{
 | 
			
		||||
                            let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
 | 
			
		||||
                            if(index>-1){
 | 
			
		||||
                                param.recipeDateList.push(item)
 | 
			
		||||
                            }
 | 
			
		||||
                        })
 | 
			
		||||
                    }
 | 
			
		||||
                    if(this.baseInfo.recipeType==2){ 
 | 
			
		||||
                        param.recipeDateList = [{
 | 
			
		||||
| 
						 | 
				
			
			@ -1176,7 +1182,13 @@ export default {
 | 
			
		|||
                        }]
 | 
			
		||||
                    }
 | 
			
		||||
                    if(this.baseInfo.recipeType==3){
 | 
			
		||||
                        param.recipeDateList = this.weekDateList
 | 
			
		||||
                        param.recipeDateList = []
 | 
			
		||||
                        this.weekDateList.forEach(item=>{
 | 
			
		||||
                            let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
 | 
			
		||||
                            if(index>-1){
 | 
			
		||||
                                param.recipeDateList.push(item)
 | 
			
		||||
                            }
 | 
			
		||||
                        })
 | 
			
		||||
                    }
 | 
			
		||||
                    this.noDishes = true;
 | 
			
		||||
                    param.recipeDateList.forEach(item=>{
 | 
			
		||||
| 
						 | 
				
			
			@ -1190,6 +1202,7 @@ export default {
 | 
			
		|||
                            }
 | 
			
		||||
                        })
 | 
			
		||||
                    })
 | 
			
		||||
                    console.log(param)
 | 
			
		||||
                    if(this.noDishes){
 | 
			
		||||
                        this.$modal.msgError("请选中菜品!");
 | 
			
		||||
                    }else{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue