<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 class="li-head" :class="item.status !=0?'act':'' ">
					<view style="display: flex;align-items: center;font-size: 28rpx;">
						<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/90b74202405201510453389.png"
							width="28rpx" height="28rpx" style="margin-right: 10rpx;"></u--image>
						<text> {{item.name}}</text>
					</view>
					<text v-if="item.status ==0"
						style="margin-right: 10rpx;color: #20B128;padding:4rpx 10rpx;background-color: #E4F6E5;border-radius: 5rpx;">待报价</text>
					<text v-else
						style="margin-right: 10rpx;color: #FC452F;padding:4rpx 10rpx;background-color: #FFEBE3;border-radius: 5rpx;">已报价</text>
				</view>
				<view style="padding: 20rpx;">
					商品分类: <text v-for="items in item.class_arr">{{items}}</text>
				</view>
				<view style="padding: 0 20rpx;padding-bottom: 20rpx;">
					商品数量: 共{{item.nums}}种
				</view>
			</view>

			<view class="detail" @click="navgo('/pages/quote/supplierFinancialy')">
				提现
			</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()
		},
		onPullDownRefresh() {
			this.getLists()
			uni.stopPullDownRefresh()
		}
	}
</script>

<style lang="scss">
	.box {
		min-height: 95vh;

		.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;
			margin-bottom: 20rpx;
			border-radius: 16rpx;
			overflow: hidden;

			.li-head {
				display: flex;
				align-items: center;
				color: #707070;
				justify-content: space-between;
				font-size: 22rpx;
				background: linear-gradient(92deg, rgba(226, 255, 228, 0.3) 0%, #FFFFFF 100%);
				padding: 20rpx;
			}

			.act {
				background: linear-gradient(86deg, rgba(255, 222, 212, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
			}

		}

		.detail {
			width: 88rpx;
			height: 88rpx;
			border-radius: 88rpx;
			text-align: center;
			line-height: 88rpx;
			background-color: #50C758;
			color: white;
			position: absolute;
			bottom: 150px;
			right: 40rpx;
		}
	}
</style>