From 9415bda2e97802eaa9abd2d139becc621e13acd9 Mon Sep 17 00:00:00 2001
From: zzyuan <781948537@qq.com>
Date: Wed, 4 Jun 2025 10:10:33 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E5=AE=9A=E9=A4=90=E5=8F=82=E6=95=B0?=
 =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 api/order/index.js                |   4 +-
 pages/advanceOrder/dishDetail.vue | 135 +++++++++++-------------------
 pages/advanceOrder/index.vue      |  15 ++--
 pages/work/evaluate.vue           |   6 +-
 4 files changed, 65 insertions(+), 95 deletions(-)
diff --git a/api/order/index.js b/api/order/index.js
index c30db03..2ce3dbb 100644
--- a/api/order/index.js
+++ b/api/order/index.js
@@ -51,7 +51,7 @@ export function getOrderInfoAPI(data) {
  */
 export function addMenuEvaluaOrderApi(data) {
   return request({
-    url: '/smart-canteen/menu_evalua_order',
+    url: '/smart-canteen/cook_evalua_order',
     method: 'post',
     data
   })
@@ -63,7 +63,7 @@ export function addMenuEvaluaOrderApi(data) {
  */
 export function getPageEvaluateListApi(data) {
   return request({
-    url: '/smart-canteen/menu_evalua_order/list',
+    url: '/smart-canteen/cook_evalua_order/list',
     method: 'get',
 	params: data
   })
diff --git a/pages/advanceOrder/dishDetail.vue b/pages/advanceOrder/dishDetail.vue
index 71320dd..90fa96f 100644
--- a/pages/advanceOrder/dishDetail.vue
+++ b/pages/advanceOrder/dishDetail.vue
@@ -2,7 +2,7 @@
 	
 	
 		 
-			 
+			 
 		
 		
 				
@@ -246,7 +201,7 @@
 									
 								
 								{{ food.quantity || 0 }}
@@ -324,15 +279,16 @@ export default {
 	methods: {
 		//获取菜品详情
 		async getMenudishesDetail(){
-			let param = {
-				"userId": uni.getStorageSync('userId') ,
-				"detailId": this.menuData.recipeDetailId,
-				"baseDishesId": this.menuData.baseDishesId,
-				// "delFlag": 2
-			}
-			const res = await getMenudishesDetailAPI(param)
-			if(res.code==200){
-				this.dashesData = res.data;
+			// let param = {
+			// 	"userId": uni.getStorageSync('userId') ,
+			// 	"detailId": this.menuData.recipeDetailId,
+			// 	"baseDishesId": this.menuData.baseDishesId,
+			// 	// "delFlag": 2
+			// }
+			// const res = await getMenudishesDetailAPI(param)
+			// if(res.code==200){
+				// this.dashesData = res.data;
+				this.dashesData = this.menuData;
 				if(this.dashesData.materialList&&this.dashesData.materialList.length>0){
 					let arr1=[]
 					let arr2=[]
@@ -355,8 +311,8 @@ export default {
 				this.$set(this.dashesData, 'prefPrice', this.dashesData.dishesDetailList[0].prefPrice)
 				this.$set(this.dashesData, 'dishesId', this.dashesData.dishesDetailList[0].dishesId)
 				this.$forceUpdate() 
-			}
-			console.log(res,'获取菜品详情') 
+			// }
+			// console.log(res,'获取菜品详情') 
 		},
 		async getMenuEvaluaCount() {
 			let param = { 
@@ -466,7 +422,7 @@ export default {
 					menuItem.typeList.forEach(detail => {
 						detail.dishesList.forEach(food => {
 							this.shoppingCartList.forEach(cartItem=>{
-								if(food.dishesId==cartItem.goodsId){ 
+								if(food.dishesId==cartItem.goodsId){
 										let obj = {
 											"detailType": food.detailType,  
 											"goodsId": cartItem.goodsId,
@@ -500,8 +456,13 @@ export default {
 										this.$set(cartItem, 'limitNum', food.dishesDetailList[0].limitNum)
 										this.$set(cartItem, 'prefPrice', food.dishesDetailList[0].prefPrice)
 										if(cartItem.orderDate == this.newDate2){//存在且时间一致
-											this.$set(food, 'quantity', cartItem.quantity)
-											this.$set(cartItem,'isDfficacy', 1) //有效
+											if(cartItem.recipeId==this.menuData.recipeId){
+												this.$set(food, 'quantity', cartItem.quantity)
+												this.$set(cartItem,'isDfficacy', 1) //有效
+											}else{
+												this.$set(food, 'quantity', 0)
+												this.$set(cartItem,'isDfficacy', 0) //失效
+											}
 										}else{//日期不一致
 											this.$set(food, 'quantity', 0)
 											this.$set(cartItem,'isDfficacy', 0) //失效
@@ -509,7 +470,11 @@ export default {
 								}
 								if(cartItem.dishesId==this.dashesData.dishesId){
 									if(cartItem.orderDate == this.newDate2){
-										this.$set(this.dashesData, 'quantity', cartItem.quantity)
+										if(cartItem.recipeId==this.menuData.recipeId){
+											this.$set(this.dashesData, 'quantity', cartItem.quantity)
+										}else{ 
+											this.$set(this.dashesData, 'quantity', 0)
+										} 
 									}else{
 										this.$set(this.dashesData, 'quantity', 0)
 									}
diff --git a/pages/advanceOrder/index.vue b/pages/advanceOrder/index.vue
index 0df65d5..72a364c 100644
--- a/pages/advanceOrder/index.vue
+++ b/pages/advanceOrder/index.vue
@@ -58,14 +58,14 @@
 							
 								
 								{{ item.quantity || 0 }}
 								
 								
@@ -146,7 +146,7 @@
 								
 							
 							{{ food.quantity || 0 }}
@@ -439,8 +439,13 @@ export default {
 								this.$set(cartItem, 'limitNum', food.dishesDetailList[0].limitNum)
 								this.$set(cartItem, 'prefPrice', food.dishesDetailList[0].prefPrice)
 								if(cartItem.orderDate == this.newDate2){//存在且时间一致
-									this.$set(food, 'quantity', cartItem.quantity)
-									this.$set(cartItem,'isDfficacy', 1) //有效
+									if(cartItem.recipeId==this.recipeId){
+										this.$set(food, 'quantity', cartItem.quantity)
+										this.$set(cartItem,'isDfficacy', 1) //有效
+									}else{
+										this.$set(food, 'quantity', 0)
+										this.$set(cartItem,'isDfficacy', 0) //失效
+									} 
 								}else{//日期不一致
 									this.$set(food, 'quantity', 0)
 									this.$set(cartItem,'isDfficacy', 0) //失效
diff --git a/pages/work/evaluate.vue b/pages/work/evaluate.vue
index e4d027a..9c74c5f 100644
--- a/pages/work/evaluate.vue
+++ b/pages/work/evaluate.vue
@@ -140,11 +140,11 @@ export default {
 				})
 				let param ={
 					"description":this.description,
-					"ordId":this.dishesData.orderId,
-					"orderType":this.dishesData.orderType,
+					"orderId":this.dishesData.orderId,
+					"orderEvaluaType":this.dishesData.orderType,
 					// "orderEvaluaType":1,
 					"starLevel": this.starLevel,
-					"shopstallId":this.dishesData.stallId,
+					"stallId":this.dishesData.stallId,
 					"detailList":arr,
 					"pictureList":arr2
 				}