|
|
@@ -1,174 +1,210 @@
|
|
|
<template>
|
|
|
- <ele-page flex-table>
|
|
|
- <page-search @search="reload" :status="useStatus"></page-search>
|
|
|
-
|
|
|
- <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns">
|
|
|
- <template #toolbar>
|
|
|
- <div class="flex items-center mb-4">
|
|
|
- <el-statistic
|
|
|
- :value="statistics.totalMoney"
|
|
|
- title="累计申请金额"
|
|
|
- :precision="2"
|
|
|
- value-style="font-size:30px"
|
|
|
- class="mr-20"
|
|
|
- ></el-statistic>
|
|
|
- <el-statistic
|
|
|
- :value="statistics.unFinishMoney"
|
|
|
- title="待审核补贴"
|
|
|
- :precision="0"
|
|
|
- value-style="font-size:30px"
|
|
|
- class="mr-20"
|
|
|
- ></el-statistic>
|
|
|
- <el-statistic
|
|
|
- :value="statistics.finishMoney"
|
|
|
- title="已审核补贴金额"
|
|
|
- :precision="0"
|
|
|
- value-style="font-size:30px"
|
|
|
- class="mr-20"
|
|
|
- ></el-statistic>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="common-title mb-4">交易记录</div>
|
|
|
-
|
|
|
- <el-radio-group @change="handleStatusChange" v-model="useStatus">
|
|
|
- <el-radio-button label="全部" value="" />
|
|
|
- <el-radio-button label="待审核" value="1" />
|
|
|
- <el-radio-button label="已审核" value="2" />
|
|
|
- </el-radio-group>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template #status="{ row }">
|
|
|
- {{ statusDicts.find((d) => d.value == row.status)?.label }}
|
|
|
- </template>
|
|
|
-
|
|
|
- <template #orderId="{ row }">
|
|
|
- <el-button type="primary" link @click="handleOrderId(row)">{{
|
|
|
- row.orderId
|
|
|
- }}</el-button>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template #action="{ row }">
|
|
|
- <div>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- link
|
|
|
- v-if="row.status == 1"
|
|
|
- v-permission="'finance:subsidyReview:audit'"
|
|
|
- @click="handleChangeStatus(row)"
|
|
|
- >
|
|
|
- [审核]
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- link
|
|
|
- v-permission="'finance:subsidyReview:log'"
|
|
|
- @click="handleUpdate(row)"
|
|
|
- >
|
|
|
- [操作日志]
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </common-table>
|
|
|
-
|
|
|
- <orderDetail ref="orderDetailRef" />
|
|
|
- </ele-page>
|
|
|
+ <ele-page flex-table>
|
|
|
+ <page-search @search="reload" :status="useStatus"></page-search>
|
|
|
+
|
|
|
+ <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns">
|
|
|
+ <template #toolbar>
|
|
|
+ <div class="flex items-center mb-4">
|
|
|
+ <el-statistic
|
|
|
+ :value="statistics.sumMoney"
|
|
|
+ title="累计申请金额"
|
|
|
+ :precision="2"
|
|
|
+ value-style="font-size:30px"
|
|
|
+ class="mr-20"
|
|
|
+ ></el-statistic>
|
|
|
+ <el-statistic
|
|
|
+ :value="statistics.unAuditMoney"
|
|
|
+ title="待审核补贴"
|
|
|
+ :precision="2"
|
|
|
+ value-style="font-size:30px"
|
|
|
+ class="mr-20"
|
|
|
+ ></el-statistic>
|
|
|
+ <el-statistic
|
|
|
+ :value="statistics.auditMoney"
|
|
|
+ title="已审核补贴金额"
|
|
|
+ :precision="2"
|
|
|
+ value-style="font-size:30px"
|
|
|
+ class="mr-20"
|
|
|
+ ></el-statistic>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="common-title mb-4">交易记录</div>
|
|
|
+
|
|
|
+ <el-radio-group
|
|
|
+ @change="handleStatusChange"
|
|
|
+ v-model="useStatus"
|
|
|
+ >
|
|
|
+ <el-radio-button label="全部" value="" />
|
|
|
+ <el-radio-button label="待审核" value="1" />
|
|
|
+ <el-radio-button label="已审核" value="2" />
|
|
|
+ <el-radio-button label="未提交" value="3" />
|
|
|
+ </el-radio-group>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #type="{ row }">
|
|
|
+ <dict-data
|
|
|
+ code="order_compensation_type"
|
|
|
+ type="text"
|
|
|
+ :model-value="row.type"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #status="{ row }">
|
|
|
+ <dict-data
|
|
|
+ code="order_compensation_status"
|
|
|
+ type="text"
|
|
|
+ :model-value="row.status"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #orderId="{ row }">
|
|
|
+ <el-button type="primary" link @click="handleOrderId(row)">{{
|
|
|
+ row.orderId
|
|
|
+ }}</el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #action="{ row }">
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ v-if="row.status == 1"
|
|
|
+ v-permission="'finance:subsidyReview:audit'"
|
|
|
+ @click="handleAudit(row)"
|
|
|
+ >
|
|
|
+ [审核]
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ v-permission="'finance:subsidyReview:log'"
|
|
|
+ @click="handleLog(row)"
|
|
|
+ >
|
|
|
+ [操作日志]
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </common-table>
|
|
|
+
|
|
|
+ <orderDetail ref="orderDetailRef" />
|
|
|
+
|
|
|
+ <!-- 操作日志弹窗 -->
|
|
|
+ <log-dialog ref="logDialogRef" />
|
|
|
+ </ele-page>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import { ref, reactive, onMounted } from 'vue';
|
|
|
- import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
|
- import pageSearch from './page-search.vue';
|
|
|
- import request from '@/utils/request';
|
|
|
- import OrderDetail from '@/views/recycleOrder/components/order-detail.vue';
|
|
|
-
|
|
|
- defineOptions({ name: 'subsidyReview' });
|
|
|
-
|
|
|
- // 添加统计数据的响应式对象
|
|
|
- const statistics = reactive({
|
|
|
- totalMoney: 0,
|
|
|
- unFinishMoney: 0,
|
|
|
- finishMoney: 0
|
|
|
- });
|
|
|
-
|
|
|
- // 获取统计数据
|
|
|
- async function fetchStatistics() {
|
|
|
- try {
|
|
|
- const res = await request.get('/sys/finance/subsidySum');
|
|
|
- if (res.data.code === 200) {
|
|
|
- Object.assign(statistics, res.data.data);
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- console.error('获取统计数据失败:', error);
|
|
|
+ import { ref, reactive, onMounted } from 'vue';
|
|
|
+ import CommonTable from '@/components/CommonPage/CommonTable.vue';
|
|
|
+ import pageSearch from './page-search.vue';
|
|
|
+ import request from '@/utils/request';
|
|
|
+ import OrderDetail from '@/views/recycleOrder/components/order-detail.vue';
|
|
|
+ import LogDialog from './components/log-dialog.vue';
|
|
|
+ import { ElMessage } from 'element-plus';
|
|
|
+ defineOptions({ name: 'subsidyReview' });
|
|
|
+
|
|
|
+ // 添加统计数据的响应式对象
|
|
|
+ const statistics = reactive({
|
|
|
+ sumMoney: 0,
|
|
|
+ unAuditMoney: 0,
|
|
|
+ auditMoney: 0
|
|
|
+ });
|
|
|
+
|
|
|
+ // 获取统计数据
|
|
|
+ async function fetchStatistics() {
|
|
|
+ try {
|
|
|
+ const res = await request.get('/order/orderCompensationLog/getSum');
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ Object.assign(statistics, res.data.data);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取统计数据失败:', error);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- const orderDetailRef = ref(null);
|
|
|
- const handleOrderId = (row) => {
|
|
|
- orderDetailRef.value?.handleOpen(row);
|
|
|
- };
|
|
|
-
|
|
|
- onMounted(() => {
|
|
|
- fetchStatistics();
|
|
|
- });
|
|
|
-
|
|
|
- const statusDicts = ref([
|
|
|
- { label: '待审核', value: 1 },
|
|
|
- { label: '已审核', value: 2 }
|
|
|
- ]);
|
|
|
-
|
|
|
- const useStatus = ref('');
|
|
|
- function handleStatusChange(value) {
|
|
|
- pageRef.value.reload({ status: value });
|
|
|
- }
|
|
|
-
|
|
|
- /** 表格列配置 */
|
|
|
- const columns = ref([
|
|
|
- { label: '申请时间', prop: 'applyTime', align: 'center', width: 180 },
|
|
|
- { label: '用户UID', prop: 'userId', align: 'center' },
|
|
|
- {
|
|
|
- label: '支付单号/流水号',
|
|
|
- prop: 'paymentNo',
|
|
|
- align: 'center',
|
|
|
- minWidth: 180,
|
|
|
- formatter: (row) => row.paymentNo || '-'
|
|
|
- },
|
|
|
- { label: '对方账户', prop: 'nickName', align: 'center', minWidth: 140 },
|
|
|
- { label: '结算金额', prop: 'amount', align: 'center' },
|
|
|
- { label: '交易状态', prop: 'status', align: 'center', slot: 'status' },
|
|
|
- {
|
|
|
- label: '交易类型',
|
|
|
- prop: 'type',
|
|
|
- align: 'center',
|
|
|
- formatter: (row) => (row.status == 2 ? '超时审核' : '变与必箱')
|
|
|
- },
|
|
|
- {
|
|
|
- label: '订单编号',
|
|
|
- prop: 'orderId',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- slot: 'orderId'
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 140,
|
|
|
- align: 'center',
|
|
|
- slot: 'action',
|
|
|
- fixed: 'right'
|
|
|
- }
|
|
|
- ]);
|
|
|
|
|
|
- /** 页面组件实例 */
|
|
|
- const pageRef = ref(null);
|
|
|
+ const orderDetailRef = ref(null);
|
|
|
+ const handleOrderId = (row) => {
|
|
|
+ orderDetailRef.value?.handleOpen(row);
|
|
|
+ };
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+ fetchStatistics();
|
|
|
+ });
|
|
|
|
|
|
- const pageConfig = reactive({
|
|
|
- pageUrl: '/sys/finance/subsidyList',
|
|
|
- fileName: '补贴审核',
|
|
|
- cacheKey: 'subsidyReview'
|
|
|
- });
|
|
|
+ const useStatus = ref('');
|
|
|
+ function handleStatusChange(value) {
|
|
|
+ useStatus.value = value;
|
|
|
+ pageConfig.params.status = value;
|
|
|
+ reload();
|
|
|
+ }
|
|
|
+
|
|
|
+ /** 表格列配置 */
|
|
|
+ const columns = ref([
|
|
|
+ { label: '申请时间', prop: 'submitTime', align: 'center', width: 180 },
|
|
|
+ { label: '用户UID', prop: 'userId', align: 'center' },
|
|
|
+ { label: '用户昵称', prop: 'nickName', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '对方账户',
|
|
|
+ prop: 'nickName2',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => '小程序余额'
|
|
|
+ },
|
|
|
+ { label: '结算金额', prop: 'compensationMoney', align: 'center' },
|
|
|
+ { label: '交易状态', prop: 'status', align: 'center', slot: 'status' },
|
|
|
+ {
|
|
|
+ label: '交易类型',
|
|
|
+ prop: 'type',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'type'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '订单编号',
|
|
|
+ prop: 'orderId',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 120,
|
|
|
+ slot: 'orderId'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 150,
|
|
|
+ align: 'center',
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ]);
|
|
|
+
|
|
|
+ /** 页面组件实例 */
|
|
|
+ const pageRef = ref(null);
|
|
|
+
|
|
|
+ const pageConfig = reactive({
|
|
|
+ pageUrl: '/order/orderCompensationLog/pagelist',
|
|
|
+ fileName: '补贴审核',
|
|
|
+ cacheKey: 'subsidyReview',
|
|
|
+ params: {
|
|
|
+ status: useStatus.value
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //刷新表格
|
|
|
+ function reload(where = {}) {
|
|
|
+ where.status = useStatus.value;
|
|
|
+ pageRef.value?.reload(where);
|
|
|
+ }
|
|
|
|
|
|
- //刷新表格
|
|
|
- function reload(where) {
|
|
|
- pageRef.value?.reload(where);
|
|
|
- }
|
|
|
+ // 审核
|
|
|
+ const handleAudit = (row) => {
|
|
|
+ pageRef.value?.messageBoxConfirm({
|
|
|
+ message: '确定审核通过吗?',
|
|
|
+ fetch: () =>
|
|
|
+ request.post(`/order/orderCompensationLog/audit/${row.id}`)
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ // 日志弹窗引用
|
|
|
+ const logDialogRef = ref(null);
|
|
|
+
|
|
|
+ // 操作日志
|
|
|
+ const handleLog = (row) => {
|
|
|
+ logDialogRef.value?.open(row);
|
|
|
+ };
|
|
|
</script>
|