| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- <template>
- <view>
- <u-picker v-model="showTime" mode="time" :params="params" @confirm="confirmTime"></u-picker>
- <view class="top">
- <view class="value">
- <text>交易笔数</text>
- <text class="count">{{payCount}}</text>
- </view>
- </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>
- <view class="right" @click="$jump('/pagesA/pages/bill/statistics')">
- <text>统计</text>
- <text class="cuIcon-right"></text>
- </view>
- </view>
- <view class="card">
- <view style="display: flex;justify-content: space-between;padding:30rpx 30rpx 20rpx 80rpx;">
- <view >
- <text>交易方</text>
- </view>
- <view >
- <text>交易金额</text>
- </view>
- </view>
- <mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
- :up="upOption">
- <view @click="$jump('/pagesA/pages/bill/bill-detail?billDetail='+JSON.stringify(item)+'&type=all')" class="item" hover-class="hoverClass"
- v-for="(item,index) in list" :key="index">
- <view class="area1">
- <view class="item-padding" v-if="item.type=='AGENT_CHARGE'">
- <image src="../../../static/logo.png" style="border-radius: 50%;" ></image>
- <view class="">
- <text>联兑通</text>
- <text>{{item.createTime}}</text>
- </view>
- </view>
- <view class="item-padding" v-else>
- <image :src="item.receiverLogo" style="border-radius: 50%;" ></image>
- <view class="">
- <text>{{item.receiverName}}</text>
- <text>{{item.createTime}}</text>
- </view>
- </view>
- </view>
- <view class="area3 text-area u-flex-1" >
- <view class="item-padding" style="text-align: right;flex:1;font-size: 34rpx;margin-right: 20rpx;">
- <text class="price reduce" v-if="item.type=='USER_PAY'" style="color: #F39248;">{{item.totalPrice}}</text>
- <text class="plus price" v-if="item.type=='AGENT_CHARGE'" style="color: #F39248;">{{item.price}}</text>
- </view>
- </view>
- </view>
- </mescroll-body>
- </view>
- <toast ref="toast" ></toast>
- </view>
- </template>
- <script>
- import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- data() {
- return {
- payCount:0,
- list:[],
- downOption:{
- auto:false
- },
- showTime:false,
- params: {
- year: true,
- month: true,
- },
- defaultTime:'',
- height:''
- }
- },
- onLoad(options) {
- // this.defaultTime =this.$dateTime.format(new Date(),'YYYY-mm')
- },
- onReady() {
- this.getElInfo()
- },
- methods: {
- async getElInfo() {
- let rectInfo = await this.$u.getRect('.card');
- this.height = this.$u.sys().windowHeight - rectInfo.top + 'px'
- },
- confirmTime(e){
- this.defaultTime = e.year + '-' +e.month
- this.mescroll.resetUpScroll();
- },
- upCallback(mescroll) {
- let params = {
- current:mescroll.num,
- size:mescroll.size,
- payId:this.vuex_userId,
- payStatus:'付款成功'
- }
- if (this.defaultTime) {
- params.yearMoth = this.$dateTime.format(new Date(this.defaultTime))
- }
- try {
- this.$api.bills.list(params).then(res => {
- let data = res.data.records
- let total = res.data.total
- this.payCount=total
- mescroll.endBySize(data.length, total);
- if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
- this.list = this.list.concat(data); //追加新数据
- })
- } catch (e) {
- console.log(e);
- this.mescroll.endErr()
- }
- },
- downCallback() {
- let _this=this
- setTimeout(() => {
- _this.mescroll.resetUpScroll();
- setTimeout(()=>{
- _this.$refs.toast.info('刷新成功')
- },150)
- },500)
- },
-
- }
- }
- </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: 50rpx;
- background-color: #FC8D38;
- display: flex;
- justify-content: space-between;
- .value {
- display: flex;
- flex-direction: column;
- text-align: center;
- text:first-child {
- color: #FCE7D6;
- font-size: 32rpx;
- }
- text:last-child {
- padding-top: 10rpx;
- font-size: 70rpx;
- 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;
- }
- }
-
- .count::after {
- content: '笔';
- margin-left: 6rpx;
- font-size: 0.5em;
- }
- .price::after {
- content: '元';
- margin-left: 6rpx;
- font-size: 0.5em;
- }
-
- .reduce::before {
- content: '-';
- margin-right: 10rpx;
- }
- .plus::before {
- content: '+';
- margin-right: 10rpx;
- }
- </style>
|