Browse Source

一证多票修改

gcz 11 months ago
parent
commit
cc24dfc87b
2 changed files with 15 additions and 5 deletions
  1. 2 2
      center/refundselect.vue
  2. 13 3
      pages/bookticket.vue

+ 2 - 2
center/refundselect.vue

@@ -24,7 +24,7 @@
 								<view class="idcard">身份证号:{{item.idcard}}</view>
 							</view>
 							<view class="right">
-								¥ {{item.salePrice}}
+								¥ {{item.viewerSalePrice}}
 							</view>
 						</view>
 					</view>
@@ -99,7 +99,7 @@
 				return this.dataList.reduce((total, item) => {
 					if (item.checked) {
 						let price = null;
-						price = item.salePrice
+						price = item.viewerSalePrice
 						total += price;
 					}
 					return total;

+ 13 - 3
pages/bookticket.vue

@@ -218,9 +218,12 @@ import {
 			totalPrice() {
 				let that = this;
 				return this.visitors.reduce((total, item) => {
-					let price = null;
-					price = Number(that.pageData.salePrice);
-					total += price;
+					let price = Number(that.pageData.salePrice);
+					if(this.pageContent.personnelNum!==0){
+						total = price
+					}else{
+						total += price;
+					}
 					return total;
 				}, 0).toFixed(2);
 			},
@@ -285,6 +288,13 @@ import {
 					// console.log('getMemberAll',res.data);
 					this.visitorList = res.data.list;
 					// this.visitors = this.visitorList.filter(obj => obj.memberId==userId);
+			
+					this.selectedVisitor = [];
+					this.visitorList.forEach(visitor => {
+					    if (this.visitors.find(item => item.idcard === visitor.idcard)) {
+					        this.selectedVisitor.push(visitor.idcard);
+					    }
+					});
 					this.visitors = this.visitorList.filter(obj => that.selectedVisitor.includes(obj.idcard));
 					console.log('this.visitorList',this.visitorList);
 					console.log('this.selectedVisitor',this.selectedVisitor);