| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 | 
							- <template>
 
- 	<view class="pos-r padding-lr-sm" v-if="fetch && fetch.info">
 
- 		<use-tabbar :tabbar="false" />
 
- 		<view class="gold-section">
 
- 			<view class="item dflex dflex-flow-c">
 
- 				<text>共{{page}}个{{fetch.info.name}}</text>
 
- 			</view>
 
- 		</view>
 
- 		<!-- 记录列表 -->
 
- 		<view class="record-list margin-top-sm" v-if="fetch">
 
- 			<view class="record-title fs fwbd ft-black margin-bottom-sm">{{fetch.info.name}}列表</view>
 
- 			<u-empty v-if="fetch.list && fetch.list.length <= 0" marginTop="30" mode="data" text="暂无记录"></u-empty>
 
- 			<view v-else>
 
- 				<view class="record-item" v-for="(item, index) in fetch.list" :key="index"
 
- 					@click="Dever.pic.preview([item.avatar], item.avatar)">
 
- 					<view class="record-left">
 
- 						<image class="record-avatar" :src="item.avatar" mode="aspectFill"></image>
 
- 						<view class="record-info">
 
- 							<view class="record-name">{{ item.name }}</view>
 
- 							<view class="record-time">{{ item.cdate_str }}</view>
 
- 						</view>
 
- 					</view>
 
- 					<view class="record-amount lock">
 
- 						<text>{{ item.order }}</text>
 
- 					</view>
 
- 				</view>
 
- 			</view>
 
- 		</view>
 
- 		<view class="safe-area-inset-bottom"></view>
 
- 	</view>
 
- </template>
 
- <script>
 
- 	export default {
 
- 		data() {
 
- 			return {
 
- 				fetch: {},
 
- 				page: 0,
 
- 				type: 0,
 
- 				id: 0,
 
- 				role_id: 0,
 
- 			};
 
- 		},
 
- 		onLoad(options) {
 
- 			this.type = options.type;
 
- 			this.id = options.id;
 
- 			this.role_id = options.role_id;
 
- 			if (!this.type || !this.id || !this.role_id) {
 
- 				return Dever.goUser()
 
- 			}
 
- 		},
 
- 		onShow() {
 
- 			this.loadData(1);
 
- 		},
 
- 		//下拉刷新
 
- 		onPullDownRefresh() {
 
- 			this.loadData(1);
 
- 		},
 
- 		//加载更多
 
- 		onReachBottom() {
 
- 			this.loadData(2);
 
- 		},
 
- 		methods: {
 
- 			loadData(page) {
 
- 				this.DeverApi.page([page, 'list'], this, 'sales.getRoleUser', {sales_type:this.type, sales_id: this.id, id: this.role_id}, res => {
 
- 					this.page = res.page;
 
- 				});
 
- 			},
 
- 		}
 
- 	};
 
- </script>
 
- <style lang="scss">
 
- 	.gold-section {
 
- 		background: #ffffff;
 
- 		border-radius: 24rpx;
 
- 		padding: 32rpx;
 
- 		.dflex-b {
 
- 			display: flex;
 
- 			justify-content: space-between;
 
- 			align-items: center;
 
- 		}
 
- 		.title {
 
- 			font-size: 32rpx;
 
- 			font-weight: bold;
 
- 			color: #333;
 
- 		}
 
- 		.link {
 
- 			font-size: 24rpx;
 
- 			color: #ff9800;
 
- 			text-decoration: underline;
 
- 		}
 
- 		.balance-number {
 
- 			margin-top: 20rpx;
 
- 			.price {
 
- 				font-size: 48rpx;
 
- 				color: #ff9800;
 
- 				font-weight: bold;
 
- 			}
 
- 		}
 
- 		.amount-summary {
 
- 			display: flex;
 
- 			justify-content: space-between;
 
- 			margin-top: 32rpx;
 
- 			.summary-item {
 
- 				flex: 1;
 
- 				display: flex;
 
- 				flex-direction: column;
 
- 				.label {
 
- 					font-size: 24rpx;
 
- 					color: #888;
 
- 				}
 
- 				.value {
 
- 					margin-top: 10rpx;
 
- 					font-size: 30rpx;
 
- 					font-weight: 600;
 
- 					color: #333;
 
- 				}
 
- 			}
 
- 		}
 
- 	}
 
- 	.card-tile {
 
- 		border-radius: 24rpx;
 
- 		padding: 30rpx;
 
- 		background: #ffffff;
 
- 		display: flex;
 
- 		align-items: center;
 
- 		justify-content: center;
 
- 		transition: all 0.2s ease-in-out;
 
- 		.icon {
 
- 			font-size: 60rpx;
 
- 			margin-right: 24rpx;
 
- 		}
 
- 		.text-content {
 
- 			display: flex;
 
- 			flex-direction: column;
 
- 			.title {
 
- 				font-size: 30rpx;
 
- 				font-weight: 600;
 
- 				color: #333;
 
- 			}
 
- 			.desc {
 
- 				font-size: 24rpx;
 
- 				color: #999;
 
- 				margin-top: 6rpx;
 
- 			}
 
- 		}
 
- 		&:active {
 
- 			transform: scale(0.97);
 
- 		}
 
- 		&:first-child {
 
- 			margin-right: 10rpx;
 
- 		}
 
- 	}
 
- 	.wpre-50 .card-tile {
 
- 		&:first-child {
 
- 			margin-bottom: 12rpx;
 
- 			margin-right: 0rpx;
 
- 		}
 
- 	}
 
- 	.record-list {
 
- 		background: #ffffff;
 
- 		border-radius: 20rpx;
 
- 		padding: 30rpx;
 
- 		.record-title {
 
- 			font-size: 30rpx;
 
- 			font-weight: bold;
 
- 			color: #333;
 
- 		}
 
- 		.record-item {
 
- 			display: flex;
 
- 			justify-content: space-between;
 
- 			align-items: center;
 
- 			padding: 20rpx 0;
 
- 			border-bottom: 1px solid #f0f0f0;
 
- 			&:last-child {
 
- 				border-bottom: none;
 
- 			}
 
- 			.record-left {
 
- 				display: flex;
 
- 				align-items: center;
 
- 				.record-avatar {
 
- 					width: 84rpx;
 
- 					height: 84rpx;
 
- 					border-radius: 50%; // 圆形头像
 
- 					margin-right: 20rpx;
 
- 				}
 
- 				.record-info {
 
- 					display: flex;
 
- 					flex-direction: column;
 
- 					.record-name {
 
- 						font-size: 28rpx;
 
- 						color: #333;
 
- 					}
 
- 					.record-time {
 
- 						font-size: 24rpx;
 
- 						color: #999;
 
- 						margin-top: 6rpx;
 
- 					}
 
- 				}
 
- 				.record-name {
 
- 					font-size: 28rpx;
 
- 					color: #333;
 
- 				}
 
- 				.record-desc {
 
- 					font-size: 28rpx;
 
- 					color: #999;
 
- 				}
 
- 				.record-time {
 
- 					font-size: 24rpx;
 
- 					color: #999;
 
- 					margin-top: 6rpx;
 
- 				}
 
- 			}
 
- 			.record-amount {
 
- 				font-size: 28rpx;
 
- 				font-weight: bold;
 
- 				&.income {
 
- 					color: #4caf50;
 
- 				}
 
- 				&.expense {
 
- 					color: #f44336;
 
- 				}
 
- 				&.lock {
 
- 					color: #999;
 
- 				}
 
- 			}
 
- 		}
 
- 	}
 
- 	.empty-record {
 
- 		text-align: center;
 
- 		padding: 60rpx 0;
 
- 		.empty-icon {
 
- 			width: 160rpx;
 
- 			height: 160rpx;
 
- 			margin-bottom: 20rpx;
 
- 			opacity: 0.6;
 
- 		}
 
- 		.empty-text {
 
- 			font-size: 28rpx;
 
- 			color: #999;
 
- 		}
 
- 	}
 
- </style>
 
 
  |