预定餐参数修改

This commit is contained in:
zzyuan 2025-06-04 10:10:33 +08:00
parent 8085d32023
commit 9415bda2e9
4 changed files with 65 additions and 95 deletions

View File

@ -51,7 +51,7 @@ export function getOrderInfoAPI(data) {
*/ */
export function addMenuEvaluaOrderApi(data) { export function addMenuEvaluaOrderApi(data) {
return request({ return request({
url: '/smart-canteen/menu_evalua_order', url: '/smart-canteen/cook_evalua_order',
method: 'post', method: 'post',
data data
}) })
@ -63,7 +63,7 @@ export function addMenuEvaluaOrderApi(data) {
*/ */
export function getPageEvaluateListApi(data) { export function getPageEvaluateListApi(data) {
return request({ return request({
url: '/smart-canteen/menu_evalua_order/list', url: '/smart-canteen/cook_evalua_order/list',
method: 'get', method: 'get',
params: data params: data
}) })

View File

@ -2,7 +2,7 @@
<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta> <page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
<view> <view>
<view class="image-box"> <view class="image-box">
<image style="width: 100%;height: 100%;" :src="dashesData.imageUrl"></image> <image style="width: 100%;height: 100%;" :src="dashesData.dishesImgUrl"></image>
</view> </view>
<view class="menuContent"> <view class="menuContent">
<view class="menuInfo"> <view class="menuInfo">
@ -15,14 +15,14 @@
<u-icon <u-icon
v-if="dashesData.quantity>0" v-if="dashesData.quantity>0"
name="../../static/images/delete.png" name="../../static/images/delete.png"
size="16" size="18"
@click="handleFoodNum(1, dashesData)" @click="handleFoodNum(1, dashesData)"
/> />
<span style="margin: 0 10px;font-size: 28rpx;">{{ dashesData.quantity || 0 }}</span> <span style="margin: 0 10px;font-size: 28rpx;">{{ dashesData.quantity || 0 }}</span>
<u-icon <u-icon
v-if="dashesData.quantity < dashesData.limitNum" v-if="dashesData.quantity < dashesData.limitNum"
name="../../static/images/add.png" name="../../static/images/add.png"
size="16" size="18"
@click="handleFoodNum(2, dashesData)" @click="handleFoodNum(2, dashesData)"
/> />
<u-icon v-if="dashesData.quantity == dashesData.limitNum" name="../../static/images/no-add.png" size="16" /> <u-icon v-if="dashesData.quantity == dashesData.limitNum" name="../../static/images/no-add.png" size="16" />
@ -67,77 +67,32 @@
<view>碳水化合物()</view> <view>碳水化合物()</view>
<view>膳食纤维()</view> <view>膳食纤维()</view>
<view>胆固醇()</view> <view>胆固醇()</view>
<!-- <view>维生素A()</view>
<view>维生素C()</view>
<view>维生素E()</view> -->
<!-- <view>胡萝卜素()</view>
<view>视黄醇()</view>
<view>硫胺素()</view>
<view>核黄素()</view> -->
<view>()</view> <view>()</view>
<!-- <view>()</view>
<view>()</view> -->
<view>()</view> <view>()</view>
<!-- <view>()</view>
<view>()</view>
<view>()</view>
<view>()</view>
<view>()</view>
<view>()</view> -->
</view> </view>
<view class="nutrition-box-item"> <view class="nutrition-box-item">
<view>含量</view> <view>含量</view>
<view>{{dashesData.dishesDetailList[0].calories||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.calories||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].protein||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.protein||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].fat||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.fat||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].carbohydrate||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.carbohydrate||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].dietaryFiber||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.dietaryFiber||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].cholesterol||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.cholesterol||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.carotene||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].vitaminC||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.calcium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].vitaminE||'-'}}</view> --> <view>{{dashesData.dishesDetailList[0].nutritionInfo.sodium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].carotene||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].retinol||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].thiamine||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].riboflavin||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].calcium||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].phosphorus||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].kalium||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].sodium||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].magnesium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].iron||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].zinc||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].selenium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].cuprum||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].manganese||'-'}}</view> -->
</view> </view>
<view class="nutrition-box-item"> <view class="nutrition-box-item">
<view>NRV%</view> <view>NRV%</view>
<view>{{dashesData.dishesDetailList[0].caloriesNrv||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.caloriesNrv||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].proteinNrv||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.proteinNrv||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].fatNrv||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.fatNrv||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].carbohydrateNrv||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.carbohydrateNrv||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].dietaryFiberNrv||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.dietaryFiberNrv||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].cholesterolNrv||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.cholesterolNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].vitaminA||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.caroteneNrv||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].vitaminC||'-'}}</view> <view>{{dashesData.dishesDetailList[0].nutritionInfo.calciumNrv||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].vitaminE||'-'}}</view> --> <view>{{dashesData.dishesDetailList[0].nutritionInfo.sodiumNrv||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].caroteneNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].retinol||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].thiamine||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].riboflavin||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].calciumNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].phosphorus||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].kalium||'-'}}</view> -->
<view>{{dashesData.dishesDetailList[0].sodiumNrv||'-'}}</view>
<!-- <view>{{dashesData.dishesDetailList[0].magnesium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].iron||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].zinc||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].selenium||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].cuprum||'-'}}</view>
<view>{{dashesData.dishesDetailList[0].manganese||'-'}}</view> -->
</view> </view>
</view> </view>
<view class="evaluate-box" v-if="hIndex==2"> <view class="evaluate-box" v-if="hIndex==2">
@ -246,7 +201,7 @@
<u-icon <u-icon
v-if="food.quantity > 0" v-if="food.quantity > 0"
name="../../static/images/del.png" name="../../static/images/del.png"
size="16" size="18"
/> />
</view> </view>
<span class="cont-num">{{ food.quantity || 0 }}</span> <span class="cont-num">{{ food.quantity || 0 }}</span>
@ -324,15 +279,16 @@ export default {
methods: { methods: {
// //
async getMenudishesDetail(){ async getMenudishesDetail(){
let param = { // let param = {
"userId": uni.getStorageSync('userId') , // "userId": uni.getStorageSync('userId') ,
"detailId": this.menuData.recipeDetailId, // "detailId": this.menuData.recipeDetailId,
"baseDishesId": this.menuData.baseDishesId, // "baseDishesId": this.menuData.baseDishesId,
// "delFlag": 2 // // "delFlag": 2
} // }
const res = await getMenudishesDetailAPI(param) // const res = await getMenudishesDetailAPI(param)
if(res.code==200){ // if(res.code==200){
this.dashesData = res.data; // this.dashesData = res.data;
this.dashesData = this.menuData;
if(this.dashesData.materialList&&this.dashesData.materialList.length>0){ if(this.dashesData.materialList&&this.dashesData.materialList.length>0){
let arr1=[] let arr1=[]
let arr2=[] let arr2=[]
@ -355,8 +311,8 @@ export default {
this.$set(this.dashesData, 'prefPrice', this.dashesData.dishesDetailList[0].prefPrice) this.$set(this.dashesData, 'prefPrice', this.dashesData.dishesDetailList[0].prefPrice)
this.$set(this.dashesData, 'dishesId', this.dashesData.dishesDetailList[0].dishesId) this.$set(this.dashesData, 'dishesId', this.dashesData.dishesDetailList[0].dishesId)
this.$forceUpdate() this.$forceUpdate()
} // }
console.log(res,'获取菜品详情') // console.log(res,'')
}, },
async getMenuEvaluaCount() { async getMenuEvaluaCount() {
let param = { let param = {
@ -500,8 +456,13 @@ export default {
this.$set(cartItem, 'limitNum', food.dishesDetailList[0].limitNum) this.$set(cartItem, 'limitNum', food.dishesDetailList[0].limitNum)
this.$set(cartItem, 'prefPrice', food.dishesDetailList[0].prefPrice) this.$set(cartItem, 'prefPrice', food.dishesDetailList[0].prefPrice)
if(cartItem.orderDate == this.newDate2){// if(cartItem.orderDate == this.newDate2){//
if(cartItem.recipeId==this.menuData.recipeId){
this.$set(food, 'quantity', cartItem.quantity) this.$set(food, 'quantity', cartItem.quantity)
this.$set(cartItem,'isDfficacy', 1) // this.$set(cartItem,'isDfficacy', 1) //
}else{
this.$set(food, 'quantity', 0)
this.$set(cartItem,'isDfficacy', 0) //
}
}else{// }else{//
this.$set(food, 'quantity', 0) this.$set(food, 'quantity', 0)
this.$set(cartItem,'isDfficacy', 0) // this.$set(cartItem,'isDfficacy', 0) //
@ -509,10 +470,14 @@ export default {
} }
if(cartItem.dishesId==this.dashesData.dishesId){ if(cartItem.dishesId==this.dashesData.dishesId){
if(cartItem.orderDate == this.newDate2){ if(cartItem.orderDate == this.newDate2){
if(cartItem.recipeId==this.menuData.recipeId){
this.$set(this.dashesData, 'quantity', cartItem.quantity) this.$set(this.dashesData, 'quantity', cartItem.quantity)
}else{ }else{
this.$set(this.dashesData, 'quantity', 0) this.$set(this.dashesData, 'quantity', 0)
} }
}else{
this.$set(this.dashesData, 'quantity', 0)
}
} }
}) })
}) })

View File

@ -58,14 +58,14 @@
<view class="right-cont" v-if="item.remanentNum!=0"> <view class="right-cont" v-if="item.remanentNum!=0">
<u-icon v-if="item.quantity > 0" <u-icon v-if="item.quantity > 0"
name="../../static/images/delete.png" name="../../static/images/delete.png"
size="16" size="18"
@click="handleFoodNum(1, item)" @click="handleFoodNum(1, item)"
/> />
<span style="margin: 0 10px;font-size: 28rpx;">{{ item.quantity || 0 }}</span> <span style="margin: 0 10px;font-size: 28rpx;">{{ item.quantity || 0 }}</span>
<u-icon <u-icon
v-if="item.quantity < item.limitNum" v-if="item.quantity < item.limitNum"
name="../../static/images/add.png" name="../../static/images/add.png"
size="16" size="18"
@click="handleFoodNum(2, item)" @click="handleFoodNum(2, item)"
/> />
<u-icon v-if="item.quantity == item.limitNum" name="../../static/images/no-add.png" size="16" /> <u-icon v-if="item.quantity == item.limitNum" name="../../static/images/no-add.png" size="16" />
@ -146,7 +146,7 @@
<u-icon <u-icon
v-if="food.quantity > 0" v-if="food.quantity > 0"
name="../../static/images/del.png" name="../../static/images/del.png"
size="16" size="18"
/> />
</view> </view>
<span class="cont-num">{{ food.quantity || 0 }}</span> <span class="cont-num">{{ food.quantity || 0 }}</span>
@ -439,8 +439,13 @@ export default {
this.$set(cartItem, 'limitNum', food.dishesDetailList[0].limitNum) this.$set(cartItem, 'limitNum', food.dishesDetailList[0].limitNum)
this.$set(cartItem, 'prefPrice', food.dishesDetailList[0].prefPrice) this.$set(cartItem, 'prefPrice', food.dishesDetailList[0].prefPrice)
if(cartItem.orderDate == this.newDate2){// if(cartItem.orderDate == this.newDate2){//
if(cartItem.recipeId==this.recipeId){
this.$set(food, 'quantity', cartItem.quantity) this.$set(food, 'quantity', cartItem.quantity)
this.$set(cartItem,'isDfficacy', 1) // this.$set(cartItem,'isDfficacy', 1) //
}else{
this.$set(food, 'quantity', 0)
this.$set(cartItem,'isDfficacy', 0) //
}
}else{// }else{//
this.$set(food, 'quantity', 0) this.$set(food, 'quantity', 0)
this.$set(cartItem,'isDfficacy', 0) // this.$set(cartItem,'isDfficacy', 0) //

View File

@ -140,11 +140,11 @@ export default {
}) })
let param ={ let param ={
"description":this.description, "description":this.description,
"ordId":this.dishesData.orderId, "orderId":this.dishesData.orderId,
"orderType":this.dishesData.orderType, "orderEvaluaType":this.dishesData.orderType,
// "orderEvaluaType":1, // "orderEvaluaType":1,
"starLevel": this.starLevel, "starLevel": this.starLevel,
"shopstallId":this.dishesData.stallId, "stallId":this.dishesData.stallId,
"detailList":arr, "detailList":arr,
"pictureList":arr2 "pictureList":arr2
} }