|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <scroll-view refresher-enabled :refresher-triggered="isRefreshing" @refresherrefresh="onCustomRefresh"
|
|
|
+ <scroll-view refresher-enabled :refresher-triggered="isRefreshing" @refresherrefresh="onCustomRefresh"
|
|
|
class="scroll-view-class" @scrolltolower="scrolltolower" scroll-y>
|
|
|
<view class="income-main">
|
|
|
<view class="income-header card-box">
|
|
@@ -15,31 +15,50 @@
|
|
|
</view>
|
|
|
|
|
|
<view v-if="data.clientAccountChangeVOlist && data.clientAccountChangeVOlist.length > 0">
|
|
|
- <view class="card-box icome-item" v-for="item in data.clientAccountChangeVOlist" :key="item.code"
|
|
|
- @click="onClick(item)">
|
|
|
- <view class="card-left">
|
|
|
- <!-- <img :src="baseUrl" alt="" class="income-img"> -->
|
|
|
- <view class="card-left-text">
|
|
|
- <view class="card-left-name">
|
|
|
- <dict-tag :options="userType === 1?jlzj_client_source_type:jlzj_volunteer_source_type" :value="item.sourceType" />
|
|
|
-
|
|
|
-
|
|
|
- <!-- ({{ item.businessTierName }}) -->
|
|
|
- </view>
|
|
|
- <view class="card-left-date">
|
|
|
- {{ item.createTime }}
|
|
|
-
|
|
|
+ <view class="card-box " v-for="item in data.clientAccountChangeVOlist" :key="item.code"
|
|
|
+ style="padding-bottom: 0;" >
|
|
|
+ <view class="icome-item hr-solid ">
|
|
|
+ <view class="card-left">
|
|
|
+ <!-- <img :src="baseUrl" alt="" class="income-img"> -->
|
|
|
+ <view class="card-left-text">
|
|
|
+ <view class="card-left-name">
|
|
|
+ <dict-tag
|
|
|
+ :options="userType === 1 ? jlzj_client_source_type : jlzj_volunteer_source_type"
|
|
|
+ :value="item.sourceType" />
|
|
|
+
|
|
|
+ <!-- ({{ item.businessTierName }}) -->
|
|
|
+ </view>
|
|
|
+ <view class="card-left-date">
|
|
|
+ {{ item.createTime }}
|
|
|
+
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
- <view class="card-rigth"
|
|
|
- >
|
|
|
- <view :style="{ color: item.changeType === '1' ? 'rgba(76, 175, 80, 1)' : 'rgba(244, 67, 54, 1)' }">{{ item.changeType === '1' ? '+' : '-' }}{{ item.changeMoney }}</view>
|
|
|
+ <view class="card-rigth">
|
|
|
+ <view
|
|
|
+ :style="{ color: item.changeType === '1' ? 'rgba(76, 175, 80, 1)' : 'rgba(244, 67, 54, 1)' }">
|
|
|
+ {{ item.changeType === '1' ? '+' : '-' }}{{ item.changeMoney }}</view>
|
|
|
|
|
|
- <view class="is_pay_class" v-if="item.isPay !== '99'">
|
|
|
- <dict-tag :options="is_pay" :value="item.isPay" />
|
|
|
- </view>
|
|
|
+ <view class="is_pay_class" >
|
|
|
+ {{ item.afterBalance }}
|
|
|
+ <!-- <dict-tag :options="is_pay" :value="item.isPay" /> -->
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="flex_c_s card-item" @click="onBillClick(item)" v-if="['10', '11'].includes(item.sourceType)">
|
|
|
+ <view class="font-28-14">账单详情</view>
|
|
|
+ <view class="flex_c_r">
|
|
|
+ <view class="font-28-grey">点击查看账单详情</view>
|
|
|
+ <up-icon name="arrow-right" color="#7B7B7B" size="16"></up-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="flex_c_s card-item hr-solid-top" @click="onClick(item)" v-else>
|
|
|
+ <view class="font-28-14">订单详情</view>
|
|
|
+ <view class="flex_c_r">
|
|
|
+ <view class="font-28-grey">点击查看订单详情</view>
|
|
|
+ <up-icon name="arrow-right" color="#7B7B7B" size="16"></up-icon>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<up-loadmore style="margin-top: 40rpx;" :status="loadmoreInfo.status"
|
|
@@ -60,7 +79,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, computed } from 'vue'
|
|
|
-import { getAccountChangeList, getTotalMoney,getVolunteerTotalMoney,getVolunteerChangeList } from "@/api/mine";
|
|
|
+import { getAccountChangeList, getTotalMoney, getVolunteerTotalMoney, getVolunteerChangeList } from "@/api/mine";
|
|
|
import {
|
|
|
onShow
|
|
|
} from '@dcloudio/uni-app';
|
|
@@ -76,7 +95,7 @@ const {
|
|
|
jlzj_client_source_type,
|
|
|
jlzj_volunteer_source_type,
|
|
|
is_pay
|
|
|
-} = useDict('jlzj_money_change_type', 'jlzj_client_source_type','jlzj_volunteer_source_type','is_pay');
|
|
|
+} = useDict('jlzj_money_change_type', 'jlzj_client_source_type', 'jlzj_volunteer_source_type', 'is_pay');
|
|
|
const userType = uni.getStorageSync('userType') //读取本地存储
|
|
|
const data = ref({
|
|
|
totalEarning: 0,
|
|
@@ -119,10 +138,30 @@ const confirm = () => {
|
|
|
const cancel = () => {
|
|
|
show.value = false;
|
|
|
};
|
|
|
+const onBillClick = (record) => {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages_mine/pages/income/details?sourceId=${record.sourceId}&sourceType=${record.sourceType}`
|
|
|
+ })
|
|
|
+};
|
|
|
const onClick = (record) => {
|
|
|
- record.mainOrderId && uni.navigateTo({
|
|
|
- url: `/pages_classify/pages/orderItem/orderdetails?mainOrderId=${record.mainOrderId}`
|
|
|
- });
|
|
|
+ console.log("TCL: onClick -> record", record);
|
|
|
+
|
|
|
+ if (userType === 1) {
|
|
|
+ record.mainOrderId ? uni.navigateTo({
|
|
|
+ url: `/pages_classify/pages/orderItem/orderdetails?mainOrderId=${record.mainOrderId}`
|
|
|
+ }): uni.showToast({
|
|
|
+ title: '订单不存在',
|
|
|
+ icon: 'none',
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ record.secondOrderId ?uni.navigateTo({
|
|
|
+ url: `/pages_classify/pages/order/index?secondOrderId=${record.secondOrderId}&type=details`,
|
|
|
+ }): uni.showToast({
|
|
|
+ title: '订单不存在',
|
|
|
+ icon: 'none',
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
const scrolltolower = () => {
|
|
|
init('bottom')
|
|
@@ -157,9 +196,9 @@ const init = async (type) => {
|
|
|
const res = await listApi({
|
|
|
// createTime: dayjs(datetime.value).format('YYYY-MM-DD'),
|
|
|
pageNum: pages.value.current,
|
|
|
- pageSize: pages.value.pageSize,
|
|
|
+ pageSize: pages.value.pageSize,
|
|
|
});
|
|
|
- data.value.clientAccountChangeVOlist =type === 'top'? res.rows : [...data.value.clientAccountChangeVOlist, ...res.rows];
|
|
|
+ data.value.clientAccountChangeVOlist = type === 'top' ? res.rows : [...data.value.clientAccountChangeVOlist, ...res.rows];
|
|
|
pages.value.total = res.total;
|
|
|
} catch (error) {
|
|
|
console.log('error', error);
|
|
@@ -172,8 +211,8 @@ const init = async (type) => {
|
|
|
isRefreshing.value = false;
|
|
|
uni.hideLoading();
|
|
|
}
|
|
|
-
|
|
|
- if(data.value.clientAccountChangeVOlist.length === pages.value.total){
|
|
|
+
|
|
|
+ if (data.value.clientAccountChangeVOlist.length === pages.value.total) {
|
|
|
loadmoreInfo.value.status = 'nomore';
|
|
|
}
|
|
|
//
|
|
@@ -216,7 +255,7 @@ onShow(() => {
|
|
|
// left: 0px;
|
|
|
// right: 0px;
|
|
|
// bottom: 0px;
|
|
|
-
|
|
|
+
|
|
|
padding: 12px;
|
|
|
// overflow: auto;
|
|
|
|
|
@@ -256,6 +295,7 @@ onShow(() => {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
+ padding-bottom: 24rpx;
|
|
|
|
|
|
.card-left {
|
|
|
display: flex;
|
|
@@ -267,7 +307,7 @@ onShow(() => {
|
|
|
}
|
|
|
|
|
|
.card-left-text {
|
|
|
- margin-left: 12px;
|
|
|
+ // margin-left: 12px;
|
|
|
|
|
|
.card-left-name {
|
|
|
font-size: 16px;
|
|
@@ -297,13 +337,14 @@ onShow(() => {
|
|
|
line-height: 23.44px;
|
|
|
color: rgba(51, 51, 51, 1);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
-.card-rigth{
|
|
|
+}
|
|
|
+
|
|
|
+.card-rigth {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
text-align: end;
|
|
@@ -323,6 +364,11 @@ onShow(() => {
|
|
|
.is_pay_class {
|
|
|
margin-top: 8rpx;
|
|
|
font-size: 14px;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.card-item {
|
|
|
+ padding: 24rpx 0;
|
|
|
}
|
|
|
</style>
|