<template>
	<view class="login-container" :style="!workArray.length?{backgroundColor:`#F7F7F7`}:{}">
		<view class="title-back" :style="{height:`${uni.getStorageSync('moveHeight')+40}px`}">
			<view class="left-father" @click="uni.navigateBack();">
				<image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />
			</view>
		</view>
		<view :style="{height:`${uni.getStorageSync('moveHeight') + 40}px`}"></view>
		
		<model :show="show" @close="show=false" :content="content" />
		<view class="index-up" v-if="workArray.length">
			<image class="index-up-img" src="https://www.focusnu.com/media/directive/index/pouplebgc.png"
				mode="widthFix" lazy-load="false" />
		</view>
		
		<view
			style="position: absolute;left:0;top: 400rpx;width: 100%;display: flex;flex-direction: column;justify-content: center;align-items: center;z-index: 999;"
			v-if="!workArray.length">
			<image style="height: 220rpx;width: 350rpx;"
				src="https://www.focusnu.com/media/directive/index/jigouyaoqing.png" />
			<view style="color: #8E96AD;margin-top: 20rpx;">
				暂无缴费信息
			</view>
		</view>
		<view class="card" v-for="(item,index) in workArray" :key="index">
			<view class="top">
				<view>
					缴费时间&nbsp;
					<text>{{item.createTime}}</text>
				</view>
				<text>{{item.nuName}}</text>
			</view>
			<view class="bots">
				<text>缴费金额</text>
				<view>
					<text>
						<text style="font-size: 30rpx;">￥</text>
						{{item.amount}}
					</text>
					<text>余额{{item.balance}}元</text>
				</view>
			</view>
		</view>
		<!-- <view class="bgc-card">
			<view class="under-scroll">
				<view v-for="(item,index) in workArray" :key="index">
					<view class="white-small">
						<view class="white-name">
							<view style="font-size: 36rpx;font-weight: 600;"
								v-if="item.type=='bind_nu' && item.elderName==null">
								预缴金额
							</view>
							<view style="font-size: 36rpx;font-weight: 600;" v-else>
								{{ item.elderName }}
							</view>
							<view style="font-size: 30rpx;">
								{{ item.nuName }}
							</view>
						</view>
						<view style="font-size: 50rpx;font-weight: 600;margin: 15rpx 0;">
							{{ item.amount }}
						</view>
						<view class="gray-bgc">
							<view style="display: flex;margin-left: 20rpx;">
								<view class="">
									{{ item.typeName }}
								</view>
							</view>
							<view style="margin-right: 20rpx;color: #b8b8b8;">
								余额
								<text style="color: #0087FF;">
									{{ item.balance }}
								</text>
								元
							</view>
						</view>
						<view class="remark-bgc">
							备注信息：{{item.createTime.slice(0,10) }}{{ item.remark }}
						</view>
						<view style="margin-top: 20rpx;color: #999999;font-size: 30rpx;">
							{{ item.departName }}
						</view>
						 
					</view>
				</view>
			</view>
		</view> -->

	</view>
</template>

<script setup>
	import {
		reactive,
		ref,
		nextTick
	} from 'vue';
	import {
		onLoad,
		onPullDownRefresh,

	} from '@dcloudio/uni-app'
	import {
		// getEmployeesOrgRela,
		payMoneyList
	} from './api.js'
	// import {
	// 	getMessageList
	// } from '@/pages/addstaff/api/addjigou.js'
	import model from "@/compontent/public/model.vue"

	const type = ref(0)
	const workArray = ref([])
	const special = ref(false);
	const statusarray = ["loading", "success", "fail"]
	const payMoneyListvalue = ref("")
	const orgCode = ref("")

	// 页面加载时接收 URL 参数
	onLoad((options) => {
		payMoneyListvalue.value = options.nuId
		orgCode.value = options.orgCode
		payMoneyList(payMoneyListvalue.value, orgCode.value).then(res => {
			workArray.value = res.result
		})
	})

	onPullDownRefresh(() => {
		payMoneyList(payMoneyList.value, orgCode.value).then(res => {
			workArray.value = res.result
		})
		uni.stopPullDownRefresh()
	})
	const content = ref("");
	const show = ref(false);
	const openLook = (res) => {
		if (res) {
			content.value = res;
			show.value = true
		}
	}
	const goBack = () => {
		uni.navigateBack()
	}
	 
</script>

<style lang="scss" scoped>
	.card{
		width: 704rpx;
		height: 223rpx;
		background: #FFFFFF;
		border-radius: 40rpx;
		border: 1px solid #E5E5E5;
		margin: 20rpx auto;
		overflow: hidden;
		position: relative;
		z-index: 2;
		.bots{
			width: 100%;
			height: 151rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			padding: 20rpx 38rpx;
			>text{
				font-weight: 400;
				font-size: 25rpx;
				color: #888888;
			}
			view{
				display: flex;
				justify-content: space-between;
				align-items: center;
				text{
					&:nth-child(1){
						font-weight: bold;
						font-size: 45rpx;
						color: #222222;
					}
					&:nth-child(2){
						font-weight: 400;
						font-size: 23rpx;
						color: #555555;
					}
				}
			}
		}
		.top{
			width: 703rpx;
			height: 71rpx;
			background: #F8F8FA;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0 38rpx;
			>text{
				font-weight: bold;
				font-size: 23rpx;
				color: #222222;
			}
			view{
				font-weight: 600;
				font-size: 23rpx;
				color: #222222;
				>text{
					font-weight: 400;
					color: #5F7195;
				}
			}
		}
	}
	.login-container {
		display: flex;
		flex-direction: column;
		min-height: 100vh;
		width: 100%;
		background-color: #F7F7F7;
		position: relative;

	}

	.under-scroll {
		width: 100%;
		height: calc(100% - 460rpx);
		padding-top: 30rpx;

		.white-small {
			width: 94%;
			margin-left: 3%;
			// height: 450rpx;
			background-color: #fff;
			border-radius: 30rpx;
			// padding: 40rpx;
			padding: 40rpx 50rpx;
			// padding-top: 40rpx;
			// margin-bottom: 50rpx;
			font-size: 25rpx;
			// color: #999999;
			position: relative;
			// display: flex;
			// align-items: center;
			margin-top: 50rpx;
		}
	}

	.button-heng {
		// width: 100%;
		display: flex;
		justify-content: flex-end;
		position: absolute;
		bottom: 30rpx;
		right: 0;




	}

	.bgc-card {
		margin-top: 80rpx;
		// background-color: #F7F7F7;
		width: 98%;
		margin-left: 1%;
		border-top-left-radius: 30rpx;
		border-top-right-radius: 30rpx;
		min-height: calc(100vh - 650rpx);
		z-index: 1;
	}

	.index-up {
		position: absolute;
		top: 0rpx;
		left: 0;
		width: 100%;

		.index-up-img {
			width: 100%;
			height: 20rpx;
		}
	}

	.title-card {
		margin: 30rpx;
		background-color: #fff;
		width: 93%;
		height: 250rpx;
		border-radius: 30rpx;
		padding: 0 45rpx;
		margin-top: 40rpx;
		padding-top: 40rpx;

		.big-weight {
			font-size: 30rpx;
			color: #333333;
			font-weight: 600;
			margin-bottom: 30rpx;
		}

		.title-other {
			color: #666666;
			font-size: 25rpx;
		}
	}

	.title-back {
		background: rgba(255, 255, 255, 0);
		width: 100%;
		height: 70rpx;
		display: flex;
		justify-content: space-between;
		align-items: flex-end;
		padding-bottom: 20rpx;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 9999;
	}
	
	.left-father {
		width: 150rpx;
		height: 100%;
		display: flex;
		align-items: flex-end;
	
		.back-img {
			width: 45rpx;
			height: 40rpx;
			margin-left: 40rpx;
			margin-right: 15rpx;
		}
	}

	.enter-img {
		width: 25rpx;
		height: 25rpx;
		position: absolute;
		right: 30rpx;
		top: 35rpx;
	}

	.bottom-father {
		display: flex;
		justify-content: space-between;
		margin-bottom: 20rpx;
	}

	.bottom-img {
		position: absolute;
		right: 30rpx;
		top: 60rpx;
		width: 160rpx;
		height: 140rpx;
	}

	.blue-button {
		margin: 0 30rpx;
		margin-top: 30rpx;

		width: 200rpx;
		height: 60rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
					border: 2rpx solid #9AD1FF;
					color: #007CFF;
		border-radius: 25rpx;
	
		font-size: 30rpx;
		z-index: 999;
	}

	.white-button {
		margin: 0 30rpx;
		margin-top: 30rpx;

		width: 200rpx;
		height: 60rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		background: linear-gradient(to bottom, #f3f3f5, #dee4e9);
		border-radius: 25rpx;
		// color: #fff;
		font-size: 30rpx;
		z-index: 999;
		// display: flex;
		// justify-content: center;
		// align-items: center;
		// width: 30%;
		// height: 60rpx;
		// margin: 0 30rpx;
		// margin-top: 10rpx;
		// // color: #fff;
		// background: linear-gradient(to bottom, #f3f3f5, #dee4e9);
		// border-radius: 25rpx;
		// font-size: 30rpx;
	}

	.card-font {
		margin-left: 10rpx;
		font-size: 32rpx;
		margin-top: 30rpx;
		padding-top: 25rpx;
		word-wrap: break-word;
		width: 450rpx;
		font-weight: 600;
	}

	.gray-font {
		// margin-left: 20rpx;
		font-size: 32rpx;
		margin-top: 20rpx;
		color: #B1B1B1;
		width: 100%;
	}



	.applying {
		position: absolute;
		right: 20rpx;
		top: 0rpx;
		background-color: #FFE8D3;
		color: #FF7900;
		width: 130rpx;
		height: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 28rpx;
		border-radius: 10rpx;
		margin-left: 35rpx;
		margin-top: 25rpx;
		// margin-top: 20rpx;
		// margin-bottom: 20rpx;
	}

	.applysuccess {
		position: absolute;
		right: 20rpx;
		top: 0rpx;
		background-color: #DEF1FF;
		color: #0093FF;
		width: 130rpx;
		height: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 28rpx;
		border-radius: 10rpx;
		margin-left: 35rpx;
		margin-top: 25rpx;
		// margin-bottom: 20rpx;
	}

	.applyfail {
		position: absolute;
		right: 20rpx;
		top: 0rpx;
		background-color: #fff4f7;
		color: #FC3D7F;
		width: 130rpx;
		height: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 28rpx;
		border-radius: 10rpx;
		margin-left: 35rpx;
		margin-top: 20rpx;
		// margin-bottom: 20rpx;
	}

	.applywhy {
		position: absolute;
		right: 20rpx;
		top: 60rpx;
		background-color: #F1F1F1;
		color: #373737;
		width: 130rpx;
		height: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 28rpx;
		border-radius: 10rpx;
		margin-left: 35rpx;
		margin-top: 20rpx;
	}

	.shu {
		width: 14rpx;
		height: 36rpx;
		background-color: #0097FF;
		border-radius: 10rpx;
		margin: 3rpx 20rpx 0 30rpx;
	}

	.content-weight {
		font-size: 36rpx;
		font-weight: 600;
	}

	.white-name {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.gray-bgc {
		background-color: #F3F6FE;
		width: 100%;
		height: 70rpx;
		display: flex;
		align-items: center;
		border-radius: 5rpx;
		justify-content: space-between;
		font-size: 28rpx;
	}

	.remark-bgc {
		flex-wrap: wrap;
		background-color: #F9F9F9;
		padding: 20rpx;
		width: 100%;
		font-size: 25rpx;
		margin-top: 20rpx;
		color: #b8b8b8;
	}
</style>