<template>
	<view class="order view">
		<view class="status_bar" :style="navHeight"></view>
		<view class="listview" v-if="!isChildCustomer">
			<view class="cell-list">
				<view class="cell-list-block" @click="goOrder('quota')">
					<image class="icon-address" src="@/static/image/order_quota@3x.png" mode="aspectFit"></image>
					<view class="cell-list-block__content">
						<text class="cell-list-block__title">配额酒单</text>
						<!-- <text class="cell-list-block__desc">Wine List</text> -->
					</view>
					<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
				</view>
				<view class="cell-list-block" @click="goOrder('no-quota')">
					<image class="icon-address" src="@/static/image/order_noquota@3x.png" mode="aspectFit"></image>
					<view class="cell-list-block__content">
						<text class="cell-list-block__title">非配额酒单</text>
						<!-- <text class="cell-list-block__desc">Wine List</text> -->
					</view>
					<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
				</view>
				<view class="cell-list-block" @click="goOrder('group-buy')">
					<image class="icon-address" src="@/static/image/order_group@3x.png" mode="aspectFit"></image>
					<view class="cell-list-block__content">
						<text class="cell-list-block__title">公关团购订单</text>
						<!-- <text class="cell-list-block__desc">Group buying List</text> -->
					</view>
					<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
				</view>
			</view>
		</view>
		<view v-else class="no-list">
			暂无功能
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'


	export default {
		data() {
			return {

			}
		},
		computed: {
			navHeight() {
				return {
					'height': `${this.sysinfo.safeArea.top + 44}px`
				}
			},
			...mapState(['sysinfo','isChildCustomer'])
		},
		methods: {
			goOrder(type) {
				uni.navigateTo({
					url: `/pages/${type}/${type}`
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.view {
		flex-direction: column;
	}

	/* #ifndef APP-PLUS */
	page {
		width: 100%;
		min-height: 100%;
		display: flex;
		background: #fff;
	}

	.status_bar {
		height: var(--status-bar-height);
	}

	/* #endif */

	.order {
		flex: 1;
		background: #fff;
		padding: 0 32rpx;
	}

	.listview {
		flex: 1;
		flex-direction: column;
		padding-top: 64rpx;
	}

	.cell-list {
		flex-direction: column;
	}

	.icon-address {
		width: 88rpx;
		height: 88rpx;
		margin-right: 24rpx;
	}

	.cell-list-block__content {
		display: flex;
		flex: 1;
		flex-direction: column;
	}

	.cell-list-block__title {
		color: #333;
		font-size: 28rpx;
		font-weight: 500;
		flex: 1;
		align-items: center;
		margin-bottom: 4rpx;
	}

	.cell-list-block__desc {
		color: #acacac;
		font-size: 12px;
	}

	.icon-arrow {
		width: 12rpx;
		height: 20rpx;
	}

	.cell-list-block {
		display: flex;
		height: 77px;
		margin-bottom: 24rpx;
		background: #f8f9fa;
		border-radius: 8px;
		padding: 0 36rpx 0 16rpx;
		align-items: center;
	}
	.no-list{
		font-weight: 600;
		font-size: 14px;
	}
</style>
