<template>
	<view class="allContent">
		<view class="list-item">
			<view><text>车牌号：</text><text>{{state.params['vehiclePlate']}}</text></view>
			<view><text>车牌颜色：</text><text>{{state.params['vehiclePlateColorC']}}</text></view>
			<view v-if="state.params['cardId']"><text>卡号：</text><text>{{state.params['cardId']}}</text></view>
			<view v-if="state.params['obuId']"><text>OBU号：</text><text>{{state.params['obuId']}}</text></view>
			<view><text>订单ID：</text><text>{{state.params['orderId']}}</text></view>
			<view><text>业务类型：</text><text>{{state.params['businessTypeC']}}</text></view>
			<view><text>用户名称：</text><text>{{state.params['customerName']}}</text></view>
			<view><text>是否逾期：</text><text>{{state.params['over']?'逾期':"未逾期"}}</text>
			</view>
			<view><text>状态：</text><text>{{state.params['statusC']}}</text></view>
			<view v-if="state.params['reason']"><text>原因：</text><text>{{state.params['reason']}}</text></view>
			<view><text>申请时间：</text><text>{{state.params['insertTime']}}</text>
			</view>
		</view>
	</view>

</template>

<script setup lang="ts">
	import { reactive } from "vue";
	import { onLoad } from "@dcloudio/uni-app";
	import { ETCProductStatusListQueryDetailsApi } from "@/utils/network/api.js";
	import { request } from "@/utils/network/request.js";
	import { stringToJson } from "@/utils/network/encryption.js";
	const state = reactive({
		params: {},  //上一个页面传递过来的参数
		promoteName: "",  //产品名称
		promoteId: "",//产品编号
		tableData: [],

	});
	onLoad((options) => {
		state.params = JSON.parse(decodeURIComponent(options.params))
		console.log("options.promoteId", state.params)
	})
	const query = () => {
		const options = {
			type: 2,
			data: {
				"promoteId": state.promoteId,
			},
			method: "POST",
			showLoading: true,
		};
		//调用方式
		request(ETCProductStatusListQueryDetailsApi, options).then((res) => {
			state.tableData = stringToJson(res.bizContent)
			console.log("res", state.tableData)
		})
	}
</script>

<style scoped>
	.allContent {
		background-color: #EEF7F7;
		height: 100vh;
		overflow: hidden;
	}

	.list-item {
		width: 95%;
		border-radius: 10rpx;
		margin: 30rpx auto;
		font-size: 28rpx;
		border: 1rpx solid #ccc;
		padding: 12rpx;
		box-sizing: border-box;
		background-color: white;

	}

	.list-item>view {
		margin-bottom: 20rpx;
		display: flex;
		align-items: center;
	}

	.list-item>view>text:first-child {
		width: 26%;
		display: inline-block;
	}

	.list-item>view>text:last-child {
		width: 74%;
		display: inline-block;
		word-break: break-all;
	}
</style>