|
|
@ -7,7 +7,7 @@ |
|
|
|
<view class="status_bar"></view> |
|
|
|
<view class="" style="height: 30rpx;"></view> |
|
|
|
<view class="userInfo"> |
|
|
|
<view class="tit">Hi,{{ vuex_userInfo.name }}教练</view> |
|
|
|
<view class="tit">Hi,{{ vuex_userInfo.name }} {{identity}}</view> |
|
|
|
<view class="flex userRow"> |
|
|
|
<view class="schoolIcon"> |
|
|
|
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image> |
|
|
@ -31,12 +31,18 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="h1"> 结算统计</view> |
|
|
|
<view class="tab_box"> |
|
|
|
<tabDate /> |
|
|
|
</view> |
|
|
|
<!-- <view class="tab_box"> --> |
|
|
|
<view class="tabBox"> |
|
|
|
<view class="tabs"> |
|
|
|
<view class="tab" @click="tabClick(1)" :class="{active: currentTab==1}">最近五天</view> |
|
|
|
<view class="tab" @click="tabClick(2)" :class="{active: currentTab==2}">最近半年</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <tabDate /> --> |
|
|
|
<!-- </view> --> |
|
|
|
<view class="card"> |
|
|
|
<view class="chart"> |
|
|
|
<columnChart /> |
|
|
|
<columnChart :chartData="chartData"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex-b"> |
|
|
@ -53,12 +59,7 @@ |
|
|
|
|
|
|
|
<UserTab name ='统计'></UserTab> |
|
|
|
|
|
|
|
<u-popup :show="show" mode="center" round="20rpx"> |
|
|
|
<view class="box"> |
|
|
|
<view class="tit">您还未上传签名请尽快上传!</view> |
|
|
|
<view class="btnBg" @click="goPage">去签名</view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -68,10 +69,11 @@ |
|
|
|
import columnChart from './comp/columnChart' |
|
|
|
import tabDate from './comp/tabDate' |
|
|
|
import { imgUrl } from '@/config/site.config' |
|
|
|
import { needSign } from '@/config/api.js' |
|
|
|
import { |
|
|
|
getSettlementStatistics, |
|
|
|
settle_list |
|
|
|
settle_list, |
|
|
|
getDaySettlement, |
|
|
|
getMonthSettlement |
|
|
|
} from '@/config/api.js' |
|
|
|
export default { |
|
|
|
components: { |
|
|
@ -88,34 +90,62 @@ |
|
|
|
imgUrl: imgUrl+'indexTopBanner.png', |
|
|
|
backgroundSize: '100% 492rpx', |
|
|
|
show: false, |
|
|
|
chartData: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
uni.hideTabBar(); |
|
|
|
this.getSettlementStatisticsFn() |
|
|
|
this.settle_listFn() |
|
|
|
this.getDaySettlement() |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
this.needSignFn() |
|
|
|
|
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 是不是需要签 |
|
|
|
async needSignFn() { |
|
|
|
const {data: res} = await needSign() |
|
|
|
if(res) { |
|
|
|
this.show = true |
|
|
|
// 结算统计按月查询 |
|
|
|
async getDaySettlement() { |
|
|
|
let obj = { |
|
|
|
// startDate: 20240406, |
|
|
|
// endDate: 20240605, |
|
|
|
// coachId: this.vuex_coachId, |
|
|
|
schoolId: this.vuex_schoolId |
|
|
|
} |
|
|
|
let data = {} |
|
|
|
let categories = [] |
|
|
|
if(this.currentTab==1) { |
|
|
|
data = await getDaySettlement(obj) |
|
|
|
categories = data.data.map(item=> { |
|
|
|
let str = item.refreshDate.slice(2,8) |
|
|
|
return str.slice(0, 2) + '-' + str.slice(2, 4) + '-' + str.slice(4, 6) |
|
|
|
}) |
|
|
|
}else { |
|
|
|
data = await getMonthSettlement(obj) |
|
|
|
categories = data.data.map(item=> { |
|
|
|
return item.refreshDate.slice(0, 4) + '-' + item.refreshDate.slice(4) |
|
|
|
}) |
|
|
|
} |
|
|
|
let res = data.data |
|
|
|
|
|
|
|
let amount = res.map(item=>item.amount) |
|
|
|
let chartData = { |
|
|
|
categories: categories, |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
name: "目标值", |
|
|
|
data: amount |
|
|
|
} |
|
|
|
] |
|
|
|
}; |
|
|
|
this.chartData = chartData |
|
|
|
}, |
|
|
|
goPage() { |
|
|
|
this.show = false |
|
|
|
this.$goPage('/pages/userCenter/signature/signature') |
|
|
|
}, |
|
|
|
|
|
|
|
tabClick(num) { |
|
|
|
if(num==this.currentTab) return |
|
|
|
this.currentTab = num |
|
|
|
this.getDaySettlement() |
|
|
|
}, |
|
|
|
async getSettlementStatisticsFn() { |
|
|
|
let obj = { |
|
|
@ -160,5 +190,6 @@ |
|
|
|
margin: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
|