Browse Source

订单修改

twt 1 year ago
parent
commit
f387c864f3
1 changed files with 77 additions and 3 deletions
  1. 77 3
      pages/user/myOrder/activityOrderDetail.vue

+ 77 - 3
pages/user/myOrder/activityOrderDetail.vue

@@ -79,7 +79,25 @@
 
 		<!-- 订单内容 -->
 		<view class="information">
-			<view class="detailedTitle">订单内容</view>
+			<view class="detailedTitle">订单内容
+			 <view class="groupStateBox " v-if="orderData.data.groupState==4">
+				 <image src="../../../static/img/icon_selectY.png" mode="" class="groupStateIcon"></image>
+				 <view class="groupStateTxt">自动成团</view>
+			 </view>
+			 <view class="groupStateBox " v-if="orderData.data.groupState==3">
+				 <image src="../../../static/img/icon_selectY.png" mode="" class="groupStateIcon"></image>
+				 <view class="groupStateTxt">拼团成功</view>
+			 </view>
+			 <view class="groupStateBox " v-if="orderData.data.groupState==1">
+				 <image src="../../../static/img/icon_del_red.png" mode="" class="groupStateIcon"></image>
+				 <view class="groupStateTxt">拼团失败</view>
+			 </view>
+			 <view class="groupStateBox " v-if="orderData.data.groupState==0">
+				 <image src="../../../static/img/icon_del_red.png" mode="" class="groupStateIcon"></image>
+				 <view class="groupStateTxt">拼团取消</view>
+			 </view>
+			</view>
+			
 			
 			<view v-if="orderData.openSheetDetail.length>0" v-for="(item,index) in orderData.openSheetDetail" :key="index">
 				<view class="informationLine2">
@@ -183,10 +201,13 @@
 		<view style="height: 50rpx;background-color: #F4F5F7;"></view>
 
 		<view class="bottom" v-if="orderData.data.sheetState == 1">
-
-			<view class="cancel" @click="cancelBespeak">取消订单</view>
+            <view class="cancel" @click="cancelOrder" v-if="orderData.data.groupType==1">取消订单</view>
+			<view class="cancel" @click="cancelBespeak" v-if="orderData.data.groupType!=1">取消订单</view>
 			<view class="defer" :style="{border:'1rpx solid #'+themeColor,color:'#'+themeColor}" @click="pay">立即支付</view>
 		</view>
+		<view class="bottom" v-if="orderData.data.sheetState == 2||orderData.data.sheetState == 5">
+		    <view class="cancel" @click="cancelOrder" v-if="orderData.data.groupType==1">取消订单</view>
+		</view>
 
 
 		<!-- 券码 -->
@@ -462,6 +483,45 @@
 
 
 				})
+			},
+			cancelOrder(){
+				var that = this
+				uni.showModal({
+				    title: '提示',
+				    content: '是否取消该订单',
+					cancelText:'否',
+					confirmText:'是',
+				    success: function (res) {
+				        if (res.confirm) {
+							
+								uni.showLoading({
+									title: '加载中'
+								})
+								
+								that.$http('openMallOrder/cancelOrder', {
+							        realMoney:that.orderData.data.realMoney,
+									sheetId: that.id,
+							
+								}, 'POST').then(res => {
+									uni.hideLoading();
+									// var list = res.data.Items
+									
+									uni.showToast({
+										title: '取消成功',
+										icon: 'none',
+										duration: 2000
+									});
+									setTimeout(function() {
+										that.getData();
+									}, 1000);
+								})
+							
+				          
+				        } else if (res.cancel) {
+				           
+				        }
+				    }
+				});
 			},
 			cancelBespeak(){
 				var that = this
@@ -620,6 +680,20 @@
 </script>
 
 <style scoped>
+.groupStateIcon{
+	width: 28rpx;height: 28rpx;
+}
+.groupStateTxt{
+	font-weight: 400;padding-left: 8rpx;
+	color: #3C3C3C;line-height: 28rpx;
+	font-size: 26rpx;
+}
+.groupStateBox{
+	display: flex;
+}
+.detailedTitle{
+	display: flex;justify-content: space-between;
+}
 .grouptk{
 	width: 638rpx;
 	height: 750rpx;