原料菜品
This commit is contained in:
parent
e0c4750259
commit
690a8c6be4
|
|
@ -1,23 +1,31 @@
|
||||||
|
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// // 查询菜品灶类列表
|
// 查询菜品灶类列表 key
|
||||||
// export function getMenuDishesCookListApi(data) {
|
// dishes_cook 菜品灶类
|
||||||
// return request({
|
// dishes_label 菜品标签
|
||||||
// url: '/smart-canteen/api/v1/menudishescook/page',
|
// dishes_taste 菜品口味
|
||||||
// method: 'get',
|
// dishes_effec 菜品功效
|
||||||
// headers: {
|
// dishes_style 菜品菜系
|
||||||
// "merchant-id":"378915229716713472",
|
// dishes_suitId 适宜人群
|
||||||
// },
|
// dishes_meal 餐次
|
||||||
// params: data
|
// dishes_season 事宜季节
|
||||||
// })
|
export function getDishesTypeListApi(data) {
|
||||||
// }
|
return request({
|
||||||
|
url: '/smart-canteen/menu_dishes/getDishesType',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 菜品种类-全量数据
|
// 菜品种类-全量数据
|
||||||
export function menuDishesTypeAllListApi(data) {
|
export function menuDishesTypeAllListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menudishestype/all/list',
|
url: '/smart-canteen/menu_material/getAllMenuDishesTypeList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -28,7 +36,7 @@ export function menuDishesTypeAllListApi(data) {
|
||||||
// 菜品种类-新增 areaId typeName
|
// 菜品种类-新增 areaId typeName
|
||||||
export function addMenuDishesTypeApi(data) {
|
export function addMenuDishesTypeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menudishestype/add',
|
url: '/smart-canteen/menu_material/addMenuDishesType',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -60,6 +68,7 @@ export function removeMenuDishesTypeApi(typeId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 菜品列表-分页
|
// 菜品列表-分页
|
||||||
export function getMenuDishesListApi(data) {
|
export function getMenuDishesListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
@ -74,7 +83,7 @@ export function getMenuDishesListApi(data) {
|
||||||
// 菜品列表-新增
|
// 菜品列表-新增
|
||||||
export function addMenuDishesApi(data) {
|
export function addMenuDishesApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v2/menudishes/add',
|
url: '/smart-canteen/menu_dishes/addMenuDishes',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ export function systemMaterialTreeApi(data) {
|
||||||
// 新增原料类别
|
// 新增原料类别
|
||||||
export function addMaterialTypeApi(data) {
|
export function addMaterialTypeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterialcategory/add',
|
url: '/smart-canteen/menu_material_category/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -25,7 +25,7 @@ export function addMaterialTypeApi(data) {
|
||||||
//修改原料类别
|
//修改原料类别
|
||||||
export function updateMaterialTypeApi(data) {
|
export function updateMaterialTypeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterialcategory/edit',
|
url: '/smart-canteen/menu_material_category/edit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -36,7 +36,7 @@ export function updateMaterialTypeApi(data) {
|
||||||
//删除原料类别
|
//删除原料类别
|
||||||
export function removeMaterialTypeApi(data) {
|
export function removeMaterialTypeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterialcategory/remove',
|
url: '/smart-canteen/menu_material_category/del',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -48,19 +48,19 @@ export function removeMaterialTypeApi(data) {
|
||||||
// 查询原料列表
|
// 查询原料列表
|
||||||
export function getMaterialListApi(data) {
|
export function getMaterialListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/page',
|
url: '/smart-canteen/menu_material/list',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
},
|
},
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增原料
|
// 新增原料
|
||||||
export function addMaterialApi(data) {
|
export function addMaterialApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/add',
|
url: '/smart-canteen/menu_material/addMessage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -72,7 +72,7 @@ export function addMaterialApi(data) {
|
||||||
// 编辑原料
|
// 编辑原料
|
||||||
export function updateMaterialApi(data) {
|
export function updateMaterialApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/edit',
|
url: '/smart-canteen/menu_material/edit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -84,11 +84,12 @@ export function updateMaterialApi(data) {
|
||||||
// 删除原料
|
// 删除原料
|
||||||
export function removeMaterialApi(data) {
|
export function removeMaterialApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/remove/'+data.materialId,
|
url: '/smart-canteen/menu_material/del',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
}
|
},
|
||||||
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 批量删除原料
|
// 批量删除原料
|
||||||
|
|
@ -117,7 +118,7 @@ export function batchUpdateMaterialApi(data) {
|
||||||
//{current: 1, size: -1, ifListUse: 1, areaId: '421488254718578688'}
|
//{current: 1, size: -1, ifListUse: 1, areaId: '421488254718578688'}
|
||||||
export function getDrpUnitListApi(data) {
|
export function getDrpUnitListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen//api/v1/drpunit/page',
|
url: '/smart-canteen/api/v1/drpunit/page',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
|
||||||
|
|
@ -488,9 +488,9 @@
|
||||||
<el-form-item label="菜品灶类" prop="cookId">
|
<el-form-item label="菜品灶类" prop="cookId">
|
||||||
<el-select v-model="baseForm.cookId" style="width: 100%;" clearable>
|
<el-select v-model="baseForm.cookId" style="width: 100%;" clearable>
|
||||||
<el-option v-for="item in dishesCookOptions"
|
<el-option v-for="item in dishesCookOptions"
|
||||||
:key="item.cookId"
|
:key="item.value"
|
||||||
:label="item.cookName"
|
:label="item.key"
|
||||||
:value="item.cookId"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -499,9 +499,9 @@
|
||||||
<el-form-item label="菜品标签" prop="labelIdList">
|
<el-form-item label="菜品标签" prop="labelIdList">
|
||||||
<el-select v-model="baseForm.labelIdList" multiple style="width: 100%;" clearable>
|
<el-select v-model="baseForm.labelIdList" multiple style="width: 100%;" clearable>
|
||||||
<el-option v-for="item in dishesLabelOptions"
|
<el-option v-for="item in dishesLabelOptions"
|
||||||
:key="item.labelId"
|
:key="item.value"
|
||||||
:label="item.labelName"
|
:label="item.key"
|
||||||
:value="item.labelId"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -511,9 +511,9 @@
|
||||||
<el-form-item label="菜品口味" prop="tasteIdList">
|
<el-form-item label="菜品口味" prop="tasteIdList">
|
||||||
<el-select v-model="baseForm.tasteIdList" multiple style="width: 100%;" clearable>
|
<el-select v-model="baseForm.tasteIdList" multiple style="width: 100%;" clearable>
|
||||||
<el-option v-for="item in dishesTasteOptions"
|
<el-option v-for="item in dishesTasteOptions"
|
||||||
:key="item.tasteId"
|
:key="item.value"
|
||||||
:label="item.tasteName"
|
:label="item.key"
|
||||||
:value="item.tasteId"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -522,9 +522,9 @@
|
||||||
<el-form-item label="菜品菜系" prop="styleId">
|
<el-form-item label="菜品菜系" prop="styleId">
|
||||||
<el-select v-model="baseForm.styleId" style="width: 100%;" clearable>
|
<el-select v-model="baseForm.styleId" style="width: 100%;" clearable>
|
||||||
<el-option v-for="item in dishesStyleOptions"
|
<el-option v-for="item in dishesStyleOptions"
|
||||||
:key="item.styleId"
|
:key="item.value"
|
||||||
:label="item.styleName"
|
:label="item.key"
|
||||||
:value="item.styleId"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -545,9 +545,9 @@
|
||||||
<el-form-item label="菜品功效" prop="effectId">
|
<el-form-item label="菜品功效" prop="effectId">
|
||||||
<el-select v-model="baseForm.effectId" style="width: 100%;" clearable>
|
<el-select v-model="baseForm.effectId" style="width: 100%;" clearable>
|
||||||
<el-option v-for="item in dishesEffectOptions"
|
<el-option v-for="item in dishesEffectOptions"
|
||||||
:key="item.effectId"
|
:key="item.value"
|
||||||
:label="item.effectName"
|
:label="item.key"
|
||||||
:value="item.effectId"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -557,9 +557,9 @@
|
||||||
<el-form-item label="适宜人群" prop="suitIdList">
|
<el-form-item label="适宜人群" prop="suitIdList">
|
||||||
<el-select v-model="baseForm.suitIdList" multiple style="width: 100%;" clearable>
|
<el-select v-model="baseForm.suitIdList" multiple style="width: 100%;" clearable>
|
||||||
<el-option v-for="item in dishesSuitOptions"
|
<el-option v-for="item in dishesSuitOptions"
|
||||||
:key="item.suitId"
|
:key="item.value"
|
||||||
:label="item.suitName"
|
:label="item.key"
|
||||||
:value="item.suitId"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -989,6 +989,7 @@
|
||||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||||
import { menuDishesTypeAllListApi,addMenuDishesTypeApi, editMenuDishesTypeApi, removeMenuDishesTypeApi} from "@/api/dish/dish";
|
import { menuDishesTypeAllListApi,addMenuDishesTypeApi, editMenuDishesTypeApi, removeMenuDishesTypeApi} from "@/api/dish/dish";
|
||||||
import { getMenuDishesListApi,addMenuDishesApi, editMenuDishesApi,menuDishesDetailApi,removeMenuDishesApi } from "@/api/dish/dish";
|
import { getMenuDishesListApi,addMenuDishesApi, editMenuDishesApi,menuDishesDetailApi,removeMenuDishesApi } from "@/api/dish/dish";
|
||||||
|
import { getDishesTypeListApi } from "@/api/dish/dish";
|
||||||
import { getMenuDishesCookListApi, getMenuDishesLabelListApi, getMenuDishesTasteListApi, getMenuDishesEffectListApi, getMenuDishesStyleListApi, getMenuDishesSuitListApi } from "@/api/dish/type"
|
import { getMenuDishesCookListApi, getMenuDishesLabelListApi, getMenuDishesTasteListApi, getMenuDishesEffectListApi, getMenuDishesStyleListApi, getMenuDishesSuitListApi } from "@/api/dish/type"
|
||||||
import { getMaterialListApi } from "@/api/dish/material";
|
import { getMaterialListApi } from "@/api/dish/material";
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
|
|
@ -1326,23 +1327,23 @@
|
||||||
"page":{"current":1,"size":-1},
|
"page":{"current":1,"size":-1},
|
||||||
"object":{}
|
"object":{}
|
||||||
}
|
}
|
||||||
getMenuDishesCookListApi({"content":JSON.stringify(param)}).then(response => {
|
getDishesTypeListApi({"key":'dishes_cook'}).then(response => {
|
||||||
this.dishesCookOptions = response.data.records;
|
this.dishesCookOptions = response.data;
|
||||||
});
|
});
|
||||||
getMenuDishesLabelListApi({"content":JSON.stringify(param)}).then(response => {
|
getDishesTypeListApi({"key":"dishes_label"}).then(response => {
|
||||||
this.dishesLabelOptions = response.data.records;
|
this.dishesLabelOptions = response.data;
|
||||||
});
|
});
|
||||||
getMenuDishesTasteListApi({"content":JSON.stringify(param)}).then(response => {
|
getDishesTypeListApi({"key":"dishes_taste"}).then(response => {
|
||||||
this.dishesTasteOptions = response.data.records;
|
this.dishesTasteOptions = response.data;
|
||||||
});
|
});
|
||||||
getMenuDishesEffectListApi({"content":JSON.stringify(param)}).then(response => {
|
getDishesTypeListApi({"key":"dishes_effec"}).then(response => {
|
||||||
this.dishesEffectOptions = response.data.records;
|
this.dishesEffectOptions = response.data;
|
||||||
});
|
});
|
||||||
getMenuDishesStyleListApi({"content":JSON.stringify(param)}).then(response => {
|
getDishesTypeListApi({"key":"dishes_style"}).then(response => {
|
||||||
this.dishesStyleOptions = response.data.records;
|
this.dishesStyleOptions = response.data;
|
||||||
});
|
});
|
||||||
getMenuDishesSuitListApi({"content":JSON.stringify(param)}).then(response => {
|
getDishesTypeListApi({"key":"dishes_suitId"}).then(response => {
|
||||||
this.dishesSuitOptions = response.data.records;
|
this.dishesSuitOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,11 @@
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="form.str"
|
v-model="form.str"
|
||||||
:options="cascaderOptions"
|
:options="cascaderOptions"
|
||||||
|
:props="{
|
||||||
|
emitPath: true,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
|
value:'label',label:'label'
|
||||||
|
}"
|
||||||
placeholder="请选择营养信息类别"
|
placeholder="请选择营养信息类别"
|
||||||
clearable style="width: 100%;"
|
clearable style="width: 100%;"
|
||||||
@change="handleNutritionChange"
|
@change="handleNutritionChange"
|
||||||
|
|
@ -172,7 +177,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="是否需要检测" prop="ifNeedDetect">
|
<el-form-item label="是否需要检测" prop="ifNeedDetect">
|
||||||
<el-select v-model="form.safeConfigDTO.ifNeedDetect" placeholder="请选择是否需要检测" style="width: 100%">
|
<el-select v-model="form.safeConfigDTO.ifNeedDetect" placeholder="请选择是否需要检测" style="width: 100%">
|
||||||
<el-option label="是" value="1" />
|
<el-option label="是" value="1" />
|
||||||
|
|
@ -205,10 +210,10 @@
|
||||||
<el-select v-model="form.qualificationCert" placeholder="请选择供应资格证书" style="width: 100%">
|
<el-select v-model="form.qualificationCert" placeholder="请选择供应资格证书" style="width: 100%">
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<!-- <el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="加工方法" prop="firstProcessList">
|
<el-form-item label="加工方法" prop="firstProcessList">
|
||||||
<div class="method-input-group">
|
<div class="method-input-group">
|
||||||
|
|
@ -244,7 +249,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row> -->
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
@ -283,7 +288,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi } from "@/api/base/area";
|
import { systemAreaTreeApi } from "@/api/base/area";
|
||||||
import { systemMaterialTreeApi,getDrpUnitListApi } from "@/api/dish/material";
|
import { systemMaterialTreeApi,getDrpUnitListApi } from "@/api/dish/material";
|
||||||
import { typeList,nutritionAllListApi,nutritionDetailApi } from "@/api/dish/nutritionInfo";
|
import { nutritionTypeListApi,nutritionAllListApi,nutritionDetailApi } from "@/api/dish/nutritionInfo";
|
||||||
export default {
|
export default {
|
||||||
name: "MaterialDialog",
|
name: "MaterialDialog",
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -322,14 +327,14 @@ export default {
|
||||||
purPriceCeiling:'',//采购上限价格
|
purPriceCeiling:'',//采购上限价格
|
||||||
size:'',//原料规格
|
size:'',//原料规格
|
||||||
taxRate:'',//原料税率
|
taxRate:'',//原料税率
|
||||||
safeConfigDTO:{
|
// safeConfigDTO:{
|
||||||
ifNeedDetect: '2',//是否检测(1是2否)
|
// ifNeedDetect: '2',//是否检测(1是2否)
|
||||||
detectInstitution:'1',//检测机构(1自检,2供应商检,3自检或供应商检,4自检且供应商检)
|
// detectInstitution:'1',//检测机构(1自检,2供应商检,3自检或供应商检,4自检且供应商检)
|
||||||
detectItem:"1",//
|
// detectItem:"1",//
|
||||||
},
|
// },
|
||||||
qualificationCert: '',
|
// qualificationCert: '',
|
||||||
firstProcessList: [''],
|
// firstProcessList: [''],
|
||||||
cutProcessList: [''],
|
// cutProcessList: [''],
|
||||||
//营养信息
|
//营养信息
|
||||||
menuMaterialNutritionDTO: {
|
menuMaterialNutritionDTO: {
|
||||||
edible: '',//可食部分(g/100g)
|
edible: '',//可食部分(g/100g)
|
||||||
|
|
@ -369,7 +374,7 @@ export default {
|
||||||
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
|
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
|
||||||
categoryId: [{ required: true, message: '请选择原料类别', trigger: 'change' }],
|
categoryId: [{ required: true, message: '请选择原料类别', trigger: 'change' }],
|
||||||
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
|
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
|
||||||
unitId: [{ required: true, message: '请选择原料单位', trigger: 'change' }]
|
// unitId: [{ required: true, message: '请选择原料单位', trigger: 'change' }]
|
||||||
},
|
},
|
||||||
nutritionFields: [
|
nutritionFields: [
|
||||||
{ label: '可食部分', prop: 'ediblePart', unit: 'g/100g' },
|
{ label: '可食部分', prop: 'ediblePart', unit: 'g/100g' },
|
||||||
|
|
@ -411,7 +416,7 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getAreaTreeData();//获取区域树
|
this.getAreaTreeData();//获取区域树
|
||||||
this.getTypeTreeData();//获取原料类别树
|
this.getTypeTreeData();//获取原料类别树
|
||||||
this.getDrpUnitList();//获取单位类型下拉
|
// this.getDrpUnitList();//获取单位类型下拉
|
||||||
this.getNutritionType()//获取营养信息类别树
|
this.getNutritionType()//获取营养信息类别树
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -427,7 +432,7 @@ export default {
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
this.form.categoryId=null
|
this.form.categoryId=null
|
||||||
this.getTypeTreeData()
|
this.getTypeTreeData()
|
||||||
this.getDrpUnitList()
|
// this.getDrpUnitList()
|
||||||
},
|
},
|
||||||
//类型树
|
//类型树
|
||||||
getTypeTreeData() {
|
getTypeTreeData() {
|
||||||
|
|
@ -462,7 +467,7 @@ export default {
|
||||||
},
|
},
|
||||||
//获取营养类别
|
//获取营养类别
|
||||||
getNutritionType() {
|
getNutritionType() {
|
||||||
typeList().then(response => {
|
nutritionTypeListApi().then(response => {
|
||||||
this.nutritionTypeTreeData = response.data;
|
this.nutritionTypeTreeData = response.data;
|
||||||
this.cascaderOptions = this.cascaderOptionsMethod();
|
this.cascaderOptions = this.cascaderOptionsMethod();
|
||||||
console.log(this.cascaderOptions)
|
console.log(this.cascaderOptions)
|
||||||
|
|
@ -477,11 +482,15 @@ export default {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
return this.nutritionTypeTreeData.map(item => ({
|
return this.nutritionTypeTreeData.map(item => ({
|
||||||
value: item.bigType,
|
value: item.id,
|
||||||
label: item.bigType,
|
label: item.bigType,
|
||||||
|
parentId:0,
|
||||||
|
level:1,
|
||||||
children: item.littleTypeList.map(subItem => ({
|
children: item.littleTypeList.map(subItem => ({
|
||||||
value: subItem,//父子类别value一致时选中识别不出来,加个#号区分
|
value: subItem.id,//父子类别value一致时选中识别不出来,加个#号区分
|
||||||
label: subItem
|
label: subItem.bigType,
|
||||||
|
parentId:item.id,
|
||||||
|
level:2
|
||||||
}))
|
}))
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
@ -604,13 +613,13 @@ export default {
|
||||||
this.$set(this.form,"size",row.size)
|
this.$set(this.form,"size",row.size)
|
||||||
this.$set(this.form,"taxRate",row.taxRate)
|
this.$set(this.form,"taxRate",row.taxRate)
|
||||||
|
|
||||||
this.$set(this.form.safeConfigDTO,"ifNeedDetect",row.safeConfigDTO.ifNeedDetect+'')
|
// this.$set(this.form.safeConfigDTO,"ifNeedDetect",row.safeConfigDTO.ifNeedDetect+'')
|
||||||
this.$set(this.form.safeConfigDTO,"detectInstitution",row.safeConfigDTO.detectInstitution+'')
|
// this.$set(this.form.safeConfigDTO,"detectInstitution",row.safeConfigDTO.detectInstitution+'')
|
||||||
this.$set(this.form.safeConfigDTO,"detectItem",row.safeConfigDTO.detectItem+'')
|
// this.$set(this.form.safeConfigDTO,"detectItem",row.safeConfigDTO.detectItem+'')
|
||||||
|
|
||||||
this.$set(this.form,"qualificationCert","")
|
// this.$set(this.form,"qualificationCert","")
|
||||||
this.$set(this.form,"firstProcessList",row.firstProcessList)
|
// this.$set(this.form,"firstProcessList",row.firstProcessList)
|
||||||
this.$set(this.form,"cutProcessList",row.cutProcessList)
|
// this.$set(this.form,"cutProcessList",row.cutProcessList)
|
||||||
|
|
||||||
|
|
||||||
if(row.bigType&&row.littleType){
|
if(row.bigType&&row.littleType){
|
||||||
|
|
@ -735,14 +744,14 @@ export default {
|
||||||
purPriceCeiling:'',//采购上限价格
|
purPriceCeiling:'',//采购上限价格
|
||||||
size:'',//原料规格
|
size:'',//原料规格
|
||||||
taxRate:'',//原料税率
|
taxRate:'',//原料税率
|
||||||
safeConfigDTO:{
|
// safeConfigDTO:{
|
||||||
ifNeedDetect: '2',//是否检测(1是2否)
|
// ifNeedDetect: '2',//是否检测(1是2否)
|
||||||
detectInstitution:'1',//检测机构(1自检,2供应商检,3自检或供应商检,4自检且供应商检)
|
// detectInstitution:'1',//检测机构(1自检,2供应商检,3自检或供应商检,4自检且供应商检)
|
||||||
detectItem:"1",//
|
// detectItem:"1",//
|
||||||
},
|
// },
|
||||||
qualificationCert: '',
|
// qualificationCert: '',
|
||||||
firstProcessList: [''],
|
// firstProcessList: [''],
|
||||||
cutProcessList: [''],
|
// cutProcessList: [''],
|
||||||
//营养信息
|
//营养信息
|
||||||
menuMaterialNutritionDTO: {
|
menuMaterialNutritionDTO: {
|
||||||
edible: '',//可食部分(g/100g)
|
edible: '',//可食部分(g/100g)
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@
|
||||||
@click="handleBatchDel"
|
@click="handleBatchDel"
|
||||||
>批量删除</el-button>
|
>批量删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini" plain
|
size="mini" plain
|
||||||
|
|
@ -183,7 +183,7 @@
|
||||||
@click="importTemplate"
|
@click="importTemplate"
|
||||||
>模板下载
|
>模板下载
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -292,7 +292,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row v-if="isEditType">
|
<!-- <el-row v-if="isEditType">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="原类别父节点" prop="superAreaName">
|
<el-form-item label="原类别父节点" prop="superAreaName">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -316,8 +316,8 @@
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
||||||
<el-button @click="open=false">取 消</el-button>
|
<el-button @click="open=false">取 消</el-button>
|
||||||
|
|
@ -523,8 +523,8 @@ export default {
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
this.form = {
|
this.form = {
|
||||||
...data,
|
...data,
|
||||||
categoryId:data.id,
|
// categoryId:data.id,
|
||||||
superAreaName: data.parentId === "-1" ? "" : this.getParentCategoryName(data.parentId)
|
// superAreaName: data.parentId === "-1" ? "" : this.getParentCategoryName(data.parentId)
|
||||||
};
|
};
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
console.log(this.treeOptions)
|
console.log(this.treeOptions)
|
||||||
|
|
@ -553,7 +553,7 @@ export default {
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除数据项?")
|
.confirm("是否确认删除数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return removeMaterialTypeApi({"categoryId":data.id});
|
return removeMaterialTypeApi({"ids":[data.id]});
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
@ -608,8 +608,8 @@ export default {
|
||||||
console.log(this.$refs.typeTree.getCheckedKeys())
|
console.log(this.$refs.typeTree.getCheckedKeys())
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let params= {
|
let params= {
|
||||||
"size": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"current": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"areaId": this.queryParams.areaId,
|
"areaId": this.queryParams.areaId,
|
||||||
"materialName": this.queryParams.materialName,
|
"materialName": this.queryParams.materialName,
|
||||||
"barCode": this.queryParams.barCode,
|
"barCode": this.queryParams.barCode,
|
||||||
|
|
@ -618,8 +618,8 @@ export default {
|
||||||
"categoryIdList": this.$refs.typeTree.getCheckedKeys(),
|
"categoryIdList": this.$refs.typeTree.getCheckedKeys(),
|
||||||
}
|
}
|
||||||
getMaterialListApi(params).then((response) => {
|
getMaterialListApi(params).then((response) => {
|
||||||
this.tableList = response.data.records;
|
this.tableList = response.rows;
|
||||||
this.total = Number(response.data.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -668,7 +668,7 @@ export default {
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除数据项?")
|
.confirm("是否确认删除数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return removeMaterialApi({"materialId":row.materialId});
|
return removeMaterialApi({"ids":[row.id]});
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,11 @@
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="typeSelected" clearable
|
v-model="typeSelected" clearable
|
||||||
:options="cascaderOptions"
|
:options="cascaderOptions"
|
||||||
|
:props="{
|
||||||
|
emitPath: true,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
|
value:'label',label:'label'
|
||||||
|
}"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -180,6 +185,11 @@
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="form.nutritionCategory"
|
v-model="form.nutritionCategory"
|
||||||
:options="cascaderOptions"
|
:options="cascaderOptions"
|
||||||
|
:props="{
|
||||||
|
emitPath: true,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
|
value:'label',label:'label'
|
||||||
|
}"
|
||||||
placeholder="请选择营养信息类别"
|
placeholder="请选择营养信息类别"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
|
|
@ -618,9 +628,9 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
// nutritionCategory: [
|
nutritionCategory: [
|
||||||
// { required: true, message: "请选择营养信息类别", trigger: "change" }
|
{ required: true, message: "请选择营养信息类别", trigger: "change" }
|
||||||
// ],
|
],
|
||||||
nutritionName: [
|
nutritionName: [
|
||||||
{ required: true, message: "营养信息名称不能为空", trigger: "blur" }
|
{ required: true, message: "营养信息名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|
@ -782,7 +792,7 @@ export default {
|
||||||
console.log(value)
|
console.log(value)
|
||||||
if (value && value.length >= 2) {
|
if (value && value.length >= 2) {
|
||||||
this.queryParams.bigType = value[0];
|
this.queryParams.bigType = value[0];
|
||||||
this.queryParams.littleType = value[1].split("#")[1];
|
this.queryParams.littleType = value[1];
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.bigType = undefined;
|
this.queryParams.bigType = undefined;
|
||||||
this.queryParams.littleType = undefined;
|
this.queryParams.littleType = undefined;
|
||||||
|
|
@ -873,7 +883,7 @@ export default {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
// 如果后端返回的是分开的大类小类,需要组合成数组
|
// 如果后端返回的是分开的大类小类,需要组合成数组
|
||||||
if (response.data.bigType && response.data.littleType) {
|
if (response.data.bigType && response.data.littleType) {
|
||||||
this.$set(this.form,"nutritionCategory",[response.data.bigType,'#'+response.data.littleType])
|
this.$set(this.form,"nutritionCategory",[response.data.bigType,response.data.littleType])
|
||||||
}
|
}
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改营养信息";
|
this.title = "修改营养信息";
|
||||||
|
|
@ -884,10 +894,11 @@ export default {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const formData = { ...this.form };
|
const formData = { ...this.form };
|
||||||
|
console.log(formData)
|
||||||
// 处理营养信息类别,转换为后端需要的格式
|
// 处理营养信息类别,转换为后端需要的格式
|
||||||
if (formData.nutritionCategory && formData.nutritionCategory.length >= 2) {
|
if (formData.nutritionCategory && formData.nutritionCategory.length >= 2) {
|
||||||
formData.bigType = formData.nutritionCategory[0];
|
formData.bigType = formData.nutritionCategory[0];
|
||||||
formData.littleType = formData.nutritionCategory[1].split("#")[1];
|
formData.littleType = formData.nutritionCategory[1];
|
||||||
}
|
}
|
||||||
delete formData.nutritionCategory; // 删除多余的字段
|
delete formData.nutritionCategory; // 删除多余的字段
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ module.exports = {
|
||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://192.168.2.80:48380`,
|
// target: `http://192.168.2.80:48380`,//旭
|
||||||
// target: `http://192.168.0.44:48380`,
|
// target: `http://192.168.0.44:48380`,
|
||||||
// target: `http://192.168.0.176:48380`,
|
target: `http://192.168.0.176:48380`,//鑫
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: '',
|
['^' + process.env.VUE_APP_BASE_API]: '',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue