【前端】云工厂的纸掌柜app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

236 lines
5.4 KiB

<template>
<view class="warpper">
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback" style="background-color: #FFFFFF;">
<view class="sum-box">
<view class="">
<view class="title">交易金额</view>
<view class="value">458 682.00</view>
</view>
<view class="">
<view class="title">总交易量()</view>
<view class="value">125.7752</view>
</view>
</view>
<uGap></uGap>
<view class="card-box">
<view class="header">
<view class="left-title">XJ 202112235389</view>
<view class="right-title">¥ 22045.78</view>
</view>
<view class="content">
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image>
<view class="">
<view class="title">金蝶蓝白卡</view>
<view class="desc">白卡纸/金蝶蓝/350g/787*1092/2200</view>
</view>
</view>
<view class="content">
<image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/ztb_pic/testPic.jfif" mode=""></image>
<view class="">
<view class="title">丽盈白卡</view>
<view class="desc">白卡纸/丽盈/350g/787*1092/2200</view>
</view>
</view>
<view class="other">
<view class="time">2021-12-23 12:30:45</view>
<view class="btn">
更多详情
<image class="icon" src="/static/imgs/client-detail/arrow-right-icon.png"></image>
</view>
</view>
<uGap></uGap>
</view>
</scroll-list>
</view>
</template>
<script>
import uGap from '@/components/u-gap/u-gap.vue'
import { getBasePaperDeals } from '@/apis/clientDetailApi.js'
export default {
components: { uGap },
data() {
return {
option: {
size: 10,
auto: true,
emptyText: '暂无数据~',
background: '#F7F8FA',
disabled: false
},
params: {
asc: '',
desc: '',
customerEnterpriseId: '', // 客户企业ID默认为空,传值时网关获取当前用户关联企业id失效
mallSupplierId: '', // 供应商id
status: '0', // 状态 0 全部 待发货/30106,待收货/30107,待借款/30207,已完成/30104
enterpriseIds: [] //企业ID集合网关获取
},
pagination: {
pageNum: 0, // 初始会执行一次下拉加载
pageSize: 10
},
list: []
}
},
methods: {
getList() {
return new Promise((resolve, reject) => {
getBasePaperDeals({ ...this.params, ...this.pagination })
.then(res => {
console.log('原纸交易', res)
if (res) {
if (this.pagination.pageNum == 1) {
this.list = res.records
} else {
this.list = this.list.concat(res.records)
}
// this.list = []
// this.list = [...this.list, ...[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]
resolve({ list: this.list, total: res.total })
}
})
.catch(err => {
reject(err)
})
})
},
downCallback() {
this.pagination.pageNum = 1
this.getList()
.then(({ list, total }) => {
this.$refs.list.refreshSuccess({ list, total })
})
.catch(() => {
this.$refs.list.refreshFail()
})
},
upCallback() {
this.pagination.pageNum++
this.getList()
.then(({ list, total }) => {
this.$refs.list.loadSuccess({ list, total })
})
.catch(() => {
this.$refs.list.loadFail()
})
}
}
}
</script>
<style lang="scss">
.warpper {
width: 750rpx;
.sum-box {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
// text-align: center;
height: 184rpx;
background: url('/static/imgs/client-detail/yzjy-icon.png') no-repeat;
background-size: 100%;
.title {
font-size: 26rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
}
.value {
font-size: 56rpx;
color: #ffffff;
letter-spacing: 0;
text-align: left;
font-weight: 500;
margin-top: 16rpx;
}
}
.card-box {
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 88rpx;
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
padding: 0rpx 32rpx;
.left-title {
font-size: 30rpx;
color: #000000;
letter-spacing: 0;
font-weight: 600;
}
.right-title {
font-size: 30rpx;
color: #ff5368;
letter-spacing: 0;
text-align: right;
font-weight: 500;
}
}
.content {
display: flex;
flex-direction: row;
align-items: center;
height: 148rpx;
background: #ffffff;
border-bottom: 2rpx solid #dddddd;
padding: 0rpx 32rpx;
.image {
width: 100rpx;
height: 100rpx;
flex: 0 0 100rpx;
margin-right: 20rpx;
}
.title {
font-size: 30rpx;
color: #333333;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.desc {
padding-top: 26rpx;
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
}
.other {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 80rpx;
background: #ffffff;
padding: 0rpx 32rpx;
.time {
font-size: 26rpx;
color: #888888;
letter-spacing: 0;
text-align: left;
font-weight: 400;
}
.btn {
font-size: 28rpx;
color: #007aff;
letter-spacing: 0;
text-align: center;
font-weight: 500;
display: flex;
align-items: center;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
}
}
</style>