shish 1 год назад
Родитель
Сommit
74979faaaa

+ 6 - 0
mallApp/src/pages.json

@@ -34,6 +34,12 @@
                 { "path": "changeList", "style": { "navigationBarTitleText": "余额变动" } }
             ]
         },
+        {
+            "root": "pages/custom",
+            "pages": [
+                { "path": "levelChange", "style": { "navigationBarTitleText": "等级变动" } }
+            ]
+        },
         {
             "root": "pages/member",
             "pages": [

+ 199 - 0
mallApp/src/pages/custom/levelChange.vue

@@ -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>

+ 12 - 3
mallApp/src/pages/home/recent.vue

@@ -32,9 +32,9 @@
                 </view>
                 <view class="box_4 flex-col"></view>
                 <view class="box_9">
-                  <view class="tag_2" @click="showTip()"> <text>余额变动</text> </view>
-                  <view class="tag_2" @click="showTip()"> <text>等级变动</text> </view>
-                  <view class="tag_2" @click="showTip()"> <text>结账记录</text> </view>
+                  <view class="tag_2" @click="getLevelChange()"> <text>等级变动</text> </view>
+                  <view class="tag_2" @click="getBalanceChange()"> <text>余额变动</text> </view>
+                  <view class="tag_2" @click="getSettleList()"> <text>结账记录</text> </view>
                   <view class="tag_2" @click="getBuyList()"> <text>买花记录</text> </view>
                 </view>
 
@@ -140,6 +140,15 @@ export default {
         // #endif
       })
     },
+    getSettleList(){
+      this.pageTo({ url:'/pages/settle/list?id='+this.id+'&account='+this.account})
+    },
+    getLevelChange(){
+      this.pageTo({ url:'/pages/custom/levelChange?id='+this.id+'&account='+this.account})
+    },
+    getBalanceChange(){
+      this.pageTo({ url:'/pages/balance/changeList?id='+this.id+'&account='+this.account})
+    },
     getBuyList(){
       this.pageTo({ url:'/pages/order/list'})
     },

+ 144 - 0
mallApp/src/pages/settle/list.vue

@@ -0,0 +1,144 @@
+<template>
+	<view class="order-page">
+		<block v-if="!$util.isEmpty(list.data)">
+		<view scroll-y class="order-list">
+			<SettleItem v-for="(item, index) in list.data" :key="index" :info="item" @click="gotoDetail(item)"></SettleItem>
+		</view>
+		</block>
+		<block v-else>
+			<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+		</block>
+	</view>
+</template>
+<script>
+import SettleItem from "./settleItem";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { list } from "@/mixins";
+import { getClearList } from "@/api/clear/index";
+export default {
+	components: {
+		SettleItem,
+		AppWrapperEmpty
+	},
+	mixins: [list],
+	data() {
+		return {}
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onReachBottom () {
+		if (!this.list.finished) {
+			this.getList().then(res => {
+				uni.stopPullDownRefresh()
+			})
+		} else {
+			uni.stopPullDownRefresh()
+		}
+	},
+	methods: {
+		async init() {
+			this.getList();
+		},
+		getList() {
+			let options = {
+				page: this.list.page,
+				pageSize: this.list.pageSize,
+				ghsId:this.option.ghsId
+			};
+			getClearList(options).then(res => {
+				this.completes(res);
+			})
+		},
+		gotoDetail(item) {
+			uni.navigateTo({ url: `/admin/clear/info?id=${item.id}` })
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.order-page {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	background-color: #f9fbfc;
+	.order-list {
+		padding-top: 20upx;
+		padding-bottom: 80upx;
+		flex: 1;
+		.allot-item {
+			margin-bottom: 1px;
+			padding: 30upx;
+			display: flex;
+			align-items: center;
+			box-shadow: 0upx 1px 0upx 0upx #eeeeee;
+			background-color: #fff;
+			.info {
+				flex: 1;
+				margin-right: 20upx;
+				.info-order {
+					font-size: 32upx;
+					font-weight: 600;
+					color: #333333;
+				}
+				.info-name {
+					margin: 40upx 0 20upx;
+					font-size: 28upx;
+					font-weight: 400;
+					color: #666666;
+				}
+				.info-time {
+					margin-right: 30upx;
+					font-size: 28upx;
+					font-weight: 400;
+					color: #666666;
+				}
+			}
+			.status {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				flex-shrink: 0;
+				width: 100upx;
+				color: #cccccc;
+				.status-name {
+					margin-top: 10upx;
+					font-size: 24upx;
+				}
+				.iconfont {
+					font-size: 46upx;
+				}
+				&.primary {
+					color: #3385ff;
+				}
+				&.gray {
+					color: #cccccc;
+				}
+				&.warn {
+					color: #ffaf1d;
+				}
+			}
+		}
+	}
+	.bar-view {
+		flex-shrink: 0;
+		display: flex;
+		justify-content: flex-end;
+		align-items: center;
+		padding: 0 30upx;
+		width: 100%;
+		height: 100upx;
+		box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
+		.btn-view {
+			display: flex;
+			.admin-button-com {
+				margin: 0 10upx;
+				width: 140upx;
+			}
+		}
+	}
+}
+</style>

+ 123 - 0
mallApp/src/pages/settle/settleItem.vue

@@ -0,0 +1,123 @@
+<template>
+	<view class="order-item-view" @click="clickItemEvent">
+		<view class="item-header">
+			<view class="title">
+				<image class="icon" :src="info.ghsAvatar"></image>
+				<text class="name"> {{ info.ghsName }} </text>
+			</view>
+			<view class="status">{{info.status == 1 ?'待结清':info.status==2?'已结清':info.status==3?'已取消':'待结清'}}</view>
+		</view>
+		<view class="item-main" >
+			<view class="item-info">
+				<view class="info-row">
+					<text class="info-label"> 日期:</text>
+					<text class="info-value">{{ info.addTime ? info.addTime.substr(5,11) : '' }} </text>
+				</view>
+				<view class="info-row">
+					<text class="info-label"> 单号:</text>
+					<text class="info-value">{{ info.orderSn }} </text>
+				</view>
+				<view class="info-row">
+					<text class="info-label"> 人员:</text>
+					<text class="info-value">{{ info.operator }} </text>
+				</view>
+			</view>
+			<view class="item-price">¥{{ info.realPrice ? parseFloat(info.realPrice):0 }} <text class="iconfont iconxiangyou"></text>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
+export default {
+	name: "orderItem",
+	props: {
+		info: {
+			required: true
+		}
+	},
+	data() {
+		return {
+			PURCHASE_ORDER_STATUS
+		};
+	},
+	computed: {},
+	methods: {
+		clickItemEvent() {
+			this.$emit("click", this.info);
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.order-item-view {
+	padding: 30upx;
+	margin-bottom: 20upx;
+	width: 100%;
+	background-color: #fff;
+	.item-header {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-bottom: 20upx;
+		.title {
+			display: flex;
+			align-items: center;
+			flex: 1;
+
+			.icon {
+				margin-right: 20upx;
+				width: 50upx;
+				height: 50upx;
+				border-radius: 25upx;
+				border-radius: 50%;
+			}
+			.name {
+				font-size: 32upx;
+				font-weight: 600;
+				color: #333333;
+			}
+		}
+		.status {
+			flex-shrink: 0;
+			color: $mainColor;
+		}
+	}
+	.item-main {
+		display: flex;
+
+		align-items: flex-end;
+		.item-info {
+			flex: 1;
+
+			font-size: 26upx;
+			.info-row {
+				margin-top: 12upx;
+				display: flex;
+				align-items: center;
+			}
+			.info-label {
+				font-weight: 400;
+				color: #999999;
+			}
+			.info-value {
+				font-weight: 400;
+				color: #333333;
+			}
+		}
+		.item-price {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+
+			font-size: 30upx;
+			font-weight: 600;
+			color: #333333;
+			.iconfont {
+				font-size: 28upx;
+				color: #999999;
+			}
+		}
+	}
+}
+</style>