<template>
	<view class="box">
		<view class="li" v-for="item,index in dataList" :key="index"
			@tap="navgo(`/subpkg/property/chosseCompany?id=${item.id}`)">
			<view class="">
				<view style="display: flex;justify-content: space-between;">
					<view class="">
						签约申请列表
					</view>
				</view>
				<view class="li">
					<view class="date">
						{{item.create_time.slice(0, 10)}}
					</view>

					<view class="" v-if="item.type==0">
						{{item.company_b_name}}提出租赁车辆一辆
					</view>
					<view class="" v-if="item.type==1">
						{{item.company_b_name}}上传自有车辆一辆
					</view>
					<view class="" v-if="item.type==2">
						{{item.company_b_name}}提出解除租赁
					</view>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	import {
		getAgencyListApi,
	} from "@/api/property.js"
	export default {
		data() {
			return {
				dataList: []
			}
		},
		methods: {
			navgo(url) {
				uni.navigateTo({
					url
				})
			}
		},
		onLoad() {
			getAgencyListApi().then(res => {
				this.dataList = res.data
			})
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		padding: 20rpx;

		.li {
			margin-top: 20rpx;
			background-color: white;
			padding: 10rpx;
			border-radius: 20rpx;
			display: flex;
		}

		.date {
			background-color: #FF7C32;
			color: white;
			padding: 0 10rpx;
			font-size: 24rpx;
			// line-height: rpx;
			display: flex;
			align-items: center;
			width: 200rpx;
			height: 50rpx;
			margin-right: 10rpx;
			border-radius: 15rpx // width: 170rpx;
		}

		.li {
			padding: 10rpx;
			background-color: white;
			border-radius: 15rpx;
			margin-bottom: 10rpx;
		}
	}
</style>