<template>
	<view>
		<view class="u-listdata">
			<view style="padding:10rpx 0 0 30rpx">
				共有 <span style="color: red">{{totalnumber}}</span>条记录
			</view>

			<u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
				<u-list-item v-for="(item, index) in indexList" :key="index">

					<view class="companylist" @click="seedetail(item)">
						<view class="Currentamount">
							欠费金额:{{item.smsCode}}
						</view>
						<view class="Currentamount">
							发送时间: {{item.createDate}}
						</view>
						<view class="Currentamount">
							空间信息:￥{{item.spacePos}}
						</view>
						<view class="Currentamount">
							联系电话: {{item.mobile}}
						</view>
						<view class="Currentamount">
							短信类型: 催费
						</view>
						<view class="Currentamount">
							短信内容: {{item.content}}
						</view>
					</view>

				</u-list-item>
			</u-list>

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

<script>
	export default {
		data() {
			return {
				indexList:[],
				postdata:{
					name:'',
					page:1,
					limit:10,
				},
				pd: true,
				totalnumber:0,
			}
		},
		onLoad(options) {
		    this.postdata.name = options.companyOrgId;
		  //  console.log(options.companyOrgId);
			this.getdata()
		},
		methods: {
			getdata(){
				this.$api.get('/expeditrecord/recordpage',this.postdata)
				.then(res=>{
				  console.log('111111111111111111',res.data.data.total)
this.totalnumber=res.data.data.total;

				  if (res.data.data.list.length != 0) {
				  	this.indexList.push(...res.data.data.list);
				  	this.postdata.page = this.postdata.page + 1;
				  	this.pd = true;
				  } else {
				  	uni.showToast({
				  		title: '暂无更多数据了',
				  		icon: 'none',
				  		duration: 1500
				  	})
				  	this.pd = false;
				  }


				})
			},
			scrolltolower() {
				if (this.pd) {
					this.getdata();
				} else {
					return
				}
			},

		}
	}
</script>

<style lang="scss">
	.Currentamount {
		padding-left: 30rpx;
		min-height: 50rpx;
		line-height: 50rpx;
		color: #BCB3A7;
	}

	.Callfee {
		width: 100rpx;
		height: 45rpx;
		text-align: center;
		line-height: 45rpx;
		color: #5C8FFF;
		border: 1px solid #5C8FFF;
		font-size: 22rpx;
		position: absolute;
		bottom: 10rpx;
		right: 10px;
		font-weight: bold;
	}

	.companylist {
		margin: 20rpx 30rpx;
		background: #fff;
		min-height: 390rpx;
		border-radius: 10px;
		position: relative;

		h3 {
			height: 70rpx;
			line-height: 70rpx;
			padding-left: 30rpx;
		}
	}

	.settled {
		background-color: #09C700;
		width: 100rpx;
		height: 40rpx;
		text-align: center;
		line-height: 40rpx;
		color: #fff;
		font-size: 14rpx;
		position: absolute;
		top: 0px;
		right: 0px;
		border-top-right-radius: 10rpx;
		border-bottom-left-radius: 10rpx;
	}

	.outstanding {
		background-color: #FA5555;
		width: 100rpx;
		height: 40rpx;
		text-align: center;
		line-height: 40rpx;
		color: #fff;
		font-size: 14rpx;
		position: absolute;
		top: 0px;
		right: 0px;
		border-top-right-radius: 10rpx;
		border-bottom-left-radius: 10rpx;
	}



	.billall {}

	.topbill {
		display: flex;
		justify-content: space-around;
		align-items: center;
		height: 100rpx;
		background-color: #e6e6e6;
	}

	.topbilledit {
		display: flex;
		justify-content: space-around;
		align-items: center;
	}

	.changetime1 {
		padding-right: 10rpx;
	}
</style>

