|
@@ -0,0 +1,84 @@
|
|
|
|
|
+<!-- 推广收益 -->
|
|
|
|
|
+<template>
|
|
|
|
|
+ <app-view>
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <app-filter :options="filterOptons" :loading="loading" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 表格数据 -->
|
|
|
|
|
+ <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
|
|
|
|
|
+ <!-- 日期 -->
|
|
|
|
|
+ <template #reckondate="{ value }">
|
|
|
|
|
+ {{ formatDate(value, 'YYYYMM') }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 操作 -->
|
|
|
|
|
+ <template #operate="{ row }">
|
|
|
|
|
+ <app-auth-operation :menus="handleOperateButtons(row)" :options="{ selectedRow: row }" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
|
|
|
|
|
+ @change="onRefresh" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </app-table>
|
|
|
|
|
+ </app-view>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script lang="ts" setup>
|
|
|
|
|
+import { shallowRef } from 'vue'
|
|
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
|
|
+import { formatDate } from '@/filters'
|
|
|
|
|
+import { useDataFilter } from '@/hooks/datatable'
|
|
|
|
|
+import { useQueryTHJPromotionIncome } from '@/business/order'
|
|
|
|
|
+import AppTable from '@pc/components/base/table/index.vue'
|
|
|
|
|
+import AppFilter from '@pc/components/base/table-filter/index.vue'
|
|
|
|
|
+import AppPagination from '@pc/components/base/pagination/index.vue'
|
|
|
|
|
+import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
|
|
|
|
|
+
|
|
|
|
|
+const { loading, dataList, total, pageIndex, pageSize, getTHJPromotionIncome } = useQueryTHJPromotionIncome()
|
|
|
|
|
+const { filterOptons, getQueryParams } = useDataFilter<Model.THJPromotionIncomeReq>()
|
|
|
|
|
+
|
|
|
|
|
+const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
|
|
+ { prop: 'profitmonth', label: '时间' },
|
|
|
|
|
+ { prop: 'sumamount', label: '金额' },
|
|
|
|
|
+ { prop: 'operate', label: '操作' },
|
|
|
|
|
+])
|
|
|
|
|
+
|
|
|
|
|
+filterOptons.selectList = [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '支付状态',
|
|
|
|
|
+ key: 'profitstatus',
|
|
|
|
|
+ options: [
|
|
|
|
|
+ { label: '未支付', value: 1 },
|
|
|
|
|
+ { label: '支取中', value: 3 },
|
|
|
|
|
+ { label: '已支付', value: 2 }
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
|
|
+filterOptons.buttonList = [
|
|
|
|
|
+ { lable: '重置', onClick: () => onSearch(true) },
|
|
|
|
|
+ { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() }
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
|
|
+// 3:委托成功 7:部成 - 状态有撤销
|
|
|
|
|
+const handleOperateButtons = (row: Model.THJPromotionIncomeRsp) => {
|
|
|
|
|
+ if (row.profitstatus === 1) {
|
|
|
|
|
+ return ['PromotionDetails', 'PromotionPayment']
|
|
|
|
|
+ }
|
|
|
|
|
+ return ['PromotionDetails']
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const onSearch = (clear = false) => {
|
|
|
|
|
+ getQueryParams((qs) => {
|
|
|
|
|
+ pageIndex.value = 1
|
|
|
|
|
+ getTHJPromotionIncome(qs.profitstatus)
|
|
|
|
|
+ }, clear)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const onRefresh = () => {
|
|
|
|
|
+ getQueryParams((qs) => {
|
|
|
|
|
+ getTHJPromotionIncome(qs.profitstatus).catch((err) => ElMessage.error(err))
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+onRefresh()
|
|
|
|
|
+</script>
|