<template>
	<view class="wrap">
		<view class="item last">
			<text>状态：</text>
			<uni-data-select v-model="state.status" :localdata="state.statusData"
				@change="statusChange"></uni-data-select>
		</view>
		<view class="item last">
			<text>订单类型：</text>
			<uni-data-select v-model="state.orderType" :localdata="state.orderTypeData"
				@change="orderTypeChange"></uni-data-select>
		</view>
	</view>
	<!-- <view class="listbox">
		<view class="card-no-active">
			<view class="head">
				<image :src="`${$imgUrl}order/icon-star-green.png`" mode=""></image>
				<text>新办订单</text>
			</view>
			<view class="content">
				<view class="row">
					产品类型：<text>01872753475754</text>
				</view>
				<view class="row">
					车牌号：<text>贵AJ1234</text>
				</view>
				<view class="row">
					激活时间：<text>2023-02-20</text>
				</view>
				<view class="row">
					订单金额：<text>120.00</text>
				</view>
			</view>
			<view class="btns">
				<button>开票</button>
			</view>
		</view>
	</view> -->

</template>

<script setup lang="ts">
	import {
		reactive
	} from "vue";
	import { onLoad } from "@dcloudio/uni-app";
	import { invoiceQueryApi } from "@/utils/network/api.js";
	import { stringToJson } from "@/utils/network/encryption";
	import { request } from "@/utils/network/request.js";
	const state = reactive({
		userMobile: "",
		pageNumber: 1,
		pageSize: 10,
		status: 1,
		statusData: [{
			'value': 1,
			'text': '正常'
		}, {
			'value': -1,
			'text': '红冲'
		}],
		orderType: 1,
		orderTypeData: [{
			'value': 1,
			'text': 'ETC产品'
		}, {
			'value': 2,
			'text': '通行服务费'
		}]
	})
	onLoad((options) => {
		state.userMobile = options.userMobile
		query()
	})
	const query = () => {
		const options = {
			type: 2,
			data: {
				userMobile: state.userMobile,
				pageNumber: state.pageNumber,
				pageSize: state.pageSize,
				status: state.status,
				orderType: state.orderType,
			},
			method: "POST",
			showLoading: true,
		};
		request(invoiceQueryApi, options).then((res) => {
			const data = stringToJson(res.bizContent);
			console.log(data, "通行");
		});
	}
	const statusChange = (e) => {
		state.status = e
	}
	const orderTypeChange = (e) => {
		state.orderType = e
	}
</script>


<style>
	page {
		width: 100%;
		height: 100%;
	}
</style>

<style lang="scss" scoped>
	.listbox {
		height: 100%;
		background-color: #EEF7F7;
		padding: 30rpx;
		border-top: 1rpx solid #DFDFDF;
		margin-top: 100rpx;

		.card-no-active {
			margin-bottom: 30rpx;
			height: 438rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
			border-radius: 20rpx;
			display: flex;
			flex-direction: column;

			.head {
				display: flex;
				padding: 30rpx;
				align-items: center;
				border-bottom: 1px solid #DCDCDC;

				image {
					width: 48rpx;
					height: 48rpx;
				}

				text {
					font-size: 30rpx;
					font-family: Noto Sans S Chinese;
					font-weight: 400;
					color: #333333;
				}
			}

			.content {
				margin: 30rpx;
				margin-bottom: 0;
				border-bottom: 1rpx solid #DCDCDC;

				.row {
					font-size: 26rpx;
					font-family: Noto Sans S Chinese;
					font-weight: 400;
					color: #999999;
					margin-bottom: 20rpx;

					text {
						font-size: 26rpx;
						font-family: Noto Sans S Chinese;
						font-weight: 400;
						color: #333333;
					}
				}
			}

			.btns {
				flex: 1;
				display: flex;
				align-items: center;
				justify-content: flex-end;
				padding: 0 30rpx;

				button {
					margin: 0;
					display: inline-block;
					height: 61rpx;
					background: #FFFFFF;
					border: 1px solid #00B38B;
					border-radius: 30rpx;
					font-size: 26rpx;
					font-family: Noto Sans S Chinese;
					font-weight: 400;
					color: #00B38B;
					line-height: 61rpx;
				}
			}
		}


		.card-active {
			height: 375rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
			border-radius: 20rpx;
			display: flex;
			flex-direction: column;

			.head {
				display: flex;
				padding: 30rpx;
				align-items: center;
				border-bottom: 1px solid #DCDCDC;

				image {
					width: 48rpx;
					height: 48rpx;
				}

				text {
					font-size: 30rpx;
					font-family: Noto Sans S Chinese;
					font-weight: 400;
					color: #333333;
				}

				.status {
					position: absolute;
					right: 35px;
					font-size: 26rpx;
					font-family: Noto Sans S Chinese;
					font-weight: 400;
					color: #777777;
				}
			}

			.content {
				margin: 30rpx;

				.row {
					font-size: 26rpx;
					font-family: Noto Sans S Chinese;
					font-weight: 400;
					color: #999999;
					margin-bottom: 20rpx;

					text {
						font-size: 26rpx;
						font-family: Noto Sans S Chinese;
						font-weight: 400;
						color: #333333;
					}
				}
			}

		}
	}

	.item {
		display: flex;
		font-size: 30rpx;
		margin-top: 10rpx;
		align-items: center;
	}

	.wrap {
		padding: 10rpx 20rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-evenly;
		position: fixed;
		left: 0;
		top: 0;
		background-color: white;
		width: 100%;
	}
</style>