<template>
	<view class="box">

		<!-- <view class="top">
			<view class="title" style='padding-top: 100rpx;'>
				<view>
				</view>
				报价订单
				<text style="color: #20B128;" @click="navgo('/pages/quote/supplierFinancialy')">提现</text>
			</view>
			<view style="background-color: white;padding: 20rpx;">
				<u-search :showAction="true" v-model="keyword" :actionStyle="{color:'#20B128'}" actionText="搜索"
					placeholder="输入商品分类" :animation="true" @search="getLists" @custom='getLists'></u-search>
			</view>
		</view> -->
		<u-empty v-if="lists.length==0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
		</u-empty>
		<view class="content">
			<view class="li" v-for="(item,index) in lists" :key="index"
				@click="navgo(`/pages/quote/index?date=${item.name.substring(0, 10)}`)">
				<view>
					{{item.name}}
				</view>
				<view style="display: flex;justify-content: space-between;margin: 20rpx 0;">
					<text>
						{{item.labels}} | 共{{item.nums}}种
					</text>
					<view style="display: flex;align-items: center;" v-if="item.status==0">
						<text style="margin-right: 10rpx;color: #20B128;">待报价</text>
						<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/fcc66202405171031441742.png"
							width="32rpx" height="32rpx"></u--image>
					</view>
					<view style="display: flex;align-items: center;" v-else>
						<text style="margin-right: 10rpx;color:#FC452F ;">已报价</text>
						<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/16ff3202405171032208362.png"
							width="32rpx" height="32rpx"></u--image>
					</view>
				</view>


				<!-- <view style="color: #777777;font-size: 24rpx;">
					2024-05-16 18:00
				</view> -->
			</view>
		</view>
	</view>
</template>
<script>
	import {
		OpurchaseGoodsOfferListApi,
		UserWithdrawListsdate_listsApi
	} from "@/api/supplier.js"

	export default {
		data() {
			return {
				keyword: '',
				lists: []
			}
		},
		methods: {
			navgo(url) {
				uni.navigateTo({
					url
				})
			},
			async getLists() {
				let res = await UserWithdrawListsdate_listsApi({
					// keyword: this.keyword
				})
				this.lists = res.data.lists

			}
		},
		onShow() {
			this.getLists()
		},
		onLoad() {
			uni.showTabBar()
		}
	}
</script>

<style lang="scss">
	.box {
		// padding-top: 250rpx;

		.top {
			position: fixed;
			width: 100vw;
			top: 0;
			z-index: 999;
		}
	}

	.title {
		padding: 20rpx;
		display: flex;
		justify-content: space-between;
		background-color: white;

	}

	.content {
		padding: 20rpx;

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