<template>
	<view>
		<view class="top-tip">
			<image :src="`${$imgUrl}issuance/vehicle1.png`" mode=""></image>
			<view>
				<view style="margin-bottom: 6rpx;">使用场景</view>
				<view>需要变更车辆信息，包括信息修改及车牌变更。</view>
			</view>
		</view>
		<view class="bg" style="margin-top: -10rpx;">
			<view class="title"> 需要准备的材料 </view>
			<view class="cailiao">
				<view class="list" v-for="(item,index) in list" :key="index">
					<view>{{item.name}}</view>
					<view class="tip">{{item.tip}}</view>
					<image class="icon" :src="`${$imgUrl}${item.img}`"
						:style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
					</image>
				</view>
			</view>
		</view>
	</view>
	
	<view class="bg">
		<view class="title"> 办理流程 </view>
		<view class="dot_wrap">
			<view class="dot_wrap_left">
				<text class="dot"></text>
				<text class="line"></text>
				<text class="dot"></text>
				<text class="line"></text>
				<text class="dot"></text>
				<text class="line"></text>
				<text class="dot"></text>
				<text class="line"></text>
				<text class="dot"></text>
				<text class="line"></text>
				<text class="dot"></text>
			</view>
			<view class="dot_wrap_right">
				<view class="item">
					<image :src="`${$imgUrl}issuance/ydy1.png`"></image>
					<view class="destion">
						<view class="destion1">选择变更车辆</view>
						<view class="destion2">辅助说明。</view>
					</view>
					<image :src="`${$imgUrl}issuance/ydy2.png`"></image>
				</view>
				<view class="item">
					<image :src="`${$imgUrl}issuance/ydy3.png`"></image>
					<view class="destion">
						<view class="destion1">选择变更类型</view>
						<view class="destion2">辅助说明</view>
					</view>
					<image :src="`${$imgUrl}issuance/ydy4.png`"></image>
				</view>
				<view class="item">
					<image :src="`${$imgUrl}issuance/ydy5.png`"></image>
					<view class="destion">
						<view class="destion1">设备预检</view>
						<view class="destion2">辅助说明</view>
					</view>
				</view>
				<view class="item">
					<image :src="`${$imgUrl}issuance/ydy6.png`"></image>
					<view class="destion">
						<view class="destion1">资料提交</view>
						<view class="destion2">根据实际使用和购买产品产生。</view>
					</view>
				</view>
				<view class="item">
					<image :src="`${$imgUrl}issuance/ydy9.png`"></image>
					<view class="destion">
						<view class="destion1">资料审核</view>
						<view class="destion2">辅助说明</view>
					</view>
				</view>
				<view class="item" style="margin-bottom: 0;">
					<image :src="`${$imgUrl}issuance/ydy7.png`"></image>
					<view class="destion">
						<view class="destion1">设备升级</view>
						<view class="destion2">辅助说明</view>
					</view>
					<image :src="`${$imgUrl}issuance/ydy8.png`"></image>
				</view>
			</view>
		</view>
	</view>
	<view class="action">
		<button type="default" class="ui-btn" @click="savaHandle()">
			车辆信息变更
		</button>
		<button type="default" class="ui-btn-normal" @click="progressQuery()">
			进度查询
		</button>
	</view>
</template>

<script setup lang="ts">
	import {navTo} from "@/utils/utils";
	import {reactive,ref} from "vue";
	import {onLoad} from "@dcloudio/uni-app";
	const state = reactive({
		isVehiclePlateChange: 0,
		vehicleId:"",
	});
    const list=ref([
		{'name':"申请人身份证正面",'img':"issuance/sfz.png"},
		{'name':"车辆行驶证",'img':"issuance/xz.png"},
		{'name':"委托书",'img':"issuance/weituo.png","tip":"（非本人办理必传）"},
		{'name':"道路运输许可证",'img':"issuance/dlysxkz.png","tip":"（牵引车必传）"},
		{'name':"单位授权书",'img':"issuance/weituo.png","tip":"（单位必传）"},
		{'name':"营业执照",'img':"issuance/zhizhaoNew.png","tip":"（单位必传）"},
	])
	onLoad((options) => {
		state.vehicleId=options.vehicleId
		state.isVehiclePlateChange=options.isVehiclePlateChange
		
		console.log("options",options)
	})
	const savaHandle = () => {
		if(state.isVehiclePlateChange==1){
			navTo(`/subpackage/personal-center/vehicle-change/vehicle-change-chepai?vehicleId=${state.vehicleId}&isVehiclePlateChange=${state.isVehiclePlateChange}`)
		}else{
			navTo(`/subpackage/personal-center/vehicle-change/vehicle-change-cheliangmsg-write?vehicleId=${state.vehicleId}&isVehiclePlateChange=${state.isVehiclePlateChange}`)
		}
	}
	const progressQuery = () => {
	}
	
</script>

<style lang="scss" scoped>
	.bg {
		background-color: white;
		width: 88%;
		margin: 0 auto;
		margin-top: 20rpx;
		border-radius: 12px;
		border: 1px solid #FFFFFF;
		padding: 20rpx;
		overflow: hidden;

		.title {
			font-weight: 400;
			font-size: 30rpx;
			color: #01243A;
		}

		.dot_wrap {
			display: flex;
			margin: 30rpx 0;

			.dot_wrap_left {
				display: flex;
				flex-direction: column;
				align-items: center;
				margin-right: 20rpx;
				margin-top: 20rpx;

				.dot {
					width: 24rpx;
					height: 24rpx;
					background: #01243A;
					border-radius: 50%;
				}

				.line {
					height: 126rpx;
					background-color: transparent;
					border-left: 2rpx dashed #01243A;
				}
			}

			.dot_wrap_right {
				.item {
					background: #F7F7F7;
					border-radius: 12rpx;
					height: 120rpx;
					display: flex;
					padding: 10rpx 20rpx;
					box-sizing: border-box;
					width: 600rpx;
					margin-bottom: 30rpx;

					.destion {
						margin: 0 60rpx 0 20rpx;
						font-weight: 400;

						.destion1 {
							font-size: 28rpx;
							color: #01243A;
						}

						.destion2 {
							font-size: 22rpx;
							color: #999999;
							line-height: 50rpx;
						}
					}

					image {
						width: 46rpx;
						height: 47rpx;
					}
				}
			}
		}

		.cailiao {
			width: 100%;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;

			.list {
				width: 48%;
				margin-top: 30rpx;
				.tip{
					font-size: 22rpx;
					color: #999999;
				}
				view {
					text-align: center;
					margin-bottom: 15rpx;
					font-size: 28rpx;
					color: #01243A;
				}

				.icon {
					width: 100%;
					height: 190rpx;
					background-image: var(--bgimg);
					background-size: 100% 100%;
					background-repeat: no-repeat;
				}
			}
		}
	}

	.action {
		position: absolute;
		left: 0;
		height: 270rpx;
		background-color: #fff;
		border-radius: 30rpx 30rpx 0 0;
		width: 100vw;
		display: flex;
		align-items: center;
		justify-content: space-evenly;
		flex-direction: column;
		margin-top: 20rpx;
	}
	.top-tip{
		background: linear-gradient(88deg, #CCB375 0%, #E7D398 100%);
		border-radius: 12rpx 12rpx 0 0;
		color: white;
		height: 90rpx;
		width: 88%;
		margin: 0 auto;
		padding: 30rpx 20rpx;
		margin-top: 30rpx;
		display: flex;
		font-size: 26rpx;
		color: #FFFFFF;
		image{
			width: 34rpx;
			height: 34rpx;
			margin: 0 10rpx 0 20rpx;
		}
	}
</style>