Compare commits
11 Commits
weeklyCard
...
giftPanelM
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1e67efafe7 | ||
![]() |
f31dcae058 | ||
![]() |
aa74f2ed36 | ||
![]() |
e4cbd9cc35 | ||
![]() |
775b8abc93 | ||
![]() |
e1fb48d900 | ||
![]() |
93aded746e | ||
![]() |
af1d94c1f2 | ||
![]() |
89c27b28e7 | ||
![]() |
f34a7b9430 | ||
![]() |
fbd4fdcbd1 |
19
src/api/GiftPanelManagement/GiftPanelManagement.js
Normal file
19
src/api/GiftPanelManagement/GiftPanelManagement.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
|
||||
// 列表
|
||||
export const list = query => {
|
||||
return request({
|
||||
url: '/giftPanelTab/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 保存
|
||||
export const update = query => {
|
||||
return request({
|
||||
url: '/giftPanelTab/update',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
@@ -102,6 +102,14 @@ export const addRecord = query => {
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 保存收款账户
|
||||
export const savePayAccount = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/savePayAccount',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 违规类查询
|
||||
export const listRecord = query => {
|
||||
return request({
|
||||
@@ -120,3 +128,127 @@ export const exportInfo = query => {
|
||||
window.location.href = `/admin/family/manage/exportFamily?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
// 工资梯度-列表
|
||||
export const manageList = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工资梯度-新增
|
||||
export const manageAdd = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/add',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工资梯度-删除
|
||||
export const manageDelete = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/delete',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工会统计-列表
|
||||
export const statPageFamily = query => {
|
||||
return request({
|
||||
url: '/admin/family/wage/stat/pageFamily',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工会统计-单个工会详情
|
||||
export const listFamilyMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/wage/stat/listFamilyMember',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工会统计-单个工会导出
|
||||
export const statExportFamilyMember = query => {
|
||||
window.location.href = `/admin/family/wage/stat/exportFamilyMember?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 工会统计-每日工会详情
|
||||
export const listFamilyMemberDaily = query => {
|
||||
return request({
|
||||
url: '/admin/family/wage/stat/listFamilyMemberDaily',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 工会统计-单每日会导出
|
||||
export const exportFamilyMemberDaily = query => {
|
||||
window.location.href = `/admin/family/wage/stat/exportFamilyMemberDaily?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 工会统计-导出公会工资统计
|
||||
export const statExportFamily = query => {
|
||||
window.location.href = `/admin/family/wage/stat/exportFamily?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 工会统计-导出家族流水
|
||||
export const incomeExportFamilys = query => {
|
||||
window.location.href = `/admin/family/income/exportFamily?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 金币流水-列表
|
||||
export const incomePageFamily = query => {
|
||||
return request({
|
||||
url: '/admin/family/income/pageFamily',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 金币流水-详情
|
||||
export const incomeListFamilyMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/income/listFamilyMember',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 金币流水-导出成员流水信息
|
||||
export const incomeExportFamily = query => {
|
||||
window.location.href = `/admin/family/income/exportFamilyMember?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 成员信息-弹窗详情
|
||||
export const manageListFamilyMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/listFamilyMember',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 成员信息-新增成员
|
||||
export const addMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/addMember',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 成员信息-设置管理员
|
||||
export const setManager = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/setManager',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 成员信息-删除管理员
|
||||
export const removeMember = query => {
|
||||
return request({
|
||||
url: '/admin/family/manage/removeMember',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
@@ -1,135 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
// 地区接口
|
||||
export const listPartitionInfo = query => {
|
||||
return request({
|
||||
url: '/partition/listPartitionInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 福袋列表请求
|
||||
export const listLuckyBagLinearGift = query => {
|
||||
return request({
|
||||
url: '/admin/gift/getGiftByTypes',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 福袋礼物列表请求
|
||||
export const getPrizeGroupsInfo = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBag/getGroupInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有礼物列表请求
|
||||
export const getAll = query => {
|
||||
return request({
|
||||
url: '/admin/gift/getAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有座驾列表请求
|
||||
export const carAll = query => {
|
||||
return request({
|
||||
url: '/admin/car/goods/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有头饰列表请求
|
||||
export const headwearAll = query => {
|
||||
return request({
|
||||
url: '/admin/headwear/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有铭牌列表请求
|
||||
export const nameplateAll = query => {
|
||||
return request({
|
||||
url: '/admin/nameplate/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有气泡列表请求
|
||||
export const chatbubbleAll = query => {
|
||||
return request({
|
||||
url: '/admin/chatbubble/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有资料卡列表请求
|
||||
export const infocard = query => {
|
||||
return request({
|
||||
url: '/admin/infocard/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 周卡TAB-列表
|
||||
export const weekCardTabList = query => {
|
||||
return request({
|
||||
url: '/admin/weekCardTab/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 周卡TAB-保存
|
||||
export const weekCardTabSave = query => {
|
||||
return request({
|
||||
url: '/admin/weekCardTab/save',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 周卡激励统计-列表
|
||||
export const weekCardRecordPage = query => {
|
||||
return request({
|
||||
url: '/admin/weekCardRecord/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 周卡激励统计-详情
|
||||
export const weekCardRecordGetDetailPage = query => {
|
||||
return request({
|
||||
url: '/admin/weekCardRecord/getDetailPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 周卡激励统计-导出
|
||||
export const weekCardRecordExport = query => {
|
||||
window.location.href = `/admin/weekCardRecord/export?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 周卡激励配置-列表
|
||||
export const weekCardPage = query => {
|
||||
return request({
|
||||
url: '/admin/weekCard/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 周卡激励配置-上下线
|
||||
export const updateEnabled = query => {
|
||||
return request({
|
||||
url: '/admin/weekCard/updateEnabled',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 周卡激励配置-保存
|
||||
export const weekCardSave = query => {
|
||||
return request({
|
||||
url: '/admin/weekCard/save',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
238
src/views/GiftPanelManagement/GiftPanelManagement.vue
Normal file
238
src/views/GiftPanelManagement/GiftPanelManagement.vue
Normal file
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 选择分区 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">选择分区</span>
|
||||
<el-select
|
||||
v-model="inquire.partitionId"
|
||||
style="width: 75%"
|
||||
placeholder="请选择"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inquire.inquireonInfos"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="seq" align="center" label="排序" />
|
||||
<el-table-column prop="name" align="center" label="礼物面板类型" />
|
||||
<el-table-column prop="enable" align="center" label="是否生效">
|
||||
<template v-slot="scope">{{ scope.row.enable ? "是" : "否" }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="ediClick(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 编辑弹窗 -->
|
||||
<el-dialog v-model="eidDialog" :title="eidDialogTitle" width="30%" center>
|
||||
<!-- 礼物面板类型 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼物面板类型</span
|
||||
>
|
||||
<el-input
|
||||
v-model="eidObj.type"
|
||||
style="width: 60%"
|
||||
class="input"
|
||||
placeholder="请输入"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 面板排序 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>面板排序-{{ eidText }}</span
|
||||
>
|
||||
<el-input
|
||||
v-model="eidObj.seq"
|
||||
style="width: 60%"
|
||||
class="input"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 是否生效 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>是否生效</span
|
||||
>
|
||||
<el-select
|
||||
v-model="eidObj.value"
|
||||
style="width: 60%"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in eidObj.option"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="eidDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="eidDialogClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { list, update } from "@/api/GiftPanelManagement/GiftPanelManagement";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GiftPanelManagement",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
partitionId: 4,
|
||||
inquireonInfos: [
|
||||
{ desc: "英语区", id: 1 },
|
||||
{ desc: "阿拉伯区", id: 2 },
|
||||
{ desc: "华语区", id: 4 },
|
||||
],
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 编辑
|
||||
eidDialog: false,
|
||||
eidDialogTitle: "",
|
||||
eidText: "",
|
||||
eidObjNew: {},
|
||||
eidObj: {
|
||||
type: "",
|
||||
clientName: "",
|
||||
seq: "",
|
||||
value: "",
|
||||
option: [
|
||||
{
|
||||
desc: "是",
|
||||
id: true,
|
||||
},
|
||||
{
|
||||
desc: "否",
|
||||
id: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
|
||||
this.eidText = `华语区`;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
list({
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => {
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
ediClick(val) {
|
||||
this.eidDialog = true;
|
||||
this.eidObj.type = val.name;
|
||||
this.eidObj.seq = val.seq;
|
||||
this.eidObj.value = val.enable;
|
||||
this.eidObjNew = val;
|
||||
},
|
||||
eidDialogClick() {
|
||||
update({
|
||||
enable: this.eidObj.value,
|
||||
id: this.eidObjNew.id,
|
||||
seq: this.eidObj.seq,
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "编辑成功",
|
||||
type: "success",
|
||||
});
|
||||
this.eidDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChange(val) {
|
||||
console.log(val);
|
||||
if (val == 1) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-英语区`;
|
||||
this.eidText = `英语区`;
|
||||
} else if (val == 2) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-阿拉伯区`;
|
||||
this.eidText = `阿拉伯区`;
|
||||
} else if (val == 4) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
|
||||
this.eidText = `华语区`;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 70px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
@@ -390,7 +390,7 @@ export default {
|
||||
function setUserModal (data) {
|
||||
modalData = {
|
||||
uid: data.uid, erbanNo: data.erbanNo,
|
||||
games: Object.assign([], data.games.map(game => { return { gameId: game.gameId, price: game.price, proficiency: game.proficiency, tags: Object.assign([], game.tags) } }))
|
||||
games: Object.assign([], data.games ? data.games.map(game => { return { gameId: game.gameId, price: game.price, proficiency: game.proficiency, tags: Object.assign([], game.tags) } }) : [])
|
||||
};
|
||||
freshUserModal();
|
||||
}
|
||||
@@ -463,7 +463,7 @@ function freshUserModal () {
|
||||
} else {
|
||||
$("#modalAddBtn").hide();
|
||||
}
|
||||
const gameStr = modalData.games.map((game, index) =>
|
||||
const gameStr = !modalData.games ? '' : modalData.games.map((game, index) =>
|
||||
'<div class="form-group">' +
|
||||
'<label for="modalGameId" class="col-sm-3 control-label">游戏:</label>' +
|
||||
'<div class="col-sm-9">' +
|
||||
|
@@ -199,11 +199,9 @@
|
||||
:on-error="handleAvatarError"
|
||||
>
|
||||
<img
|
||||
v-if="controlsObj.imageUrl1"
|
||||
:src="controlsObj.imageUrl1"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</div>
|
||||
|
||||
|
325
src/views/nobleman/GoldWater.vue
Normal file
325
src/views/nobleman/GoldWater.vue
Normal file
@@ -0,0 +1,325 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">会长分区</span>
|
||||
<el-select
|
||||
v-model="inquire.partitionId"
|
||||
style="width: 75%"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inquire.inquireonInfos"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 公会ID -->
|
||||
<div class="inquire">
|
||||
<span>会长ID</span>
|
||||
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<!-- 公会 -->
|
||||
<div class="inquire">
|
||||
<span>公会名称</span>
|
||||
<el-input
|
||||
v-model="inquire.nick"
|
||||
placeholder="支持模糊查询"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="deriveFun()"
|
||||
>导出</el-button
|
||||
>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
||||
<el-table-column prop="name" align="center" label="公会名称" />
|
||||
<el-table-column
|
||||
prop="ownerPartitionName"
|
||||
align="center"
|
||||
label="会长分区"
|
||||
/>
|
||||
<el-table-column prop="memberNum" align="center" label="成员数" />
|
||||
<el-table-column
|
||||
prop="goldIncome"
|
||||
align="center"
|
||||
label="月金币收入(流水)"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="hasGoldIncomeMemberNum"
|
||||
align="center"
|
||||
label="有流水成员数"
|
||||
/>
|
||||
<el-table-column prop="sendGiftUserNum" align="center" label="送礼人数" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="ediClick(scope.row)" type="text" size="default"
|
||||
>查看详情</el-button
|
||||
>
|
||||
<el-button @click="deriveFun2(scope.row)" type="text" size="default"
|
||||
>导出</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 内嵌单个工会详情 -->
|
||||
<el-dialog :title="detailsTitle" v-model="detailsDialog">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataDetails"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="erbanNo" align="center" label="用户平台ID"
|
||||
><template v-slot="scope">
|
||||
{{
|
||||
scope.row.enable ? scope.row.erbanNo : scope.row.erbanNo + "离开"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||
<el-table-column prop="micRemainTime" align="center" label="直播时长" />
|
||||
<el-table-column
|
||||
prop="goldIncome"
|
||||
align="center"
|
||||
label="金币收入(流水)"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="sendGiftUserNum"
|
||||
align="center"
|
||||
label="送礼人数"
|
||||
/>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="detailsDialog = false">关闭</el-button>
|
||||
<el-button type="primary" @click="incomeExportFamilyFun()"
|
||||
>导出</el-button
|
||||
>
|
||||
</div></template
|
||||
>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
incomePageFamily,
|
||||
incomeListFamilyMember,
|
||||
incomeExportFamily,
|
||||
incomeExportFamilys,
|
||||
} from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GoldWater",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
time: this.calculateLastSevenDays(),
|
||||
id: "",
|
||||
nick: "",
|
||||
partitionId: 2,
|
||||
inquireonInfos: [
|
||||
{ desc: "英语区", id: 1 },
|
||||
{ desc: "阿拉伯区", id: 2 },
|
||||
{ desc: "华语区", id: 4 },
|
||||
],
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 内嵌单个公会详情
|
||||
detailsDialog: false,
|
||||
detailsTitle: "",
|
||||
tableDataDetails: [],
|
||||
familyIdEx: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
incomePageFamily({
|
||||
erbanNo: this.inquire.id,
|
||||
familyName: this.inquire.nick,
|
||||
partitionId: this.inquire.partitionId,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 导出总外列表
|
||||
deriveFun(val) {
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
incomeExportFamilys({
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
erbanNo: this.inquire.id,
|
||||
familyName: this.inquire.nick,
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => {});
|
||||
},
|
||||
// 导出列表最外层
|
||||
deriveFun2(val) {
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
incomeExportFamily({
|
||||
familyId: val.id,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
}).then((res) => {});
|
||||
this.detailsDialog = false;
|
||||
},
|
||||
// 默认七天
|
||||
calculateLastSevenDays() {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
|
||||
return [start, end];
|
||||
},
|
||||
// 查看详情按钮
|
||||
ediClick(val) {
|
||||
this.detailsTitle = `公会昵称:【${val.name}】 时间:【${val.createTime}】—金币收入明细`;
|
||||
let time = this.inquire.time;
|
||||
let startDate = "";
|
||||
let endDate = "";
|
||||
if (time && time.length > 0) {
|
||||
startDate = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endDate = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
this.familyIdEx = val.id;
|
||||
incomeListFamilyMember({
|
||||
endDate,
|
||||
startDate,
|
||||
familyId: val.id,
|
||||
}).then((res) => {
|
||||
this.tableDataDetails = res.data;
|
||||
this.detailsDialog = true;
|
||||
});
|
||||
},
|
||||
// 导出按钮
|
||||
incomeExportFamilyFun() {
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
incomeExportFamily({
|
||||
familyId: this.familyIdEx,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
}).then((res) => {});
|
||||
this.detailsDialog = false;
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -18,7 +18,7 @@
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<!-- <div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
@@ -30,7 +30,7 @@
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
@@ -73,13 +73,53 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="创建日期" />
|
||||
<!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> -->
|
||||
<el-table-column align="center" label="成员数量/上限"
|
||||
><template v-slot="scope"
|
||||
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</template
|
||||
></el-table-column
|
||||
>
|
||||
<el-table-column prop="goldIncome" align="center" label="金币总收入" />
|
||||
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" />
|
||||
<el-table-column align="center" label="成员数量/上限">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="memberDialogFun(scope.row)"
|
||||
type="text"
|
||||
size="default"
|
||||
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收款账户" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="payAccountDialogFun(scope.row)"
|
||||
type="text"
|
||||
size="medium "
|
||||
>
|
||||
payoneer:{{
|
||||
scope.row.payAccount.payoneer
|
||||
? scope.row.payAccount.payoneer
|
||||
: "未添加"
|
||||
}} </el-button
|
||||
><br />
|
||||
<el-button
|
||||
@click="payAccountDialogFun(scope.row)"
|
||||
type="text"
|
||||
size="medium "
|
||||
>
|
||||
USDT-ERC20:{{
|
||||
scope.row.payAccount.usdt ? scope.row.payAccount.usdt : "未添加"
|
||||
}} </el-button
|
||||
><br />
|
||||
<el-button
|
||||
@click="payAccountDialogFun(scope.row)"
|
||||
type="text"
|
||||
size="medium "
|
||||
>
|
||||
PayPal:{{
|
||||
scope.row.payAccount.payPal
|
||||
? scope.row.payAccount.payPal
|
||||
: "未添加"
|
||||
}} </el-button
|
||||
><br />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" />
|
||||
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> -->
|
||||
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
@@ -203,9 +243,24 @@
|
||||
v-model="ediObj.guildNick"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 公会背景图 -->
|
||||
<div class="selectBox selectBoxImg">
|
||||
<span class="left" style="margin-right: 20px">公会背景图</span>
|
||||
<!-- action="/admin/tencent/cos/upload/file" -->
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError"
|
||||
>
|
||||
<img v-if="ediObj.imageUrl1" :src="ediObj.imageUrl1" class="avatar" />
|
||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</div>
|
||||
<!-- 成员数量上限 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
@@ -238,6 +293,145 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 编辑收款账户弹窗 -->
|
||||
<el-dialog
|
||||
v-model="payAccountDialog"
|
||||
:title="payAccountTitle"
|
||||
width="28%"
|
||||
center
|
||||
>
|
||||
<!-- Payoneer -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>Payoneer</span
|
||||
>
|
||||
<el-input
|
||||
v-model="payAccount.payoneer"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- USDT-ERC20 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>USDT-ERC20</span
|
||||
>
|
||||
<el-input
|
||||
v-model="payAccount.usdt"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- PayPal -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>PayPal</span
|
||||
>
|
||||
<el-input
|
||||
v-model="payAccount.payPal"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="payAccountDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="payAccountClick()">
|
||||
保存
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 编辑成员弹窗 -->
|
||||
<el-dialog v-model="memberDialog" :title="memberTitle" width="36%" center>
|
||||
<!-- 新增用户 -->
|
||||
<div class="inquire">
|
||||
<span>平台ID</span>
|
||||
<el-input
|
||||
v-model="member.userID"
|
||||
placeholder="请输入新增平台id"
|
||||
class="input"
|
||||
></el-input>
|
||||
<el-button type="primary" @click="addMemberFun()"> 新增 </el-button>
|
||||
</div>
|
||||
<!-- 内嵌表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="member.tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column align="center" label="用户平台ID">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.erbanNo
|
||||
}}{{
|
||||
scope.row.roleType == 1
|
||||
? "(会长)"
|
||||
: scope.row.roleType == 2
|
||||
? "(管理员)"
|
||||
: ""
|
||||
}}
|
||||
{{ scope.row.enable == false ? "(已离开)" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||
<el-table-column prop="createTime" align="center" label="加入时间" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="setMemberFun(scope.row)"
|
||||
:class="scope.row.roleType == 2 ? 'danger' : 'primary'"
|
||||
:type="scope.row.roleType == 2 ? 'danger' : 'primary'"
|
||||
size="default"
|
||||
:disabled="scope.row.roleType == 1 ? true : false"
|
||||
>{{
|
||||
scope.row.roleType == 1
|
||||
? "会长"
|
||||
: scope.row.roleType == 2
|
||||
? "取消管理员"
|
||||
: "设为管理员"
|
||||
}}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="
|
||||
memberRemoveObj = scope.row;
|
||||
memberRemoveDialog = true;
|
||||
"
|
||||
class="danger"
|
||||
type="danger"
|
||||
size="default"
|
||||
:disabled="scope.row.roleType == 1 ? true : false"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="memberDialog = false">
|
||||
关闭
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 二次确认删除弹窗 -->
|
||||
<el-dialog v-model="memberRemoveDialog" title="提示" width="30%" center>
|
||||
<span> 确定要删除该成员吗?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="memberRemoveDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="delmemberRemoveClick()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -247,6 +441,11 @@ import {
|
||||
create,
|
||||
update,
|
||||
dismiss,
|
||||
savePayAccount,
|
||||
manageListFamilyMember,
|
||||
addMember,
|
||||
setManager,
|
||||
removeMember,
|
||||
} from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
@@ -287,7 +486,28 @@ export default {
|
||||
guildNick: "",
|
||||
guildNumber: "",
|
||||
id: "",
|
||||
imageUrl1: "",
|
||||
},
|
||||
// 收款账户弹窗
|
||||
payAccountDialog: false,
|
||||
payAccountTitle: "(会长昵称【ID:0】)的收款账户",
|
||||
payAccountNew: {},
|
||||
payAccount: {
|
||||
payoneer: "",
|
||||
usdt: "",
|
||||
payPal: "",
|
||||
},
|
||||
// 新增成员弹窗
|
||||
memberDialog: false,
|
||||
memberTitle: "【公会名称】成员信息",
|
||||
memberNew: {},
|
||||
member: {
|
||||
userID: "",
|
||||
tableData: [],
|
||||
},
|
||||
// 删除成员弹窗
|
||||
memberRemoveDialog: false,
|
||||
memberRemoveObj: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -308,8 +528,8 @@ export default {
|
||||
erbanNo: this.inquire.userId,
|
||||
referrer: this.inquire.referrer,
|
||||
familyName: this.inquire.nick,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
// startDate: startTime,
|
||||
// endDate: endTime,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
@@ -318,6 +538,132 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 打开成员信息弹窗
|
||||
memberDialogFun(val) {
|
||||
var than = this;
|
||||
than.memberTitle = `【${val.name}】成员信息`;
|
||||
than.memberNew = val;
|
||||
manageListFamilyMember({
|
||||
familyId: val.id,
|
||||
}).then((res) => {
|
||||
this.member.tableData = res.data;
|
||||
than.memberDialog = true;
|
||||
});
|
||||
},
|
||||
// 二次确认删除成员
|
||||
delmemberRemoveClick() {
|
||||
removeMember({
|
||||
familyMemberId: this.memberRemoveObj.familyMemberId,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "删除成功",
|
||||
type: "success",
|
||||
});
|
||||
manageListFamilyMember({
|
||||
familyId: this.memberNew.id,
|
||||
}).then((res) => {
|
||||
this.member.tableData = res.data;
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.memberRemoveDialog = false;
|
||||
});
|
||||
},
|
||||
// 设置管理员
|
||||
setMemberFun(val) {
|
||||
setManager({
|
||||
familyMemberId: val.familyMemberId,
|
||||
status: val.roleType == 3 ? true : val.roleType == 2 ? false : null,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "设置成功!",
|
||||
type: "success",
|
||||
});
|
||||
this.member.userID = "";
|
||||
manageListFamilyMember({
|
||||
familyId: this.memberNew.id,
|
||||
}).then((res) => {
|
||||
this.member.tableData = res.data;
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增成员
|
||||
addMemberFun() {
|
||||
addMember({
|
||||
erbanNo: this.member.userID,
|
||||
familyId: this.memberNew.id,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存成功!",
|
||||
type: "success",
|
||||
});
|
||||
this.member.userID = "";
|
||||
manageListFamilyMember({
|
||||
familyId: this.memberNew.id,
|
||||
}).then((res) => {
|
||||
this.member.tableData = res.data;
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存失败!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 打开收款账户弹窗
|
||||
payAccountDialogFun(val) {
|
||||
this.payAccountTitle = `(${val.ownerNick}【ID:${val.ownerErbanNo}】)的收款账户`;
|
||||
this.payAccount.payoneer = val.payAccount.payoneer;
|
||||
this.payAccount.usdt = val.payAccount.usdt;
|
||||
this.payAccount.payPal = val.payAccount.payPal;
|
||||
this.payAccountDialog = true;
|
||||
this.payAccountNew = val;
|
||||
},
|
||||
// 保存收款账户
|
||||
payAccountClick() {
|
||||
savePayAccount({
|
||||
id: this.payAccountNew.payAccount.familyId,
|
||||
payPal: this.payAccount.payPal,
|
||||
payoneer: this.payAccount.payoneer,
|
||||
usdt: this.payAccount.usdt,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存成功!",
|
||||
type: "success",
|
||||
});
|
||||
this.payAccountDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "保存失败!",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 导出
|
||||
exportInfoFun() {
|
||||
let time = this.inquire.time;
|
||||
@@ -331,8 +677,8 @@ export default {
|
||||
erbanNo: this.inquire.userId,
|
||||
referrer: this.inquire.referrer,
|
||||
familyName: this.inquire.nick,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
// startDate: startTime,
|
||||
// endDate: endTime,
|
||||
}).then((res) => {});
|
||||
},
|
||||
// 添加
|
||||
@@ -353,6 +699,7 @@ export default {
|
||||
this.ediObj.guildNick = obj.name;
|
||||
this.ediObj.guildNumber = obj.memberNumLimit;
|
||||
this.ediObj.id = obj.id;
|
||||
this.ediObj.imageUrl1 = obj.backgroundUrl;
|
||||
this.editDialog = true;
|
||||
},
|
||||
// 二次确认弹窗
|
||||
@@ -361,6 +708,8 @@ export default {
|
||||
update({
|
||||
id: this.ediObj.id,
|
||||
memberNumLimit: this.ediObj.guildNumber,
|
||||
backgroundUrl: this.ediObj.imageUrl1,
|
||||
name: this.ediObj.guildNick,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
@@ -403,6 +752,30 @@ export default {
|
||||
this.delDialog = false;
|
||||
});
|
||||
},
|
||||
beforeAvatarUpload() {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传中~",
|
||||
type: "warning",
|
||||
});
|
||||
},
|
||||
handleAvatarError() {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传失败!",
|
||||
type: "error",
|
||||
});
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
console.log(file);
|
||||
// this.ediObj.imageUrl1 = URL.createObjectURL();
|
||||
this.ediObj.imageUrl1 = file.response.data;
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传成功!",
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
@@ -436,4 +809,13 @@ export default {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.selectBoxImg {
|
||||
height: 150px;
|
||||
}
|
||||
</style>
|
||||
|
403
src/views/nobleman/WagesCount.vue
Normal file
403
src/views/nobleman/WagesCount.vue
Normal file
@@ -0,0 +1,403 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-config-provider :locale="zhCn">
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="month"
|
||||
placeholder="选择月"
|
||||
>
|
||||
</el-date-picker
|
||||
></el-config-provider>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">会长分区</span>
|
||||
<el-select
|
||||
v-model="inquire.partitionId"
|
||||
style="width: 75%"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inquire.inquireonInfos"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 公会 -->
|
||||
<div class="inquire">
|
||||
<span>会长ID</span>
|
||||
<el-input v-model="inquire.nick" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 导出 -->
|
||||
<el-button class="primary" type="primary" @click="deriveFun()"
|
||||
>导出</el-button
|
||||
>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
||||
<el-table-column prop="name" align="center" label="公会名称" />
|
||||
<el-table-column
|
||||
prop="ownerPartitionName"
|
||||
align="center"
|
||||
label="会长分区"
|
||||
/>
|
||||
<el-table-column prop="memberNum" align="center" label="成员数" />
|
||||
<el-table-column
|
||||
prop="goldIncome"
|
||||
align="center"
|
||||
label="月金币收入(流水)"
|
||||
/>
|
||||
<el-table-column prop="goldWage" align="center" label="金币工资" />
|
||||
<el-table-column prop="agentWage" align="center" label="代理工资" />
|
||||
<el-table-column prop="diamondRemain" align="center" label="当前钻石余额">
|
||||
<template v-slot="scope">{{ scope.row.diamondRemain }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="260">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="ediClick(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>查看详情</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="deriveFun2(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>导出</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 内嵌单个工会详情 -->
|
||||
<el-dialog :title="detailsTitle" v-model="detailsDialog">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataDetails"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="erbanNo" align="center" label="用户平台ID">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.erbanNo == scope.row.familyOwnerErbanNo
|
||||
? scope.row.erbanNo + "(会长)"
|
||||
: scope.row.enable
|
||||
? scope.row.erbanNo
|
||||
: scope.row.erbanNo + "离开"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||
<el-table-column
|
||||
prop="micRemainTime"
|
||||
align="center"
|
||||
label="本月直播时长"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="micVaildDays"
|
||||
align="center"
|
||||
label="本月有效天数"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="goldIncome"
|
||||
align="center"
|
||||
label="月金币收入(流水)"
|
||||
/>
|
||||
<el-table-column prop="goldWage" align="center" label="金币工资" />
|
||||
<el-table-column prop="agentWage" align="center" label="代理工资" />
|
||||
<el-table-column
|
||||
prop="diamondRemain"
|
||||
align="center"
|
||||
label="当前钻石余额"
|
||||
/>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="detailsClick(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="detailsDialog = false">关闭</el-button>
|
||||
<el-button type="primary" @click="detailsClickOut()">导出</el-button>
|
||||
</div></template
|
||||
>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 内嵌单个成员明细 -->
|
||||
<el-dialog :title="detailsTitle2" v-model="detailsDialog2">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataDetails2"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="micRemainTime" align="center" label="直播时长" />
|
||||
<el-table-column prop="micVaild" align="center" label="是否有效天">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.micVaild ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goldIncome"
|
||||
align="center"
|
||||
label="当日金币收入"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="savedGoldIncome"
|
||||
align="center"
|
||||
label="月累计金币收入"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="saveedGoldWage"
|
||||
align="center"
|
||||
label="月金币工资"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="diamondRemain"
|
||||
align="center"
|
||||
label="当日钻石余额"
|
||||
/>
|
||||
<!-- <el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="detailsClick2(scope)"
|
||||
class="primary"
|
||||
type="text"
|
||||
size="default"
|
||||
:disabled="!scope.row.enable"
|
||||
>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="detailsDialog2 = false">关闭</el-button>
|
||||
<el-button type="primary" @click="detailsClickOut2()">导出</el-button>
|
||||
</div></template
|
||||
>
|
||||
</el-dialog>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
|
||||
import {
|
||||
statPageFamily,
|
||||
listFamilyMember,
|
||||
statExportFamilyMember,
|
||||
listFamilyMemberDaily,
|
||||
exportFamilyMemberDaily,
|
||||
statExportFamily,
|
||||
} from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "WagesCount",
|
||||
data() {
|
||||
return {
|
||||
zhCn,
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
time: "",
|
||||
nick: "",
|
||||
partitionId: 2,
|
||||
inquireonInfos: [
|
||||
{ desc: "英语区", id: 1 },
|
||||
{ desc: "阿拉伯区", id: 2 },
|
||||
{ desc: "华语区", id: 4 },
|
||||
],
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 内嵌单个公会详情
|
||||
detailsDialog: false,
|
||||
detailsTitle: "工会昵称 时间段 结算明细",
|
||||
tableDataDetails: [],
|
||||
detailsClickOutObj: {},
|
||||
// 内嵌单个公会详情2
|
||||
detailsDialog2: false,
|
||||
detailsTitle2: "工会昵称 用户昵称(ID:0) 时间段 结算明细",
|
||||
tableDataDetails2: [],
|
||||
detailsClickOutObj2: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
// this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
if (time) {
|
||||
time = dateFormat(this.inquire.time, "yyyy-MM");
|
||||
}
|
||||
statPageFamily({
|
||||
erbanNo: this.inquire.nick,
|
||||
partitionId: this.inquire.partitionId,
|
||||
month: time,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 导出总外列表
|
||||
deriveFun(val) {
|
||||
let time = this.inquire.time;
|
||||
if (time) {
|
||||
time = dateFormat(this.inquire.time, "yyyy-MM");
|
||||
}
|
||||
statExportFamily({
|
||||
erbanNo: this.inquire.nick,
|
||||
month: time,
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => {});
|
||||
},
|
||||
// 导出列表最外层
|
||||
deriveFun2(val) {
|
||||
statExportFamilyMember({
|
||||
familyId: val.id,
|
||||
month: dateFormat(this.inquire.time, "yyyy-MM"),
|
||||
});
|
||||
this.detailsDialog = false;
|
||||
},
|
||||
// 1层查看详情按钮
|
||||
ediClick(val) {
|
||||
console.log(val);
|
||||
var than = this;
|
||||
this.detailsClickOutObj = val;
|
||||
than.detailsTitle = `[${val.name}] [${dateFormat(
|
||||
than.inquire.time,
|
||||
"yyyy-MM"
|
||||
)}]结算明细`;
|
||||
listFamilyMember({
|
||||
familyId: val.id,
|
||||
month: dateFormat(than.inquire.time, "yyyy-MM"),
|
||||
}).then((res) => {
|
||||
this.tableDataDetails = res.data;
|
||||
this.detailsDialog = true;
|
||||
});
|
||||
},
|
||||
// 导出最外层数据按钮
|
||||
detailsClickOut() {
|
||||
statExportFamilyMember({
|
||||
familyId: this.detailsClickOutObj.id,
|
||||
month: dateFormat(this.inquire.time, "yyyy-MM"),
|
||||
});
|
||||
this.detailsDialog = false;
|
||||
},
|
||||
// 嵌套详情按钮
|
||||
detailsClick(val) {
|
||||
var than = this;
|
||||
this.detailsClickOutObj2 = val;
|
||||
than.detailsTitle2 = `公会名称:${val.familyName} 成员名称:${
|
||||
val.nick
|
||||
}(ID:${val.erbanNo}) ${dateFormat(
|
||||
than.inquire.time,
|
||||
"yyyy-MM"
|
||||
)} 结算明细`;
|
||||
listFamilyMemberDaily({
|
||||
familyId: val.familyId,
|
||||
month: dateFormat(than.inquire.time, "yyyy-MM"),
|
||||
uid: val.uid,
|
||||
}).then((res) => {
|
||||
than.tableDataDetails2 = res.data;
|
||||
than.detailsDialog2 = true;
|
||||
});
|
||||
},
|
||||
// 导出每日成员数据
|
||||
detailsClickOut2() {
|
||||
exportFamilyMemberDaily({
|
||||
familyId: this.detailsClickOutObj2.id,
|
||||
month: dateFormat(this.inquire.time, "yyyy-MM"),
|
||||
uid: this.detailsClickOutObj2.uid,
|
||||
});
|
||||
this.detailsDialog2 = false;
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
188
src/views/nobleman/WaterSettlement.vue
Normal file
188
src/views/nobleman/WaterSettlement.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="addDialog = true"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-tabs v-model="roleType" @click="handleClick" style="margin-top: 20px">
|
||||
<el-tab-pane label="金币工资" name="3"></el-tab-pane>
|
||||
<el-tab-pane label="代理工资" name="1"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="level"
|
||||
align="center"
|
||||
label="金币目标(金币流水)"
|
||||
/>
|
||||
<el-table-column prop="wage" align="center" label="金币工资(USD)" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="delClick(scope.row)"
|
||||
class="danger"
|
||||
type="danger"
|
||||
size="default"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 新增弹窗 -->
|
||||
<el-dialog title="新增档位" v-model="addDialog" width="35%">
|
||||
<div class="inquire">
|
||||
<span>金币目标(金币流水)</span>
|
||||
<el-input v-model="add.gold" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>金币工资(USD)</span>
|
||||
<el-input v-model="add.usdt" placeholder="" class="input"></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="addDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="addShour()">保存</el-button>
|
||||
</div></template
|
||||
>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 二次确认删除弹窗 -->
|
||||
<el-dialog v-model="delDialog" title="提示" width="30%" center>
|
||||
<span> 确定要删除吗?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="delDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="dle()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { manageList, manageAdd, manageDelete } from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "WaterSettlement",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
// 切换
|
||||
roleType: "3",
|
||||
// 表格
|
||||
tableData: [],
|
||||
arr1: [],
|
||||
arr2: [],
|
||||
// 新增弹窗
|
||||
addDialog: false,
|
||||
add: {
|
||||
gold: "",
|
||||
usdt: "",
|
||||
},
|
||||
delDialog: false,
|
||||
delObj: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
manageList({
|
||||
roleType: this.roleType,
|
||||
}).then((res) => {
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
this.getData();
|
||||
},
|
||||
// 确认新增按钮
|
||||
addShour() {
|
||||
manageAdd({
|
||||
roleType: this.roleType,
|
||||
level: this.add.gold,
|
||||
wage: this.add.usdt,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "新增成功",
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.addDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除
|
||||
delClick(val) {
|
||||
this.delObj = val;
|
||||
this.delDialog = true;
|
||||
},
|
||||
// 确认删除
|
||||
dle() {
|
||||
manageDelete({ id: this.delObj.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "删除成功",
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.delDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
width: 60%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -1,234 +0,0 @@
|
||||
<template>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="appleChargeProdId"
|
||||
align="center"
|
||||
label="apple充值档位"
|
||||
/>
|
||||
<el-table-column prop="createTime" align="center" label="创建时间" />
|
||||
<el-table-column
|
||||
prop="googleChargeProdId"
|
||||
align="center"
|
||||
label="google充值档位"
|
||||
/>
|
||||
<el-table-column prop="id" align="center" label="主键" />
|
||||
<el-table-column prop="seqNo" align="center" label="排序" />
|
||||
<el-table-column prop="showAmount" align="center" label="展示金额" />
|
||||
<el-table-column prop="tabName" align="center" label="TAB名称">
|
||||
<template v-slot="scope">
|
||||
{{ JsonFunc(scope.row.tabName).zh }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="updateTime" align="center" label="更新时间" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
controlsDialog = true;
|
||||
controlsObjNew = scope.row;
|
||||
controlsObj.value = controlsObjNew.partitionId;
|
||||
controlsObj.num = controlsObjNew.showAmount;
|
||||
"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
|
||||
<!-- 新增&编辑弹窗 -->
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
class="pub"
|
||||
v-model="controlsDialog"
|
||||
:title="controlsTitle"
|
||||
width="32%"
|
||||
center
|
||||
>
|
||||
<!-- 地区选择 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; width: 134%">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>地区选择</span
|
||||
>
|
||||
<el-select filterable v-model="controlsObj.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in controlsObj.options"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 展示折扣金额 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; width: 134%">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>展示折扣金额</span
|
||||
>
|
||||
<el-input
|
||||
v-model="controlsObj.num"
|
||||
placeholder=""
|
||||
class="input"
|
||||
style="display: inline-block; width: 36%"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="controlsDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="controlsDialogOut()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
weekCardTabList,
|
||||
listPartitionInfo,
|
||||
weekCardTabSave,
|
||||
} from "@/api/weeklyCard/weeklyCard";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: "weekCardGear",
|
||||
data() {
|
||||
return {
|
||||
inquire: {
|
||||
giftId: "",
|
||||
userId: "",
|
||||
time: "",
|
||||
},
|
||||
loading: false,
|
||||
// 表格数据
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 编辑
|
||||
controlsDialog: false,
|
||||
controlsObjNew: false,
|
||||
controlsObj: {
|
||||
value: "",
|
||||
options: [],
|
||||
num: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
listPartitionInfo().then((res) => {
|
||||
this.controlsObj.options = res.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.loading = true;
|
||||
weekCardTabList({})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.data;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "获取数据失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 确认编辑按钮
|
||||
controlsDialogOut() {
|
||||
weekCardTabSave({
|
||||
showAmount: this.controlsObj.num,
|
||||
partitionId: this.controlsObj.value,
|
||||
id: this.controlsObjNew.id,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.getData();
|
||||
this.controlsDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
JsonFunc(val) {
|
||||
var res = JSON.parse(val);
|
||||
return res;
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange(size) {
|
||||
this.pageSize = size;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(page) {
|
||||
this.currentPage = page;
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -1,841 +0,0 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<!-- 地区 -->
|
||||
<span class="demonstration">地区</span>
|
||||
<el-select filterable v-model="inquire.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inquire.options"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<!-- 地区 -->
|
||||
<span class="demonstration">周卡栏</span>
|
||||
<el-select filterable v-model="inquire.value2" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inquire.options2"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 新增按钮 -->
|
||||
<el-button class="primary" type="primary" @click="add()">新增</el-button>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="id" align="center" label="ID" />
|
||||
<el-table-column prop="groupName" align="center" label="日期" />
|
||||
<el-table-column prop="rewardType" align="center" label="金币">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.rewardType == 1 ? scope.row.rewardNum : "/" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rewardType" align="center" label="礼物类型">
|
||||
<template v-slot="scope">
|
||||
{{ rewardTypeNumFun(scope.row.rewardType).name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rewardName" align="center" label="礼物名称" />
|
||||
<el-table-column prop="rewardPrice" align="center" label="礼物价值" />
|
||||
<el-table-column prop="rewardNum" align="center" label="数量" />
|
||||
<el-table-column prop="rewardValue" align="center" label="可用天数" />
|
||||
<el-table-column prop="seqNo" align="center" label="排序" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="cardIcon"
|
||||
label="卡片ICON"
|
||||
width="120"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.cardIcon"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="scope.row.cardIcon"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="rewardIcon"
|
||||
label="奖励ICON"
|
||||
width="120"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.rewardIcon"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="scope.row.rewardIcon"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="eid(scope)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="
|
||||
delDialog = true;
|
||||
delObj = scope.row;
|
||||
"
|
||||
:class="scope.row.isEnabled == 1 ? 'danger' : 'primary'"
|
||||
:type="scope.row.isEnabled == 1 ? 'danger' : 'primary'"
|
||||
size="default"
|
||||
>{{ scope.row.isEnabled == 1 ? "下线" : "上线" }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
|
||||
<!-- 添加和编辑弹窗 -->
|
||||
<el-dialog
|
||||
v-model="operationDialog"
|
||||
:title="operationTitle"
|
||||
width="30%"
|
||||
center
|
||||
>
|
||||
<!-- 输入日期 -->
|
||||
<div class="selectBox">
|
||||
<span class="left" style="margin-right: 20px">输入日期</span>
|
||||
<el-select filterable v-model="operation.days" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in operation.optionsDays"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 金币数量 -->
|
||||
<div class="selectBox">
|
||||
<span class="left" style="margin-right: 20px">金币数量</span>
|
||||
<el-input
|
||||
v-model="operation.gameName"
|
||||
size="default"
|
||||
placeholder=""
|
||||
class="right"
|
||||
style="width: 70%"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 游戏icon -->
|
||||
<div class="selectBox selectBoxImg">
|
||||
<span class="left" style="margin-right: 20px">金币icon</span>
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError"
|
||||
>
|
||||
<img
|
||||
v-if="operation.imageUrl1"
|
||||
:src="operation.imageUrl1"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</div>
|
||||
<!-- 选择礼物类型 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; width: 134%">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>选择礼物类型</span
|
||||
>
|
||||
<el-select
|
||||
filterable
|
||||
v-model="operation.value"
|
||||
@change="optionsChange()"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in operation.options"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 奖励 -->
|
||||
<div
|
||||
v-show="operationIsShow"
|
||||
style="margin-bottom: 25px; margin-top: 10px; width: 134%"
|
||||
>
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>奖励</span
|
||||
>
|
||||
<el-select
|
||||
filterable
|
||||
v-model="operation.value2"
|
||||
@change="operationChange(e)"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in operation.options2"
|
||||
:key="item.id"
|
||||
:label="
|
||||
operation.value == 2
|
||||
? JsonFunc(item.giftName).zh
|
||||
: operation.value == 16 || operation.value == 17
|
||||
? JsonFunc(item.name).zh
|
||||
: item.name
|
||||
"
|
||||
:value="operation.value == 2 ? item.giftId : item.id"
|
||||
>
|
||||
<!-- item.name -->
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 奖励天数 -->
|
||||
<div v-show="operationIsShow" class="selectBox">
|
||||
<span class="left" style="margin-right: 20px">奖励天数</span>
|
||||
<el-input
|
||||
v-model="operation.rewardDays"
|
||||
size="default"
|
||||
placeholder="特权类奖励请输入天数,其他不需要填写"
|
||||
class="right"
|
||||
style="width: 70%"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 奖励个数v-show="!operationIsShow" -->
|
||||
<div class="selectBox">
|
||||
<span class="left" style="margin-right: 20px">奖励个数</span>
|
||||
<el-input
|
||||
v-model="operation.rewardGoldNum"
|
||||
size="default"
|
||||
placeholder="金币/金币礼物请输入数量"
|
||||
class="right"
|
||||
style="width: 70%"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 排序 -->
|
||||
<div class="selectBox">
|
||||
<span class="left" style="margin-right: 20px">排序</span>
|
||||
<el-input
|
||||
v-model="operation.seqNo"
|
||||
size="default"
|
||||
placeholder="请输入排序,越小排序越前 "
|
||||
class="right"
|
||||
style="width: 70%"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 操作 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="operationDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="operationClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 二次确认弹窗 -->
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
v-model="delDialog"
|
||||
title="提示"
|
||||
width="30%"
|
||||
center
|
||||
>
|
||||
<span> 确定要进行该操作吗?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="delDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="delClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listPartitionInfo,
|
||||
weekCardPage,
|
||||
getAll,
|
||||
carAll,
|
||||
headwearAll,
|
||||
nameplateAll,
|
||||
chatbubbleAll,
|
||||
infocard,
|
||||
weekCardSave,
|
||||
updateEnabled,
|
||||
} from "@/api/weeklyCard/weeklyCard";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: "weekCardSet",
|
||||
data() {
|
||||
return {
|
||||
inquire: {
|
||||
value: "",
|
||||
options: [],
|
||||
value2: "",
|
||||
value22: "",
|
||||
options2: [
|
||||
{ desc: "初级周卡", id: 1 },
|
||||
{ desc: "中级周卡", id: 2 },
|
||||
{ desc: "高级周卡", id: 3 },
|
||||
],
|
||||
},
|
||||
giftArr: [],
|
||||
carArr: [],
|
||||
headArr: [],
|
||||
nameplateArr: [],
|
||||
bubbleArr: [],
|
||||
cardArr: [],
|
||||
loading: false,
|
||||
// 表格数据
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 编辑
|
||||
operationDialog: false,
|
||||
operationType: 1, //1添加2编辑
|
||||
operationTitle: "编辑&添加",
|
||||
operatioObj: {},
|
||||
operation: {
|
||||
days: "",
|
||||
optionsDays: [
|
||||
{ desc: "第一天", id: 1 },
|
||||
{ desc: "第二天", id: 2 },
|
||||
{ desc: "第三天", id: 3 },
|
||||
{ desc: "第四天", id: 4 },
|
||||
{ desc: "第五天", id: 5 },
|
||||
{ desc: "第六天", id: 6 },
|
||||
{ desc: "第七天", id: 7 },
|
||||
],
|
||||
gameName: "",
|
||||
imageUrl1: "",
|
||||
value: "",
|
||||
options: [
|
||||
{ desc: "金币", id: 1 },
|
||||
{ desc: "礼物", id: 2 },
|
||||
{ desc: "铭牌", id: 14 },
|
||||
{ desc: "头饰", id: 4 },
|
||||
{ desc: "气泡", id: 16 },
|
||||
{ desc: "资料卡", id: 17 },
|
||||
{ desc: "座驾", id: 3 },
|
||||
],
|
||||
value2: "",
|
||||
value22: "",
|
||||
options2: [],
|
||||
rewardDays: "",
|
||||
rewardGoldNum: "",
|
||||
seqNo: "",
|
||||
},
|
||||
operationIsShow: true,
|
||||
// 上下线
|
||||
delDialog: false,
|
||||
delObj: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getData();
|
||||
listPartitionInfo().then((res) => {
|
||||
this.inquire.options = res.data;
|
||||
});
|
||||
this.loading = true;
|
||||
getAll().then((res) => {
|
||||
this.giftArr = res.data;
|
||||
carAll().then((res) => {
|
||||
this.carArr = res.data;
|
||||
headwearAll().then((res) => {
|
||||
this.headArr = res.data;
|
||||
nameplateAll().then((res) => {
|
||||
this.nameplateArr = res.data;
|
||||
chatbubbleAll().then((res) => {
|
||||
this.bubbleArr = res.data;
|
||||
infocard().then((res) => {
|
||||
this.cardArr = res.data;
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 上线下线
|
||||
delClick() {
|
||||
updateEnabled({
|
||||
weekCardId: this.delObj.id,
|
||||
isEnabled: !this.delObj.isEnabled == true ? 1 : 2,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.getData();
|
||||
this.loading = false;
|
||||
this.delDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询
|
||||
getData() {
|
||||
this.loading = true;
|
||||
weekCardPage({
|
||||
page: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
partitionId: this.inquire.value,
|
||||
tabId: this.inquire.value2,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "获取数据失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 监听礼物类型
|
||||
optionsChange() {
|
||||
let than = this;
|
||||
var type = than.operation.value;
|
||||
than.operation.value2 = "";
|
||||
if (type) {
|
||||
than.operationIsShow = true;
|
||||
if (type == 2) {
|
||||
//礼物
|
||||
than.operation.options2 = than.giftArr;
|
||||
} else if (type == 3) {
|
||||
//座驾
|
||||
than.operation.options2 = than.carArr;
|
||||
} else if (type == 4) {
|
||||
//头饰
|
||||
than.operation.options2 = than.headArr;
|
||||
} else if (type == 14) {
|
||||
//铭牌
|
||||
than.operation.options2 = than.nameplateArr;
|
||||
} else if (type == 16) {
|
||||
//气泡
|
||||
than.operation.options2 = than.bubbleArr;
|
||||
} else if (type == 17) {
|
||||
//资料卡
|
||||
than.operation.options2 = than.cardArr;
|
||||
} else if (type == 1) {
|
||||
//金币
|
||||
than.operationIsShow = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
operationChange() {
|
||||
this.operation.options2.forEach((res, i) => {
|
||||
if (this.operation.value == 2) {
|
||||
if (res.giftId == this.operation.value2) {
|
||||
this.operation.value22 =
|
||||
this.operation.value == 2
|
||||
? this.JsonFunc(res.giftName).zh
|
||||
: this.operation.value == 16 || this.operation.value == 17
|
||||
? this.JsonFunc(res.name).zh
|
||||
: res.name;
|
||||
}
|
||||
} else {
|
||||
if (res.id == this.operation.value2) {
|
||||
this.operation.value22 =
|
||||
this.operation.value == 2
|
||||
? this.JsonFunc(res.giftName).zh
|
||||
: this.operation.value == 16 || this.operation.value == 17
|
||||
? this.JsonFunc(res.name).zh
|
||||
: res.name;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增
|
||||
add() {
|
||||
this.operation = {
|
||||
days: "",
|
||||
optionsDays: [
|
||||
{ desc: "第一天", id: 1 },
|
||||
{ desc: "第二天", id: 2 },
|
||||
{ desc: "第三天", id: 3 },
|
||||
{ desc: "第四天", id: 4 },
|
||||
{ desc: "第五天", id: 5 },
|
||||
{ desc: "第六天", id: 6 },
|
||||
{ desc: "第七天", id: 7 },
|
||||
],
|
||||
gameName: "",
|
||||
imageUrl1: "",
|
||||
value: "",
|
||||
options: [
|
||||
{ desc: "金币", id: 1 },
|
||||
{ desc: "礼物", id: 2 },
|
||||
{ desc: "铭牌", id: 14 },
|
||||
{ desc: "头饰", id: 4 },
|
||||
{ desc: "气泡", id: 16 },
|
||||
{ desc: "资料卡", id: 17 },
|
||||
{ desc: "座驾", id: 3 },
|
||||
],
|
||||
value2: "",
|
||||
options2: [],
|
||||
rewardDays: "",
|
||||
rewardGoldNum: "",
|
||||
seqNo: "",
|
||||
};
|
||||
this.operationType = 1;
|
||||
this.operationTitle = "添加";
|
||||
this.operationDialog = true;
|
||||
},
|
||||
// 编辑
|
||||
eid(scope) {
|
||||
this.operationDialog = true;
|
||||
this.operatioObj = scope.row;
|
||||
this.operation = {
|
||||
days: this.operatioObj.groupId,
|
||||
optionsDays: [
|
||||
{ desc: "第一天", id: 1 },
|
||||
{ desc: "第二天", id: 2 },
|
||||
{ desc: "第三天", id: 3 },
|
||||
{ desc: "第四天", id: 4 },
|
||||
{ desc: "第五天", id: 5 },
|
||||
{ desc: "第六天", id: 6 },
|
||||
{ desc: "第七天", id: 7 },
|
||||
],
|
||||
gameName: this.operatioObj.rewardValue,
|
||||
imageUrl1: this.operatioObj.cardIcon,
|
||||
value: this.operatioObj.rewardType,
|
||||
options: [
|
||||
{ desc: "金币", id: 1 },
|
||||
{ desc: "礼物", id: 2 },
|
||||
{ desc: "铭牌", id: 14 },
|
||||
{ desc: "头饰", id: 4 },
|
||||
{ desc: "气泡", id: 16 },
|
||||
{ desc: "资料卡", id: 17 },
|
||||
{ desc: "座驾", id: 3 },
|
||||
],
|
||||
value2: this.operatioObj.rewardId,
|
||||
options2:
|
||||
this.operatioObj.rewardType == 2
|
||||
? this.giftArr
|
||||
: this.operatioObj.rewardType == 3
|
||||
? this.carArr
|
||||
: this.operatioObj.rewardType == 4
|
||||
? this.headArr
|
||||
: this.operatioObj.rewardType == 14
|
||||
? this.nameplateArr
|
||||
: this.operatioObj.rewardType == 16
|
||||
? this.bubbleArr
|
||||
: this.operatioObj.rewardType == 17
|
||||
? this.cardArr
|
||||
: "",
|
||||
|
||||
rewardDays: this.operatioObj.rewardValue,
|
||||
rewardGoldNum: this.operatioObj.rewardNum,
|
||||
seqNo: this.operatioObj.seqNo,
|
||||
};
|
||||
this.operationType = 2;
|
||||
this.operationTitle = "编辑";
|
||||
this.operationDialog = true;
|
||||
},
|
||||
// 确认按钮
|
||||
operationClick() {
|
||||
if (this.operationType == 1) {
|
||||
// 新增
|
||||
weekCardSave({
|
||||
groupId: this.operation.days,
|
||||
groupName:
|
||||
this.operation.days == 1
|
||||
? "第一天"
|
||||
: this.operation.days == 2
|
||||
? "第二天"
|
||||
: this.operation.days == 3
|
||||
? "第三天"
|
||||
: this.operation.days == 4
|
||||
? "第四天"
|
||||
: this.operation.days == 5
|
||||
? "第五天"
|
||||
: this.operation.days == 6
|
||||
? "第六天"
|
||||
: "第七天",
|
||||
rewardPrice: this.operation.gameName,
|
||||
cardIcon: this.operation.imageUrl1,
|
||||
rewardType: this.operation.value,
|
||||
rewardId: this.operation.value2,
|
||||
rewardName: this.operation.value22,
|
||||
rewardNum: this.operation.rewardGoldNum,
|
||||
seqNo: this.operation.seqNo,
|
||||
partitionId: this.inquire.value1,
|
||||
tabId: this.inquire.value2,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.operationDialog = false;
|
||||
this.getData();
|
||||
this.loading = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "获取数据失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
weekCardSave({
|
||||
groupId: this.operation.days,
|
||||
groupName:
|
||||
this.operation.days == 1
|
||||
? "第一天"
|
||||
: this.operation.days == 2
|
||||
? "第二天"
|
||||
: this.operation.days == 3
|
||||
? "第三天"
|
||||
: this.operation.days == 4
|
||||
? "第四天"
|
||||
: this.operation.days == 5
|
||||
? "第五天"
|
||||
: this.operation.days == 6
|
||||
? "第六天"
|
||||
: "第七天",
|
||||
rewardPrice: this.operation.gameName,
|
||||
cardIcon: this.operation.imageUrl1,
|
||||
rewardType: this.operation.value,
|
||||
rewardId: this.operation.value2,
|
||||
rewardName: this.operation.value22,
|
||||
rewardNum: this.operation.rewardGoldNum,
|
||||
seqNo: this.operation.seqNo,
|
||||
id: this.operatioObj.id,
|
||||
partitionId: this.inquire.value1,
|
||||
tabId: this.inquire.value2,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.getData();
|
||||
this.operationDialog = false;
|
||||
this.loading = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "获取数据失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
// 单位判断
|
||||
rewardTypeNumFun(num) {
|
||||
if (num == 1) {
|
||||
return { name: "金币", unit: "个" };
|
||||
} else if (num == 2) {
|
||||
return { name: "礼物", unit: "个" };
|
||||
} else if (num == 3) {
|
||||
return { name: "座驾", unit: "天" };
|
||||
} else if (num == 4) {
|
||||
return { name: "头饰", unit: "天" };
|
||||
} else if (num == 5) {
|
||||
return { name: "背景", unit: "天" };
|
||||
} else if (num == 6) {
|
||||
return { name: "实物", unit: "个" };
|
||||
} else if (num == 7) {
|
||||
return { name: "靓号", unit: "天" };
|
||||
} else if (num == 8) {
|
||||
return { name: "全麦礼物", unit: "个" };
|
||||
} else if (num == 9) {
|
||||
return { name: "随机靓号", unit: "天" };
|
||||
} else if (num == 10) {
|
||||
return { name: "锤子", unit: "个" };
|
||||
} else if (num == 13) {
|
||||
return { name: "祝福语", unit: "天" };
|
||||
} else if (num == 14) {
|
||||
return { name: "铭牌", unit: "天" };
|
||||
} else if (num == 15) {
|
||||
return { name: "虚拟货币", unit: "个" };
|
||||
} else if (num == 16) {
|
||||
return { name: "聊天气泡", unit: "天" };
|
||||
} else if (num == 17) {
|
||||
return { name: "资料卡", unit: "天" };
|
||||
} else {
|
||||
return { name: "null", unit: "null" };
|
||||
}
|
||||
},
|
||||
beforeAvatarUpload() {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传中~",
|
||||
type: "warning",
|
||||
});
|
||||
},
|
||||
handleAvatarError() {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传失败!",
|
||||
type: "error",
|
||||
});
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
console.log(file);
|
||||
// this.operation.imageUrl1 = URL.createObjectURL();
|
||||
this.operation.imageUrl1 = file.response.data;
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传成功!",
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange(size) {
|
||||
this.pageSize = size;
|
||||
this.getData();
|
||||
this.loading = false;
|
||||
},
|
||||
handleCurrentChange(page) {
|
||||
this.currentPage = page;
|
||||
this.getData();
|
||||
this.loading = false;
|
||||
},
|
||||
JsonFunc(val) {
|
||||
var res = JSON.parse(val);
|
||||
return res;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.avatar-uploader .avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.selectBox span {
|
||||
min-width: 80px;
|
||||
}
|
||||
.selectBoxImg {
|
||||
height: 150px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload .el-upload__input {
|
||||
display: none;
|
||||
}
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: var(--el-color-primary);
|
||||
}
|
||||
</style>
|
@@ -1,293 +0,0 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<!-- 地区 -->
|
||||
<span class="demonstration">地区</span>
|
||||
<el-select filterable v-model="inquire.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inquire.options"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 导出按钮 -->
|
||||
<el-button class="primary" type="primary" @click="derive()">导出</el-button>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="dateTime" align="center" label="日期" />
|
||||
<el-table-column prop="userNum1" align="center" label="初级周卡获得人数" />
|
||||
<el-table-column prop="userNum2" align="center" label="中级周卡获得人数" />
|
||||
<el-table-column prop="userNum3" align="center" label="高级周卡获得人数" />
|
||||
<el-table-column prop="chargeAmount" align="center" label="充值金额" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="detial(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
|
||||
<!-- 详情弹窗 -->
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
class="pub"
|
||||
v-model="controlsDialog"
|
||||
title="详情"
|
||||
width="32%"
|
||||
center
|
||||
>
|
||||
<!-- 内表格 -->
|
||||
<el-table
|
||||
v-loading="loading2"
|
||||
:data="tableData2"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="erBanNo" align="center" label="用户ID" />
|
||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||
<el-table-column prop="tabName" align="center" label="购买档位" />
|
||||
<el-table-column prop="chargeAmount" align="center" label="购买金额" />
|
||||
<el-table-column prop="createTimeStr" align="center" label="购买时间" />
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage2"
|
||||
v-model:page-size="pageSize2"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"
|
||||
/>
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="controlsDialog = false">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
weekCardRecordPage,
|
||||
listPartitionInfo,
|
||||
weekCardRecordExport,
|
||||
weekCardRecordGetDetailPage,
|
||||
} from "@/api/weeklyCard/weeklyCard";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: "weekCardStatistics",
|
||||
data() {
|
||||
return {
|
||||
inquire: {
|
||||
time: "",
|
||||
value: "",
|
||||
options: [],
|
||||
},
|
||||
loading: false,
|
||||
loading2: false,
|
||||
// 表格数据
|
||||
tableData: [],
|
||||
tableData2: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 分页2
|
||||
total2: 10, //总页数
|
||||
currentPage2: 1, //页码
|
||||
pageSize2: 10, //条数
|
||||
// 编辑
|
||||
controlsDialog: false,
|
||||
controlsObjNew: false,
|
||||
controlsObj: {
|
||||
value: "",
|
||||
options: [],
|
||||
num: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
listPartitionInfo().then((res) => {
|
||||
this.inquire.options = res.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.loading = true;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.inquire.time && this.inquire.time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
this.loading = true;
|
||||
weekCardRecordPage({
|
||||
startTime,
|
||||
endTime,
|
||||
partitionId: this.inquire.value,
|
||||
pageSize: this.pageSize,
|
||||
page: this.currentPage,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "获取数据失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
derive() {
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.inquire.time && this.inquire.time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
weekCardRecordExport({
|
||||
startTime,
|
||||
endTime,
|
||||
partitionId: this.inquire.value,
|
||||
}).then((res) => {});
|
||||
},
|
||||
detial(val) {
|
||||
weekCardRecordGetDetailPage({
|
||||
page: this.currentPage2,
|
||||
pageSize: this.pageSize2,
|
||||
dateTime: val.createTimeStr,
|
||||
partitionId: this.inquire.value,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tableData2 = res.data.records;
|
||||
this.total2 = res.data.total;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "获取数据失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.controlsDialog = true;
|
||||
this.loading2 = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
this.loading2 = false;
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange2(size) {
|
||||
this.pageSize2 = size;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange2(page) {
|
||||
this.currentPage2 = page;
|
||||
this.getData();
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange(size) {
|
||||
this.pageSize = size;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(page) {
|
||||
this.currentPage = page;
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user