Jelajahi Sumber

改签调整

gcz 2 minggu lalu
induk
melakukan
f90cbbb751
2 mengubah file dengan 19 tambahan dan 12 penghapusan
  1. 10 3
      center/orderdetails.vue
  2. 9 9
      pages/ticketlist.vue

+ 10 - 3
center/orderdetails.vue

@@ -96,8 +96,9 @@
 					订单信息
 					<view class="btn-box">
 						<text class="btn" v-if="orderDetails.status==3&&orderDetails.allowReSubmit==1" @click="rebook">改签</text>
-						<text class="btn" v-if="orderDetails.status==3" @click="refund">申请退款</text>
+						<text class="btn" v-if="orderDetails.status==3&&orderDetails.ifReSubmit!==1" @click="refund">申请退款</text>
 						<text class="btn" v-if="orderDetails.status==7" @click="invoice">申请发票</text>
+						<text class="btn" v-if="orderDetails.ifReSubmit===1" @click="viewOldOrder">查看原订单</text>
 					</view>
 				</view>
 				<view class="order-info-item" v-for="(item,index) in orderInfo[orderDetails.status]" :key="index">
@@ -116,9 +117,10 @@
 				</view>
 				<view class="order-info-item rebook-info" v-if="orderDetails.resubmit">
 					<text class="til">改签费用</text>
-					<text class="con" v-if="orderDetails.resubmit.diffType==0">补缴¥ {{orderDetails.resubmit.rebookPrice}}</text>
+					<text class="con">{{orderDetails.resubmit.remark }}</text>
+					<!-- <text class="con" v-if="orderDetails.resubmit.diffType==0">补缴¥ {{orderDetails.resubmit.rebookPrice}}</text>
 					<text class="con" v-else-if="orderDetails.resubmit.diffType==1">系统退款¥ {{orderDetails.resubmit.refundPrice}}</text>
-					<text class="con" v-else>¥ {{orderDetails.resubmit.diffPrice}}</text>
+					<text class="con" v-else>¥ {{orderDetails.resubmit.diffPrice}}</text> -->
 				</view>
 			</view>
 			<view class="box order-info refund-list" v-if="orderDetails.refundList&&orderDetails.refundList.length>0">
@@ -721,6 +723,11 @@
 			closeRefundInfo() {
 				this.hideMainQR = false;
 				this.showRefundInfo = false;
+			},
+			viewOldOrder(){
+				uni.$u.route('/center/orderdetails', {
+					id: this.orderDetails.resubmit.orgOrderId
+				});
 			}
 		}
 	}

+ 9 - 9
pages/ticketlist.vue

@@ -193,16 +193,16 @@
 					<view class="inner rebook"  v-if="fromPage=='rebook'">
 						<view class="price-info">
 							<view class="total-price">
-								<text class="price-item">原订单总额:{{originOrderInfo.realPrice}}</text>
-								<text class="price-item">改签总额:{{totalPrice}}</text>
+								<text class="price-item">原订单总额:{{reSubmitInfo.orgRealPrice||originOrderInfo.realPrice}}</text>
+								<text class="price-item" v-if="reSubmitInfo">改签总额:{{reSubmitInfo.realPrice}}</text>
 							</view>
 							<!-- 差价信息 -->
-							<view class="difference">
-								<view class="difference-item" v-if="originOrderInfo.realPrice - totalPrice>0">
-									<text>待退款:{{originOrderInfo.realPrice - totalPrice}}</text>
+							<view class="difference" v-if="reSubmitInfo">
+								<view class="difference-item" v-if="reSubmitInfo.orgRealPrice - reSubmitInfo.realPrice>0">
+									<text>待退款:{{reSubmitInfo.diffPrice}}</text>
 								</view>
-								<view class="difference-item" v-if="originOrderInfo.realPrice - totalPrice<=0">
-									<text>待支付:{{totalPrice - originOrderInfo.realPrice}}</text>
+								<view class="difference-item" v-if="reSubmitInfo.orgRealPrice - reSubmitInfo.realPrice<=0">
+									<text>待支付:{{reSubmitInfo.diffPrice}}</text>
 								</view>
 							</view>
 						</view>
@@ -384,7 +384,7 @@
 				cansubmit: true,
 				newOrderId:'',
 				originOrderInfo:{},
-				resubmitInfo:{},
+				reSubmitInfo:null,
 			}
 		},
 		onShow() {
@@ -470,7 +470,6 @@
 				this.$u.api.orderDetails({id:this.orderId}).then(res=>{
 					console.log('getOrderInfo',res.data);
 					this.originOrderInfo = res.data||{};
-					this.resubmitInfo = res.data.resubmitInfo||{};
 				}).catch(err=>{
 					console.log('getOrderInfo',err);
 				})
@@ -713,6 +712,7 @@
 					// 处理响应数据
 					this.positionData = res.data;
 					this.ticketTypeList = res.data.seatList || [];
+					this.reSubmitInfo = res.data.reSubmitInfo;
 					
 					// 设置默认选中的票档
 					const sellableTicketTypeIndex = this.findFirstSellableTicketTypeIndex();