|
@@ -106,7 +106,7 @@
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
|
|
|
|
|
- <a-table row-key="id" :loading="loading" :pagination="pagination"
|
|
|
|
|
|
|
+ <a-table row-key="id" :loading="loading" :pagination="pagination" :summary="true" summary-text="汇总"
|
|
|
:columns="(cloneColumns as TableColumnData[])" :data="renderData" :bordered="false" :size="size"
|
|
:columns="(cloneColumns as TableColumnData[])" :data="renderData" :bordered="false" :size="size"
|
|
|
@page-change="onPageChange">
|
|
@page-change="onPageChange">
|
|
|
<template #index="{ record }">
|
|
<template #index="{ record }">
|
|
@@ -142,32 +142,50 @@
|
|
|
</a-tag>
|
|
</a-tag>
|
|
|
</template>
|
|
</template>
|
|
|
<template #actions="{ record }">
|
|
<template #actions="{ record }">
|
|
|
- <a-tag v-if="record.enable_parse" size="mini" bordered color="red"
|
|
|
|
|
- @click="changeAttr(record.id, 'enable_parse', false)">
|
|
|
|
|
- 转链
|
|
|
|
|
- </a-tag>
|
|
|
|
|
- <a-tag v-else size="mini" bordered color=""
|
|
|
|
|
- @click="changeAttr(record.id, 'enable_parse', true)">
|
|
|
|
|
- 转链
|
|
|
|
|
- </a-tag>
|
|
|
|
|
- <span style="margin:0 5px;">
|
|
|
|
|
- <a-tag v-if="record.enable_coupon" size="mini" bordered color="orange"
|
|
|
|
|
|
|
+ <a-tag v-if="record.enable_parse" size="small" bordered color="red"
|
|
|
|
|
+ @click="changeAttr(record.id, 'enable_parse', false)">
|
|
|
|
|
+ 转链
|
|
|
|
|
+ </a-tag>
|
|
|
|
|
+ <a-tag v-else size="small" bordered color="" @click="changeAttr(record.id, 'enable_parse', true)">
|
|
|
|
|
+ 转链
|
|
|
|
|
+ </a-tag>
|
|
|
|
|
+ <span style="margin: 5px;">
|
|
|
|
|
+ <a-tag v-if="record.enable_coupon" size="small" bordered color="orange"
|
|
|
@click="changeAttr(record.id, 'enable_coupon', false)">
|
|
@click="changeAttr(record.id, 'enable_coupon', false)">
|
|
|
优惠券
|
|
优惠券
|
|
|
</a-tag>
|
|
</a-tag>
|
|
|
- <a-tag v-else size="mini" bordered color=""
|
|
|
|
|
|
|
+ <a-tag v-else size="small" bordered color=""
|
|
|
@click="changeAttr(record.id, 'enable_coupon', true)">
|
|
@click="changeAttr(record.id, 'enable_coupon', true)">
|
|
|
优惠券
|
|
优惠券
|
|
|
</a-tag>
|
|
</a-tag>
|
|
|
</span>
|
|
</span>
|
|
|
- <a-tag v-if="record.enable_fake_click" size="mini" bordered color="blue"
|
|
|
|
|
|
|
+ <a-tag v-if="record.enable_sync_order" size="small" bordered color="arcoblue"
|
|
|
|
|
+ @click="changeAttr(record.id, 'enable_sync_order', false)">
|
|
|
|
|
+ 同步订单
|
|
|
|
|
+ </a-tag>
|
|
|
|
|
+ <a-tag v-else size="small" bordered color="gray"
|
|
|
|
|
+ @click="changeAttr(record.id, 'enable_sync_order', true)">
|
|
|
|
|
+ 同步订单
|
|
|
|
|
+ </a-tag>
|
|
|
|
|
+ <span style="margin:0 5px;">
|
|
|
|
|
+ <a-tag v-if="record.enable_fake_click" size="small" bordered color="blue"
|
|
|
@click="changeAttr(record.id, 'enable_fake_click', false)">
|
|
@click="changeAttr(record.id, 'enable_fake_click', false)">
|
|
|
补点击
|
|
补点击
|
|
|
</a-tag>
|
|
</a-tag>
|
|
|
- <a-tag v-else size="mini" bordered color="gray"
|
|
|
|
|
|
|
+ <a-tag v-else size="small" bordered color="gray"
|
|
|
@click="changeAttr(record.id, 'enable_fake_click', true)">
|
|
@click="changeAttr(record.id, 'enable_fake_click', true)">
|
|
|
补点击
|
|
补点击
|
|
|
</a-tag>
|
|
</a-tag>
|
|
|
|
|
+ </span>
|
|
|
|
|
+
|
|
|
|
|
+ <a-tag v-if="record.enable_promotionQuery" size="small" bordered color="orangered"
|
|
|
|
|
+ @click="changeAttr(record.id, 'enable_promotionQuery', false)">
|
|
|
|
|
+ 搜同款
|
|
|
|
|
+ </a-tag>
|
|
|
|
|
+ <a-tag v-else size="small" bordered color="gray"
|
|
|
|
|
+ @click="changeAttr(record.id, 'enable_promotionQuery', true)">
|
|
|
|
|
+ 搜同款
|
|
|
|
|
+ </a-tag>
|
|
|
</template>
|
|
</template>
|
|
|
<template #time="{ record }">
|
|
<template #time="{ record }">
|
|
|
<div>{{ record.create_time }}</div>
|
|
<div>{{ record.create_time }}</div>
|
|
@@ -181,6 +199,13 @@
|
|
|
预计收益
|
|
预计收益
|
|
|
</a-button>
|
|
</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
|
|
+ <template #summary-cell="{ column, record }">
|
|
|
|
|
+ <div style="margin:10px auto" v-if="column.slotName == 'daily_income_limit'">
|
|
|
|
|
+ 预估: {{ amountFormat(record.current_amt) }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
</a-table>
|
|
</a-table>
|
|
|
</a-card>
|
|
</a-card>
|
|
|
</div>
|
|
</div>
|
|
@@ -198,6 +223,7 @@ import type { SelectOptionData } from '@arco-design/web-vue/es/select/interface'
|
|
|
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
|
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
|
|
|
import cloneDeep from 'lodash/cloneDeep';
|
|
import cloneDeep from 'lodash/cloneDeep';
|
|
|
import Sortable from 'sortablejs';
|
|
import Sortable from 'sortablejs';
|
|
|
|
|
+import { numberFormat, amountFormat } from '@/utils/util';
|
|
|
|
|
|
|
|
type SizeProps = 'mini' | 'small' | 'medium' | 'large';
|
|
type SizeProps = 'mini' | 'small' | 'medium' | 'large';
|
|
|
type Column = TableColumnData & { checked?: true };
|
|
type Column = TableColumnData & { checked?: true };
|
|
@@ -224,7 +250,7 @@ const size = ref<SizeProps>('mini');
|
|
|
|
|
|
|
|
const basePagination: Pagination = {
|
|
const basePagination: Pagination = {
|
|
|
current: 1,
|
|
current: 1,
|
|
|
- pageSize: 20,
|
|
|
|
|
|
|
+ pageSize: 50,
|
|
|
};
|
|
};
|
|
|
const pagination = reactive({
|
|
const pagination = reactive({
|
|
|
...basePagination,
|
|
...basePagination,
|
|
@@ -264,6 +290,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
{
|
|
|
title: '每日收益限额',
|
|
title: '每日收益限额',
|
|
|
slotName: 'daily_income_limit',
|
|
slotName: 'daily_income_limit',
|
|
|
|
|
+ dataIndex: 'current_amt',
|
|
|
width: 180,
|
|
width: 180,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -284,7 +311,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
{
|
|
|
title: '分类',
|
|
title: '分类',
|
|
|
slotName: 'actions',
|
|
slotName: 'actions',
|
|
|
- width: 200,
|
|
|
|
|
|
|
+ width: 330,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -319,7 +346,7 @@ const statusOptions = computed<SelectOptionData[]>(() => [
|
|
|
const fetchData = async (
|
|
const fetchData = async (
|
|
|
params: TkPoolParams = {
|
|
params: TkPoolParams = {
|
|
|
current: 1,
|
|
current: 1,
|
|
|
- pageSize: 20,
|
|
|
|
|
|
|
+ pageSize: 50,
|
|
|
sort: 'status',
|
|
sort: 'status',
|
|
|
order: 'descending',
|
|
order: 'descending',
|
|
|
getTotal: true,
|
|
getTotal: true,
|
|
@@ -328,13 +355,11 @@ const fetchData = async (
|
|
|
setLoading(true);
|
|
setLoading(true);
|
|
|
try {
|
|
try {
|
|
|
const { data } = await queryTkPool(params);
|
|
const { data } = await queryTkPool(params);
|
|
|
- console.log(data);
|
|
|
|
|
if (!data) return;
|
|
if (!data) return;
|
|
|
// const { data } = await queryTkPool(params);
|
|
// const { data } = await queryTkPool(params);
|
|
|
renderData.value = data.list;
|
|
renderData.value = data.list;
|
|
|
pagination.current = data.page;
|
|
pagination.current = data.page;
|
|
|
pagination.total = data.count;
|
|
pagination.total = data.count;
|
|
|
- console.log(data);
|
|
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
console.log(err);
|
|
console.log(err);
|
|
|
// you can report use errorHandler or other
|
|
// you can report use errorHandler or other
|
|
@@ -410,7 +435,7 @@ const search = () => {
|
|
|
} as unknown as TkPoolParams);
|
|
} as unknown as TkPoolParams);
|
|
|
};
|
|
};
|
|
|
const onPageChange = (current: number) => {
|
|
const onPageChange = (current: number) => {
|
|
|
- fetchData({ ...basePagination, current, getTotal: current === 1 });
|
|
|
|
|
|
|
+ fetchData({ ...basePagination, current });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
fetchData();
|
|
fetchData();
|