2 次代碼提交 6cbfa7a77b ... ff23a923a0

作者 SHA1 備註 提交日期
  LiChengjin ff23a923a0 opt:续住、退房页面增加显示早餐数量 2 月之前
  LiChengjin 9aa3641752 opt:订单详情页面房间号后增加早餐数量显示 2 月之前
共有 2 個文件被更改,包括 15 次插入4 次删除
  1. 12 3
      subpkg/extend/extend.vue
  2. 3 1
      subpkg/orderDetail/orderDetail.vue

+ 12 - 3
subpkg/extend/extend.vue

@@ -47,7 +47,12 @@
 					</view>
 				</view>
 				<view class="day-num">
-					<u-text :text="dayNumText" color="#333333" size="15" bold></u-text>
+					<view>
+						<u-text :text="dayNumText" color="#333333" size="15" bold></u-text>
+					</view>
+					<view>
+						<u-text :text="breakfastNumText" color="#333333" size="15" bold></u-text>
+					</view>
 				</view>
 			</view>
 			<view class="guest-info">
@@ -131,7 +136,10 @@
 		},
 		computed: {
 			...mapState('m_user', ['userInfo']),
-			...mapState('m_business', ['currentHotel'])
+			...mapState('m_business', ['currentHotel']),
+			breakfastNumText() {
+				return this.checkinInfo.breakfastNum ? `含${this.checkinInfo.breakfastNum}早` : '不含早'
+			}
 		},
 		methods: {
 			...mapMutations('m_business', ['updateCheckinInfo']),
@@ -517,8 +525,9 @@
 
 		.day-num {
 			display: flex;
+			flex-direction: column;
 			align-items: center;
-			justify-content: space-between;
+			justify-content: space-around;
 		}
 	}
 

+ 3 - 1
subpkg/orderDetail/orderDetail.vue

@@ -39,7 +39,7 @@
 		</view>
 		<view class="info-item">
 			<u-text text="房间号:"></u-text>
-			<u-text :text="orderInfo.room" align="right"></u-text>
+			<u-text :text="orderInfo.room+'('+orderInfo.breakfastNum+')'" align="right"></u-text>
 		</view>
 		<view class="info-item">
 			<u-text text="开始日期:"></u-text>
@@ -121,6 +121,8 @@
 					.paymentTime).format('YYYY-MM-DD HH:mm:ss')
 				this.orderInfo.status = this.status[this.orderInfo.status]
 				this.orderInfo.paymentStatus = this.paymentStatus[this.orderInfo.paymentStatus]
+				this.orderInfo.breakfastNum = this.orderInfo.breakfastNum === undefined ? 0 : this.orderInfo
+					.breakfastNum
 			},
 			async deleteOrder() {
 				let res = await uni.$http.delete('/hotelOrder/' + this.orderInfo.id)