菜谱管理接口替换
This commit is contained in:
parent
86a9767b60
commit
ade27e8adf
|
|
@ -21,7 +21,7 @@ export function menuTypeListApi(data) {
|
|||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 用户范围
|
||||
export function getmkteffectiveApi(data) {
|
||||
|
|
@ -35,10 +35,11 @@ export function getmkteffectiveApi(data) {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
// 弹窗-菜品列表
|
||||
export function getDishesByTypePageApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/menu_dishes/list',
|
||||
url: '/smart-canteen/cook_dishes/list',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -54,7 +55,7 @@ export function getDishesByTypePageApi(data) {
|
|||
// 获取当前菜谱
|
||||
export function getCurrentRecipeListApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/menu_recipe/list',
|
||||
url: '/smart-canteen/cook_recipe/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -65,23 +66,30 @@ export function getCurrentRecipeListApi(data) {
|
|||
// 获取所有菜谱-分页
|
||||
export function getPageRecipeListApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/menu_recipe/getDishesList',
|
||||
method: 'post',
|
||||
url: '/smart-canteen/cook_recipe/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data,
|
||||
params:{
|
||||
pageNum:data.pageNum,
|
||||
pageSize:data.pageSize
|
||||
}
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//菜谱-新增
|
||||
export function addMenuRecipeApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/menu_recipe/add',
|
||||
url: '/smart-canteen/cook_recipe',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//菜谱-编辑
|
||||
export function editMenuRecipeApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/cook_recipe',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -93,12 +101,11 @@ export function addMenuRecipeApi(data) {
|
|||
//所有菜谱-删除
|
||||
export function removeMenuRecipeApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/menu_recipe/deleteRecipeById',
|
||||
url: '/smart-canteen/cook_recipe/del/'+data.recipeId,
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +125,7 @@ export function unbindMenuRecipeApi(data) {
|
|||
// 指定日期菜谱-获取菜谱详情
|
||||
export function getMenuRecipeDetailApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/menu_recipe/getDetailByDate',
|
||||
url: '/smart-canteen/cook_recipe/getRecipeDetailByDate',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -130,7 +137,7 @@ export function getMenuRecipeDetailApi(data) {
|
|||
// 每日循环(每周循环)-获取菜谱详情
|
||||
export function getMenuRecipeTemplateDetailApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/menu_recipe/detail',
|
||||
url: '/smart-canteen/cook_recipe/getRecipeDetail',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
|
|||
|
|
@ -253,8 +253,8 @@
|
|||
<span>{{ (scope.row.salePrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应数量" align="center" prop="supplyNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="限购数量" align="center" prop="restrictNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="供应数量" align="center" prop="remanentNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="限购数量" align="center" prop="limitNum" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="openMenu=false">确 定</el-button>
|
||||
|
|
|
|||
|
|
@ -182,14 +182,14 @@
|
|||
<el-input v-model="scope.row.salePrice" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.salePrice=v.replace(/[^\d.]/g,''))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最大供应量" align="center" prop="supplyNum">
|
||||
<el-table-column label="最大供应量" align="center" prop="remanentNum">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.supplyNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.supplyNum=v.replace(/[^\d]/g,''))"/>
|
||||
<el-input v-model="scope.row.remanentNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.remanentNum=v.replace(/[^\d]/g,''))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="每人限购数" align="center" prop="restrictNum">
|
||||
<el-table-column label="每人限购数" align="center" prop="limitNum">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.restrictNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.restrictNum=v.replace(/[^\d]/g,''))"/>
|
||||
<el-input v-model="scope.row.limitNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.limitNum=v.replace(/[^\d]/g,''))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="移动端推荐" align="center" prop="recommendFlag">
|
||||
|
|
@ -876,8 +876,8 @@ 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,'supplyNum',dish.supplyNum||99999)
|
||||
this.$set(dish,'restrictNum',dish.restrictNum||99999)
|
||||
this.$set(dish,'remanentNum',dish.remanentNum||99999)
|
||||
this.$set(dish,'limitNum',dish.limitNum||99999)
|
||||
this.dishesList.push(dish)
|
||||
//反显选中样式
|
||||
this.dishesPageList.forEach(item=>{
|
||||
|
|
|
|||
|
|
@ -183,14 +183,14 @@
|
|||
<el-input v-model="scope.row.salePrice" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.salePrice=v.replace(/[^\d.]/g,''))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最大供应量" align="center" prop="supplyNum">
|
||||
<el-table-column label="最大供应量" align="center" prop="remanentNum">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.supplyNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.supplyNum=v.replace(/[^\d]/g,''))"/>
|
||||
<el-input v-model="scope.row.remanentNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.remanentNum=v.replace(/[^\d]/g,''))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="每人限购数" align="center" prop="restrictNum">
|
||||
<el-table-column label="每人限购数" align="center" prop="limitNum">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.restrictNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.restrictNum=v.replace(/[^\d]/g,''))"/>
|
||||
<el-input v-model="scope.row.limitNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.limitNum=v.replace(/[^\d]/g,''))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="移动端推荐" align="center" prop="recommendFlag">
|
||||
|
|
@ -337,7 +337,7 @@
|
|||
|
||||
<script>
|
||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||
import { mealTimeListApi,getmkteffectiveApi,getDishesByTypePageApi,addMenuRecipeApi,getPageRecipeListApi,getMenuRecipeDetailApi,getMenuRecipeTemplateDetailApi } from "@/api/dish/menu";
|
||||
import { mealTimeListApi,getmkteffectiveApi,getDishesByTypePageApi,editMenuRecipeApi,getPageRecipeListApi,getMenuRecipeDetailApi,getMenuRecipeTemplateDetailApi } from "@/api/dish/menu";
|
||||
import { menuDishesTypeAllListApi } from "@/api/dish/dish";
|
||||
|
||||
export default {
|
||||
|
|
@ -1079,8 +1079,8 @@ 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,'supplyNum',dish.supplyNum||99999)
|
||||
this.$set(dish,'restrictNum',dish.restrictNum||99999)
|
||||
this.$set(dish,'remanentNum',dish.remanentNum||99999)
|
||||
this.$set(dish,'limitNum',dish.limitNum||99999)
|
||||
this.dishesList.push(dish)
|
||||
//反显选中样式
|
||||
this.dishesPageList.forEach(item=>{
|
||||
|
|
@ -1186,7 +1186,7 @@ export default {
|
|||
if(this.noDishes){
|
||||
this.$modal.msgError("请选中菜品!");
|
||||
}else{
|
||||
addMenuRecipeApi(param).then((response) => {
|
||||
editMenuRecipeApi(param).then((response) => {
|
||||
this.jumpList()
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue