From 24e49ffa60cc9b138bd0c6ed912a61ecc9f1aa6e Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期六, 19 七月 2025 10:32:14 +0800
Subject: [PATCH] 前端

---
 small-program/pages/order-details/order-details.vue |   62 +++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 3 deletions(-)

diff --git a/small-program/pages/order-details/order-details.vue b/small-program/pages/order-details/order-details.vue
index 9896ee8..c27529e 100644
--- a/small-program/pages/order-details/order-details.vue
+++ b/small-program/pages/order-details/order-details.vue
@@ -188,7 +188,7 @@
 			</view>
 			<view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
 				<view class="btn1" @click="show = false">鎴戝啀鎯虫兂</view>
-				<view class="btn2" @click="show = false">纭鍙栨秷</view>
+				<view class="btn2" @click="cancelDo">纭鍙栨秷</view>
 			</view>
 		</u-modal>
 		
@@ -230,9 +230,9 @@
 				</view>
 				<view class="zhifu-textarea">
 					<image src="/static/icon/ic_pingjia@2x.png" mode="widthFix"></image>
-					<u--textarea placeholder="璇疯璇存偍瀵规湰娆′氦鏄撶殑鎰熷彈" border="none" count></u--textarea>
+					<u--textarea placeholder="璇疯璇存偍瀵规湰娆′氦鏄撶殑鎰熷彈" border="none" v-model="commentInfo" count></u--textarea>
 				</view>
-				<view class="zhifu-botton" style="margin-top: 60rpx;">绔嬪嵆璇勪环</view>
+				<view class="zhifu-botton" style="margin-top: 60rpx;" @click="commentDo">绔嬪嵆璇勪环</view>
 			</view>
 		</u-popup>
 	</view>
@@ -254,6 +254,7 @@
 				bgImg: require('@/static/image/bg_green@2x.png'),
 				id: null,
 				loading:false,
+				commentInfo:'',
 				info: {}, 
 			};
 		},
@@ -264,6 +265,61 @@
 			this.getOrderData()
 		},
 		methods:{
+			commentDo(){
+				var that = this
+				var param = { info: that.commentInfo,level:that.value,orderId: this.id}
+				this.$u.api.comment(param).then(res =>{
+					if(res.code ===200){
+						that.show=false
+						uni.showToast({ title: '璇勪环鎴愬姛', icon: 'error', duration: 2000 });
+						that.getOrderData()
+					}
+				}) 
+			},
+			beginDo(){
+				var that = this
+				var param = { info: that.commentInfo,level:that.value,orderId: this.id}
+				this.$u.api.begin(param).then(res =>{
+					if(res.code ===200){
+						that.show=false
+						uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'error', duration: 2000 });
+						that.getOrderData()
+					}
+				}) 
+			},
+			confirmUpdDo(){
+				var that = this
+				var param = { info: that.commentInfo,level:that.value,orderId: this.id}
+				this.$u.api.confirmUpdDo(param).then(res =>{
+					if(res.code ===200){
+						that.show=false
+						uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'error', duration: 2000 });
+						that.getOrderData()
+					}
+				}) 
+			},
+			acceptDo(){
+				var that = this
+				var param = { info: that.commentInfo,level:that.value,orderId: this.id}
+				this.$u.api.accept(param).then(res =>{
+					if(res.code ===200){
+						that.show=false
+						uni.showToast({ title: '鎶㈠崟鎴愬姛', icon: 'error', duration: 2000 });
+						that.getOrderData()
+					}
+				}) 
+			},
+			cancelDo(){
+				var that = this
+				var param ={ orderId:that.id}
+				this.$u.api.cancelOrder(param).then(res =>{
+					if(res.code ===200){
+						that.show=false
+						uni.showToast({ title: '璁㈠崟鍙栨秷鎴愬姛', icon: 'error', duration: 2000 });
+						that.getOrderData()
+					}
+				 }) 
+			},
 			previemImg(src){
 				uni.previewImage({
 					current: src, // 褰撳墠鏄剧ず鍥剧墖鐨刪ttp閾炬帴

--
Gitblit v1.9.3