|
@@ -1,28 +1,42 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
|
|
+ <tool-bar
|
|
|
|
+ :text="['uid']"
|
|
|
|
+ :label="['uid']"
|
|
|
|
+ v-model:loading="searching"
|
|
|
|
+ @confirm="onSearch"
|
|
|
|
+ @cancel="onCancel"
|
|
|
|
+ >
|
|
|
|
+ <template #picker>
|
|
|
|
+ <p class="label">充值日期</p>
|
|
|
|
+ <a-range-picker
|
|
|
|
+ v-model:value="pickered"
|
|
|
|
+ :ranges="rangePick"
|
|
|
|
+ format="YYYY/MM/DD"
|
|
|
|
+ @change="changeTime"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </tool-bar>
|
|
<a-table
|
|
<a-table
|
|
bordered
|
|
bordered
|
|
:data-source="list"
|
|
:data-source="list"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
@change="getList"
|
|
@change="getList"
|
|
- rowKey="id"
|
|
|
|
|
|
+ rowKey="order_no"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
:pagination="tablePageOptions"
|
|
:pagination="tablePageOptions"
|
|
>
|
|
>
|
|
- <template #report_recharge_num="{ text, record }">
|
|
|
|
- <p v-if="record.report_recharge_num >= 1">
|
|
|
|
|
|
+ <template #report_status="{ text, record }">
|
|
|
|
+ <p v-if="record.report_status == 'success'">
|
|
已上报
|
|
已上报
|
|
</p>
|
|
</p>
|
|
<a-popconfirm
|
|
<a-popconfirm
|
|
title="是否要继续强制回传?"
|
|
title="是否要继续强制回传?"
|
|
ok-text="是"
|
|
ok-text="是"
|
|
cancel-text="否"
|
|
cancel-text="否"
|
|
- @confirm="confirmEdit"
|
|
|
|
|
|
+ @confirm="confirmEdit(record)"
|
|
>
|
|
>
|
|
- <p
|
|
|
|
- @click="mustUp(record, 'recharge', 'report_recharge_num')"
|
|
|
|
- v-if="record.report_recharge_num <= 0"
|
|
|
|
- >
|
|
|
|
|
|
+ <p v-if="record.report_status != 'success'">
|
|
<a>强制回传</a>
|
|
<a>强制回传</a>
|
|
</p>
|
|
</p>
|
|
</a-popconfirm>
|
|
</a-popconfirm>
|
|
@@ -34,13 +48,20 @@
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
import usePagination from "@/hooks/usePagination";
|
|
import usePagination from "@/hooks/usePagination";
|
|
import PreviewBox from "./preview.vue";
|
|
import PreviewBox from "./preview.vue";
|
|
-import { defineComponent, reactive, toRefs, ref, watch } from "vue";
|
|
|
|
|
|
+import { defineComponent, reactive, toRefs, ref, watch, computed } from "vue";
|
|
import { TableColumnOfLog } from "@/views/_pageOptions/table-account";
|
|
import { TableColumnOfLog } from "@/views/_pageOptions/table-account";
|
|
-
|
|
|
|
-import { backLogList } from "@/api";
|
|
|
|
import { message } from "ant-design-vue";
|
|
import { message } from "ant-design-vue";
|
|
|
|
+import { backLogList, setMustUpback } from "@/api";
|
|
|
|
+import { picker } from "@/helper/config/range";
|
|
|
|
+import ToolBar from "@/components/tool-bar/index.vue";
|
|
|
|
+import useApp from "@/hooks/useApp";
|
|
|
|
+import { MutationType } from "@/store/modules/app/_type";
|
|
|
|
+import moment from "moment";
|
|
const CommonTable = defineComponent({
|
|
const CommonTable = defineComponent({
|
|
- props: ["visible","channel_id"],
|
|
|
|
|
|
+ props: ["visible", "channel_id"],
|
|
|
|
+ components: {
|
|
|
|
+ ToolBar,
|
|
|
|
+ },
|
|
setup(props) {
|
|
setup(props) {
|
|
let { meta, tablePageOptions } = usePagination();
|
|
let { meta, tablePageOptions } = usePagination();
|
|
const state = reactive({
|
|
const state = reactive({
|
|
@@ -48,29 +69,86 @@ const CommonTable = defineComponent({
|
|
list: ref<any[]>([]),
|
|
list: ref<any[]>([]),
|
|
columns: TableColumnOfLog,
|
|
columns: TableColumnOfLog,
|
|
pushVisible: false,
|
|
pushVisible: false,
|
|
|
|
+ curPage: ref(1),
|
|
|
|
+ inSearching: false,
|
|
|
|
+ fields: ref({
|
|
|
|
+ date:''
|
|
|
|
+ }),
|
|
|
|
+ defaultToolvalue: {},
|
|
|
|
+ rangePick: picker,
|
|
|
|
+ pickered: computed(() =>
|
|
|
|
+ store.getters.selectTime.length > 0
|
|
|
|
+ ? [
|
|
|
|
+ moment(store.getters.selectTime[0]),
|
|
|
|
+ moment(store.getters.selectTime[1]),
|
|
|
|
+ ]
|
|
|
|
+ : [moment().subtract(30, "d"), moment()]
|
|
|
|
+ ),
|
|
});
|
|
});
|
|
|
|
+ const { store } = useApp();
|
|
|
|
+
|
|
const getList = async (page?: any) => {
|
|
const getList = async (page?: any) => {
|
|
state.loading = true;
|
|
state.loading = true;
|
|
let { data } = await backLogList({
|
|
let { data } = await backLogList({
|
|
- page: page ? page.current : 1,
|
|
|
|
- report_platform:'kuaishou',
|
|
|
|
- platform:'zhuishuyun',
|
|
|
|
- channel_id:props.channel_id
|
|
|
|
|
|
+ page: page?.current ? page.current : 1,
|
|
|
|
+ report_platform: "kuaishou",
|
|
|
|
+ platform: "zhuishuyun",
|
|
|
|
+ channel_id: props.channel_id,
|
|
|
|
+ ...state.fields,
|
|
});
|
|
});
|
|
state.loading = false;
|
|
state.loading = false;
|
|
|
|
+ state.curPage = page?.current ?? 1;
|
|
state.list = data.list;
|
|
state.list = data.list;
|
|
meta.value = data.meta;
|
|
meta.value = data.meta;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ getList();
|
|
|
|
+
|
|
watch(
|
|
watch(
|
|
- () => [props.visible,props.channel_id],
|
|
|
|
|
|
+ () => [props.visible, props.channel_id],
|
|
([newVal], [oldVal]) => {
|
|
([newVal], [oldVal]) => {
|
|
if (newVal) {
|
|
if (newVal) {
|
|
getList();
|
|
getList();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
);
|
|
);
|
|
- return { ...toRefs(state), tablePageOptions, getList };
|
|
|
|
|
|
+ const onSearch = (fields: any) => {
|
|
|
|
+ const { uid } = fields;
|
|
|
|
+ state.fields = fields;
|
|
|
|
+ if (state.pickered.length > 0) {
|
|
|
|
+ state.fields.date = [
|
|
|
|
+ moment(state.pickered[0]).format("YYYY-MM-DD"),
|
|
|
|
+ moment(state.pickered[1]).format("YYYY-MM-DD"),
|
|
|
|
+ ].join(",");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ getList();
|
|
|
|
+ };
|
|
|
|
+ //强制回传
|
|
|
|
+ const confirmEdit = (record: any) => {
|
|
|
|
+ setMustUpback({
|
|
|
|
+ uid: record.uid,
|
|
|
|
+ report_type: "recharge",
|
|
|
|
+ platform: "zhuishuyun",
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ message.success("上报成功!");
|
|
|
|
+ getList({ current: state.curPage });
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+ const changeTime = (monent: any, string: string[]) => {
|
|
|
|
+ if (Array.isArray(string) && string.join("")) {
|
|
|
|
+ store.commit(MutationType.setSelectTime, string);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ return {
|
|
|
|
+ ...toRefs(state),
|
|
|
|
+ tablePageOptions,
|
|
|
|
+ getList,
|
|
|
|
+ confirmEdit,
|
|
|
|
+ onSearch,
|
|
|
|
+ changeTime
|
|
|
|
+ };
|
|
},
|
|
},
|
|
mounted() {},
|
|
mounted() {},
|
|
});
|
|
});
|