| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
- <template>
- <view>
- <u-picker v-model="showTime" mode="time" :params="params" :default-time="defaultTime" @confirm="confirmTime">
- </u-picker>
- <view class="top">
- <view class="tixian">
- <view class="value" style="margin-bottom: 50rpx;">
- <text>总应收</text>
- <text class="text-price">{{shopData.totalFunkPrice}}</text>
- </view>
- <view class="flex justify-center align-center">
- <view class="cu-btn btn round" style="padding: 24rpx 50rpx;" hover-class="hoverClass1"
- @click="$jump('/pages/withdraw/withdraw')">
- 提现
- </view>
- </view>
- </view>
- <view style="display: flex;justify-content: flex-start;">
- <view class="value">
- <text>余额</text>
- <text class="text-price">{{$digital.floatSub(shopData.withdrawTotalPrice, shopData.totalPointValue)}}</text>
- </view>
- </view>
- </view>
- <view class="margin-top-20" style="margin-bottom: -10rpx;">
- <u-tabs active-color="#FC8D38" :active-item-style="activeItemStyle" :list="tabslist" bg-color="#f1f1f1"
- :current="current" @change="change"></u-tabs>
- </view>
- <view class="data">
- <view class="left">
- <view @click.stop="showTime = true">
- <text>{{defaultTime}}</text>
- <text class="cuIcon-unfold padding-left-10"></text>
- </view>
- <!-- <view>
- <text>支出 ¥ 165.00 收入 ¥ 463.00</text>
- </view> -->
- </view>
- <view class="right">
- <text>统计</text>
- <text class="cuIcon-right"></text>
- </view>
- </view>
- <view class="card">
- <view v-if="current==0" style="display: flex;">
- <view class="area1 area-padding " style="padding-left: 40rpx;">
- <text>积分来源</text>
- </view>
- <view class="area2 area-padding">
- <text>折扣</text>
- </view>
- <view class="area3 area-padding u-text-right u-p-r-20">
- <text>价值</text>
- </view>
- </view>
- <view v-if="current==1" style="display: flex;">
- <view class="area1 area-padding " style="padding-left: 40rpx;">
- <text>积分来源</text>
- </view>
- <view class="area2 area-padding">
- <text>积分</text>
- </view>
- <view class="area3 area-padding u-text-right u-p-r-20">
- <text>价值</text>
- </view>
- </view>
- <mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
- :down="downOption" :up="upOption">
- <view @click="$jump('/pages/bill/billDetail?billDetail='+JSON.stringify(item)+'¤t='+current)"
- class="item" hover-class="hoverClass" v-for="(item,index) in list" :key="index">
- <block v-if="current==1">
- <view class="area1">
- <view class="item-padding">
- <image :src="item.channelLogo" mode="aspectFit"></image>
- <view class="">
- <text>{{item.channelName}}</text>
- <text>{{item.jsTime}}</text>
- </view>
- </view>
- </view>
- <view class="area2 text-area ">
- <view class="item-padding">
- <image style="width: 35rpx;height: 35rpx;margin-bottom: -5rpx;"
- src="@/static/icon/points-value.png"></image>
- <text style="font-size: 32rpx;margin-left: 10rpx;color: #F39248;">+{{item.point}}</text>
- </view>
- </view>
- <view class="area3 text-area ">
- <view class="item-padding" style="font-size: 34rpx;color: #000;">¥{{item.pointValue}}</view>
- </view>
- </block>
- <block v-if="current==0">
- <view class="area1">
- <view class="item-padding">
- <image style="border-radius: 50%;"
- :src="item.userAvator?item.userAvator:'/static/icon/avatar.png'" mode="aspectFit">
- </image>
- <view class="margin-left-10">
- <text>{{item.userName || '用户支付'}}</text>
- <text>{{item.updateTime}}</text>
- </view>
- </view>
- </view>
- <view class="area2 text-area" style="width: 15%;">
- <view class="item-padding">
- <text>{{item.subsidy==1?'无折扣':$digital.floatMul(item.subsidy , 10) +'折'}}</text>
- </view>
- </view>
- <view class="area3 text-area u-p-r-20" style="width: 30%;">
- <view class="item-padding"
- style="flex:1;text-align: right;font-size: 34rpx;color: #F39248;">
- +¥{{item.realPayAmount}}</view>
- </view>
- </block>
- </view>
- </mescroll-body>
- </view>
- </view>
- </template>
- <script>
- import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- data() {
- return {
- activeItemStyle: {
- fontWeight: 800,
- fontSize: '36rpx'
- },
- tabslist: [{
- name: '余额明细'
- }, {
- name: '应收明细'
- }],
- current: 0,
- list: [],
- downOption: {
- auto: false
- },
- upOption: {
- empty: {
- fixed: true,
- top: "-180rpx"
- }
- },
- showTime: false,
- params: {
- year: true,
- month: true,
- },
- defaultTime: '',
- shopData: {},
- height: '',
- }
- },
- onLoad() {
- this.defaultTime=this.$dateTime.format(new Date(),'YYYY-mm')
- this.shopDetail()
- },
- onReady() {
- this.defaultTime = this.$dateTime.format(new Date(), 'YYYY-mm')
- this.getElInfo()
- },
- methods: {
- async getElInfo() {
- let rectInfo = await this.$u.getRect('.card');
- this.height = this.$u.sys().windowHeight - rectInfo.top + 'px'
- },
- async shopDetail() {
- let params = {
- id: this.vuex_shopId
- }
- let res = await this.$api.shop.detail(params)
- this.shopData = res.data
- },
- async shop() {
- let params = {}
- let res = await this.$api.shop.remainDetailPage(params)
- },
- confirmTime(e) {
- this.defaultTime = e.year + '-' + e.month
- this.downCallback()
- },
- upCallback(mescroll) {
- if (!this.vuex_shopId) {
- return
- }
- let params = {
- shopId: this.vuex_shopId,
- current: mescroll.num,
- size: mescroll.size,
- }
- if (this.defaultTime) {
- params.monthTime = this.defaultTime
- } else {
- params.monthTime = this.$dateTime.format(new Date(), 'YYYY-mm')
- }
- try {
- if (this.current == 1) {
- this.$api.shop.yingshouPage(params).then(res => {
- let data = res.data.records
- let total = res.data.total
- mescroll.endBySize(data.length, total);
- if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
- this.list = this.list.concat(data); //追加新数据
- })
- } else if (this.current == 0) {
- this.$api.shop.remainDetailPage(params).then(res => {
- let data = res.data.records
- let total = res.data.total
- mescroll.endBySize(data.length, total);
- if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
- this.list = this.list.concat(data); //追加新数据
- })
- }
- } catch (e) {
- this.mescroll.endErr()
- }
- },
- downCallback() {
- setTimeout(() => {
- this.mescroll.resetUpScroll();
- }, 200)
- },
- change(index) {
- this.current = index;
- this.downCallback()
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .btn {
- background-color: #FC8D38;
- color: #FFFFFF;
- border-radius: 50rpx;
- border: 1rpx solid #FFFFFF;
- }
- .hoverClass1 {
- box-shadow: 0rpx 0rpx 10rpx #DDDDDD;
- }
- .top {
- padding: 36rpx 50rpx;
- background-image: linear-gradient(to right, #FBA33D, #FF8D32);
- display: flex;
- flex-direction: column;
- justify-content: center;
- .tixian {
- display: flex;
- justify-content: space-between;
- }
- .value {
- display: flex;
- flex-direction: column;
- text-align: center;
- text:first-child {
- text-align: left;
- color: #FCD7BD;
- font-size: 32rpx;
- }
- text:last-child {
- padding-top: 10rpx;
- font-size: 60rpx;
- color: #FFFFFF;
- }
- }
- }
- .data {
- padding: 50rpx 0 25rpx 40rpx;
- display: flex;
- justify-content: space-between;
- .left {
- display: flex;
- flex-direction: column;
- view:first-child {
- font-size: 34rpx;
- color: #000;
- padding-bottom: 10rpx;
- }
- view:last-child {
- font-size: 26rpx;
- color: #666666;
- }
- }
- .right {
- padding-right: 20rpx;
- color: #666666;
- display: flex;
- justify-content: center;
- align-items: center;
- text-align: center;
- }
- }
- .card {
- background-color: #FFFFFF;
- .area-padding {
- padding: 40rpx 0 20rpx;
- }
- .text-area {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- }
- .area1 {
- padding-left: 30rpx;
- width: 55%;
- view:first-child {
- display: flex;
- image {
- width: 80rpx;
- height: 80rpx
- }
- view {
- padding-left: 15rpx;
- padding-bottom: 5rpx;
- display: flex;
- flex-direction: column;
- text:first-child {
- font-size: 32rpx;
- padding-bottom: 10rpx;
- color: #000;
- }
- text:last-child {
- font-size: 22rpx;
- color: #888888;
- }
- }
- }
- }
- .area2 {
- width: 25%;
- }
- .area3 {
- width: 20%;
- }
- .item-padding {
- padding: 20rpx 0;
- }
- .item {
- padding: 5rpx;
- display: flex;
- border-bottom: 1rpx solid #DDDDDD;
- }
- .item:last-child {
- border: none;
- }
- }
- </style>
|