1. fix
This commit is contained in:
2026-05-08 14:51:02 +08:00
parent e69006d9eb
commit bf46f05bf8
4 changed files with 814 additions and 585 deletions

View File

@@ -104,6 +104,13 @@ export function getUserPerformance(userId) {
}) })
} }
export function getDailySummaryList(userId) {
return request({
url: '/market-info/daily-summary-list',
method: 'get',
params: {
userId
}
})
}

View File

@@ -1,226 +1,398 @@
export default { export default {
height:'auto', height: 'auto',
calcHeight: 30, calcHeight: 30,
tip: false, tip: false,
searchShow: true, align: 'center',
searchMenuSpan: 6, searchShow: true,
border: true, searchMenuSpan: 6,
index: true, border: true,
viewBtn: true, index: true,
selection: true, menu: false,
dialogClickModal: false, addBtn: false,
column: [ viewBtn: false,
{ editBtn: false,
label: "主键", refreshBtn: false,
prop: "id", selection: false,
type: "input", dialogClickModal: false,
addDisplay: false, stripe: true,
editDisplay: false, column: [
viewDisplay: false, {
hide: true, label: "主键",
}, prop: "id",
{ type: "input",
label: "用户ID", addDisplay: false,
prop: "userId", editDisplay: false,
type: "input", viewDisplay: false,
}, hide: true,
{ },
label: "用户账号", {
prop: "userAccount", label: "用户ID",
type: "input", prop: "userId",
}, type: "input",
{ hide: true,
label: "用户姓名", },
prop: "userName", {
type: "input", label: "账号",
}, prop: "userAccount",
{ type: "input",
label: "统计日期,如 '2026-04-29'", overHidden: true,
prop: "statDate", hide: true,
type: "input", },
}, {
{ label: "姓名",
label: "直推人数(累计)", prop: "userName",
prop: "directReferralCount", type: "input",
type: "input", hide: true,
}, overHidden: true,
{ },
label: "当日新增直推人数", {
prop: "newDirectReferralCount", label: "日期",
type: "input", prop: "statDate",
}, type: "date",
{ overHidden: true,
label: "团队人数(累计)", fixed: true,
prop: "teamTotalCount", },
type: "input", {
}, label: "人员相关",
{ children: [
label: "当日新增团队人数", {
prop: "newTeamCount", label: "个人",
type: "input", children: [
}, {
{ label: "直推",
label: "总福利值", prop: "personalTotalInviteCount",
prop: "totalBenefitsValue", type: "input",
type: "input", },
}, {
{ label: "新增",
label: "当日新增福利值", prop: "personalIncreaseInviteCount",
prop: "increaseBenefitsValue", type: "input",
type: "input", },
}, ],
{ },
label: "当日持有福利包的直推人数", {
prop: "directWithBenefitPackageCount", label: '团队',
type: "input", children: [
}, {
{ label: "总人数",
label: "当日直推人新增的福利包明细(数组)", prop: "teamMemberCount",
prop: "directNewBenefitPackages", type: "input",
type: "input", },
}, {
{ label: "新增",
label: "直推人福利包面值总和", prop: "teamIncreaseCount",
prop: "directBenefitPackageFaceTotal", type: "input",
type: "input", },
}, ],
{ },
label: "直推人福利包可提供加速的值(排除后台划拨)", ],
prop: "directAcceleratedValue", },
type: "input", {
}, label: "福利值、包",
{ children: [
label: "当日福利积分系统等级", {
prop: "benefitLevel", label: '个人',
type: "input", children: [
}, {
{ label: "总值",
label: "当日现金下单的直推人数", prop: "personalTotalBenefitsValue",
prop: "cashOrderDirectCount", type: "input",
type: "input", },
}, {
{ label: "有效值",
label: "当日直推人现金下单金额", prop: "personalBenefitsPackageRemainValue",
prop: "cashOrderDirectAmount", },
type: "input", {
}, label: "新增",
{ prop: "personalIncreaseBenefitsValue",
label: "直推人可提供的现金分红金额(排除线下支付)", type: "input",
prop: "cashDividendEligibleDirect", },
type: "input", {
}, label: "新增有效",
{ prop: "personalIncreaseCurrentBenefitsValue",
label: "当日佣金分红系统等级", type: "input",
prop: "commissionLevel", hide: true,
type: "input", },
}, {
{ label: "明细",
label: "当日自己新增福利包(明细数组)", prop: "personalIncreaseBenefitsPackageDetail",
prop: "selfNewBenefitPackages", type: "input",
type: "input", hide: true,
}, },
{ {
label: "当日自己新增福利包面值", label: "加速值",
prop: "selfNewBenefitFaceValue", prop: "personalBenefitsPackageSpeedUpValue",
type: "input", type: "input",
}, hide: true,
{ },
label: "自己新增福利包可提供加速的值", {
prop: "selfAcceleratedValue", label: "剩余",
type: "input", prop: "personalBenefitsPackageRemainValue",
}, type: "input",
{ },
label: "福利包总剩余面值", {
prop: "totalRemainingBenefitFace", label: "持包人数",
type: "input", prop: "personalInviteBenefitsPackageHolderCount",
}, type: "input",
{ hide: true,
label: "福利包加速了多少值(累计)", },
prop: "totalAcceleratedByPackages", {
type: "input", label: "直推新增明细",
}, prop: "personalInviteIncreaseBenefitsPackageDetail",
{ type: "input",
label: "现金分红了多少(即佣金)", hide: true,
prop: "cashCommissionPaid", },
type: "input", {
}, label: "等级",
{ prop: "personalBenefitsLevel",
label: "当日现金消费金额(排除线下支付)", type: "input",
prop: "selfCashConsumptionAmount", },
type: "input", ]
}, },
{ {
label: "自己可提供分红的金额(排除线下支付)", label: '团队',
prop: "selfCashDividendEligible", children: [
type: "input", {
}, label: "总值",
{ prop: "teamTotalBenefitsValue",
label: "备注", type: "input",
prop: "remark", },
type: "input", {
}, label: "有效值",
{ prop: "teamCurrentBenefitsValue",
label: "创建人", type: "input",
prop: "createUser", },
type: "input", {
addDisplay: false, label: "新增",
editDisplay: false, prop: "teamIncreaseBenefitsValue",
viewDisplay: false, type: "input",
hide: true, },
}, {
{ label: "持包人数",
label: "创建部门", prop: "teamBenefitsPackageHolderCount",
prop: "createDept", type: "input",
type: "input", hide: true,
addDisplay: false, },
editDisplay: false, {
viewDisplay: false, label: "新增明细",
hide: true, prop: "teamIncreaseBenefitsPackageDetail",
}, type: "input",
{ hide: true,
label: "创建时间", },
prop: "createTime", ],
type: "input", },
addDisplay: false, ],
editDisplay: false, },
viewDisplay: false, {
hide: true, label: "消费业绩",
}, children: [
{ {
label: "修改人", label: '个人',
prop: "updateUser", children: [
type: "input", {
addDisplay: false, label: "总金额",
editDisplay: false, prop: "personalTotalAmount",
viewDisplay: false, type: "input",
hide: true, },
}, {
{ label: "线上",
label: "修改时间", prop: "personalOnlineAmount",
prop: "updateTime", type: "input",
type: "input", },
addDisplay: false, {
editDisplay: false, label: "线下",
viewDisplay: false, prop: "personalOfflineAmount",
hide: true, type: "input",
}, hide: true,
{ },
label: "状态", {
prop: "status", label: "其他",
type: "input", prop: "personalOtherAmount",
addDisplay: false, type: "input",
editDisplay: false, hide: true,
viewDisplay: false, },
hide: true, {
}, label: "新增",
{ prop: "personalIncreaseAmount",
label: "是否已删除", type: "input",
prop: "isDeleted", },
type: "input", {
addDisplay: false, label: "新增线上",
editDisplay: false, prop: "personalIncreaseOnlineAmount",
viewDisplay: false, type: "input",
hide: true, },
}, {
] 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,
},
]
} }

View File

@@ -12,6 +12,7 @@ export default {
delBtn: false, delBtn: false,
selection: true, selection: true,
dialogClickModal: false, dialogClickModal: false,
stripe: true,
column: [ column: [
{ {
label: "主键", label: "主键",

View File

@@ -20,11 +20,11 @@
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad"> @on-load="onLoad">
<template #menu-left> <template #menu-left>
<!-- <el-button type="warning"--> <!-- <el-button type="warning"-->
<!-- plain--> <!-- plain-->
<!-- icon="el-icon-download"--> <!-- icon="el-icon-download"-->
<!-- @click="handleExport">导 出--> <!-- @click="handleExport">导 出-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button <el-button
type="info" type="info"
plain plain
@@ -54,11 +54,17 @@
@click.stop="userPerformanceOpen(row)">查询业绩 @click.stop="userPerformanceOpen(row)">查询业绩
</el-button> </el-button>
<el-button type="text"
icon="el-icon-document"
@click.stop="handleDailySummaryData(row)">数据统计
</el-button>
</template> </template>
</avue-crud> </avue-crud>
<el-drawer :title="`账户 [${userAccount}] 福利包明细`" v-model="benefitPackBox" :direction="direction" append-to-body <el-drawer :title="`账户 [${userAccount}] 福利包明细`" v-model="benefitPackBox" :direction="direction"
append-to-body
size="800px" @close="benefitPackClose"> size="800px" @close="benefitPackClose">
<basic-container> <basic-container>
<avue-crud :option="benefitPackOption" <avue-crud :option="benefitPackOption"
@@ -69,7 +75,8 @@
</basic-container> </basic-container>
</el-drawer> </el-drawer>
<el-drawer :title="`账户 [${userAccount}] 积分信息`" v-model="userPointInfoBox" :direction="direction" append-to-body <el-drawer :title="`账户 [${userAccount}] 积分信息`" v-model="userPointInfoBox" :direction="direction"
append-to-body
size="800px" @close="userPointInfoClose"> size="800px" @close="userPointInfoClose">
<basic-container> <basic-container>
<avue-crud :option="userPointInfoOption" <avue-crud :option="userPointInfoOption"
@@ -81,7 +88,8 @@
</el-drawer> </el-drawer>
<el-drawer :title="`账户 [${userAccount}] 累计消费`" v-model="userMallSpendBox" :direction="direction" append-to-body <el-drawer :title="`账户 [${userAccount}] 累计消费`" v-model="userMallSpendBox" :direction="direction"
append-to-body
size="800px" @close="userMallSpendClose"> size="800px" @close="userMallSpendClose">
<basic-container> <basic-container>
<avue-crud :option="userMallSpendOption" <avue-crud :option="userMallSpendOption"
@@ -92,7 +100,8 @@
</basic-container> </basic-container>
</el-drawer> </el-drawer>
<el-drawer :title="`账户 [${userAccount}] 业绩查询`" v-model="userPerformanceBox" :direction="direction" append-to-body <el-drawer :title="`账户 [${userAccount}] 业绩查询`" v-model="userPerformanceBox" :direction="direction"
append-to-body
size="800px" @close="userPerformanceClose"> size="800px" @close="userPerformanceClose">
<basic-container> <basic-container>
<avue-crud :option="userPerformanceOption" <avue-crud :option="userPerformanceOption"
@@ -103,241 +112,270 @@
</basic-container> </basic-container>
</el-drawer> </el-drawer>
<el-drawer :title="`账户 [${userAccount}] 统计数据`" v-model="dailySummaryBox" :direction="direction"
append-to-body
size="100%"
:before-close="handleDailySummaryClose">
<basic-container>
<avue-crud :option="optionSummary"
:data="dailySummaryData"
ref="crudSub">
</avue-crud>
</basic-container>
</el-drawer>
<!-- <el-drawer :title="`${username} ${serialNumber} `" v-model="subVisible" :direction="direction"-->
<!-- <el-drawer :title="`${username} ${serialNumber} `" v-model="subVisible" :direction="direction"--> <!-- append-to-body-->
<!-- append-to-body--> <!-- :before-close="handleSubClose" size="90%">-->
<!-- :before-close="handleSubClose" size="90%">--> <!-- <el-tag size="large" :type="notes ? 'danger' : 'info'" effect="dark">-->
<!-- <el-tag size="large" :type="notes ? 'danger' : 'info'" effect="dark">--> <!-- {{ notes || 'No special notes.' }}-->
<!-- {{ notes || 'No special notes.' }}--> <!-- </el-tag>-->
<!-- </el-tag>--> <!-- <basic-container>-->
<!-- <basic-container>--> <!-- <avue-crud :option="optionSub"-->
<!-- <avue-crud :option="optionSub"--> <!-- :data="dataSub"-->
<!-- :data="dataSub"--> <!-- v-model:page="pageSub"-->
<!-- v-model:page="pageSub"--> <!-- v-model="formSub"-->
<!-- v-model="formSub"--> <!-- :table-loading="loadingSub"-->
<!-- :table-loading="loadingSub"--> <!-- ref="crudSub"-->
<!-- ref="crudSub"--> <!-- @row-del="rowDelSub"-->
<!-- @row-del="rowDelSub"--> <!-- @row-update="rowUpdateSub"-->
<!-- @row-update="rowUpdateSub"--> <!-- @row-save="rowSaveSub"-->
<!-- @row-save="rowSaveSub"--> <!-- :before-open="beforeOpenSub"-->
<!-- :before-open="beforeOpenSub"--> <!-- @search-change="searchChangeSub"-->
<!-- @search-change="searchChangeSub"--> <!-- @search-reset="searchResetSub"-->
<!-- @search-reset="searchResetSub"--> <!-- @selection-change="selectionChangeSub"-->
<!-- @selection-change="selectionChangeSub"--> <!-- @current-change="currentChangeSub"-->
<!-- @current-change="currentChangeSub"--> <!-- @size-change="sizeChangeSub"-->
<!-- @size-change="sizeChangeSub"--> <!-- @on-load="onLoadSub">-->
<!-- @on-load="onLoadSub">--> <!-- <template #menu="{ row }">-->
<!-- <template #menu="{ row }">--> <!-- <el-button type="text"-->
<!-- <el-button type="text"--> <!-- icon="el-icon-folder"-->
<!-- icon="el-icon-folder"--> <!-- @click.stop="handleAssets(row)">Assets-->
<!-- @click.stop="handleAssets(row)">Assets--> <!-- </el-button>-->
<!-- </el-button>--> <!-- <el-button type="text"-->
<!-- <el-button type="text"--> <!-- icon="el-icon-download"-->
<!-- icon="el-icon-download"--> <!-- v-if="row.status === 1"-->
<!-- v-if="row.status === 1"--> <!-- @click.stop="handleDownload(row)">Download-->
<!-- @click.stop="handleDownload(row)">Download--> <!-- </el-button>-->
<!-- </el-button>--> <!-- <el-button type="text"-->
<!-- <el-button type="text"--> <!-- icon="el-icon-finished"-->
<!-- icon="el-icon-finished"--> <!-- v-if="row.status === 1"-->
<!-- v-if="row.status === 1"--> <!-- @click.stop="handleDone(row)">Done-->
<!-- @click.stop="handleDone(row)">Done--> <!-- </el-button>-->
<!-- </el-button>--> <!-- </template>-->
<!-- </template>--> <!-- </avue-crud>-->
<!-- </avue-crud>--> <!-- </basic-container>-->
<!-- </basic-container>--> <!-- </el-drawer>-->
<!-- </el-drawer>-->
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {getList, getDetail, add, update, remove, resetPassword , benefitPackCountByUser , getUserPointInfo , getUserMallSpend , getUserPerformance} from "@/api/market/marketInfo"; import {
import option from "@/option/market/marketInfo"; add,
import {mapGetters} from "vuex"; benefitPackCountByUser,
import {exportBlob} from "@/api/common"; getDailySummaryList,
import {getToken} from '@/utils/auth'; getDetail,
import {downloadXls} from "@/utils/util"; getList,
import {dateNow} from "@/utils/date"; getUserMallSpend,
import NProgress from 'nprogress'; getUserPerformance,
import 'nprogress/nprogress.css'; getUserPointInfo,
remove,
resetPassword,
update
} from "@/api/market/marketInfo";
import option from "@/option/market/marketInfo";
import optionSummary from "@/option/market/dailySummary";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default { export default {
data() { data() {
return {
form: {},
formSummary:{},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: [],
username: "用户账号",
userAccount: "",
direction: "rtl",
benefitPackBox: false,
benefitPackOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '福利包',
prop: 'packName',
type: 'input',
},
{
label: '数量',
prop: 'count',
type: 'number',
},
],
},
benefitPackData: [],
userPointInfoBox: false,
userPointInfoOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '用户积分',
prop: 'userPoint',
type: 'input',
},
{
label: '福利积分',
prop: 'benefitPoint',
type: 'input',
},
{
label: '现金券',
prop: 'cashCoupon',
type: 'input',
},
{
label: '佣金',
prop: 'userCommission',
type: 'input',
},
],
},
userPointInfoData: [],
userMallSpendBox: false,
userMallSpendOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '商城消费(元)',
prop: 'amount',
type: 'input',
},
],
},
userMallSpendData: [],
userPerformanceBox: false,
userPerformanceOption: {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '现金业绩',
prop: 'userCash',
type: 'input',
},
{
label: '福利包业绩',
prop: 'benefitWelfare',
type: 'input',
},
],
},
userPerformanceData: [],
dailySummaryBox: false,
dailySummaryData: [],
optionSummary: optionSummary,
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
form: {}, addBtn: this.validData(this.permission.marketInfo_add, false),
query: {}, viewBtn: this.validData(this.permission.marketInfo_view, false),
search: {}, delBtn: this.validData(this.permission.marketInfo_delete, false),
loading: true, editBtn: this.validData(this.permission.marketInfo_edit, false)
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: [],
username: "用户账号",
userAccount : "",
direction : "rtl",
benefitPackBox: false,
benefitPackOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '福利包',
prop: 'packName',
type: 'input',
},
{
label: '数量',
prop: 'count',
type: 'number',
},
],
},
benefitPackData : [],
userPointInfoBox: false,
userPointInfoOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '用户积分',
prop: 'userPoint',
type: 'input',
},
{
label: '福利积分',
prop: 'benefitPoint',
type: 'input',
},
{
label: '现金券',
prop: 'cashCoupon',
type: 'input',
},
{
label: '佣金',
prop: 'userCommission',
type: 'input',
},
],
},
userPointInfoData : [],
userMallSpendBox: false,
userMallSpendOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '商城消费(元)',
prop: 'amount',
type: 'input',
},
],
},
userMallSpendData : [],
userPerformanceBox: false,
userPerformanceOption : {
addBtn: false,
editBtn: true,
delBtn: false,
menu: false,
labelWidth: 200,
column: [
{
label: '现金业绩',
prop: 'userCash',
type: 'input',
},
{
label: '福利包业绩',
prop: 'benefitWelfare',
type: 'input',
},
],
},
userPerformanceData : [],
}; };
}, },
computed: { ids() {
...mapGetters(["permission"]), let ids = [];
permissionList() { this.selectionList.forEach(ele => {
return { ids.push(ele.id);
addBtn: this.validData(this.permission.marketInfo_add, false), });
viewBtn: this.validData(this.permission.marketInfo_view, false), return ids.join(",");
delBtn: this.validData(this.permission.marketInfo_delete, false), }
editBtn: this.validData(this.permission.marketInfo_edit, false) },
}; methods: {
}, rowSave(row, done, loading) {
ids() { add(row).then(() => {
let ids = []; this.onLoad(this.page);
this.selectionList.forEach(ele => { this.$message({
ids.push(ele.id); type: "success",
message: "操作成功!"
}); });
return ids.join(","); done();
} }, error => {
loading();
window.console.log(error);
});
}, },
methods: { rowUpdate(row, index, done, loading) {
rowSave(row, done, loading) { update(row).then(() => {
add(row).then(() => { this.onLoad(this.page);
this.onLoad(this.page); this.$message({
this.$message({ type: "success",
type: "success", message: "操作成功!"
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
}); });
}, done();
rowUpdate(row, index, done, loading) { }, error => {
update(row).then(() => { loading();
this.onLoad(this.page); console.log(error);
this.$message({ });
type: "success", },
message: "操作成功!" rowDel(row) {
}); this.$confirm("确定将选择数据删除?", {
done(); confirmButtonText: "确定",
}, error => { cancelButtonText: "取消",
loading(); type: "warning"
console.log(error); })
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => { .then(() => {
return remove(row.id); return remove(row.id);
}) })
@@ -348,17 +386,17 @@
message: "操作成功!" message: "操作成功!"
}); });
}); });
}, },
handleDelete() { handleDelete() {
if (this.selectionList.length === 0) { if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择数据删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
return remove(this.ids); return remove(this.ids);
}) })
@@ -370,149 +408,160 @@
}); });
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}); });
}, },
handleExport() { handleExport() {
let downloadUrl = `/blade-marketinfo/marketInfo/export-marketInfo?${this.website.tokenHeader}=${getToken()}`; let downloadUrl = `/blade-marketinfo/marketInfo/export-marketInfo?${this.website.tokenHeader}=${getToken()}`;
const { const {} = this.query;
} = this.query; let values = {};
let values = { this.$confirm("是否导出数据?", "提示", {
}; confirmButtonText: "确定",
this.$confirm("是否导出数据?", "提示", { cancelButtonText: "取消",
confirmButtonText: "确定", type: "warning"
cancelButtonText: "取消", }).then(() => {
type: "warning" NProgress.start();
}).then(() => { exportBlob(downloadUrl, values).then(res => {
NProgress.start(); downloadXls(res.data, `用户拓展信息表${dateNow()}.xlsx`);
exportBlob(downloadUrl, values).then(res => { NProgress.done();
downloadXls(res.data, `用户拓展信息表${dateNow()}.xlsx`); })
NProgress.done(); });
},
handleReset() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择账号密码重置为初始密码?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return resetPassword(this.ids);
}) })
}); .then(() => {
}, this.$message({
handleReset() { type: 'success',
if (this.selectionList.length === 0) { message: '操作成功!',
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择账号密码重置为初始密码?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return resetPassword(this.ids);
})
.then(() => {
this.$message({
type: 'success',
message: '操作成功!',
});
this.$refs.crud.toggleSelection();
}); });
}, this.$refs.crud.toggleSelection();
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
}); });
} },
done(); beforeOpen(done, type) {
}, if (["edit", "view"].includes(type)) {
searchReset() { getDetail(this.form.id).then(res => {
this.query = {}; this.form = res.data.data;
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
}); });
}, }
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
},
benefitPackInfoOpen(row){ benefitPackInfoOpen(row) {
this.benefitPackBox = true; this.benefitPackBox = true;
this.userAccount = row.account; this.userAccount = row.account;
benefitPackCountByUser(row.id) benefitPackCountByUser(row.id)
.then(res => { .then(res => {
this.benefitPackData = res.data.data; this.benefitPackData = res.data.data;
}) })
}, },
benefitPackClose(){ benefitPackClose() {
this.benefitPackData = []; this.benefitPackData = [];
}, },
userPointInfoOpen(row){ userPointInfoOpen(row) {
this.userPointInfoBox = true; this.userPointInfoBox = true;
this.userAccount = row.account; this.userAccount = row.account;
getUserPointInfo(row.id) getUserPointInfo(row.id)
.then(res => { .then(res => {
this.userPointInfoData.push(res.data.data); this.userPointInfoData.push(res.data.data);
}) })
}, },
userPointInfoClose(){ userPointInfoClose() {
this.userPointInfoData = []; this.userPointInfoData = [];
}, },
userMallSpendOpen(row){ userMallSpendOpen(row) {
this.userMallSpendBox = true; this.userMallSpendBox = true;
this.userAccount = row.account; this.userAccount = row.account;
getUserMallSpend(row.id) getUserMallSpend(row.id)
.then(res => { .then(res => {
this.userMallSpendData.push(res.data.data); this.userMallSpendData.push(res.data.data);
}) })
}, },
userMallSpendClose(){ userMallSpendClose() {
this.userMallSpendData = []; this.userMallSpendData = [];
}, },
userPerformanceOpen(row){ userPerformanceOpen(row) {
this.userPerformanceBox = true; this.userPerformanceBox = true;
this.userAccount = row.account; this.userAccount = row.account;
getUserPerformance(row.id) getUserPerformance(row.id)
.then(res => { .then(res => {
this.userPerformanceData.push(res.data.data); this.userPerformanceData.push(res.data.data);
}) })
}, },
userPerformanceClose(){ userPerformanceClose() {
this.userPerformanceData = []; this.userPerformanceData = [];
}, },
} handleDailySummaryData(row) {
}; this.dailySummaryBox = true;
this.userAccount = row.account;
getDailySummaryList(row.id)
.then(res => {
this.dailySummaryData = res.data.data;
})
},
handleDailySummaryClose(hide) {
hide();
},
}
};
</script> </script>
<style> <style>