|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<view :style="colorStyle">
|
|
<view :style="colorStyle">
|
|
<view class='commission-details'>
|
|
<view class='commission-details'>
|
|
- <view class='search acea-row row-between-wrapper' v-if="recordType != 1 && recordType != 4 && recordType!=5">
|
|
|
|
|
|
+ <view class='search acea-row row-between-wrapper' v-if="recordType != 1 && recordType != 4 && recordType!=5 && recordType!= 6">
|
|
<view class='input'>
|
|
<view class='input'>
|
|
<text class="iconfont icon-sousuo4"></text>
|
|
<text class="iconfont icon-sousuo4"></text>
|
|
<input placeholder='搜索用户名称' placeholder-class='placeholder' v-model="keyword" @confirm="submitForm"
|
|
<input placeholder='搜索用户名称' placeholder-class='placeholder' v-model="keyword" @confirm="submitForm"
|
|
@@ -10,7 +10,7 @@
|
|
</view>
|
|
</view>
|
|
<timeSlot @changeTime="changeTime" v-if="recordType!=5"></timeSlot>
|
|
<timeSlot @changeTime="changeTime" v-if="recordType!=5"></timeSlot>
|
|
<view class='sign-record'>
|
|
<view class='sign-record'>
|
|
- <view class="top_num" v-if="recordType != 4 && recordList.length && recordType!=5">
|
|
|
|
|
|
+ <view class="top_num" v-if="recordType != 4 && recordList.length && recordType!=5 && recordType!=6">
|
|
支出:¥{{expend || 0}} 收入:¥{{income || 0}}
|
|
支出:¥{{expend || 0}} 收入:¥{{income || 0}}
|
|
</view>
|
|
</view>
|
|
<view class="top_num top_num_2" v-if="recordType == 5">
|
|
<view class="top_num top_num_2" v-if="recordType == 5">
|
|
@@ -30,7 +30,7 @@
|
|
<view>
|
|
<view>
|
|
<view class='name line1'>
|
|
<view class='name line1'>
|
|
|
|
|
|
- <text v-if="recordType!=5">{{item.title}}</text>
|
|
|
|
|
|
+ <text v-if="recordType!=5 && recordType!=6">{{item.title}}</text>
|
|
<text v-else>{{item.content}}</text>
|
|
<text v-else>{{item.content}}</text>
|
|
<!-- <text class="status_badge success" v-if="recordType == 4 && item.status == 1">审核通过</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 default" v-if="recordType == 4 && item.status == 0">待审核</text>
|
|
@@ -38,17 +38,21 @@
|
|
<!-- 提现记录: 0 待审核 1 通过 2 未通过 -->
|
|
<!-- 提现记录: 0 待审核 1 通过 2 未通过 -->
|
|
</view>
|
|
</view>
|
|
<view class="mark" v-if="recordType == 4 && item.mark && item.status !== 1">{{item.mark}}</view>
|
|
<view class="mark" v-if="recordType == 4 && item.mark && item.status !== 1">{{item.mark}}</view>
|
|
- <view v-if="recordType!=5">{{item.add_time}}</view>
|
|
|
|
|
|
+ <view v-if="recordType!=5 && recordType!=6">{{item.add_time}}</view>
|
|
<view v-else>{{item.create_time}}</view>
|
|
<view v-else>{{item.create_time}}</view>
|
|
</view>
|
|
</view>
|
|
- <template v-if="recordType!=5">
|
|
|
|
|
|
+ <template v-if="recordType!=5 && recordType!=6">
|
|
<view class='num font-color' v-if="item.pm == 1">+{{item.number}}</view>
|
|
<view class='num font-color' v-if="item.pm == 1">+{{item.number}}</view>
|
|
<view class='num' v-else>-{{item.number}}</view>
|
|
<view class='num' v-else>-{{item.number}}</view>
|
|
</template>
|
|
</template>
|
|
- <template v-else>
|
|
|
|
|
|
+ <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>
|
|
<view class='num' v-else>-{{item.shareholding}}</view>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template v-if="recordType == 6">
|
|
|
|
+ <view class='num font-color' v-if="item.pm == 1">+{{item.performance}}</view>
|
|
|
|
+ <view class='num' v-else>-{{item.performance}}</view>
|
|
|
|
+ </template>
|
|
</view>
|
|
</view>
|
|
<!-- </block> -->
|
|
<!-- </block> -->
|
|
</view>
|
|
</view>
|
|
@@ -78,7 +82,8 @@
|
|
getSpreadInfo,
|
|
getSpreadInfo,
|
|
getGqList,
|
|
getGqList,
|
|
getStaffInfo,
|
|
getStaffInfo,
|
|
- getUserInfo
|
|
|
|
|
|
+ getUserInfo,
|
|
|
|
+ getYjList
|
|
} from '@/api/user.js';
|
|
} from '@/api/user.js';
|
|
import {
|
|
import {
|
|
toLogin
|
|
toLogin
|
|
@@ -99,6 +104,7 @@
|
|
mixins: [colors],
|
|
mixins: [colors],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ timer: '',
|
|
userInfo: {},
|
|
userInfo: {},
|
|
staffInfo: {},
|
|
staffInfo: {},
|
|
name: '',
|
|
name: '',
|
|
@@ -163,6 +169,15 @@
|
|
this.name = '股权明细';
|
|
this.name = '股权明细';
|
|
|
|
|
|
this.getStaffInfo()
|
|
this.getStaffInfo()
|
|
|
|
+ }else if(type == 6) {
|
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
|
+ title: "业绩记录"
|
|
|
|
+ });
|
|
|
|
+ this.recordType = 6;
|
|
|
|
+ this.name = '业绩明细';
|
|
|
|
+
|
|
|
|
+ this.getStaffInfo()
|
|
|
|
+ // this.getYjList()
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '参数错误',
|
|
title: '参数错误',
|
|
@@ -186,6 +201,35 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getYjList(time,type) {
|
|
|
|
+ let that = this;
|
|
|
|
+ let page = that.page;
|
|
|
|
+ let limit = that.limit;
|
|
|
|
+ if(type = 're') {
|
|
|
|
+ page = 1
|
|
|
|
+ that.loading = false
|
|
|
|
+ that.loadend = false
|
|
|
|
+ this.recordList = []
|
|
|
|
+ }
|
|
|
|
+ if (that.loading) return;
|
|
|
|
+ if (that.loadend) return;
|
|
|
|
+ getYjList({
|
|
|
|
+ page: page,
|
|
|
|
+ limit: limit,
|
|
|
|
+ create_time: that.timer,
|
|
|
|
+ member_id: that.staffInfo.id
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.recordList = this.recordList.concat(res.data.list)
|
|
|
|
+ let loadend = res.data.list.length < that.limit;
|
|
|
|
+ that.loadend = loadend;
|
|
|
|
+ that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
|
|
|
|
+ that.page += 1;
|
|
|
|
+ that.loading = false;
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ that.loading = false;
|
|
|
|
+ that.loadTitle = '加载更多';
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 显示详细
|
|
// 显示详细
|
|
showDetail(item){
|
|
showDetail(item){
|
|
uni.showModal({
|
|
uni.showModal({
|
|
@@ -215,14 +259,40 @@
|
|
this.$set(this, 'times', []);
|
|
this.$set(this, 'times', []);
|
|
this.getRecordList();
|
|
this.getRecordList();
|
|
},
|
|
},
|
|
|
|
+ getTimeStr(timestamp) {
|
|
|
|
+ let date;
|
|
|
|
+ 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)
|
|
|
|
+ },
|
|
changeTime(time) {
|
|
changeTime(time) {
|
|
- this.start = time.start
|
|
|
|
- this.stop = time.stop
|
|
|
|
- this.page = 1;
|
|
|
|
- // this.loading = false;
|
|
|
|
- this.loadend = false;
|
|
|
|
- this.$set(this, 'recordList', []);
|
|
|
|
- this.getRecordList();
|
|
|
|
|
|
+ console.log(time,'time')
|
|
|
|
+ if(this.recordType == 6) {
|
|
|
|
+ let times = ''
|
|
|
|
+ if(time.start == 0 && time.stop == 0 ) {
|
|
|
|
+ console.log('全部')
|
|
|
|
+ this.timer = '2020/01/01-' + this.getTimeStr()
|
|
|
|
+ }else {
|
|
|
|
+ this.timer = this.getTimeStr(time.start) + '-' + this.getTimeStr(time.stop)
|
|
|
|
+ }
|
|
|
|
+ console.log(this.timer,'timer')
|
|
|
|
+ this.getYjList()
|
|
|
|
+ }else {
|
|
|
|
+ this.start = time.start
|
|
|
|
+ this.stop = time.stop
|
|
|
|
+ this.page = 1;
|
|
|
|
+ // this.loading = false;
|
|
|
|
+ this.loadend = false;
|
|
|
|
+ this.$set(this, 'recordList', []);
|
|
|
|
+ this.getRecordList();
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
getGqList() {
|
|
getGqList() {
|
|
let that = this;
|
|
let that = this;
|
|
@@ -250,14 +320,16 @@
|
|
let that = this
|
|
let that = this
|
|
getUserInfo().then(res => {
|
|
getUserInfo().then(res => {
|
|
that.userInfo = res.data
|
|
that.userInfo = res.data
|
|
- that.getGqList();
|
|
|
|
|
|
+ if(this.recordType == 5) {
|
|
|
|
+ that.getGqList();
|
|
|
|
+ }
|
|
getStaffInfo({
|
|
getStaffInfo({
|
|
uid: res.data.uid
|
|
uid: res.data.uid
|
|
}).then(ress => {
|
|
}).then(ress => {
|
|
- console.log(ress)
|
|
|
|
-
|
|
|
|
that.staffInfo = ress.data.list[0]
|
|
that.staffInfo = ress.data.list[0]
|
|
-
|
|
|
|
|
|
+ if(this.recordType == 6) {
|
|
|
|
+ that.getYjList()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
|
|
@@ -317,7 +389,13 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onReachBottom: function() {
|
|
onReachBottom: function() {
|
|
- this.getRecordList();
|
|
|
|
|
|
+ if(this.recordType == 5) {
|
|
|
|
+ this.getGqList()
|
|
|
|
+ }else if(this.recordType == 6){
|
|
|
|
+ this.getYjList()
|
|
|
|
+ }else {
|
|
|
|
+ this.getRecordList();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|