Browse Source

2024-1-10

cmy 1 year ago
parent
commit
9ea212d338
2 changed files with 118 additions and 73 deletions
  1. 2 1
      manifest.json
  2. 116 72
      pages/users/user_spread_money/index.vue

+ 2 - 1
manifest.json

@@ -73,7 +73,8 @@
                 "permissionPhoneState" : {
                     "request" : "none",
                     "prompt" : "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许"
-                }
+                },
+                "targetSdkVersion" : 30
             },
             /* ios打包配置 */
             "ios" : {

+ 116 - 72
pages/users/user_spread_money/index.vue

@@ -1,13 +1,22 @@
 <template>
 	<view :style="colorStyle">
 		<view class='commission-details'>
-			<view class='search acea-row row-between-wrapper' v-if="recordType != 1 && recordType != 4 && recordType!=5 && recordType!= 6">
+			<view class='search acea-row row-between-wrapper'
+				v-if="recordType != 1 && recordType != 4 && recordType!=5 && recordType!= 6">
 				<view class='input'>
 					<text class="iconfont icon-sousuo4"></text>
 					<input placeholder='搜索用户名称' placeholder-class='placeholder' v-model="keyword" @confirm="submitForm"
 						confirm-type='search' name="search"></input>
 				</view>
 			</view>
+			<view class="nav" v-if="recordType==6">
+				<view class="nav-item" :class="{'action': sixType == 1}" @click="getYjList('re',1)">
+					销售业绩
+				</view>
+				<view class="nav-item" :class="{'action': sixType == 2}" @click="getYjList('re',2)">
+					手工业绩
+				</view>
+			</view>
 			<timeSlot @changeTime="changeTime" v-if="recordType!=5"></timeSlot>
 			<view class='sign-record'>
 				<view class="top_num" v-if="recordType != 4 && recordList.length && recordType!=5 && recordType!=6">
@@ -22,33 +31,27 @@
 						提现
 					</view>
 				</view>
-				<view class="nav" v-if="recordType==6">
-					<view class="nav-item" :class="{'action': sixType == 1}" @click="getYjList('re',1)">
-						销售业绩
-					</view>
-					<view class="nav-item" :class="{'action': sixType == 2}" @click="getYjList('re',2)">
-						手工业绩
-					</view>
-				</view>
 				<view class="box">
 					<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
-						<view class='list'>
+						<view class='list' @click="showDetail(item)">
 							<view class='item'>
 								<!-- <view class='data'>{{item.time}}</view> -->
 								<view class='listn'>
 									<!-- <block v-for="(child,indexn) in item.child" :key="indexn"> -->
 									<view class='itemn1 acea-row row-between-wrapper'>
-										<view>
-											<view class='name line1'>
-												
-												 <text v-if="recordType!=5 && recordType!=6">{{item.title}}</text>
-												 <text v-else>{{item.content}}</text>
+										<view class="flex-g">
+											<view class='name line2'>
+												<text v-if="recordType!=5 && recordType!=6">{{item.title}}</text>
+												<text v-else>{{item.content}}</text>
 												<!-- <text class="status_badge success" v-if="recordType == 4 && item.status == 1">审核通过</text> -->
-												<text class="status_badge default" v-if="recordType == 4 && item.status == 0">待审核</text>
-												<text class="status_badge error" v-if="recordType == 4 && item.status == 2">未通过</text>
+												<text class="status_badge default"
+													v-if="recordType == 4 && item.status == 0">待审核</text>
+												<text class="status_badge error"
+													v-if="recordType == 4 && item.status == 2">未通过</text>
 												<!-- 提现记录: 0 待审核 1 通过 2 未通过 -->
-											 </view>
-											 <view class="mark" v-if="recordType == 4 && item.mark && item.status !== 1">{{item.mark}}</view>
+											</view>
+											<view class="mark" v-if="recordType == 4 && item.mark && item.status !== 1">
+												{{item.mark}}</view>
 											<view v-if="recordType!=5 && recordType!=6">{{item.add_time}}</view>
 											<view v-else>{{item.create_time}}</view>
 										</view>
@@ -57,11 +60,13 @@
 											<view class='num' v-else>-{{item.number}}</view>
 										</template>
 										<template v-if="recordType == 5">
-											<view class='num font-color' v-if="item.pm == 1">+{{item.shareholding}}</view>
+											<view class='num font-color' v-if="item.pm == 1">+{{item.shareholding}}
+											</view>
 											<view class='num' v-else>-{{item.shareholding}}</view>
 										</template>
 										<template v-if="recordType == 6">
-											<view class='num font-color' v-if="item.pm == 1">+{{item.performance}}</view>
+											<view class='num font-color' v-if="item.pm == 1">+{{item.performance}}
+											</view>
 											<view class='num' v-else>-{{item.performance}}</view>
 										</template>
 									</view>
@@ -175,21 +180,21 @@
 				this.recordType = 4;
 				this.getRecordList();
 				// this.getRecordListCount();
-			} else if(type == 5) {
+			} else if (type == 5) {
 				uni.setNavigationBarTitle({
 					title: "股权记录"
 				});
 				this.recordType = 5;
 				this.name = '股权明细';
-				
+
 				this.getStaffInfo()
-			}else if(type == 6) {
+			} else if (type == 6) {
 				uni.setNavigationBarTitle({
 					title: "业绩记录"
 				});
 				this.recordType = 6;
 				this.name = '业绩明细';
-				
+
 				this.getStaffInfo()
 				// this.getYjList()
 			} else {
@@ -215,14 +220,14 @@
 			}
 		},
 		methods: {
-			getYjList(type,sixType) {
+			getYjList(type, sixType) {
 				let that = this;
-				if(sixType) {
+				if (sixType) {
 					that.sixType = sixType
 				}
 				let page = that.page;
 				let limit = that.limit;
-				if(type = 're') {
+				if (type = 're') {
 					page = 1
 					that.loading = false
 					that.loadend = false
@@ -251,24 +256,33 @@
 				})
 			},
 			// 显示详细
-			showDetail(item){
-				uni.showModal({
-					title: '详细说明',
-					content: item.mark,
-					showCancel: false,
-				});
+			showDetail(item) {
+				console.log(item);
+				if (item.mark) {
+					uni.showModal({
+						title: '详细说明',
+						content: item.mark,
+						showCancel: false,
+					});
+				}else if(item.content){
+					uni.showModal({
+						title: '详细说明',
+						content: item.content,
+						showCancel: false,
+					});
+				}
 			},
 			navto(url) {
 				uni.navigateTo({
 					url
 				})
 			},
-			onLoadFun(){
+			onLoadFun() {
 				this.isShowAuth = false
 			},
 			// 授权关闭
 			authColse: function(e) {
-			  this.isShowAuth = e
+				this.isShowAuth = e
 			},
 			submitForm() {
 				this.page = 1;
@@ -281,29 +295,29 @@
 			},
 			getTimeStr(timestamp) {
 				let date;
-				if(timestamp) {
-					date = new Date(timestamp*1000);
-				}else {
+				if (timestamp) {
+					date = new Date(timestamp * 1000);
+				} else {
 					date = new Date();
 				}
 				const year = date.getFullYear();
 				const month = date.getMonth() + 1; // 月份从 0 开始,所以需要加 1
 				const day = date.getDate();
-				return year + '/' + (month>9?month: '0' + month) + '/' + (day>9?day: '0' + day)
+				return year + '/' + (month > 9 ? month : '0' + month) + '/' + (day > 9 ? day : '0' + day)
 			},
 			changeTime(time) {
-				console.log(time,'time')
-				if(this.recordType == 6) {
+				console.log(time, 'time')
+				if (this.recordType == 6) {
 					let times = ''
-					if(time.start == 0 && time.stop == 0 ) {
+					if (time.start == 0 && time.stop == 0) {
 						console.log('全部')
 						this.timer = '2020/01/01-' + this.getTimeStr()
-					}else {
+					} else {
 						this.timer = this.getTimeStr(time.start) + '-' + this.getTimeStr(time.stop)
 					}
-					console.log(this.timer,'timer')
+					console.log(this.timer, 'timer')
 					this.getYjList()
-				}else {
+				} else {
 					this.start = time.start
 					this.stop = time.stop
 					this.page = 1;
@@ -312,7 +326,7 @@
 					this.$set(this, 'recordList', []);
 					this.getRecordList();
 				}
-				
+
 			},
 			getGqList() {
 				let that = this;
@@ -340,19 +354,19 @@
 				let that = this
 				getUserInfo().then(res => {
 					that.userInfo = res.data
-					if(this.recordType == 5) {
+					if (this.recordType == 5) {
 						that.getGqList();
 					}
 					getStaffInfo({
 						uid: res.data.uid
 					}).then(ress => {
 						that.staffInfo = ress.data.list[0]
-						if(this.recordType == 6) {
+						if (this.recordType == 6) {
 							that.getYjList()
 						}
 					})
 				})
-				
+
 			},
 			getRecordList: function() {
 				let that = this;
@@ -409,11 +423,11 @@
 			}
 		},
 		onReachBottom: function() {
-			if(this.recordType == 5) {
+			if (this.recordType == 5) {
 				this.getGqList()
-			}else if(this.recordType == 6){
+			} else if (this.recordType == 6) {
 				this.getYjList()
-			}else {
+			} else {
 				this.getRecordList();
 			}
 		}
@@ -481,13 +495,15 @@
 		font-size: 26rpx;
 		color: #666;
 	}
+
 	.top_num_2 {
 		display: flex;
 		justify-content: space-between;
 	}
+
 	.tx {
 		padding: 5rpx 15rpx;
-		background-color:#1890FF;
+		background-color: #1890FF;
 		color: #fff;
 		border-radius: 10rpx;
 	}
@@ -495,14 +511,37 @@
 	.radius15 {
 		border-radius: 14rpx 14rpx 0 0;
 	}
-	.sign-record .list .item .listn .itemn1{border-bottom:1rpx solid #eee;padding:22rpx 24rpx;}
-	.sign-record .list .item .listn .itemn1 .name{width:390rpx;font-size:28rpx;color:#282828;margin-bottom:10rpx;}
-	.sign-record .list .item .listn .itemn1 .num{font-size:36rpx;font-family: 'Guildford Pro';color:#16ac57;}
-	.sign-record .list .item .listn .itemn1 .num.font-color{color:#e93323!important;}
-	.mark{
+
+	.sign-record .list .item .listn .itemn1 {
+		border-bottom: 1rpx solid #eee;
+		padding: 22rpx 24rpx;
+		flex-wrap: nowrap;
+	}
+	.sign-record .list .item .listn .itemn1 .flex-g{
+		flex-grow: 1;
+		padding-right: 30rpx;
+	}
+	.sign-record .list .item .listn .itemn1 .name {
+		font-size: 28rpx;
+		color: #282828;
 		margin-bottom: 10rpx;
 	}
-	.status_badge{
+
+	.sign-record .list .item .listn .itemn1 .num {
+		font-size: 36rpx;
+		font-family: 'Guildford Pro';
+		color: #16ac57;
+	}
+
+	.sign-record .list .item .listn .itemn1 .num.font-color {
+		color: #e93323 !important;
+	}
+
+	.mark {
+		margin-bottom: 10rpx;
+	}
+
+	.status_badge {
 		display: inline-block;
 		height: 30rpx;
 		border-radius: 4rpx;
@@ -510,39 +549,44 @@
 		line-height: 30rpx;
 		font-family: PingFangSC-Regular, PingFang SC;
 		font-weight: 400;
-		margin-left:12rpx;
-		padding:0 6rpx 0;
+		margin-left: 12rpx;
+		padding: 0 6rpx 0;
 	}
-	.success{
+
+	.success {
 		background: rgba(24, 144, 255, .1);
 		color: #1890FF;
 	}
-	.default{
+
+	.default {
 		background: #f5f5f5;
-		color: #282828;;
+		color: #282828;
+		;
 	}
-	.error{
+
+	.error {
 		background: rgba(233, 51, 35, .1);
 		color: #E93323;
 	}
+
 	.nav {
 		display: flex;
 		justify-content: space-evenly;
-		padding-bottom: 20rpx;
+
 		.nav-item {
-			width: 30%;
+			width: 50%;
 			line-height: 60rpx;
 			text-align: center;
-			border-radius: 30rpx;
-			border: 1px solid #1890FF;
 			color: #1890FF;
-			font-size:28rpx;
+			border: 1px solid #1890FF;
+			font-size: 28rpx;
 			background-color: #fff;
 		}
+
 		.action {
 			background-color: #1890FF;
 			color: #fff;
 			font-weight: bold;
 		}
 	}
-</style>
+</style>