guo 2 lat temu
rodzic
commit
433626396f

+ 266 - 6
pages/myOrder/activityOrderDetail.vue

@@ -170,7 +170,9 @@
 
 		</view>
 		<!-- 待服务 -->
-		<view class="bottom" v-if="orderData.data.sheetState == 2">
+		<view class="bottom" v-if="orderData.data.sheetState == 2">
+			<view v-if="(iOSInfo.indexOf('Q030')!=-1||!iOSInfo) && (orderData.data.payType==2) && (orderData.data.writeoffState==1)" class="cancel" @click="cancelBespeak">取消订单</view>
+			<view v-if="(iOSInfo.indexOf('Q031')!=-1||!iOSInfo) && (orderData.data.payType==1) && (orderData.data.payState==2)" class="defer" @click="isShowTui=true">退款</view>
 			<view v-if="iOSInfo.indexOf('Q032')!=-1||!iOSInfo" class="defer" @click="goHeXiao">核销</view>
 
 		</view>
@@ -205,7 +207,63 @@
 			</view>
 		</view>
 
-
+		<!-- 退款原因 -->
+		<view class="tuikuanBox" v-if="isShowTui==true">
+			<view class="tuikuan">
+				<view class="tuiTop">
+					<view class="tuiTitle">退款</view>
+					<image @click="isShowTui=false" src="../../static/img/icon_close.png" mode=""
+						style="width: 26rpx; height: 26rpx;"></image>
+		
+				</view>
+				<view class="contLine">
+					<view class="contlineLeft">
+						<image src="../../static/img/icon_star.png" mode="" class="star"></image>
+						退款原因
+					</view>
+					<view class="contlineRight carModelRight" @click="">
+		
+						<picker class="carModel" @change="bindChange" mode="selector" :value="index"
+							:range="tuicauseList" range-key="contents">
+							<view class="uni-input">{{tuicauseList[index].contents}}</view>
+							<!-- <view class="uni-input noColor" v-else>请选择</view> -->
+						</picker>
+						<image src="../../static/img/little_rightArrow.png" mode="" class="contlineRightJt"></image>
+					</view>
+				</view>
+		
+				<view class="contLine">
+					<view class="contlineLeft">
+						<image src="../../static/img/icon_star.png" mode="" class="star"></image>
+						退款金额
+					</view>
+					<view class="contlineRight carModelRight" @click="cktime">
+						<span class="carModel">{{orderData.data.realMoney}}</span>
+		
+					</view>
+				</view>
+		
+				<view class="contLine">
+					<view class="contlineLeft">
+						<image src="" mode="" class="star"></image>
+						补充描述
+					</view>
+		
+					<view class="contlineRight">
+						<textarea placeholder-style="color:#999999" placeholder="请输入" v-model="tuikuanContent"
+							class="contlineRightInput" maxlength="-1" auto-height="true" @confirm="feedDone" />
+					</view>
+				</view>
+		
+				<view class="tuiBtns">
+					<view class="btn" @click="isShowTui=false">取消</view>
+					<view class="btn2" @click="goTui">确认退款</view>
+				</view>
+		
+			</view>
+		</view>
+		
+		
 	</view>
 </template>
 
@@ -240,7 +298,11 @@
 				lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
 				src: '', // 二维码生成后的图片地址或base64
 				isShowMa: false,
-				quanMaList: [],
+				quanMaList: [],
+				isShowTui: false,
+				tuicauseList: [],
+				tuikuanContent: '',
+				index: 0,
 				iOSInfo:'',
 			}
 		},
@@ -251,7 +313,9 @@
 
 			if (this.id) {
 				this.getData()
-			}
+			}
+			this.getTuiKuanData()
+			
 			var qxnum = uni.getStorageSync("quanxian");
 			if (qxnum == 1) {
 				this.iOSInfo = JSON.parse(JSON.stringify(window.iOSInfo));
@@ -260,7 +324,59 @@
 		},
 
 
-		methods: {
+		methods: {
+			goTui() {
+			
+				let yuanyin = this.tuicauseList[this.index].contents
+				if (!yuanyin) {
+					uni.showToast({
+						title: '请选择退款原因',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
+			
+				uni.showLoading({
+					title: '加载中'
+				})
+				var that = this
+				this.$http('openH5Indent/reimburse', {
+			
+					id: this.id,
+					refundReason: yuanyin,
+					refundComment: this.tuikuanContent,
+					realMoney: this.orderData.data.realMoney
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					// var list = res.data.Items
+					// var list = res.data
+					console.log("result+=", res);
+					if (res.code == 0) {
+						that.isShowTui = false
+						uni.showToast({
+							title: '退款成功',
+							icon: 'none',
+							duration: 2000
+						});
+						setTimeout(function() {
+							that.getData();
+						}, 1000);
+					}
+			
+			
+				})
+			
+			},
+			bindChange(e) {
+				console.log(e);
+				this.index = e.detail.value
+			
+			},
+			feedDone(e) {
+				this.tuikuanContent = e.target.value
+			
+			},
 			// 核销
 			goHeXiao() {
 
@@ -280,6 +396,20 @@
 					window.android.postMessage()
 				}
 
+			},
+			getTuiKuanData() {
+				uni.showLoading({
+					title: '加载中'
+				});
+			
+				this.$http('openH5Indent/getOpenReason', {
+			
+					// id: this.id,
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					this.tuicauseList = res.data;
+			
+				})
 			},
 			goDetail(id) {
 				console.log('id--', id);
@@ -287,7 +417,8 @@
 
 					url: '../addjk/activityDetail?id=' + id
 				})
-			},
+			},
+			
 			pay() {
 				this.$http('openMallOrder/unifiedPay', {
 					sheetId: this.id
@@ -984,5 +1115,134 @@
 		width: 400rpx;
 		height: 400rpx;
 		margin-left: 86rpx;
+	}
+	
+	.tuikuanBox {
+		width: 100%;
+		height: 100vh;
+		background: rgba(0, 0, 0, 0.4);
+		position: fixed;
+		left: 0;
+		top: 0;
+		z-index: 999;
+	}
+	
+	.tuikuan {
+		width: 638rpx;
+		height: 664rpx;
+		background: #ffffff;
+		margin: 0 36rpx;
+		margin-top: 50%;
+		border-radius: 24rpx;
+		padding: 30rpx 20rpx;
+	}
+	
+	.tuiTop {
+		display: flex;
+		justify-content: space-between;
+		margin-bottom: 36rpx;
+	}
+	
+	.tuiTitle {
+		width: 56rpx;
+		height: 40rpx;
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #3C3C3C;
+		line-height: 40rpx;
+	
+	}
+	
+	.contLine {
+		display: flex;
+		justify-content: space-between;
+		font-size: 28rpx;
+		padding: 30rpx 0;
+		border-bottom: 1px solid #EEEEEE;
+	}
+	
+	.contlineLeft {
+		color: #666666;
+		line-height: 40rpx;
+		align-items: center;
+	}
+	
+	.star {
+		width: 14rpx;
+		height: 14rpx;
+		padding-bottom: 5rpx;
+	}
+	
+	.carModel {
+		width: 350rpx;
+		text-align: left;
+	}
+	
+	.noColor {
+		color: #CCCCCC;
+	}
+	
+	.carModelRight {
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+	}
+	
+	.contlineRight {
+		color: #333333;
+		line-height: 40rpx;
+	
+		width: 400rpx;
+		text-align: right;
+	}
+	
+	.contlineRightInput {
+		color: #333333;
+		text-align: left;
+		font-size: 28rpx;
+		min-height: 182rpx;
+		width: 400rpx;
+	}
+	
+	.contlineRightJt {
+		width: 30rpx;
+		height: 30rpx;
+	
+	}
+	
+	.tuiBtns {
+		display: flex;
+		padding: 40rpx 20rpx 10rpx;
+	
+	}
+	
+	.btn {
+		width: 288rpx;
+		height: 98rpx;
+		background: #F4F5F7;
+		border-radius: 10rpx;
+		margin-right: 22rpx;
+	
+	
+		font-size: 30rpx;
+		font-weight: 500;
+		color: #3C3C3C;
+		line-height: 98rpx;
+		text-align: center;
+	}
+	
+	.btn2 {
+		width: 288rpx;
+		height: 98rpx;
+		background: #3F90F7;
+		border-radius: 10rpx;
+	
+	
+	
+		font-size: 30rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+		line-height: 98rpx;
+		text-align: center;
 	}
 </style>

+ 40 - 1
pages/myOrder/paintOrderDetail.vue

@@ -176,8 +176,13 @@
 		</view>
 		<!-- 待服务 -->
 		<view class="bottom" v-if="orderData.data.sheetState == 2">
+			<view v-if="(iOSInfo.indexOf('Q030')!=-1||!iOSInfo) && orderData.data.payType==2" class="cancel" @click="cancelBespeak">取消订单</view>
 			<view v-if="(iOSInfo.indexOf('Q031')!=-1||!iOSInfo) && orderData.data.payType==1" class="defer" @click="isShowTui=true">退款</view>
-			<view v-if="iOSInfo.indexOf('Q032')!=-1||!iOSInfo" class="defer" @click="goHeXiao">核销</view>
+			<view v-if="(orderData.data.payType==2) && (orderData.data.payState==1)" class="defer" @click="payDone">支付完成</view>
+			<!-- 在线支付 -->
+			<view v-if="(iOSInfo.indexOf('Q032')!=-1||!iOSInfo) && (orderData.data.payType==1)" class="defer" @click="goHeXiao">核销</view>
+			<!-- 线下支付 -->
+			<view v-if="(iOSInfo.indexOf('Q032')!=-1||!iOSInfo) && (orderData.data.payType==2) && (orderData.data.payState==2)" class="defer" @click="goHeXiao">核销</view>
 			<!-- <view v-if="iOSInfo.indexOf('Q033')!=-1||!iOSInfo" class="defer" @click="">开单</view> -->
 			<!-- <view v-if="iOSInfo.indexOf('Q034')!=-1||!iOSInfo" class="defer" @click="">开卡</view> -->
 			
@@ -329,6 +334,40 @@
 		
 
 		methods: {
+			payDone(){
+				var that = this
+				uni.showModal({
+				    title: '提示',
+				    content: '确认已支付完成吗',
+					
+				    success: function (res) {
+				        if (res.confirm) {
+							
+								uni.showLoading({
+									title: '加载中'
+								})
+								
+								that.$http('openH5Indent/complete', {
+							
+									id: that.id,
+							
+								}, 'POST').then(res => {
+									uni.hideLoading();
+									// var list = res.data.Items
+									
+									
+									setTimeout(function() {
+										that.getData();
+									}, 1000);
+								})
+							
+				          
+				        } else if (res.cancel) {
+				           
+				        }
+				    }
+				});
+			},
 			goTui(){
 				
 				let yuanyin = this.tuicauseList[this.index].contents