菜谱新增修改
This commit is contained in:
		
							parent
							
								
									ea20f7636b
								
							
						
					
					
						commit
						6f1c2db60a
					
				| 
						 | 
				
			
			@ -114,6 +114,18 @@ export function addMenuRecipeApi(data) {
 | 
			
		|||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//菜谱-删除
 | 
			
		||||
export function removeMenuRecipeApi(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/smart-canteen/api/v2/menurecipe/remove/recipes',
 | 
			
		||||
    method: 'post',
 | 
			
		||||
    headers: {
 | 
			
		||||
        "merchant-id":"378915229716713472",
 | 
			
		||||
    },
 | 
			
		||||
    data: data
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,9 +94,9 @@
 | 
			
		|||
                </div>
 | 
			
		||||
            </el-card> 
 | 
			
		||||
        </div>
 | 
			
		||||
        <div style="width: 100%;height: 80px;padding: 10px;background: #FFF;border-radius: 10px;">
 | 
			
		||||
        <div style="width: 100%;height: 80px;padding: 10px;background: #FFF;border-radius: 10px;display: flex;align-items: center;justify-content: center;">
 | 
			
		||||
            <el-button type="primary" @click="confirmSubmit">提 交</el-button>
 | 
			
		||||
            <el-button @click="">返 回</el-button>
 | 
			
		||||
            <el-button @click="jumpList">返 回</el-button>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -423,6 +423,12 @@ export default {
 | 
			
		|||
        this.getTypeData()
 | 
			
		||||
    },
 | 
			
		||||
    methods: {
 | 
			
		||||
        // 返回列表页
 | 
			
		||||
        jumpList() {
 | 
			
		||||
            const obj = { path: "/dish/menuDetail" };
 | 
			
		||||
            this.$tab.closeOpenPage(obj);
 | 
			
		||||
            this.$router.replace({ path: "/dish/menu" }); // 要打开的页面 
 | 
			
		||||
        },
 | 
			
		||||
        //区域树
 | 
			
		||||
        getAreaTreeData() {
 | 
			
		||||
            systemAreaTreeApi({}).then((response) => {
 | 
			
		||||
| 
						 | 
				
			
			@ -756,9 +762,8 @@ export default {
 | 
			
		|||
                param.recipeDateList = this.weekDateList
 | 
			
		||||
            }
 | 
			
		||||
            console.log(param)
 | 
			
		||||
            addMenuRecipeApi(param).then((response) => { 
 | 
			
		||||
                this.$store.dispatch("/dish/menuDetail", this.$route); //关闭当前页
 | 
			
		||||
                this.$router.replace({ path: "/dish/menu" }); // 要打开的页面 
 | 
			
		||||
            addMenuRecipeApi(param).then((response) => {  
 | 
			
		||||
                this.jumpList() 
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
        //日期
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -140,7 +140,7 @@
 | 
			
		|||
  <script>
 | 
			
		||||
  
 | 
			
		||||
  import { mealTimeListApi,menuTypeListApi,systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/dish/menu"; 
 | 
			
		||||
  import { getCurrentRecipeListApi, getPageRecipeListApi } from "@/api/dish/menu"; 
 | 
			
		||||
  import { getCurrentRecipeListApi, getPageRecipeListApi,removeMenuRecipeApi } from "@/api/dish/menu"; 
 | 
			
		||||
  export default {
 | 
			
		||||
    name: "",
 | 
			
		||||
    dicts: [],
 | 
			
		||||
| 
						 | 
				
			
			@ -324,10 +324,9 @@
 | 
			
		|||
        },
 | 
			
		||||
        /** 删除按钮操作 */
 | 
			
		||||
        handleDelete(row) {
 | 
			
		||||
            console.log(row) 
 | 
			
		||||
            var that = this
 | 
			
		||||
            console.log(row)  
 | 
			
		||||
            this.$modal.confirm('是否确认删除数据项?').then(function() {
 | 
			
		||||
                // return removeMenuDishesSuitApi(row.suitId)  
 | 
			
		||||
                return removeMenuRecipeApi([row.recipe])  
 | 
			
		||||
            }).then(() => {
 | 
			
		||||
                this.getList();
 | 
			
		||||
                this.$modal.msgSuccess("删除成功");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue