update:
1. fix
This commit is contained in:
@@ -2,7 +2,7 @@ import request from '@/axios';
|
||||
|
||||
export const getList = (current, size, params) => {
|
||||
return request({
|
||||
url: '/market/daily-summary/list',
|
||||
url: '/market/daily-summary/page',
|
||||
method: 'get',
|
||||
params: {
|
||||
...params,
|
||||
|
||||
403
src/option/market/merchantDailySummary.js
Normal file
403
src/option/market/merchantDailySummary.js
Normal file
@@ -0,0 +1,403 @@
|
||||
export default {
|
||||
height: 'auto',
|
||||
calcHeight: 30,
|
||||
tip: false,
|
||||
align: 'center',
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
border: true,
|
||||
index: true,
|
||||
menu: false,
|
||||
addBtn: false,
|
||||
viewBtn: false,
|
||||
editBtn: false,
|
||||
selection: false,
|
||||
dialogClickModal: false,
|
||||
stripe: true,
|
||||
column: [
|
||||
{
|
||||
label: "主键",
|
||||
prop: "id",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "用户ID",
|
||||
prop: "userId",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "账号",
|
||||
prop: "userAccount",
|
||||
type: "input",
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: "邀请人",
|
||||
prop: "invitorAccount",
|
||||
type: "input",
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: "姓名",
|
||||
prop: "userName",
|
||||
type: "input",
|
||||
overHidden: true,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "日期",
|
||||
prop: "statDate",
|
||||
type: "date",
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
format: 'YYYY-MM-DD',
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: "人员相关",
|
||||
children: [
|
||||
{
|
||||
label: "个人",
|
||||
children: [
|
||||
{
|
||||
label: "直推",
|
||||
prop: "personalTotalInviteCount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增",
|
||||
prop: "personalIncreaseInviteCount",
|
||||
type: "input",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '团队',
|
||||
children: [
|
||||
{
|
||||
label: "总人数",
|
||||
prop: "teamMemberCount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增",
|
||||
prop: "teamIncreaseCount",
|
||||
type: "input",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "福利值、包",
|
||||
children: [
|
||||
{
|
||||
label: '个人',
|
||||
children: [
|
||||
{
|
||||
label: "总值",
|
||||
prop: "personalTotalBenefitsValue",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "有效值",
|
||||
prop: "personalBenefitsPackageRemainValue",
|
||||
},
|
||||
{
|
||||
label: "新增",
|
||||
prop: "personalIncreaseBenefitsValue",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增有效",
|
||||
prop: "personalIncreaseCurrentBenefitsValue",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "明细",
|
||||
prop: "personalIncreaseBenefitsPackageDetail",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "加速值",
|
||||
prop: "personalBenefitsPackageSpeedUpValue",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "剩余",
|
||||
prop: "personalBenefitsPackageRemainValue",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "持包人数",
|
||||
prop: "personalInviteBenefitsPackageHolderCount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "直推新增明细",
|
||||
prop: "personalInviteIncreaseBenefitsPackageDetail",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "等级",
|
||||
prop: "personalBenefitsLevel",
|
||||
type: "input",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '团队',
|
||||
children: [
|
||||
{
|
||||
label: "总值",
|
||||
prop: "teamTotalBenefitsValue",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "有效值",
|
||||
prop: "teamCurrentBenefitsValue",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增",
|
||||
prop: "teamIncreaseBenefitsValue",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "持包人数",
|
||||
prop: "teamBenefitsPackageHolderCount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "新增明细",
|
||||
prop: "teamIncreaseBenefitsPackageDetail",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "消费业绩",
|
||||
children: [
|
||||
{
|
||||
label: '个人',
|
||||
children: [
|
||||
{
|
||||
label: "总金额",
|
||||
prop: "personalTotalAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "线上",
|
||||
prop: "personalOnlineAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "线下",
|
||||
prop: "personalOfflineAmount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "其他",
|
||||
prop: "personalOtherAmount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "新增",
|
||||
prop: "personalIncreaseAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增线上",
|
||||
prop: "personalIncreaseOnlineAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增线下",
|
||||
prop: "personalIncreaseOfflineAmount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "新增其他",
|
||||
prop: "personalIncreaseOtherAmount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "等级",
|
||||
prop: "personalCashLevel",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "明细",
|
||||
prop: "personalIncreaseOrderDetail",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "佣金金额",
|
||||
prop: "personalDynamicRewardsAmount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '团队',
|
||||
children: [
|
||||
{
|
||||
label: "总金额",
|
||||
prop: "teamTotalAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "线上",
|
||||
prop: "teamOnlineAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "线下",
|
||||
prop: "teamOfflineAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "其他",
|
||||
prop: "teamOtherAmount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "新增",
|
||||
prop: "teamIncreaseAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增线上",
|
||||
prop: "teamIncreaseOnlineAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增线下",
|
||||
prop: "teamIncreaseOfflineAmount",
|
||||
type: "input",
|
||||
},
|
||||
{
|
||||
label: "新增其他",
|
||||
prop: "teamIncreaseOtherAmount",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "福利积分",
|
||||
prop: "personalBenefitsPointsBalance",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "账户佣金",
|
||||
prop: "personalCommissionBalance",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "现金券",
|
||||
prop: "personalCashCouponBalance",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "用户积分",
|
||||
prop: "personalUserPointsBalance",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
prop: "remark",
|
||||
type: "input",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "创建人",
|
||||
prop: "createUser",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "创建部门",
|
||||
prop: "createDept",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "创建时间",
|
||||
prop: "createTime",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "修改人",
|
||||
prop: "updateUser",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "修改时间",
|
||||
prop: "updateTime",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "是否已删除",
|
||||
prop: "isDeleted",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -20,12 +20,6 @@
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad">
|
||||
<template #menu-left>
|
||||
<el-button type="danger"
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
v-if="permission.dailySummary_delete"
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
<el-button type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
@@ -33,12 +27,37 @@
|
||||
</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<el-dialog
|
||||
v-model="exportDialogVisible"
|
||||
title="导出数据"
|
||||
width="300px"
|
||||
@close="resetExportForm"
|
||||
>
|
||||
<el-form :model="exportForm">
|
||||
<el-form-item label="统计日期" label-width="80px">
|
||||
<el-date-picker
|
||||
v-model="exportForm.statDate"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择日期"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="exportDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmExport">确定导出</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getList, getDetail, add, update, remove} from "@/api/market/dailySummary";
|
||||
import option from "@/option/market/dailySummary";
|
||||
import option from "@/option/market/merchantDailySummary";
|
||||
import {mapGetters} from "vuex";
|
||||
import {exportBlob} from "@/api/common";
|
||||
import {getToken} from 'utils/auth';
|
||||
@@ -55,13 +74,17 @@
|
||||
search: {},
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
pageSize: 30,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
selectionList: [],
|
||||
option: option,
|
||||
data: []
|
||||
data: [],
|
||||
exportDialogVisible: false,
|
||||
exportForm: {
|
||||
statDate: null // 默认不选
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -149,23 +172,38 @@
|
||||
});
|
||||
},
|
||||
handleExport() {
|
||||
let downloadUrl = `/blade-dailysummary/dailySummary/export-dailySummary?${this.website.tokenHeader}=${getToken()}`;
|
||||
const {
|
||||
} = this.query;
|
||||
let values = {
|
||||
};
|
||||
this.$confirm("是否导出数据?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob(downloadUrl, values).then(res => {
|
||||
downloadXls(res.data, `用户日汇总表${dateNow()}.xlsx`);
|
||||
NProgress.done();
|
||||
})
|
||||
});
|
||||
// 打开弹窗
|
||||
this.exportDialogVisible = true;
|
||||
},
|
||||
|
||||
confirmExport() {
|
||||
if (!this.exportForm.statDate) {
|
||||
this.$message.warning('请选择统计日期');
|
||||
return;
|
||||
}
|
||||
|
||||
const statDate = this.exportForm.statDate; // 如 "2026-05-12"
|
||||
|
||||
let downloadUrl = `/market/daily-summary/export?${this.website.tokenHeader}=${getToken()}&statDate=${encodeURIComponent(statDate)}`;
|
||||
|
||||
this.exportDialogVisible = false;
|
||||
|
||||
NProgress.start();
|
||||
exportBlob(downloadUrl, {})
|
||||
.then(res => {
|
||||
downloadXls(res.data, `用户日汇总表_${statDate}.xlsx`);
|
||||
NProgress.done();
|
||||
})
|
||||
.catch(err => {
|
||||
NProgress.done();
|
||||
this.$message.error('导出失败,请重试');
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
resetExportForm() {
|
||||
this.exportForm.statDate = null;
|
||||
},
|
||||
|
||||
beforeOpen(done, type) {
|
||||
if (["edit", "view"].includes(type)) {
|
||||
getDetail(this.form.id).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user