|
@@ -1,14 +1,16 @@
|
|
|
-<!-- 报表查询-分润报表 -->
|
|
|
|
|
|
|
+<!-- 报表查询-平台分润报表 -->
|
|
|
<template>
|
|
<template>
|
|
|
<app-view>
|
|
<app-view>
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<app-filter :option="filterOption">
|
|
<app-filter :option="filterOption">
|
|
|
|
|
+ <!-- 日期 -->
|
|
|
<template #tradedate="{ item }">
|
|
<template #tradedate="{ item }">
|
|
|
<el-form-item :label="item.label" prop="tradedate">
|
|
<el-form-item :label="item.label" prop="tradedate">
|
|
|
<el-date-picker :type="dateType" v-model="item.value" :format="dateFormat"
|
|
<el-date-picker :type="dateType" v-model="item.value" :format="dateFormat"
|
|
|
:value-format="dateFormat" :placeholder="t('common.pleasechoice')" />
|
|
:value-format="dateFormat" :placeholder="t('common.pleasechoice')" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <!-- 季度 -->
|
|
|
<template #quarter="{ item }">
|
|
<template #quarter="{ item }">
|
|
|
<el-form-item :label="item.label" prop="quarter"
|
|
<el-form-item :label="item.label" prop="quarter"
|
|
|
v-if="queryParams.cycletype === ReportType.Quarter">
|
|
v-if="queryParams.cycletype === ReportType.Quarter">
|
|
@@ -21,9 +23,16 @@
|
|
|
{{ (item.value = undefined) }}
|
|
{{ (item.value = undefined) }}
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
- <template #isson="{ item }">
|
|
|
|
|
- <el-form-item :label="item.label" prop="isson">
|
|
|
|
|
- <el-switch v-model="item.value" active-value="1" inactive-value="0" />
|
|
|
|
|
|
|
+ <!-- 会员代码/名称 -->
|
|
|
|
|
+ <template #areaname="{ item }">
|
|
|
|
|
+ <el-form-item :label="item.label">
|
|
|
|
|
+ <app-select-member v-model="item.value" :params="{ usertype: '1,2' }" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 所属营销中心 -->
|
|
|
|
|
+ <template #yxareauserid="{ item }">
|
|
|
|
|
+ <el-form-item :label="item.label">
|
|
|
|
|
+ <app-select-member v-model="item.value" :params="{ roles: '3' }" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
</app-filter>
|
|
</app-filter>
|
|
@@ -33,9 +42,9 @@
|
|
|
<app-operation :data-list="getActionButtons(['query_internal_profitshare_export'])"
|
|
<app-operation :data-list="getActionButtons(['query_internal_profitshare_export'])"
|
|
|
@click="(code: string) => openComponent(code)" />
|
|
@click="(code: string) => openComponent(code)" />
|
|
|
</template>
|
|
</template>
|
|
|
- <template #footer>
|
|
|
|
|
- <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
|
|
|
|
|
- @change="onSearch" />
|
|
|
|
|
|
|
+ <!-- 会员/机构 -->
|
|
|
|
|
+ <template #areaname="{ row }">
|
|
|
|
|
+ <el-link type="primary" @click="openComponent('Details', row)">{{ row.areaname }}</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
</app-table>
|
|
</app-table>
|
|
|
<component :is="componentMap.get(componentId)" v-bind="{ record, queryParams }" @closed="closeComponent"
|
|
<component :is="componentMap.get(componentId)" v-bind="{ record, queryParams }" @closed="closeComponent"
|
|
@@ -44,47 +53,47 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { computed, ref } from 'vue'
|
|
|
|
|
|
|
+import { computed, ref, defineAsyncComponent } from 'vue'
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
import { useEnum } from '@/hooks/enum'
|
|
import { useEnum } from '@/hooks/enum'
|
|
|
import { useDataFilter } from '@/hooks/datatable-v2'
|
|
import { useDataFilter } from '@/hooks/datatable-v2'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { formatDate } from '@/filters'
|
|
import { formatDate } from '@/filters'
|
|
|
-import { shareAmountQuery } from '@/services/api/report'
|
|
|
|
|
|
|
+import { shareAmountQueryPlat } from '@/services/api/report'
|
|
|
import { useOperation } from '@/hooks/operation'
|
|
import { useOperation } from '@/hooks/operation'
|
|
|
import { i18n } from '@/stores'
|
|
import { i18n } from '@/stores'
|
|
|
import { getReportTypeList, ReportType, getQuarterList } from '@/constants/report'
|
|
import { getReportTypeList, ReportType, getQuarterList } from '@/constants/report'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
-import AppPagination from '@pc/components/base/pagination/index.vue'
|
|
|
|
|
import AppOperation from '@pc/components/base/operation/index.vue'
|
|
import AppOperation from '@pc/components/base/operation/index.vue'
|
|
|
import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
|
|
import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
|
|
|
|
|
+import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
|
|
|
|
|
|
const roleTypeEnum = useEnum('roleType') // 角色
|
|
const roleTypeEnum = useEnum('roleType') // 角色
|
|
|
|
|
|
|
|
-const { global: { t } } = i18n
|
|
|
|
|
|
|
+const t = i18n.global.t
|
|
|
|
|
|
|
|
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.ShareAmountQueryRsp>({
|
|
|
|
|
|
|
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.ShareAmountQueryPlatRsp>({
|
|
|
onClose: () => onSearch()
|
|
onClose: () => onSearch()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(shareAmountQuery, {
|
|
|
|
|
|
|
+// 机构分润统计明细
|
|
|
|
|
+componentMap.set('Details', defineAsyncComponent(() => import('./components/details/index.vue')))
|
|
|
|
|
+
|
|
|
|
|
+const { dataList, loading, run } = useRequest(shareAmountQueryPlat, {
|
|
|
manual: true,
|
|
manual: true,
|
|
|
- params: {
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- pageSize: 20,
|
|
|
|
|
- },
|
|
|
|
|
onError: (err) => {
|
|
onError: (err) => {
|
|
|
ElMessage.error(err)
|
|
ElMessage.error(err)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.ShareAmountQueryReq>({
|
|
|
|
|
|
|
+const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilter<Model.ShareAmountQueryPlatReq>({
|
|
|
filters: [
|
|
filters: [
|
|
|
{
|
|
{
|
|
|
field: 'cycletype',
|
|
field: 'cycletype',
|
|
|
label: t('report.profitshare.cycletype'),
|
|
label: t('report.profitshare.cycletype'),
|
|
|
value: 0,
|
|
value: 0,
|
|
|
- options: () => getReportTypeList()
|
|
|
|
|
|
|
+ options: () => getReportTypeList(),
|
|
|
|
|
+ onChange: () => resetFilters('tradedate', 'quarter')
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
field: 'tradedate',
|
|
field: 'tradedate',
|
|
@@ -97,9 +106,12 @@ const { queryParams, filterOption, getQueryParams, resetFilters } = useDataFilte
|
|
|
required: true
|
|
required: true
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- field: 'isson',
|
|
|
|
|
- label: t('report.profitshare.isson'),
|
|
|
|
|
- value: 0
|
|
|
|
|
|
|
+ field: 'areaname',
|
|
|
|
|
+ label: '会员代码/名称',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ field: 'yxareauserid',
|
|
|
|
|
+ label: '所属营销中心',
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
buttons: [
|
|
buttons: [
|
|
@@ -137,10 +149,9 @@ const dateFormat = computed(() => {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const tableColumns = ref<Model.TableColumn[]>([
|
|
const tableColumns = ref<Model.TableColumn[]>([
|
|
|
|
|
+ { field: 'areaname', label: '会员/机构' },
|
|
|
{ field: 'areatype', label: 'report.profitshare.areatype', formatValue: (val) => roleTypeEnum.getEnumTypeName(val) },
|
|
{ field: 'areatype', label: 'report.profitshare.areatype', formatValue: (val) => roleTypeEnum.getEnumTypeName(val) },
|
|
|
{ field: 'areaaccountid', label: 'report.profitshare.areaaccountid' },
|
|
{ field: 'areaaccountid', label: 'report.profitshare.areaaccountid' },
|
|
|
- { field: 'goodsname', label: 'report.profitshare.goodsname' },
|
|
|
|
|
- { field: 'searchtype', label: 'report.profitshare.searchtype' },
|
|
|
|
|
{ field: 'totalcount', label: 'report.profitshare.totalcount' },
|
|
{ field: 'totalcount', label: 'report.profitshare.totalcount' },
|
|
|
{ field: 'totalfee', label: 'report.profitshare.totalfee' },
|
|
{ field: 'totalfee', label: 'report.profitshare.totalfee' },
|
|
|
{ field: 'divideamount', label: 'report.profitshare.divideamount' }
|
|
{ field: 'divideamount', label: 'report.profitshare.divideamount' }
|