|
|
@@ -0,0 +1,199 @@
|
|
|
+<template>
|
|
|
+<view class="app-content">
|
|
|
+ <block v-if="!$util.isEmpty(list.data)">
|
|
|
+ <view class="record-list">
|
|
|
+ <view v-for="(item, index) in list.data" :key="index" class="record-item">
|
|
|
+ <view class="record-header">
|
|
|
+ <view class="date-info">
|
|
|
+ <text class="date-text">{{ item.addTime.substr(5,11) }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="staff-info">
|
|
|
+ <text class="staff-name">{{ item.staffName }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="record-content">
|
|
|
+ <view class="event-section">
|
|
|
+ <text class="event-label">变更事项</text>
|
|
|
+ <text class="event-value">{{ item.event }}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="change-section">
|
|
|
+ <view class="change-item">
|
|
|
+ <text class="change-label">变化前</text>
|
|
|
+ <text class="change-value before">{{ item.beforeName }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="change-arrow">
|
|
|
+ <text class="arrow-icon">→</text>
|
|
|
+ </view>
|
|
|
+ <view class="change-item">
|
|
|
+ <text class="change-label">变化后</text>
|
|
|
+ <text class="change-value after">{{ item.afterName }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import { getMemberChange } from '@/api/member'
|
|
|
+import list from '@/mixins/list'
|
|
|
+export default {
|
|
|
+ name: "memberChange",
|
|
|
+ components: {
|
|
|
+ AppWrapperEmpty
|
|
|
+ },
|
|
|
+ mixins:[list],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async init(){
|
|
|
+ let id = this.option.id ? this.option.id : 0
|
|
|
+ const res = await getMemberChange({ page:this.list.page,customId:id })
|
|
|
+ if (this.$util.isEmpty(res.data.list)){
|
|
|
+ this.completes(res)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let currentList = res.data.list
|
|
|
+ res.data.list = currentList
|
|
|
+ this.completes(res)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async onPullDownRefresh() {
|
|
|
+ this.resetList()
|
|
|
+ await this.init()
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ },
|
|
|
+ async onReachBottom() {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ await this.init()
|
|
|
+ uni.stopPullDownRefresh();;
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-content {
|
|
|
+ padding: 20upx;
|
|
|
+}
|
|
|
+
|
|
|
+.record-list {
|
|
|
+ .record-item {
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 16upx;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ box-shadow: 0 4upx 12upx rgba(0, 0, 0, 0.08);
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ .record-header {
|
|
|
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
+ padding: 24upx 32upx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .date-info {
|
|
|
+ .date-text {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .staff-info {
|
|
|
+ .staff-name {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 26upx;
|
|
|
+ background: rgba(255, 255, 255, 0.2);
|
|
|
+ padding: 8upx 16upx;
|
|
|
+ border-radius: 20upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .record-content {
|
|
|
+ padding: 32upx;
|
|
|
+
|
|
|
+ .event-section {
|
|
|
+ margin-bottom: 32upx;
|
|
|
+ padding: 24upx;
|
|
|
+ background: #f8f9ff;
|
|
|
+ border-radius: 12upx;
|
|
|
+ border-left: 6upx solid #667eea;
|
|
|
+
|
|
|
+ .event-label {
|
|
|
+ font-size: 24upx;
|
|
|
+ color: #999;
|
|
|
+ display: block;
|
|
|
+ margin-bottom: 8upx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .event-value {
|
|
|
+ font-size: 32upx;
|
|
|
+ color: #333;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .change-section {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .change-item {
|
|
|
+ flex: 1;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .change-label {
|
|
|
+ font-size: 24upx;
|
|
|
+ color: #999;
|
|
|
+ display: block;
|
|
|
+ margin-bottom: 12upx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .change-value {
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 500;
|
|
|
+ padding: 16upx 20upx;
|
|
|
+ border-radius: 12upx;
|
|
|
+ display: block;
|
|
|
+
|
|
|
+ &.before {
|
|
|
+ background: #fff2f0;
|
|
|
+ color: #ff4d4f;
|
|
|
+ border: 2upx solid #ffccc7;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.after {
|
|
|
+ background: #f6ffed;
|
|
|
+ color: #52c41a;
|
|
|
+ border: 2upx solid #b7eb8f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .change-arrow {
|
|
|
+ width: 60upx;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .arrow-icon {
|
|
|
+ font-size: 32upx;
|
|
|
+ color: #667eea;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|