wupengfei
1 天以前 64e9cda000672b16c009de86d2a01b030940cb20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<template>
  <WithdrawMoneyCard
    :money="100"
    :title="EnumUserWalletTransactionTypeText[detail.type]"
  ></WithdrawMoneyCard>
  <List>
    <ListItem title="流水号" :show-arrow="false">
      <template #extra>
        <div class="income-detail-info-value">{{ detail?.code }}</div>
      </template>
    </ListItem>
    <ListItem title="企业名称" :show-arrow="false">
      <template #extra>
        <div class="income-detail-info-value">{{ detail?.enterpriseName }}</div>
      </template>
    </ListItem>
    <ListItem title="结算日期" :show-arrow="false">
      <template #extra>
        <div class="income-detail-info-value">
          {{ dayjs(detail?.settlementTime).format('YYYY-MM-DD') }}
        </div>
      </template>
    </ListItem>
    <ListItem title="结算金额" :show-arrow="false">
      <template #extra>
        <div class="income-detail-info-value">{{ toThousand(detail?.settlementAmount) }}</div>
      </template>
    </ListItem>
    <ListItem title="实发金额" :show-arrow="false">
      <template #extra>
        <div class="income-detail-info-value">{{ toThousand(detail?.amount) }}</div>
      </template>
    </ListItem>
  </List>
</template>
 
<script setup lang="ts">
import { List, ListItem, WithdrawMoneyCard } from '@12333/components';
import { EnumUserWalletTransactionType, EnumUserWalletTransactionTypeText } from '@12333/constants';
import Taro from '@tarojs/taro';
import * as userServices from '@12333/services/apiV2/user';
import { useQuery } from '@tanstack/vue-query';
import dayjs from 'dayjs';
import { toThousand } from '@12333/utils';
 
defineOptions({
  name: 'InnerPage',
});
 
const router = Taro.useRouter();
const id = router.params?.id;
 
const {
  isLoading,
  isError,
  data: detail,
  refetch,
} = useQuery({
  queryKey: ['userServices/getPersonalUserTransaction', id],
  queryFn: async () => {
    return await userServices.getPersonalUserTransaction(
      { id: id },
      {
        showLoading: false,
      }
    );
  },
  placeholderData: () => ({} as API.GetPersonalUserTransactionQueryResult),
  onSuccess(data) {
    // if (data.isExistTradeChatRecord) setTrue();
  },
});
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.incomeDetailInfo-page-wrapper {
  .income-detail-info-money {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: #ffffff;
    padding: 70px 0;
 
    .income-detail-info-money-value {
      display: flex;
      align-items: center;
      font-weight: 600;
      color: boleGetCssVar('text-color', 'primary');
 
      .income-detail-info-money-value-unit {
        font-size: 32px;
      }
 
      .income-detail-info-money-value-num {
        font-size: 64px;
      }
    }
 
    .income-detail-info-money-type {
      margin-top: 10px;
      font-weight: 400;
      font-size: 28px;
      color: boleGetCssVar('text-color', 'primary');
    }
  }
}
</style>