<template>
	<view class="page">
		<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
		<view class="listBox" :style="{'padding-top':(pageTop+'px')}">
			<view class="content">
				<view class="my-top">
						<view class="user-info">
						<view class="portrait">
							<image src="../../static/img/head.jpg"></image>
						</view>
						<view class="info">
							<view class="nickname">
								<text>Ssense</text>
							</view>
							<view class="rank">
								<image src="../../static/id.png"></image>
								<text>21216554</text>
								<image class="rank-img" src="../../static/copy.png"></image>
							</view>
						</view>
						</view>
						<view class="user-right">
							<view class="user-right-img"><image src="../../static/btn6.png"></image></view>
							<view class="user-right-text">司机端</view>
						</view>
				</view>
				<view class="coupon-tab">
					<view class="tab" :class="{'action':TabShow===0}" @click="onCouponTab(0)">
						<text>全部</text>
						<text class="line"></text>
					</view>
					<view class="tab" :class="{'action':TabShow===1}" @click="onCouponTab(1)">
						<text>接送中</text>
						<text class="line"></text>
					</view>
					<view class="tab" :class="{'action':TabShow===2}" @click="onCouponTab(2)">
						<text>已完成</text>
						<text class="line"></text>
					</view>
				</view>
				<!-- 订单列表 -->
				<view class="order-list" v-if="TabShow===0">
					<view class="list">
						<view class="title-status">
							<view class="title">
								<text>逝者编号：2321321544</text>
								<image src="../../static/right1.png"></image>
							</view>
							<view class="status">
								<text>接送中</text>
							</view>
						</view>
						<view class="goods-list">
							<view class="goods">
								<view class="item">
									<view class="goods-name">
										<view class="goods-name-title">逝者姓名：张三</view>
										<view class="goods-name-bottom">
											<view>创建时间：2023-05-18 14:54</view>
											<view class="goods-name-bottom-bold"><view>合计<text class="red">¥</text><text class="red big">649</text></view></view>
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="status-btn">
							<view class="btn" @click="driverdetail">
								<image src="../../static/btn8.png" mode="widthFix"></image>
								<text style="color: #3d3d3d;">查看详情</text>
							</view>
							<view class="btn btn-green">
								<image src="../../static/btn7.png" mode="widthFix"></image>
								<text>逝者信息修改</text>
							</view>
							<view class="btn btn-blue">
								<image src="../../static/btn.png" mode="widthFix"></image>
								<text>回车</text>
							</view>
						</view>
					</view>
					
					<view class="list">
						<view class="title-status">
							<view class="title">
								<text>逝者编号：2321321544</text>
								<image src="../../static/right1.png"></image>
							</view>
							<view class="status">
								<text>接送中</text>
							</view>
						</view>
						<view class="goods-list">
							<view class="goods">
								<view class="item">
									<view class="goods-name">
										<view class="goods-name-title">逝者姓名：张三</view>
										<view class="goods-name-bottom">
											<view>创建时间：2023-05-18 14:54</view>
											<view class="goods-name-bottom-bold"><view>合计<text class="red">¥</text><text class="red big">649</text></view></view>
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="status-btn">
							<view class="btn">
								<image src="../../static/btn8.png" mode="widthFix"></image>
								<text style="color: #3d3d3d;">查看详情</text>
							</view>
							<view class="btn btn-green">
								<image src="../../static/btn7.png" mode="widthFix"></image>
								<text>逝者信息修改</text>
							</view>
						</view>
					</view>
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				OrderType: 0,
				TabShow: 0,
				nvConfig: {
					title: "司机端",
					bgColor: "#ffffff",
					color: "#000000",
					fixedAssist: {
						hide: true,
					},
				},
			};
		},
		onPageScroll(e) {
			this.$refs.nv.pageScroll(e)
		},
		computed: {
			pageTop() {
				return parseInt(88 * uni.getSystemInfoSync().windowWidth / 750) + uni.getSystemInfoSync().statusBarHeight
			}
		},
		onLoad(params) {
			this.OrderType = params.type;
		},
		methods: {
			onCouponTab(type){
				this.TabShow = type;
			},
			driverdetail() {
				uni.navigateTo({
					url: '/pages/driverdetail/driverdetail'
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	@import 'driver.scss';
</style>
