123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <template>
- <view class="settlement-pages">
- <!-- 授信结算 -->
- <view class="sxjs-box" v-if="settlementType == 'CREDIT'">
- <view class="sxjs-head flex flex_column align-center justify_center">
- <view>已用额度</view>
- <view class="edu">
- ¥<text>{{info.usedAmount}}</text>
- </view>
- <view>
- <u-button :throttle-time="100" size="mini" @click="viewDetail" :custom-style="{background:'#066cff',color:'#fff'}" shape="circle" type="success">查看详情</u-button>
- </view>
- </view>
- <view class="sxjs-head-grid flex align-center justify_between">
- <view>
- <view>授信额度</view>
- <view class="edu">¥<text>{{info.creditLimit}}</text></view>
- </view>
- <view>
- <view>可用额度</view>
- <view class="edu">¥<text>{{info.usableAmount}}</text></view>
- </view>
- </view>
- </view>
- <!-- 按月结算 -->
- <view class="ayjs-box" v-if="settlementType == 'MONTH'">
- <view class="ayjs-head flex flex_column align-center justify_center">
- <view>累计待结算</view>
- <view class="edu">
- ¥<text>{{info.waitSettleAmount}}</text>
- </view>
- <view v-if="info.waitSettleAmount">
- <u-button :throttle-time="100" size="mini" @click="viewDetail('-1')" :custom-style="{background:'#066cff',color:'#fff'}" shape="circle" type="success">查看详情</u-button>
- </view>
- </view>
- <view class="jsList">
- <view v-for="item in ayJsList" :key="item.month" class="flex align-center justify_between" @click="viewDetail(item.month)">
- <view>{{item.month}}月</view>
- <view>
- <text>¥{{item.settleAmount}}</text>
- <u-icon color="#999" size="20" name="arrow-right"></u-icon>
- </view>
- </view>
- <view style="padding-top: 10%;border:0" v-if="ayJsList.length==0 && status!='loading'">
- <u-empty :src="`/static/nodata.png`" icon-size="120" text="暂无数据" img-width="120" mode="list"></u-empty>
- </view>
- <view style="padding: 20upx;border:0" v-if="(total>=ayJsList.length&&ayJsList.length)||status=='loading'">
- <u-loadmore :status="status" />
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {findStoreShelfSettleRule,waitSettleForMonth} from '@/api/shelf'
- export default {
- components: {
- },
- data() {
- return {
- settlementType: '',
- info: null,
- ayJsList: [],
- status: '',
- total: 0
- }
- },
- onReady() {
- },
- onNavigationBarButtonTap(btns){
- // 结算记录
- if(btns.index == 0){
- uni.navigateTo({
- url: "/pagesA/digitalShelf/settlementRecord/settlementRecord"
- })
- }
- },
- onShow() {
- this.getDetail()
- },
- methods: {
- // 查询详情
- getDetail(){
- findStoreShelfSettleRule().then(res => {
- console.log(res)
- if(res.status == 200){
- this.info = res.data
- this.settlementType = res.data.settleType
- if(this.settlementType == "MONTH"){
- // 获取待结算列表
- this.getAyDjsList()
- }
- }
- })
- },
- // 获取待结算列表
- getAyDjsList(){
- this.status = 'loading'
- waitSettleForMonth().then(res => {
- console.log(res)
- this.ayJsList = res.data || []
- this.total = this.ayJsList.length
- this.status = ''
- })
- },
- // 已用额度详情
- viewDetail(month){
- if(this.settlementType == 'CREDIT'){
- uni.navigateTo({
- url: "/pagesA/digitalShelf/settlementManage/settlementSxDetail?data="+encodeURIComponent(JSON.stringify(this.info))
- })
- }else{
- uni.navigateTo({
- url: "/pagesA/digitalShelf/settlementManage/settlementAyDetail?month="+month+"&data="+encodeURIComponent(JSON.stringify(this.info))
- })
- }
- }
- }
- }
- </script>
- <style lang="less">
- .settlement-pages{
- min-height: 100vh;
- > view{
- padding: 30rpx 50rpx;
- }
- .sxjs-box{
- > view{
- background-color: #fff;
- border-radius: 25rpx;
- margin-bottom: 20rpx;
- min-height: 100rpx;
- padding: 30rpx;
- color: #666;
- }
- .sxjs-head{
- width: 100%;
- text-align: center;
- font-size: 30rpx;
- .edu{
- color: #FA3534;
- padding: 10rpx 0;
- font-size: 36rpx;
- text{
- font-size: 46rpx;
- font-style: italic;
- font-weight: 900;
- }
- }
- }
- .sxjs-head-grid{
- > view{
- width: 50%;
- border-right: 2rpx solid #eee;
- text-align: center;
- .edu{
- text{
- font-size: 40rpx;
- color: #222;
- }
- }
- &:last-child{
- border: 0;
- }
- }
- }
- }
- .ayjs-box{
- > view{
- background-color: #fff;
- border-radius: 25rpx;
- margin-bottom: 20rpx;
- min-height: 100rpx;
- padding: 30rpx;
- color: #666;
- }
- .ayjs-head{
- width: 100%;
- text-align: center;
- font-size: 30rpx;
- .edu{
- color: #FA3534;
- padding: 10rpx 0;
- font-size: 36rpx;
- text{
- font-size: 46rpx;
- font-style: italic;
- font-weight: 900;
- }
- }
- }
- .jsList{
- > view{
- border-bottom: 2rpx solid #eee;
- padding: 20rpx 10rpx;
- text{
- margin-left: 10rpx;
- }
- &:last-child{
- border: 0;
- }
- }
- }
- }
- }
- </style>
|