zhengyiming
3 天以前 fc6bbae5805da6c95fd675210999a03802cd62ad
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<template>
  <LoadingLayout :loading="isLoading">
    <AppContainer>
      <ChunkCell title="待处理">
        <div class="data-board-card-list">
          <DataBoardCard title="申报待审核" :contentBetween="true">
            <DataBoardCardPrice
              :value="detail?.waitCheckEnterpriseNumber ?? 0"
              :isInline="true"
              :useThousand="false"
              unit=""
            />
            <el-button type="primary" link @click="goToAudit">去审核</el-button>
          </DataBoardCard>
          <DataBoardCard title="奖励金待登记" :contentBetween="true">
            <DataBoardCardPrice
              :isInline="true"
              :value="detail?.waitForSettleRewardNumber ?? 0"
              :useThousand="false"
              unit=""
            />
            <el-button type="primary" link @click="goToGrant">去发放</el-button>
          </DataBoardCard>
          <DataBoardCard title="提现待审批" :contentBetween="true">
            <DataBoardCardPrice
              :isInline="true"
              :value="detail?.waitDrawWithAuditNumber ?? 0"
              :useThousand="false"
              unit=""
            />
            <el-button type="primary" link @click="goToWithdrawalApproval">去审批</el-button>
          </DataBoardCard>
          <DataBoardCard title="出账待审批" :contentBetween="true">
            <DataBoardCardPrice
              :isInline="true"
              :value="detail?.waitPlatRewardPayOutAuditNumber ?? 0"
              :useThousand="false"
              unit=""
            />
            <el-button type="primary" link @click="goToRewardApplyTradeCheck">去审批</el-button>
          </DataBoardCard>
          <DataBoardCard title="财务待审核" :contentBetween="true">
            <DataBoardCardPrice
              :isInline="true"
              :value="detail?.waitPlatRewardPayOutFinanceAuditNumber ?? 0"
              :useThousand="false"
              unit=""
            />
            <el-button type="primary" link @click="goToFinancialApproval">去审核</el-button>
          </DataBoardCard>
        </div>
      </ChunkCell>
      <ChunkCell title="数据看板">
        <div class="data-board-card-list">
          <DataBoardCard title="累计已审核企业">
            <DataBoardCardPrice
              :value="detail?.accumulatedCheckEnterpriseNumber ?? 0"
              :useThousand="false"
              unit="家"
            />
          </DataBoardCard>
          <DataBoardCard title="累计已审核通过企业">
            <DataBoardCardPrice
              :value="detail?.accumulatedCheckPassEnterpriseNumber ?? 0"
              :useThousand="false"
              unit="家"
            />
          </DataBoardCard>
          <DataBoardCard title="累计未审核通过企业">
            <DataBoardCardPrice
              :value="detail?.accumulatedCheckRejectEnterpriseNumber ?? 0"
              :useThousand="false"
              unit="家"
            />
          </DataBoardCard>
          <DataBoardCard title="累计已发放">
            <DataBoardCardPrice :value="detail?.accumulatedHasSettleRewardAmount ?? 0" unit="元" />
          </DataBoardCard>
          <DataBoardCard title="累计待发放">
            <DataBoardCardPrice
              :value="detail?.accumulatedWaitForSettleRewardAmount ?? 0"
              unit="元"
            />
          </DataBoardCard>
          <DataBoardCard title="累计已使用">
            <DataBoardCardPrice :value="detail?.accumulatedUsedRewardAmount ?? 0" unit="元" />
          </DataBoardCard>
        </div>
      </ChunkCell>
    </AppContainer>
  </LoadingLayout>
</template>
 
<script setup lang="ts">
import { AppContainer, ChunkCell } from '@bole-core/components';
import DataBoardCard from '@/components/DataBoardCard/DataBoardCard.vue';
import DataBoardCardPrice from '@/components/DataBoardCard/DataBoardCardPrice.vue';
import * as parkBountyApplyServices from '@/services/api/ParkBountyApply';
import { useQuery, useQueryClient } from '@tanstack/vue-query';
 
defineOptions({
  name: 'Home',
});
 
const router = useRouter();
 
const { data: detail, isLoading } = useQuery({
  queryKey: ['parkBountyApplyServices/getGoverDataBoard'],
  queryFn: async () => {
    return await parkBountyApplyServices.getGoverDataBoard({
      showLoading: false,
    });
  },
  placeholderData: () => ({} as API.GetGoverDataBoardOutput),
});
 
function goToAudit() {
  router.push({
    name: 'MaterialReviewList',
  });
}
function goToGrant() {
  router.push({
    name: 'RewardGrant',
  });
}
 
function goToWithdrawalApproval() {
  router.push({
    name: 'WithdrawalApproval',
  });
}
 
function goToRewardApplyTradeCheck() {
  router.push({
    name: 'RewardApplyTradeCheck',
  });
}
 
function goToFinancialApproval() {
  router.push({
    name: 'FinancialApproval',
  });
}
 
const queryClient = useQueryClient();
 
onMounted(async () => {
  await queryClient.ensureQueryData({
    queryKey: ['parkBountyApplyServices/getGoverDataBoard'],
  });
});
</script>
 
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
 
.data-board-card-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 40px;
  padding: 20px;
}
</style>